• strictly-software

    (@strictly-software)


    I don’t know if anyone else has noticed but in Chrome lately I am getting the problem of the “Draft” and “Publish” buttons becoming disabled when there is nothing wrong.

    We used to put this down to a heart beat problem and this bit of code fixed it for me

    // stop heartbeat code
    add_action( 'init', 'stop_heartbeat', 1 );
    
    function stop_heartbeat() {
     global $pagenow;
    
            if ( $pagenow != 'post.php' && $pagenow != 'post-new.php' )
     {
      wp_deregister_script('heartbeat');
     }
    }

    However now it is working some of the time, others I have to inspect the element and take the class “disabled” off the button to click it or use another browser.

    WP haven’t extended the page name to contain folders or domains e.g https://www.mysite.com/wp-admin/post-new.php

    Has anyone else had this issue?

    Thanks

  • The topic ‘Publish & Draft button hidden despite code to stop it’ is closed to new replies.