wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_after_insert_post › WordPress Function
Since5.6.0
已弃用n/a
› wp_after_insert_post ( $post, $update, $post_before )
参数: (3) |
|
定义在: |
|
文档: |
Fires actions after a post, its terms and meta data has been saved.
Related Functions: wp_insert_post, wp_insert_site, wp_get_single_post, wp_trash_post, wp_insert_user
源码
function wp_after_insert_post( $post, $update, $post_before ) { $post = get_post( $post ); if ( ! $post ) { return; } $post_id = $post->ID; /** * Fires once a post, its terms and meta data has been saved. * * @since 5.6.0 * * @param int $post_id Post ID. * @param WP_Post $post Post object. * @param bool $update Whether this is an existing post being updated. * @param null|WP_Post $post_before Null for new posts, the WP_Post object prior * to the update for updated posts. */ do_action( 'wp_after_insert_post', $post_id, $post, $update, $post_before ); }