PUM_Popups

Class Post_Types


Description Description


Source Source

File: classes/Popups.php

class PUM_Popups {

	/**
	 * Hook the initialize method to the WP init action.
	 */
	public static function init() {
	}


	/**
	 * @deprecated 1.8.0
	 * @remove 1.9.0
	 *
	 * @return \WP_Query
	 */
	public static function get_all() {
		static $query;

		if ( ! isset( $query ) ) {
			$query = self::query();
		}

		return $query;
	}

	/**
	 * @deprecated 1.8.0
	 * @remove 1.9.0
	 *
	 * @return \WP_Query
	 */
	public static function query( $args = array() ) {
		$args = wp_parse_args( $args, array(
			'post_type'      => 'popup',
			'posts_per_page' => - 1,
		) );

		return new WP_Query( $args );
	}

}

Top ↑

Methods Methods

  • get_alldeprecated
  • init — Hook the initialize method to the WP init action.
  • querydeprecated

Top ↑

User Contributed Notes User Contributed Notes

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