web_dor_update_layout_editor

The Business Responsive web dor update layout editor function.

Description

web_dor_update_layout_editor(); 

Usage

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

Defined (1)

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

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