Here’s the solution!
function woocompare_button_icon( $html, $classes, $id, $nonce, $text, $preloader )
{
return sprintf( '<button type="button" class="%s" data-id="%s" data-nonce="%s"><i class="fa fa-heart-o" aria-hidden="true"></i> %s</button>', implode( ' ', $classes ), $id, $nonce, $text . $preloader );
}
add_filter( 'tm_woocompare_button', 'woocompare_button_icon', 10, 6);
Related Posts:
- Sanitize and data validation with apply_filters() function
- How many filter/action hooks are healthy?
- Filter specific shortcode output?
- Insert new element to array with add_filter
- remove_filter( ‘the_content’, ‘wpautop’ ); only for certain post types
- Valid characters for actions, hooks and filters
- How to hook into unregistering a widget instance?
- How can I extend the Gutenberg table block transform to allow colspans/rowspans on pasted table elements?
- How do I use the ‘http_request_host_is_external’ filter
- get_option() filtering and getting out of recursion
- Get excerpt from $post->post_content
- How can I add information underneath the user’s name on the users.php page?
- AJAX filter posts on click based on category
- How can I filter Microsoft Word gunk from pasted content?
- How to disable all WordPress emails modularly and programatically?
- Can I add custom meta for each image uploaded via media-upload.php?
- How do I know if author field was changed on post save?
- Allow Profile HTML for select users
- WordPress 3.5+ upload tool filter
- Search with filters and title
- Some questions regarding filter
- Use content custom filter for all shortcodes
- Filter all html output
- Problem getting single_template filter to work – I want to serve a different single.php file for posts in a certain category
- Too many actions/filters!
- Which hook is fired when inserting media into a post
- How to specify which category of the post to use in case of multiple categories
- Return array of images after content
- failed to filter hook `get_terms_defaults`
- Filter list by a unique meta value dilemma
- How to use shortcode attribute in separate function
- return values from hooks do_action and apply_filters, which is better
- Return a custom value in a function added to an action hook
- Using Conditional Statement in functions.php
- get_title without filter(the_title)
- How can filters be run when they are never applied?
- How to filter a wordpress core function?
- get_bookmarks filter not supplying query argument (wp 3.1)
- Function the_content not working
- Filter Posts by current Month
- Is there a filter called ‘network_admin_init’?
- Manipulating show_on_front, page_on_front, page_for_posts and template hierarchy
- Post Content, Special Characters and Filters
- Correct method of redirecting user login
- Where is the content cache when using apply_filters(‘the_content…?
- How to filter for user registration, be able to throw error message
- Does a plugin with a AJAX button filter exist? [closed]
- Admin filter for product SKU?
- Is there any filter to trigger as soon as media is uploaded to post or page?
- Filtering the post list in the admin area
- Filter pre_get_posts does not modify Mine/All/Pending
- add_filter with retrieve_password_message() not working in plugin, but works in functions.php
- How to check if a protected hook is hooked?
- Add a div of content within the_content after a certain block
- Gutenberg Block – Post Featured Image Filter Hook
- Can i use multiple ‘the_content’ filters?
- Prevent add_filter being applied to wp-admin pages
- Translate custom order status through a filter?
- Using preg_replace() with the_content filter
- term_link filter gives less atributes
- Add mime types with plugin
- Filter media upload attachment meta
- Is there a way to globallly apply esc_html( … ) to all inputs and anchors to filter out XSS markup?
- Filter wp_redirect() to stop redirect under certain condition
- Handle multiple parameters in filter
- Want to use wp_get_current_user() in query filter
- WP 4.5 hide core customizer sections
- Echo string in admin panel footer beside version no
- How to change default text for specific post type
- Add PHP code after title in single post pages?
- Apply wordpress filter checking category
- Custom nav walker: How to acces the $args parameter?
- How to stop the deduction in “wp_term_taxonomy” count, when the post is deleted?
- alternative to the_content filter
- Same URL for portfolio and for a page creates 404 error. Is there any filter that i can use for a child page?
- Filter widget_posts_args not working
- How to pass a variable between filter/action functions?
- how to unescape wordpress output
- Database & Post Search
- login_url filter creates permanent wp-admin -> wp-login redirection loop
- How can I change the button text of a custom widget?
- the_content filter not working when Jetpack activated. Any idea?
- Converting restricted html in comments to bbcode
- What is the proper/best way to have multiple add_filter for wp-job-manager-resume
- Modify WooCommerce email shipping text value
- Change shortcode output (filter?)
- How do I add a class to all sidebars to let a Google Custom Search Engine know not to index the content?
- How to replace all images in all posts and pages with a different size?
- Using Filters To Change Page Title
- How to add a class to Buddypress avatars in the Activity stream? [closed]
- using posts_where for meta data on pre_get_posts
- Updating User Profile on Registration
- can’t output gray scaled image I’ve created using add_image_size
- How properly write function to filter content in a template for plugin “multiple content blocks”
- ACF Load Field Groups Programmatically [closed]
- Why does using excerpt_more filter change link location?
- Replacing text using add_filter
- Background color and background image below element in Contact Form 7 – error tip [closed]
- Change password reqts with NO plugin without breaking resetpass link?
- How can I conditionally add the filter option_home?