Making WordPress.org

Changeset 5823


Ignore:
Timestamp:
08/18/2017 07:21:31 PM (6 years ago)
Author:
danielbachhuber
Message:

phpunit-test-reporter: Use more precise filtering

Props SergeyBiryukov
Fixes #3051

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-display.php

    r5807 r5823  
    1818     */
    1919    public static function filter_post_class( $classes ) {
    20         if ( is_singular( 'result' ) && get_the_ID() === get_queried_object_id() ) {
     20        if ( is_singular( 'result' )
     21            && get_the_ID() === get_queried_object_id()
     22            && 'result' === get_post_type( get_the_ID() ) ) {
    2123            $classes[] = 'page';
    2224        }
     
    2830     */
    2931    public static function filter_the_content( $content ) {
    30         if ( ! is_singular( 'result' ) || get_the_ID() !== get_queried_object_id() ) {
     32        if ( ! is_singular( 'result' )
     33            || get_the_ID() !== get_queried_object_id()
     34            || 'result' !== get_post_type( get_the_ID() ) ) {
     35            return $content;
     36        }
     37
     38        if ( ! did_action( 'loop_start' ) ) {
    3139            return $content;
    3240        }
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/functions.php

    r5814 r5823  
    7676
    7777function welcome_box() {
    78     // Disable for make.wordpress.org/hosting/test-results/*
    79     // because it breaks rendering of the page
    80     if ( is_singular( 'result' ) ) {
    81         return;
    82     }
    8378    $welcome = get_page_by_path( 'welcome' );
    8479    $cookie  = 'welcome-' . get_current_blog_id();
Note: See TracChangeset for help on using the changeset viewer.