PUM_Site_Popups::load_popup( $id )


Description Description


Source Source

File: classes/Site/Popups.php

	public static function load_popup( $id ) {
		if ( did_action( 'wp_head' ) && ! in_array( $id, self::$loaded_ids ) ) {
			$args1 = [
				'post_type' => 'popup',
				'p'         => $id,
			];
			$query = new WP_Query( $args1 );
			if ( $query->have_posts() ) {
				while ( $query->have_posts() ) :
					$query->next_post();
					pum()->current_popup = $query->post;
					self::preload_popup( $query->post );
				endwhile;
				pum()->current_popup = null;
			}
		}

		return;
	}


Top ↑

User Contributed Notes User Contributed Notes

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