Show Page Edit By Slug

if (!empty($_GET['slug'])) {

    $current = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);

	$page = get_page_by_path( $current ); 
	echo "<a href='".site_url()."/wp-admin/post.php?post=".$page->ID."&action=edit'>Page</a>";
	exit;
}
Comments