[ Nova_Restaurant::init(), 'sort_menu_item_queries_by_menu_order' ]
You want something of type callable, that matches what was given when add_action.
There are only a handful of valid callables:
[ 'my_function_name' ]akamy_function_name();[ 'my_class_name', 'my_static_function' ]akamy_class_name::my_stati_function()[ $object, 'the_objects_function' ]aka$object->the_objects_function[ function() {} ]an anonymous function or closure
So some translation:
remove_action('parse_query','WM_Nova_Restaurant', 10);- Remove the function named
WM_Nova_Restaurantfrom theparse_queryhook
- Remove the function named
remove_action('parse_query', 'WM_Nova_Restaurant>sort_menu_item_queries_by_menu_order', 10);- Remove the function named
WM_Nova_Restaurant>sort_menu_item_queries_by_menu_orderfrom theparse_queryhook. Note such a function name is not possible.
- Remove the function named
remove_action('parse_query',array("WM_Nova_Restaurant", "sort_menu_item_queries_by_menu_order"), 10);- Remove the static method
sort_menu_item_queries_by_menu_orderin theWM_Nova_Restaurantclass from the hook
- Remove the static method
remove_action('parse_query', array("WM_Nova_Restaurant", "sort_menu_item_queries_by_menu_order"), 1);- Remove the static method
sort_menu_item_queries_by_menu_orderin theWM_Nova_Restaurantclass from the hook, that has priority 1
- Remove the static method
remove_action('parse_query',array($WM_Nova_Restaurant, "sort_menu_item_queries_by_menu_order"), 10);- Remove the method
sort_menu_item_queries_by_menu_orderin the object$WM_Nova_Restaurantfrom the hook. Note that this object is empty so it is also invalid.
- Remove the method
In future:
- Search for the place it was added
- Read the WP and PHP docs instead of guessing and flailing around
- See that it’s added inside an object and try to figure out how to get a hold of that object by looking at how it’s created
- See that the object is created by calling
Nova_Restaurant::init()