Making WordPress.org

Changeset 9464


Ignore:
Timestamp:
02/04/2020 09:17:13 PM (5 years ago)
Author:
coffee2code
Message:

Support Forums: Customize 'Create Topic' link for reviews to be 'Create Review'.

File:
1 edited

Legend:

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

    r9463 r9464  
    521521            bbp_is_single_view() && in_array( bbp_get_view_id(), array( 'plugin', 'reviews', 'theme' ) )
    522522        ) {
     523            $is_reviews = 'reviews' === bbp_get_view_id();
    523524            if ( bbp_current_user_can_access_create_topic_form() ) {
    524525                printf(
    525526                    '<a class="button create-topic" href="#new-topic-0">%s</a>',
    526                     __( 'Create Topic', 'wporg-forums' )
     527                    $is_reviews ? __( 'Create Review', 'wporg-forums' ) : __( 'Create Topic', 'wporg-forums' )
    527528                );
    528529            } elseif ( ! bbp_is_forum_closed() && ! is_user_logged_in() ) {
     
    530531                    '<a class="button create-topic login" href="%s">%s</a>',
    531532                    wp_login_url(),
    532                     __( 'Log in to Create a Topic', 'wporg-forums' )
     533                    $is_reviews ? __( 'Log in to Create a Review', 'wporg-forums' ) : __( 'Log in to Create a Topic', 'wporg-forums' )
    533534                );
    534535            }
Note: See TracChangeset for help on using the changeset viewer.