WordPress.org

Making WordPress.org

Changeset 3134


Ignore:
Timestamp:
05/13/2016 08:20:25 PM (4 years ago)
Author:
obenland
Message:

Plugin Directory: Only have published plugins appear in the directory.

Props roccotripaldi.
Fixes #1706.

File:
1 edited

Legend:

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

    r3095 r3134  
    340340
    341341        if ( empty( $wp_query->query_vars['pagename'] ) && ( empty( $wp_query->query_vars['post_type'] ) || 'post' == $wp_query->query_vars['post_type'] ) ) {
    342             $wp_query->query_vars['post_type'] = array( 'plugin' );
     342            $wp_query->query_vars['post_type']   = array( 'plugin' );
     343            $wp_query->query_vars['post_status'] = array( 'publish' );
    343344        }
    344345
Note: See TracChangeset for help on using the changeset viewer.