wp_loaded
would fire too early – you can’t remove a hook before it’s been added.
I’d try adding your own hook with a higher priority, at the same level as the parent’s hook. That is, not inside an action.
add_filter( 'preprocess_comment' , 'my_preprocess_comment_function', 5 );
Then within your function, remove the parent function:
function my_preprocess_comment_function( $commentdata ) {
remove_filter( 'preprocess_comment', 'preprocess_comment_remove_url' );
// Do anything else you need to do
return $commentdata;
}
Related Posts:
- Accepted arguments value in hook functions
- Which action hook to use for function?
- Modify a function without editing template
- Override the WordPress core function wp_referer_field
- Add back in child theme what the parent theme removed with remove_action
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- Insert Content Before div#main from the functions.php File
- Save_post – Warning: Cannot modify header information
- remove_action on after_setup_theme not working from child theme
- Issues with title-tag and document_title_parts
- Remove Actions/Filters added via Anonymous Functions
- Define custom Page Template without its own .php file
- How to influence the information displayed on widget inside wp-admin
- Extract image from content and set it as the featured image
- How to restrict actions and filters “properly” by conditions
- Add action hook conditionally – only when home.php in use
- Using add_filter() in Widgets
- Implementing DNS Prefetching with WordPress
- How can I tell if I’m on a login page? [duplicate]
- syntax for remove_filter in parent theme with class
- Convert hyphen to underscore in permalinks
- Override parent theme function that is not hooked or in the functions.php file
- Remove Page Title from Static Frontpage
- Change parent theme file function in child themes functions.php
- Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons
- How to hook into the quick edit action?
- Reuse variable in hook callback
- How to override filter in child theme?
- WooCommerce add_action hook results in 500 error
- How to update feed only 2-3 times a week (for Feedburner email)?
- Gravity Forms field entries into wp_query loop [closed]
- Proper way of using functions in action hook?
- How would go about if I just want a temporary function?
- Get current page_id before loop, in functions.php
- Don’t delete a page if it holds users
- How do I add Bootstrap and LESS to my migrated WordPress site?
- Problem only while using require_once() within functions.php
- Passing values from a widget to a function within a plugin
- Which action does wp_update_user triggers?
- How can I get my Script to work on the Login page?
- Trigger a custom function when option are saved in admin area
- How to filter, restrict and return posts based on custom user meta information
- Add other social networks to TwentyNineteen_SVG_Icons class in child theme?
- What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
- Replace a menu with widget or a custom template file programmatically
- Reuse variable in hook callback
- jQuery does not work
- How to edit the Tags within the image file URLs?
- How would I go about replacing this function in my child theme located in inc/template-tags.php
- Can’t properly set the_title add_filter to show short_URL
- How to add_filter html template to middle of content
- (Woocommerce) Order by price when entering specific category
- Is there a way to prevent a function/method from being called outside a specific hook?
- How to edit classes in body tag?
- Call to undefined function is_home() or any conditional tags
- Possible to hook into Media Library preview File column and use a custom image?
- Adding code before post title with the_title produces weird results
- login_headertitle is deprecated since version 5.2.0
- How to have different site identity logos on each page on Astra Theme [closed]
- How to edit/replace Parent functions.php function in Child Theme to add “Walker” class
- Changing where my author box is printed
- Add Adsense code between job listings – wp job manager plugin
- remove_action not working, even after changing priority [duplicate]
- Replace admin header logo with an image
- Add content after get_header
- Changing the text of Upload/Insert on Posts and Pages Screen
- Any adverse effects of adding apply_filters to a function?
- how can I add filter in specfic field in my website?
- Does hook have an effect on increasing the page load?
- What is the earliest Hook a Script can use?
- custom error message for empty username and password using authenticate filter not working
- post value to function with Ajax and jQuery
- Plugin function in child theme
- Use action, filter, or hook to append HTML to WordPress plugin function
- Which method is more correct for removing WooCommerce Extensions menu item?
- WordPress hooks to call a function inside a construct
- previous_post_link inside of a function?
- Settings in functions.php used by a plugin
- Override parent theme function that is not hooked or in the functions.php file
- Force resize for all video content
- add query string to all pages after user logged in
- Why functions metaboxes is causing White Screen in Admin [closed]
- delete_term is not working properly with add_action()
- Is there a hook that I can use when a fatal error occurs?
- Using a private method as an action callback from within a class
- how to edit functions.php in a child theme
- str_replace function in theme
- Pass info from functions.php to plugin
- How to add nav menu items to a specific position within a menu
- Adding an external HTML link to a post thumbnail
- Why does re-using this function not work? [closed]
- Setting a default text for excerpts of a particular category
- Adding bootstrap classes to video shortcodes
- How to display the_archive_title() and the_archive_description() – “weird” interaction
- How to properly refresh page after form action?
- is_home() not working in functions.php file
- True email confirmation for registration (keeping unvalidated users from user table)
- Best way to add image to recent posts widget?
- How do I add functionality to images?
- Assign new post author IF another user in custom field on post transition