Plugin Assets Filter

bh_sl_page_check

Description

Filter that disables the JavaScript, CSS, and localized JavaScript settings and location data on the pages specified. Without setting this filter these assets will load globally because the plugin doesn’t know what page the locator/s will be added to. Its use is recommended if you’ve got a few hundred locations and are noticing an increase in page weight.

Parameters

Name Type Description
$check bool Set the return value to false on pages you don’t want the assets loaded on. The default value is true.

Example

The following example disables the asset loading on everything but the locator page and the single location pages.