'asc-button',
'title' => '
',
'href' => '/wp-admin/admin.php?page=asc-error&link='.$actual_link
);
$wp_admin_bar->add_node($args);
} else {
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
$args = array(
'id' => 'asc-button',
'title' => '
',
'href' => 'https://advanced-site-checker.com/tools/page-checker?url='.urlencode($actual_link),
'meta' => array(
'target' => '_blank'
)
);
$wp_admin_bar->add_node($args);
}
}
add_action('admin_bar_menu', 'asc_button', 50);
function asc_init() {
add_submenu_page('', 'Report', 'Report', 'manage_options', 'asc-error', 'asc_error_page');
}
add_action( 'admin_menu', 'asc_init' );
function asc_error_page() {
?>
Page "=$_GET['link']?>" is an admin page. Our service haven't access to check it.