From 4239d4c942a5e1ee7797861e744635c92fc8cfcc Mon Sep 17 00:00:00 2001 From: Navanath Bhosale Date: Thu, 21 Sep 2023 11:05:16 +0530 Subject: [PATCH 01/10] fix: strengthen the plugin AJAX callback with capability check --- README.md | 199 +++++++++--------- astra-bulk-edit.php | 4 +- .../class-astra-blk-meta-boxes-bulk-edit.php | 2 +- readme.txt | 199 +++++++++--------- 4 files changed, 203 insertions(+), 201 deletions(-) diff --git a/README.md b/README.md index bfd3cca..2581726 100644 --- a/README.md +++ b/README.md @@ -1,99 +1,100 @@ -# Astra Bulk Edit # -**Contributors:** [brainstormforce](https://profiles.wordpress.org/brainstormforce) -**Donate link:** https://www.paypal.me/BrainstormForce -**Tags:** bulk edit Astra meta settings, Astra meta settings, meta settings bulk edit, wordpress bulk edit plugin, page bulk edit, post bulk edit -**Requires at least:** 4.4 -**Tested up to:** 6.3.1 -**Stable tag:** 1.2.7 -**Requires PHP:** 5.2 -**License:** GPLv2 or later -**License URI:** http://www.gnu.org/licenses/gpl-2.0.html - -An easy-to-use plugin for the Astra theme that lets you edit Page Meta Settings for multiple pages/posts at once. - -## Description ## - -The Astra Bulk Edit plugin is useful for editing Astra Meta settings on a number of pages/posts at once. - -Some examples: -1. Enable or Disable the Page Title from multiple pages. -2. Make the pages full width. - -It reduces the pain of opening each page/post and modifying it as required. - -Note: - -The Astra Bulk Edit plugin is created for the Astra theme. You should have the Astra theme installed and activated on your website. - -https://www.youtube.com/watch?v=mQlTDTXQ8aw - -## What’s More? ## - -Astra Hooks: The Astra Hooks plugin allows you to insert actions throughout the theme. It allows you to hook custom content, JavaScript code, shortcodes, etc in various hook locations. - -Astra Customizer Reset: Wish to revert some customization settings that you’ve made in the Astra theme? The Astra Customizer Reset plugin allows you to do this through the customizer itself. - -Custom Typekit Fonts: The Custom Typekit Font plugin lets you to extend font support from typekit. - - -## Installation ## - -1. Make sure you have the Astra theme installed and activated. -2. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly. -3. Activate the plugin through the 'Plugins' screen in WordPress. -4. Once activated, you’ll find the Astra Meta settings appear in the bulk edit screen for pages/posts. - -## Frequently Asked Questions ## - -### Which theme can I use this plugin with? ### - -Astra Bulk Edit plugin can be used only with the Astra theme. - -### How does this plugin work? ### - -1.Install and activate the plugin -2.Open the bulk edit option for pages/posts. You will see the Astra Meta Settings appear on the screen. Refer screenshots. https://i.imgur.com/jte7sk8.jpg - -## Screenshots ## -1. Bulk edit settings. -2. Astra Meta Settings which can be bulk edited. - - -## Changelog ## - -### 1.2.7 ### -- Improvement: Compatibility with the Latest Astra Revamped Layout Options. - -### 1.2.6 ### -- Improvement: Hardened the security of plugin. - -### 1.2.5 ### -- Improvement: Hardened the security and accessibility of plugin. - -### 1.2.4 ### -- Fix: Undefined astra_get_option function call when Astra theme is inactive. -- Fix: White label settings does not get applied for the theme name. - -### 1.2.3 ### -- Improvement: Hardened the security of plugin. -- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules - -### 1.2.2 ### -- Fix: CartFlows step template changes to default. - -### 1.2.1 ### -- Fix: Quick Edit not working with WooCommerce plugin. - -### 1.2.0 ### -- New: Added options to enable/disable Breadcrumbs, Above and Below Header. -- New: Introduced "No Change" option in Dropdown for all settings. -- Improvement: Converted Checkboxes to Dropdowns for settings. - -### 1.1.0 ### -* New: Added Astra Pro 'Transparent Header' addon meta box support in bulk edit. -* New: Added Astra Pro 'Page Header' addon meta box support in bulk edit. -* New: Added Astra Pro 'Sticky Header' addon meta box support in bulk edit. - -### 1.0 ### -* Initial Release -## Upgrade Notice ## +# Astra Bulk Edit # +**Contributors:** [brainstormforce](https://profiles.wordpress.org/brainstormforce) +**Donate link:** https://www.paypal.me/BrainstormForce +**Tags:** bulk edit Astra meta settings, Astra meta settings, meta settings bulk edit, wordpress bulk edit plugin, page bulk edit, post bulk edit +**Requires at least:** 4.4 +**Tested up to:** 6.3 +**Stable tag:** 1.2.8 +**Requires PHP:** 5.2 +**License:** GPLv2 or later +**License URI:** http://www.gnu.org/licenses/gpl-2.0.html + +An easy-to-use plugin for the Astra theme that lets you edit Page Meta Settings for multiple pages/posts at once. + +## Description ## + +The Astra Bulk Edit plugin is useful for editing Astra Meta settings on a number of pages/posts at once. + +Some examples: +1. Enable or Disable the Page Title from multiple pages. +2. Make the pages full width. + +It reduces the pain of opening each page/post and modifying it as required. + +Note: + +The Astra Bulk Edit plugin is created for the Astra theme. You should have the Astra theme installed and activated on your website. + +https://www.youtube.com/watch?v=mQlTDTXQ8aw + +## What’s More? ## + +Astra Hooks: The Astra Hooks plugin allows you to insert actions throughout the theme. It allows you to hook custom content, JavaScript code, shortcodes, etc in various hook locations. + +Astra Customizer Reset: Wish to revert some customization settings that you’ve made in the Astra theme? The Astra Customizer Reset plugin allows you to do this through the customizer itself. + +Custom Typekit Fonts: The Custom Typekit Font plugin lets you to extend font support from typekit. + + +## Installation ## + +1. Make sure you have the Astra theme installed and activated. +2. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly. +3. Activate the plugin through the 'Plugins' screen in WordPress. +4. Once activated, you’ll find the Astra Meta settings appear in the bulk edit screen for pages/posts. + +## Frequently Asked Questions ## + +### Which theme can I use this plugin with? ### + +Astra Bulk Edit plugin can be used only with the Astra theme. + +### How does this plugin work? ### + +1.Install and activate the plugin +2.Open the bulk edit option for pages/posts. You will see the Astra Meta Settings appear on the screen. Refer screenshots. https://i.imgur.com/jte7sk8.jpg + +## Screenshots ## +1. Bulk edit settings. +2. Astra Meta Settings which can be bulk edited. + + +## Changelog ## ### 1.2.8 ### +- Improvement: Hardened the security of the plugin. + +### 1.2.7 ### +- Improvement: Compatibility with the Latest Astra Revamped Layout Options. + +### 1.2.6 ### +- Improvement: Hardened the security of plugin. + +### 1.2.5 ### +- Improvement: Hardened the security and accessibility of plugin. + +### 1.2.4 ### +- Fix: Undefined astra_get_option function call when Astra theme is inactive. +- Fix: White label settings does not get applied for the theme name. + +### 1.2.3 ### +- Improvement: Hardened the security of plugin. +- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules + +### 1.2.2 ### +- Fix: CartFlows step template changes to default. + +### 1.2.1 ### +- Fix: Quick Edit not working with WooCommerce plugin. + +### 1.2.0 ### +- New: Added options to enable/disable Breadcrumbs, Above and Below Header. +- New: Introduced "No Change" option in Dropdown for all settings. +- Improvement: Converted Checkboxes to Dropdowns for settings. + +### 1.1.0 ### +* New: Added Astra Pro 'Transparent Header' addon meta box support in bulk edit. +* New: Added Astra Pro 'Page Header' addon meta box support in bulk edit. +* New: Added Astra Pro 'Sticky Header' addon meta box support in bulk edit. + +### 1.0 ### +* Initial Release +## Upgrade Notice ## diff --git a/astra-bulk-edit.php b/astra-bulk-edit.php index 2df05b6..40343f6 100644 --- a/astra-bulk-edit.php +++ b/astra-bulk-edit.php @@ -3,7 +3,7 @@ * Plugin Name: Astra Bulk Edit * Plugin URI: http://www.wpastra.com/pro/ * Description: Easier way to edit Astra meta options in bulk. - * Version: 1.2.7 + * Version: 1.2.8 * Author: Brainstorm Force * Author URI: https://www.brainstormforce.com * Domain Path: /languages @@ -19,7 +19,7 @@ /** * Set constants. */ -define( 'ASTRA_BLK_VER', '1.2.7' ); +define( 'ASTRA_BLK_VER', '1.2.8' ); define( 'ASTRA_BLK_FILE', __FILE__ ); define( 'ASTRA_BLK_BASE', plugin_basename( ASTRA_BLK_FILE ) ); define( 'ASTRA_BLK_DIR', plugin_dir_path( ASTRA_BLK_FILE ) ); diff --git a/classes/class-astra-blk-meta-boxes-bulk-edit.php b/classes/class-astra-blk-meta-boxes-bulk-edit.php index 526da8f..2035cb8 100644 --- a/classes/class-astra-blk-meta-boxes-bulk-edit.php +++ b/classes/class-astra-blk-meta-boxes-bulk-edit.php @@ -247,7 +247,7 @@ public function save_meta_box( $post_id ) { */ public function save_post_bulk_edit() { - if ( ! check_ajax_referer( 'astra-blk-nonce', 'astra_nonce' ) ) { + if ( ! current_user_can( 'edit_posts' ) || ! check_ajax_referer( 'astra-blk-nonce', 'astra_nonce' ) ) { wp_send_json_error( esc_html__( 'Action failed. Invalid Security Nonce.', 'astra-bulk-edit' ) ); } diff --git a/readme.txt b/readme.txt index 3b673c4..4bd2af6 100644 --- a/readme.txt +++ b/readme.txt @@ -1,99 +1,100 @@ -=== Astra Bulk Edit === -Contributors: brainstormforce -Donate link: https://www.paypal.me/BrainstormForce -Tags: bulk edit Astra meta settings, Astra meta settings, meta settings bulk edit, wordpress bulk edit plugin, page bulk edit, post bulk edit -Requires at least: 4.4 -Tested up to: 6.3.1 -Stable tag: 1.2.7 -Requires PHP: 5.2 -License: GPLv2 or later -License URI: http://www.gnu.org/licenses/gpl-2.0.html - -An easy-to-use plugin for the Astra theme that lets you edit Page Meta Settings for multiple pages/posts at once. - -== Description == - -The Astra Bulk Edit plugin is useful for editing Astra Meta settings on a number of pages/posts at once. - -Some examples: -1. Enable or Disable the Page Title from multiple pages. -2. Make the pages full width. - -It reduces the pain of opening each page/post and modifying it as required. - -Note: - -The Astra Bulk Edit plugin is created for the Astra theme. You should have the Astra theme installed and activated on your website. - -https://www.youtube.com/watch?v=mQlTDTXQ8aw - -== What’s More? == - -Astra Hooks: The Astra Hooks plugin allows you to insert actions throughout the theme. It allows you to hook custom content, JavaScript code, shortcodes, etc in various hook locations. - -Astra Customizer Reset: Wish to revert some customization settings that you’ve made in the Astra theme? The Astra Customizer Reset plugin allows you to do this through the customizer itself. - -Custom Typekit Fonts: The Custom Typekit Font plugin lets you to extend font support from typekit. - - -== Installation == - -1. Make sure you have the Astra theme installed and activated. -2. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly. -3. Activate the plugin through the 'Plugins' screen in WordPress. -4. Once activated, you’ll find the Astra Meta settings appear in the bulk edit screen for pages/posts. - -== Frequently Asked Questions == - -= Which theme can I use this plugin with? = - -Astra Bulk Edit plugin can be used only with the Astra theme. - -= How does this plugin work? = - -1.Install and activate the plugin -2.Open the bulk edit option for pages/posts. You will see the Astra Meta Settings appear on the screen. Refer screenshots. https://i.imgur.com/jte7sk8.jpg - -== Screenshots == -1. Bulk edit settings. -2. Astra Meta Settings which can be bulk edited. - - -== Changelog == - -= 1.2.7 = -- Improvement: Compatibility with the Latest Astra Revamped Layout Options. - -= 1.2.6 = -- Improvement: Hardened the security of plugin. - -= 1.2.5 = -- Improvement: Hardened the security and accessibility of plugin. - -= 1.2.4 = -- Fix: Undefined astra_get_option function call when Astra theme is inactive. -- Fix: White label settings does not get applied for the theme name. - -= 1.2.3 = -- Improvement: Hardened the security of plugin. -- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules - -= 1.2.2 = -- Fix: CartFlows step template changes to default. - -= 1.2.1 = -- Fix: Quick Edit not working with WooCommerce plugin. - -= 1.2.0 = -- New: Added options to enable/disable Breadcrumbs, Above and Below Header. -- New: Introduced "No Change" option in Dropdown for all settings. -- Improvement: Converted Checkboxes to Dropdowns for settings. - -= 1.1.0 = -* New: Added Astra Pro 'Transparent Header' addon meta box support in bulk edit. -* New: Added Astra Pro 'Page Header' addon meta box support in bulk edit. -* New: Added Astra Pro 'Sticky Header' addon meta box support in bulk edit. - -= 1.0 = -* Initial Release -== Upgrade Notice == +=== Astra Bulk Edit === +Contributors: brainstormforce +Donate link: https://www.paypal.me/BrainstormForce +Tags: bulk edit Astra meta settings, Astra meta settings, meta settings bulk edit, wordpress bulk edit plugin, page bulk edit, post bulk edit +Requires at least: 4.4 +Tested up to: 6.3 +Stable tag: 1.2.8 +Requires PHP: 5.2 +License: GPLv2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html + +An easy-to-use plugin for the Astra theme that lets you edit Page Meta Settings for multiple pages/posts at once. + +== Description == + +The Astra Bulk Edit plugin is useful for editing Astra Meta settings on a number of pages/posts at once. + +Some examples: +1. Enable or Disable the Page Title from multiple pages. +2. Make the pages full width. + +It reduces the pain of opening each page/post and modifying it as required. + +Note: + +The Astra Bulk Edit plugin is created for the Astra theme. You should have the Astra theme installed and activated on your website. + +https://www.youtube.com/watch?v=mQlTDTXQ8aw + +== What’s More? == + +Astra Hooks: The Astra Hooks plugin allows you to insert actions throughout the theme. It allows you to hook custom content, JavaScript code, shortcodes, etc in various hook locations. + +Astra Customizer Reset: Wish to revert some customization settings that you’ve made in the Astra theme? The Astra Customizer Reset plugin allows you to do this through the customizer itself. + +Custom Typekit Fonts: The Custom Typekit Font plugin lets you to extend font support from typekit. + + +== Installation == + +1. Make sure you have the Astra theme installed and activated. +2. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly. +3. Activate the plugin through the 'Plugins' screen in WordPress. +4. Once activated, you’ll find the Astra Meta settings appear in the bulk edit screen for pages/posts. + +== Frequently Asked Questions == + += Which theme can I use this plugin with? = + +Astra Bulk Edit plugin can be used only with the Astra theme. + += How does this plugin work? = + +1.Install and activate the plugin +2.Open the bulk edit option for pages/posts. You will see the Astra Meta Settings appear on the screen. Refer screenshots. https://i.imgur.com/jte7sk8.jpg + +== Screenshots == +1. Bulk edit settings. +2. Astra Meta Settings which can be bulk edited. + + +== Changelog == = 1.2.8 = +- Improvement: Hardened the security of the plugin. + += 1.2.7 = +- Improvement: Compatibility with the Latest Astra Revamped Layout Options. + += 1.2.6 = +- Improvement: Hardened the security of plugin. + += 1.2.5 = +- Improvement: Hardened the security and accessibility of plugin. + += 1.2.4 = +- Fix: Undefined astra_get_option function call when Astra theme is inactive. +- Fix: White label settings does not get applied for the theme name. + += 1.2.3 = +- Improvement: Hardened the security of plugin. +- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules + += 1.2.2 = +- Fix: CartFlows step template changes to default. + += 1.2.1 = +- Fix: Quick Edit not working with WooCommerce plugin. + += 1.2.0 = +- New: Added options to enable/disable Breadcrumbs, Above and Below Header. +- New: Introduced "No Change" option in Dropdown for all settings. +- Improvement: Converted Checkboxes to Dropdowns for settings. + += 1.1.0 = +* New: Added Astra Pro 'Transparent Header' addon meta box support in bulk edit. +* New: Added Astra Pro 'Page Header' addon meta box support in bulk edit. +* New: Added Astra Pro 'Sticky Header' addon meta box support in bulk edit. + += 1.0 = +* Initial Release +== Upgrade Notice == From 3167e823a7501da9e54f7c978b1e01cf312f0c52 Mon Sep 17 00:00:00 2001 From: Navanath Bhosale Date: Thu, 21 Sep 2023 11:09:14 +0530 Subject: [PATCH 02/10] chore: readme updated --- README.md | 199 +++++++++++++++++++++++++++--------------------------- 1 file changed, 99 insertions(+), 100 deletions(-) diff --git a/README.md b/README.md index 2581726..bfd3cca 100644 --- a/README.md +++ b/README.md @@ -1,100 +1,99 @@ -# Astra Bulk Edit # -**Contributors:** [brainstormforce](https://profiles.wordpress.org/brainstormforce) -**Donate link:** https://www.paypal.me/BrainstormForce -**Tags:** bulk edit Astra meta settings, Astra meta settings, meta settings bulk edit, wordpress bulk edit plugin, page bulk edit, post bulk edit -**Requires at least:** 4.4 -**Tested up to:** 6.3 -**Stable tag:** 1.2.8 -**Requires PHP:** 5.2 -**License:** GPLv2 or later -**License URI:** http://www.gnu.org/licenses/gpl-2.0.html - -An easy-to-use plugin for the Astra theme that lets you edit Page Meta Settings for multiple pages/posts at once. - -## Description ## - -The Astra Bulk Edit plugin is useful for editing Astra Meta settings on a number of pages/posts at once. - -Some examples: -1. Enable or Disable the Page Title from multiple pages. -2. Make the pages full width. - -It reduces the pain of opening each page/post and modifying it as required. - -Note: - -The Astra Bulk Edit plugin is created for the Astra theme. You should have the Astra theme installed and activated on your website. - -https://www.youtube.com/watch?v=mQlTDTXQ8aw - -## What’s More? ## - -Astra Hooks: The Astra Hooks plugin allows you to insert actions throughout the theme. It allows you to hook custom content, JavaScript code, shortcodes, etc in various hook locations. - -Astra Customizer Reset: Wish to revert some customization settings that you’ve made in the Astra theme? The Astra Customizer Reset plugin allows you to do this through the customizer itself. - -Custom Typekit Fonts: The Custom Typekit Font plugin lets you to extend font support from typekit. - - -## Installation ## - -1. Make sure you have the Astra theme installed and activated. -2. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly. -3. Activate the plugin through the 'Plugins' screen in WordPress. -4. Once activated, you’ll find the Astra Meta settings appear in the bulk edit screen for pages/posts. - -## Frequently Asked Questions ## - -### Which theme can I use this plugin with? ### - -Astra Bulk Edit plugin can be used only with the Astra theme. - -### How does this plugin work? ### - -1.Install and activate the plugin -2.Open the bulk edit option for pages/posts. You will see the Astra Meta Settings appear on the screen. Refer screenshots. https://i.imgur.com/jte7sk8.jpg - -## Screenshots ## -1. Bulk edit settings. -2. Astra Meta Settings which can be bulk edited. - - -## Changelog ## ### 1.2.8 ### -- Improvement: Hardened the security of the plugin. - -### 1.2.7 ### -- Improvement: Compatibility with the Latest Astra Revamped Layout Options. - -### 1.2.6 ### -- Improvement: Hardened the security of plugin. - -### 1.2.5 ### -- Improvement: Hardened the security and accessibility of plugin. - -### 1.2.4 ### -- Fix: Undefined astra_get_option function call when Astra theme is inactive. -- Fix: White label settings does not get applied for the theme name. - -### 1.2.3 ### -- Improvement: Hardened the security of plugin. -- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules - -### 1.2.2 ### -- Fix: CartFlows step template changes to default. - -### 1.2.1 ### -- Fix: Quick Edit not working with WooCommerce plugin. - -### 1.2.0 ### -- New: Added options to enable/disable Breadcrumbs, Above and Below Header. -- New: Introduced "No Change" option in Dropdown for all settings. -- Improvement: Converted Checkboxes to Dropdowns for settings. - -### 1.1.0 ### -* New: Added Astra Pro 'Transparent Header' addon meta box support in bulk edit. -* New: Added Astra Pro 'Page Header' addon meta box support in bulk edit. -* New: Added Astra Pro 'Sticky Header' addon meta box support in bulk edit. - -### 1.0 ### -* Initial Release -## Upgrade Notice ## +# Astra Bulk Edit # +**Contributors:** [brainstormforce](https://profiles.wordpress.org/brainstormforce) +**Donate link:** https://www.paypal.me/BrainstormForce +**Tags:** bulk edit Astra meta settings, Astra meta settings, meta settings bulk edit, wordpress bulk edit plugin, page bulk edit, post bulk edit +**Requires at least:** 4.4 +**Tested up to:** 6.3.1 +**Stable tag:** 1.2.7 +**Requires PHP:** 5.2 +**License:** GPLv2 or later +**License URI:** http://www.gnu.org/licenses/gpl-2.0.html + +An easy-to-use plugin for the Astra theme that lets you edit Page Meta Settings for multiple pages/posts at once. + +## Description ## + +The Astra Bulk Edit plugin is useful for editing Astra Meta settings on a number of pages/posts at once. + +Some examples: +1. Enable or Disable the Page Title from multiple pages. +2. Make the pages full width. + +It reduces the pain of opening each page/post and modifying it as required. + +Note: + +The Astra Bulk Edit plugin is created for the Astra theme. You should have the Astra theme installed and activated on your website. + +https://www.youtube.com/watch?v=mQlTDTXQ8aw + +## What’s More? ## + +Astra Hooks: The Astra Hooks plugin allows you to insert actions throughout the theme. It allows you to hook custom content, JavaScript code, shortcodes, etc in various hook locations. + +Astra Customizer Reset: Wish to revert some customization settings that you’ve made in the Astra theme? The Astra Customizer Reset plugin allows you to do this through the customizer itself. + +Custom Typekit Fonts: The Custom Typekit Font plugin lets you to extend font support from typekit. + + +## Installation ## + +1. Make sure you have the Astra theme installed and activated. +2. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly. +3. Activate the plugin through the 'Plugins' screen in WordPress. +4. Once activated, you’ll find the Astra Meta settings appear in the bulk edit screen for pages/posts. + +## Frequently Asked Questions ## + +### Which theme can I use this plugin with? ### + +Astra Bulk Edit plugin can be used only with the Astra theme. + +### How does this plugin work? ### + +1.Install and activate the plugin +2.Open the bulk edit option for pages/posts. You will see the Astra Meta Settings appear on the screen. Refer screenshots. https://i.imgur.com/jte7sk8.jpg + +## Screenshots ## +1. Bulk edit settings. +2. Astra Meta Settings which can be bulk edited. + + +## Changelog ## + +### 1.2.7 ### +- Improvement: Compatibility with the Latest Astra Revamped Layout Options. + +### 1.2.6 ### +- Improvement: Hardened the security of plugin. + +### 1.2.5 ### +- Improvement: Hardened the security and accessibility of plugin. + +### 1.2.4 ### +- Fix: Undefined astra_get_option function call when Astra theme is inactive. +- Fix: White label settings does not get applied for the theme name. + +### 1.2.3 ### +- Improvement: Hardened the security of plugin. +- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules + +### 1.2.2 ### +- Fix: CartFlows step template changes to default. + +### 1.2.1 ### +- Fix: Quick Edit not working with WooCommerce plugin. + +### 1.2.0 ### +- New: Added options to enable/disable Breadcrumbs, Above and Below Header. +- New: Introduced "No Change" option in Dropdown for all settings. +- Improvement: Converted Checkboxes to Dropdowns for settings. + +### 1.1.0 ### +* New: Added Astra Pro 'Transparent Header' addon meta box support in bulk edit. +* New: Added Astra Pro 'Page Header' addon meta box support in bulk edit. +* New: Added Astra Pro 'Sticky Header' addon meta box support in bulk edit. + +### 1.0 ### +* Initial Release +## Upgrade Notice ## From 5b65fdc56d02ad7af725256d889faccc170961d6 Mon Sep 17 00:00:00 2001 From: Navanath Bhosale Date: Thu, 21 Sep 2023 11:10:24 +0530 Subject: [PATCH 03/10] chore: readme --- readme.txt | 199 ++++++++++++++++++++++++++--------------------------- 1 file changed, 99 insertions(+), 100 deletions(-) diff --git a/readme.txt b/readme.txt index 4bd2af6..3b673c4 100644 --- a/readme.txt +++ b/readme.txt @@ -1,100 +1,99 @@ -=== Astra Bulk Edit === -Contributors: brainstormforce -Donate link: https://www.paypal.me/BrainstormForce -Tags: bulk edit Astra meta settings, Astra meta settings, meta settings bulk edit, wordpress bulk edit plugin, page bulk edit, post bulk edit -Requires at least: 4.4 -Tested up to: 6.3 -Stable tag: 1.2.8 -Requires PHP: 5.2 -License: GPLv2 or later -License URI: http://www.gnu.org/licenses/gpl-2.0.html - -An easy-to-use plugin for the Astra theme that lets you edit Page Meta Settings for multiple pages/posts at once. - -== Description == - -The Astra Bulk Edit plugin is useful for editing Astra Meta settings on a number of pages/posts at once. - -Some examples: -1. Enable or Disable the Page Title from multiple pages. -2. Make the pages full width. - -It reduces the pain of opening each page/post and modifying it as required. - -Note: - -The Astra Bulk Edit plugin is created for the Astra theme. You should have the Astra theme installed and activated on your website. - -https://www.youtube.com/watch?v=mQlTDTXQ8aw - -== What’s More? == - -Astra Hooks: The Astra Hooks plugin allows you to insert actions throughout the theme. It allows you to hook custom content, JavaScript code, shortcodes, etc in various hook locations. - -Astra Customizer Reset: Wish to revert some customization settings that you’ve made in the Astra theme? The Astra Customizer Reset plugin allows you to do this through the customizer itself. - -Custom Typekit Fonts: The Custom Typekit Font plugin lets you to extend font support from typekit. - - -== Installation == - -1. Make sure you have the Astra theme installed and activated. -2. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly. -3. Activate the plugin through the 'Plugins' screen in WordPress. -4. Once activated, you’ll find the Astra Meta settings appear in the bulk edit screen for pages/posts. - -== Frequently Asked Questions == - -= Which theme can I use this plugin with? = - -Astra Bulk Edit plugin can be used only with the Astra theme. - -= How does this plugin work? = - -1.Install and activate the plugin -2.Open the bulk edit option for pages/posts. You will see the Astra Meta Settings appear on the screen. Refer screenshots. https://i.imgur.com/jte7sk8.jpg - -== Screenshots == -1. Bulk edit settings. -2. Astra Meta Settings which can be bulk edited. - - -== Changelog == = 1.2.8 = -- Improvement: Hardened the security of the plugin. - -= 1.2.7 = -- Improvement: Compatibility with the Latest Astra Revamped Layout Options. - -= 1.2.6 = -- Improvement: Hardened the security of plugin. - -= 1.2.5 = -- Improvement: Hardened the security and accessibility of plugin. - -= 1.2.4 = -- Fix: Undefined astra_get_option function call when Astra theme is inactive. -- Fix: White label settings does not get applied for the theme name. - -= 1.2.3 = -- Improvement: Hardened the security of plugin. -- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules - -= 1.2.2 = -- Fix: CartFlows step template changes to default. - -= 1.2.1 = -- Fix: Quick Edit not working with WooCommerce plugin. - -= 1.2.0 = -- New: Added options to enable/disable Breadcrumbs, Above and Below Header. -- New: Introduced "No Change" option in Dropdown for all settings. -- Improvement: Converted Checkboxes to Dropdowns for settings. - -= 1.1.0 = -* New: Added Astra Pro 'Transparent Header' addon meta box support in bulk edit. -* New: Added Astra Pro 'Page Header' addon meta box support in bulk edit. -* New: Added Astra Pro 'Sticky Header' addon meta box support in bulk edit. - -= 1.0 = -* Initial Release -== Upgrade Notice == +=== Astra Bulk Edit === +Contributors: brainstormforce +Donate link: https://www.paypal.me/BrainstormForce +Tags: bulk edit Astra meta settings, Astra meta settings, meta settings bulk edit, wordpress bulk edit plugin, page bulk edit, post bulk edit +Requires at least: 4.4 +Tested up to: 6.3.1 +Stable tag: 1.2.7 +Requires PHP: 5.2 +License: GPLv2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html + +An easy-to-use plugin for the Astra theme that lets you edit Page Meta Settings for multiple pages/posts at once. + +== Description == + +The Astra Bulk Edit plugin is useful for editing Astra Meta settings on a number of pages/posts at once. + +Some examples: +1. Enable or Disable the Page Title from multiple pages. +2. Make the pages full width. + +It reduces the pain of opening each page/post and modifying it as required. + +Note: + +The Astra Bulk Edit plugin is created for the Astra theme. You should have the Astra theme installed and activated on your website. + +https://www.youtube.com/watch?v=mQlTDTXQ8aw + +== What’s More? == + +Astra Hooks: The Astra Hooks plugin allows you to insert actions throughout the theme. It allows you to hook custom content, JavaScript code, shortcodes, etc in various hook locations. + +Astra Customizer Reset: Wish to revert some customization settings that you’ve made in the Astra theme? The Astra Customizer Reset plugin allows you to do this through the customizer itself. + +Custom Typekit Fonts: The Custom Typekit Font plugin lets you to extend font support from typekit. + + +== Installation == + +1. Make sure you have the Astra theme installed and activated. +2. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly. +3. Activate the plugin through the 'Plugins' screen in WordPress. +4. Once activated, you’ll find the Astra Meta settings appear in the bulk edit screen for pages/posts. + +== Frequently Asked Questions == + += Which theme can I use this plugin with? = + +Astra Bulk Edit plugin can be used only with the Astra theme. + += How does this plugin work? = + +1.Install and activate the plugin +2.Open the bulk edit option for pages/posts. You will see the Astra Meta Settings appear on the screen. Refer screenshots. https://i.imgur.com/jte7sk8.jpg + +== Screenshots == +1. Bulk edit settings. +2. Astra Meta Settings which can be bulk edited. + + +== Changelog == + += 1.2.7 = +- Improvement: Compatibility with the Latest Astra Revamped Layout Options. + += 1.2.6 = +- Improvement: Hardened the security of plugin. + += 1.2.5 = +- Improvement: Hardened the security and accessibility of plugin. + += 1.2.4 = +- Fix: Undefined astra_get_option function call when Astra theme is inactive. +- Fix: White label settings does not get applied for the theme name. + += 1.2.3 = +- Improvement: Hardened the security of plugin. +- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules + += 1.2.2 = +- Fix: CartFlows step template changes to default. + += 1.2.1 = +- Fix: Quick Edit not working with WooCommerce plugin. + += 1.2.0 = +- New: Added options to enable/disable Breadcrumbs, Above and Below Header. +- New: Introduced "No Change" option in Dropdown for all settings. +- Improvement: Converted Checkboxes to Dropdowns for settings. + += 1.1.0 = +* New: Added Astra Pro 'Transparent Header' addon meta box support in bulk edit. +* New: Added Astra Pro 'Page Header' addon meta box support in bulk edit. +* New: Added Astra Pro 'Sticky Header' addon meta box support in bulk edit. + += 1.0 = +* Initial Release +== Upgrade Notice == From 64b09d48e52541446bef21f040f9254be9703496 Mon Sep 17 00:00:00 2001 From: Navanath Bhosale Date: Thu, 21 Sep 2023 11:18:03 +0530 Subject: [PATCH 04/10] chore: readme data update --- README.md | 7 +++++-- readme.txt | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bfd3cca..82306e3 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ **Donate link:** https://www.paypal.me/BrainstormForce **Tags:** bulk edit Astra meta settings, Astra meta settings, meta settings bulk edit, wordpress bulk edit plugin, page bulk edit, post bulk edit **Requires at least:** 4.4 -**Tested up to:** 6.3.1 -**Stable tag:** 1.2.7 +**Tested up to:** 6.3 +**Stable tag:** 1.2.8 **Requires PHP:** 5.2 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -61,6 +61,9 @@ Astra Bulk Edit plugin can be used only with the Astra theme. ## Changelog ## +### 1.2.8 ### +- Improvement: Hardened the security of the plugin. + ### 1.2.7 ### - Improvement: Compatibility with the Latest Astra Revamped Layout Options. diff --git a/readme.txt b/readme.txt index 3b673c4..0c75e0d 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: brainstormforce Donate link: https://www.paypal.me/BrainstormForce Tags: bulk edit Astra meta settings, Astra meta settings, meta settings bulk edit, wordpress bulk edit plugin, page bulk edit, post bulk edit Requires at least: 4.4 -Tested up to: 6.3.1 -Stable tag: 1.2.7 +Tested up to: 6.3 +Stable tag: 1.2.8 Requires PHP: 5.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -61,6 +61,9 @@ Astra Bulk Edit plugin can be used only with the Astra theme. == Changelog == += 1.2.8 = +- Improvement: Hardened the security of the plugin. + = 1.2.7 = - Improvement: Compatibility with the Latest Astra Revamped Layout Options. From 5dd9ca6c44680880792722f7ed8a1a4b3e85dcd6 Mon Sep 17 00:00:00 2001 From: Navanath Bhosale Date: Thu, 21 Sep 2023 13:08:25 +0530 Subject: [PATCH 05/10] chore: Added props --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 0c75e0d..958392e 100644 --- a/readme.txt +++ b/readme.txt @@ -62,7 +62,7 @@ Astra Bulk Edit plugin can be used only with the Astra theme. == Changelog == = 1.2.8 = -- Improvement: Hardened the security of the plugin. +- Improvement: Hardened the security of the plugin. (Props - Patchstack) = 1.2.7 = - Improvement: Compatibility with the Latest Astra Revamped Layout Options. From 3b7d18b8abfdacbbc19709601effc705f9f84783 Mon Sep 17 00:00:00 2001 From: Navanath Bhosale Date: Thu, 21 Sep 2023 13:08:37 +0530 Subject: [PATCH 06/10] chore: Added props --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 82306e3..e4e48b8 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Astra Bulk Edit plugin can be used only with the Astra theme. ## Changelog ## ### 1.2.8 ### -- Improvement: Hardened the security of the plugin. +- Improvement: Hardened the security of the plugin. (Props - Patchstack) ### 1.2.7 ### - Improvement: Compatibility with the Latest Astra Revamped Layout Options. From 9a5290c352fb664c082f74bdc37356385f6d77aa Mon Sep 17 00:00:00 2001 From: Navanath Bhosale Date: Fri, 22 Sep 2023 10:58:44 +0530 Subject: [PATCH 07/10] chore: Update readme.txt --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 958392e..cf40e57 100644 --- a/readme.txt +++ b/readme.txt @@ -62,7 +62,7 @@ Astra Bulk Edit plugin can be used only with the Astra theme. == Changelog == = 1.2.8 = -- Improvement: Hardened the security of the plugin. (Props - Patchstack) +- Improved codebase for improved security. (Props - Patchstack) = 1.2.7 = - Improvement: Compatibility with the Latest Astra Revamped Layout Options. From 59cd0c37fdee9371fb37a59215aa581b21db9ad0 Mon Sep 17 00:00:00 2001 From: Navanath Bhosale Date: Fri, 22 Sep 2023 10:58:49 +0530 Subject: [PATCH 08/10] chore: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e4e48b8..e1cd54a 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Astra Bulk Edit plugin can be used only with the Astra theme. ## Changelog ## ### 1.2.8 ### -- Improvement: Hardened the security of the plugin. (Props - Patchstack) +- Improved codebase for improved security. (Props - Patchstack) ### 1.2.7 ### - Improvement: Compatibility with the Latest Astra Revamped Layout Options. From 77458f8e60415cf33b916507c22a0fe679ec65a1 Mon Sep 17 00:00:00 2001 From: Navanath Bhosale Date: Fri, 22 Sep 2023 12:38:15 +0530 Subject: [PATCH 09/10] fix: permission check condition updated --- .../class-astra-blk-meta-boxes-bulk-edit.php | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/classes/class-astra-blk-meta-boxes-bulk-edit.php b/classes/class-astra-blk-meta-boxes-bulk-edit.php index 2035cb8..037d260 100644 --- a/classes/class-astra-blk-meta-boxes-bulk-edit.php +++ b/classes/class-astra-blk-meta-boxes-bulk-edit.php @@ -247,7 +247,7 @@ public function save_meta_box( $post_id ) { */ public function save_post_bulk_edit() { - if ( ! current_user_can( 'edit_posts' ) || ! check_ajax_referer( 'astra-blk-nonce', 'astra_nonce' ) ) { + if ( ! check_ajax_referer( 'astra-blk-nonce', 'astra_nonce' ) ) { wp_send_json_error( esc_html__( 'Action failed. Invalid Security Nonce.', 'astra-bulk-edit' ) ); } @@ -260,34 +260,35 @@ public function save_post_bulk_edit() { $post_meta = self::get_meta_option(); foreach ( $post_ids as $post_id ) { + if ( current_user_can( 'edit_post', $post_id ) ) { + foreach ( $post_meta as $key => $data ) { - foreach ( $post_meta as $key => $data ) { + // Sanitize values. + $sanitize_filter = ( isset( $data['sanitize'] ) ) ? $data['sanitize'] : 'FILTER_DEFAULT'; - // Sanitize values. - $sanitize_filter = ( isset( $data['sanitize'] ) ) ? $data['sanitize'] : 'FILTER_DEFAULT'; + switch ( $sanitize_filter ) { - switch ( $sanitize_filter ) { + case 'FILTER_SANITIZE_STRING': + $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_STRING ); + break; - case 'FILTER_SANITIZE_STRING': - $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_STRING ); - break; + case 'FILTER_SANITIZE_URL': + $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_URL ); + break; - case 'FILTER_SANITIZE_URL': - $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_URL ); - break; + case 'FILTER_SANITIZE_NUMBER_INT': + $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_NUMBER_INT ); + break; - case 'FILTER_SANITIZE_NUMBER_INT': - $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_NUMBER_INT ); - break; - - default: - $meta_value = filter_input( INPUT_POST, $key, FILTER_DEFAULT ); - break; - } + default: + $meta_value = filter_input( INPUT_POST, $key, FILTER_DEFAULT ); + break; + } - // Store values. - if ( 'no-change' !== $meta_value ) { - update_post_meta( $post_id, $key, $meta_value ); + // Store values. + if ( 'no-change' !== $meta_value ) { + update_post_meta( $post_id, $key, $meta_value ); + } } } } From 7fdf2670253a8b827878d6d41f813357551d1582 Mon Sep 17 00:00:00 2001 From: Navanath Bhosale Date: Fri, 22 Sep 2023 12:40:56 +0530 Subject: [PATCH 10/10] chore: phpcbf --- composer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a1c8ece..463307d 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,10 @@ "scripts": { "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source", "lint": "phpcs --standard=phpcs.xml.dist --report-summary --report-source" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } - \ No newline at end of file