Skip to:
Content

BuddyPress.org

Changeset 5833


Ignore:
Timestamp:
02/23/2012 07:29:36 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Backport messages output filters from trunk. See #4010, #4038. (1.5 branch)

Location:
branches/1.5/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-core/bp-core-filters.php

    r5570 r5833  
    22// Exit if accessed directly
    33if ( !defined( 'ABSPATH' ) ) exit;
     4
     5// Add some filters to feedback messages
     6add_filter( 'bp_core_render_message_content', 'wptexturize'       );
     7add_filter( 'bp_core_render_message_content', 'convert_smilies'   );
     8add_filter( 'bp_core_render_message_content', 'convert_chars'     );
     9add_filter( 'bp_core_render_message_content', 'wpautop'           );
     10add_filter( 'bp_core_render_message_content', 'shortcode_unautop' );
    411
    512/**
  • branches/1.5/bp-core/bp-core-functions.php

    r5356 r5833  
    553553    global $bp;
    554554
    555     if ( isset( $bp->template_message ) && $bp->template_message ) :
    556         $type = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error'; ?>
     555    if ( !empty( $bp->template_message ) ) :
     556        $type    = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error';
     557        $content = apply_filters( 'bp_core_render_message_content', $bp->template_message, $type ); ?>
    557558
    558559        <div id="message" class="<?php echo $type; ?>">
    559             <p><?php echo stripslashes( esc_attr( $bp->template_message ) ); ?></p>
     560
     561            <?php echo $content; ?>
     562
    560563        </div>
    561564
Note: See TracChangeset for help on using the changeset viewer.