How to Prevent logged out posting auto save feature in WordPress?

        add_action('init', 'wpsc_prevent_logged_out_auto_save');

        function wpsc_prevent_logged_out_auto_save()
        {
            if (!is_user_logged_in()) {
                remove_action('wp_ajax_nopriv_geodir_auto_save_post', array('GeoDir_AJAX', 'auto_save_post'));
            }
        }

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Share This