Making WordPress.org


Ignore:
Timestamp:
02/08/2017 08:21:45 PM (8 years ago)
Author:
coffee2code
Message:

Support Forums: Omit forum link from breadcrumbs for plugin/theme support forums and reviews

Their general forums are hidden from listings and no longer meant to be directly linked.

Fixes #2486.

File:
1 edited

Legend:

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

    r4612 r4894  
    463463        }
    464464
    465         $link = sprintf(
     465        // Prefix link to plugin/theme support or review forum with context.
     466        if ( 'plugin' === $type ) {
     467            /* translators: %s: link to plugin support or review forum */
     468            $parent_breadcrumb = __( 'Plugin: %s', 'wporg-forums' );
     469        } else {
     470            /* translators: %s: link to theme support or review forum */
     471            $parent_breadcrumb = __( 'Theme: %s', 'wporg-forums' );
     472        }
     473        $link = sprintf( $parent_breadcrumb, sprintf(
    466474            '<a href="%s" class="bbp-breadcrumb-forum">%s</a>',
    467475            esc_url( $url ),
    468476            esc_html( $obj->post_title )
    469         );
     477        ) );
    470478
    471479        // Insert link before topic title.
    472         array_splice( $r, 2, 0, $link );
     480        array_splice( $r, 1, 1, $link );
    473481
    474482        return $r;
Note: See TracChangeset for help on using the changeset viewer.