WordPress.org

Plugin Directory

Changeset 704151


Ignore:
Timestamp:
04/26/13 11:48:52 (12 months ago)
Author:
donncha
Message:

No need for this function that removes mfunc from comments when mfunc isn't used any more

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-super-cache/trunk/wp-cache.php

    r703021 r704151  
    31463146add_action( 'wp_before_admin_bar_render', 'supercache_admin_bar_render' ); 
    31473147 
    3148 add_filter( 'preprocess_comment','no_mfunc_in_comments' ); 
    3149 add_filter( 'comment_text','no_mfunc_in_comments' ); 
    3150 add_filter( 'comment_excerpt','no_mfunc_in_comments' ); 
    3151 add_filter( 'comment_text_rss','no_mfunc_in_comments' ); 
    3152  
    3153 function no_mfunc_in_comments( $comment_data ) { 
    3154     if ( is_array( $comment_data ) ) 
    3155         $text = $comment_data[ 'comment_content' ]; 
    3156     else 
    3157         $text = $comment_data; 
    3158  
    3159     if ( preg_match( '/<!--\s*mclude|<!--\s*mfunc|<!--\s*dynamic-cached-content/i', $text )) {  
    3160         $text = preg_replace( '#(<!--\s*(mclude|mfunc|dynamic-cached-content))#ism','<!-- unsafe comment zapped -->', $text ); 
    3161         if ( is_array( $comment_data ) ) 
    3162             $comment_data[ 'comment_content' ] = $text; 
    3163         else 
    3164             $comment_data = $text; 
    3165     } 
    3166     return $comment_data; 
    3167 } 
    31683148?> 
Note: See TracChangeset for help on using the changeset viewer.