Colin
Forum Replies Created
-
Forum: Plugins
In reply to: [Flamingo] Please add delete [ALL SPAM & ALL TRASH] function+1 Please add a “delete all spam” button.
But ALSO please add the ability to view more than 20 message records at a time. This functionality is built in to wordpress post types and can be configured in the “screen options” tab in the upper right corner of the WP Admin. While viewing the Flamingo inbound messages, you can currently use the “screen options” tab to configure the pagination settings (posts per page), but upon saving this option nothing changes, there are still only 20 messages per page.
It would be awesome to be able to view, and therefore bulk edit, more than 20 per page.
Cheers!
Never mind! I found the issue and resolved it. Please see my other ticket here for the details of my specific 500 error response issue in the wp-admin ticket details page.
@labelgrid How were you able to resolve this issue. I believe I am experiencing something similar. On the ticket edit page in the Admin, I only see the title and creator meta boxes, and nothing else. Upon inspecting the console errors there is a 500 response for post.php. I can’t edit or respond to the ticket that was submitted…
Is that what you experienced? Or something different? Let me know. Much appreciated. Cheers!
Forum: Plugins
In reply to: [WooCommerce Product Dependencies] gettext filter, text domainbump
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] Conditional Logic Options Not SavingHey thanks Andrei! That’s a great suggestion.
What I ended up doing is adding menu items, rather than deleting them. This significantly cuts down on those
wc_memberships_is_user_active_member
calls. Now I iterate through the$session_plan_slugs
array only once to determine which plans the current user is an active member of, and then insert those membership links as sub-menu items, so I only have to call the membership test function once per plan.The other major benefit of this approach is that I no longer have to manually maintain the membership menu links in the WP Admin interface. Now I just have the top-level menu item, and its children sub-menu items get added dynamically, so if I add new membership plans in the future they automatically get inserted into the front-end menu based on the current logged-in user’s active plans. Huge improvement!
Thanks a lot for your help.
Cheers!
– Colin- This reply was modified 7 years, 3 months ago by Colin.
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] Conditional Logic Options Not SavingHi Andrei, thanks for the update, but the If Menu options, even the built-in conditions like “if user is logged in,” still won’t save. They just get wiped completely. So I think there is a much larger conflict going on here with my theme (i.e. the issue mentioned in the first FAQ).
I’ve used the `wp_get_nav_menu_items’ filter to hook into the menu output and run my own conditionals. Is this how If Menu does it? If you have a moment to look at my code I would love to hear your opinion. This was the most efficient method I could come up with, but my concern is that the nested foreach iterations might be too heavy on page load speed, since this hook runs on every new page load. But maybe there is no way around it (?). Thanks!
function wuwo_conditional_nav_logic( $items, $menu, $args ) { // write_log( $items ); global $session_plan_slugs; $logged_in = get_current_user_id(); // first make sure we are NOT in the backend (admin): if( ! is_admin() ) { // Iterate over the items to search and destroy by class: foreach( $items as $key => $item ) { $classes = $item->classes; // Hide 'customer' menu items from logged-out visitors: if( ! $logged_in && in_array( 'customer', $classes ) ) { unset( $items[$key] ); } // First check if user is logged in: if( $logged_in ) { $user_id = $logged_in; // Hide 'visitor' menu items from logged in users: if( in_array( 'visitor', $classes ) ) { unset( $items[$key] ); } // Hide "The Goods" submenu plan links from non-active members of those plans: foreach( $session_plan_slugs as $plan ) { // if current menu item has current plan class, // and the current user IS NOT an active member of that plan // then kill current menu item: if( in_array( $plan, $classes ) && ! wc_memberships_is_user_active_member( $user_id, $plan ) ) { unset( $items[$key] ); } } } } } return $items; } add_filter( 'wp_get_nav_menu_items', 'wuwo_conditional_nav_logic', null, 3 );
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] Conditional Logic Options Not SavingAh, I see :-/ Darn.
Ok. Well, let’s hope for that 4.9 release ??
Thanks for your help. I believe I can achieve most of the functionality I lost by adding body classes for my conditions, and using CSS to show/hide menu items based on those classes. But I really like the idea of removing menu items entirely, rather than just visually hiding them.
Perhaps I can accomplish the same thing If Menu is doing, but without the UI? Are you using a filter to intercept and change the Menu output? It not the Menu Walker class is it? Where should I begin reading in the WP docs if I wanted to do this?
Thanks again for your help.
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] Conditional Logic Options Not SavingHere are some errors in the debug.log as well:
PHP Notice: Undefined index: Active Session Plan Member (any) in /wp-content/plugins/if-menu/if-menu.php on line 119 PHP Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in /wp-content/plugins/if-menu/if-menu.php on line 119 PHP Notice: Undefined offset: 9590 in /wp-content/plugins/if-menu/if-menu.php on line 236 PHP Warning: Invalid argument supplied for foreach() in /wp-content/plugins/if-menu/if-menu.php on line 236
FYI, the “Active Session Plan Member (any)” index is the name of one of my custom conditions I’ve created using the
if_menu_conditions
filter.Do any of those console errors give you any hints about what might be going wrong?
Thanks.
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] Conditional Logic Options Not SavingThanks Chris. I have determined that it is the Pro theme that is interfering. It also adds options/fields to each menu item in the Admin UI. I have opened a ticket with the Pro theme support team. Can you think of any specific hooks or filters that Pro theme might be using that would be conflicting with If Menu? That may help them troubleshoot.
Cheers,
– ColinForum: Plugins
In reply to: [If Menu - Visibility control for Menus] Conditional Logic Options Not SavingPerhaps you could recommend a troubleshooting technique to find out why the If Menu options are not being saved. Without any console errors, I don’t know where to turn…
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] Plugin not working on 4.7I am having a similar issue on WP 4.8. Using Themeco’s “Pro” theme. The checkbox is appearing on the menu items in the Admin UI, and all the conditional logic options are displaying properly, but my preferences get reset when I save changes “Update Menu”. After saving the checkboxes are unchecked. It’s like something is preventing it from saving. But I see no console errors even after clicking the “Update Menu” button.
Please help!
Nothing here, nothing on GitHub. Is anyone still looking into this?
Hey @cnomadl, I ended up going an entirely different direction and using the plugin: “SS WooCommerce Myaccount Ajax Tabs” (find it on code canyon here: https://codecanyon.net/item/ss-woocommerce-myaccount-ajax-tabs/16948806).
It works quite nicely and is customizable to my needs. You can still hook into the my account tabs in the woocommerce recommended way and the plugin accommodates those customizations.
Good luck!
Forum: Plugins
In reply to: [Shortcake (Shortcode UI)] FIX YOUR PLUGIN!Sorry for the delayed response. And I’m sorry I didn’t notice the SELECT2_NOCONFLICT option. I’ve updated to the latest version and implemented that option via wp-config.php and all the conflicts I was experiencing before seem to be solved.
Thanks again for making this change, and for providing the no conflict option.
Cheers!
Ok, thanks Lap.
Should I expect a response on this thread, or on GitHub?