XPressME Integration Kit

Trac


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

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

File:
1 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(); 
Note: See TracChangeset for help on using the changeset viewer.