Making WordPress.org

Changeset 4983


Ignore:
Timestamp:
02/22/2017 05:54:33 PM (8 years ago)
Author:
coffee2code
Message:

Support Forums: Also prefix 'Plugin:' or 'Theme:' context to plugin name in breadcrumbs in topic list view.

See #2486.

File:
1 edited

Legend:

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

    r4980 r4983  
    511511        }
    512512
    513         $r[1] = esc_html( $this->title() );
     513        // Prefix link to plugin/theme support or review forum with context.
     514        if ( 'plugin' === $this->compat() ) {
     515            /* translators: %s: link to plugin support or review forum */
     516            $compat_breadcrumb = __( 'Plugin: %s', 'wporg-forums' );
     517        } else {
     518            /* translators: %s: link to theme support or review forum */
     519            $compat_breadcrumb = __( 'Theme: %s', 'wporg-forums' );
     520        }
     521
     522        $r[1] = sprintf( $compat_breadcrumb, esc_html( $this->title() ) );
     523
    514524        if ( in_array( $view, array( 'reviews', 'active' ) ) ) {
    515             // Prefix link to plugin/theme support or review forum with context.
    516             if ( 'plugin' === $this->compat() ) {
    517                 /* translators: %s: link to plugin support or review forum */
    518                 $parent_breadcrumb = __( 'Plugin: %s', 'wporg-forums' );
    519             } else {
    520                 /* translators: %s: link to theme support or review forum */
    521                 $parent_breadcrumb = __( 'Theme: %s', 'wporg-forums' );
    522             }
    523             $r[1] = sprintf( $parent_breadcrumb, sprintf(
     525            $r[1] = sprintf( $compat_breadcrumb, sprintf(
    524526                '<a href="%s" class="bbp-breadcrumb-forum">%s</a>',
    525527                esc_url( bbp_get_view_url( $this->compat() ) ),
Note: See TracChangeset for help on using the changeset viewer.