[wp-trac] [WordPress Trac] #34097: Fix docs for is_email filter

WordPress Trac noreply at wordpress.org
Wed Sep 30 13:45:20 UTC 2015


#34097: Fix docs for is_email filter
--------------------------+-----------------------------
 Reporter:  chris@…       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  docs          |
--------------------------+-----------------------------
 The docs for the `is_email` action state that there are four parameters
 passed when in fact there are only three:

 {{{
         /**
          * Filter whether an email address is valid.
          *
          * This filter is evaluated under several different contexts, such
 as 'email_too_short',
          * 'email_no_at', 'local_invalid_chars', 'domain_period_sequence',
 'domain_period_limits',
          * 'domain_no_periods', 'sub_hyphen_limits', 'sub_invalid_chars',
 or no specific context.
          *
          * @since 2.8.0
          *
          * @param bool   $is_email Whether the email address has passed
 the is_email() checks. Default false.
          * @param string $email    The email address being checked.
          * @param string $message  An explanatory message to the user.
          * @param string $context  Context under which the email was
 tested.
          */
          return apply_filters( 'is_email', false, $email,
 'email_too_short' );
 }}}

 I don't know if someone was planning on adding `$message` or if they were
 confusing it with `$context` but since the latter is described more I kept
 that one.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34097>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list