Created
July 27, 2018 04:25
-
-
Save danieliser/3c2402450799af9e84d59a16c7a86d57 to your computer and use it in GitHub Desktop.
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( 'init', 'my_custom_function' ); | |
function my_custom_function () { | |
$popups = get_posts( array( 'post_type' => 'popup' ) ); | |
foreach( $popups as $popup ) { | |
$popup = pum_get_popup( $popup->ID ); | |
// Do stuff with $popup. | |
$popup->update_setting( 'position_top', 10 ); // Set to 10px from top position. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment