Last active
August 29, 2015 14:07
-
-
Save aaroneaton/98d2715123d203b56a57 to your computer and use it in GitHub Desktop.
create addon
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 | |
add_action( 'plugins_loaded', 'om_sample_plugins_loaded' ); | |
function om_sample_plugins_loaded() { | |
// Bail if the main class does not exist. | |
if ( ! class_exists( 'Optin_Monster' ) ) { | |
return; | |
} | |
// Fire up the addon. | |
add_action( 'optin_monster_init', 'om_sample_plugin_init' ); | |
} | |
function om_sample_plugin_init() { | |
/** | |
* The 'optin_monster_themes' filter allows for the addition of | |
* new lightbox themes. | |
*/ | |
add_filter( 'optin_monster_themes', 'om_sample_add_lightbox_theme', 10, 2 ); | |
/** | |
* The 'optin_monster_theme_api' filter directs the new optin request | |
* to the correct theme file. | |
*/ | |
add_filter( 'optin_monster_theme_api', 'om_sample_lightbox_theme_api', 10, 4 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment