Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $builder = new WPO\Builder();
- $page_1 = $builder->container( 'page_1', 'Page 1' );
- $page_2 = $builder->container( 'page_2', 'Page 2' );
- $page_1_section_1 = WPO\Container::create( 'section_1', 'Section 1' );
- $page_1->container( $page_1_section_1 );
- $page_1_section_1->text( 'text', 'Text Field' );
- $page_1_section_1->textarea( 'textarea', 'Textarea' )
- ->set_desc( 'textarea description' );
- $text2 = WPO\Field::create( 'text', 'textfield_1', 'Text Field 2' )
- ->set_after( 'This is after Content' );
- $page_2->field( $text2 );
- $instance = wponion_settings( array(
- 'framework_title' => __( 'Your-Plugin Settings' ),
- 'framework_desc' => __( 'This is a demo of WPOnion Settings module with all field types & it stores values in DB as <code>_wponion_settings</code>' ),
- 'option_name' => '_wponion_settings',
- 'plugin_id' => 'wponion_demo_plugin',
- 'theme' => 'fresh',
- 'is_single_page' => false,
- 'menu' => array(
- 'menu_title' => __( 'WPOnion' ),
- 'menu_slug' => 'wponion-fresh-theme',
- 'page_title' => __( 'Fresh Theme Demo' ),
- 'submenu' => false,
- ),
- 'extra_css' => array(), // An Array of CSS To be loaded in settings page.
- 'extra_js' => array(), // An Array of JS To be loaded in settings page.
- ), $builder );
Add Comment
Please, Sign In to add comment