web_dor_meta_setup

The Business Responsive web dor meta setup function.

Description

web_dor_meta_setup(); 

Usage

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

Defined (1)

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

/functions.php  
  1. function web_dor_meta_setup() 
  2. global $post; 
  3. global $dor_layout_page, $dor_general_settings_page; 
  4. // using an underscore, prevents the meta variable 
  5. // from showing up in the custom fields section 
  6. $meta = get_post_meta($post->ID, '_web_business_meta', TRUE); 
  7. global $post; 
  8. if( gettype ($post->ID) == 'integer' ) { 
  9. $meta=array( 
  10. 'layout' => $dor_layout_page->options_themeoptions[0]['std'] ,  
  11. 'content_width' => '' ,  
  12. 'main_col_width' => '',  
  13. 'pr_widget_area_width' => '',  
  14. 'fullwidthpage' => '',  
  15. 'show_comments' => $dor_general_settings_page->options_generalsettings[4]['std'],  
  16. 'blogstyle' => '',  
  17. 'showthumb' => '',  
  18. 'blog_perpage' => get_theme_mod("_n_of_home_post", 3),  
  19. 'showtitle' => '',  
  20. 'showdesc' => '',  
  21. 'detect_portrait' => '',  
  22. 'thumbsize' => '2',  
  23. 'static_pages_on' => '',  
  24. 'all_categories_on' => '',  
  25. 'tags_on' => '',  
  26. 'archives_on' => '',  
  27. 'authors_on' => '',  
  28. ); 
  29.  
  30. else 
  31. $meta_if_par_not_initilas=array( 
  32. 'layout' => $dor_layout_page->options_themeoptions[0]['std'] ,  
  33. 'content_width' => '' ,  
  34. 'main_col_width' => '' ,  
  35. 'pr_widget_area_width' => '',  
  36. 'fullwidthpage' =>NULL,  
  37. 'show_comments' =>NULL,  
  38. 'blogstyle' => '',  
  39. 'showthumb' => '',  
  40. 'blog_perpage' => get_theme_mod("_n_of_home_post", 3),  
  41. 'showtitle' => '',  
  42. 'showdesc' => '',  
  43. 'detect_portrait' => '',  
  44. 'thumbsize' => '2',  
  45. 'static_pages_on' => '',  
  46. 'all_categories_on' => '',  
  47. 'tags_on' => '',  
  48. 'archives_on' => '',  
  49. 'authors_on' => '',  
  50. 'blog_posts_on' => '',  
  51. ); 
  52. foreach($meta_if_par_not_initilas as $key=>$meta_if_par_not_initila) { 
  53.  
  54. if(!isset($meta[$key])) { 
  55. $meta[$key]=$meta_if_par_not_initila; 
  56.  
  57.  
  58.  
  59. // instead of writing HTML here, lets do an include 
  60. include(MY_THEME_FOLDER . '/custom/meta.php'); 
  61.  
  62. // create a custom nonce for submit verification later 
  63. echo '<input type="hidden" name="web_business_meta_noncename" value="' . wp_create_nonce(__FILE__) . '" />';