Changeset 52998
- Timestamp:
- 03/27/2022 02:53:21 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-theme-upgrader.php
r52978 r52998 617 617 * @since 2.8.0 618 618 * 619 * @param bool|WP_Error $re turn Upgrade offer return.620 * @param array $theme Theme arguments.621 * @return bool|WP_Error The passed in $return paramor WP_Error.622 */ 623 public function current_before( $re turn, $theme ) {624 if ( is_wp_error( $re turn) ) {625 return $re turn;619 * @param bool|WP_Error $response The installation response before the installation has started. 620 * @param array $theme Theme arguments. 621 * @return bool|WP_Error The original `$response` parameter or WP_Error. 622 */ 623 public function current_before( $response, $theme ) { 624 if ( is_wp_error( $response ) ) { 625 return $response; 626 626 } 627 627 628 628 $theme = isset( $theme['theme'] ) ? $theme['theme'] : ''; 629 629 630 // Only run if active theme 630 // Only run if active theme. 631 631 if ( get_stylesheet() !== $theme ) { 632 return $re turn;632 return $response; 633 633 } 634 634 … … 638 638 } 639 639 640 return $re turn;640 return $response; 641 641 } 642 642 … … 649 649 * @since 2.8.0 650 650 * 651 * @param bool|WP_Error $re turn Upgrade offer return.652 * @param array $theme Theme arguments.653 * @return bool|WP_Error The passed in $return paramor WP_Error.654 */ 655 public function current_after( $re turn, $theme ) {656 if ( is_wp_error( $re turn) ) {657 return $re turn;651 * @param bool|WP_Error $response The installation response after the installation has finished. 652 * @param array $theme Theme arguments. 653 * @return bool|WP_Error The original `$response` parameter or WP_Error. 654 */ 655 public function current_after( $response, $theme ) { 656 if ( is_wp_error( $response ) ) { 657 return $response; 658 658 } 659 659 … … 662 662 // Only run if active theme. 663 663 if ( get_stylesheet() !== $theme ) { 664 return $re turn;664 return $response; 665 665 } 666 666 … … 676 676 $this->maintenance_mode( false ); 677 677 } 678 return $re turn;678 return $response; 679 679 } 680 680
Note: See TracChangeset
for help on using the changeset viewer.