Changeset 4201 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
- Timestamp:
- 10/07/2016 06:37:32 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r4197 r4201 865 865 break; 866 866 867 case 'tested': 868 // For the tested field, we bump up the minor release to the latest compatible minor release. 869 if ( function_exists( 'wporg_get_version_equivalents' ) ) { 870 871 // As we're on a pre-filter, we'll have to detach, fetch and reattach.. 872 remove_filter( 'get_post_metadata', array( $this, 'filter_shim_postmeta' ) ); 873 $value = get_metadata( 'post', $object_id, $meta_key ); 874 add_filter( 'get_post_metadata', array( $this, 'filter_shim_postmeta' ), 10, 3 ); 875 876 foreach ( wporg_get_version_equivalents() as $latest_compatible_version => $compatible_with ) { 877 if ( in_array( (string)$value[0], $compatible_with, true ) ) { 878 $value[0] = $latest_compatible_version; 879 break; 880 } 881 } 882 } 883 break; 884 867 885 case false: 868 886 … … 876 894 add_filter( 'get_post_metadata', array( $this, 'filter_shim_postmeta' ), 10, 3 ); 877 895 878 $custom_meta_fields = array( 'downloads', 'rating', 'ratings' );896 $custom_meta_fields = array( 'downloads', 'rating', 'ratings', 'tested' ); 879 897 $custom_meta_fields = apply_filters( 'wporg_plugins_custom_meta_fields', $custom_meta_fields, $object_id ); 880 898
Note: See TracChangeset
for help on using the changeset viewer.