| @@ -4,13 +4,17 @@ | ||
| 4 | 4 | * @category Load JS and CSS files |
| 5 | 5 | * @author wpdevelop |
| 6 | 6 | * |
| 7 | 7 | * @web-site https://wpbookingcalendar.com/ |
| 8 | - * @email info@wpbookingcalendar.com | |
| 9 | - * | |
| 8 | + * @email info@wpbookingcalendar.com | |
| 9 | + * | |
| 10 | 10 | * @modified 2015-10-28 |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 14 | + exit; // Exit if accessed directly. | |
| 15 | +} | |
| 16 | + | |
| 13 | 17 | abstract class WPBC_JS_CSS { |
| 14 | 18 | |
| 15 | 19 | public $objects = array(); |
| 16 | 20 | public $type; // css || js |
| @@ -111,10 +115,12 @@ | ||
| 111 | 115 | |
| 112 | 116 | $is_load_scripts = true; |
| 113 | 117 | |
| 114 | 118 | $is_load_scripts = apply_filters( 'wpbc_is_load_script_on_this_page', $is_load_scripts ); |
| 115 | - | |
| 116 | - if ( ! $is_load_scripts ) return; // Exist, if on some page we do not need to load scripts | |
| 119 | + | |
| 120 | + $force = apply_filters( 'wpbc_force_client_assets', false ); | |
| 121 | + | |
| 122 | + if ( ! $force && ! $is_load_scripts ) return; // Exist, if on some page we do not need to load scripts | |
| 117 | 123 | |
| 118 | 124 | |
| 119 | 125 | foreach( $this->objects as $num => $script ) { |
| 120 | 126 | |