You appear to be a bot. Output may be restricted
Description
Register custom post type: oik_classClass hierarchy is implemented using the parent field Metadata fields: _oik_class_name – the class name _oik_api_plugin – noderef to oik-plugins _oik_api_source – file where the class is defined
Usage
oik_register_class();
Parameters
Returns
voidSource
File name: oik-shortcodes/oik-shortcodes.phpLines:
1 to 26 of 26
function oik_register_class() { $post_type = 'oik_class'; $post_type_args = array(); $post_type_args['label'] = 'Classes'; $post_type_args['singular_label'] = 'Class'; $post_type_args['description'] = 'Classes'; $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_class_name", "text", "Class name" , array( "#length" => 80 )); bw_register_field( "_oik_api_plugin", "noderef", "Plugin ref", array( "#type" => array( "oik-plugins", "oik-themes" ) )); bw_register_field( "_oik_api_source", "text", "Sourcefile" , array( "#length" => 80 )); bw_register_field_for_object_type( "_oik_class_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_api_source", $post_type ); bw_register_field_for_object_type( "_oik_fileref", $post_type ); if ( function_exists( "oikp_columns_and_titles" ) ) { oikp_columns_and_titles( $post_type ); } }View on GitHub