Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

Actions and Filters

mboynes edited this page Feb 11, 2013 · 4 revisions

Super_Custom_Post_Meta

Filters

scpt_plugin_meta_field_addt_html_attributes
Passes additional HTML attributes for `$field`
scpt_plugin_meta_field_callback
Define the callback function you want used for generating the HTML for this field. Passes `array( &$this, "add_{$field['type']}_field" )`, $field. Allows you to add more field types, etc.
scpt_plugin_custom_meta_wysiwyg_settings
Passes `array(), $field`
scpt_plugin_meta_data_connect_{$post_type}
Args to run through `get_posts` when getting external data. Passes `array( 'numberposts' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_type' => $post_type )`
scpt_plugin_meta_data_loop
Passes `array(), $posts_array` (results from get_posts()). If you populate `array()`, the default loop will not be run. array should be key => val pairs of what you want in your checkboxes, radio buttons, or select elements
scpt_plugin_custom_meta_{$meta_key}_options
For checkboxes, radios, and select options, this filters the resulting HTML of the different options
scpt_plugin_{$this->type}_meta_save_{$field}
Filters POST data before writing to DB

Super_Custom_Post_Type

Filters

scpt_plugin_default_cpt_options
Filters the default custom post type arguments

Super_Custom_Taxonomy

Filters

scpt_plugin_default_tax_options
Filters the default custom taxonomy arguments

Other

scpt_show_admin_menu
To hide the admin menu, which might confuse your users, add this to your code:
add_filter( 'scpt_show_admin_menu', '__return_false' );