你有一些严重的语法错误-一旦你打开它<?php
标记,您正在运行PHP-无需再次执行它(即在变量赋值字符串中):
if ( is_user_logged_in() ) { // Only show the output below if a user is logged in
$admin_link = esc_url( admin_url() ); // Escaped admin link
$logout_link = esc_url( wp_logout_url() ); // Escaped logout link
if ( current_user_can( \'manage_options\' ) ) { // Current user is an admin, show the admin link
echo \' · <a href="\' . $admin_link . \'">Admin</a> ·\';
}
echo \' · <a href="\' . $logout_link . \'">Log out</a> ·\';
}