Changeset 2984903
- Timestamp:
- 10/27/2023 11:42:09 AM (2 years ago)
- Location:
- wp-dxp/trunk
- Files:
-
- 9 edited
-
README.txt (modified) (2 diffs)
-
admin/class-wp-dxp-admin-categories-page.php (modified) (2 diffs)
-
admin/class-wp-dxp-admin-rules-page.php (modified) (2 diffs)
-
admin/class-wp-dxp-admin.php (modified) (2 diffs)
-
admin/css/wp-dxp-admin.css (modified) (1 diff)
-
includes/class-wp-dxp-db-manager.php (modified) (1 diff)
-
includes/class-wp-dxp.php (modified) (1 diff)
-
includes/models/category.php (modified) (1 diff)
-
wp-dxp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-dxp/trunk/README.txt
r2983034 r2984903 3 3 Tags: personalization, personalisation, gutenberg, digital experience platform, show content, hide content, segmentation, conditions, rules, location 4 4 Requires at least: 6.0.0 5 Tested up to: 6. 3.26 Stable tag: 1.6. 45 Tested up to: 6.4 6 Stable tag: 1.6.5 7 7 Requires PHP: 7.3 8 8 License: GPLv2 or later … … 67 67 68 68 == Changelog == 69 70 = 1.6.5 = 71 * Fix: Restore the ability to delete custom categories when there are no attached rules 72 * Security: Added extra checks around processing of data in the admin 69 73 70 74 = 1.6.4 = -
wp-dxp/trunk/admin/class-wp-dxp-admin-categories-page.php
r2975253 r2984903 7 7 public function process() 8 8 { 9 // Double check for user caps before any possible processing of data. 10 if ( ! current_user_can( 'manage_options' ) ) { 11 return; 12 } 13 9 14 $action = $this->request->get('wp_dxp_action'); 10 15 if (!empty($this->request->form())) { … … 28 33 public function route() 29 34 { 35 // Double check for user caps before any possible processing of data. 36 if ( ! current_user_can( 'manage_options' ) ) { 37 return; 38 } 39 30 40 $action = $this->request->get('wp_dxp_action'); 31 41 -
wp-dxp/trunk/admin/class-wp-dxp-admin-rules-page.php
r2975253 r2984903 7 7 public function process() 8 8 { 9 // Double check for user caps before any possible processing of data. 10 if ( ! current_user_can( 'manage_options' ) ) { 11 return; 12 } 13 9 14 $action = $this->request->get('wp_dxp_action'); 10 15 if (!empty($this->request->form())) { … … 30 35 public function route() 31 36 { 37 // Double check for user caps before any possible processing of data. 38 if ( ! current_user_can( 'manage_options' ) ) { 39 return; 40 } 41 32 42 $action = $this->request->get('wp_dxp_action'); 33 43 -
wp-dxp/trunk/admin/class-wp-dxp-admin.php
r2983034 r2984903 322 322 public function process() 323 323 { 324 // Double check for user caps before any possible processing of data. 325 if ( ! current_user_can( 'manage_options' ) ) { 326 return; 327 } 328 324 329 $request = Wp_Dxp_Request::getInstance(); 325 330 $page = $request->get('page', false); … … 415 420 public function migrateDb() 416 421 { 422 // Double check for user caps before any possible processing of data. 423 if ( ! current_user_can( 'manage_options' ) ) { 424 return; 425 } 426 417 427 Wp_Dxp_DB_Manager::getInstance()->migrate(); 418 428 } -
wp-dxp/trunk/admin/css/wp-dxp-admin.css
r2975253 r2984903 9240 9240 outline: 0; 9241 9241 } 9242 #wp-dxp .is-invalid ~ .invalid-feedback { 9243 display: block; 9244 } 9242 9245 #wp-dxp .rule-message { 9243 9246 color: red; -
wp-dxp/trunk/includes/class-wp-dxp-db-manager.php
r2916348 r2984903 15 15 { 16 16 global $wpdb; 17 18 // Double check for user caps before any possible processing of data. 19 if ( ! current_user_can( 'manage_options' ) ) { 20 return; 21 } 17 22 18 23 if(is_admin()) { -
wp-dxp/trunk/includes/class-wp-dxp.php
r2975253 r2984903 203 203 $this->loader->add_filter( 'parent_file', $plugin_admin, 'setActiveAdminMenu' ); 204 204 205 $this->loader->add_action( 'init', $plugin_admin, 'migrateDb' ); 206 207 $this->loader->add_action( 'init', $plugin_admin, 'process' ); 205 // Restrict database changes to only occur within the admin. 206 $this->loader->add_action( 'admin_init', $plugin_admin, 'migrateDb' ); 207 208 // Restrict admin processing to running only in the admin. 209 $this->loader->add_action( 'admin_init', $plugin_admin, 'process' ); 208 210 209 211 $this->loader->add_action( 'rest_api_init', $plugin_admin, 'registerApiRoutes'); -
wp-dxp/trunk/includes/models/category.php
r2881249 r2984903 71 71 public function getCanDeleteAttribute() 72 72 { 73 return 0 === $this->rules_count;73 return empty( $this->getRulesCountAttribute() ); 74 74 } 75 75 -
wp-dxp/trunk/wp-dxp.php
r2983034 r2984903 5 5 * Plugin URI: https://filter.agency/about/personalizewp/ 6 6 * Description: Use WordPress as a digital experience platform, adding personalization and conditional rules to the content that your users see and can interact with. Compete with commercial enterprise platforms and add your own rules to match user behavior on, then show or hide blocks based on if your conditions are met. 7 * Version: 1.6. 47 * Version: 1.6.5 8 8 * Author: Filter 9 9 * Author URI: https://filter.agency 10 10 * Requires at least: 6.0.0 11 * Tested up to: 6. 3.211 * Tested up to: 6.4 12 12 * Requires PHP: 7.3 13 13 * License: GPL-2.0+ … … 27 27 * Rename this for your plugin and update it as you release new versions. 28 28 */ 29 define( 'WP_DXP_VERSION', '1.6. 4' );29 define( 'WP_DXP_VERSION', '1.6.5' ); 30 30 31 31 /**
Note: See TracChangeset
for help on using the changeset viewer.