function xpress_is_theme_sidebar_disp() { global $xpress_config; if (is_wordpress_style()) { return true; } return $xpress_config->is_theme_sidebar_disp; }
Description: Plugin for XPressME (custom function,filter,action) Author: toemon Version: 1.0 Author URI: http://ja.xpressme.info */ require_once 'xpressme_class.php'; require_once dirname(__FILE__) . '/include/custom_functions.php'; // XPressME functions for themes require_once dirname(__FILE__) . '/include/xpress_common_functions.php'; $xoops_db = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); $xoops_db->prefix = get_xoops_prefix(); $xoops_db->tables = array('modules', 'newblocks', 'users'); $xpress_config = new XPressME_Class(); require_once dirname(__FILE__) . '/include/pluggable-override.php'; require_once dirname(__FILE__) . '/include/functions_for_wp_old.php'; if (!is_wordpress_style() && (!empty($xpress_config->theme_select) || $xpress_config->theme_select != 'use_wordpress_select')) { add_filter('stylesheet', 'xpress_Stylesheet'); add_filter('template', 'xpress_ThemeTemplate'); } function xpress_Stylesheet($stylesheet) { global $xpress_config; $theme = $xpress_config->theme_select; $theme = get_theme($theme); if (empty($theme)) { return $stylesheet; } return $theme['Stylesheet']; } function xpress_ThemeTemplate($template) {
if (version_compare($xoops_config->wp_version,'2.2', '<')) require_once dirname( __FILE__ ).'/old_template-loader.php' ; else require_once( ABSPATH . WPINC . '/template-loader.php' ); ob_end_flush_child($now_ob_level); $wp_output = ob_get_contents(); ob_end_clean(); // insert credit $pattern = '<body'; $replace = "\n<!-- credit " . xpress_credit('echo=0&no_link=1') . " -->\n<body"; $wp_output = preg_replace("/" . $pattern . "/s", $replace, $wp_output); //Rendering Select if( is_wordpress_style() // When the display mode is WordPress style || is_feed() // It judges it here because it does in is_index_page() through feed to which the permalink is set. || is_iphone_with_wptouch() // When iPhone access & used wptouch plugin (thx uemu) ){ echo $wp_output; } else { require_once( dirname( __FILE__ ).'/xpress_render.php' ); xpress_render($wp_output); } //When there is no block cache, and an optional block is different, cache is refreshed. //When adding, and changing and deleting Post & Comment, block cache is refreshed by add_action at any time. // This Function in xpressme plugin require_once( dirname( __FILE__ ).'/xpress_block_render.php' ); xpress_unnecessary_block_cache_delete($xoops_config->module_name);
ob_start(); $now_ob_level = ob_get_level(); if (version_compare($xoops_config->wp_version, '2.2', '<')) { require_once dirname(__FILE__) . '/old_template-loader.php'; } else { require_once ABSPATH . WPINC . '/template-loader.php'; } ob_end_flush_child($now_ob_level); $wp_output = ob_get_contents(); ob_end_clean(); // insert credit $pattern = '<body'; $replace = "\n<!-- credit " . xpress_credit('echo=0&no_link=1') . " -->\n<body"; $wp_output = preg_replace("/" . $pattern . "/s", $replace, $wp_output); //Rendering Select if (is_wordpress_style() || is_feed() || is_iphone_with_wptouch()) { echo $wp_output; } else { require_once dirname(__FILE__) . '/xpress_render.php'; xpress_render($wp_output); } //When there is no block cache, and an optional block is different, cache is refreshed. //When adding, and changing and deleting Post & Comment, block cache is refreshed by add_action at any time. // This Function in xpressme plugin require_once dirname(__FILE__) . '/xpress_block_render.php'; xpress_unnecessary_block_cache_delete($xoops_config->module_name); if (is_home()) { xpress_block_cache_refresh($xoops_config->module_name); require_once dirname(__FILE__) . '/xpress_block_header.php'; set_xpress_block_header($xoops_config->module_name); }