Created
September 20, 2015 19:35
-
-
Save danieliser/e34a156e3da722437912 to your computer and use it in GitHub Desktop.
Disable auto open for a popup if $_GET parameter is missing or empty.
This file contains hidden or 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( 'popmake_get_the_popup_data_attr', 'my_custom_popup_data_attr', 10, 2 ); | |
| function my_custom_popup_data_attr( $data_attr, $popup_id ) { | |
| if ( $popup_id == 123 && empty( $_GET['popup'] ) ) { | |
| unset( $data_attr['meta']['auto_open'] ); | |
| } | |
| return $data_attr; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment