Forum Replies Created
-
AuthorPosts
-
19/02/2016 at 01:15 in reply to: Problems creating new post with user having category/taxonomy ID restriction #2010VladimirKeymaster
Hi Bira,
In my opinion, the correct way to solve this issue is for you to create a custom taxonomy called “ure” (for example) which has a single term called “allow” — and you assign THAT term to any new post by that user. This way, this term will never be deleted by any other plugin or function, your custom taxonomy is hidden and doesn’t clash with existing taxonomies, and by adding THAT you will ensure a user can always add posts even before or without setting the taxonomy he’s restricted to.
Thank you for the brilliant idea and useful note about
wp_set_post_terms()
function. Proposed decision allows to add new post without visible term assigned. This allows to have an option to “start a new post without any taxonomy” too.I will apply this enhanced logic to the next update. Thanks again.
18/02/2016 at 15:55 in reply to: Problems creating new post with user having category/taxonomy ID restriction #2005VladimirKeymasterThe fix for this issue was included into the version 4.23. Did you test with it?
VladimirKeymasterGood. Thanks for the feedback.
VladimirKeymasterIn relation to ‘shortcode’ this feature was realized:
Posts view restrictions includes a similar option ‘No role for this site’ also:I’m not sure that this add-on will work with BuddyPress though. I did not tested URE Pro with BuddyPress yet. It works with posts, pages and any custom post type. If BuddyPress page is a ‘post type’ like others then it should do the trick.
I should look at BuddyPress and make some tests to be sure.
VladimirKeymasterTry this code:
add_action('save_post', 'submit_for_review_update', 25 ); function submit_for_review_update($post_id) { if (empty($post_id)) { return; } $post = get_post($post_id); if (!is_object($post)) { return; } if ($post->post_type=='revision') { return; } $current_user = wp_get_current_user(); if (in_array('author', $current_user->roles) && $post->post_status=='publish') { $my_post = array( 'ID' => $post_id, 'post_status' => 'pending', ); remove_action('save_post', 'submit_for_review_update', 25); wp_update_post($my_post); add_action('save_post', 'submit_for_review_update', 25); } }
VladimirKeymasterHello,
This part was not changed from a very begin. Method PucFactory::addVersion() is defined at the same file, line #1041. I suppose you may have installed another version of class PucFactory, as it’s defined here just in condition that it does not exist yet, line #963:
if ( !class_exists('PucFactory') ):
Could you please check, what other plugin causes this conflict?
VladimirKeymasterHi Bira,
Thanks for letting me know that a problem was resolved.
Especially thank you for the bug report (user-role-editor-pro/includes/pro/classes/posts-edit-access.php on line 171). I really used a wrong class name there. I will fix it with a next update.
VladimirKeymasterHi,
I found and fixed the bug with plugin update from the WordPress multisite “Network Admin – Plugins” page. I will include this fix into the next update.
VladimirKeymasterHi,
Yes, It’s possible to assign to the user more than one role. When a user have multiple roles assigned – their capabilities are added.
In a situation when “if for a user with role1: we decide to display topbar admin
and for role2, we decide to hide topbar admin” user will not see top admin menu bar.VladimirKeymasterHi,
Thanks for letting me know.
VladimirKeymasterHi,
Thanks for your opinion. I agree. I will add this feature.
VladimirKeymasterHi,
Look at this plugin:
https://wordpress.org/plugins/redirection/
It should be enough if you wish to add redirection.VladimirKeymasterIt’s not possible currently to replicate admin menu access data your set for roles to the all sites. I consider to add such feature to the one of the future versions.
VladimirKeymasterThanks for the information.
I suppose that you get this error when you tried update URE Pro from ‘Plugins’ page?
I will work on the fix.As a workaround the update works as expected via ‘Dashboard->Updates’.
VladimirKeymasterThanks.
I added the updated page to the documentation about this feature: -
AuthorPosts