PHP code example of tormjens / wp-queue-mail
1. Go to this page and download the library: Download tormjens/wp-queue-mail library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tormjens / wp-queue-mail example snippets
class Publish_Podcast extends WP_Job {
protected $name;
protected $location;
public function __construct( $name, $location ) {
$this->name = $name;
$this->location = $location;
}
public function handle() {
// process the podcast here
}
}
wp_queue(new Publish_Podcast('Scooby Doo And His Friends', 'iTunes'));