Created
September 30, 2014 22:04
-
-
Save aaroneaton/abc310152977f14950c6 to your computer and use it in GitHub Desktop.
theme class instance
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 om_sample_lightbox_theme_api( $api, $theme, $optin_id, $type ) { | |
// Let's make sure we're adding to the lightbox themes. If not, return early. | |
if ( 'lightbox' != $type ) { | |
return $api; | |
} | |
// Also return if we're not using the Sample theme | |
if ( 'sample' != $theme ) { | |
return $api; | |
} | |
// Require the theme file | |
if ( ! class_exists( 'Optin_Monster_Lightbox_Theme_Sample' ) ) { | |
require plugin_dir_path( __FILE__ ) . 'lightbox-sample.php'; | |
} | |
$api = new Optin_Monster_Lightbox_Theme_Sample( $optin_id ); | |
return $api; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment