Results 1 to 6 of 6

Thread: How to remove action from a class?

  1. #1
    Thread Starter
    jemcapon's Avatar
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    83
    Thanks
    4
    Thanked 3 Times in 3 Posts

    How to remove action from a class?

    I want to do something like the following:

    Code:
    function remove_and_replace_job_roller_actions() {
            global $app_instances;	
    	remove_action( 'jr_resume_validate_fields', array($app_instances['JR_Resume_Edit_Form'] , 'validate_fields' ), 11 );
    	add_action( 'jr_resume_validate_fields', 'custom_resume_validate_fields', 10 );
    }
    add_action('init','remove_and_replace_job_roller_actions', 1);
    However it is not working.

    What do I need to do in order to remove the 'validate_fields' action from the JR_Resume_Edit_Form class?

    I could achieve what I want by editing the parent theme but I really don't like to do that as then I need to keep track of the change in order to upgrade in the future.

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,716
    Thanks
    166
    Thanked 3,390 Times in 3,261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Thread Starter
    jemcapon's Avatar
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    83
    Thanks
    4
    Thanked 3 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,716
    Thanks
    166
    Thanked 3,390 Times in 3,261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  5. #5
    Thread Starter
    jemcapon's Avatar
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    83
    Thanks
    4
    Thanked 3 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #6
    Thread Starter
    jemcapon's Avatar
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    83
    Thanks
    4
    Thanked 3 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to remove class VA_Claim_Listing_Categories
    By red20me in forum Vantage General Discussion (Legacy)
    Replies: 0
    Last Post: October 17th, 2013, 05:42 AM
  2. All banners with same css class
    By carlitospr in forum Banners Galore ClassiPress
    Replies: 6
    Last Post: July 23rd, 2013, 12:13 AM
  3. remove action form theme-header.php
    By rndm in forum Report Clipper Bugs
    Replies: 2
    Last Post: April 14th, 2012, 01:35 PM
  4. how to make a new class?
    By spymare in forum ClassiPress General Discussion
    Replies: 4
    Last Post: April 4th, 2011, 05:07 AM