JavaScript Wordpress:将管理员电子邮件更改为新用户(示例2)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JavaScript Wordpress:将管理员电子邮件更改为新用户(示例2)相关的知识,希望对你有一定的参考价值。

/** ******** ******** ******** ******** ******** ******** ******** ******** 
* TITLE:       Change admin e-mail to new users
* DESCRIPTION: auto-detect the server so you only have to enter the front/from half of the email address, including the @ sign
* 
* http://snipplr.com/view/77687/wordpress-change-admin-email-to-new-users/
* http://miloguide.com/filter-hooks/wp_mail_from_name/
* http://premium.wpmudev.org/blog/wordpress-email-settings/
* 
*/
function admin_email_filter_wp_mail_from($email){
	/* start of code lifted from wordpress core, at http://svn.automattic.com/wordpress/tags/3.4/wp-includes/pluggable.php */
	$sitename = strtolower( $_SERVER['SERVER_NAME'] );
	if ( substr( $sitename, 0, 4 ) == 'www.' ) {
		$sitename = substr( $sitename, 4 );
	}
	/* end of code lifted from wordpress core */
	$myfront = "whateverIwant@";
	$myback = $sitename;
	$myfrom = $myfront . $myback;
	return $myfrom;
}
add_filter("wp_mail_from", "admin_email_filter_wp_mail_from");

以上是关于JavaScript Wordpress:将管理员电子邮件更改为新用户(示例2)的主要内容,如果未能解决你的问题,请参考以下文章

JavaScript Wordpress:将管理员电子邮件更改为新用户(示例2)

谷歌标签管理器在 wordpress 网站上导致 javascript 错误

php 管理wordpress中的Javascript依赖项

WordPress JavaScript

我无法将 javascript 文件应用到 Wordpress。我如何将脚本排入队列?

尝试将自定义 Javascript 集成到 Wordpress