Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #25329, comment 1


Ignore:
Timestamp:
09/16/2013 02:43:12 PM (11 years ago)
Author:
helen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25329, comment 1

    initial v1  
    1 Since `selected()` is comparing values, you should see if `in_array()` returns true.
     1Since `selected()` is comparing values, you should see if `in_array()` returns true. And since it can accept that the first value is just true or false, you can just use it as the first argument.
    22
    33{{{
    44$value = '1';
    5 selected( true, in_array( $value, array( '1', '3' ) ) );
     5selected( in_array( $value, array( '1', '3' ) ) );
    66}}}