MarketPress::load_store_templates() should make $is_shop_page available

rsisales Elite
El Presidente
Just Getting Started
84
#1122

Basically, MarketPress::load_store_templates() uses $is_shop_page to denote if the page is a shop page, but keeps it in the local scope. It would be nice to make this a class variable that can be grabbed via a helper method like MarketPress::is_shop_page(). The same thing is in MarketPress_MS::load_marketplace_templates(), so maybe there should actually be a helper function like:

function marketplace_is_shop_place() {
	global $mp, $mp_wpmu;
	if ( is_multisite() )
		return $mp_wpmu->is_shop_page();
	return $mp->is_shop_page();
}

It seems like something that could drop right into template-functions.php.

(0)