Making WordPress.org


Ignore:
Timestamp:
10/02/2020 07:29:32 AM (5 years ago)
Author:
dd32
Message:

Support Forums: Don't prefix a Theme/Plugin to the topic title if we can't find the theme/plugin specified in the metadata.

The only way I've been able to find to achieve this, is to manually edit the topic to add a theme slug in the plugin field or vice-versa..

File:
1 edited

Legend:

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

    r9853 r10344  
    420420                $term = $terms[0];
    421421                $object = $this->get_object( $term->slug );
    422                 $title = sprintf( "[%s] %s", esc_html( $object->post_title ), esc_html( $title ) );
     422                if ( $object ) {
     423                    $title = sprintf( "[%s] %s", esc_html( $object->post_title ), esc_html( $title ) );
     424                }
    423425            }
    424426        }
Note: See TracChangeset for help on using the changeset viewer.