Quantcast
Channel: Topic Tag: action | WordPress.org
Viewing all articles
Browse latest Browse all 889

Kokowaah on "Prompt on post_save"

$
0
0

Hi, I need to open a prompt when editing a post.

With this code I'm able to update post meta:

function duvod( $post_id, $post )
{
	if ( wp_is_post_revision( $post_id ) || $post->post_type != 'inzerat' )
		return;

		update_post_meta($post_id, 'duvod_odmitnuti', 'vsuk');

}
add_action( 'save_post', 'duvod', 10, 2 );

But when I try to change it - open a javascript prompt or php echo but none of them is working.

Is there any restriction when using the 'save_post' action?


Viewing all articles
Browse latest Browse all 889

Trending Articles