What you need to use is comment_form_defaults filter that has large and nested $defaults array passed. That array will have (among other things) something like this in it:
fields
author << this will have something like <span class="required">*</span> in it
email << this will have something like <span class="required">*</span> in it
url
comment_notes_before << this will have something like Required fields are marked<span class="required">*</span> in it
So in your filter you need to change these fields in array you got passed and return whole array.
Related Posts:
- Change comments form title on a page by page basis
- Filtering a function’ output for a new continued function
- Warning: in_array() null given in PHP function
- Display a post based on its metabox selection
- How to make a image-size selected by default in Media upload – WP v3.5
- Remove “Insert from URL” link in Media upload – WP 3.5
- static variable loop not working in WordPress
- adding a filter to a shortcode?
- Set media upload attachment link to none and hide it in WP v3.5
- How to store the_title() into a variable to reutrn the value, not just echo it
- Change the footer text on the login page
- add_filter to post-gallery and remove all ‘s?
- How to overwrite youtube embed?
- Rewriting search and pagination base
- Remove class that has been added by parent theme
- How do I know what variables are passed in a filter/action and what their meaning is?
- Need to get specific data from array
- Create an array from an array
- Replace comment avatars and links at the same time
- Adding ads code between comments
- How do I fetch all comments per post via WP REST API?
- Run a filter when a walker runs
- comments_number display outside specified span
- Handling Body class based on Template
- Get_avatar filter?
- Add a class to the anchor tag on HTML5 gallery
- How to properly loop through these external URLs to get them into the sitemap using this hook
- get a simple array of all of the term names that exist in all taxonomies
- Populate dropdown with Child Pages based on Parent Page chosen
- How can I remove a function that has been added to wordpress with add_filter?
- How do I add custom bulk actions to multiple custom post types?
- Add data attribute to each li in menu
- Why does my callback function not work with this custom filter hook?
- Removing “wpautop” (auto tags) only on certain pages?
- Print last modified date only on posts
- WordPress Gravatar filter is removing my custom attributes
- foreach loop still echoes array
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- Ajax load more button for comments wordpress
- Unique icons next to each WordPress menu item
- Limit 1 global comment per minute
- Create Page To Count Comments For Each Post In WordPress Site
- wp-comments-post.php file returns a blank page
- php function to display commenter username or login
- meaning of (array)function()
- How to make modifications only to certain elements of an HTML string on the server-side?
- Override a function defined in wp-includes/comment-template.php
- wp_force_remove_style’ not found
- How to fix this warning:call_user_func_array() expects exactly 2 parameters, 1 given in D:\wamp\www\…….\wp-includes\class-wp-hook.php on line 286
- Deleting Certain terms from appearing on the front end as links
- Content filter won’t work
- How to use array in function to get only value I want
- Upload multiple files in randomly generated folder using wp_upload_bits
- Create page template via functions.php?
- Add meta tags to a custom header
- Send a mail to specific address in a custom field when a new comment is made on a specific post
- If Array Values Match Another Array’s Values, Then
- How to have different site identity logos on each page on Astra Theme [closed]
- Fetching Initials of the Commentator in the WordPress Website
- Get the name of menu item with wp_nav_menu
- How to add aria role and schema markup to custom walker container
- Dynamically adding filters
- Only load certain artists on this page
- How to make sure relative URL works when site is not on root domain?
- Custom functions for string data calculations
- User filter posts by year
- comment_post (if comment is approved OR $comment_approved === 1) not working?
- Show all people who commented on all posts by an author
- How to remove get_header From all single pages in wordpress with functions.php without plugin?
- Change lost password url to a mailto URL in WordPress
- Remove span tags from WooCommerce Downloads page
- How to bind each “the_content” elements to a custom variables
- Reload page with a different shortcode when a user selects from a dropdown
- WordPress Ajax filter: Create two loops for different output styles?
- How to filter specific element of an array in wordpress/php?
- Custom Bulk Actions handler not firing
- Store custom field’s multiple values in one user meta key
- How to generate customized filtered output for the gallery
- Fatal error when using array_diff() function inside of wp_update_nav_menu hook?
- How to remove title tag with this filter
- Display posts using post ID’s in an array
- str_replace not preserving whitespace
- Add custom filter to register data in array
- Page returning ID from array, how to return the correct values for post in acf wordpress
- Woocommerce Price Text
- Limit Taxonomy Parents
- Search box background on a different page template
- Showing all post from all post type in admin backstage
- AJAX: WordPress filters inside $html do not work as intended
- Assign new post author IF another user in custom field on post transition
- Add attribute to featured image with filter (wp_get_attachment_image_attributes)
- Custom WordPress Function – Adding items from Foreach Loop into an array and Updating Field based on array of IDs (ACF + WooCommerce)
- How to add different menu items on different menus?
- Replace block content with an array
- How to pass value to add_filter wpcf7_form_tag from another function?
- Add text below WooCommerce short description if metabox value is true
- Is there a hook that I can use when a fatal error occurs?
- Unable to logout correctly after wp-login file was modified
- Get check box values inside array for use in posting form data
- Filtering with Attributes – how to display all non-queried products below query