Skip to content

Commit

Permalink
Merge pull request #1123 from live-composer/release_1.5.37
Browse files Browse the repository at this point in the history
release 1.5.37
  • Loading branch information
rahul-blueastral committed Mar 14, 2024
2 parents d39a712 + 3c8e629 commit cb5b4ed
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 39 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.36
* Version: 1.5.37
* 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.36' );
define( 'DS_LIVE_COMPOSER_VER', '1.5.37' );

define( 'DS_LIVE_COMPOSER_SHORTNAME', __( 'Live Composer', 'live-composer-page-builder' ) );
define( 'DS_LIVE_COMPOSER_BASENAME', plugin_basename( __FILE__ ) );
Expand Down
29 changes: 15 additions & 14 deletions includes/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
function dslc_ajax_add_modules_section( $atts ) {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' )) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) ) {

// The array we'll pass back to the AJAX call.
$response = array();
Expand Down Expand Up @@ -75,7 +75,7 @@ function dslc_ajax_add_modules_section( $atts ) {
function dslc_ajax_add_module( $atts ) {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' ) ) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) ) {

// The array we'll pass back to the AJAX call.
$response = array();
Expand Down Expand Up @@ -215,7 +215,7 @@ function dslc_ajax_add_module( $atts ) {
function dslc_ajax_display_module_options( $atts ) {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' ) ) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) ) {

// The array we'll pass back to the AJAX call.
$response = array();
Expand Down Expand Up @@ -292,7 +292,7 @@ function dslc_ajax_display_module_options( $atts ) {
function dslc_ajax_save_composer( $atts ) {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY_SAVE ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' ) ) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY_SAVE ) ) {

// The array we'll pass back to the AJAX call.
$response = array();
Expand Down Expand Up @@ -381,7 +381,7 @@ function dslc_ajax_save_composer( $atts ) {
function dslc_ajax_save_draft_composer( $atts ) {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY_SAVE ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' )) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY_SAVE ) ) {

// The array we'll pass back to the AJAX call.
$response = array();
Expand Down Expand Up @@ -425,7 +425,7 @@ function dslc_ajax_save_draft_composer( $atts ) {
function dslc_ajax_load_template( $atts ) {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' )) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) ) {

// The array that holds active templates.
$templates = dslc_get_templates();
Expand Down Expand Up @@ -464,7 +464,7 @@ function dslc_ajax_load_template( $atts ) {
function dslc_ajax_import_template( $atts ) {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' )) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) ) {

// The array we'll pass back to the AJAX call.
$response = array();
Expand Down Expand Up @@ -501,7 +501,7 @@ function dslc_ajax_import_template( $atts ) {
function dslc_ajax_save_template( $atts ) {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY_SAVE ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' )) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY_SAVE ) ) {

// Response to the AJAX call.
$response = array();
Expand Down Expand Up @@ -563,7 +563,7 @@ function dslc_ajax_save_template( $atts ) {
function dslc_ajax_delete_template( $atts ) {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY_SAVE ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' )) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY_SAVE ) ) {

$response = array();
$response['status'] = 'success';
Expand Down Expand Up @@ -605,7 +605,8 @@ function dslc_ajax_delete_template( $atts ) {
function dslc_ajax_import_modules_section( $atts ) {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' )) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) ) {

// The array we'll pass back to the AJAX call.
$response = array();

Expand Down Expand Up @@ -639,7 +640,7 @@ function dslc_ajax_import_modules_section( $atts ) {
*/
function dslc_ajax_dm_module_defaults_code( $atts ) {
// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce')) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) ) {

$code = '';

Expand Down Expand Up @@ -713,7 +714,7 @@ function dslc_ajax_dm_module_defaults_code( $atts ) {
function dslc_ajax_save_preset() {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' )) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) ) {

// The array we'll pass back to the AJAX call.
$response = array();
Expand Down Expand Up @@ -761,7 +762,7 @@ function dslc_ajax_save_preset() {
function dslc_ajax_delete_preset() {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) && wp_verify_nonce($_REQUEST['_wpnonce'], 'dslc-ajax-wpnonce' )) {
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) ) {

// The array we'll pass back to the AJAX call.
$response = array();
Expand Down Expand Up @@ -836,7 +837,7 @@ function dslc_ajax_clear_cache() {
function dslc_ajax_toggle_extension( $atts ) {

// Allowed to do this?
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY_SAVE ) && wp_verify_nonce($_REQUEST['security']['nonce'], 'dslc-optionspanel-ajax' )):
if ( is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY_SAVE ) ):

// The array we'll pass back to the AJAX call.
$response = false;
Expand Down
1 change: 0 additions & 1 deletion includes/scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ public static function dslc_load_scripts_admin( $hook ) {

wp_localize_script( 'dslc-editor-backend-js', 'DSLCAjax', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'_wpnonce' => wp_create_nonce( 'dslc-ajax-wpnonce' ),
) );
wp_localize_script( 'dslc-editor-backend-js', 'DSLCSiteData', array(
'siteurl' => get_option( 'siteurl' ),
Expand Down
2 changes: 1 addition & 1 deletion js/builder.all.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/dist/editor_backend.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/editor_backend.min.js.map

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions js/src/editor/backend/codegeneration.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ function dslc_save_composer() {
url: DSLCAjax.ajaxurl,
data: {
action : 'dslc-ajax-save-composer',
_wpnonce : DSLCAjax._wpnonce,
dslc : 'active',
dslc_post_id : postID,
dslc_code : composerCode,
Expand Down Expand Up @@ -112,7 +111,6 @@ function dslc_save_draft_composer() {
DSLCAjax.ajaxurl,
{
action : 'dslc-ajax-save-draft-composer',
_wpnonce : DSLCAjax._wpnonce,
dslc : 'active',
dslc_post_id : postID,
dslc_code : composerCode,
Expand Down Expand Up @@ -601,4 +599,4 @@ export const editableContentCodeGeneration = ( dslcField ) => {

export const codeGenerationInitJS = () => {
setEventListeners();
}
}
5 changes: 1 addition & 4 deletions js/src/editor/backend/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,6 @@ window.dslc_module_options_show = function( moduleID ) {
// Settings array for the Ajax call
var dslcSettings = {};
dslcSettings['action'] = 'dslc-ajax-display-module-options';
_wpnonce : DSLCAjax._wpnonce,
dslcSettings['dslc'] = 'active';
dslcSettings['dslc_module_id'] = moduleID;
dslcSettings['dslc_post_id'] = jQuery('.dslca-container').data('data-post-id');
Expand Down Expand Up @@ -745,7 +744,6 @@ export const moduleOutputDefault = ( dslc_module_id, callback ) => {
DSLCAjax.ajaxurl,
{
action : 'dslc-ajax-add-module',
_wpnonce : DSLCAjax._wpnonce,
dslc : 'active',
dslc_module_id : dslc_module_id, // ex. DSLC_Button
dslc_post_id : jQuery('.dslca-container').data('post-id'),
Expand Down Expand Up @@ -937,7 +935,6 @@ function dslc_dm_get_defaults( module ) {
DSLCAjax.ajaxurl,
{
action : 'dslc-ajax-dm-module-defaults',
_wpnonce : DSLCAjax._wpnonce,
dslc : 'active',
dslc_modules_options : optionsCode
},
Expand All @@ -960,4 +957,4 @@ function dslc_reload_module( moduleID, callback ) { window.dslc_module_output_re
export const moduleInitJS = () => {
adjustZindex();
editableContentTextEvents();
}
}
4 changes: 1 addition & 3 deletions js/src/editor/backend/presets.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const updatePreset = () => {
DSLCAjax.ajaxurl,
{
action : 'dslc-ajax-save-preset',
_wpnonce : DSLCAjax._wpnonce,
dslc_preset_name : presetName,
dslc_preset_code : presetCode,
dslc_module_id : moduleID
Expand Down Expand Up @@ -108,7 +107,6 @@ jQuery(document).ready(function($){
DSLCAjax.ajaxurl,
{
action : 'dslc-ajax-delete-preset',
_wpnonce : DSLCAjax._wpnonce,
dslc_preset_name : presetName,
dslc_module_id : moduleID
},
Expand All @@ -124,4 +122,4 @@ jQuery(document).ready(function($){

export const presetsInit = () => {

}
}
4 changes: 1 addition & 3 deletions js/src/editor/backend/sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ export const addSection = ( callback ) => {
DSLCAjax.ajaxurl,
{
action : 'dslc-ajax-add-modules-section',
_wpnonce : DSLCAjax._wpnonce,s
dslc : 'active'
},
function( response ) {
Expand Down Expand Up @@ -653,7 +652,6 @@ function dslc_row_import( rowCode ) {
DSLCAjax.ajaxurl,
{
action : 'dslc-ajax-import-modules-section',
_wpnonce : DSLCAjax._wpnonce,
dslc : 'active',
dslc_modules_section_code : rowCode
},
Expand Down Expand Up @@ -739,4 +737,4 @@ export const sectionsInit = () => {
jQuery('.dslca-row-options-filter-hook.dslca-active').removeClass('dslca-active');
LiveComposer.Builder.PreviewAreaWindow.dslc_responsive_classes( true );
});
}
}
4 changes: 0 additions & 4 deletions js/src/editor/backend/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const loadTemplateById = ( template ) => {
DSLCAjax.ajaxurl,
{
action : 'dslc-ajax-load-template',
_wpnonce : DSLCAjax._wpnonce,
dslc : 'active',
dslc_template_id : template
},
Expand Down Expand Up @@ -83,7 +82,6 @@ function dslc_template_import() {
DSLCAjax.ajaxurl,
{
action : 'dslc-ajax-import-template',
_wpnonce : DSLCAjax._wpnonce,
dslc : 'active',
dslc_template_code : jQuery('#dslca-import-code').val()
},
Expand Down Expand Up @@ -119,7 +117,6 @@ function dslc_template_save() {
DSLCAjax.ajaxurl,
{
action : 'dslc-ajax-save-template',
_wpnonce : DSLCAjax._wpnonce,
dslc : 'active',
dslc_template_code : jQuery('#dslca-code').val(),
dslc_template_title : jQuery('#dslca-save-template-title').val()
Expand All @@ -144,7 +141,6 @@ function dslc_template_delete( template ) {
DSLCAjax.ajaxurl,
{
action : 'dslc-ajax-delete-template',
_wpnonce : DSLCAjax._wpnonce,
dslc : 'active',
dslc_template_id : template
},
Expand Down
4 changes: 3 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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.4.3
Stable tag: 1.5.36
Stable tag: 1.5.37
License: GPLv3

Page builder for WordPress with drag and drop header/footer editing, responsive settings, and animations. Compatible with Gutenberg block editor.
Expand Down Expand Up @@ -58,6 +58,8 @@ In most of the cases, this is because the homepage is not a real WordPress page,
* 🦊 [Check out our WooCommerce Page Builder Extension](https://livecomposerplugin.com/downloads/woocommerce-page-builder/?utm_source=wp-admin&utm_medium=changelog&utm_campaign=woo-integration)
* 👀 [We keep updating and improving our extensions pack](https://livecomposerplugin.com/downloads/extensions/?utm_source=wp-admin&utm_medium=changelog&utm_campaign=add-ons) ACF + CPT + MegaMenu + 9 more add-ons.

= 1.5.37 - Mar 14 2024 =
* Reverted changes from Release 1.5.36

= 1.5.36 - Mar 13 2024 =
* Fixes related to Cross Site Request Forgery (CSRF)
Expand Down

0 comments on commit cb5b4ed

Please sign in to comment.