Inventory_Presser_Additional_Listings_Pages::hooks()

hooks


Description Description

Adds hooks


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class-additional-listings-pages.php

	function hooks()
	{
		//Are additional listings pages enabled?
		$settings = INVP::settings();
		if( empty( $settings['additional_listings_page'] ) || ! $settings['additional_listings_page'] )
		{
			return;
		}
		add_filter( 'invp_rewrite_slugs', array( $this, 'add_rewrite_slugs' ) );
		add_filter( 'invp_rewrite_rules', array( $this, 'add_rewrite_rules' ) );
		add_action( 'pre_get_posts', array( $this, 'modify_query' ) );
	}