Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into Archives_translate_bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jagveer-blueastral committed Dec 30, 2023
2 parents 5bf4da3 + 3fd5614 commit 6d8802c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ds-live-composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: https://www.livecomposerplugin.com
* Description: Page builder for WordPress with drag and drop header/footer editing.
* Author: Live Composer Team
* Version: 1.5.23
* Version: 1.5.26
* Author URI: https://livecomposerplugin.com
* License: GPL3
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -41,7 +41,7 @@
* Constants
*/

define( 'DS_LIVE_COMPOSER_VER', '1.5.22' );
define( 'DS_LIVE_COMPOSER_VER', '1.5.26' );

define( 'DS_LIVE_COMPOSER_SHORTNAME', __( 'Live Composer', 'live-composer-page-builder' ) );
define( 'DS_LIVE_COMPOSER_BASENAME', plugin_basename( __FILE__ ) );
Expand Down
10 changes: 9 additions & 1 deletion includes/display-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,12 @@ function dslc_filter_content( $content ) {
$rendered_page = $dslc_content_before . $composer_wrapper_before . do_action( 'dslc_output_prepend' ) . $composer_header . '<div id="dslc-main">' . $composer_prepend . $composer_content . '</div>' . $composer_append . $composer_footer . do_action( 'dslc_output_append' ) . $composer_wrapper_after . $dslc_content_after;

if ( ! dslc_is_editor_active() && ! is_singular( 'dslc_hf' ) ) {
wp_update_post(
array(
'ID' => $cache_id,
'post_content' => $rendered_page
)
);
$cache->set_cache( $rendered_page, $cache_id );
}

Expand Down Expand Up @@ -1641,7 +1647,9 @@ function dslc_modules_section_front( $atts, $content = null, $version = 1, $is_h
$dslc_section_before = '';
$output .= dslc_decode_shortcodes( apply_filters( 'dslc_section_before', $dslc_section_before, $atts ) );
}

if(isset($atts['bg_video']) && !empty($atts['bg_video'])){
$atts['bg_video'] = sanitize_key(esc_attr($atts['bg_video']));
}
$output .= '
<div ' . $section_id_output . ' class="dslc-modules-section ' . $a_container_class . $parallax_class . $section_class . $extra_classes . '" style="' . dslc_row_get_style( $atts ) . '" data-section-id="' . $atts['section_instance_id'] . '">
' . $bg_video . '
Expand Down
24 changes: 19 additions & 5 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,14 @@ function dslc_body_class( $classes ) {
$classes[] = 'dslc-page-has-content';
}

$lc_disable_live_composer = dslc_get_option( 'lc_disable_live_composer', 'dslc_plugin_options' );
if($lc_disable_live_composer == "disabled"){
$classes[] = 'dslc-disbaled';
}else{
$classes[] = 'dslc-enabled';
}


if ( $has_lc_header_footer ) {
$classes[] = 'dslc-page-has-hf';
}
Expand Down Expand Up @@ -532,16 +540,21 @@ function dslc_get_code( $postID = false, $draft = true ) {
} else {

// Load regular ( current ) LC code.

$lc_disable_live_composer = dslc_get_option( 'lc_disable_live_composer', 'dslc_plugin_options' );

if ( 'enabled' === $lc_disable_live_composer || empty($lc_disable_live_composer) ) {
$code_set = get_post_meta( $postID, 'dslc_code' );

}
// For some reason, sometimes the actual code get stored
// under the second item in the array.
foreach ($code_set as $value) {
if ( ! empty( $value ) ) {
$code = $value;
if(!empty($code_set)){
foreach ($code_set as $value) {
if ( ! empty( $value ) ) {
$code = $value;
}
}
}

}

// Pass it back.
Expand Down Expand Up @@ -863,6 +876,7 @@ function dslc_sanitize_array( $array ) {
return $sanitize_array;
}


/*
Work in progress.
Expand Down
18 changes: 18 additions & 0 deletions includes/plugin-options-framework/inc/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,24 @@ function dslc_plugin_options_add() {
),
),
),
'lc_disable_live_composer' => array(

'section' => 'dslc_plugin_options',
'label' => __( 'Render pages with Live Composer', 'live-composer-page-builder' ),
'std' => 'enabled',
'type' => 'select',
'descr' => __( 'When this option is enabled, all the pages will be rendered through the Live Composer.', 'live-composer-page-builder' ),
'choices' => array(
array(
'label' => __( 'Enabled', 'live-composer-page-builder' ),
'value' => 'enabled',
),
array(
'label' => __( 'Disabled', 'live-composer-page-builder' ),
'value' => 'disabled',
),
),
),

'lc_css_position' => array(

Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: LiveComposer
Tags: page builder, landing page builder, frontend page builder, drag and drop page builder, website builder
Requires at least: 4.7
Tested up to: 6.1.1
Stable tag: 1.5.23
Tested up to: 6.4.2
Stable tag: 1.5.26
License: GPLv3

Page builder for WordPress with drag and drop header/footer editing, responsive settings, and animations. Compatible with Gutenberg block editor.
Expand Down

0 comments on commit 6d8802c

Please sign in to comment.