我对这种方法有一些问题:
funtion AddUser($data){
$WP_array = array(
\'user_login\' => "info here",
\'user_email\' => "info here",
\'user_pass\' => "info here",
\'first_name\' => "info here",
\'last_name\' => "info here",
\'role\' => "info here",
\'show_admin_bar_front\' => "info here",
) ;
$user_id = wp_insert_user($WP_array);
}
添加新用户后,wordpress会自动发送一封空电子邮件D:那么我该怎么做才能防止这种情况发生,我实际上在我的功能中使用了。php
add_action( \'init\', function() {
remove_action( \'register_new_user\', \'wp_send_new_user_notifications\' );
});
你有什么线索吗?
提前谢谢你