wickedplugins
Forum Replies Created
-
Great! Thanks for marking the issue as resolved and let us know if we can help with anything else.
Thanks for the additional info! This was very helpful and I was able to track down the issue. The problem actually had to do with a small bug in the plugin caused by a user setting not being properly initialized in some instances.
I’ve fixed the issue and I believe it should resolve the issue for you once you update to 2.8.3. Want to try updating the plugin and letting me know if it’s fixed for you?
Can you give me a bit more information on how you have this set up? Did you use the add_role function to create the custom role for this user? If so, are you assigning the ‘manage_categories’ capability via the add_role function or the add_cap function? Or are you using a different approach?
Also, are you trying to give the user access to folders for pages, posts or a custom post type?
You noted that the folder structure is invisible. Are you seeing the folder pane to the left of the posts list but without the folders? Is the folder toolbar that allows you to add, edit and delete folders showing up? If so, what happens if you try to add a folder?
Thanks!
The plugin currently does not explicitly set the capabilities for the folder taxonomies. I believe they inherit the four built-in capabilities defined by WordPress (i.e. ‘manage_terms’, ‘edit_terms’, ‘delete_terms’ and ‘assign_terms’); however, if I’m not mistaken, I believe those capabilities map to ‘manage_categories’ (with the exception of ‘assign_terms’ which maps to ‘edit_posts’).
So, for example, if you use the add_cap function to add the ‘manage_categories’ capability to your custom role, they should be able to manage folders.
I assume that is probably more broad than you want though. If that’s the case, you’d need to first alter the folder taxonomy by adding custom capabilities to it and then add those custom capabilities to your custom role. For example, you could set ‘manage_terms’ to ‘manage_folders’ and then assign ‘manage_folders’ to the role. Does that make sense?
Hi @kevidoss,
My guess is that it will depend on how you have this set up and which plugin you’re using to manage permissions. Wicked Folders uses the built-in WordPress taxonomy API so I believe you should be able to assign capabilities like assign_terms, edit_terms, etc. to the user for the folder taxonomies.
If needed, you can also use the registered_taxonomy action to alter the folder taxonomies with custom capabilities.
Hope this helps! Feel free to post any other questions you have.
Hi @scwtenor,
I’m going to mark this issue as resolved but, if you still have questions or need anything else, please don’t hesitate to post additional comments.
Hi @landwire,
Thanks for the feedback. This is a good idea and something we’ll consider adding to the plugin’s settings at some point.
For now though, you can use a filter to remove the date dynamic folders if you’d like by adding the following code to your theme’s functions.php file:
add_filter( 'wicked_folders_get_dynamic_folders', 'custom_wicked_folders_get_dynamic_folders', 10, 2 ); function custom_wicked_folders_get_dynamic_folders( $folders, $args ) { // Only filter page dynamic folders. Comment out to filter folders for all // post types if ( 'page' == $args['post_type' ] ) { // Filter dynamic folders $folders = array_filter( $folders, function( $folder ) { // Exclude date dynamic folders return ! is_a( $folder, 'Wicked_Folders_Date_Dynamic_Folder' ); } ); } return $folders; }Hope this helps!
Hi @scwtenor,
The main reason is performance. Depending on the approach, displaying the pages in the folder pane could negatively impact performance when initially loading the folders or each time a folder is expanded.
You can see the pages assigned to a folder by clicking on the folder.
Hi @tagtag,
I’m going to mark this support request as closed but, if the above answer didn’t address your question, please feel free to post another comment. Thanks!
Hi @tagtag,
Sure, see the code below for an example of how you can accomplish that. Hope this helps!
// Add body class filter add_filter( 'body_class', 'custom_body_classes' ); function custom_body_classes( $classes ) { // Folder taxonomies are named in the format 'wicked_{$post_type}_folders' $taxonomy = 'wicked_' . get_post_type() . '_folders'; // Get slugs of folders that the current post belongs to $folders = wp_get_object_terms( get_the_ID(), $taxonomy, array( 'fields' => 'slugs' ) ); // Merge the folder slugs into the body classes array $classes = array_merge( $classes, $folders ); return $classes; }Great, thanks for confirming!
Hi @ephany,
Thanks for reporting this problem and sorry for the issue. After reviewing the problem, we believe the issue is being caused by the Thrive Apprentice plugin calling the
wp_enqueue_media()function too early. We’ve gone ahead and implemented a work-around in our plugin that prevents the fatal error you describe from occurring whenwp_enqueue_media()is called too early.Would you be willing to try updating Wicked Folders to 2.7.2 and confirming that the problem is resolved for you?
I will send a message to Thrive Themes so they can investigate on their end as well.
Thanks again!
Hi @anitah, glad to hear you’ve found the plugin useful! Thanks so much for the positive review!
@akigleo, thanks for the positive review!
Hi @hnk511,
Please see https://ww.wp.xz.cn/support/topic/user-specific-folders-2/#post-9753391 for answers to these questions.