Changeset 2127595
- Timestamp:
- 07/24/2019 02:55:42 AM (7 years ago)
- Location:
- simple-restrict/tags/1.2.5
- Files:
-
- 2 edited
-
README.txt (modified) (2 diffs)
-
admin/class-simple-restrict-admin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
simple-restrict/tags/1.2.5/README.txt
r2026859 r2127595 4 4 Donate link: https://www.awakensolutions.com/donation 5 5 Requires at least: 3.4 6 Tested up to: 5. 0.37 Stable tag: 1.2. 46 Tested up to: 5.2.2 7 Stable tag: 1.2.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 131 131 = 1.2.4 = 132 132 * Changing the WordPress capability required for editing a user's permissions from manage_options to edit_users. 133 134 = 1.2.5 = 135 * Fixes a bug that would erase user permissions when they edited their own profile. -
simple-restrict/tags/1.2.5/admin/class-simple-restrict-admin.php
r2026855 r2127595 193 193 194 194 // Save checkboxes (user meta) to profile ($user_id is sent to this function from action that fires it) 195 public function save_permission_checkboxes( $user_id ) 196 { 197 foreach($this->taxonomy_terms_object_array as $taxonomy_object) { 198 $taxonomy_slug = $taxonomy_object->slug; 199 $taxonomy_slug_prefixed = 'simple-restrict-' . $taxonomy_slug; 200 update_user_meta( $user_id, $taxonomy_slug_prefixed, sanitize_text_field( $_POST[$taxonomy_slug_prefixed] ) ); 195 public function save_permission_checkboxes( $user_id ) { 196 if(current_user_can('edit_users')) { 197 foreach($this->taxonomy_terms_object_array as $taxonomy_object) { 198 $taxonomy_slug = $taxonomy_object->slug; 199 $taxonomy_slug_prefixed = 'simple-restrict-' . $taxonomy_slug; 200 update_user_meta( $user_id, $taxonomy_slug_prefixed, sanitize_text_field( $_POST[$taxonomy_slug_prefixed] ) ); 201 } 201 202 } 202 203 }
Note: See TracChangeset
for help on using the changeset viewer.