web_dor_update_page_layout_meta_settings

The Business Responsive web dor update page layout meta settings function.

Description

web_dor_update_page_layout_meta_settings(); 

Usage

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

Defined (1)

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

/functions.php  
  1. function web_dor_update_page_layout_meta_settings() 
  2. /**update page layout*/ 
  3. global $post; 
  4.  
  5. if(isset($post)) 
  6. $web_business_meta = get_post_meta($post->ID, '_web_business_meta', TRUE); 
  7.  
  8. global $dor_layout_page; 
  9.  
  10. if(!isset($web_business_meta['content_width'])) 
  11. $web_business_meta['content_width'] = $dor_layout_page->options_themeoptions[2]['std']; 
  12. if(!isset($web_business_meta['main_col_width'])) 
  13. $web_business_meta['main_col_width'] = $dor_layout_page->options_themeoptions[3]['std']; 
  14. if(!isset($web_business_meta['layout'])) 
  15. $web_business_meta['layout'] = $dor_layout_page->options_themeoptions[0]['std']; 
  16. if(!isset($web_business_meta['pr_widget_area_width'])) 
  17. $web_business_meta['pr_widget_area_width'] = $dor_layout_page->options_themeoptions[4]['std']; 
  18.  
  19.  
  20. if ($web_business_meta['fullwidthpage']) { 
  21.  
  22. $them_content_are_width='100%'; 
  23. ?><script>var full_width_web_buisnes=1</script><?php 
  24.  
  25. else { 
  26.  
  27. if(isset($web_business_meta['content_width'])) 
  28. $them_content_are_width=$web_business_meta['content_width'] . "px;"; 
  29. else 
  30. $them_content_are_width=$dor_layout_page->options_themeoptions[2]['std']; 
  31. ?><script> var full_width_web_buisnes=0</script><?php 
  32.  
  33. switch ($web_business_meta['layout']) { 
  34. //set styles leauts 
  35. case 1: 
  36. ?> 
  37. <style type="text/css"> 
  38. #sidebar1,  
  39. #sidebar2 { 
  40. display:none; 
  41. #blog { 
  42. display:block;  
  43. float:left; 
  44. }; 
  45.  
  46. .container{ 
  47. width:<?php echo $them_content_are_width; ?> 
  48. }  
  49. #blog{ 
  50. width:<?php echo $them_content_are_width; ?> 
  51. }  
  52. </style> 
  53. <?php 
  54. break; 
  55. case 2: 
  56. ?> 
  57. <style type="text/css"> 
  58. #sidebar2{ 
  59. display:none; 
  60. }  
  61. #sidebar1 { 
  62. display:block; 
  63. float:right; 
  64. #blog{ 
  65. display:block; 
  66. float:left; 
  67. }  
  68. .container{ 
  69. width:<?php echo $them_content_are_width; ?> 
  70. #blog{ 
  71. width:<?php echo $web_business_meta['main_col_width']-1; ?>%; 
  72. #sidebar1{ 
  73. width:<?php echo (100 - $web_business_meta['main_col_width']-1); ?>%; 
  74. </style> 
  75. <?php 
  76. break; 
  77. case 3: 
  78. ?> 
  79. <style type="text/css"> 
  80. #sidebar2{ 
  81. display:none; 
  82. }  
  83. #sidebar1 { 
  84. display:block; 
  85. float:left; 
  86. }  
  87. #blog{ 
  88. display:block; 
  89. float:left; 
  90. .container{ 
  91. width:<?php echo $them_content_are_width; ?> 
  92. #blog{ 
  93. width:<?php echo $web_business_meta['main_col_width']; ?>%; 
  94. #sidebar1{ 
  95. width:<?php echo (100 - $web_business_meta['main_col_width']-1); ?>%; 
  96. margin-right: 1%; 
  97. </style> 
  98. <?php 
  99. break; 
  100. case 4: 
  101. ?> 
  102. <style type="text/css"> 
  103. #sidebar2{ 
  104. display:block; 
  105. float:right; 
  106. }  
  107. #sidebar1 { 
  108. display:block; float:right; 
  109. }  
  110. #blog{ 
  111. display:block; 
  112. float:left; 
  113. .container{ 
  114. width:<?php echo $them_content_are_width; ?> 
  115. #blog{ 
  116. width:<?php echo ($web_business_meta['main_col_width']-2) ; ?>%; 
  117. #sidebar1{ 
  118. width:<?php echo $web_business_meta['pr_widget_area_width'] ; ?>%; 
  119. #sidebar2{ 
  120. width:<?php echo (100 - $web_business_meta['pr_widget_area_width'] - $web_business_meta['main_col_width']); ?>%; 
  121. margin-right: 1%; 
  122. </style> 
  123. <?php 
  124. break; 
  125. case 5: 
  126. ?> 
  127. <style type="text/css"> 
  128. #sidebar2{ 
  129. display:block; 
  130. float:left; 
  131. }  
  132. #sidebar1 { 
  133. display:block; 
  134. float:left; 
  135. }  
  136. #blog{ 
  137. display:block; 
  138. float:right; 
  139. .container{ 
  140. width:<?php echo $them_content_are_width; ?> 
  141. #blog{ 
  142. width:<?php echo ($web_business_meta['main_col_width']-2); ?>%; 
  143. #sidebar1{ 
  144. width:<?php echo $web_business_meta['pr_widget_area_width']; ?>%; 
  145. margin-right: 1%; 
  146. #sidebar2{ 
  147. width:<?php echo (100 - $web_business_meta['pr_widget_area_width'] - $web_business_meta['main_col_width']); ?>%; 
  148. margin-right: 1%; 
  149. </style> 
  150. <?php 
  151. break; 
  152. case 6: 
  153. ?> 
  154. <style type="text/css"> 
  155. #sidebar2{ 
  156. display:block; 
  157. float:right; 
  158. }  
  159. #sidebar1 { 
  160. display:block; 
  161. float:left;  
  162. }  
  163. #blog{ 
  164. display:block; 
  165. float:left; 
  166. }  
  167. .container{ 
  168. width:<?php echo $them_content_are_width; ?> 
  169. #blog{ 
  170. width:<?php echo ($web_business_meta['main_col_width']-2); ?>%; 
  171. #sidebar1{ 
  172. width:<?php echo $web_business_meta['pr_widget_area_width']; ?>%; 
  173. margin-right: 1%; 
  174. #sidebar2{ 
  175. width:<?php echo (100 - $web_business_meta['pr_widget_area_width'] - $web_business_meta['main_col_width']); ?>%; 
  176. }  
  177. </style><?php 
  178. break; 
  179. /**update page layout end*/