Support » Plugin: Publish Confirm » Bug with the filter : publish_confirm_post_types

  • Hello,

    When I try to unset confirmation for some custom post types, it still have always the message.

    I’ve update your method inject_js() to take care of the result returned by the method validate_post_type()

    
      public static function inject_js() {
    
        if( self::validate_post_type() ) {
    
          // Is jQuery loaded.
          if ( ! wp_script_is( 'jquery', 'done' ) ) {
            return;
          }
    
          // Print javascript.
          self::_print_js( self::get_message() );
    
        }
      }
    

    I’ve also simplify the method validate_post_type()

    
    ...
    ...
    return in_array( $current_pt, (array) $include_pts, true );
    

    Regards,
    Olivier

  • The topic ‘Bug with the filter : publish_confirm_post_types’ is closed to new replies.