PHP code example of alleyinteractive / wp-newsletter-builder

1. Go to this page and download the library: Download alleyinteractive/wp-newsletter-builder 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/ */

    

alleyinteractive / wp-newsletter-builder example snippets


$plugin = WP_Newsletter_Builder\WP_Newsletter_Builder\WP_Newsletter_Builder();
$plugin->perform_magic();


/**
 * Plugin Name: PROVIDER for WP Newsletter Builder
 * Description: Plugin to enable PROVIDER as an email provider for WP Newsletter Builder.
 * Version: 0.1.0
 * Author: Alley
 *
 * Text Domain: newsletter-testing
 * Domain Path: /languages/
 *
 * @package newsletter-testing
 */
add_filter( 'wp_newsletter_builder_selected_provider',
	fn( $provider ) => 'WP_Newsletter_Builder\Email_Providers\PROVIDER'
);

add_filter( 'wp_newsletter_builder_allowed_post_types',
  function( array $allowed_post_types ) {
    $allowed_post_types[] = 'podcast';
    return $allowed_post_types;
  }
);