Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
- // framework options filter example
- function factorian_metabox_options( $options ) {
- $options = array(); // remove old options
- // Page Meta Options
- $options[] = array(
- 'id' => 'page_meta_options',
- 'title' => 'Page Setiings',
- 'post_type' => 'page',
- 'context' => 'normal',
- 'priority' => 'high',
- 'sections' => array(
- // begin: a section
- array(
- 'name' => 'factorian_page_option_meta',
- 'icon' => 'fa fa-cog',
- // begin: fields
- 'fields' => array(
- // begin: a field
- array(
- 'id' => 'enable_title',
- 'type' => 'switcher',
- 'title' => esc_html__('Enable Title?', 'factorian-webrur'),
- 'default' => true,
- 'desc' => esc_html__('Do you want to show the title?', 'factorian-webrur'),
- ),
- // end: a field
- ), // end: fields
- ), // end: a section
- ),
- ); // end a option
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement