Added wc prefix to function name.

This commit is contained in:
Peter Fabian 2018-04-13 16:29:16 +02:00
parent 62f9b129dc
commit 8cb1490d55
1 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@ function woocommerce_wp_checkbox( $field ) {
* @param mixed $options Options to go through when looking for value.
* @return bool
*/
function is_value_in_options( $value, $options ) {
function wc_is_value_in_options( $value, $options ) {
$value = (string) $value;
if ( is_array( $options ) ) {
$options = array_map( 'strval', $options );
@ -247,7 +247,7 @@ function woocommerce_wp_select( $field ) {
<select <?php echo wc_implode_html_attributes( $field_attributes ); // WPCS: XSS ok. ?>>
<?php
foreach ( $field['options'] as $key => $value ) {
echo '<option value="' . esc_attr( $key ) . '" ' . selected( is_value_in_options( $key, $field['value'] ), true, false ) . '>' . esc_html( $value ) . '</option>';
echo '<option value="' . esc_attr( $key ) . '" ' . selected( wc_is_value_in_options( $key, $field['value'] ), true, false ) . '>' . esc_html( $value ) . '</option>';
}
?>
</select>