You appear to be a bot. Output may be restricted
Description
Register custom post type "oik_sc_param"A shortcode parameter consists of:
- Title=shortcode param parameter
- content=An overview of the different values for the parameter and how this might affect the output of the shortcode
- a noderef to the specific shortcode (Note: shortcodes which are duplicated are identified in their titles by "code (plugin)"
- the parameter name e.g. class
- the bw_skv() values: default, values, notes
- the expected type of the shortcode – future use
Usage
oik_register_oik_sc_param();
Parameters
Returns
voidSource
File name: oik-shortcodes/oik-shortcodes.phpLines:
1 to 27 of 27
function oik_register_oik_sc_param() { $post_type = 'oik_sc_param'; $post_type_args = array(); $post_type_args['label'] = 'Shortcode parameters'; //$post_type_args['singular_label'] = "Shortcode parameter"; $post_type_args['description'] = 'Parameter definitions for shortcodes'; $post_type_args['supports'] = array( 'title', 'editor', 'revisions', 'author' ); // This might reduce the amount of gumpf we see when searching. Herb 2014/01/10 // $post_type_args['searchable'] = false; $post_type_args['show_in_rest'] = true; bw_register_post_type( $post_type, $post_type_args ); bw_register_field( "_sc_param_code", "noderef", "Shortcode", array( '#type' => 'oik_shortcodes') ); bw_register_field( "_sc_param_name", "text", "Parameter name" ); bw_register_field( "_sc_param_type", "select", "Parameter type", array( '#options' => oiksc_param_types() ) ); bw_register_field( "_sc_param_default", "text", "Default" ); bw_register_field( "_sc_param_values", "text", "Other values" ); bw_register_field( "_sc_param_notes", "text", "Notes" ); bw_register_field_for_object_type( "_sc_param_code", $post_type ); bw_register_field_for_object_type( "_sc_param_name", $post_type ); bw_register_field_for_object_type( "_sc_param_type", $post_type ); bw_register_field_for_object_type( "_sc_param_default", $post_type ); bw_register_field_for_object_type( "_sc_param_values", $post_type ); bw_register_field_for_object_type( "_sc_param_notes", $post_type ); }View on GitHub