Changeset 1925935
- Timestamp:
- 08/16/2018 06:04:51 PM (7 years ago)
- Location:
- client-dash/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
client-dash/trunk/client-dash.php
r1910558 r1925935 9 9 * Plugin Name: Client Dash 10 10 * Description: Creating a more intuitive admin interface for clients. 11 * Version: 2.0. 911 * Version: 2.0.10 12 12 * Author: Real Big Plugins 13 13 * Author URI: https://realbigplugins.com … … 24 24 if ( ! class_exists( 'ClientDash' ) ) { 25 25 26 define( 'CLIENTDASH_VERSION', '2.0. 9' );26 define( 'CLIENTDASH_VERSION', '2.0.10' ); 27 27 define( 'CLIENTDASH_DIR', plugin_dir_path( __FILE__ ) ); 28 28 define( 'CLIENTDASH_URI', plugins_url( '', __FILE__ ) ); -
client-dash/trunk/core/api/class-clientdash-rest-customizations-controller.php
r1807297 r1925935 104 104 if ( ! current_user_can( 'customize_admin' ) ) { 105 105 106 return new WP_Error( 'rest_forbidden', esc_html__( 'You cannot edit the customizations resource.', 'client-dash' 106 return new WP_Error( 'rest_forbidden', esc_html__( 'You cannot edit the customizations resource.', 'client-dash' ), array( 'status' => $this->authorization_status_code() ) ); 107 107 } 108 108 … … 121 121 if ( ! current_user_can( 'customize_admin' ) ) { 122 122 123 return new WP_Error( 'rest_forbidden', esc_html__( 'You cannot view the customizations resource.', 'client-dash' 123 return new WP_Error( 'rest_forbidden', esc_html__( 'You cannot view the customizations resource.', 'client-dash' ), array( 'status' => $this->authorization_status_code() ) ); 124 124 } 125 125 … … 138 138 if ( ! current_user_can( 'customize_admin' ) ) { 139 139 140 return new WP_Error( 'rest_forbidden', esc_html__( 'You cannot view the customizations resource.', 'client-dash' 140 return new WP_Error( 'rest_forbidden', esc_html__( 'You cannot view the customizations resource.', 'client-dash' ), array( 'status' => $this->authorization_status_code() ) ); 141 141 } 142 142 … … 151 151 public function get_item( $request ) { 152 152 153 $role = $request['role'];153 $role = urldecode( $request['role'] ); 154 154 155 155 $customizations = cd_get_customizations( $role ); … … 167 167 public function create_item( $request ) { 168 168 169 $results = cd_update_role_customizations( $request['role'], array(169 $results = cd_update_role_customizations( urldecode( $request['role'] ), array( 170 170 'menu' => $request['menu'], 171 171 'submenu' => $request['submenu'], … … 200 200 public function update_item( $request ) { 201 201 202 $role = $request['role'];202 $role = urldecode( $request['role'] ); 203 203 204 204 if ( empty( $role ) ) { … … 213 213 $customizations = $this->prepare_item_for_database( $request ); 214 214 215 $results = cd_update_role_customizations( $r equest['role'], array(215 $results = cd_update_role_customizations( $role, array( 216 216 'menu' => $request['menu'], 217 217 'submenu' => $request['submenu'], … … 242 242 public function delete_item( $request ) { 243 243 244 $role = $request['role'];244 $role = urldecode( $request['role'] ); 245 245 246 246 if ( empty( $role ) ) { … … 253 253 } 254 254 255 $customizations = cd_get_customizations( $r equest['role']);255 $customizations = cd_get_customizations( $role ); 256 256 257 257 if ( ! $customizations ) { … … 266 266 } 267 267 268 $results = cd_delete_customizations( $r equest['role']);268 $results = cd_delete_customizations( $role ); 269 269 270 270 if ( $results === false ) { -
client-dash/trunk/readme.txt
r1910558 r1925935 5 5 Requires at least: 4.7.0 6 6 Tested up to: 4.9.5 7 Stable tag: 2.0. 97 Stable tag: 2.0.10 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 88 88 89 89 == Changelog == 90 91 = 2.0.10 = 92 * Fix: Potential crash with invalid Role IDs from third party plugins. 90 93 91 94 = 2.0.9 =
Note: See TracChangeset
for help on using the changeset viewer.