Replies
- Nick on May 20, 2022 at 2:25 pm in reply to: [Resolved] BuddyPress Moderation Tools Bulk Actions #45042
@sbrajesh Here are a few other suggestions for improvements to this plugin that I think would make it much more efficient and pleasing to use.
1. In the Moderation History page, show the action taken (Restored, Deleted, etc…)
2. Some function or mode to make it easier to move from one item in the cue to the next. Either when you take an action it moves you to the next item automatically, or add “Next” and “Previous” buttons to advance.
3. Add Restore or Delete buttons/links to the Queue, so that you can take action without opening the item.
4. As described before, ability to talk bulk actions using the existing checkboxes and action dropdown. - Nick on May 17, 2022 at 3:52 am in reply to: [Resolved] How to remove action for BuddyPress Moderation Tools? #44991
Thanks very much! I’ll give that a try.
Though as it turns out, I found this code which worked nicely! I’m sure it’ll be a good function to just have as a general utility snippet on my site.
function remove_class_action ($action,$class,$method) { global $wp_filter ; if (isset($wp_filter[$action])) { $len = strlen($method) ; foreach ($wp_filter[$action] as $pri => $actions) { foreach ($actions as $name => $def) { if (substr($name,-$len) == $method) { if (is_array($def['function'])) { if (get_class($def['function'][0]) == $class) { if (is_object($wp_filter[$action]) && isset($wp_filter[$action]->callbacks)) { unset($wp_filter[$action]->callbacks[$pri][$name]) ; } else { unset($wp_filter[$action][$pri][$name]) ; } } } } } } } }
- Nick on May 16, 2022 at 11:43 pm in reply to: [Resolved] How to remove action for BuddyPress Moderation Tools? #44989
No, I only want to disable it for very particular activity updates. I have all the conditional code that I need, but can’t figure out how to do remove_action because of the namespace/class structure. I know that you can sometimes do something like
$myclass = new Class
remove_action(‘hook’, array($myclass, ‘function’),10);But I can’t figure out how to even get the variable that contains the instance of the class.
Or, if it were a public static function, it would be possible to do something like:
remove_action(‘hook’, array(‘ClassName’, ‘function’),10);
Any suggestions would be appreciated!
- Nick on May 14, 2022 at 9:15 pm in reply to: [Resolved] Cant Update BuddyPress Moderation Tools #44962
Sorry, I just saw your reply now. Sure, that would be great if you could share the update with the email address that you have on file. I will be sure to let you know if I need the coupon. Thanks very much for the great service, as usual!
- Nick on May 12, 2022 at 8:40 pm in reply to: [Resolved] Cant Update BuddyPress Moderation Tools #44934
It is also no longer showing in my plugin download page on this website.
- Nick on March 18, 2022 at 10:46 pm in reply to: [Resolved] Blog Categories For Groups throwing errors #43918
Thanks!
- Nick on March 7, 2022 at 11:35 pm in reply to: [Resolved] Please add filter to BP Default Group Tab plugin #43733
Good points. It now looks like this for me.
return apply_filters ('bpdgt_modify_tabs', $new_tabs);
- Nick on March 5, 2022 at 7:56 pm in reply to: [Resolved] Please add filter to BP Default Group Tab plugin #43703
There’s nothing to apologize for! The filter I added works for my purposes, so it would be great if you can add it in your update.
$new_tabs = apply_filters('bpdgt_remove_tabs', $new_tabs);
- Nick on March 5, 2022 at 2:06 am in reply to: [Resolved] Blog Categories For Groups throwing errors #43697
Apologies, my mistake! I saw the prices on the Blog Categories page and wrongly assumed it was part of the paid packages. So, please disregard this request – you have more important things to worry about! I’ll figure something out at some point and share the code here.
- Nick on March 4, 2022 at 3:42 pm in reply to: [Resolved] Please add filter to BP Default Group Tab plugin #43693
public function get_group_tabs() { // Find current group // $current_group = new BP_Groups_Group( $current_group_id ); // We need slug to access the nav items // $current_group_slug = $current_group->slug; // Get all nav items. $new_tabs = array(); $tabs = buddypress()->groups->nav->get_secondary( array( 'parent_slug' => bp_get_current_group_slug() ) ); // bp_get_nav_menu_items('groups'); foreach ( $tabs as $tab ) { $new_tabs[ $tab['slug'] ] = $tab['name']; } $new_tabs = apply_filters('bpdgt_remove_tabs', $new_tabs); // Let us reset the admin option from the tab. foreach ( $new_tabs as $key => $tab ) { if ( $key == 'admin' ) { unset( $tabs[ $key ] ); break; } } // Reset the empty items. $new_tabs = array_filter( $new_tabs ); return $new_tabs; }