Description
Register an oik_presentation custom post typeThe "oik_presentation" custommpost type is used to create pages/slides in presentation format The pages can be navigated using a supporting theme The Notes field can be displayed either using the [bw_fields] shortcode OR the "oik_presentation_footer" action supports: 'title', 'editor' (content), 'excerpt', 'thumbnail' (featured image, current theme must also support post-thumbnails), 'page-attributes' (menu order, hierarchical must be true to show Parent option)
Usage
oik_presentation_register_oik_presentation();Parameters
Returns
voidSource
File name: oik-presentation/oik-presentation.phpLines:
1 to 17 of 17
function oik_presentation_register_oik_presentation() { $post_type = 'oik_presentation'; $post_type_args = array(); $post_type_args['hierarchical'] = true; $post_type_args['label'] = __('Presentation pages'); $post_type_args['description'] = __('oik presentation pages'); // We don't need custom-fields if we define our own! $post_type_args['supports'] = array( 'title', 'editor', 'excerpt', 'page-attributes', 'thumbnail', 'author', 'revisions', 'clone' ); $post_type_args[ 'show_in_rest'] = true; // (menu order, hierarchical must be true to show Parent option) bw_register_post_type( $post_type, $post_type_args ); bw_register_field( "_oikp_notes", "textarea", __( "Notes" ) ); bw_register_field_for_object_type( "_oikp_notes", $post_type ); add_action( "manage_{$post_type}_posts_custom_column", "bw_custom_column_admin", 10, 2 ); add_filter( "oik_table_titles_{$post_type}", "oik_presentation_columns", 10, 3 ); }
Invoked by
Calls
Call hooks
API Letters:
