WordPress.org

Make WordPress Core

Changeset 28894


Ignore:
Timestamp:
06/29/2014 11:31:25 AM (6 years ago)
Author:
johnbillion
Message:

Introduce is_https_url() for testing whether the scheme for a given URL is https. See #28487.

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r28882 r28894  
    33613361
    33623362/**
     3363 * Determine if the scheme of the given URL is https.
     3364 *
     3365 * @since 4.0.0
     3366 *
     3367 * @param  string  $url The URL
     3368 * @return boolean      True if the given URL uses https, false if not (or if the URL is not valid).
     3369 */
     3370function is_https_url( $url ) {
     3371    return ( 'https' === parse_url( $url, PHP_URL_SCHEME ) );
     3372}
     3373
     3374/**
    33633375 * Whether SSL login should be forced.
    33643376 *
Note: See TracChangeset for help on using the changeset viewer.