/
home
/
techb158
/
balacoffee.com
/
wp-content
/
themes
/
Divi-1
/
includes
/
builder
/
plugin-compat
/
/home/techb158/balacoffee.com/wp-content/themes/Divi-1/includes/builder/plugin-compat
mkdir
upload
Name
Size
Mode
Actions
scripts/
-
0755
rm
styles/
-
0755
rm
advanced-custom-fields-pro.php
168
0644
edit
dl
rm
advanced-custom-fields.php
9369
0644
edit
dl
rm
amazon-s3-and-cloudfront-pro.php
1035
0644
edit
dl
rm
amazon-s3-and-cloudfront.php
3193
0644
edit
dl
rm
autoptimize.php
1133
0644
edit
dl
rm
caldera-forms.php
1265
0644
edit
dl
rm
cartflows.php
1922
0644
edit
dl
rm
cdn-enabler.php
1472
0644
edit
dl
rm
coursepress.php
1094
0644
edit
dl
rm
divi-filterable-blog-module.php
1061
0644
edit
dl
rm
divi-module-code-snippet.php
1588
0644
edit
dl
rm
divi-testimonial-slider.php
1303
0644
edit
dl
rm
divi_layout_injector.php
3093
0644
edit
dl
rm
divi_woo_layout_injector.php
1402
0644
edit
dl
rm
dk-pdf.php
1941
0644
edit
dl
rm
ds-divi-rocket.php
1081
0644
edit
dl
rm
easy-digital-downloads.php
4522
0644
edit
dl
rm
eventon.php
3269
0644
edit
dl
rm
events-manager.php
1562
0644
edit
dl
rm
final-tiles-grid-gallery-lite.php
1462
0644
edit
dl
rm
gravityforms.php
732
0644
edit
dl
rm
gravityformssignature.php
1707
0644
edit
dl
rm
ht-knowledge-base.php
1680
0644
edit
dl
rm
imagify.php
3212
0644
edit
dl
rm
insert-pages.php
1450
0644
edit
dl
rm
jucra-acf-google-maps-for-divi.php
1296
0644
edit
dl
rm
kvcore-idx.php
915
0644
edit
dl
rm
landing-pages.php
1017
0644
edit
dl
rm
m-chart.php
1310
0644
edit
dl
rm
mappress-google-maps-for-wordpress.php
1744
0644
edit
dl
rm
megamenu.php
1640
0644
edit
dl
rm
modern-events-calendar-lite.php
1186
0644
edit
dl
rm
nex-forms-express-wp-form-builder.php
1350
0644
edit
dl
rm
paid-memberships-pro.php
1388
0644
edit
dl
rm
photo-gallery.php
1404
0644
edit
dl
rm
pilotpress.php
1581
0644
edit
dl
rm
popup-maker.php
5544
0644
edit
dl
rm
relevanssi-premium.php
247
0644
edit
dl
rm
relevanssi.php
1895
0644
edit
dl
rm
sellsy.php
1087
0644
edit
dl
rm
seo-by-rank-math.php
5972
0644
edit
dl
rm
sfwd-lms.php
4616
0644
edit
dl
rm
sg-cachepress.php
2668
0644
edit
dl
rm
siteorigin-panels.php
1466
0644
edit
dl
rm
sitepress-multilingual-cms.php
9747
0644
edit
dl
rm
table-of-contents-plus.php
1044
0644
edit
dl
rm
the-events-calendar-community-events.php
1352
0644
edit
dl
rm
the-events-calendar.php
7548
0644
edit
dl
rm
toolbar-publish-button.php
1039
0644
edit
dl
rm
woo-paypalplus.php
1348
0644
edit
dl
rm
woocommerce.php
11120
0644
edit
dl
rm
wordpress-mu-domain-mapping.php
1571
0644
edit
dl
rm
wordpress-seo.php
2549
0644
edit
dl
rm
wp-job-manager.php
1930
0644
edit
dl
rm
wp-responsive-table.php
1218
0644
edit
dl
rm
wp-rocket.php
1375
0644
edit
dl
rm
wp-smush-pro.php
156
0644
edit
dl
rm
wp-smushit.php
5050
0644
edit
dl
rm
wp-views.php
3298
0644
edit
dl
rm
wp3d-models.php
1106
0644
edit
dl
rm
wpml-sticky-links.php
1432
0644
edit
dl
rm
yith-woocommerce-dynamic-pricing-and-discounts-premium.php
2102
0644
edit
dl
rm
Edit:
/home/techb158/balacoffee.com/wp-content/themes/Divi-1/includes/builder/plugin-compat/sfwd-lms.php
(4616B)
<?php if ( ! defined( 'ABSPATH' ) ) { // Exit if accessed directly. exit; } /** * Compatibility for the LearnDash plugin. * * @since 4.3.4 * * @link https://www.learndash.com/ */ class ET_Builder_Plugin_Compat_LearnDash extends ET_Builder_Plugin_Compat_Base { /** * Original `in_the_loop` property value for the layouts. * * @var array */ protected $_in_the_loop = array(); /** * Constructor. * * @since 4.3.4 */ public function __construct() { $this->plugin_id = 'sfwd-lms/sfwd_lms.php'; $this->init_hooks(); } /** * Hook methods to WordPress. * * @since 4.3.4 * * @return void */ public function init_hooks() { // Bail if there's no version found. if ( ! $this->get_plugin_version() ) { return; } add_action( 'learndash-focus-header-before', array( $this, 'fire_learndash_compatibility_action' ) ); add_action( 'learndash-focus-template-start', array( $this, 'maybe_inject_theme_builder_header' ) ); add_action( 'learndash-focus-template-end', array( $this, 'maybe_inject_theme_builder_footer' ) ); add_action( 'et_theme_builder_template_before_body', array( $this, 'maybe_override_query_before_body' ), 10, 3 ); add_action( 'et_theme_builder_template_after_body', array( $this, 'maybe_override_query_after_body' ), 10, 3 ); add_action( 'wp_enqueue_scripts', array( $this, 'focus_mode_compatibility_script' ), 99 ); } /** * Maybe override `$wp_query` temporarily before TB layout body template. * * @since 4.7.4 * * @param integer $layout_id TB layout post ID (header, body, footer). * @param boolean $layout_enabled Current layout status whether is enabled or not. * @param integer $template_id TB template post ID (parent of TB layout). */ public function maybe_override_query_before_body( $layout_id, $layout_enabled, $template_id ) { if ( ! $layout_enabled || ! function_exists( 'learndash_get_post_types' ) ) { return; } if ( ! in_array( get_post_type(), learndash_get_post_types(), true ) ) { return; } global $wp_query; // Save current value as reference for later usage. $this->_in_the_loop[ $layout_id ] = $wp_query->in_the_loop; // Force the query to be treated as a loop (fake loop). $wp_query->in_the_loop = true; } /** * Maybe restore `$wp_query` after TB layout body template rendered. * * @since 4.7.4 * * @param integer $layout_id TB layout post ID (header, body, footer). * @param boolean $layout_enabled Current layout status whether is enabled or not. * @param integer $template_id TB template post ID (parent of TB layout). */ public function maybe_override_query_after_body( $layout_id, $layout_enabled, $template_id ) { if ( ! $layout_enabled || ! function_exists( 'learndash_get_post_types' ) ) { return; } if ( ! in_array( get_post_type(), learndash_get_post_types(), true ) ) { return; } global $wp_query; // Restore `in_the_loop` property to original state. $wp_query->in_the_loop = et_()->array_get( $this->_in_the_loop, $layout_id, false ); } /** * Disable TB hooks for Divi and Extra. * * @since 4.3.4 */ public function fire_learndash_compatibility_action() { /** * Fires when LearnDash Focus mode is enabled for the current request. * * @since 4.3.4 */ do_action( 'et_theme_builder_compatibility_learndash_focus_mode' ); } /** * Maybe inject the TB header back in. * * @since 4.3.4 */ public function maybe_inject_theme_builder_header() { $layouts = et_theme_builder_get_template_layouts(); if ( empty( $layouts ) ) { return; } et_theme_builder_frontend_render_header( $layouts[ ET_THEME_BUILDER_HEADER_LAYOUT_POST_TYPE ]['id'], $layouts[ ET_THEME_BUILDER_HEADER_LAYOUT_POST_TYPE ]['enabled'], $layouts[ ET_THEME_BUILDER_TEMPLATE_POST_TYPE ] ); } /** * Maybe inject the TB footer back in. * * @since 4.3.4 */ public function maybe_inject_theme_builder_footer() { $layouts = et_theme_builder_get_template_layouts(); if ( empty( $layouts ) ) { return; } et_theme_builder_frontend_render_footer( $layouts[ ET_THEME_BUILDER_FOOTER_LAYOUT_POST_TYPE ]['id'], $layouts[ ET_THEME_BUILDER_FOOTER_LAYOUT_POST_TYPE ]['enabled'], $layouts[ ET_THEME_BUILDER_TEMPLATE_POST_TYPE ] ); } /** * Focus Mode compatibility for global header and footer. */ public function focus_mode_compatibility_script() { wp_enqueue_script( 'et-builder-sfwd-lms-compat-scripts', ET_BUILDER_URI . '/plugin-compat/scripts/sfwd-lms.js', array( 'jquery' ), ET_BUILDER_VERSION, true ); } } new ET_Builder_Plugin_Compat_LearnDash();
Save
cmd:
run