XPressME Integration Kit

Trac

Changeset 540


Ignore:
Timestamp:
Mar 14, 2010, 12:54:49 AM (15 years ago)
Author:
toemon
Message:

投稿後のブロックのキャッシュリフレッシュでエラーが発生するバグ修正 Fixes #304

Location:
trunk/xpressme_integration_kit/wp-content
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php

    r477 r540  
    137137        require_once get_xpress_dir_path() . '/include/xpress_block_render.php';  
    138138 
    139  
    140139        foreach($blocks as $block){  
    141140                $func_file = $block->func_file;  
     141                 
     142                // Avoid the failure of the operation when switch_to_blog() and other plugin code is called on the admin page. 
     143                $excludes = '|global_recent_posts_list_block.php|my_.*_block.php|'; 
     144                if (preg_match('/' . $excludes . '/' , $func_file)) continue; 
     145                 
    142146                $call_theme_function_name = str_replace(".php", "", $func_file);  
    143147                $inc_theme_file_name = str_replace(".php", "", $func_file) . '_theme.php';  
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/blog_list_block_theme.php

    r536 r540  
    33function blog_list_block($options) 
    44{ 
    5         if(is_admin()) return; // wp-admin page is not exists 
    65        $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    76        $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_category.html' : trim( $options[1] ); 
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/global_recent_posts_list_block_theme.php

    r537 r540  
    33function global_recent_posts_list_block($options) 
    44{ 
    5         if (is_admin()) return; 
    65        $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    76        $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_list_block.html' : trim( $options[1] ); 
Note: See TracChangeset for help on using the changeset viewer.