Changeset 46232
- Timestamp:
- 09/21/2019 05:40:58 PM (5 years ago)
- Location:
- trunk/src
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r46230 r46232 853 853 * @since 4.9.0 854 854 * 855 * @param string$move_new_file If null (default) move the file after the upload.856 * @param string $file An array of data for a single file.857 * @param string $new_file Filename of the newly-uploaded file.858 * @param string $type File type.855 * @param mixed $move_new_file If null (default) move the file after the upload. 856 * @param string[] $file An array of data for a single file. 857 * @param string $new_file Filename of the newly-uploaded file. 858 * @param string $type File type. 859 859 */ 860 860 $move_new_file = apply_filters( 'pre_move_uploaded_file', null, $file, $new_file, $type ); -
trunk/src/wp-admin/includes/theme.php
r45932 r46232 687 687 * @since 3.8.0 688 688 * 689 * @param array $prepared_themes Array of theme s.689 * @param array $prepared_themes Array of theme data. 690 690 */ 691 691 $prepared_themes = apply_filters( 'wp_prepare_themes_for_js', $prepared_themes ); -
trunk/src/wp-includes/blocks.php
r46111 r46232 226 226 * @since 5.1.0 227 227 * 228 * @param string $pre_render The pre-rendered content. Default null.229 * @param array $block The block being rendered.228 * @param string|null $pre_render The pre-rendered content. Default null. 229 * @param array $block The block being rendered. 230 230 */ 231 231 $pre_render = apply_filters( 'pre_render_block', null, $block ); -
trunk/src/wp-includes/class-http.php
r45667 r46232 252 252 * 253 253 * @param false|array|WP_Error $preempt Whether to preempt an HTTP request's return value. Default false. 254 * @param array $parsed_args HTTP request arguments.255 * @param string $url The request URL.254 * @param array $parsed_args HTTP request arguments. 255 * @param string $url The request URL. 256 256 */ 257 257 $pre = apply_filters( 'pre_http_request', false, $parsed_args, $url ); -
trunk/src/wp-includes/class-wp-http-proxy.php
r42343 r46232 153 153 154 154 /** 155 * Whether URL should be sent through the proxy server.156 * 157 * We want to keep localhost and the site URL from being sent through the proxy server, because155 * Determines whether the request should be sent through a proxy. 156 * 157 * We want to keep localhost and the site URL from being sent through the proxy, because 158 158 * some proxies can not handle this. We also have the constant available for defining other 159 159 * hosts that won't be sent through the proxy. … … 182 182 183 183 /** 184 * Filters whether to preempt sending the request through the proxy server.184 * Filters whether to preempt sending the request through the proxy. 185 185 * 186 186 * Returning false will bypass the proxy; returning true will send … … 189 189 * @since 3.5.0 190 190 * 191 * @param null$override Whether to override the request result. Default null.192 * @param string $uri URL to check.193 * @param array $check Associative array result of parsing theURI.194 * @param array $home Associative array result of parsing the site URL.191 * @param bool|null $override Whether to override the request result. Default null. 192 * @param string $uri URL to check. 193 * @param array $check Associative array result of parsing the request URI. 194 * @param array $home Associative array result of parsing the site URL. 195 195 */ 196 196 $result = apply_filters( 'pre_http_send_through_proxy', null, $uri, $check, $home ); -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r46150 r46232 287 287 * @since 3.5.0 288 288 * 289 * @param string $error The XML-RPC error message.290 * @param WP_ User $user WP_User object.289 * @param string $error The XML-RPC error message. 290 * @param WP_Error $user WP_Error object. 291 291 */ 292 292 $this->error = apply_filters( 'xmlrpc_login_error', $this->error, $user ); -
trunk/src/wp-includes/comment.php
r46227 r46232 821 821 * allow skipping further processing. 822 822 * 823 * @param bool|string|WP_Error $approved The approval status. Accepts 1, 0, 'spam' or WP_Error.824 * @param array 823 * @param int|string|WP_Error $approved The approval status. Accepts 1, 0, 'spam' or WP_Error. 824 * @param array $commentdata Comment data. 825 825 */ 826 826 $approved = apply_filters( 'pre_comment_approved', $approved, $commentdata ); … … 2489 2489 * 2490 2490 * @param int $post_id Post ID 2491 * @return bool True on success, false on '0' $post_id or if post with IDdoes not exist.2491 * @return bool True on success, false if the post does not exist. 2492 2492 */ 2493 2493 function wp_update_comment_count_now( $post_id ) { … … 2513 2513 * @since 4.5.0 2514 2514 * 2515 * @param int $new The new comment count. Default null.2516 * @param int $old The old comment count.2517 * @param int $post_id Post ID.2515 * @param int|null $new The new comment count. Default null. 2516 * @param int $old The old comment count. 2517 * @param int $post_id Post ID. 2518 2518 */ 2519 2519 $new = apply_filters( 'pre_wp_update_comment_count_now', null, $old, $post_id ); -
trunk/src/wp-includes/cron.php
r45674 r46232 393 393 * 394 394 * @param string $hook Action hook, the execution of which will be unscheduled. 395 * @param array $args Optional. Arguments that were to be passed to the hook's callback function.396 * @return bool|int On success an integer indicating number of events unscheduled (0 indicates no397 * events were registered with the hook and arguments combination), false if398 * unscheduling one or more events fail.395 * @param array $args Optional. Arguments that were to be passed to the hook's callback function. 396 * @return false|int On success an integer indicating number of events unscheduled (0 indicates no 397 * events were registered with the hook and arguments combination), false if 398 * unscheduling one or more events fail. 399 399 */ 400 400 function wp_clear_scheduled_hook( $hook, $args = array() ) { … … 418 418 * @since 5.1.0 419 419 * 420 * @param null| array$pre Value to return instead. Default null to continue unscheduling the event.421 * @param string $hook Action hook, the execution of which will be unscheduled.422 * @param array $args Arguments to pass to the hook's callback function.420 * @param null|int|false $pre Value to return instead. Default null to continue unscheduling the event. 421 * @param string $hook Action hook, the execution of which will be unscheduled. 422 * @param array $args Arguments to pass to the hook's callback function. 423 423 */ 424 424 $pre = apply_filters( 'pre_clear_scheduled_hook', null, $hook, $args ); … … 462 462 * 463 463 * @param string $hook Action hook, the execution of which will be unscheduled. 464 * @return bool|int On success an integer indicating number of events unscheduled (0 indicates no465 * events were registered on the hook), false if unscheduling fails.464 * @return false|int On success an integer indicating number of events unscheduled (0 indicates no 465 * events were registered on the hook), false if unscheduling fails. 466 466 */ 467 467 function wp_unschedule_hook( $hook ) { … … 478 478 * @since 5.1.0 479 479 * 480 * @param null| array$pre Value to return instead. Default null to continue unscheduling the hook.481 * @param string $hook Action hook, the execution of which will be unscheduled.480 * @param null|int|false $pre Value to return instead. Default null to continue unscheduling the hook. 481 * @param string $hook Action hook, the execution of which will be unscheduled. 482 482 */ 483 483 $pre = apply_filters( 'pre_unschedule_hook', null, $hook ); … … 529 529 * event, so they should be the same as those used when originally scheduling the event. 530 530 * @param int|null $timestamp Optional. Unix timestamp (UTC) of the event. If not specified, the next scheduled event is returned. 531 * @return bool|object The event object. False if the event does not exist.531 * @return false|object The event object. False if the event does not exist. 532 532 */ 533 533 function wp_get_scheduled_event( $hook, $args = array(), $timestamp = null ) { … … 543 543 * @since 5.1.0 544 544 * 545 * @param null| bool $preValue to return instead. Default null to continue retrieving the event.546 * @param string $hookAction hook of the event.547 * @param array $argsArray containing each separate argument to pass to the hook's callback function.548 * Although not passed to a callback, these arguments are used to uniquely identify the549 * event.545 * @param null|false|object $pre Value to return instead. Default null to continue retrieving the event. 546 * @param string $hook Action hook of the event. 547 * @param array $args Array containing each separate argument to pass to the hook's callback function. 548 * Although not passed to a callback, these arguments are used to uniquely identify 549 * the event. 550 550 * @param int|null $timestamp Unix timestamp (UTC) of the event. Null to retrieve next scheduled event. 551 551 */ -
trunk/src/wp-includes/formatting.php
r46214 r46232 3837 3837 * @since 3.3.0 3838 3838 * 3839 * @param null$converted_text The text to be converted. Default null.3840 * @param string $text The text prior to entity conversion.3839 * @param string|null $converted_text The text to be converted. Default null. 3840 * @param string $text The text prior to entity conversion. 3841 3841 */ 3842 3842 $filtered = apply_filters( 'pre_ent2ncr', null, $text ); -
trunk/src/wp-includes/l10n.php
r45738 r46232 1054 1054 * @since 5.0.2 1055 1055 * 1056 * @param string|false $translations JSON-encoded translation data. Default null.1057 * @param string|false $file Path to the translation file to load. False if there isn't one.1058 * @param string $handle Name of the script to register a translation domain to.1059 * @param string $domain The text domain.1056 * @param string|false|null $translations JSON-encoded translation data. Default null. 1057 * @param string|false $file Path to the translation file to load. False if there isn't one. 1058 * @param string $handle Name of the script to register a translation domain to. 1059 * @param string $domain The text domain. 1060 1060 */ 1061 1061 $translations = apply_filters( 'pre_load_script_translations', null, $file, $handle, $domain ); -
trunk/src/wp-includes/link-template.php
r45932 r46232 3998 3998 * @since 4.2.0 3999 3999 * 4000 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user _id, gravatar md5 hash,4001 * 4000 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user ID, Gravatar MD5 hash, 4001 * user email, WP_User object, WP_Post object, or WP_Comment object. 4002 4002 * @param array $args { 4003 4003 * Optional. Arguments to return instead of the default arguments. … … 4021 4021 * @type string $extra_attr HTML attributes to insert in the IMG element. Is not sanitized. Default empty. 4022 4022 * } 4023 * @return array $processed_args{4023 * @return array { 4024 4024 * Along with the arguments passed in `$args`, this will contain a couple of extra arguments. 4025 4025 * … … 4102 4102 * @since 4.2.0 4103 4103 * 4104 * @param array 4105 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,4106 * 4104 * @param array $args Arguments passed to get_avatar_data(), after processing. 4105 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user ID, Gravatar MD5 hash, 4106 * user email, WP_User object, WP_Post object, or WP_Comment object. 4107 4107 */ 4108 4108 $args = apply_filters( 'pre_get_avatar_data', $args, $id_or_email ); … … 4194 4194 * 4195 4195 * @param string $url The URL of the avatar. 4196 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user _id, gravatar md5 hash,4196 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user ID, Gravatar MD5 hash, 4197 4197 * user email, WP_User object, WP_Post object, or WP_Comment object. 4198 4198 * @param array $args Arguments passed to get_avatar_data(), after processing. … … 4205 4205 * @since 4.2.0 4206 4206 * 4207 * @param array 4208 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,4209 * 4207 * @param array $args Arguments passed to get_avatar_data(), after processing. 4208 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user ID, Gravatar MD5 hash, 4209 * user email, WP_User object, WP_Post object, or WP_Comment object. 4210 4210 */ 4211 4211 return apply_filters( 'get_avatar_data', $args, $id_or_email ); -
trunk/src/wp-includes/ms-functions.php
r45932 r46232 2427 2427 2428 2428 /** 2429 * Returns the space used by the current blog.2429 * Returns the space used by the current site. 2430 2430 * 2431 2431 * @since 3.5.0 2432 2432 * 2433 * @return int Used space in megabytes 2433 * @return int Used space in megabytes. 2434 2434 */ 2435 2435 function get_space_used() { 2436 2436 /** 2437 * Filters the amount of storage space used by the current site .2437 * Filters the amount of storage space used by the current site, in megabytes. 2438 2438 * 2439 2439 * @since 3.5.0 2440 2440 * 2441 * @param int| bool$space_used The amount of used space, in megabytes. Default false.2441 * @param int|false $space_used The amount of used space, in megabytes. Default false. 2442 2442 */ 2443 2443 $space_used = apply_filters( 'pre_get_space_used', false ); -
trunk/src/wp-includes/ms-load.php
r45932 r46232 204 204 * @since 3.9.0 205 205 * 206 * @param null| bool|WP_Site $site Site value to return by path.207 * @param string $domain The requested domain.208 * @param string $path The requested path, in full.209 * @param int|null $segments The suggested number of paths to consult.210 * Default null, meaning the entire path was to be consulted.211 * @param array $paths The paths to search for, based on $path and $segments.206 * @param null|false|WP_Site $site Site value to return by path. 207 * @param string $domain The requested domain. 208 * @param string $path The requested path, in full. 209 * @param int|null $segments The suggested number of paths to consult. 210 * Default null, meaning the entire path was to be consulted. 211 * @param array $paths The paths to search for, based on $path and $segments. 212 212 */ 213 213 $pre = apply_filters( 'pre_get_site_by_path', null, $domain, $path, $segments, $paths ); -
trunk/src/wp-includes/pluggable.php
r46116 r46232 2609 2609 * @since 4.2.0 2610 2610 * 2611 * @param string $avatar HTML for the user's avatar. Default null.2612 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,2613 * user email, WP_User object, WP_Post object, or WP_Comment object.2614 * @param array $args Arguments passed to get_avatar_url(), after processing.2611 * @param string|null $avatar HTML for the user's avatar. Default null. 2612 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, 2613 * user email, WP_User object, WP_Post object, or WP_Comment object. 2614 * @param array $args Arguments passed to get_avatar_url(), after processing. 2615 2615 */ 2616 2616 $avatar = apply_filters( 'pre_get_avatar', null, $id_or_email, $args ); -
trunk/src/wp-includes/post.php
r46196 r46232 2936 2936 * @since 4.4.0 2937 2937 * 2938 * @param bool 2939 * @param WP_Post $post Post object.2940 * @param bool $force_delete Whether to bypass the trash.2938 * @param bool|null $delete Whether to go forward with deletion. 2939 * @param WP_Post $post Post object. 2940 * @param bool $force_delete Whether to bypass the trash. 2941 2941 */ 2942 2942 $check = apply_filters( 'pre_delete_post', null, $post, $force_delete ); … … 3105 3105 * @since 4.9.0 3106 3106 * 3107 * @param bool 3108 * @param WP_Post $post Post object.3107 * @param bool|null $trash Whether to go forward with trashing. 3108 * @param WP_Post $post Post object. 3109 3109 */ 3110 3110 $check = apply_filters( 'pre_trash_post', null, $post ); … … 3174 3174 * @since 4.9.0 3175 3175 * 3176 * @param bool 3177 * @param WP_Post $post Post object.3176 * @param bool|null $untrash Whether to go forward with untrashing. 3177 * @param WP_Post $post Post object. 3178 3178 */ 3179 3179 $check = apply_filters( 'pre_untrash_post', null, $post ); … … 4285 4285 * @since 5.1.0 4286 4286 * 4287 * @param string $override_slug Short-circuit return value.4288 * @param string $slug The desired slug (post_name).4289 * @param int $post_ID Post ID.4290 * @param string $post_status The post status.4291 * @param string $post_type Post type.4292 * @param int $post_parent Post parent ID.4287 * @param string|null $override_slug Short-circuit return value. 4288 * @param string $slug The desired slug (post_name). 4289 * @param int $post_ID Post ID. 4290 * @param string $post_status The post status. 4291 * @param string $post_type Post type. 4292 * @param int $post_parent Post parent ID. 4293 4293 */ 4294 4294 $override_slug = apply_filters( 'pre_wp_unique_post_slug', null, $slug, $post_ID, $post_status, $post_type, $post_parent ); … … 6352 6352 6353 6353 /** 6354 * Retrieve the date that the last postwas published.6354 * Retrieves the most recent time that a post on the site was published. 6355 6355 * 6356 6356 * The server timezone is the default and is the difference between GMT and … … 6363 6363 * @param string $timezone Optional. The timezone for the timestamp. Accepts 'server', 'blog', or 'gmt'. 6364 6364 * 'server' uses the server's internal timezone. 6365 * 'blog' uses the `post_ modified` field, which proxies to the timezone set for the site.6366 * 'gmt' uses the `post_ modified_gmt` field.6365 * 'blog' uses the `post_date` field, which proxies to the timezone set for the site. 6366 * 'gmt' uses the `post_date_gmt` field. 6367 6367 * Default 'server'. 6368 6368 * @param string $post_type Optional. The post type to check. Default 'any'. … … 6371 6371 function get_lastpostdate( $timezone = 'server', $post_type = 'any' ) { 6372 6372 /** 6373 * Filters the date the last postwas published.6373 * Filters the most recent time that a post on the site was published. 6374 6374 * 6375 6375 * @since 2.3.0 … … 6383 6383 6384 6384 /** 6385 * Get the timestamp of the last time any postwas modified.6385 * Get the most recent time that a post on the site was modified. 6386 6386 * 6387 6387 * The server timezone is the default and is the difference between GMT and … … 6396 6396 * Default 'server'. 6397 6397 * @param string $post_type Optional. The post type to check. Default 'any'. 6398 * @return string The timestamp .6398 * @return string The timestamp in 'Y-m-d H:i:s' format. 6399 6399 */ 6400 6400 function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) { … … 6404 6404 * @since 4.4.0 6405 6405 * 6406 * @param string $lastpostmodified Date the last post was modified.6407 * Returning anything other than false will short-circuit the function.6408 * @param string $timezone Location to use for getting the post modified date.6409 * See get_lastpostdate() for accepted `$timezone` values.6410 * @param string $post_type The post type to check.6406 * @param string|false $lastpostmodified The most recent time that a post was modified, in 'Y-m-d H:i:s' format, or 6407 * false. Returning anything other than false will short-circuit the function. 6408 * @param string $timezone Location to use for getting the post modified date. 6409 * See get_lastpostdate() for accepted `$timezone` values. 6410 * @param string $post_type The post type to check. 6411 6411 */ 6412 6412 $lastpostmodified = apply_filters( 'pre_get_lastpostmodified', false, $timezone, $post_type ); … … 6423 6423 6424 6424 /** 6425 * Filters the date the lastpost was modified.6425 * Filters the most recent time that a post was modified. 6426 6426 * 6427 6427 * @since 2.3.0 6428 6428 * 6429 * @param string $lastpostmodified Date the last post was modified.6429 * @param string $lastpostmodified The most recent time that a post was modified, in 'Y-m-d H:i:s' format. 6430 6430 * @param string $timezone Location to use for getting the post modified date. 6431 6431 * See get_lastpostdate() for accepted `$timezone` values. … … 6435 6435 6436 6436 /** 6437 * Get the timestamp of the last time any post was modified or published.6437 * Gets the timestamp of the last time any post was modified or published. 6438 6438 * 6439 6439 * @since 3.1.0 … … 6447 6447 * @param string $field Post field to check. Accepts 'date' or 'modified'. 6448 6448 * @param string $post_type Optional. The post type to check. Default 'any'. 6449 * @return string|false The timestamp .6449 * @return string|false The timestamp in 'Y-m-d H:i:s' format, or false on error. 6450 6450 */ 6451 6451 function _get_last_post_time( $timezone, $field, $post_type = 'any' ) { -
trunk/src/wp-includes/shortcodes.php
r45932 r46232 306 306 * Filters whether to call a shortcode callback. 307 307 * 308 * Passing a truthy value to the filter will effectivelyshort-circuit the308 * Returning a non-false value from filter will short-circuit the 309 309 * shortcode generation process, returning that value instead. 310 310 * 311 311 * @since 4.7.0 312 312 * 313 * @param bool|string $return Short-circuit return value. Either false or the value to replace the shortcode with.313 * @param false|string $return Short-circuit return value. Either false or the value to replace the shortcode with. 314 314 * @param string $tag Shortcode name. 315 315 * @param array|string $attr Shortcode attributes array or empty string. -
trunk/src/wp-includes/taxonomy.php
r46196 r46232 1359 1359 * 1360 1360 * @param int|string $term The term to check. Accepts term ID, slug, or name. 1361 * @param string $taxonomy The taxonomy name to use1361 * @param string $taxonomy Optional. The taxonomy name to use. 1362 1362 * @param int $parent Optional. ID of parent term under which to confine the exists search. 1363 1363 * @return mixed Returns null if the term does not exist. Returns the term ID … … 2098 2098 * @since 2.3.0 2099 2099 * 2100 * @param string $term The term to add or update.2100 * @param string $term The term name to add or update. 2101 2101 * @param string $taxonomy The taxonomy to which to add the term. 2102 2102 * @param array|string $args { … … 2118 2118 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 2119 2119 } 2120 2120 2121 /** 2121 2122 * Filters a term before it is sanitized and inserted into the database. … … 2123 2124 * @since 3.0.0 2124 2125 * 2125 * @param string $term The term to add or update.2126 * @param string $taxonomy Taxonomy slug.2126 * @param string|WP_Error $term The term name to add or update, or a WP_Error object if there's an error. 2127 * @param string $taxonomy Taxonomy slug. 2127 2128 */ 2128 2129 $term = apply_filters( 'pre_insert_term', $term, $taxonomy ); -
trunk/src/wp-includes/wp-db.php
r46194 r46232 2704 2704 * @since 4.2.0 2705 2705 * 2706 * @param string $charset The character set to use. Default null.2707 * @param string $table The name of the table being checked.2706 * @param string|null $charset The character set to use. Default null. 2707 * @param string $table The name of the table being checked. 2708 2708 */ 2709 2709 $charset = apply_filters( 'pre_get_table_charset', null, $table ); … … 2808 2808 * @since 4.2.0 2809 2809 * 2810 * @param string $charset The character set to use. Default null.2811 * @param string $table The name of the table being checked.2812 * @param string $column The name of the column being checked.2810 * @param string|null $charset The character set to use. Default null. 2811 * @param string $table The name of the table being checked. 2812 * @param string $column The name of the column being checked. 2813 2813 */ 2814 2814 $charset = apply_filters( 'pre_get_col_charset', null, $table, $column );
Note: See TracChangeset
for help on using the changeset viewer.