I might prefer to name add_action( 'wp_after_insert_post'
on specific screens. I am at the moment checking the web page like so adopted by calling the wp_after_insert_post
hook. It would not appear to fireplace however does if it is swapped with add_action( 'current_screen', 'take a look at' );
as an alternative.
perform take a look at() {
world $current_screen;
if ( isset( $current_screen->base ) ) {
if ( $current_screen->id == 'put up' ) {
$args = array(
'ID' => '10',
'post_name' => 'Some title',
);
// Replace the put up
wp_update_post( $args );
}
}
}
add_action( 'wp_after_insert_post', 'take a look at', 100 );