• Hello,
    I’ve discovered that your plugin Shortcodes Ultimate Add-ons – Maker saves the shortcodes as wp_post or in any way trigger the “transition_post_status”.

    This may be risky if there is another plugin (like mine) that sends push notification to mobile app foreach article published. We sent a bunch of blank notification to our users.

    To avoid that I would like to insert a filter on your post and mine but unfortunately I don’t have your plugin. Can you give me an advice on how to exclude your custom shortcodes to transition_post_status?

    Here’s a snapshot of the code

    function uni_plg_post_justpublished( $new_status, $old_status, $post )
    {
    if ( $old_status != ‘publish’ && $new_status == ‘publish’ )
    {
    // A function to perform actions when a post status changes from any status to publish.
    //HERE i would like to check if the post is a custom shortcode and if yes don’t schedule the event
    if (‘on’ == get_option(‘uni_plg_enable_auto_push’))
    wp_schedule_single_event( time() + 120 , ‘uni_plg_post_published_notification’, array( $post->ID, $post ) );
    }
    }
    add_action( ‘transition_post_status’, ‘uni_plg_post_justpublished’, 10, 3 );

The topic ‘Saving a custom shortcode trigger transition_post_status’ is closed to new replies.