Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Site_Assets::get_popup_settings()

Gets public settings for each popup for a global JS variable.


Description Description


Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Return Return

(array)


Top ↑

Source Source

File: classes/Site/Assets.php

	public static function get_popup_settings() {
		$loaded = PUM_Site_Popups::get_loaded_popups();

		$settings = array();

		$current_popup = pum()->current_popup;

		if ( $loaded->have_posts() ) {
			while ( $loaded->have_posts() ) : $loaded->next_post();
				pum()->current_popup = $loaded->post;
				$popup               = pum_get_popup( $loaded->post->ID );
				// Set the key to the CSS id of this popup for easy lookup.
				$settings[ 'pum-' . $popup->ID ] = $popup->get_public_settings();
			endwhile;

			pum()->current_popup = $current_popup;
		}

		return $settings;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.