themeshock_admin

The Responsive Minimal themeshock admin function.

Description

themeshock_admin(); 

Usage

  1. if ( !function_exists( 'themeshock_admin' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = themeshock_admin(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function themeshock_admin() { 
  2. global $themename, $shortname, $wpdb, $screen_layout_columns; 
  3.  
  4. if ( isset($_POST['saved'] )) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>'; 
  5. if ( isset($_POST['reset'] )) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings reset.</strong></p></div>'; 
  6.  
  7. add_meta_box('wptg-font-style', 'Font Style', 'get_wptg_font_style', 'toplevel_page_functions', 'wptg_font_style', 'core'); 
  8. add_meta_box('wptg-logo', 'Logo', 'get_wptg_logo', 'toplevel_page_functions', 'wptg_logo', 'core'); 
  9. add_meta_box('wptg-header_elements', 'Menu and Search', 'getThemeGenHeaderElements', 'toplevel_page_functions', 'wptg_header_elements', 'core'); 
  10. add_meta_box('wptg-shortcodes', 'Custom Post Type Shortcodes', 'getThemeGenShortcodes', 'toplevel_page_functions', 'wptg_shortcodes', 'core'); 
  11. add_meta_box('wptg-metatags-favicon', 'Meta Tags and Favicon', 'getThemeGenMetaTagsFavicon', 'toplevel_page_functions', 'wptg_metatags_favicon', 'core'); 
  12. add_meta_box('wptg-posts', 'Posts Display Options', 'getThemeGenPosts', 'toplevel_page_functions', 'wptg_posts', 'core'); 
  13. add_meta_box('wptg-icon-posts', 'Icon Post', 'getThemeGenIconPost', 'toplevel_page_functions', 'wptg_icon_posts', 'core'); 
  14. add_meta_box('wptg-socials-networks', 'Social Networks', 'getThemeGenSocialNetworks', 'toplevel_page_functions', 'wptg_social_networks', 'core'); 
  15. add_meta_box('wptg-contact-form', 'Contact Form', 'getThemeGenContactForm', 'toplevel_page_functions', 'wptg_contact_form', 'core'); 
  16. add_meta_box('wptg-custom-post-types', 'Options Custom Post Types', 'getThemeGenCustomPostTypes', 'toplevel_page_functions', 'wptg_custom_post_types', 'core'); 
  17. add_meta_box('wptg-responsive', 'Responsive', 'getThemeGenResponsive', 'toplevel_page_functions', 'wptg_responsive', 'core'); 
  18. add_meta_box('wptg-footer-info', 'Footer Info', 'getThemeGenFooterInfo', 'toplevel_page_functions', 'wptg_footer_info', 'core'); 
  19. add_meta_box('wptg-google-analytics', 'Google Analytics', 'getThemeGenGoogleAnalytics', 'toplevel_page_functions', 'wptg_google_analytics', 'core'); 
  20. add_meta_box('wptg-shopping-cart', 'Shopping Cart', 'getThemeGenShoppingCart', 'toplevel_page_functions', 'wptg_shopping_cart', 'core'); 
  21. add_meta_box('wptg-tool-wptg', 'Personalize Menu', 'getThemeGenToolWptg', 'toplevel_page_functions', 'wptg_tool_wptg', 'core'); 
  22. add_meta_box('wptg-testimonial-quotes', 'Testimonial Quotes', 'getThemeGenTestimonialQuotes', 'toplevel_page_functions', 'wptg_testimonial_quotes', 'core'); 
  23. add_meta_box('wptg-slider', 'Slider', 'getThemeGenSlider', 'toplevel_page_functions', 'wptg_slider', 'core'); 
  24. add_meta_box('wptg-page-layout', 'Layout Creator', 'getThemeGenPageLayout', 'toplevel_page_functions', 'wptg_page_layout', 'core'); 
  25. ?> 
  26. <script type="text/javascript"> 
  27. jQuery(document).ready( function($) { 
  28. jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed'); 
  29. postboxes.add_postbox_toggles('toplevel_page_functions'); 
  30. }); 
  31. </script> 
  32.  
  33. <?php if (isset($GLOBALS['error_folder'])) {?> 
  34. <h2 style="color:#FF0000; font-size:20px;"><?php echo $GLOBALS['error_folder'];?></h2> 
  35. <?php }?> 
  36.  
  37. <!-- new layout options wpthemegenerator --> 
  38. <div class="wrap" id="wrapper-options-wpthemegenerator"> 
  39. <form method="post" enctype="multipart/form-data" onsubmit="verify_chk_box();"> 
  40. <?php 
  41. wp_nonce_field('wrapper-options-wpthemegenerator'); 
  42. wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false ); 
  43. wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false ); 
  44.  
  45. $metaBoxCols1 = array('wptg_font_style', 'wptg_logo', 'wptg_header_elements', 'wptg_social_networks', 'wptg_metatags_favicon', 'wptg_slider', 'wptg_posts', 'wptg_icon_posts', 'wptg_contact_form'); 
  46.  
  47. $metaBoxCols2 = array('wptg_shortcodes', 'wptg_custom_post_types', 'wptg_shopping_cart', 'wptg_responsive', 'wptg_footer_info', 'wptg_google_analytics', 'wptg_testimonial_quotes', 'wptg_page_layout'); 
  48.  
  49. ?> 
  50.  
  51. <div class="icon32" id="icon-wpthemegenerator"></div> 
  52. <h2><?php echo __('Options for', 'tstranslate')?> <?php echo $themename; ?></h2> 
  53.  
  54. <div class="wptg-cols wptg-col1"> 
  55. <?php foreach($metaBoxCols1 as $wptgMetabox) { 
  56. do_meta_boxes('toplevel_page_functions', $wptgMetabox, ''); 
  57. }?> 
  58. </div><!-- end wptg-cols --> 
  59.  
  60. <div class="wptg-cols wptg-col2"> 
  61. <?php foreach($metaBoxCols2 as $wptgMetabox) { 
  62. do_meta_boxes('toplevel_page_functions', $wptgMetabox, ''); 
  63. }?> 
  64. </div><!-- end wptg-cols --> 
  65. <input type="hidden" name="action" value="save" /> 
  66. </form> 
  67. </div><!-- end wrap --> 
  68.  
  69. <form method="post" enctype="multipart/form-data"> 
  70. <p class="submit"> 
  71. <input name="reset" type="submit" value="Reset" /> 
  72. <input type="hidden" name="action" value="reset" /> 
  73. </p> 
  74. </form> 
  75. <div style="font-size:9px; margin-bottom:10px;"> 
  76. Icons: <?php $icons = 'http://www.iconshock.com'?> 
  77. <a href="<?php echo $icons;?>">Iconshock</a> 
  78. </div> 
  79.  
  80. <?php