Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/21/2018 01:00:36 AM (7 years ago)
Author:
djpaul
Message:

Templates, Nouveau: string improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/groups/functions.php

    r12082 r12104  
    2525    }
    2626
    27     $message = '<div class="bp-feedback ' . $type . '"><span class="bp-icon" aria-hidden="true"></span><p>' . $message . '</p></div>';
     27    $message = '<div class=" ' . esc_attr( "bp-feedback {$type}" ) . '"><span class="bp-icon" aria-hidden="true"></span><p>' . esc_html( $message ) . '</p></div>';
    2828
    2929    return $message;
     
    150150        'loading'            => __( 'Loading members. Please wait.', 'buddypress' ),
    151151        'invites_form'       => __( 'Use the "Send" button to send your invite or the "Cancel" button to abort.', 'buddypress' ),
    152         'invites_form_reset' => __( 'Invites cleared. Please use one of the available tabs to select members to invite.', 'buddypress' ),
    153         'invites_sending'    => __( 'Sending the invites. Please wait.', 'buddypress' ),
    154         'removeUserInvite'   => __( 'Disinvite %s', 'buddypress' ),
     152        'invites_form_reset' => __( 'Group invitations cleared. Please use one of the available tabs to select members to invite.', 'buddypress' ),
     153        'invites_sending'    => __( 'Sending group invitations. Please wait.', 'buddypress' ),
     154        'removeUserInvite'   => __( 'Cancel invitation %s', 'buddypress' ),
    155155        'group_id'           => ! bp_get_current_group_id() ? bp_get_new_group_id() : bp_get_current_group_id(),
    156156        'is_group_create'    => bp_is_group_create(),
     
    295295/**
    296296 * @since 3.0.0
    297  * @todo I don't see any reason why to restrict group invites to friends..
    298297 */
    299298function bp_nouveau_group_invites_create_steps( $steps = array() ) {
    300299    if ( bp_is_active( 'friends' ) && isset( $steps['group-invites'] ) ) {
    301300        // Simply change the name
    302         $steps['group-invites']['name'] = _x( 'Invite', 'Group screen nav', 'buddypress' );
     301        $steps['group-invites']['name'] = _x( 'Invite', 'Group invitations menu title', 'buddypress' );
    303302        return $steps;
    304303    }
     
    306305    // Add the create step if friends component is not active
    307306    $steps['group-invites'] = array(
    308         'name'     => _x( 'Invite', 'Group screen nav', 'buddypress' ),
     307        'name'     => _x( 'Invite', 'Group invitations menu title', 'buddypress' ),
    309308        'position' => 30,
    310309    );
     
    326325
    327326        $bp->groups->nav->edit_nav(
    328             array( 'name' => _x( 'Invite', 'My Group screen nav', 'buddypress' ) ),
     327            array( 'name' => _x( 'Invite', 'Group invitations menu title', 'buddypress' ) ),
    329328            'send-invites',
    330329            bp_get_current_group_slug()
     
    337336
    338337        bp_core_new_subnav_item( array(
    339             'name'            => _x( 'Invite', 'My Group screen nav', 'buddypress' ),
     338            'name'            => _x( 'Invite', 'Group invitations menu title', 'buddypress' ),
    340339            'slug'            => 'send-invites',
    341340            'parent_url'      => $group_link,
     
    395394        'avatar_url'  => $item_avatar_url,
    396395        'object_type' => 'group',
    397         'is_public'   => 'public' === $item->status,
     396        'is_public'   => ( 'public' === $item->status ),
    398397    );
    399398}
     
    413412
    414413    bp_core_new_subnav_item( array(
    415         'name'            => _x( 'Group Invites', 'My Group Invites settings screen nav', 'buddypress' ),
     414        'name'            => _x( 'Group Invites', 'Group invitations main menu title', 'buddypress' ),
    416415        'slug'            => 'invites',
    417416        'parent_url'      => trailingslashit( $user_domain . $slug ),
     
    441440        'parent' => 'my-account-' . buddypress()->settings->id,
    442441        'id'     => 'my-account-' . buddypress()->settings->id . '-invites',
    443         'title'  => _x( 'Group Invites', 'My Account Settings sub nav', 'buddypress' ),
     442        'title'  => _x( 'Group Invites', 'Group invitations main menu title', 'buddypress' ),
    444443        'href'   => trailingslashit( $settings_link . 'invites/' ),
    445444    );
     
    694693            'panel'       => 'bp_nouveau_panel',
    695694            'priority'    => 40,
    696             'description' => __( 'Customize the navigation menu for groups. See your changes by navigating to a group in the live-preview window..', 'buddypress' ),
     695            'description' => __( 'Customize the navigation menu for groups. See your changes by navigating to a group in the live-preview window.', 'buddypress' ),
    697696        ),
    698697    ) );
     
    801800        ),
    802801        'group_front_boxes' => array(
    803             'label'      => __( 'Enable widget region for group homepages. (When enabled, the site admin can add widgets to group pages via the Widgets panel.)', 'buddypress' ),
     802            'label'      => __( 'Enable widget region for group homepages. When enabled, the site admin can add widgets to group pages via the Widgets panel.', 'buddypress' ),
    804803            'section'    => 'bp_nouveau_group_front_page',
    805804            'settings'   => 'bp_nouveau_appearance[group_front_boxes]',
     
    807806        ),
    808807        'group_front_description' => array(
    809             'label'      => __( 'Display the group description in the body of the group\'s front page.', 'buddypress' ),
     808            'label'      => __( "Display the group description in the body of the group's front page.", 'buddypress' ),
    810809            'section'    => 'bp_nouveau_group_front_page',
    811810            'settings'   => 'bp_nouveau_appearance[group_front_description]',
     
    819818        ),
    820819        'group_nav_tabs' => array(
    821             'label'      => __( 'Use tab styling for primary nav.', 'buddypress' ),
     820            'label'      => __( 'Use tab styling for primary navigation.', 'buddypress' ),
    822821            'section'    => 'bp_nouveau_group_primary_nav',
    823822            'settings'   => 'bp_nouveau_appearance[group_nav_tabs]',
     
    825824        ),
    826825        'group_subnav_tabs' => array(
    827             'label'      => __( 'Use tab styling for secondary nav.', 'buddypress' ),
     826            'label'      => __( 'Use tab styling for secondary navigation.', 'buddypress' ),
    828827            'section'    => 'bp_nouveau_group_primary_nav',
    829828            'settings'   => 'bp_nouveau_appearance[group_subnav_tabs]',
     
    844843        ),
    845844        'groups_layout' => array(
    846             'label'      => __( 'Groups', 'buddypress' ),
     845            'label'      => _x( 'Groups', 'Customizer control label', 'buddypress' ),
    847846            'section'    => 'bp_nouveau_loops_layout',
    848847            'settings'   => 'bp_nouveau_appearance[groups_layout]',
     
    955954    // Loop in the hierarchy to fill it for the requested template part
    956955    foreach ( $bp_nouveau->groups->current_group_hierarchy as $part ) {
    957         $templates[] = sprintf( $part, $template );
     956        $templates[] = sprintf( $part, sanitize_file_name( $template ) );
    958957    }
    959958
     
    10101009 */
    10111010function bp_nouveau_group_is_home_widgets() {
    1012     return true === bp_nouveau()->groups->is_group_home_sidebar;
     1011    return ( true === bp_nouveau()->groups->is_group_home_sidebar );
    10131012}
    10141013
     
    11981197        array(
    11991198            'id'       => 'member_promoted_to_admin',
    1200             'label'    => __( 'Group Admin promotions', 'buddypress' ),
     1199            'label'    => __( 'Group Administrator promotions', 'buddypress' ),
    12011200            'position' => 85,
    12021201        ),
     
    12081207        array(
    12091208            'id'       => 'group_invite',
    1210             'label'    => __( 'Group invites', 'buddypress' ),
     1209            'label'    => __( 'Group invitations', 'buddypress' ),
    12111210            'position' => 105,
    12121211        ),
Note: See TracChangeset for help on using the changeset viewer.