Make WordPress Core

Ticket #52813: 52813.2.diff

File 52813.2.diff, 3.9 KB (added by desrosj, 2 years ago)
  • src/wp-includes/link-template.php

     
    34293429         * Filters the admin area URL.
    34303430         *
    34313431         * @since 2.8.0
     3432         * @since 5.8.0 The `$scheme` parameter was added.
    34323433         *
    3433          * @param string   $url     The complete admin area URL including scheme and path.
    3434          * @param string   $path    Path relative to the admin area URL. Blank string if no path is specified.
    3435          * @param int|null $blog_id Site ID, or null for the current site.
     3434         * @param string      $url     The complete admin area URL including scheme and path.
     3435         * @param string      $path    Path relative to the admin area URL. Blank string if no path is specified.
     3436         * @param int|null    $blog_id Site ID, or null for the current site.
     3437         * @param string|null $scheme  The scheme to use. Accepts 'http', 'https',
     3438         *                             'admin', or null. Default 'admin', which obeys force_ssl_admin() and is_ssl().
    34363439         */
    3437         return apply_filters( 'admin_url', $url, $path, $blog_id );
     3440        return apply_filters( 'admin_url', $url, $path, $blog_id, $scheme );
    34383441}
    34393442
    34403443/**
     
    34583461         * Filters the URL to the includes directory.
    34593462         *
    34603463         * @since 2.8.0
     3464         * @since 5.8.0 The `$scheme` parameter was added.
    34613465         *
    3462          * @param string $url  The complete URL to the includes directory including scheme and path.
    3463          * @param string $path Path relative to the URL to the wp-includes directory. Blank string
    3464          *                     if no path is specified.
     3466         * @param string      $url    The complete URL to the includes directory including scheme and path.
     3467         * @param string      $path   Path relative to the URL to the wp-includes directory. Blank string
     3468         *                            if no path is specified.
     3469         * @param string|null $scheme Scheme to give the includes URL context. Accepts
     3470         *                            'http', 'https', 'relative', or null. Default null.
    34653471         */
    3466         return apply_filters( 'includes_url', $url, $path );
     3472        return apply_filters( 'includes_url', $url, $path, $scheme );
    34673473}
    34683474
    34693475/**
     
    36683674         * Filters the network admin URL.
    36693675         *
    36703676         * @since 3.0.0
     3677         * @since 5.8.0 The `$scheme` parameter was added.
    36713678         *
    3672          * @param string $url  The complete network admin URL including scheme and path.
    3673          * @param string $path Path relative to the network admin URL. Blank string if
    3674          *                     no path is specified.
     3679         * @param string      $url    The complete network admin URL including scheme and path.
     3680         * @param string      $path   Path relative to the network admin URL. Blank string if
     3681         *                            no path is specified.
     3682         * @param string|null $scheme The scheme to use. Accepts 'http', 'https',
     3683         *                            'admin', or null. Default is 'admin', which obeys force_ssl_admin() and is_ssl().
    36753684         */
    3676         return apply_filters( 'network_admin_url', $url, $path );
     3685        return apply_filters( 'network_admin_url', $url, $path, $scheme );
    36773686}
    36783687
    36793688/**
     
    36973706         * Filters the user admin URL for the current user.
    36983707         *
    36993708         * @since 3.1.0
     3709         * @since 5.8.0 The `$scheme` parameter was added.
    37003710         *
    3701          * @param string $url  The complete URL including scheme and path.
    3702          * @param string $path Path relative to the URL. Blank string if
    3703          *                     no path is specified.
     3711         * @param string      $url    The complete URL including scheme and path.
     3712         * @param string      $path   Path relative to the URL. Blank string if
     3713         *                            no path is specified.
     3714         * @param string|null $scheme The scheme to use. Accepts 'http', 'https',
     3715         *                            'admin', or null. Default is 'admin', which obeys force_ssl_admin() and is_ssl().
    37043716         */
    3705         return apply_filters( 'user_admin_url', $url, $path );
     3717        return apply_filters( 'user_admin_url', $url, $path, $scheme );
    37063718}
    37073719
    37083720/**