WordPress.org

Make WordPress Core

Changeset 49173


Ignore:
Timestamp:
10/16/2020 09:38:17 AM (12 months ago)
Author:
SergeyBiryukov
Message:

Docs: Add @since tags for the fire_after_hooks parameter of wp_insert_post(), wp_update_post(), and wp_insert_attachment().

Document the parameter as optional.

Follow-up to [49172].

See #45114.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r49172 r49173  
    35993599 *
    36003600 * @since 1.0.0
     3601 * @since 2.6.0 Added the `$wp_error` parameter to allow a WP_Error to be returned on failure.
    36013602 * @since 4.2.0 Support was added for encoding emoji in the post title, content, and excerpt.
    36023603 * @since 4.4.0 A 'meta_input' array can now be passed to `$postarr` to add post meta data.
     3604 * @since 5.6.0 Added the `fire_after_hooks` parameter.
    36033605 *
    36043606 * @see sanitize_post()
     
    36473649 * }
    36483650 * @param bool  $wp_error         Optional. Whether to return a WP_Error on failure. Default false.
    3649  * @param bool  $fire_after_hooks Whether to fire the after insert hooks. Default true.
     3651 * @param bool  $fire_after_hooks Optional. Whether to fire the after insert hooks. Default true.
    36503652 * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure.
    36513653 */
     
    43264328 *
    43274329 * @since 1.0.0
     4330 * @since 3.5.0 Added the `$wp_error` parameter to allow a WP_Error to be returned on failure.
     4331 * @since 5.6.0 Added the `fire_after_hooks` parameter.
    43284332 *
    43294333 * @param array|object $postarr          Optional. Post data. Arrays are expected to be escaped,
    43304334 *                                       objects are not. Default array.
    4331  * @param bool         $wp_error         Optional. Allow return of WP_Error on failure. Default false.
    4332  * @param bool         $fire_after_hooks Whether to fire the after insert hooks. Default true.
     4335 * @param bool         $wp_error         Optional. Whether to return a WP_Error on failure. Default false.
     4336 * @param bool         $fire_after_hooks Optional. Whether to fire the after insert hooks. Default true.
    43334337 * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure.
    43344338 */
     
    58235827 * @since 2.0.0
    58245828 * @since 4.7.0 Added the `$wp_error` parameter to allow a WP_Error to be returned on failure.
     5829 * @since 5.6.0 Added the `fire_after_hooks` parameter.
    58255830 *
    58265831 * @see wp_insert_post()
     
    58305835 * @param int          $parent           Optional. Parent post ID.
    58315836 * @param bool         $wp_error         Optional. Whether to return a WP_Error on failure. Default false.
    5832  * @param bool         $fire_after_hooks Whether to fire the after insert hooks. Default true.
     5837 * @param bool         $fire_after_hooks Optional. Whether to fire the after insert hooks. Default true.
    58335838 * @return int|WP_Error The attachment ID on success. The value 0 or WP_Error on failure.
    58345839 */
Note: See TracChangeset for help on using the changeset viewer.