Timeline for remove_action not working, even after changing priority
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 25, 2016 at 21:17 | comment | added | TheDeadMedic |
Well since the file is in your theme, you could just comment out the add_action line - otherwise try this technique for "finding" & un-hooking anonymous instances
|
|
Feb 25, 2016 at 19:58 | comment | added | Django | The architecture is quite complex. Listify integrates with a bunch of plugins via built-in integration files in the theme's folder -- in addition to the actual plugin files in wp-content\plugins. The file I was referring to is located in wp-content\themes\listify\inc\integrations\wp-job-manager\map\class-wp-job-manager-map-template.php. I'm sure it's very hard/nearly impossible to figure it out without access to the actual files... And maybe I can explain myself better, but I am not that familiar with OOP in PHP... So anyway I appriciate your effort =] | |
Feb 25, 2016 at 16:17 | comment | added | TheDeadMedic |
Damn, I thought that might be the case. Trouble is, running another $x = new Y will not point to the original instance (it's a new one). When you say this class is in your theme, is it in functions.php ? If not where is it defined (loosely describe your theme architecture)
|
|
Feb 25, 2016 at 16:14 | vote | accept | Django | ||
Feb 25, 2016 at 16:14 | comment | added | Django |
Hi, thanks for the clarification. I get it now. As for your suggestion, the class is not declared within a variable, so thats a bummer. I tried doing: $myvar = new Listify_WP_Job_Manager_Map; class Listify_WP_Job_Manager_Map extends listify_Integration {...} and then on functions.php remove_action( 'job_manager_job_filters_search_jobs_end', array( $myvar, 'job_manager_job_filters_distance' ) , 0 ); But still it's not working. Maybe because the variable is inaccessible? Anyway, thanks.
|
|
Feb 25, 2016 at 15:14 | history | edited | TheDeadMedic | CC BY-SA 3.0 |
deleted 1 character in body
|
Feb 25, 2016 at 13:53 | history | answered | TheDeadMedic | CC BY-SA 3.0 |