Changeset 48666
- Timestamp:
- 07/28/2020 04:05:39 PM (5 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-plugin-upgrader.php
r48446 r48666 442 442 } 443 443 444 $requires_php = isset( $info['RequiresPHP'] ) ? $info['RequiresPHP'] : null; 445 $requires_wp = isset( $info['RequiresWP'] ) ? $info['RequiresWP'] : null; 446 447 if ( ! is_php_version_compatible( $requires_php ) ) { 448 $error = sprintf( 449 /* translators: 1: Current PHP version, 2: Version required by the uploaded plugin. */ 450 __( 'The PHP version on your server is %1$s, however the uploaded plugin requires %2$s.' ), 451 phpversion(), 452 $requires_php 453 ); 454 455 return new WP_Error( 'incompatible_php_required_version', $this->strings['incompatible_archive'], $error ); 456 } 457 458 if ( ! is_wp_version_compatible( $requires_wp ) ) { 459 $error = sprintf( 460 /* translators: 1: Current WordPress version, 2: Version required by the uploaded plugin. */ 461 __( 'Your WordPress version is %1$s, however the uploaded plugin requires %2$s.' ), 462 $GLOBALS['wp_version'], 463 $requires_wp 464 ); 465 466 return new WP_Error( 'incompatible_wp_required_version', $this->strings['incompatible_archive'], $error ); 467 } 468 444 469 return $source; 445 470 } -
trunk/src/wp-admin/includes/class-theme-installer-skin.php
r48661 r48666 222 222 echo '<h2 class="update-from-upload-heading">' . esc_html( __( 'This theme is already installed.' ) ) . '</h2>'; 223 223 224 // Check errors for current theme 224 // Check errors for current theme. 225 225 if ( is_wp_error( $current_theme_data->errors() ) ) { 226 226 $this->feedback( 'current_theme_has_errors', $current_theme_data->errors()->get_error_message() ); -
trunk/src/wp-admin/includes/class-theme-upgrader.php
r48493 r48666 589 589 } 590 590 591 $requires_php = isset( $info['RequiresPHP'] ) ? $info['RequiresPHP'] : null; 592 $requires_wp = isset( $info['RequiresWP'] ) ? $info['RequiresWP'] : null; 593 594 if ( ! is_php_version_compatible( $requires_php ) ) { 595 $error = sprintf( 596 /* translators: 1: Current PHP version, 2: Version required by the uploaded theme. */ 597 __( 'The PHP version on your server is %1$s, however the uploaded theme requires %2$s.' ), 598 phpversion(), 599 $requires_php 600 ); 601 602 return new WP_Error( 'incompatible_php_required_version', $this->strings['incompatible_archive'], $error ); 603 } 604 if ( ! is_wp_version_compatible( $requires_wp ) ) { 605 $error = sprintf( 606 /* translators: 1: Current WordPress version, 2: Version required by the uploaded theme. */ 607 __( 'Your WordPress version is %1$s, however the uploaded theme requires %2$s.' ), 608 $GLOBALS['wp_version'], 609 $requires_wp 610 ); 611 612 return new WP_Error( 'incompatible_wp_required_version', $this->strings['incompatible_archive'], $error ); 613 } 614 591 615 $this->new_theme_data = $info; 616 592 617 return $source; 593 618 }
Note: See TracChangeset
for help on using the changeset viewer.