Changeset 3036
- Timestamp:
- 04/28/2016 06:01:20 PM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
r2994 r3036 167 167 168 168 if ( empty( $query->query['post_status'] ) ) { 169 $query->query_vars['post_status'] = array( 'publish', 'future', 'draft', 'pending', 'disabled', 'closed', 'rejected' );169 $query->query_vars['post_status'] = array( 'publish', 'future', 'draft', 'pending', 'disabled', 'closed', 'rejected', 'approved' ); 170 170 } 171 171 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php
r3034 r3036 25 25 */ 26 26 private function __construct() { 27 add_action( ' publish_plugin', array( $this, 'publish' ), 10, 2 );27 add_action( 'approved_plugin', array( $this, 'approved' ), 10, 2 ); 28 28 add_action( 'rejected_plugin', array( $this, 'rejected' ), 10, 2 ); 29 29 } … … 66 66 67 67 /** 68 * Fires when a post is transitioned to ' publish'.68 * Fires when a post is transitioned to 'approved'. 69 69 * 70 70 * @param int $post_id Post ID. 71 71 * @param \WP_Post $post Post object. 72 72 */ 73 public function publish( $post_id, $post ) {73 public function approved( $post_id, $post ) { 74 74 $attachments = get_attached_media( 'application/zip', $post_id ); 75 75 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php
r2996 r3036 44 44 if ( current_user_can( 'plugin_approve', $post ) ) { 45 45 if ( in_array( $post->post_status, array( 'draft', 'pending', 'rejected' ) ) ) { 46 $statuses = array_merge( $statuses, array( ' publish', 'rejected' ) );46 $statuses = array_merge( $statuses, array( 'approved', 'rejected' ) ); 47 47 } else { 48 48 $statuses = array( 'publish', 'disabled', 'closed' ); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-plugin-tags.php
r2994 r3036 9 9 class Plugin_Tags { 10 10 /** 11 * Displays the Publishmetabox for plugins.11 * Displays the Tags metabox for plugins. 12 12 * The HTML here matches what Core uses. 13 13 * -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r3034 r3036 146 146 'label_count' => _n_noop( 'Disabled <span class="count">(%s)</span>', 'Disabled <span class="count">(%s)</span>', 'wporg-plugins' ), 147 147 ) ); 148 register_post_status( 'approved', array( 149 'label' => _x( 'Approved', 'plugin status', 'wporg-plugins' ), 150 'public' => false, 151 'show_in_admin_status_list' => current_user_can( 'plugin_approve' ), 152 'label_count' => _n_noop( 'Approved <span class="count">(%s)</span>', 'Approved <span class="count">(%s)</span>', 'wporg-plugins' ), 153 ) ); 148 154 register_post_status( 'closed', array( 149 155 'label' => _x( 'Closed', 'plugin status', 'wporg-plugins' ), … … 435 441 * @param int $object_id Object ID. 436 442 * @param string $meta_key Meta key. 443 * @return array 437 444 */ 438 445 public function filter_shim_postmeta( $value, $object_id, $meta_key ) { … … 442 449 $count = Template::get_downloads_count( $post ); 443 450 444 return array( $count ); 451 return array( $count ); 445 452 break; 446 453 case 'rating': … … 514 521 'post_type' => 'plugin', 515 522 'name' => $plugin_slug, 516 'post_status' => array( 'publish', 'pending', 'disabled', 'closed', 'draft' ),523 'post_status' => array( 'publish', 'pending', 'disabled', 'closed', 'draft', 'approved' ), 517 524 ) ); 518 525 if ( ! $posts ) { … … 543 550 $title = ! empty( $plugin_info['title'] ) ? $plugin_info['title'] : ''; 544 551 $slug = ! empty( $plugin_info['slug'] ) ? $plugin_info['slug'] : sanitize_title( $title ); 545 $status = ! empty( $plugin_info['status'] ) ? $plugin_info['status'] : ' pending';552 $status = ! empty( $plugin_info['status'] ) ? $plugin_info['status'] : 'draft'; 546 553 $author = ! empty( $plugin_info['author'] ) ? $plugin_info['author'] : 0; 547 554 $desc = ! empty( $plugin_info['description'] ) ? $plugin_info['description'] : '';
Note: See TracChangeset
for help on using the changeset viewer.