可以请任何人帮助修复PHP代码中的这两个问题。
斜体文字也反映在DIV内部,带有 Bakground颜色:#DCDCDC 。它应该在DIV之外。
function send_admin_notification($post_id,$post_title) {
$blogname = get_option('blogname');
$email = get_option('admin_email');
$headers = "MIME-Version: 1.0\r\n" . "From:".$blogname." "."
< ".$email.">\n" . "Content-Type: text/HTML; charset=\"" . get_option('blog_charset') . "\"\r\n";
$message = __('A new post has been submitted in ','accesspress-anonymous-post').$blogname.'site.'.'
<br/>
<br/>'. '
<div style="background-color:#DCDCDC;">
<span style="font-color:Blue" New Post Submission </span>'.'
<br/>
<br/>'; 'Post Title: '.$post_title.'
<br/>
<br/>'; 'Post Module: '.$post_title.'
<br/>
<br/>
</div>';
$post_author_name = get_post_meta($post_id,'ap_author_name',true);
$post_author_email = get_post_meta($post_id,'ap_author_email',true);
$post_author_url = get_post_meta($post_id,'ap_author_url',true);
if($post_author_name!=''){
$message .= 'Post Author Name: '.$post_author_name.'
<br/>
<br/>';
}
if($post_author_email!=''){
$message .= 'Post Author Email: '.$post_author_email.'
<br/>
<br/>';
}
if($post_author_url!=''){
$message .= 'Post Author URL: '.$post_author_url.'
<br/>
<br/>';
}
$message .= '
<br/>
<br/>'.__('
<i>This is an auto generated email. For more details regarding this, please login to Wiki website','accesspress-anonymous-post.</i>');
$subject = __('Process Wiki | New Post Submission','.$post_title.'); wp_mail($email,$subject,$message,$headers);
}
答案 0 :(得分:3)
span未正确关闭
<span style="font-color:Blue" New Post Submission </span>'
使用以下
<span style="color:Blue"> New Post Submission </span>
答案 1 :(得分:1)
尝试使用内联样式
<span style = "property:value;property:value;">Some text</span>