WordPress.org

Make WordPress Core

Ticket #47110: 47110.diff

File 47110.diff, 31.7 KB (added by johnbillion, 13 months ago)
  • src/wp-admin/includes/file.php

    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 ) { 
    849849         *
    850850         * @since 4.9.0
    851851         *
    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.
    856856         */
    857857        $move_new_file = apply_filters( 'pre_move_uploaded_file', null, $file, $new_file, $type );
    858858
  • src/wp-admin/includes/theme.php

    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 ) { 
    686686         *
    687687         * @since 3.8.0
    688688         *
    689          * @param array $prepared_themes Array of themes.
     689         * @param array $prepared_themes Array of theme data.
    690690         */
    691691        $prepared_themes = apply_filters( 'wp_prepare_themes_for_js', $prepared_themes );
    692692        $prepared_themes = array_values( $prepared_themes );
  • src/wp-includes/blocks.php

    diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php
    index 057648935f..e8647bf526 100644
    a b function render_block( $block ) { 
    225225         *
    226226         * @since 5.1.0
    227227         *
    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.
    230230         */
    231231        $pre_render = apply_filters( 'pre_render_block', null, $block );
    232232        if ( ! is_null( $pre_render ) ) {
  • src/wp-includes/class-http.php

    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 { 
    251251                 * @since 2.9.0
    252252                 *
    253253                 * @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.
    256256                 */
    257257                $pre = apply_filters( 'pre_http_request', false, $parsed_args, $url );
    258258
  • src/wp-includes/class-wp-http-proxy.php

    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 { 
    152152        }
    153153
    154154        /**
    155          * Whether URL should be sent through the proxy server.
     155         * Determines whether the request should be sent through a proxy.
    156156         *
    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
    158158         * some proxies can not handle this. We also have the constant available for defining other
    159159         * hosts that won't be sent through the proxy.
    160160         *
    class WP_HTTP_Proxy { 
    181181                $home = parse_url( get_option( 'siteurl' ) );
    182182
    183183                /**
    184                  * Filters whether to preempt sending the request through the proxy server.
     184                 * Filters whether to preempt sending the request through the proxy.
    185185                 *
    186186                 * Returning false will bypass the proxy; returning true will send
    187187                 * the request through the proxy. Returning null bypasses the filter.
    188188                 *
    189189                 * @since 3.5.0
    190190                 *
    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.
    195195                 */
    196196                $result = apply_filters( 'pre_http_send_through_proxy', null, $uri, $check, $home );
    197197                if ( ! is_null( $result ) ) {
  • src/wp-includes/class-wp-xmlrpc-server.php

    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 { 
    286286                         *
    287287                         * @since 3.5.0
    288288                         *
    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.
    291291                         */
    292292                        $this->error = apply_filters( 'xmlrpc_login_error', $this->error, $user );
    293293                        return false;
  • src/wp-includes/comment.php

    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 ) { 
    819819         * @since 4.9.0 Returning a WP_Error value from the filter will shortcircuit comment insertion and
    820820         *              allow skipping further processing.
    821821         *
    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.
    824824         */
    825825        $approved = apply_filters( 'pre_comment_approved', $approved, $commentdata );
    826826        return $approved;
    function wp_update_comment_count( $post_id, $do_deferred = false ) { 
    24872487 * @global wpdb $wpdb WordPress database abstraction object.
    24882488 *
    24892489 * @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.
    24912491 */
    24922492function wp_update_comment_count_now( $post_id ) {
    24932493        global $wpdb;
    function wp_update_comment_count_now( $post_id ) { 
    25112511         *
    25122512         * @since 4.5.0
    25132513         *
    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.
    25172517         */
    25182518        $new = apply_filters( 'pre_wp_update_comment_count_now', null, $old, $post_id );
    25192519
  • src/wp-includes/cron.php

    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() ) { 
    392392 *              {@see 'pre_clear_scheduled_hook'} filter added to short-circuit the function.
    393393 *
    394394 * @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.
    399399 */
    400400function wp_clear_scheduled_hook( $hook, $args = array() ) {
    401401        // Backward compatibility
    function wp_clear_scheduled_hook( $hook, $args = array() ) { 
    417417         *
    418418         * @since 5.1.0
    419419         *
    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.
    423423         */
    424424        $pre = apply_filters( 'pre_clear_scheduled_hook', null, $hook, $args );
    425425        if ( null !== $pre ) {
    function wp_clear_scheduled_hook( $hook, $args = array() ) { 
    461461 * @since 5.1.0 Return value added to indicate success or failure.
    462462 *
    463463 * @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.
    466466 */
    467467function wp_unschedule_hook( $hook ) {
    468468        /**
    function wp_unschedule_hook( $hook ) { 
    477477         *
    478478         * @since 5.1.0
    479479         *
    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.
    482482         */
    483483        $pre = apply_filters( 'pre_unschedule_hook', null, $hook );
    484484        if ( null !== $pre ) {
    function wp_unschedule_hook( $hook ) { 
    528528 *                            Although not passed to a callback, these arguments are used to uniquely identify the
    529529 *                            event, so they should be the same as those used when originally scheduling the event.
    530530 * @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.
    532532 */
    533533function wp_get_scheduled_event( $hook, $args = array(), $timestamp = null ) {
    534534        /**
    function wp_get_scheduled_event( $hook, $args = array(), $timestamp = null ) { 
    542542         *
    543543         * @since 5.1.0
    544544         *
    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.
    550550         * @param int|null  $timestamp Unix timestamp (UTC) of the event. Null to retrieve next scheduled event.
    551551         */
    552552        $pre = apply_filters( 'pre_get_scheduled_event', null, $hook, $args, $timestamp );
  • src/wp-includes/formatting.php

    diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
    index 63397aea5d..eeb3eb62af 100644
    a b function ent2ncr( $text ) { 
    38363836         *
    38373837         * @since 3.3.0
    38383838         *
    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.
    38413841         */
    38423842        $filtered = apply_filters( 'pre_ent2ncr', null, $text );
    38433843        if ( null !== $filtered ) {
  • src/wp-includes/l10n.php

    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 ) { 
    10531053         *
    10541054         * @since 5.0.2
    10551055         *
    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.
    10601060         */
    10611061        $translations = apply_filters( 'pre_load_script_translations', null, $file, $handle, $domain );
    10621062
  • src/wp-includes/link-template.php

    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 ) { 
    39973997 *
    39983998 * @since 4.2.0
    39993999 *
    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.
    40024002 * @param array $args {
    40034003 *     Optional. Arguments to return instead of the default arguments.
    40044004 *
    function is_avatar_comment_type( $comment_type ) { 
    40204020 *                                  plus a "found_avatar" guess. Pass as a reference. Default null.
    40214021 *     @type string $extra_attr     HTML attributes to insert in the IMG element. Is not sanitized. Default empty.
    40224022 * }
    4023  * @return array $processed_args {
     4023 * @return array {
    40244024 *     Along with the arguments passed in `$args`, this will contain a couple of extra arguments.
    40254025 *
    40264026 *     @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 ) { 
    41014101         *
    41024102         * @since 4.2.0
    41034103         *
    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.
    41074107         */
    41084108        $args = apply_filters( 'pre_get_avatar_data', $args, $id_or_email );
    41094109
    function get_avatar_data( $id_or_email, $args = null ) { 
    41934193         * @since 4.2.0
    41944194         *
    41954195         * @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,
    41974197         *                            user email, WP_User object, WP_Post object, or WP_Comment object.
    41984198         * @param array  $args        Arguments passed to get_avatar_data(), after processing.
    41994199         */
    function get_avatar_data( $id_or_email, $args = null ) { 
    42044204         *
    42054205         * @since 4.2.0
    42064206         *
    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.
    42104210         */
    42114211        return apply_filters( 'get_avatar_data', $args, $id_or_email );
    42124212}
  • src/wp-includes/ms-functions.php

    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 ) { 
    24262426}
    24272427
    24282428/**
    2429  * Returns the space used by the current blog.
     2429 * Returns the space used by the current site.
    24302430 *
    24312431 * @since 3.5.0
    24322432 *
    2433  * @return int Used space in megabytes
     2433 * @return int Used space in megabytes.
    24342434 */
    24352435function get_space_used() {
    24362436        /**
    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.
    24382438         *
    24392439         * @since 3.5.0
    24402440         *
    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.
    24422442         */
    24432443        $space_used = apply_filters( 'pre_get_space_used', false );
    24442444        if ( false === $space_used ) {
  • src/wp-includes/ms-load.php

    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 ) { 
    203203         *
    204204         * @since 3.9.0
    205205         *
    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.
    212212         */
    213213        $pre = apply_filters( 'pre_get_site_by_path', null, $domain, $path, $segments, $paths );
    214214        if ( null !== $pre ) {
  • src/wp-includes/pluggable.php

    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' ) ) : 
    26082608                 *
    26092609                 * @since 4.2.0
    26102610                 *
    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.
    26152615                 */
    26162616                $avatar = apply_filters( 'pre_get_avatar', null, $id_or_email, $args );
    26172617
  • src/wp-includes/post.php

    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 ) { 
    29352935         *
    29362936         * @since 4.4.0
    29372937         *
    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.
    29412941         */
    29422942        $check = apply_filters( 'pre_delete_post', null, $post, $force_delete );
    29432943        if ( null !== $check ) {
    function wp_trash_post( $post_id = 0 ) { 
    31043104         *
    31053105         * @since 4.9.0
    31063106         *
    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.
    31093109         */
    31103110        $check = apply_filters( 'pre_trash_post', null, $post );
    31113111        if ( null !== $check ) {
    function wp_untrash_post( $post_id = 0 ) { 
    31733173         *
    31743174         * @since 4.9.0
    31753175         *
    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.
    31783178         */
    31793179        $check = apply_filters( 'pre_untrash_post', null, $post );
    31803180        if ( null !== $check ) {
    function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p 
    42844284         *
    42854285         * @since 5.1.0
    42864286         *
    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.
    42934293         */
    42944294        $override_slug = apply_filters( 'pre_wp_unique_post_slug', null, $slug, $post_ID, $post_status, $post_type, $post_parent );
    42954295        if ( null !== $override_slug ) {
    function get_posts_by_author_sql( $post_type, $full = true, $post_author = null, 
    63516351}
    63526352
    63536353/**
    6354  * Retrieve the date that the last post was published.
     6354 * Retrieves the most recent time that a post on the site was published.
    63556355 *
    63566356 * The server timezone is the default and is the difference between GMT and
    63576357 * 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, 
    63626362 *
    63636363 * @param string $timezone  Optional. The timezone for the timestamp. Accepts 'server', 'blog', or 'gmt'.
    63646364 *                          '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.
    63676367 *                          Default 'server'.
    63686368 * @param string $post_type Optional. The post type to check. Default 'any'.
    63696369 * @return string The date of the last post.
    63706370 */
    63716371function get_lastpostdate( $timezone = 'server', $post_type = 'any' ) {
    63726372        /**
    6373          * Filters the date the last post was published.
     6373         * Filters the most recent time that a post on the site was published.
    63746374         *
    63756375         * @since 2.3.0
    63766376         *
    function get_lastpostdate( $timezone = 'server', $post_type = 'any' ) { 
    63826382}
    63836383
    63846384/**
    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.
    63866386 *
    63876387 * The server timezone is the default and is the difference between GMT and
    63886388 * server time. The 'blog' value is just when the last post was modified. The
    function get_lastpostdate( $timezone = 'server', $post_type = 'any' ) { 
    63956395 *                          for information on accepted values.
    63966396 *                          Default 'server'.
    63976397 * @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.
    63996399 */
    64006400function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) {
    64016401        /**
    function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) { 
    64036403         *
    64046404         * @since 4.4.0
    64056405         *
    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.
    64116411         */
    64126412        $lastpostmodified = apply_filters( 'pre_get_lastpostmodified', false, $timezone, $post_type );
    64136413        if ( false !== $lastpostmodified ) {
    function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) { 
    64226422        }
    64236423
    64246424        /**
    6425          * Filters the date the last post was modified.
     6425         * Filters the most recent time that a post was modified.
    64266426         *
    64276427         * @since 2.3.0
    64286428         *
    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.
    64306430         * @param string $timezone         Location to use for getting the post modified date.
    64316431         *                                 See get_lastpostdate() for accepted `$timezone` values.
    64326432         */
    function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) { 
    64346434}
    64356435
    64366436/**
    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.
    64386438 *
    64396439 * @since 3.1.0
    64406440 * @since 4.4.0 The `$post_type` argument was added.
    function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) { 
    64466446 *                          for information on accepted values.
    64476447 * @param string $field     Post field to check. Accepts 'date' or 'modified'.
    64486448 * @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.
    64506450 */
    64516451function _get_last_post_time( $timezone, $field, $post_type = 'any' ) {
    64526452        global $wpdb;
  • src/wp-includes/shortcodes.php

    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 ) { 
    305305        /**
    306306         * Filters whether to call a shortcode callback.
    307307         *
    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
    309309         * shortcode generation process, returning that value instead.
    310310         *
    311311         * @since 4.7.0
    312312         *
    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.
    314314         * @param string       $tag         Shortcode name.
    315315         * @param array|string $attr        Shortcode attributes array or empty string.
    316316         * @param array        $m           Regular expression match array.
  • src/wp-includes/taxonomy.php

    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 ) { 
    13581358 * @global wpdb $wpdb WordPress database abstraction object.
    13591359 *
    13601360 * @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.
    13621362 * @param int        $parent   Optional. ID of parent term under which to confine the exists search.
    13631363 * @return mixed Returns null if the term does not exist. Returns the term ID
    13641364 *               if no taxonomy is specified and the term ID exists. Returns
    function wp_get_object_terms( $object_ids, $taxonomies, $args = array() ) { 
    20972097 *
    20982098 * @since 2.3.0
    20992099 *
    2100  * @param string       $term     The term to add or update.
     2100 * @param string       $term     The term name to add or update.
    21012101 * @param string       $taxonomy The taxonomy to which to add the term.
    21022102 * @param array|string $args {
    21032103 *     Optional. Array or string of arguments for inserting a term.
    function wp_insert_term( $term, $taxonomy, $args = array() ) { 
    21172117        if ( ! taxonomy_exists( $taxonomy ) ) {
    21182118                return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    21192119        }
     2120
    21202121        /**
    21212122         * Filters a term before it is sanitized and inserted into the database.
    21222123         *
    21232124         * @since 3.0.0
    21242125         *
    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.
    21272128         */
    21282129        $term = apply_filters( 'pre_insert_term', $term, $taxonomy );
    21292130        if ( is_wp_error( $term ) ) {
  • src/wp-includes/wp-db.php

    diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
    index 57471dc2ed..64da5169e1 100644
    a b class wpdb { 
    27032703                 *
    27042704                 * @since 4.2.0
    27052705                 *
    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.
    27082708                 */
    27092709                $charset = apply_filters( 'pre_get_table_charset', null, $table );
    27102710                if ( null !== $charset ) {
    class wpdb { 
    28072807                 *
    28082808                 * @since 4.2.0
    28092809                 *
    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.
    28132813                 */
    28142814                $charset = apply_filters( 'pre_get_col_charset', null, $table, $column );
    28152815                if ( null !== $charset ) {