Making WordPress.org

Changeset 5838


Ignore:
Timestamp:
08/24/2017 02:12:46 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Add an indication of the link to the page topic author needs help with for logged-out users.

Change "Site URL:" label to "The page I need help with:".

Fixes #3049.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php

    r5778 r5838  
    382382            $site_url = get_post_meta( $topic_id, self::SITE_URL_META, true );
    383383
    384             // Display site URL for logged-in users.
    385             if ( is_user_logged_in() && $site_url ) {
    386                 printf( '<p class="wporg-bbp-topic-site-url">%1$s <a href="%2$s" rel="nofollow">%2$s</a></p>',
    387                     __( 'Site URL:', 'wporg-forums' ),
    388                     esc_url( $site_url )
    389                 );
     384            if ( $site_url ) {
     385                // Display site URL for logged-in users only.
     386                if ( is_user_logged_in() ) {
     387                    printf( '<p class="wporg-bbp-topic-site-url">%1$s <a href="%2$s" rel="nofollow">%2$s</a></p>',
     388                        __( 'The page I need help with:', 'wporg-forums' ),
     389                        esc_url( $site_url )
     390                    );
     391                } else {
     392                    printf( '<p class="wporg-bbp-topic-site-url">%1$s <em>%2$s</em></p>',
     393                        __( 'The page I need help with:', 'wporg-forums' ),
     394                        sprintf( __( '[<a href="%s">log in</a> to see the link]', 'wporg-forums' ), wp_login_url() )
     395                    );
     396                }
    390397            }
    391398        }
     
    402409            ?>
    403410            <p>
    404                 <label for="site_url"><?php _e( 'URL of the site or page you need help with:', 'wporg-forums' ) ?></label><br />
     411                <label for="site_url"><?php _e( 'Link to the page you need help with:', 'wporg-forums' ) ?></label><br />
    405412                <input type="text" id="site_url" value="<?php echo esc_attr( $site_url ); ?>" size="40" name="site_url" maxlength="100" />
    406413            </p>
Note: See TracChangeset for help on using the changeset viewer.