Changeset 4401
- Timestamp:
- 11/22/2016 07:52:35 AM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
r4383 r4401 115 115 break; 116 116 117 case 'edit.php':118 wp_enqueue_style( 'plugin-admin-edit-css', plugins_url( 'css/plugin-list.css', Plugin_Directory\PLUGIN_FILE ), array(), 2 );119 break;120 117 } 121 118 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php
r4383 r4401 106 106 'title' => _x( 'Title', 'column name', 'wporg-plugins' ), 107 107 'author' => __( 'Submitter', 'wporg-plugins' ), 108 'tested' => __( 'Tested up to', 'wporg-plugins' ),109 'rating' => __( 'Rating', 'wporg-plugins' ),110 'installs' => __( 'Active installs', 'wporg-plugins' ),111 'downloads' => __( 'Downloads', 'wporg-plugins' ),112 'support' => __( 'Support', 'wporg-plugins' ),113 108 ); 114 109 … … 181 176 <?php 182 177 $GLOBALS['post'] = $global_post; 183 }184 185 /**186 * Handles the tested up to column output.187 *188 * @param \WP_Post $post The current WP_Post object.189 */190 public function column_tested( $post ) {191 $tested = (string) get_post_meta( $post->ID, 'tested', true );192 193 if ( ! empty( $tested ) ) {194 $class = version_compare( $tested, WP_CORE_STABLE_BRANCH ) >= 0 ? 'current' : 'needs-update';195 196 printf( '<span class="%s">%s</span>', $class, $tested );197 }198 }199 200 /**201 * Handles the rating column output.202 *203 * @param \WP_Post $post The current WP_Post object.204 */205 public function column_rating( $post ) {206 echo Template::dashicons_stars( get_post_meta( $post->ID, 'rating', true ) );207 }208 209 /**210 * Handles the installs column output.211 *212 * @param \WP_Post $post The current WP_Post object.213 */214 public function column_installs( $post ) {215 echo Template::active_installs( false, $post );216 }217 218 /**219 * Handles the downloads column output.220 *221 * @param \WP_Post $post The current WP_Post object.222 */223 public function column_downloads( $post ) {224 echo number_format_i18n( get_post_meta( $post->ID, 'downloads', true ) );225 }226 227 /**228 * Handles the support column output.229 *230 * @param \WP_Post $post The current WP_Post object.231 */232 public function column_support( $post ) {233 $threads = get_post_meta( $post->ID, 'support_threads', true );234 $resolved = get_post_meta( $post->ID, 'support_threads_resolved', true );235 $unresolved = max( 0, $threads - $resolved );236 $link_text = sprintf( __( '%d unresolved', 'wporg-plugins' ), $unresolved );237 238 printf( '<a href="%s">%s</a>', esc_url( 'https://wordpress.org/support/plugin/' . $post->post_name ), $link_text );239 178 } 240 179
Note: See TracChangeset
for help on using the changeset viewer.