Retrieve Path of admin.php

Is there a better way of retrieving the path of admin.php and the url of wp-admin.css?

What I can think of is:

Read More
$adminphppath = ABSPATH . 'wp-adminadmin.php';
$admincssurl = get_bloginfo('wpurl') . '/wp-admin/css/wp-admin.css";

But, some may be changing the admin path for security. So I need a more reliable way.

[Edit] I need the system path for admin.php, not url. Because I need to include it.

Related posts

Leave a Reply

2 comments

  1. Old question I know, but this accounts for installs where wp-admin is not the admin directory

    $admin_abspath = str_replace( site_url(), ABSPATH, admin_url() );
    $admin_php_path = $admin_abspath . '/wp-admin/admin.php';