Docs: Improve parameter types for various URL functions and filters that also accept `null`.
See #51800. Built from https://develop.svn.wordpress.org/trunk@50340 git-svn-id: http://core.svn.wordpress.org/trunk@49951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
96edb89edb
commit
4491708fd1
|
@ -3255,7 +3255,7 @@ function home_url( $path = '', $scheme = null ) {
|
||||||
*
|
*
|
||||||
* @global string $pagenow
|
* @global string $pagenow
|
||||||
*
|
*
|
||||||
* @param int $blog_id Optional. Site ID. Default null (current site).
|
* @param int|null $blog_id Optional. Site ID. Default null (current site).
|
||||||
* @param string $path Optional. Path relative to the home URL. Default empty.
|
* @param string $path Optional. Path relative to the home URL. Default empty.
|
||||||
* @param string|null $scheme Optional. Scheme to give the home URL context. Accepts
|
* @param string|null $scheme Optional. Scheme to give the home URL context. Accepts
|
||||||
* 'http', 'https', 'relative', 'rest', or null. Default null.
|
* 'http', 'https', 'relative', 'rest', or null. Default null.
|
||||||
|
@ -3312,8 +3312,8 @@ function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param string $path Optional. Path relative to the site URL. Default empty.
|
* @param string $path Optional. Path relative to the site URL. Default empty.
|
||||||
* @param string $scheme Optional. Scheme to give the site URL context. See set_url_scheme().
|
* @param string|null $scheme Optional. Scheme to give the site URL context. See set_url_scheme().
|
||||||
* @return string Site URL link with optional path appended.
|
* @return string Site URL link with optional path appended.
|
||||||
*/
|
*/
|
||||||
function site_url( $path = '', $scheme = null ) {
|
function site_url( $path = '', $scheme = null ) {
|
||||||
|
@ -3330,11 +3330,11 @@ function site_url( $path = '', $scheme = null ) {
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param int $blog_id Optional. Site ID. Default null (current site).
|
* @param int|null $blog_id Optional. Site ID. Default null (current site).
|
||||||
* @param string $path Optional. Path relative to the site URL. Default empty.
|
* @param string $path Optional. Path relative to the site URL. Default empty.
|
||||||
* @param string $scheme Optional. Scheme to give the site URL context. Accepts
|
* @param string|null $scheme Optional. Scheme to give the site URL context. Accepts
|
||||||
* 'http', 'https', 'login', 'login_post', 'admin', or
|
* 'http', 'https', 'login', 'login_post', 'admin', or
|
||||||
* 'relative'. Default null.
|
* 'relative'. Default null.
|
||||||
* @return string Site URL link with optional path appended.
|
* @return string Site URL link with optional path appended.
|
||||||
*/
|
*/
|
||||||
function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
|
function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
|
||||||
|
@ -3371,7 +3371,7 @@ function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
|
||||||
*
|
*
|
||||||
* @since 2.6.0
|
* @since 2.6.0
|
||||||
*
|
*
|
||||||
* @param string $path Optional path relative to the admin URL.
|
* @param string $path Optional. Path relative to the admin URL. Default 'admin'.
|
||||||
* @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl().
|
* @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl().
|
||||||
* 'http' or 'https' can be passed to force those schemes.
|
* 'http' or 'https' can be passed to force those schemes.
|
||||||
* @return string Admin URL link with optional path appended.
|
* @return string Admin URL link with optional path appended.
|
||||||
|
@ -3385,11 +3385,11 @@ function admin_url( $path = '', $scheme = 'admin' ) {
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param int $blog_id Optional. Site ID. Default null (current site).
|
* @param int|null $blog_id Optional. Site ID. Default null (current site).
|
||||||
* @param string $path Optional. Path relative to the admin URL. Default empty.
|
* @param string $path Optional. Path relative to the admin URL. Default empty.
|
||||||
* @param string $scheme Optional. The scheme to use. Accepts 'http' or 'https',
|
* @param string $scheme Optional. The scheme to use. Accepts 'http' or 'https',
|
||||||
* to force those schemes. Default 'admin', which obeys
|
* to force those schemes. Default 'admin', which obeys
|
||||||
* force_ssl_admin() and is_ssl().
|
* force_ssl_admin() and is_ssl().
|
||||||
* @return string Admin URL link with optional path appended.
|
* @return string Admin URL link with optional path appended.
|
||||||
*/
|
*/
|
||||||
function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
|
function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
|
||||||
|
@ -3416,9 +3416,9 @@ function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
|
||||||
*
|
*
|
||||||
* @since 2.6.0
|
* @since 2.6.0
|
||||||
*
|
*
|
||||||
* @param string $path Optional. Path relative to the includes URL. Default empty.
|
* @param string $path Optional. Path relative to the includes URL. Default empty.
|
||||||
* @param string $scheme Optional. Scheme to give the includes URL context. Accepts
|
* @param string|null $scheme Optional. Scheme to give the includes URL context. Accepts
|
||||||
* 'http', 'https', or 'relative'. Default null.
|
* 'http', 'https', or 'relative'. Default null.
|
||||||
* @return string Includes URL link with optional path appended.
|
* @return string Includes URL link with optional path appended.
|
||||||
*/
|
*/
|
||||||
function includes_url( $path = '', $scheme = null ) {
|
function includes_url( $path = '', $scheme = null ) {
|
||||||
|
@ -3531,9 +3531,9 @@ function plugins_url( $path = '', $plugin = '' ) {
|
||||||
*
|
*
|
||||||
* @see set_url_scheme()
|
* @see set_url_scheme()
|
||||||
*
|
*
|
||||||
* @param string $path Optional. Path relative to the site URL. Default empty.
|
* @param string $path Optional. Path relative to the site URL. Default empty.
|
||||||
* @param string $scheme Optional. Scheme to give the site URL context. Accepts
|
* @param string|null $scheme Optional. Scheme to give the site URL context. Accepts
|
||||||
* 'http', 'https', or 'relative'. Default null.
|
* 'http', 'https', or 'relative'. Default null.
|
||||||
* @return string Site URL link with optional path appended.
|
* @return string Site URL link with optional path appended.
|
||||||
*/
|
*/
|
||||||
function network_site_url( $path = '', $scheme = null ) {
|
function network_site_url( $path = '', $scheme = null ) {
|
||||||
|
@ -3576,9 +3576,9 @@ function network_site_url( $path = '', $scheme = null ) {
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param string $path Optional. Path relative to the home URL. Default empty.
|
* @param string $path Optional. Path relative to the home URL. Default empty.
|
||||||
* @param string $scheme Optional. Scheme to give the home URL context. Accepts
|
* @param string|null $scheme Optional. Scheme to give the home URL context. Accepts
|
||||||
* 'http', 'https', or 'relative'. Default null.
|
* 'http', 'https', or 'relative'. Default null.
|
||||||
* @return string Home URL link with optional path appended.
|
* @return string Home URL link with optional path appended.
|
||||||
*/
|
*/
|
||||||
function network_home_url( $path = '', $scheme = null ) {
|
function network_home_url( $path = '', $scheme = null ) {
|
||||||
|
|
|
@ -385,9 +385,9 @@ function rest_get_url_prefix() {
|
||||||
* @todo Check if this is even necessary
|
* @todo Check if this is even necessary
|
||||||
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
|
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
|
||||||
*
|
*
|
||||||
* @param int $blog_id Optional. Blog ID. Default of null returns URL for current blog.
|
* @param int|null $blog_id Optional. Blog ID. Default of null returns URL for current blog.
|
||||||
* @param string $path Optional. REST route. Default '/'.
|
* @param string $path Optional. REST route. Default '/'.
|
||||||
* @param string $scheme Optional. Sanitization scheme. Default 'rest'.
|
* @param string $scheme Optional. Sanitization scheme. Default 'rest'.
|
||||||
* @return string Full URL to the endpoint.
|
* @return string Full URL to the endpoint.
|
||||||
*/
|
*/
|
||||||
function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) {
|
function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) {
|
||||||
|
@ -441,10 +441,10 @@ function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) {
|
||||||
*
|
*
|
||||||
* @since 4.4.0
|
* @since 4.4.0
|
||||||
*
|
*
|
||||||
* @param string $url REST URL.
|
* @param string $url REST URL.
|
||||||
* @param string $path REST route.
|
* @param string $path REST route.
|
||||||
* @param int $blog_id Blog ID.
|
* @param int|null $blog_id Blog ID.
|
||||||
* @param string $scheme Sanitization scheme.
|
* @param string $scheme Sanitization scheme.
|
||||||
*/
|
*/
|
||||||
return apply_filters( 'rest_url', $url, $path, $blog_id, $scheme );
|
return apply_filters( 'rest_url', $url, $path, $blog_id, $scheme );
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.7-beta2-50339';
|
$wp_version = '5.7-beta2-50340';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue