Making WordPress.org


Ignore:
Timestamp:
05/28/2020 05:03:27 AM (4 years ago)
Author:
dd32
Message:

Theme Directory: Swap back to using get_post() now that it works as expected.

See [9935].
Reverts parts of [9870].
See #5173, #4994.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php

    r9870 r9936  
    10991099    }
    11001100
    1101     $post = get_queried_object();
    1102     if ( ! $post || !( $post instanceof WP_Post ) ) {
     1101    $post = get_post();
     1102    if ( ! $post ) {
    11031103        return;
    11041104    }
     
    11281128 */
    11291129function wporg_themes_noindex_request( $noindex ) {
    1130     if ( is_single() && ( $post = get_queried_object() ) && $post instanceof WP_Post ) {
     1130    if ( is_single() && ( $post = get_post() ) ) {
    11311131        $theme = wporg_themes_theme_information( $post->post_name );
    11321132        if ( $theme ) {
Note: See TracChangeset for help on using the changeset viewer.