Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/04/2017 05:56:39 PM (4 years ago)
Author:
mercime
Message:

Accessibility: Update H1 Headings for BP Admin Screens.

WP 4.8 changelog included the removal of action links and adjustments in the
markup of the heading section for users of assistive technologies.

Fixes #7611.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-admin.php

    r11703 r11741  
    581581
    582582    <div class="wrap">
    583         <h1><?php _e( 'Edit Group', 'buddypress' ); ?>
     583        <?php if ( version_compare( $GLOBALS['wp_version'], '4.8', '>=' ) ) : ?>
     584
     585            <h1 class="wp-heading-inline"><?php _e( 'Edit Group', 'buddypress' ); ?></h1>
    584586
    585587            <?php if ( is_user_logged_in() && bp_user_can_create_groups() ) : ?>
    586                 <a class="add-new-h2" href="<?php echo trailingslashit( bp_get_groups_directory_permalink() . 'create' ); ?>"><?php _e( 'Add New', 'buddypress' ); ?></a>
     588                <a class="page-title-action" href="<?php echo trailingslashit( bp_get_groups_directory_permalink() . 'create' ); ?>"><?php _e( 'Add New', 'buddypress' ); ?></a>
    587589            <?php endif; ?>
    588590
    589         </h1>
     591            <hr class="wp-header-end">
     592
     593        <?php else : ?>
     594
     595            <h1><?php _e( 'Edit Group', 'buddypress' ); ?>
     596
     597                <?php if ( is_user_logged_in() && bp_user_can_create_groups() ) : ?>
     598                    <a class="add-new-h2" href="<?php echo trailingslashit( bp_get_groups_directory_permalink() . 'create' ); ?>"><?php _e( 'Add New', 'buddypress' ); ?></a>
     599                <?php endif; ?>
     600
     601            </h1>
     602
     603        <?php endif; ?>
    590604
    591605        <?php // If the user has just made a change to an group, display the status messages. ?>
     
    753767
    754768    <div class="wrap">
     769        <?php if ( version_compare( $GLOBALS['wp_version'], '4.8', '>=' ) ) : ?>
     770
     771            <h1 class="wp-heading-inline"><?php _e( 'Groups', 'buddypress' ); ?></h1>
     772
     773            <?php if ( is_user_logged_in() && bp_user_can_create_groups() ) : ?>
     774                <a class="page-title-action" href="<?php echo trailingslashit( bp_get_groups_directory_permalink() . 'create' ); ?>"><?php _e( 'Add New', 'buddypress' ); ?></a>
     775            <?php endif; ?>
     776
     777            <?php if ( !empty( $_REQUEST['s'] ) ) : ?>
     778                <span class="subtitle"><?php printf( __( 'Search results for &#8220;%s&#8221;', 'buddypress' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) ); ?></span>
     779            <?php endif; ?>
     780
     781            <hr class="wp-header-end">
     782
     783        <?php else : ?>
     784
    755785        <h1>
    756786            <?php _e( 'Groups', 'buddypress' ); ?>
     
    764794            <?php endif; ?>
    765795        </h1>
     796
     797        <?php endif; ?>
    766798
    767799        <?php // If the user has just made a change to an group, display the status messages. ?>
Note: See TracChangeset for help on using the changeset viewer.