Skip to:
Content

BuddyPress.org

Changeset 1779


Ignore:
Timestamp:
09/03/2009 06:59:40 PM (16 years ago)
Author:
apeatling
Message:

Updated code with wp_get_referer()

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-classes.php

    r1776 r1779  
    8585        global $wpdb, $bp;
    8686       
     87        /* This doesn't seem to be working correctly at the moment, so it is disabled [TODO] */
     88        return false;
     89       
    8790        /* If we have an item id, try and match on that, if not do a content match */
    8891        if ( $this->item_id ) {
  • trunk/bp-activity/bp-activity-filters.php

    r1691 r1779  
    22
    33/* Apply WordPress defined filters */
    4 add_filter( 'bp_get_activity_content', 'wp_filter_kses', 1 );
     4add_filter( 'bp_get_activity_content', 'wp_filter_kse', 1 );
    55add_filter( 'bp_get_activity_content', 'force_balance_tags' );
    66add_filter( 'bp_get_activity_content', 'wptexturize' );
     
    1616    $allowedtags['a']['class'] = array();
    1717    $allowedtags['img'] = array();
     18    $allowedtags['img']['src'] = array();
     19    $allowedtags['img']['alt'] = array();
     20    $allowedtags['img']['class'] = array();
     21    $allowedtags['img']['id'] = array();
     22   
    1823    return $allowedtags;
    1924}
  • trunk/bp-friends.php

    r1775 r1779  
    219219    }
    220220   
    221     bp_core_redirect( $_SERVER['HTTP_REFERER'] );
     221    bp_core_redirect( wp_get_referer() );
    222222   
    223223    return false;
     
    257257    }
    258258   
    259     bp_core_redirect( $_SERVER['HTTP_REFERER'] );
     259    bp_core_redirect( wp_get_referer() );
    260260   
    261261    return false;
  • trunk/bp-groups.php

    r1766 r1779  
    778778                bp_core_add_message( __('Wire message successfully posted.', 'buddypress') );
    779779
    780             if ( !strpos( $_SERVER['HTTP_REFERER'], $bp->wire->slug ) )
     780            if ( !strpos( wp_get_referer(), $bp->wire->slug ) )
    781781                bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) );
    782782            else
     
    795795                bp_core_add_message( __('Wire message successfully deleted.', 'buddypress') );
    796796           
    797             if ( !strpos( $_SERVER['HTTP_REFERER'], $bp->wire->slug ) )
     797            if ( !strpos( wp_get_referer(), $bp->wire->slug ) )
    798798                bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) );
    799799            else
  • trunk/bp-wire.php

    r1777 r1779  
    9393    $wire_post->user_id = $bp->loggedin_user->id;
    9494    $wire_post->date_posted = time();
    95 
    96     $allowed_tags = apply_filters( 'bp_wire_post_allowed_tags', '<a><b><strong><i><em><img>' );
    97        
    98     $wire_post->content = apply_filters( 'bp_wire_post_content', $message );
     95    $wire_post->content = $message;
    9996   
    10097    if ( !$wire_post->save() )
  • trunk/bp-wire/bp-wire-filters.php

    r1608 r1779  
    22
    33/* Apply WordPress defined filters */
     4add_filter( 'bp_wire_post_content_before_save', 'wp_filter_kses', 1 );
    45add_filter( 'bp_get_wire_post_content', 'wp_filter_kses', 1 );
     6
    57add_filter( 'bp_get_wire_post_content', 'wptexturize' );
    68add_filter( 'bp_get_wire_post_content', 'convert_smilies', 2 );
     
    1012add_filter( 'bp_get_wire_post_content', 'make_clickable' );
    1113
    12 add_filter( 'bp_wire_post_content_before_save', 'wp_filter_kses', 1 );
    1314add_filter( 'bp_wire_post_content_before_save', 'force_balance_tags' );
    1415
     16function bp_wire_add_allowed_tags( $allowedtags ) {
     17    $allowedtags['strong'] = array();
     18    $allowedtags['em'] = array();
     19    $allowedtags['img'] = array();
     20    return $allowedtags;
     21}
     22add_filter( 'edit_allowedtags', 'bp_wire_add_allowed_tags', 1 );
     23
     24
    1525?>
  • trunk/bp-xprofile.php

    r1760 r1779  
    459459        bp_core_add_message( __( 'There was a problem deleting that avatar, please try again.', 'buddypress' ), 'error' );
    460460
    461     bp_core_redirect( $_SERVER['HTTP_REFERER'] );
     461    bp_core_redirect( wp_get_referer() );
    462462}
    463463add_action( 'wp', 'xprofile_action_delete_avatar', 3 );
     
    522522    }
    523523
    524     if ( !strpos( $_SERVER['HTTP_REFERER'], $bp->wire->slug ) ) {
     524    if ( !strpos( wp_get_referer(), $bp->wire->slug ) ) {
    525525        bp_core_redirect( $bp->displayed_user->domain );
    526526    } else {
     
    564564    }
    565565   
    566     if ( !strpos( $_SERVER['HTTP_REFERER'], $bp->wire->slug ) ) {
     566    if ( !strpos( wp_get_referer(), $bp->wire->slug ) ) {
    567567        bp_core_redirect( $bp->displayed_user->domain );
    568568    } else {
Note: See TracChangeset for help on using the changeset viewer.