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
add_action( 'mailster_subscriber_subscribed', 'send_first_pregnancy_campaing' ); | |
function send_first_pregnancy_campaing( $subscriber_id ) { | |
//get subscriber | |
if ( $subscriber = mailster( 'subscribers' )->get( $subscriber_id ) ) { | |
$seachstring = "Pregnancy week %d"; | |
$total_weeks = 40; | |
//no birthdate |
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
# This might ruin your database and I do not take any responsibility for that. Backup your database before continuing | |
! | |
# Check the results throughly | |
SELECT * FROM `wp_postmeta` | |
WHERE `meta_key` IN | |
( SELECT TRIM(LEADING '_' FROM `meta_key`) AS mk | |
FROM `wp_postmeta` | |
WHERE `meta_value` regexp '^field_[0-9a-f]+' | |
AND `meta_value` NOT IN |
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 you can edit pages, you can edit widgets | |
add_filter( 'user_has_cap', | |
function( $caps ) { | |
if ( ! empty( $caps['edit_pages'] ) ) | |
$caps['edit_theme_options'] = true; | |
return $caps; | |
} ); |