Changeset 5841
- Timestamp:
- 08/25/2017 08:17:03 AM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-custom-fields.php
r2983 r5841 15 15 'tested' => 'Tested With', 16 16 'requires' => 'Requires', 17 'requires_php' => 'Requires PHP', 17 18 'donate_link' => 'Donate URL', 18 19 'header_plugin_uri' => 'Plugin URI', -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.php
r5473 r5841 100 100 $result['requires'] = get_post_meta( $post_id, 'requires', true ) ?: false; 101 101 $result['tested'] = get_post_meta( $post_id, 'tested', true ) ?: false; 102 $result['requires_php'] = get_post_meta( $post_id, 'requires_php', true ) ?: false; 102 103 $result['compatibility'] = array(); 103 104 $result['rating'] = ( get_post_meta( $post_id, 'rating', true ) ?: 0 ) * 20; // Stored as 0.0 ~ 5.0, API outputs as 0..100 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r5725 r5841 365 365 register_meta( 'post', 'requires', array( 366 366 'description' => __( 'The minimum version of WordPress the plugin needs to run.', 'wporg-plugins' ), 367 'single' => true, 368 // TODO 'sanitize_callback' => 'absint', 369 'show_in_rest' => true, 370 ) ); 371 372 register_meta( 'post', 'requires_php', array( 373 'description' => __( 'The minimum version of PHP the plugin needs to run.', 'wporg-plugins' ), 367 374 'single' => true, 368 375 // TODO 'sanitize_callback' => 'absint', -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
r5449 r5841 26 26 'tested', 27 27 'requires', 28 'requires_php', 28 29 'donate_link', 29 30 'license', -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-api-update-updater.php
r5449 r5841 72 72 'tested' => get_post_meta( $post->ID, 'tested', true ), 73 73 'requires' => get_post_meta( $post->ID, 'requires', true ), 74 'requires_php' => get_post_meta( $post->ID, 'requires_php', true ), 74 75 'upgrade_notice' => '', 75 76 'last_updated' => $post->post_modified, … … 123 124 `tested` varchar(128) NOT NULL DEFAULT '', 124 125 `requires` varchar(128) NOT NULL DEFAULT '', 126 `requires_php` varchar(128) NOT NULL DEFAULT '', 125 127 `upgrade_notice` text, 126 128 `last_updated` datetime NOT NULL, -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-parser.php
r5565 r5841 31 31 */ 32 32 public $tested = ''; 33 34 /** 35 * @var string 36 */ 37 public $requires_php = ''; 33 38 34 39 /** … … 118 123 'requires' => 'requires', 119 124 'requires at least' => 'requires', 125 'requires php' => 'requires_php', 120 126 'tags' => 'tags', 121 127 'contributors' => 'contributors', … … 227 233 if ( ! empty( $headers['tested'] ) ) { 228 234 $this->tested = $headers['tested']; 235 } 236 if ( ! empty( $headers['requires_php'] ) ) { 237 $this->requires_php = $headers['requires_php']; 229 238 } 230 239 if ( ! empty( $headers['contributors'] ) ) { -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php
r4261 r5841 76 76 $warnings[] = sprintf( __( '%s is missing.', 'wporg-plugins' ), '<code>Tested up to</code>' ); 77 77 } 78 if ( empty( $readme->requires_php ) ) { 79 /* Translators: Plugin header tag; */ 80 $warnings[] = sprintf( __( '%s is missing.', 'wporg-plugins' ), '<code>Requires PHP</code>' ); 81 } 78 82 if ( empty( $readme->stable_tag ) ) { 79 83 /* Translators: 1: Plugin header tag; 2: SVN directory; 3: Plugin header tag; */ -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
r5708 r5841 217 217 'tested' => $readme->tested, 218 218 'requires' => $readme->requires, 219 'requires_php' => $readme->requires_php, 219 220 'stable_tag' => $readme->stable_tag, 220 221 'upgrade_notice' => $readme->upgrade_notice, -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api-request.php
r5383 r5841 27 27 'reviews' => false, 28 28 'requires' => false, 29 'requires_php' => false, 29 30 'sections' => false, 30 31 'short_description' => false, … … 46 47 'ratings' => true, 47 48 'requires' => true, 49 'requires_php' => true, 48 50 'sections' => true, 49 51 'tags' => true, … … 63 65 'ratings' => true, 64 66 'requires' => true, 67 'requires_php' => true, 65 68 'sections' => true, 66 69 'short_description' => true, -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tests/phpunit/tests/wporg-plugin-api-performance.php
r5008 r5841 25 25 'tested' => true, 26 26 'requires' => true, 27 'requires_php' => true, 27 28 'rating' => true, 28 29 'ratings' => true, -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tests/phpunit/tests/wporg-plugin-api.php
r4900 r5841 24 24 'tested' => true, 25 25 'requires' => true, 26 'requires_php' => true, 26 27 'rating' => true, 27 28 'ratings' => true, … … 242 243 $this->assertAttributeInternalType( 'string', 'tested', $plugin_info, 'Tested should be a string' ); 243 244 } 245 $this->assertObjectHasAttribute( 'requires_php', $plugin_info, 'Requires PHP exists' ); 244 246 $this->assertObjectHasAttribute( 'compatibility', $plugin_info, 'Compatibility exists' ); 245 247 $this->assertAttributeInternalType( 'array', 'compatibility', $plugin_info, 'Compatibility should be an array' ); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-meta.php
r5566 r5841 50 50 <li><?php printf( __( 'Active installs: %s', 'wporg-plugins' ), '<strong>' . Template::active_installs( false ) . '</strong>' ); ?></li> 51 51 52 52 <?php if ( $requires = (string) get_post_meta( $post->ID, 'requires', true ) ) : ?> 53 53 <li><?php 54 54 _e( 'Requires WordPress Version:', 'wporg-plugins' ); 55 55 echo '<strong>' . esc_html( $requires ) . '</strong>'; 56 56 ?></li> 57 <?php endif; ?> 58 59 57 <?php endif; ?> 60 58 61 59 <?php if ( $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true ) ) : ?> 62 60 <li><?php printf( __( 'Tested up to: %s', 'wporg-plugins' ), '<strong>' . $tested_up_to . '</strong>' ); ?></li> 61 <?php endif; ?> 62 63 <?php if ( $requires_php = (string) get_post_meta( $post->ID, 'requires_php', true ) ) : ?> 64 <li><?php 65 _e( 'Requires PHP Version:', 'wporg-plugins' ); 66 echo '<strong>' . esc_html( $requires_php ) . '</strong>'; 67 ?></li> 63 68 <?php endif; ?> 64 69
Note: See TracChangeset
for help on using the changeset viewer.