我想知道如何修改以下代码以检查当前用户是否已在我的 wordpress 网络上设置了站点/博客?
<?php
global $wp_roles;
foreach ( $wp_roles->role_names as $role => $name ) :
if ( current_user_can( $role ) && $role == 'administrator') {
if ( class_exists( 'MarketpressFadminWidget' ) ) {
$mp_frontend_settings = get_option( 'mp_frontend_settings' );
$mp_frontend_settings = unserialize($mp_frontend_settings);
$adminpage = $mp_frontend_settings['page_id'];
$permalink = get_permalink($adminpage);
?>
// My Links / Html Content
<?php
}