You appear to be a bot. Output may be restricted
Description
Register custom post type: oik_fileFile hierarchy is implemented using the parent field? We use the post_modified_date and the file passes count to tell whether or not to re-parse the file Metadata fields: _oik_file_name – the file name excluding the "plugin" path e.g. oik-shortcodes.php for this file or wp-includes/plugin.php
- Unique within the plugin but may be part of multiple plugins.
Usage
oik_register_file();
Parameters
Returns
voidSource
File name: oik-shortcodes/oik-shortcodes.phpLines:
1 to 31 of 31
function oik_register_file() { $post_type = 'oik_file'; $post_type_args = array(); $post_type_args['label'] = 'Files'; $post_type_args['singular_label'] = 'File'; $post_type_args['description'] = 'Files'; $post_type_args['has_archive'] = true; $post_type_args['hierarchical'] = true; $post_type_args['show_in_rest'] = true; $post_type_args['supports'] = array( 'title', 'editor', 'revisions', 'author' ); bw_register_post_type( $post_type, $post_type_args ); add_post_type_support( $post_type, 'page-attributes' ); bw_register_field( "_oik_file_name", "text", "File name" , array( "#length" => 80 )); bw_register_field( "_oik_api_plugin", "noderef", "Plugin ref", array( "#type" => array( "oik-plugins", "oik-themes") )); //bw_register_field( "_oik_file_passes", "numeric", "Parse count", array( "#theme" => false )); bw_register_field( "_oik_file_deprecated_cb", "checkbox", "Deprecated?"); bw_register_field( "_oik_api_calls", "noderef", "Uses APIs", array( "#type" => "oik_api", "#multiple" => true, "#optional" => true, '#theme' => false, '#length' => 80 )); bw_register_field( "_oik_api_hooks", "noderef", "Uses hooks", array( "#type" => "oik_hook", "#multiple" => true, "#optional" => true, '#theme' => false )); bw_register_field_for_object_type( "_oik_file_name", $post_type ); bw_register_field_for_object_type( "_oik_api_plugin", $post_type ); bw_register_field_for_object_type( "_component_version", $post_type ); //bw_register_field_for_object_type( "_oik_file_passes", $post_type ); bw_register_field_for_object_type( "_oik_file_deprecated_cb", $post_type ); bw_register_field_for_object_type( "_oik_api_calls", $post_type ); bw_register_field_for_object_type( "_oik_api_hooks", $post_type ); if ( function_exists( "oikp_columns_and_titles" ) ) { oikp_columns_and_titles( $post_type ); } }View on GitHub