Changeset 560 for trunk/xpressme_integration_kit/include/xpress_render.php
- Timestamp:
- Mar 19, 2010, 3:29:26 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/include/xpress_render.php
r432 r560 92 92 function get_body($contents) 93 93 { 94 $xpess_config = new XPressME_Class(); 94 global $xpess_config; 95 if (!is_object($xpess_config)) $xpess_config = new XPressME_Class(); 95 96 $pattern = "<body[^>]*?>(.*)<\/body>"; 96 97 $body = ''; … … 98 99 $body = $body_matches[1]; 99 100 } 101 102 $pattern = '<body\s*([^>]*)>'; 103 $body_class = 'class="xpress"'; 104 if(preg_match("/".$pattern."/s", $contents, $body_matches)){ 105 $body_tag_option = $body_matches[1]; 106 107 $pattern = 'class\s*=\s*[\'|"]([^\'|^"]*)[\'|"]'; 108 if(preg_match("/".$pattern."/", $body_tag_option, $class_matches)){ 109 $class_value = $class_matches[1]; 110 $reprace = 'xpress '. $class_value; 111 $body_class = preg_replace("/".$class_value."/", $reprace, $body_tag_option); 112 } else { 113 $body_class = 'class="xpress" ' . $body_tag_option; 114 } 115 } 116 100 117 if (!$xpess_config->is_theme_sidebar_disp){ 101 118 $side_panel = get_sidebar_rander(); 102 119 $body = str_replace($side_panel,'',$body); 103 120 } 121 $body = "\n<div " . $body_class . "> <!-- Substitution of wordpress <body > -->\n" . $body . "\n</div> <!-- Substitution of wordpress </body > -->\n"; 104 122 return $body; 105 123 }
Note: See TracChangeset
for help on using the changeset viewer.