edit.php all post not working

finally found the solution when i enter all the custom post status to public it declare the post_type to default post as global so applied filter to change the global post_type based what type request get in URL


function publishPress_allPost_pre_get_posts( &$wp_query )
{
    if ( is_admin() && array_key_exists( 'post_type', $_GET ) ) {
        $wp_query->set( 'post_type', $_GET['post_type'] );
        add_filter( 'the_posts', 'publishPress_allPost_the_posts', 10, 2 );
    }
}

function publishPress_allPost_the_posts( $posts, &$wp_query )
{
    $wp_query->set( 'post_type', $GLOBALS['post_type'] );
    return $posts;
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)