[wp-trac] [WordPress Trac] #23870: Filter Glyph for Comment Required Fields
WordPress Trac
noreply at wordpress.org
Sat Mar 30 02:42:13 UTC 2013
#23870: Filter Glyph for Comment Required Fields
-------------------------------------+------------------------------
Reporter: cais | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+------------------------------
Comment (by SergeyBiryukov):
> This glyph is not easily manipulated without having to essentially over-
write the entire `comment_form()` function.
This seems to work for me:
{{{
function change_required_fields_glyph_23870( $defaults ) {
$defaults['fields']['author'] = str_replace( '*', '#',
$defaults['fields']['author'] );
$defaults['fields']['email'] = str_replace( '*', '#',
$defaults['fields']['email'] );
$defaults['comment_notes_before'] = str_replace( '*', '#',
$defaults['comment_notes_before'] );
return $defaults;
}
add_filter( 'comment_form_defaults', 'change_required_fields_glyph_23870'
);
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23870#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list