Changeset 8473
- Timestamp:
- 03/17/2019 12:17:02 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload.php
r7604 r8473 12 12 $plugins = get_posts( array( 13 13 'post_type' => 'plugin', 14 'post_status' => array( 'new', 'pending' ),14 'post_status' => array( 'new', 'pending', 'approved' ), 15 15 'author' => get_current_user_id(), 16 16 'orderby' => 'title', … … 32 32 33 33 $submitted_plugins = self::get_submitted_plugins(); 34 $submitted_counts = (object) array_fill_keys( array( 'new', 'pending' ), 0 );34 $submitted_counts = (object) array_fill_keys( array( 'new', 'pending', 'approved' ), 0 ); 35 35 36 36 $submitted_counts->total = count( $submitted_plugins ); … … 43 43 $submitted_plugins[ $key ]->status = __( 'Being Reviewed', 'wporg-plugins' ); 44 44 $submitted_counts->pending++; 45 } elseif ( 'approved' === $plugin->post_status ) { 46 $submitted_plugins[ $key ]->status = __( 'Approved', 'wporg-plugins' ); 47 $submitted_counts->approved++; 45 48 } 46 49 } … … 101 104 <p> 102 105 <?php 103 if ( 1 === $submitted_counts->total ) { 104 esc_html_e( 'You already have a plugin in the review queue. Please wait for it to be approved before submitting any more.', 'wporg-plugins' ); 105 } else { 106 printf( 107 /* translators: 1: Total amount of plugins; 2: Amount of pending plugins. */ 106 if ( 0 !== $submitted_counts->approved ) { 107 printf( 108 /* translators: 1: Amount of approved plugins; 2: URL on how to use SVN */ 108 109 esc_html( _n( 109 'You have %1$s plugins in the review queue, %2$s is being actively reviewed. Please wait for them to be approved before submitting any more.', 110 'You have %1$s plugins in the review queue, %2$s are being actively reviewed. Please wait for them to be approved before submitting any more.', 110 'You have %1$s approved plugin that has not yet been used. We require developers to use the hosting we provide. Please upload your plugin via <a href="%2$s">SVN</a>.', 111 'You have %1$s approved plugins that have not yet been used. We require developers to use the hosting we provide. Please upload your plugins via <a href="%2$s">SVN</a>.', 112 $submitted_counts->approved, 113 'wporg-plugins' 114 ) ), 115 '<strong>' . $submitted_counts->approved . '</strong>', 116 'https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/' 117 ); 118 } elseif ( 0 !== $submitted_counts->pending ) { 119 printf( 120 /* translators: %s: Amount of pending plugins. */ 121 esc_html( _n( 122 'You have %s plugin being actively reviewed. You must complete this review before you can submit another plugin.', 123 'You have %s plugins being actively reviewed. You must complete their reviews before you can submit another plugin.', 111 124 $submitted_counts->pending, 112 125 'wporg-plugins' 113 126 ) ), 114 '<strong>' . $submitted_counts->total . '</strong>',115 127 '<strong>' . $submitted_counts->pending . '</strong>' 128 ); 129 } elseif ( 0 !== $submitted_counts->new ) { 130 printf( 131 /* translators: %s: Amount of new plugins. */ 132 esc_html( _n( 133 'You have %s plugin that has been recently submitted but not yet reviewed. Please wait for your plugin to be reviewed and approved before submitting another.', 134 'You have %s plugins already submitted but not yet reviewed. Please wait for them to be reviewed and approved before submitting another plugin.', 135 $submitted_counts->new, 136 'wporg-plugins' 137 ) ), 138 '<strong>' . $submitted_counts->new . '</strong>' 116 139 ); 117 140 } … … 121 144 <ul> 122 145 <?php 146 // List of all plugins in progress. 123 147 foreach ( $submitted_plugins as $plugin ) { 124 148 echo '<li>' . esc_html( $plugin->post_title ) . ' — ' . $plugin->status . "</li>\n"; … … 196 220 } 197 221 ?> 198 222 199 223 <?php endif; // ! $submitted_counts->total ?> 200 224
Note: See TracChangeset
for help on using the changeset viewer.