Changeset 4201
- Timestamp:
- 10/07/2016 06:37:32 AM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 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 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-meta.php
r4182 r4201 56 56 </li> 57 57 <li><?php printf( __( 'Active installs: %s', 'wporg-plugins' ), '<strong>' . Template::active_installs( false ) . '</strong>' ); ?></li> 58 <li><?php printf( __( 'Tested up to: %s', 'wporg-plugins' ), '<strong>' . (string) get_post_meta( $post->ID, 'tested', true ) . '</strong>' ); ?></li> 58 <?php if ( $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true ) ) { ?> 59 <li><?php printf( __( 'Tested up to: %s', 'wporg-plugins' ), '<strong>' . $tested_up_to . '</strong>' ); ?></li> 60 <?php } ?> 59 61 <?php if ( $tags = get_the_term_list( $post->ID, 'plugin_tags', '<div class="tags">', '', '</div>' ) ) : ?> 60 62 <li><?php printf( _n( 'Tag: %s', 'Tags: %s', count( get_the_terms( $post, 'plugin_tags' ) ), 'wporg-plugins' ), $tags ); ?></li>
Note: See TracChangeset
for help on using the changeset viewer.