HoogleyBoogley

Untitled

Aug 2nd, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. ===========
  5. ADMIN PANEL
  6. ===========
  7. */
  8.  
  9. function animated_add_admin_page(){
  10.  
  11. //Generate Admin Page
  12. add_menu_page( 'Animated Theme Options', 'Animated', 'manage_options', 'animated_theme', 'animated_theme_create_page', get_template_directory_uri().'/img/hb-icon.png', 110 );
  13.  
  14. //Generate Admin Sub-Page
  15. add_submenu_page( 'animated_theme_options', 'Animated Theme Options', 'General', 'manage_options', 'animated_theme', 'animated_theme_create_page' );
  16.  
  17. //Custom Settings
  18. add_action( 'admin_init', 'animated_custom_settings' );
  19.  
  20. }
  21. add_action( 'admin_menu', 'animated_add_admin_page' );
  22.  
  23. function animated_custom_settings() {
  24. register_setting( 'animated-setting-group', 'first_name' );
  25. add_settings_section( 'animated-sidebar-options', 'Sidebar Options', 'animated_sidebar_options', 'animated_theme_options' );
  26. }
  27.  
  28. function animated_theme_options() {
  29. echo 'Customize your sidebar.';
  30. }
  31.  
  32. function animated_theme_create_page() {
  33.  
  34. require_once( get_template_directory().'/inc/templates/animated-admin.php');
  35.  
  36. }
  37.  
  38. function animated_theme_settings_page() {
  39. //Genoration of Admin Panel
  40. }
Advertisement
Add Comment
Please, Sign In to add comment