This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Activate the wordpress importer | |
wp plugin activate wordpress-importer --url=http://localhost/example.com/ | |
# Iterate over all of the import files in a given folder. | |
for f in myfolder/*.xml; do wp import $f --authors=skip --skip=attachment --url=localhost/example.com/; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Exclude the files ajax, upload and WP CRON scripts from authentication | |
<FilesMatch "(admin-ajax\.php|media-upload\.php|async-upload\.php|wp-cron\.php|xmlrpc\.php)$"> | |
Order allow,deny | |
Allow from all | |
Satisfy any | |
</FilesMatch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// The ID of the lists you want to add a user to | |
$list_ids = array( 1 ); | |
// User Data without the custom fields | |
$data_subscriber = array( | |
'user' => array( | |
'email' => '[email protected]', | |
'firstname' => 'John', | |
'lastname' => 'Doe', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* If your theme or plugin is inserting files in MailPoet pages | |
* and it is breaking some functions, you should apply this | |
* conditional to load your files. | |
* | |
* Normally themes use these functions wp_enqueue_style() and wp_enqueue_script() | |
*/ | |
if ( ( isset($_GET['page']) && $_GET['page'] != 'wysija_campaigns' ) && ( isset($_GET['page']) && $_GET['page'] != 'wysija_subscribers' ) && ( isset($_GET['page']) && $_GET['page'] != 'wysija_statistics' ) && ( isset($_GET['page']) && $_GET['page'] != 'wysija_config' ) ) { | |
// Put your enqueue styles and scripts here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User-agent: * | |
Disallow: /*?wysijap=* | |
Disallow: /*?wysija-page=* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function($){ | |
$(document).ready(function(){ | |
$( 'form.widget_wysija' ).submit(function(e){ | |
e.preventDefault(); | |
setTimeout(function() { | |
var msg = $( '.wysija-msg' ); | |
if( msg.text() !== '' ){ | |
window.location.replace( 'http://your_thank_you_page_url' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This is a sample function showing how to get a link toward the "Manage your subscriptions page" in Wysija (http://wordpress.org/plugins/wysija-newsletters/description/) | |
* You'll need to call that function at a moment where Wysija's classes are already loaded otherwise it won't work | |
* @return subscription link for the current logged in WordPress' user | |
*/ | |
function wysija_get_subscriptions_edit_link(){ | |
// wysija classes ar enot loaded so we can't use that function | |
if (!class_exists('WYSIJA')){ | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($) { | |
var unique = $('.wysija-checkbox'); | |
$(unique).click(function() { | |
$(unique).prop('checked', false ); | |
$(this).prop('checked', true); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* function to return an undo unsbscribe string for MailPoet newsletters | |
* you could place it in the functions.php of your theme | |
* @return string | |
*/ | |
function mpoet_get_undo_unsubscribe(){ | |
if(class_exists('WYSIJA') && !empty($_REQUEST['wysija-key'])){ | |
$undo_paramsurl = array( |
NewerOlder