Title: $required_text undefined
Last modified: August 30, 2016

---

# $required_text undefined

 *  [karl53](https://wordpress.org/support/users/karl53/)
 * (@karl53)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/required_text-undefined/)
 * A real newbie question here.
 * In the theme’s comment.php file, I’m modifying the $args parameter that will 
   be passed to comment_form();
 * Specifically, I want to add text to `comment_notes_before`. Thus my $arg looks
   like this
 * `$comments_args = array('comment_notes_before' => '<p class="comment-notes">'.
   __( 'Your email address will not be published.' ) . ( $req ? $required_text :'').'
   See our privacy statement</p>');`
 * This raises an “Undefined variable: **required_text**“
 * Of course I can hardcode the text, but that feels to me more like a hack. I guess
   this is really a php question. Is there something else I need to include in my
   code to expose the `$required_text` variable? Or is it never accessible?
 * Or, is it possible to append to the default rather than replacing the default
   text?
 * Thank you.

The topic ‘$required_text undefined’ is closed to new replies.

## Tags

 * [comment_form](https://wordpress.org/support/topic-tag/comment_form/)
 * [variables](https://wordpress.org/support/topic-tag/variables/)

 * 0 replies
 * 1 participant
 * Last reply from: [karl53](https://wordpress.org/support/users/karl53/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/required_text-undefined/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
