Making WordPress.org


Ignore:
Timestamp:
11/01/2018 11:00:00 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Revert [7813], overzealous escaping breaks legitimate markup.

See #3485.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/user-details.php

    r7813 r7818  
    11<?php
     2
    23/**
    34 * User Details
     
    2223    <div id="bbp-user-navigation">
    2324        <ul>
    24             <li class="
    25             <?php
    26             if ( bbp_is_single_user_profile() ) :
    27                 ?>
    28  current<?php endif; ?>">
     25            <li class="<?php if ( bbp_is_single_user_profile() ) :?>current<?php endif; ?>">
    2926                <span class="vcard bbp-user-profile-link">
    30                     <a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="
    31                                                                             <?php
    32                                                                             /* translators: %s: user's display name */
    33                                                                             printf( esc_attr__( "%s's Profile", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    34                                                                             ?>
    35                     " rel="me"><?php esc_html_e( 'Profile', 'wporg-forums' ); ?></a>
     27                    <a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="<?php
     28                        /* translators: %s: user's display name */
     29                        printf( esc_attr__( "%s's Profile", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     30                    ?>" rel="me"><?php esc_html_e( 'Profile', 'wporg-forums' ); ?></a>
    3631                </span>
    3732            </li>
    3833
    39             <li class="
    40             <?php
    41             if ( bbp_is_single_user_topics() ) :
    42                 ?>
    43  current<?php endif; ?>">
     34            <li class="<?php if ( bbp_is_single_user_topics() ) :?>current<?php endif; ?>">
    4435                <span class='bbp-user-topics-created-link'>
    45                     <a href="<?php bbp_user_topics_created_url(); ?>" title="
    46                                                                     <?php
    47                                                                     /* translators: %s: user's display name */
    48                                                                     printf( esc_attr__( "%s's Topics Started", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    49                                                                     ?>
    50                     "><?php esc_html_e( 'Topics Started', 'wporg-forums' ); ?></a>
     36                    <a href="<?php bbp_user_topics_created_url(); ?>" title="<?php
     37                        /* translators: %s: user's display name */
     38                        printf( esc_attr__( "%s's Topics Started", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     39                    ?>"><?php esc_html_e( 'Topics Started', 'wporg-forums' ); ?></a>
    5140                </span>
    5241            </li>
    5342
    54             <li class="
    55             <?php
    56             if ( bbp_is_single_user_replies() ) :
    57                 ?>
    58  current<?php endif; ?>">
     43            <li class="<?php if ( bbp_is_single_user_replies() ) :?>current<?php endif; ?>">
    5944                <span class='bbp-user-replies-created-link'>
    60                     <a href="<?php bbp_user_replies_created_url(); ?>" title="
    61                                                                     <?php
    62                                                                     /* translators: %s: user's display name */
    63                                                                     printf( esc_attr__( "%s's Replies Created", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    64                                                                     ?>
    65                     "><?php esc_html_e( 'Replies Created', 'wporg-forums' ); ?></a>
     45                    <a href="<?php bbp_user_replies_created_url(); ?>" title="<?php
     46                        /* translators: %s: user's display name */
     47                        printf( esc_attr__( "%s's Replies Created", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     48                    ?>"><?php esc_html_e( 'Replies Created', 'wporg-forums' ); ?></a>
    6649                </span>
    6750            </li>
    6851
    69             <?php if ( defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) && WPORG_SUPPORT_FORUMS_BLOGID === get_current_blog_id() ) : ?>
    70                 <li class="
    71                 <?php
    72                 if ( wporg_support_is_single_user_reviews() ) :
    73                     ?>
    74  current<?php endif; ?>">
     52            <?php if ( defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) && WPORG_SUPPORT_FORUMS_BLOGID == get_current_blog_id() ) : ?>
     53                <li class="<?php if ( wporg_support_is_single_user_reviews() ) :?>current<?php endif; ?>">
    7554                    <span class='bbp-user-reviews-link'>
    76                         <a href="<?php bbp_user_profile_url(); ?>reviews/" title="
    77                                                                <?php
    78                                                                 /* translators: %s: user's display name */
    79                                                                 printf( esc_attr__( "%s's Reviews Written", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    80                                                                 ?>
    81                         "><?php esc_html_e( 'Reviews Written', 'wporg-forums' ); ?></a>
     55                        <a href="<?php bbp_user_profile_url(); ?>reviews/" title="<?php
     56                            /* translators: %s: user's display name */
     57                            printf( esc_attr__( "%s's Reviews Written", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     58                        ?>"><?php esc_html_e( 'Reviews Written', 'wporg-forums' ); ?></a>
    8259                    </span>
    8360                </li>
    8461            <?php endif; ?>
    8562
    86             <li class="
    87             <?php
    88             if ( wporg_support_is_single_user_topics_replied_to() ) :
    89                 ?>
    90  current<?php endif; ?>">
     63            <li class="<?php if ( wporg_support_is_single_user_topics_replied_to() ) :?>current<?php endif; ?>">
    9164                <span class='bbp-user-topics-replied-to-link'>
    92                     <a href="<?php bbp_user_profile_url(); ?>replied-to/" title="
    93                                                             <?php
    94                                                             /* translators: %s: user's display name */
    95                                                             printf( esc_attr__( 'Topics %s Has Replied To', 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    96                                                             ?>
    97                     "><?php esc_html_e( 'Topics Replied To', 'wporg-forums' ); ?></a>
     65                    <a href="<?php bbp_user_profile_url(); ?>replied-to/" title="<?php
     66                        /* translators: %s: user's display name */
     67                        printf( esc_attr__( 'Topics %s Has Replied To', 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     68                    ?>"><?php esc_html_e( 'Topics Replied To', 'wporg-forums' ); ?></a>
    9869                </span>
    9970            </li>
    10071
    10172            <?php if ( function_exists( 'bbp_is_engagements_active' ) && bbp_is_engagements_active() ) : ?>
    102                 <li class="
    103                 <?php
    104                 if ( bbp_is_single_user_engagements() ) :
    105                     ?>
    106  current<?php endif; ?>">
     73                <li class="<?php if ( bbp_is_single_user_engagements() ) :?>current<?php endif; ?>">
    10774                    <span class='bbp-user-engagements-created-link'>
    108                         <a href="<?php bbp_user_engagements_url(); ?>" title="
    109                                                                    <?php
    110                                                                     /* translators: %s: user's display name */
    111                                                                     printf( esc_attr__( "%s's Engagements", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    112                                                                     ?>
    113                         "><?php esc_html_e( 'Engagements', 'wporg-forums' ); ?></a>
     75                        <a href="<?php bbp_user_engagements_url(); ?>" title="<?php
     76                            /* translators: %s: user's display name */
     77                            printf( esc_attr__( "%s's Engagements", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     78                        ?>"><?php esc_html_e( 'Engagements', 'wporg-forums' ); ?></a>
    11479                    </span>
    11580                </li>
     
    11782
    11883            <?php if ( bbp_is_favorites_active() ) : ?>
    119                 <li class="
    120                 <?php
    121                 if ( bbp_is_favorites() ) :
    122                     ?>
    123  current<?php endif; ?>">
     84                <li class="<?php if ( bbp_is_favorites() ) :?>current<?php endif; ?>">
    12485                    <span class="bbp-user-favorites-link">
    125                         <a href="<?php bbp_favorites_permalink(); ?>" title="
    126                                                                   <?php
    127                                                                     /* translators: %s: user's display name */
    128                                                                     printf( esc_attr__( "%s's Favorites", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    129                                                                     ?>
    130                         "><?php esc_html_e( 'Favorites', 'wporg-forums' ); ?></a>
     86                        <a href="<?php bbp_favorites_permalink(); ?>" title="<?php
     87                            /* translators: %s: user's display name */
     88                            printf( esc_attr__( "%s's Favorites", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     89                        ?>"><?php esc_html_e( 'Favorites', 'wporg-forums' ); ?></a>
    13190                    </span>
    13291                </li>
     
    13695
    13796                <?php if ( bbp_is_subscriptions_active() ) : ?>
    138                     <li class="
    139                     <?php
    140                     if ( bbp_is_subscriptions() ) :
    141                         ?>
    142  current<?php endif; ?>">
     97                    <li class="<?php if ( bbp_is_subscriptions() ) :?>current<?php endif; ?>">
    14398                        <span class="bbp-user-subscriptions-link">
    144                             <a href="<?php bbp_subscriptions_permalink(); ?>" title="
    145                                                                           <?php
    146                                                                             /* translators: %s: user's display name */
    147                                                                             printf( esc_attr__( "%s's Subscriptions", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    148                                                                             ?>
    149                             "><?php esc_html_e( 'Subscriptions', 'wporg-forums' ); ?></a>
     99                            <a href="<?php bbp_subscriptions_permalink(); ?>" title="<?php
     100                                /* translators: %s: user's display name */
     101                                printf( esc_attr__( "%s's Subscriptions", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     102                            ?>"><?php esc_html_e( 'Subscriptions', 'wporg-forums' ); ?></a>
    150103                        </span>
    151104                    </li>
    152105                <?php endif; ?>
    153106
    154                 <li class="
    155                 <?php
    156                 if ( bbp_is_single_user_edit() ) :
    157                     ?>
    158  current<?php endif; ?>">
     107                <li class="<?php if ( bbp_is_single_user_edit() ) :?>current<?php endif; ?>">
    159108                    <span class="bbp-user-edit-link">
    160                         <a href="<?php bbp_user_profile_edit_url(); ?>" title="
    161                                                                     <?php
    162                                                                     /* translators: %s: user's display name */
    163                                                                     printf( esc_attr__( "Edit %s's Profile", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    164                                                                     ?>
    165                         "><?php esc_html_e( 'Edit', 'wporg-forums' ); ?></a>
     109                        <a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php
     110                            /* translators: %s: user's display name */
     111                            printf( esc_attr__( "Edit %s's Profile", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     112                        ?>"><?php esc_html_e( 'Edit', 'wporg-forums' ); ?></a>
    166113                    </span>
    167114                </li>
     
    176123</div>
    177124
    178 <?php
    179 do_action( 'bbp_template_after_user_details' );
     125<?php do_action( 'bbp_template_after_user_details' );
Note: See TracChangeset for help on using the changeset viewer.