Changeset 9299 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php
- Timestamp:
- 11/26/2019 04:20:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php
r8558 r9299 935 935 // Fall through to include both Themes and Plugins 936 936 case 'wp-themes': 937 // Theme favorites are stored as theme slugs, these map 1:1 to GlotPress projects 937 // Theme favorites are stored as theme slugs, these map 1:1 to GlotPress projects. 938 938 $theme_favorites = array_map( function( $slug ) { 939 939 return "wp-themes/$slug"; … … 945 945 946 946 case 'wp-plugins': 947 // Plugin favorites are stored as topic ID's 948 $plugin_fav_ids = array_keys( (array) get_user_meta( $user_id, PLUGINS_TABLE_PREFIX . 'plugin_favorite', true ) ); 949 $plugin_fav_slugs = array(); 950 if ( $plugin_fav_ids ) { 951 $plugin_fav_ids = implode( ',', array_map( 'intval', $plugin_fav_ids ) ); 952 $plugin_fav_slugs = $wpdb->get_col( "SELECT topic_slug FROM " . PLUGINS_TABLE_PREFIX . "topics WHERE topic_id IN( $plugin_fav_ids )" ); 953 } 954 947 // Plugin favorites are stored as plugin slugs, these map 1:1 to GlotPress projects. 955 948 $plugin_favorites = array_map( function( $slug ) { 956 949 return "wp-plugins/$slug"; 957 }, $plugin_fav_slugs);950 }, (array) get_user_meta( $user_id, 'plugin_favorites', true ) ); 958 951 959 952 if ( 'wp-plugins' === $project_slug ) {
Note: See TracChangeset
for help on using the changeset viewer.