Vladimir Garagulya
Forum Replies Created
-
Forum: Plugins
In reply to: [User Role Editor] User role appear in Author dropdown- turn on “deprecated” ‘level_0’, ‘level_1’, ‘level_2’ user capabilities for your custom role.
- reassign that role to your users in order to update the information about their user levels.
Read the article for for more details: https://www.role-editor.com/wordpress-user-levels-deprecated-just-partially/.
- This reply was modified 3 years, 3 months ago by Vladimir Garagulya.
Forum: Plugins
In reply to: [User Role Editor] Fatal Errors w/ PHP 8.1Thank you. I added additional type checking to the code. It will be available with the next update.
Btw., line #81 calls in_array() this way:
in_array('deprecated', $builtin_wp_caps[$cap_id] )where $builtin_wp_caps is URE’s internal data structure, and the only case when
$builtin_wp_caps[$cap_id]can be an integer instead of array of capabilities groups ID is an invalid use of ‘ure_built_in_wp_caps’ filter. Do you or one of your plugins use ‘ure_built_in_wp_caps’ filter?Forum: Plugins
In reply to: [User Role Editor] How to set up the following?- In order user doesn’t see Posts, revoke all ‘_posts’ capabilities from him, especially ‘edit_posts’.
- If custom post type accommodation is registered with own capability type, like ‘accommodation’, not the ‘post’ default one, then just grant to user ‘edit_accomodations’ and other capabilities, as WordPress does for built-in ‘contributor’ role from the very begin.
- If CPT accommodation uses ‘post’ capability type, you may use User Role Editor Pro feature, which allows to redefine capability type for all custom post types, which use the ‘post’ one. Then go to #2.
- URE Pro includes “edit restrictions” add-on, which has “Own data only” option, which works for for CPTs and for Media Library too.
Forum: Plugins
In reply to: [User Role Editor] Fatal Errors w/ PHP 8.1Hi,
Can you please show error messages with file name and line number, where error takes place?
Pro version includes the exact copy of a free version. So, if I missed something, fix is needed for both versions.
Forum: Plugins
In reply to: [User Role Editor] PHP 8.2 Deprecation NoticeHi Jaime,
Thanks for your help. I included the fix to the next update (4.63.3). There was a typo in a class property name.
If custom post type (CPT) uses own unique capability type, not WordPress default ‘post’, then ‘Yes’. If CPT uses ‘post’ capability type, then it’s protected by the same capabilities list as WordPress built-in posts and possibly other custom post types: edit_posts, edit_others_posts, etc.
Pro version allows to force such custom post type to use own unique capabilities list. Granting capabilities for selected CPT only you can restrict the editor role to just one custom post type.
Forum: Plugins
In reply to: [User Role Editor] Is it possible to allow a user to upload a plugin ONLY?Access to “Plugins” page: ‘activate_plugins”.
“Plugins->Add New” or “Install/Upload new plugin” : ‘install_plugins’Access to the /wp-admin without access to WooCommerce: ‘read’, ‘view_admin_dashboard’.
ATTENTION
User who can install and activate new plugin can receive superadmin access to a site in a minute, as this allows him to execute any PHP code on web server.- This reply was modified 3 years, 5 months ago by Vladimir Garagulya.
Forum: Plugins
In reply to: [User Role Editor] Differences between plugin and add_cap() functionHi,
URE plugin includes a piece of code to hide users with ‘administrator’ role from any other user who can ‘edit_users’ capability. When you activate URE, this code works by default.
Forum: Plugins
In reply to: [User Role Editor] Show other posts is not working well – IMPORTANT BUGI suppose you write about edit “Own data only” feature included into the Pro version. I repeated the issue, confirm the bug and start work on a fix.
It’s better do not use this forum for questions related to Pro version. Pro version has own forum at the dedicated site.
Forum: Plugins
In reply to: [User Role Editor] Some Data Gets Deleted When Authors EditIf it’s a single site WordPress, try turn ON the ‘unfiltered_html’ capability.
It will not work for the WP multisite though as it’s blocked by default for that configuration.
Forum: Plugins
In reply to: [User Role Editor] How hide a capability in user role editorClarify, do you wish to hide role, like (editor) or capability like (edit_pages)?
Forum: Plugins
In reply to: [User Role Editor] delete_users conflict stopping PDF uploads to websiteIn general, ‘upload_files’ and ‘edit_posts’ is enough for file uploading.
The only related piece of WordPress code is a function
is_super_admin(), which defines superadmin for single site checking ‘delete_users’ capability.But WordPress itself does not use this function to check permissions during file upload process. I can only suppose that you have some plugin which would make this.
Forum: Plugins
In reply to: [User Role Editor] How hide a capability in user role editorYou can not make this with User Role Editor. User with access to editing roles gets access to the full list of user capabilities.
Forum: Plugins
In reply to: [User Role Editor] Show other posts is not working well – IMPORTANT BUGIs it possible to give capabilities to custom field type using ACF.
When you add new custom field with ACF you can use “Rules” to define for which post type to show it: post or page, etc.
Custom field itself does not have capability type as a custom post type or user permission by default.
It’s possible to manage user access to the selected custom field using special filter described at the end of this article or or use this plugin.
Forum: Plugins
In reply to: [User Role Editor] Copy of editor role not working properlyHi,
Code your showed intends to check directly if user has ‘editor’ or ‘administrator’ role, but not user capability granted to a related role, ‘edit_others_posts’ for example, for ‘editor’ role. So you can not work with it while you don’t have ‘editor’ role or replace ‘editor’ at the theme’s PHP code shown with selected user capability instead.