Skip to:
Content

Changeset 4771


Ignore:
Timestamp:
02/19/13 01:15:17 (14 months ago)
Author:
johnjamesjacoby
Message:

Preliminary support for WordPress 3.6 slash approach. (For easier on-going development.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core/filters.php

    r4762 r4771  
    9494add_filter( 'bbp_edit_reply_pre_title',   'wp_filter_kses'  ); 
    9595add_filter( 'bbp_edit_topic_pre_title',   'wp_filter_kses'  ); 
     96 
     97// Strip slashes for WordPress 3.6 and higher 
     98if ( function_exists( 'wp_slash' ) ) { 
     99    add_filter( 'bbp_new_reply_pre_title',  'stripslashes', 2 ); 
     100    add_filter( 'bbp_new_topic_pre_title',  'stripslashes', 2 ); 
     101    add_filter( 'bbp_edit_reply_pre_title', 'stripslashes', 2 ); 
     102    add_filter( 'bbp_edit_topic_pre_title', 'stripslashes', 2 ); 
     103} 
    96104 
    97105// Code filters on output (hooked in early for plugin compatibility) 
     
    119127add_filter( 'bbp_edit_topic_pre_content', 'balanceTags',    50 ); 
    120128 
     129// Strip slashes for WordPress 3.6 and higher 
     130if ( function_exists( 'wp_slash' ) ) { 
     131    add_filter( 'bbp_new_reply_pre_content',  'stripslashes', 2 ); 
     132    add_filter( 'bbp_new_topic_pre_content',  'stripslashes', 2 ); 
     133    add_filter( 'bbp_edit_reply_pre_content', 'stripslashes', 2 ); 
     134    add_filter( 'bbp_edit_topic_pre_content', 'stripslashes', 2 ); 
     135} 
     136 
    121137// No follow and stripslashes on user profile links 
    122138add_filter( 'bbp_get_reply_author_link',      'wp_rel_nofollow' ); 
Note: See TracChangeset for help on using the changeset viewer.