[wp-meta] [Making WordPress.org] #1706: Uploaded plugins with `draft` status will appear in the repository.

Making WordPress.org noreply at wordpress.org
Fri May 13 19:46:28 UTC 2016


#1706: Uploaded plugins with `draft` status will appear in the repository.
------------------------------+---------------------------------------
 Reporter:  ChopinBach        |       Owner:
     Type:  defect            |      Status:  new
 Priority:  normal            |   Milestone:  Plugin Directory v3 - M3
Component:  Plugin Directory  |  Resolution:
 Keywords:                    |
------------------------------+---------------------------------------

Comment (by roccotripaldi):

 Around line 340 of class-plugin-directory.php, you can add a post_status
 of publish to query:

 {{{
 if ( empty( $wp_query->query_vars['pagename'] ) && ( empty(
 $wp_query->query_vars['post_type'] ) || 'post' ==
 $wp_query->query_vars['post_type'] ) ) {
                         $wp_query->query_vars['post_type'] = array(
 'plugin' );
                         $wp_query->query_vars['post_status'] = array(
 'publish' );
                 }
 }}}

 That should ensure that only published plugins will be visible on the
 front end.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1706#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list