Changeset 32727 for trunk/src/wp-includes/post-template.php
- Timestamp:
- 06/12/2015 01:04:04 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-template.php
r32617 r32727 991 991 * @since 2.1.0 992 992 * @since 4.2.0 The `$value_field` argument was added. 993 * @since 4.3.0 The `$class` argument was added. 993 994 * 994 995 * @param array|string $args { … … 1003 1004 * Default 'page_id'. 1004 1005 * @type string $id Value for the 'id' attribute of the select element. 1006 * @type string $class Value for the 'class' attribute of the select element. Default: none. 1005 1007 * Defaults to the value of `$name`. 1006 1008 * @type string $show_option_none Text to display for showing no pages. Default empty (does not display). … … 1017 1019 'selected' => 0, 'echo' => 1, 1018 1020 'name' => 'page_id', 'id' => '', 1021 'class' => '', 1019 1022 'show_option_none' => '', 'show_option_no_change' => '', 1020 1023 'option_none_value' => '', … … 1032 1035 1033 1036 if ( ! empty( $pages ) ) { 1034 $output = "<select name='" . esc_attr( $r['name'] ) . "' id='" . esc_attr( $r['id'] ) . "'>\n"; 1037 $class = ''; 1038 if ( ! empty( $r['class'] ) ) { 1039 $class = " class='" . esc_attr( $r['class'] ) . "'"; 1040 } 1041 1042 $output = "<select name='" . esc_attr( $r['name'] ) . "'" . $class . " id='" . esc_attr( $r['id'] ) . "'>\n"; 1035 1043 if ( $r['show_option_no_change'] ) { 1036 1044 $output .= "\t<option value=\"-1\">" . $r['show_option_no_change'] . "</option>\n";
Note: See TracChangeset
for help on using the changeset viewer.