First, you are confused. It is not the same “override a function” that remove a filter. Assuming that you want to remove a filter, I think that your code should be:
function remove_html5_insert_image(){
remove_filter('image_send_to_editor','html5_insert_image', 10);
}
add_action('after_setup_theme','remove_html5_insert_image');
Note that the filter tag and the priority argument in remove_filter
must match the filter tag and the priority defined in the filter you want to remove.
Anyway, There is no need of that function since WP 3.9, use this instead to make WordPress use figure and figcaption in the output of captions:
add_action( 'after_setup_theme', 'cyb_theme_setup' );
function tbn_theme_setup() {
// See more in http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
add_theme_support( 'html5', array( 'caption' ) );
}
Related Posts:
- get_template_directory_uri pointing to parent theme not child theme
- How to customize the_archive_title()?
- How to override parent functions in child themes?
- remove_action on after_setup_theme not working from child theme
- Adding a second email address to a completed order in WooCommerce [closed]
- Include files in child theme functions file
- Child theme functions.php do I use php open and close tags?
- Declaring an instance of class included in parent theme from child theme functions.php
- One Child Functions.php for Multiple Child Themes
- Removing custom background and header feature in child theme
- How to override function in functions.php of parent theme?
- Implementing DNS Prefetching with WordPress
- Child theme – overriding add_image_size by a child theme [duplicate]
- Is it possible to override this function/class in a child theme?
- How to override functions.php in child theme?
- Change parent theme file function in child themes functions.php
- How to override filter in child theme?
- I created a child theme and it doesn’t work for some of the css files
- Unregister Nav Menu with fallback?
- Child Theme Not Overriding Parent Theme
- Changes to functions.php not working
- Overriding methods in a child theme
- How to override enqueued styles using a child theme
- Using the child theme functions.php to change the customizer.php on parent theme
- Child theme functions.php not executing
- How to store / access files in child theme folder
- Make “sidebar template” the default template for new pages
- override parent theme configuration in child functions.php
- wp_enqueue JavaScript in child-theme (ReferenceError) using Search & Go
- Proper way of using functions in action hook?
- Twenty Eleven Child theme error when attempting to use a rewritten function
- How do I get a child theme to load scripts from the parent theme?
- how to edit functions.php in a child theme
- Best practice when altering a parent theme function inside a child theme?
- Include files in child themes, declare in functions.php
- Avoid loading css from parent theme
- Creating a child theme – functions.php code issue
- Overwriting Parent Theme’s Image Sizes
- Problem only while using require_once() within functions.php
- Twentyten Child Theme: header images display messed up in admin panel
- Reuse variable in hook callback
- Automatically include all php files in a child theme directory
- Override the function twentytwelve_scripts_styles in a child theme
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- How to load parent theme template parts in child theme
- Running script based on Category
- How would I go about replacing this function in my child theme located in inc/template-tags.php
- Load custom css in functions.php causing library issue
- Not all CSS elements transferring via parent to child?
- Got white blank page after copying the functions.php to child theme
- How to edit classes in body tag?
- Randomizing wp_tag_cloud() in child theme
- Where do I go to edit this area? [closed]
- Parent theme styles overriding child theme CSS [closed]
- Unable to point the child theme directory even using get_stylesheet_directory()
- How to edit/replace Parent functions.php function in Child Theme to add “Walker” class
- Child theme function.php causes fatal error
- get_template_directory_uri() links to child theme not parent
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- How to remove admin footer text from inside child theme?
- How to store a number (coming from cookie) into query vars for later usage in other filters?
- How to overwrite template.php file
- remove_action not working, even after changing priority [duplicate]
- Solution dealing with Child Theme / Parent theme functions
- Removing parent theme CSS without editing parent theme
- How to override this theme function in child theme
- get_template_directory() – references parent theme directory
- Change custom featured image size in twentythirteen child theme
- Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy
- Looking for Functions File that doesn’t Exist
- Any adverse effects of adding apply_filters to a function?
- Include widget file in functions.php of child theme
- Adding a schema code to one specific page using functions.php file
- Add Javascript code to functions.php childtheme
- How Do I Unhook This Parent Theme Function?
- Child theme, how to cut the functions.php file into several classes?
- Replace theme function
- Setting Up Child Theme To Take Priority
- How do I create a child theme from PowerMag theme
- How would I correctly implement a new if statement in a child functions file?
- Child Theme not loading multiple stylesheets
- Including admin-options.php file in Child Themes
- Modified functions.php in Magazine Pro theme of Genesis. 500 error
- Help with is_page() and calling css for specific pages in a Child Theme
- uninstall a theme programmaticlly
- How do I integrate my Child Theme into a Custom Template?
- Child Theme functions.php has no effect
- Update add_image_size
- Load a Child Theme’s style.css just before the closing tag
- Is it possible to change parameters of Parent theme function in the Child theme?
- Preventing PHP Execution in Parent Theme
- Why does my visual post editor break when I try to add a TinyMCE button?
- Functions.php in child theme that loads CSS file breaks website
- unregister_sidebar in child theme not working
- Unregistering custom tinymce plugin?
- Override parent theme function that is not hooked or in the functions.php file
- Problem with Child-Theme using of foundation-framework [closed]
- Child Theme not working – CSS gone
- How to fix enqueue_styles error for a twenty-seventeen childtheme
- post_row_actions filter from parent theme not executing in child theme