Created
June 9, 2015 04:50
-
-
Save rcstr/693abca3ee726a42572c to your computer and use it in GitHub Desktop.
category-template.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( isset( $args['value_field'] ) && isset( $category->{$args['value_field']} ) ) { | |
$value_field = $args['value_field']; | |
$value = esc_attr( $category->{$value_field} ); | |
} elseif( isset( $args['value_field'] ) && 'url' === $args['value_field'] ) { | |
$value = esc_url( get_term_link( $category ) ); | |
} else { | |
$value_field = 'term_id'; | |
$value = esc_attr( $category->{$value_field} ) | |
} | |
$output .= "\t<option class=\"level-$depth\" value=\"" . $value . "\""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( isset( $args['value_field'] ) && isset( $category->{$args['value_field']} ) ) { | |
$value_field = $args['value_field']; | |
} else { | |
$value_field = 'term_id'; | |
} | |
$output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $category->{$value_field} ) . "\""; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment