Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/18/2020 07:42:10 PM (6 years ago)
Author:
imath
Message:

Administration: remove pre-WordPress 4.8 Admin page headers code

Now the WordPress required version for BuddyPress is >= 4.9, we can remove pre-WordPress 4.8 back compatibility code from Admin page headers.

Fixes #8330

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/classes/class-bp-members-admin.php

    r12668 r12724  
    999999
    10001000                <div class="wrap" id="community-profile-page">
    1001                         <?php if ( version_compare( $GLOBALS['wp_version'], '4.8', '>=' ) ) : ?>
    1002 
    1003                                 <h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1>
    1004 
    1005                                 <?php if ( empty( $this->is_self_profile ) ) : ?>
    1006 
    1007                                         <?php if ( current_user_can( 'create_users' ) ) : ?>
    1008 
    1009                                                 <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
    1010 
    1011                                         <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
    1012 
    1013                                                 <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
    1014 
    1015                                         <?php endif; ?>
     1001                        <h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1>
     1002
     1003                        <?php if ( empty( $this->is_self_profile ) ) : ?>
     1004
     1005                                <?php if ( current_user_can( 'create_users' ) ) : ?>
     1006
     1007                                        <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
     1008
     1009                                <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
     1010
     1011                                        <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
    10161012
    10171013                                <?php endif; ?>
    10181014
    1019                                 <hr class="wp-header-end">
    1020 
    1021                         <?php else : ?>
    1022 
    1023                                 <h1><?php echo esc_html( $title ); ?>
    1024 
    1025                                         <?php if ( empty( $this->is_self_profile ) ) : ?>
    1026 
    1027                                                 <?php if ( current_user_can( 'create_users' ) ) : ?>
    1028 
    1029                                                         <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
    1030 
    1031                                                 <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
    1032 
    1033                                                         <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
    1034 
    1035                                                 <?php endif; ?>
    1036 
    1037                                         <?php endif; ?>
    1038                                 </h1>
    1039 
    10401015                        <?php endif; ?>
     1016
     1017                        <hr class="wp-header-end">
    10411018
    10421019                        <?php if ( ! empty( $user ) ) :
    … …  
    20772054
    20782055                <div class="wrap">
    2079                         <?php if ( version_compare( $GLOBALS['wp_version'], '4.8', '>=' ) ) : ?>
    2080 
    2081                                 <h1 class="wp-heading-inline"><?php _e( 'Users', 'buddypress' ); ?></h1>
    2082 
    2083                                 <?php if ( current_user_can( 'create_users' ) ) : ?>
    2084 
    2085                                         <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
    2086 
    2087                                 <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
    2088 
    2089                                         <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
    2090 
    2091                                 <?php endif;
    2092 
    2093                                 if ( $usersearch ) {
    2094                                         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;', 'buddypress' ) . '</span>', esc_html( $usersearch ) );
    2095                                 }
    2096                                 ?>
    2097 
    2098                                 <hr class="wp-header-end">
    2099 
    2100                         <?php else : ?>
    2101 
    2102                                 <h1><?php _e( 'Users', 'buddypress' ); ?>
    2103 
    2104                                         <?php if ( current_user_can( 'create_users' ) ) : ?>
    2105 
    2106                                                 <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
    2107 
    2108                                         <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
    2109 
    2110                                                 <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
    2111 
    2112                                         <?php endif;
    2113 
    2114                                         if ( $usersearch ) {
    2115                                                 printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;', 'buddypress' ) . '</span>', esc_html( $usersearch ) );
    2116                                         }
    2117 
    2118                                         ?>
    2119                                 </h1>
    2120 
    2121                         <?php endif; ?>
     2056                        <h1 class="wp-heading-inline"><?php _e( 'Users', 'buddypress' ); ?></h1>
     2057
     2058                        <?php if ( current_user_can( 'create_users' ) ) : ?>
     2059
     2060                                <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
     2061
     2062                        <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
     2063
     2064                                <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
     2065
     2066                        <?php endif;
     2067
     2068                        if ( $usersearch ) {
     2069                                printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;', 'buddypress' ) . '</span>', esc_html( $usersearch ) );
     2070                        }
     2071                        ?>
     2072
     2073                        <hr class="wp-header-end">
    21222074
    21232075                        <?php // Display each signups on its own row. ?>
Note: See TracChangeset for help on using the changeset viewer.