Changeset 2986 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php
- Timestamp:
- 04/20/2016 11:59:45 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php
r2927 r2986 142 142 $this->plugin_meta = \plugins_api( 'plugin_information', array( 143 143 'slug' => $post->post_name, 144 'fields' => array( 'active_installs' => true ),145 144 ) ); 146 145 ?> … … 184 183 */ 185 184 public function column_installs( $post ) { 186 if ( ! empty( $this->plugin_meta->active_installs ) ) { 187 echo number_format_i18n( $this->plugin_meta->active_installs ) . '+'; 185 $active_installs = get_post_meta( $post->ID, 'active_installs', true ); 186 if ( $active_installs >= 1000000 ) { 187 _e( '1+ million', 'wporg-plugins' ); 188 } elseif ( $active_installs <= 10 ) { 189 _e( 'Less than 10', 'wporg-plugins' ); 190 } else { 191 printf( "%s+", number_format_i18n( $active_installs ) ); 188 192 } 189 193 } … … 206 210 */ 207 211 public function column_support( $post ) { 208 $resolutions = get_post_meta( $post->ID, 'support_resolutions', true ); 209 $unresolved = empty( $resolutions ) ? 0 : $resolutions['no']; 210 $link_text = sprintf( __( '%d unresolved', 'wporg-plugins' ), $unresolved ); 212 $threads = get_post_meta( $post->ID, 'support_threads', true ); 213 $resolved = get_post_meta( $post->ID, 'support_threads_resolved', true ); 214 $unresolved = max( 0, $threads - $resolved ); 215 $link_text = sprintf( __( '%d unresolved', 'wporg-plugins' ), $unresolved ); 211 216 212 217 printf( '<a href="%s">%s</a>', esc_url( 'https://wordpress.org/support/plugin/' . $post->post_name ), $link_text );
Note: See TracChangeset
for help on using the changeset viewer.