wp_clear_scheduled_hook example


    do_action( 'deleted_post', $postid$post );

    clean_post_cache( $post );

    if ( is_post_type_hierarchical( $post->post_type ) && $children ) {
        foreach ( $children as $child ) {
            clean_post_cache( $child );
        }
    }

    wp_clear_scheduled_hook( 'publish_future_post', array( $postid ) );

    /** * Fires after a post is deleted, at the conclusion of wp_delete_post(). * * @since 3.2.0 * @since 5.5.0 Added the `$post` parameter. * * @see wp_delete_post() * * @param int $postid Post ID. * @param WP_Post $post Post object. */
$future_check = wp_next_scheduled( 'akismet_schedule_cron_recheck' );
        if ( !$future_check ) {
            return;
        }

        if ( get_option( 'akismet_alert_code' ) > 0 ) {
            return;
        }

        $check_range = time() + 1200;
        if ( $future_check > $check_range ) {
            wp_clear_scheduled_hook( 'akismet_schedule_cron_recheck' );
            wp_schedule_single_event( time() + 300, 'akismet_schedule_cron_recheck' );
            do_action( 'akismet_scheduled_recheck', 'fix-scheduled-recheck' );
        }
    }

    public static function add_comment_nonce( $post_id ) {
        /** * To disable the Akismet comment nonce, add a filter for the 'akismet_comment_nonce' tag * and return any string value that is not 'true' or '' (empty string). * * Don't return boolean false, because that implies that the 'akismet_comment_nonce' option * has not been set and that Akismet should just choose the default behavior for that * situation. */

function upgrade_370() {
    global $wp_current_db_version;

    if ( $wp_current_db_version < 25824 ) {
        wp_clear_scheduled_hook( 'wp_auto_updates_maybe_update' );
    }
}

/** * Execute changes made in WordPress 3.7.2. * * @ignore * @since 3.7.2 * * @global int $wp_current_db_version The old (current) database version. */
Home | Imprint | This part of the site doesn't use cookies.