Changeset 9010
- Timestamp:
- 07/02/2019 04:18:38 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r9009 r9010 271 271 * 272 272 * @static 273 * @global \wpdb $wpdb WordPress database abstraction object.274 273 * 275 274 * @param int|\WP_Post|null $post Optional. … … 279 278 $post = get_post( $post ); 280 279 281 if ( false === ( $count = wp_cache_get( $post->ID, 'plugin_download_count' ) ) ) { 282 global $wpdb; 283 284 $count = $wpdb->get_var( $wpdb->prepare( 'SELECT downloads FROM `' . PLUGINS_TABLE_PREFIX . 'download_counts` WHERE plugin_slug = %s', $post->post_name ) ); 285 286 wp_cache_set( $post->ID, $count, 'plugin_download_count', HOUR_IN_SECONDS ); 287 } 288 289 return (int) $count; 280 return (int)get_post_meta( $post->ID, 'downloads', true ); 290 281 } 291 282
Note: See TracChangeset
for help on using the changeset viewer.