Guest User

Untitled

a guest
Jan 21st, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. <?php
  2. $builder = new WPO\Builder();
  3.  
  4. $page_1 = $builder->container( 'page_1', 'Page 1' );
  5. $page_2 = $builder->container( 'page_2', 'Page 2' );
  6. $page_1_section_1 = WPO\Container::create( 'section_1', 'Section 1' );
  7. $page_1->container( $page_1_section_1 );
  8.  
  9. $page_1_section_1->text( 'text', 'Text Field' );
  10. $page_1_section_1->textarea( 'textarea', 'Textarea' )
  11. ->set_desc( 'textarea description' );
  12.  
  13. $text2 = WPO\Field::create( 'text', 'textfield_1', 'Text Field 2' )
  14. ->set_after( 'This is after Content' );
  15.  
  16. $page_2->field( $text2 );
  17.  
  18. $instance = wponion_settings( array(
  19. 'framework_title' => __( 'Your-Plugin Settings' ),
  20. 'framework_desc' => __( 'This is a demo of WPOnion Settings module with all field types & it stores values in DB as <code>_wponion_settings</code>' ),
  21. 'option_name' => '_wponion_settings',
  22. 'plugin_id' => 'wponion_demo_plugin',
  23. 'theme' => 'fresh',
  24. 'is_single_page' => false,
  25. 'menu' => array(
  26. 'menu_title' => __( 'WPOnion' ),
  27. 'menu_slug' => 'wponion-fresh-theme',
  28. 'page_title' => __( 'Fresh Theme Demo' ),
  29. 'submenu' => false,
  30. ),
  31. 'extra_css' => array(), // An Array of CSS To be loaded in settings page.
  32. 'extra_js' => array(), // An Array of JS To be loaded in settings page.
  33. ), $builder );
Add Comment
Please, Sign In to add comment