[wp-trac] [WordPress Trac] #48407: Change link to api.wordpress.org to HTTPS

WordPress Trac noreply at wordpress.org
Wed Oct 23 10:09:09 UTC 2019


#48407: Change  link to api.wordpress.org to HTTPS
----------------------------+------------------------------
 Reporter:  lenasterg       |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:  trunk
 Severity:  trivial         |  Resolution:
 Keywords:  2nd-opinion     |     Focuses:  administration
----------------------------+------------------------------
Changes (by sebastienserre):

 * keywords:   => 2nd-opinion
 * focuses:   => administration


Comment:

 Hello @lenasterg
 I think it's OK as the complete part of code is:
 {{{#!php
 <?php
                 $url     = 'http://api.wordpress.org/core/browse-
 happy/1.1/';
                 $options = array(
                         'body'       => array( 'useragent' =>
 $_SERVER['HTTP_USER_AGENT'] ),
                         'user-agent' => 'WordPress/' . $wp_version . '; '
 . home_url( '/' ),
                 );

                 if ( wp_http_supports( array( 'ssl' ) ) ) {
                         $url = set_url_scheme( $url, 'https' );
                 }
 }}}
 If I've well understood, `$url = set_url_scheme( $url, 'https' );` should
 return https if needed.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48407#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list