XPressME Integration Kit

Trac

Changeset 655


Ignore:
Timestamp:
Sep 10, 2010, 9:44:39 PM (14 years ago)
Author:
toemon
Message:

comment_quicktags_plusプラグイン対応 #Fixes367
ネストレベルをみてバッファをフラッシュするように変更

Location:
trunk/xpressme_integration_kit/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/include/add_xpress_process.php

    r652 r655  
    77} 
    88 
    9 function comment_quicktags_plus_patch(){ 
    10         $active_plugins = get_option('active_plugins'); 
    11         foreach($active_plugins as $active_plugin){ 
    12                 if(preg_match('/comment_quicktags_plus\.php/',$active_plugin)) ob_end_flush(); 
    13         } 
     9function ob_end_flush_child($now_ob_level){ 
     10        // The flash does the output buffer of WP before doing rendering.  
     11        // Example: comment_quicktags plugin does not flash buffer specifically. 
     12        while(ob_get_level() > $now_ob_level) ob_end_flush(); 
     13        $ob_level = ob_get_level(); 
    1414} 
    1515function safe_site_url(){ 
     
    158158         
    159159        Notification_reserve_send(); 
    160         ob_start();      
     160        ob_start(); 
     161                $now_ob_level = ob_get_level(); 
    161162                if (version_compare($xoops_config->wp_version,'2.2', '<')) 
    162163                        require_once dirname( __FILE__ ).'/old_template-loader.php' ; 
    163164                else 
    164165                        require_once( ABSPATH . WPINC . '/template-loader.php' ); 
    165                 comment_quicktags_plus_patch(); 
     166                ob_end_flush_child($now_ob_level); 
    166167                $wp_output = ob_get_contents(); 
    167168        ob_end_clean(); 
  • trunk/xpressme_integration_kit/include/xpress_block_header.php

    r650 r655  
    6464 
    6565                ob_start();      
     66                        $now_ob_level = ob_get_level();          
    6667                        wp_head(); 
    67                         comment_quicktags_plus_patch(); 
     68                        ob_end_flush_child($now_ob_level); 
    6869                        $header_str = ob_get_contents(); 
    6970                ob_end_clean(); 
Note: See TracChangeset for help on using the changeset viewer.