| @@ -191,44 +191,10 @@ | ||
| 191 | 191 | * @return void |
| 192 | 192 | * @since 1.0.0 |
| 193 | 193 | */ |
| 194 | 194 | public function enqueue_styles() { |
| 195 | - $bricks_version_ba_check = substr( BRICKS_VERSION, 0, 3 ) > '1.3' ? 'style.1.4.css' : 'style.min.css'; | |
| 196 | - wp_register_style( 'ba-flipbox', esc_url( $this->assets_url ) . 'css/flipbox/' . $bricks_version_ba_check, array(), $this->_version ); | |
| 197 | - wp_register_style( 'ba-tilt-image', esc_url( $this->assets_url ) . 'css/tilt-image/' . $bricks_version_ba_check, array(), $this->_version ); | |
| 198 | - wp_register_style( 'ba-lottie', esc_url( $this->assets_url ) . 'css/lottie/style.min.css', array(), $this->_version ); | |
| 199 | - wp_register_style( 'ba-floating', esc_url( $this->assets_url ) . 'css/floating/' . $bricks_version_ba_check, array(), $this->_version ); | |
| 200 | - wp_register_style( 'ba-before-after-image', esc_url( $this->assets_url ) . 'css/before-after-image/' . $bricks_version_ba_check, array(), $this->_version ); | |
| 201 | - wp_register_style( 'ba-icon-list', esc_url( $this->assets_url ) . 'css/icon-list/' . $bricks_version_ba_check, array(), $this->_version ); | |
| 202 | - wp_register_style( 'ba-multi-heading', esc_url( $this->assets_url ) . 'css/multi-heading/' . $bricks_version_ba_check, array(), $this->_version ); | |
| 203 | - wp_register_style( 'ba-content-toggle', esc_url( $this->assets_url ) . 'css/content-toggle/style.min.css', array(), $this->_version ); | |
| 204 | - | |
| 205 | - if ( function_exists( 'bricks_is_builder_iframe' ) && bricks_is_builder_iframe() ) { | |
| 206 | - if ( 'on' === get_option( 'bricksable_flip-box' ) || false === get_option( 'bricksable_flip-box' ) ) { | |
| 207 | - wp_enqueue_style( 'ba-flipbox' ); | |
| 208 | - } | |
| 209 | - if ( 'on' === get_option( 'bricksable_tilt-image' ) || false === get_option( 'bricksable_tilt-image' ) ) { | |
| 210 | - wp_enqueue_style( 'ba-tilt-image' ); | |
| 211 | - } | |
| 212 | - if ( 'on' === get_option( 'bricksable_lottie' ) || false === get_option( 'bricksable_lottie' ) ) { | |
| 213 | - wp_enqueue_style( 'ba-lottie' ); | |
| 214 | - } | |
| 215 | - if ( 'on' === get_option( 'bricksable_floating' ) || false === get_option( 'bricksable_floating' ) ) { | |
| 216 | - wp_enqueue_style( 'ba-floating' ); | |
| 217 | - } | |
| 218 | - if ( 'on' === get_option( 'bricksable_before-after-image' ) || false === get_option( 'bricksable_before-after-image' ) ) { | |
| 219 | - wp_enqueue_style( 'ba-before-after-image' ); | |
| 220 | - } | |
| 221 | - if ( 'on' === get_option( 'bricksable_icon-list' ) || false === get_option( 'bricksable_icon-list' ) ) { | |
| 222 | - wp_enqueue_style( 'ba-icon-list' ); | |
| 223 | - } | |
| 224 | - if ( 'on' === get_option( 'bricksable_multi-heading' ) || false === get_option( 'bricksable_multi-heading' ) ) { | |
| 225 | - wp_enqueue_style( 'ba-multi-heading' ); | |
| 226 | - } | |
| 227 | - if ( 'on' === get_option( 'bricksable_content-toggle' ) || false === get_option( 'bricksable_content-toggle' ) ) { | |
| 228 | - wp_enqueue_style( 'ba-content-toggle' ); | |
| 229 | - } | |
| 230 | - } | |
| 195 | + wp_register_style( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'css/frontend.min.css', array(), $this->_version ); | |
| 196 | + wp_enqueue_style( $this->_token . '-frontend' ); | |
| 231 | 197 | } // End enqueue_styles () |
| 232 | 198 | |
| 233 | 199 | /** |
| 234 | 200 | * Load frontend Javascript. |
| @@ -243,9 +209,9 @@ | ||
| 243 | 209 | wp_register_script( 'ba-text-notation', esc_url( $this->assets_url ) . 'js/text-notation/frontend.min.js', array(), $this->_version, true ); |
| 244 | 210 | wp_register_script( 'ba-lottie', esc_url( $this->assets_url ) . 'js/lottie/frontend.min.js', array(), $this->_version, true ); |
| 245 | 211 | wp_register_script( 'ba-before-after-image', esc_url( $this->assets_url ) . 'js/before-after-image/frontend.min.js', array(), $this->_version, true ); |
| 246 | 212 | wp_register_script( 'ba-content-toggle', esc_url( $this->assets_url ) . 'js/content-toggle/frontend.min.js', array(), $this->_version, true ); |
| 247 | - | |
| 213 | + | |
| 248 | 214 | if ( function_exists( 'bricks_is_builder_iframe' ) && bricks_is_builder_iframe() ) { |
| 249 | 215 | if ( 'on' === get_option( 'bricksable_tilt-image' ) || false === get_option( 'bricksable_tilt-image' ) ) { |
| 250 | 216 | wp_enqueue_script( 'ba-tilt-image' ); |
| 251 | 217 | wp_localize_script( |
| @@ -289,8 +255,9 @@ | ||
| 289 | 255 | if ( 'on' === get_option( 'bricksable_content-toggle' ) || false === get_option( 'bricksable_content-toggle' ) ) { |
| 290 | 256 | wp_enqueue_script( 'ba-content-toggle' ); |
| 291 | 257 | } |
| 292 | 258 | } |
| 259 | + | |
| 293 | 260 | } // End enqueue_scripts () |
| 294 | 261 | |
| 295 | 262 | /** |
| 296 | 263 | * Admin enqueue style. |