Correct check for any admin page with editor

Inspect the global variable $pagenow, and use post_type_supports() to find post types with an editor:

function has_post_editor() 
{    
    global $pagenow;

    if ( empty ( $pagenow ) )
        return FALSE;

    if ( ! in_array( $pagenow, array ( 'post-new.php', 'post.php' ) ) )
        return FALSE;

    return post_type_supports( get_current_screen()->post_type, 'editor' );
}

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