<?php
add_action( 'save_post', 'your_action' );
function your_action( $post_id ) {
if ( !wp_is_post_revision( $post_id ) ) {
// Do this only if not a revision
}
}
?>
Use the if condition to check if post is not revision.
<?php
add_action( 'save_post', 'your_action' );
function your_action( $post_id ) {
if ( !wp_is_post_revision( $post_id ) ) {
// Do this only if not a revision
}
}
?>
Use the if condition to check if post is not revision.