diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
index 9d5244202e..3089ada5f8 100644
|
a
|
b
|
function _wp_handle_upload( &$file, $overrides, $time, $action ) { |
| 849 | 849 | * |
| 850 | 850 | * @since 4.9.0 |
| 851 | 851 | * |
| 852 | | * @param string $move_new_file If null (default) move the file after the upload. |
| 853 | | * @param string $file An array of data for a single file. |
| 854 | | * @param string $new_file Filename of the newly-uploaded file. |
| 855 | | * @param string $type File type. |
| | 852 | * @param mixed $move_new_file If null (default) move the file after the upload. |
| | 853 | * @param string[] $file An array of data for a single file. |
| | 854 | * @param string $new_file Filename of the newly-uploaded file. |
| | 855 | * @param string $type File type. |
| 856 | 856 | */ |
| 857 | 857 | $move_new_file = apply_filters( 'pre_move_uploaded_file', null, $file, $new_file, $type ); |
| 858 | 858 | |
diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php
index 7c9665b6aa..12035e1fc9 100644
|
a
|
b
|
function wp_prepare_themes_for_js( $themes = null ) { |
| 686 | 686 | * |
| 687 | 687 | * @since 3.8.0 |
| 688 | 688 | * |
| 689 | | * @param array $prepared_themes Array of themes. |
| | 689 | * @param array $prepared_themes Array of theme data. |
| 690 | 690 | */ |
| 691 | 691 | $prepared_themes = apply_filters( 'wp_prepare_themes_for_js', $prepared_themes ); |
| 692 | 692 | $prepared_themes = array_values( $prepared_themes ); |
diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php
index 057648935f..e8647bf526 100644
|
a
|
b
|
function render_block( $block ) { |
| 225 | 225 | * |
| 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 ); |
| 232 | 232 | if ( ! is_null( $pre_render ) ) { |
diff --git a/src/wp-includes/class-http.php b/src/wp-includes/class-http.php
index 03511056ae..1d0d5074e5 100644
|
a
|
b
|
class WP_Http { |
| 251 | 251 | * @since 2.9.0 |
| 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 ); |
| 258 | 258 | |
diff --git a/src/wp-includes/class-wp-http-proxy.php b/src/wp-includes/class-wp-http-proxy.php
index 24a354e2c9..63a1186012 100644
|
a
|
b
|
class WP_HTTP_Proxy { |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | /** |
| 155 | | * Whether URL should be sent through the proxy server. |
| | 155 | * Determines whether the request should be sent through a proxy. |
| 156 | 156 | * |
| 157 | | * We want to keep localhost and the site URL from being sent through the proxy server, because |
| | 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. |
| 160 | 160 | * |
| … |
… |
class WP_HTTP_Proxy { |
| 181 | 181 | $home = parse_url( get_option( 'siteurl' ) ); |
| 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 |
| 187 | 187 | * the request through the proxy. Returning null bypasses the filter. |
| 188 | 188 | * |
| 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 the URI. |
| 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 ); |
| 197 | 197 | if ( ! is_null( $result ) ) { |
diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php
index 47a2b031b2..abef0329ef 100644
|
a
|
b
|
class wp_xmlrpc_server extends IXR_Server { |
| 286 | 286 | * |
| 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 ); |
| 293 | 293 | return false; |
diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
index 29b2c21218..847e15d998 100644
|
a
|
b
|
function wp_allow_comment( $commentdata, $avoid_die = false ) { |
| 819 | 819 | * @since 4.9.0 Returning a WP_Error value from the filter will shortcircuit comment insertion and |
| 820 | 820 | * allow skipping further processing. |
| 821 | 821 | * |
| 822 | | * @param bool|string|WP_Error $approved The approval status. Accepts 1, 0, 'spam' or WP_Error. |
| 823 | | * @param array $commentdata Comment data. |
| | 822 | * @param int|string|WP_Error $approved The approval status. Accepts 1, 0, 'spam' or WP_Error. |
| | 823 | * @param array $commentdata Comment data. |
| 824 | 824 | */ |
| 825 | 825 | $approved = apply_filters( 'pre_comment_approved', $approved, $commentdata ); |
| 826 | 826 | return $approved; |
| … |
… |
function wp_update_comment_count( $post_id, $do_deferred = false ) { |
| 2487 | 2487 | * @global wpdb $wpdb WordPress database abstraction object. |
| 2488 | 2488 | * |
| 2489 | 2489 | * @param int $post_id Post ID |
| 2490 | | * @return bool True on success, false on '0' $post_id or if post with ID does not exist. |
| | 2490 | * @return bool True on success, false if the post does not exist. |
| 2491 | 2491 | */ |
| 2492 | 2492 | function wp_update_comment_count_now( $post_id ) { |
| 2493 | 2493 | global $wpdb; |
| … |
… |
function wp_update_comment_count_now( $post_id ) { |
| 2511 | 2511 | * |
| 2512 | 2512 | * @since 4.5.0 |
| 2513 | 2513 | * |
| 2514 | | * @param int $new The new comment count. Default null. |
| 2515 | | * @param int $old The old comment count. |
| 2516 | | * @param int $post_id Post ID. |
| | 2514 | * @param int|null $new The new comment count. Default null. |
| | 2515 | * @param int $old The old comment count. |
| | 2516 | * @param int $post_id Post ID. |
| 2517 | 2517 | */ |
| 2518 | 2518 | $new = apply_filters( 'pre_wp_update_comment_count_now', null, $old, $post_id ); |
| 2519 | 2519 | |
diff --git a/src/wp-includes/cron.php b/src/wp-includes/cron.php
index 2afe56b923..e010b86355 100644
|
a
|
b
|
function wp_unschedule_event( $timestamp, $hook, $args = array() ) { |
| 392 | 392 | * {@see 'pre_clear_scheduled_hook'} filter added to short-circuit the function. |
| 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 no |
| 397 | | * events were registered with the hook and arguments combination), false if |
| 398 | | * 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() ) { |
| 401 | 401 | // Backward compatibility |
| … |
… |
function wp_clear_scheduled_hook( $hook, $args = array() ) { |
| 417 | 417 | * |
| 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 ); |
| 425 | 425 | if ( null !== $pre ) { |
| … |
… |
function wp_clear_scheduled_hook( $hook, $args = array() ) { |
| 461 | 461 | * @since 5.1.0 Return value added to indicate success or failure. |
| 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 no |
| 465 | | * 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 ) { |
| 468 | 468 | /** |
| … |
… |
function wp_unschedule_hook( $hook ) { |
| 477 | 477 | * |
| 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 ); |
| 484 | 484 | if ( null !== $pre ) { |
| … |
… |
function wp_unschedule_hook( $hook ) { |
| 528 | 528 | * Although not passed to a callback, these arguments are used to uniquely identify the |
| 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 ) { |
| 534 | 534 | /** |
| … |
… |
function wp_get_scheduled_event( $hook, $args = array(), $timestamp = null ) { |
| 542 | 542 | * |
| 543 | 543 | * @since 5.1.0 |
| 544 | 544 | * |
| 545 | | * @param null|bool $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 the |
| 549 | | * 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 | */ |
| 552 | 552 | $pre = apply_filters( 'pre_get_scheduled_event', null, $hook, $args, $timestamp ); |
diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index 63397aea5d..eeb3eb62af 100644
|
a
|
b
|
function ent2ncr( $text ) { |
| 3836 | 3836 | * |
| 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 ); |
| 3843 | 3843 | if ( null !== $filtered ) { |
diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php
index d77b15ee5b..419ebc3817 100644
|
a
|
b
|
function load_script_translations( $file, $handle, $domain ) { |
| 1053 | 1053 | * |
| 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 ); |
| 1062 | 1062 | |
diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php
index f248c5b047..fa7188743f 100644
|
a
|
b
|
function is_avatar_comment_type( $comment_type ) { |
| 3997 | 3997 | * |
| 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 | | * user email, WP_User object, WP_Post object, or WP_Comment object. |
| | 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. |
| 4004 | 4004 | * |
| … |
… |
function is_avatar_comment_type( $comment_type ) { |
| 4020 | 4020 | * plus a "found_avatar" guess. Pass as a reference. Default null. |
| 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 | * |
| 4026 | 4026 | * @type bool $found_avatar True if we were able to find an avatar for this user, |
| … |
… |
function get_avatar_data( $id_or_email, $args = null ) { |
| 4101 | 4101 | * |
| 4102 | 4102 | * @since 4.2.0 |
| 4103 | 4103 | * |
| 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. |
| | 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 ); |
| 4109 | 4109 | |
| … |
… |
function get_avatar_data( $id_or_email, $args = null ) { |
| 4193 | 4193 | * @since 4.2.0 |
| 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. |
| 4199 | 4199 | */ |
| … |
… |
function get_avatar_data( $id_or_email, $args = null ) { |
| 4204 | 4204 | * |
| 4205 | 4205 | * @since 4.2.0 |
| 4206 | 4206 | * |
| 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. |
| | 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 ); |
| 4212 | 4212 | } |
diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php
index 5349754126..00b0a6c083 100644
|
a
|
b
|
function wp_update_network_user_counts( $network_id = null ) { |
| 2426 | 2426 | } |
| 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 ); |
| 2444 | 2444 | if ( false === $space_used ) { |
diff --git a/src/wp-includes/ms-load.php b/src/wp-includes/ms-load.php
index d1abc16048..e3ed91536a 100644
|
a
|
b
|
function get_site_by_path( $domain, $path, $segments = null ) { |
| 203 | 203 | * |
| 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 ); |
| 214 | 214 | if ( null !== $pre ) { |
diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php
index 926f3e41b1..6386c95f62 100644
|
a
|
b
|
if ( ! function_exists( 'get_avatar' ) ) : |
| 2608 | 2608 | * |
| 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 ); |
| 2617 | 2617 | |
diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index b40e94d8ce..491fc666a4 100644
|
a
|
b
|
function wp_delete_post( $postid = 0, $force_delete = false ) { |
| 2935 | 2935 | * |
| 2936 | 2936 | * @since 4.4.0 |
| 2937 | 2937 | * |
| 2938 | | * @param bool $delete Whether to go forward with deletion. |
| 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 ); |
| 2943 | 2943 | if ( null !== $check ) { |
| … |
… |
function wp_trash_post( $post_id = 0 ) { |
| 3104 | 3104 | * |
| 3105 | 3105 | * @since 4.9.0 |
| 3106 | 3106 | * |
| 3107 | | * @param bool $trash Whether to go forward with trashing. |
| 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 ); |
| 3111 | 3111 | if ( null !== $check ) { |
| … |
… |
function wp_untrash_post( $post_id = 0 ) { |
| 3173 | 3173 | * |
| 3174 | 3174 | * @since 4.9.0 |
| 3175 | 3175 | * |
| 3176 | | * @param bool $untrash Whether to go forward with untrashing. |
| 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 ); |
| 3180 | 3180 | if ( null !== $check ) { |
| … |
… |
function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p |
| 4284 | 4284 | * |
| 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 ); |
| 4295 | 4295 | if ( null !== $override_slug ) { |
| … |
… |
function get_posts_by_author_sql( $post_type, $full = true, $post_author = null, |
| 6351 | 6351 | } |
| 6352 | 6352 | |
| 6353 | 6353 | /** |
| 6354 | | * Retrieve the date that the last post was 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 |
| 6357 | 6357 | * server time. The 'blog' value is the date when the last post was posted. The |
| … |
… |
function get_posts_by_author_sql( $post_type, $full = true, $post_author = null, |
| 6362 | 6362 | * |
| 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'. |
| 6369 | 6369 | * @return string The date of the last post. |
| 6370 | 6370 | */ |
| 6371 | 6371 | function get_lastpostdate( $timezone = 'server', $post_type = 'any' ) { |
| 6372 | 6372 | /** |
| 6373 | | * Filters the date the last post was published. |
| | 6373 | * Filters the most recent time that a post on the site was published. |
| 6374 | 6374 | * |
| 6375 | 6375 | * @since 2.3.0 |
| 6376 | 6376 | * |
| … |
… |
function get_lastpostdate( $timezone = 'server', $post_type = 'any' ) { |
| 6382 | 6382 | } |
| 6383 | 6383 | |
| 6384 | 6384 | /** |
| 6385 | | * Get the timestamp of the last time any post was 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 |
| 6388 | 6388 | * server time. The 'blog' value is just when the last post was modified. The |
| … |
… |
function get_lastpostdate( $timezone = 'server', $post_type = 'any' ) { |
| 6395 | 6395 | * for information on accepted values. |
| 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' ) { |
| 6401 | 6401 | /** |
| … |
… |
function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) { |
| 6403 | 6403 | * |
| 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 ); |
| 6413 | 6413 | if ( false !== $lastpostmodified ) { |
| … |
… |
function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) { |
| 6422 | 6422 | } |
| 6423 | 6423 | |
| 6424 | 6424 | /** |
| 6425 | | * Filters the date the last post 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. |
| 6432 | 6432 | */ |
| … |
… |
function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) { |
| 6434 | 6434 | } |
| 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 |
| 6440 | 6440 | * @since 4.4.0 The `$post_type` argument was added. |
| … |
… |
function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) { |
| 6446 | 6446 | * for information on accepted values. |
| 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' ) { |
| 6452 | 6452 | global $wpdb; |
diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php
index 117cd23a30..ed042262cc 100644
|
a
|
b
|
function do_shortcode_tag( $m ) { |
| 305 | 305 | /** |
| 306 | 306 | * Filters whether to call a shortcode callback. |
| 307 | 307 | * |
| 308 | | * Passing a truthy value to the filter will effectively short-circuit the |
| | 308 | * 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. |
| 316 | 316 | * @param array $m Regular expression match array. |
diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
index 3231285b1a..d93da9f138 100644
|
a
|
b
|
function unregister_term_meta( $taxonomy, $meta_key ) { |
| 1358 | 1358 | * @global wpdb $wpdb WordPress database abstraction object. |
| 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 use |
| | 1361 | * @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 |
| 1364 | 1364 | * if no taxonomy is specified and the term ID exists. Returns |
| … |
… |
function wp_get_object_terms( $object_ids, $taxonomies, $args = array() ) { |
| 2097 | 2097 | * |
| 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 { |
| 2103 | 2103 | * Optional. Array or string of arguments for inserting a term. |
| … |
… |
function wp_insert_term( $term, $taxonomy, $args = array() ) { |
| 2117 | 2117 | if ( ! taxonomy_exists( $taxonomy ) ) { |
| 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. |
| 2122 | 2123 | * |
| 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 ); |
| 2129 | 2130 | if ( is_wp_error( $term ) ) { |
diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
index 57471dc2ed..64da5169e1 100644
|
a
|
b
|
class wpdb { |
| 2703 | 2703 | * |
| 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 ); |
| 2710 | 2710 | if ( null !== $charset ) { |
| … |
… |
class wpdb { |
| 2807 | 2807 | * |
| 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 ); |
| 2815 | 2815 | if ( null !== $charset ) { |