Making WordPress.org


Ignore:
Timestamp:
03/30/2026 02:05:11 AM (5 months ago)
Author:
dd32
Message:

bbPress.org: Remove unused code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/buddypress.org/public_html/wp-content/plugins/bbpress-org/bbpress-dot-org.php

    r1468 r14776  
    44 * Plugin Name: bbPress.org Tweaks
    55 * Description: Code specific to bbPress.org
    6  * Version:     1.0.5
     6 * Version:     1.0.6
    77 * Author:      jjj
    88 * Author URI:  http://jaco.by
     
    1111// Include files
    1212include_once( plugin_dir_path( __FILE__ ) . 'toolbar.php' );
    13 include_once( plugin_dir_path( __FILE__ ) . 'tools.php'   );
    1413
    1514/**
     
    2221 */
    2322function bbporg_admin_redirect() {
    24         if (       ! current_user_can( 'contributor'   )
    25                         || ! current_user_can( 'author'        )
    26                         || ! current_user_can( 'editor'        )
    27                         || ! current_user_can( 'administrator' )
    28                 )
     23        if ( current_user_can( 'manage_options' ) ) {
    2924                return;
     25        }
    3026
    3127        wp_safe_redirect( home_url( '/' ) );
     
    3329}
    3430add_action( 'bbp_admin_init', 'bbporg_admin_redirect' );
    35 
    36 /**
    37  * Filter the users edit profile URL and use bbPress's theme-side edit instead
    38  *
    39  * @author johnjamesjacoby
    40  * @since 1.0
    41  * @param string $user_edit
    42  * @return string
    43  */
    44 function bbporg_filter_profile_edit_url( $user_edit = '' ) {
    45 
    46         // Bail if bbPress is not active
    47         if ( ! function_exists( 'bbp_get_user_profile_edit_url' ) ) {
    48                 return $user_edit;
    49         }
    50 
    51         $user_edit = bbp_get_user_profile_edit_url( bbp_get_current_user_id() );
    52         return $user_edit;
    53 }
    54 add_filter( 'edit_profile_url', 'bbporg_filter_profile_edit_url' );
Note: See TracChangeset for help on using the changeset viewer.