Changeset 45590 for trunk/src/wp-includes/update.php
- Timestamp:
- 07/02/2019 11:41:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/update.php
r45412 r45590 133 133 } 134 134 135 $url = $http_url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' ); 136 if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) { 135 $url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' ); 136 $http_url = $url; 137 $ssl = wp_http_supports( array( 'ssl' ) ); 138 if ( $ssl ) { 137 139 $url = set_url_scheme( $url, 'https' ); 138 140 } … … 369 371 } 370 372 371 $url = $http_url = 'http://api.wordpress.org/plugins/update-check/1.1/'; 372 if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) { 373 $url = 'http://api.wordpress.org/plugins/update-check/1.1/'; 374 $http_url = $url; 375 $ssl = wp_http_supports( array( 'ssl' ) ); 376 if ( $ssl ) { 373 377 $url = set_url_scheme( $url, 'https' ); 374 378 } … … 448 452 } 449 453 450 $themes = $checked = $request = array(); 454 $themes = array(); 455 $checked = array(); 456 $request = array(); 451 457 452 458 // Put slug of current theme into request. … … 554 560 } 555 561 556 $url = $http_url = 'http://api.wordpress.org/themes/update-check/1.1/'; 557 if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) { 562 $url = 'http://api.wordpress.org/themes/update-check/1.1/'; 563 $http_url = $url; 564 $ssl = wp_http_supports( array( 'ssl' ) ); 565 if ( $ssl ) { 558 566 $url = set_url_scheme( $url, 'https' ); 559 567 } … … 645 653 ); 646 654 647 if ( $plugins = current_user_can( 'update_plugins' ) ) { 655 $plugins = current_user_can( 'update_plugins' ); 656 if ( $plugins ) { 648 657 $update_plugins = get_site_transient( 'update_plugins' ); 649 658 if ( ! empty( $update_plugins->response ) ) { … … 652 661 } 653 662 654 if ( $themes = current_user_can( 'update_themes' ) ) { 663 $themes = current_user_can( 'update_themes' ); 664 if ( $themes ) { 655 665 $update_themes = get_site_transient( 'update_themes' ); 656 666 if ( ! empty( $update_themes->response ) ) { … … 659 669 } 660 670 661 if ( ( $core = current_user_can( 'update_core' ) ) && function_exists( 'get_core_updates' ) ) { 671 $core = current_user_can( 'update_core' ); 672 if ( $core && function_exists( 'get_core_updates' ) ) { 662 673 $update_wordpress = get_core_updates( array( 'dismissed' => false ) ); 663 674 if ( ! empty( $update_wordpress ) && ! in_array( $update_wordpress[0]->response, array( 'development', 'latest' ) ) && current_user_can( 'update_core' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.