Changeset 51300
- Timestamp:
- 07/01/2021 09:11:48 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r50979 r51300 734 734 * @see wp_handle_upload_error 735 735 * 736 * @param string[] $file Reference to a single element of `$_FILES`. 737 * Call the function once for each uploaded file. 738 * @param array|false $overrides { 736 * @param array $file { 737 * Reference to a single element from `$_FILES`. Call the function once for each uploaded file. 738 * 739 * @type string $name The original name of the file on the client machine. 740 * @type string $type The mime type of the file, if the browser provided this information. 741 * @type string $tmp_name The temporary filename of the file in which the uploaded file was stored on the server. 742 * @type int $size The size, in bytes, of the uploaded file. 743 * @type int $error The error code associated with this file upload. 744 * } 745 * @param array|false $overrides { 739 746 * An array of override parameters for this file, or boolean false if none are provided. 740 747 * … … 750 757 * @type string[] $mimes Array of allowed mime types keyed by their file extension regex. 751 758 * } 752 * @param string $time Time formatted in 'yyyy/mm'. 753 * @param string $action Expected value for `$_POST['action']`. 754 * @return string[] On success, returns an associative array of file attributes. 755 * On failure, returns `$overrides['upload_error_handler']( &$file, $message )` 756 * or `array( 'error' => $message )`. 759 * @param string $time Time formatted in 'yyyy/mm'. 760 * @param string $action Expected value for `$_POST['action']`. 761 * @return array { 762 * On success, returns an associative array of file attributes. 763 * On failure, returns `$overrides['upload_error_handler']( &$file, $message )` 764 * or `array( 'error' => $message )`. 765 * 766 * @type string $file Filename of the newly-uploaded file. 767 * @type string $url URL of the newly-uploaded file. 768 * @type string $type Mime type of the newly-uploaded file. 769 * } 757 770 */ 758 771 function _wp_handle_upload( &$file, $overrides, $time, $action ) { … … 777 790 * @since 4.0.0 Converted to a dynamic hook with `$action`. 778 791 * 779 * @param string[] $file An array of data for the file. Reference to a single element of `$_FILES`. 792 * @param array $file { 793 * Reference to a single element from `$_FILES`. 794 * 795 * @type string $name The original name of the file on the client machine. 796 * @type string $type The mime type of the file, if the browser provided this information. 797 * @type string $tmp_name The temporary filename of the file in which the uploaded file was stored on the server. 798 * @type int $size The size, in bytes, of the uploaded file. 799 * @type int $error The error code associated with this file upload. 800 * } 780 801 */ 781 802 $file = apply_filters( "{$action}_prefilter", $file ); … … 795 816 * @param array|false $overrides An array of override parameters for this file. Boolean false if none are 796 817 * provided. @see _wp_handle_upload(). 797 * @param string[] $file An array of data for the file. Reference to a single element of `$_FILES`. 818 * @param array $file { 819 * Reference to a single element from `$_FILES`. 820 * 821 * @type string $name The original name of the file on the client machine. 822 * @type string $type The mime type of the file, if the browser provided this information. 823 * @type string $tmp_name The temporary filename of the file in which the uploaded file was stored on the server. 824 * @type int $size The size, in bytes, of the uploaded file. 825 * @type int $error The error code associated with this file upload. 826 * } 798 827 */ 799 828 $overrides = apply_filters( "{$action}_overrides", $overrides, $file ); … … 936 965 * 937 966 * @param mixed $move_new_file If null (default) move the file after the upload. 938 * @param string[] $file An array of data for a single file. 967 * @param array $file { 968 * Reference to a single element from `$_FILES`. 969 * 970 * @type string $name The original name of the file on the client machine. 971 * @type string $type The mime type of the file, if the browser provided this information. 972 * @type string $tmp_name The temporary filename of the file in which the uploaded file was stored on the server. 973 * @type int $size The size, in bytes, of the uploaded file. 974 * @type int $error The error code associated with this file upload. 975 * } 939 976 * @param string $new_file Filename of the newly-uploaded file. 940 977 * @param string $type Mime type of the newly-uploaded file. … … 1018 1055 * @param array $file Reference to a single element of `$_FILES`. 1019 1056 * Call the function once for each uploaded file. 1057 * See _wp_handle_upload() for accepted values. 1020 1058 * @param array|false $overrides Optional. An associative array of names => values 1021 1059 * to override default variables. Default false. 1060 * See _wp_handle_upload() for accepted values. 1022 1061 * @param string $time Optional. Time formatted in 'yyyy/mm'. Default null. 1023 * @return array On success, returns an associative array of file attributes. 1024 * On failure, returns `$overrides['upload_error_handler']( &$file, $message )` 1025 * or `array( 'error' => $message )`. 1062 * @return array See _wp_handle_upload() for return value. 1026 1063 */ 1027 1064 function wp_handle_upload( &$file, $overrides = false, $time = null ) { … … 1049 1086 * @param array $file Reference to a single element of `$_FILES`. 1050 1087 * Call the function once for each uploaded file. 1088 * See _wp_handle_upload() for accepted values. 1051 1089 * @param array|false $overrides Optional. An associative array of names => values 1052 1090 * to override default variables. Default false. 1091 * See _wp_handle_upload() for accepted values. 1053 1092 * @param string $time Optional. Time formatted in 'yyyy/mm'. Default null. 1054 * @return array On success, returns an associative array of file attributes. 1055 * On failure, returns `$overrides['upload_error_handler']( &$file, $message )` 1056 * or `array( 'error' => $message )`. 1093 * @return array See _wp_handle_upload() for return value. 1057 1094 */ 1058 1095 function wp_handle_sideload( &$file, $overrides = false, $time = null ) { -
trunk/src/wp-includes/block-supports/elements.php
r51299 r51300 13 13 * @access private 14 14 * 15 * @param string $block_content Rendered block content.16 * @param array $block Block object.17 * @return string Filtered block content.15 * @param string $block_content Rendered block content. 16 * @param array $block Block object. 17 * @return string Filtered block content. 18 18 */ 19 19 function wp_render_elements_support( $block_content, $block ) { … … 24 24 25 25 /* 26 27 28 29 30 26 * For now we only care about link color. 27 * This code in the future when we have a public API 28 * should take advantage of WP_Theme_JSON::compute_style_properties 29 * and work for any element and style. 30 */ 31 31 if ( null === $link_color ) { 32 32 return $block_content; -
trunk/src/wp-includes/block-supports/layout.php
r51299 r51300 36 36 * @access private 37 37 * 38 * @param string $block_content Rendered block content.39 * @param array $block Block object.40 * @return string Filtered block content.38 * @param string $block_content Rendered block content. 39 * @param array $block Block object. 40 * @return string Filtered block content. 41 41 */ 42 42 function wp_render_layout_support_flag( $block_content, $block ) { -
trunk/src/wp-includes/block-template-utils.php
r51221 r51300 104 104 * @since 5.8.0 105 105 * 106 * @param string $id Template unique identifier (example: theme_slug//template_slug). 107 * @param string $template_type wp_template. 108 * 106 * @param string $id Template unique identifier (example: theme_slug//template_slug). 107 * @param string $template_type Optional. The template type (post type). Default 'wp_template'. 109 108 * @return WP_Block_Template|null Template. 110 109 */ -
trunk/src/wp-includes/class-http.php
r51299 r51300 111 111 * assumed. Default 'GET'. 112 112 * @type float $timeout How long the connection should stay open in seconds. Default 5. 113 * @type int $redirection Number of allowed redirects. Not supported by all transports .113 * @type int $redirection Number of allowed redirects. Not supported by all transports 114 114 * Default 5. 115 115 * @type string $httpversion Version of the HTTP protocol to use. Accepts '1.0' and '1.1'. -
trunk/src/wp-includes/class-wp-http-requests-hooks.php
r49671 r51300 64 64 * This action maps Requests internal hook to a native WordPress action. 65 65 * 66 * @see https://github.com/ rmccue/Requests/blob/master/docs/hooks.md66 * @see https://github.com/WordPress/Requests/blob/master/docs/hooks.md 67 67 * 68 68 * @since 4.7.0 -
trunk/src/wp-includes/class-wp-query.php
r51299 r51300 19 19 20 20 /** 21 * Query vars set by the user .21 * Query vars set by the user 22 22 * 23 23 * @since 1.5.0 … … 27 27 28 28 /** 29 * Query vars, after parsing .29 * Query vars, after parsing 30 30 * 31 31 * @since 1.5.0 … … 35 35 36 36 /** 37 * Taxonomy query, as passed to get_tax_sql() .37 * Taxonomy query, as passed to get_tax_sql() 38 38 * 39 39 * @since 3.1.0 … … 43 43 44 44 /** 45 * Metadata query container .45 * Metadata query container 46 46 * 47 47 * @since 3.2.0 … … 51 51 52 52 /** 53 * Date query container .53 * Date query container 54 54 * 55 55 * @since 3.7.0 … … 93 93 94 94 /** 95 * The numberof posts for the current query.95 * The amount of posts for the current query. 96 96 * 97 97 * @since 1.5.0 … … 136 136 137 137 /** 138 * The numberof comments for the posts.138 * The amount of comments for the posts. 139 139 * 140 140 * @since 2.2.0 … … 160 160 161 161 /** 162 * The numberof found posts for the current query.162 * The amount of found posts for the current query. 163 163 * 164 164 * If limit clause was not used, equals $post_count. … … 170 170 171 171 /** 172 * The numberof pages.172 * The amount of pages. 173 173 * 174 174 * @since 2.1.0 … … 178 178 179 179 /** 180 * The numberof comment pages.180 * The amount of comment pages. 181 181 * 182 182 * @since 2.7.0 -
trunk/src/wp-includes/class-wp-term-query.php
r51299 r51300 93 93 * Optional. Array or query string of term query parameters. Default empty. 94 94 * 95 * @type string|array $taxonomy Taxonomy name, or array of taxonom ies, to which results should95 * @type string|array $taxonomy Taxonomy name, or array of taxonomy names, to which results should 96 96 * be limited. 97 * @type int|int[] $object_ids O bject ID, or array of object IDs. Results will be97 * @type int|int[] $object_ids Optional. Object ID, or array of object IDs. Results will be 98 98 * limited to terms associated with these objects. 99 99 * @type string $orderby Field(s) to order terms by. Accepts: 100 * * Term fields ('name', 'slug', 'term_group', 'term_id', 'id',100 * * term fields ('name', 'slug', 'term_group', 'term_id', 'id', 101 101 * 'description', 'parent', 'term_order'). Unless `$object_ids` 102 102 * is not empty, 'term_order' is treated the same as 'term_id'. 103 103 * * 'count' to use the number of objects associated with the term. 104 * * 'include' to match the 'order' of the `$include` param. 105 * * 'slug__in' to match the 'order' of the `$slug` param. 106 * * 'meta_value' 107 * * 'meta_value_num'. 108 * * The value of `$meta_key`. 109 * * The array keys of `$meta_query`. 104 * * 'include' to match the 'order' of the $include param. 105 * * 'slug__in' to match the 'order' of the $slug param. 106 * * 'meta_value', 'meta_value_num'. 107 * the value of `$meta_key`. 108 * the array keys of `$meta_query`. 110 109 * * 'none' to omit the ORDER BY clause. 111 * Default 'name'.110 * Defaults to 'name'. 112 111 * @type string $order Whether to order terms in ascending or descending order. 113 112 * Accepts 'ASC' (ascending) or 'DESC' (descending). … … 118 117 * Default empty array. 119 118 * @type int[]|string $exclude Array or comma/space-separated string of term IDs to exclude. 120 * If `$include` is non-empty, `$exclude`is ignored.119 * If $include is non-empty, $exclude is ignored. 121 120 * Default empty array. 122 121 * @type int[]|string $exclude_tree Array or comma/space-separated string of term IDs to exclude 123 * along with all of their descendant terms. If `$include`is124 * non-empty, `$exclude_tree`is ignored. Default empty array.122 * along with all of their descendant terms. If $include is 123 * non-empty, $exclude_tree is ignored. Default empty array. 125 124 * @type int|string $number Maximum number of terms to return. Accepts ''|0 (all) or any 126 125 * positive number. Default ''|0 (all). Note that $number may 127 * not return accurate results when coupled with `$object_ids`.126 * not return accurate results when coupled with $object_ids. 128 127 * See #41796 for details. 129 128 * @type int $offset The number by which to offset the terms query. Default empty. … … 147 146 * @type bool $count Whether to return a term count. If true, will take precedence 148 147 * over `$fields`. Default false. 149 * @type string|array $name Name or array of names to return term(s) for.148 * @type string|array $name Optional. Name or array of names to return term(s) for. 150 149 * Default empty. 151 * @type string|array $slug Slug or array of slugs to return term(s) for.150 * @type string|array $slug Optional. Slug or array of slugs to return term(s) for. 152 151 * Default empty. 153 * @type int|int[] $term_taxonomy_id Term taxonomy ID, or array of term taxonomy IDs,152 * @type int|int[] $term_taxonomy_id Optional. Term taxonomy ID, or array of term taxonomy IDs, 154 153 * to match when querying terms. 155 154 * @type bool $hierarchical Whether to include terms that have non-empty descendants 156 * (even if `$hide_empty`is set to true). Default true.155 * (even if $hide_empty is set to true). Default true. 157 156 * @type string $search Search criteria to match terms. Will be SQL-formatted with 158 157 * wildcards before and after. Default empty. … … 165 164 * Default false. 166 165 * @type string $get Whether to return terms regardless of ancestry or whether the 167 * terms are empty. Accepts 'all' or ''(disabled).168 * Default ''.166 * terms are empty. Accepts 'all' or empty (disabled). 167 * Default empty. 169 168 * @type int $child_of Term ID to retrieve child terms of. If multiple taxonomies 170 169 * are passed, `$child_of` is ignored. Default 0. … … 175 174 * Default false. 176 175 * @type string $cache_domain Unique cache key to be produced when this query is stored in 177 * an object cache. Default 'core'.176 * an object cache. Default is 'core'. 178 177 * @type bool $update_term_meta_cache Whether to prime meta caches for matched terms. Default true. 179 * @type array $meta_query Meta query clauses to limit retrieved terms by.178 * @type array $meta_query Optional. Meta query clauses to limit retrieved terms by. 180 179 * See `WP_Meta_Query`. Default empty. 181 180 * @type string $meta_key Limit terms to those matching a specific metadata key. -
trunk/src/wp-includes/comment-template.php
r51084 r51300 263 263 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's IP address. 264 264 * Default current comment. 265 * @return string Comment author's IP address .265 * @return string Comment author's IP address, or an empty string if it's not available. 266 266 */ 267 267 function get_comment_author_IP( $comment_ID = 0 ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid … … 274 274 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added. 275 275 * 276 * @param string $comment_author_IP The comment author's IP address .276 * @param string $comment_author_IP The comment author's IP address, or an empty string if it's not available. 277 277 * @param int $comment_ID The comment ID. 278 278 * @param WP_Comment $comment The comment object. -
trunk/src/wp-includes/customize/class-wp-customize-date-time-control.php
r49108 r51300 215 215 * @since 4.9.0 216 216 * 217 * @return array abbr and description. 217 * @return array { 218 * Timezone info. All properties are optional. 219 * 220 * @type string $abbr Timezone abbreviation, eg. PST or CEST. 221 * @type string $description Human-readable timezone description as HTML. 222 * } 218 223 */ 219 224 public function get_timezone_info() { -
trunk/src/wp-includes/functions.php
r51223 r51300 218 218 * 219 219 * @since 5.3.0 220 * 221 * @global WP_Locale $wp_locale WordPress date and time locale object. 220 222 * 221 223 * @param string $format PHP date format. -
trunk/src/wp-includes/kses.php
r51007 r51300 855 855 if ( is_array( $context ) ) { 856 856 /** 857 * Filters the HTML t hat isallowed for a given context.857 * Filters the HTML tags that are allowed for a given context. 858 858 * 859 859 * @since 3.5.0 … … 1041 1041 * @global string[] $pass_allowed_protocols Array of allowed URL protocols. 1042 1042 * 1043 * @param array $match espreg_replace regexp matches1043 * @param array $match preg_replace regexp matches 1044 1044 * @return string 1045 1045 */ -
trunk/src/wp-includes/load.php
r51299 r51300 676 676 * 677 677 * @param bool $enable_object_cache Whether to enable loading object-cache.php (if present). 678 * Default true.678 * Default true. 679 679 */ 680 680 if ( $first_init && apply_filters( 'enable_loading_object_cache_dropin', true ) ) { -
trunk/src/wp-includes/nav-menu.php
r51299 r51300 160 160 * @since 3.0.0 161 161 * 162 * @return int[] Associative array of registered navigation menu IDs keyed by their162 * @return int[] Associative array of egistered navigation menu IDs keyed by their 163 163 * location name. If none are registered, an empty array. 164 164 */ -
trunk/src/wp-includes/pluggable.php
r51299 r51300 2786 2786 * @param string $default URL for the default image or a default type. Accepts '404', 'retro', 'monsterid', 2787 2787 * 'wavatar', 'indenticon', 'mystery', 'mm', 'mysteryman', 'blank', or 'gravatar_default'. 2788 * @param string $alt Alternative text to use in the avatar image tag. 2788 * Default is the value of the 'avatar_default' option, with a fallback of 'mystery'. 2789 * @param string $alt Alternative text to use in the avatar image tag. Default empty. 2789 2790 * @param array $args Arguments passed to get_avatar_data(), after processing. 2790 2791 */ -
trunk/src/wp-includes/post.php
r51299 r51300 1392 1392 * the admin interface or by front-end users. While the default 1393 1393 * settings of $exclude_from_search, $publicly_queryable, $show_ui, 1394 * and $show_in_nav_menus are inherited from $public, each does not1394 * and $show_in_nav_menus are inherited from public, each does not 1395 1395 * rely on this relationship and controls a very specific intention. 1396 1396 * Default false. … … 1418 1418 * @type bool $show_in_rest Whether to include the post type in the REST API. Set this to true 1419 1419 * for the post type to be available in the block editor. 1420 * @type string $rest_base To change the base URLof REST API route. Default is $post_type.1421 * @type string $rest_controller_class REST API controller class name. Default is 'WP_REST_Posts_Controller'.1420 * @type string $rest_base To change the base url of REST API route. Default is $post_type. 1421 * @type string $rest_controller_class REST API Controller class name. Default is 'WP_REST_Posts_Controller'. 1422 1422 * @type int $menu_position The position in the menu order the post type should appear. To work, 1423 1423 * $show_in_menu must be true. Default null (at the bottom). 1424 * @type string $menu_icon The URLto the icon to be used for this menu. Pass a base64-encoded1424 * @type string $menu_icon The url to the icon to be used for this menu. Pass a base64-encoded 1425 1425 * SVG using a data URI, which will be colored to match the color scheme 1426 1426 * -- this should begin with 'data:image/svg+xml;base64,'. Pass the name -
trunk/src/wp-includes/user.php
r51298 r51300 1750 1750 * @type bool $use_ssl Whether the user should always access the admin over 1751 1751 * https. Default false. 1752 * @type string $user_registered Date the user registered . Format is 'Y-m-d H:i:s'.1752 * @type string $user_registered Date the user registered in UTC. Format is 'Y-m-d H:i:s'. 1753 1753 * @type string $user_activation_key Password reset key. Default empty. 1754 1754 * @type bool $spam Multisite only. Whether the user is marked as spam. -
trunk/src/wp-includes/widgets.php
r51298 r51300 1833 1833 function wp_use_widgets_block_editor() { 1834 1834 /** 1835 * Filters whether or notto use the block editor to manage widgets.1835 * Filters whether to use the block editor to manage widgets. 1836 1836 * 1837 1837 * @since 5.8.0 -
trunk/tests/phpunit/tests/http/functions.php
r50344 r51300 222 222 $requests_response->cookies['test'] = Requests_Cookie::parse( 'test=foo; domain=.wordpress.org' ); 223 223 224 $requests_response->cookies['test']->flags['host-only'] = false; // https://github.com/ rmccue/Requests/issues/306224 $requests_response->cookies['test']->flags['host-only'] = false; // https://github.com/WordPress/Requests/issues/306 225 225 226 226 $http_response = new WP_HTTP_Requests_Response( $requests_response );
Note: See TracChangeset
for help on using the changeset viewer.