Skip to:
Content

BuddyPress.org

Changeset 5826


Ignore:
Timestamp:
02/23/2012 03:09:09 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Add 'bp_core_render_message_content' filter to bp_core_render_message() to more automate output formatting.

Location:
trunk/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-filters.php

    r5758 r5826  
    33// Exit if accessed directly
    44if ( !defined( 'ABSPATH' ) ) exit;
     5
     6// Add some filters to feedback messages
     7add_filter( 'bp_core_render_message_content', 'wptexturize'       );
     8add_filter( 'bp_core_render_message_content', 'convert_smilies'   );
     9add_filter( 'bp_core_render_message_content', 'convert_chars'     );
     10add_filter( 'bp_core_render_message_content', 'wpautop'           );
     11add_filter( 'bp_core_render_message_content', 'shortcode_unautop' );
    512
    613/**
  • trunk/bp-core/bp-core-functions.php

    r5768 r5826  
    329329
    330330    if ( isset( $bp->template_message ) && $bp->template_message ) :
    331         $type = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error'; ?>
     331        $type    = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error';
     332        $content = apply_filters( 'bp_core_render_message_content', $bp->template_message, $type ); ?>
    332333
    333334        <div id="message" class="<?php echo $type; ?>">
    334             <p><?php echo stripslashes( esc_attr( $bp->template_message ) ); ?></p>
     335
     336            <?php echo $content; ?>
     337
    335338        </div>
    336339
Note: See TracChangeset for help on using the changeset viewer.