Plugin to allow visitor contributions to WordPress posts, wiki style.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB

class visitors_edits_EMAIL{
var $subject;
var $body;
public function __construct($cpts,$template){
public function send($destination){
$options=get_option( "visitors_edits_options", [
$headers= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";
wp_mail($destination, $this->subject, $this->body,$headers);
subject : $this->subject
body : $this->body
private function loadTemplate($template){
return [
private function inject($str,$body){
foreach ($body as $key => $value) {
return $str;
public function preview(){
echo $this->subject;
echo $this->body;