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. Built from https://develop.svn.wordpress.org/trunk@49173 git-svn-id: http://core.svn.wordpress.org/trunk@48935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
32d193f96f
commit
6c13cdd533
|
@ -3598,8 +3598,10 @@ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
|
|||
* setting the value for 'comment_status' key.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @since 2.6.0 Added the `$wp_error` parameter to allow a WP_Error to be returned on failure.
|
||||
* @since 4.2.0 Support was added for encoding emoji in the post title, content, and excerpt.
|
||||
* @since 4.4.0 A 'meta_input' array can now be passed to `$postarr` to add post meta data.
|
||||
* @since 5.6.0 Added the `fire_after_hooks` parameter.
|
||||
*
|
||||
* @see sanitize_post()
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
|
@ -3646,7 +3648,7 @@ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
|
|||
* @type array $meta_input Array of post meta values keyed by their post meta key. Default empty.
|
||||
* }
|
||||
* @param bool $wp_error Optional. Whether to return a WP_Error on failure. Default false.
|
||||
* @param bool $fire_after_hooks Whether to fire the after insert hooks. Default true.
|
||||
* @param bool $fire_after_hooks Optional. Whether to fire the after insert hooks. Default true.
|
||||
* @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure.
|
||||
*/
|
||||
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) {
|
||||
|
@ -4325,11 +4327,13 @@ function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true )
|
|||
* not be overridden.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @since 3.5.0 Added the `$wp_error` parameter to allow a WP_Error to be returned on failure.
|
||||
* @since 5.6.0 Added the `fire_after_hooks` parameter.
|
||||
*
|
||||
* @param array|object $postarr Optional. Post data. Arrays are expected to be escaped,
|
||||
* objects are not. Default array.
|
||||
* @param bool $wp_error Optional. Allow return of WP_Error on failure. Default false.
|
||||
* @param bool $fire_after_hooks Whether to fire the after insert hooks. Default true.
|
||||
* @param bool $wp_error Optional. Whether to return a WP_Error on failure. Default false.
|
||||
* @param bool $fire_after_hooks Optional. Whether to fire the after insert hooks. Default true.
|
||||
* @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure.
|
||||
*/
|
||||
function wp_update_post( $postarr = array(), $wp_error = false, $fire_after_hooks = true ) {
|
||||
|
@ -5822,6 +5826,7 @@ function is_local_attachment( $url ) {
|
|||
*
|
||||
* @since 2.0.0
|
||||
* @since 4.7.0 Added the `$wp_error` parameter to allow a WP_Error to be returned on failure.
|
||||
* @since 5.6.0 Added the `fire_after_hooks` parameter.
|
||||
*
|
||||
* @see wp_insert_post()
|
||||
*
|
||||
|
@ -5829,7 +5834,7 @@ function is_local_attachment( $url ) {
|
|||
* @param string $file Optional. Filename.
|
||||
* @param int $parent Optional. Parent post ID.
|
||||
* @param bool $wp_error Optional. Whether to return a WP_Error on failure. Default false.
|
||||
* @param bool $fire_after_hooks Whether to fire the after insert hooks. Default true.
|
||||
* @param bool $fire_after_hooks Optional. Whether to fire the after insert hooks. Default true.
|
||||
* @return int|WP_Error The attachment ID on success. The value 0 or WP_Error on failure.
|
||||
*/
|
||||
function wp_insert_attachment( $args, $file = false, $parent = 0, $wp_error = false, $fire_after_hooks = true ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.6-alpha-49172';
|
||||
$wp_version = '5.6-alpha-49173';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue