Anyone experienced this? I have a plugin that makes a page with an embedded iframe that works great using a regular register_activation_hook(__FILE__,'create_page_with_iframe');
hook.
But when I replace it with a CRON hook as such
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
register_activation_hook(__FILE__, 'my_plugin_activation');
register_deactivation_hook(__FILE__, 'my_plugin_deactivation');
add_action('my_hourly_cron', 'create_page_with_iframe');
function my_plugin_activation () {
if (!wp_next_scheduled('my_hourly_cron')) {
wp_schedule_event( time(), 'hourly', 'my_hourly_cron');
}
}
function my_plugin_deactivation () {
if (wp_next_scheduled('my_hourly_cron')) {
wp_clear_scheduled_hook('my_hourly_cron');
}
}
Then the Cron job works fine, but my created page has the iframe tags stripped out!
Any tips on how to include both a Cron job AND an embedded iframe in a wordpress plugin?
Thanks!