mirror of
git://develop.git.wordpress.org/
synced 2025-02-13 03:04:42 +01:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@49173 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
254ca903b2
commit
46119b8367
@ -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 ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user