Changeset 488 for branches/XPressMU/xpressme_integration_kit/wp-content
- Timestamp:
- Dec 15, 2009, 4:52:57 PM (15 years ago)
- Location:
- branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r451 r488 95 95 96 96 $output = ''; 97 $author_cookie = get_xpress_dir_name() . "_select_author" ;97 $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 98 98 if (!empty($_COOKIE[$author_cookie])){ 99 99 $uid = intval($_COOKIE[$author_cookie]); … … 115 115 extract( $r ); 116 116 $output = ''; 117 $author_cookie = get_xpress_dir_name() . "_select_author" ;117 $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 118 118 if (!empty($_COOKIE[$author_cookie])){ 119 119 $output = intval($_COOKIE[$author_cookie]); … … 161 161 $xpress_codename = $xoops_config->module_codename; 162 162 if ($no_link){ 163 $output = 'XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename);164 163 if ($xoops_config->is_wpmu) { 164 $output = 'XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename); 165 165 $output .= '(included WordPress MU ' . $wpmu_version. ')'; 166 166 } else { 167 $output = 'XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename); 167 168 if (strstr($wp_version,'ME')){ 168 169 $output .= '(included WordPress ' . $wp_version . ')'; … … 172 173 } 173 174 } else { 174 $output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>';175 175 if ($xoops_config->is_wpmu) { 176 $output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>'; 176 177 $output .= '(included <a href="http://mu.wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress MU ' . $wpmu_version . '</a>)'; 177 178 } else { 179 $output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>'; 178 180 if (strstr($wp_version,'ME')){ 179 181 $output .= '(included <a href="http://wpme.sourceforge.jp/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)'; … … 467 469 } 468 470 469 function set_post_views_count( &$content) {471 function set_post_views_count($content) { 470 472 if ( empty($_GET["feed"]) && empty($GLOBALS["feed"]) && empty($GLOBALS["doing_trackback"]) && empty($GLOBALS["doing_rss"]) && empty($_POST) && is_single() ){ 471 473 post_views_counting(); -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp_old.php
r378 r488 190 190 191 191 endif; // Under WP2.5 192 193 // Under WP2.7 194 if (version_compare($xoops_config->wp_version,'2.6', '<')) : 195 /** 196 * Guess the URL for the site. 197 * 198 * Will remove wp-admin links to retrieve only return URLs not in the wp-admin 199 * directory. 200 * 201 * @since 2.6.0 202 * 203 * @return string 204 */ 205 function wp_guess_url() { 206 if ( defined('WP_SITEURL') && '' != WP_SITEURL ) { 207 $url = WP_SITEURL; 208 } else { 209 $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 210 $url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 211 } 212 return $url; 213 } 214 endif; // Under WP2.6 192 215 193 216 // Under WP2.7 -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
r452 r488 242 242 if (is_admin()) return $query_vars; 243 243 244 $author_cookie = get_xpress_dir_name() . "_select_author" ;244 $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 245 245 if(xpress_is_multi_user()){ 246 246 if (!empty($_GET)){ … … 290 290 } 291 291 292 function xpress_query_filter( &$query)292 function xpress_query_filter($query) 293 293 { 294 294 if (is_admin()) return $query; 295 295 296 $author_cookie = get_xpress_dir_name() . "_select_author" ;296 $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 297 297 298 298 if (strpos($query,'SELECT') === false) return $query; … … 357 357 } 358 358 359 function safe_site_url_filter($site_url){360 global $xoops_config;361 if (!$xoops_config->is_wpmu){362 if ($site_url != get_xpress_url()) $site_url = get_xpress_url();363 }364 return $site_url;365 }366 367 359 function get_block_file_path($mydirname,$file_name) 368 360 { -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
r451 r488 71 71 } 72 72 add_action("wp_meta" , "wp_meta_add_xpress_menu"); // add xpress menu in wp_meta 73 74 //Site URL check75 add_filter('option_home', "safe_site_url_filter");76 add_filter('option_siteurl', "safe_site_url_filter");77 78 73 79 74 //XOOPS Bloack Cache Refresh … … 301 296 302 297 include_once dirname( __FILE__ ).'/include/dashboard_feed.php' ; 303 304 include_once dirname( __FILE__ ).'/xpressme_widget_class.php' ;305 298 if(xpress_is_wp_version('>=','2.8')){ 299 include_once dirname( __FILE__ ).'/xpressme_widget_class.php' ; 300 } 306 301 ?>
Note: See TracChangeset
for help on using the changeset viewer.