| @@ -1,21 +1,21 @@ | ||
| 1 | -<?php | |
| 2 | -/* @param string $meta Meta name. | |
| 3 | - * @param array $details Contains the details for the field. | |
| 4 | - * @param string $value Contains input value; | |
| 5 | - * @param string $context Context where the function is used. Depending on it some actions are preformed.; | |
| 6 | - * @return string $element input element html string. */ | |
| 7 | - | |
| 8 | -require_once( plugin_dir_path(__FILE__) . '../assets/country/country-select.php' ); | |
| 9 | -$country_list = apply_filters( 'wck-country-list', wck_country_list() ); | |
| 10 | -$element .= '<select name="'. esc_attr( Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ) ) .'" id="'; | |
| 11 | -if( !empty( $frontend_prefix ) ) | |
| 12 | - $element .= $frontend_prefix; | |
| 13 | -$element .= esc_attr( Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ) ) .'" class="mb-country-select mb-field" >'; | |
| 14 | -$element .= '<option value="">'. __('...Chose', 'wck') .'</option>'; | |
| 15 | -if( !empty( $country_list ) ){ | |
| 16 | - foreach( $country_list as $option ){ | |
| 17 | - $element .= '<option value="'. esc_attr( $option ) .'" '. selected( $option, $value, false ) .' >'. esc_html( $option ) .'</option>'; | |
| 18 | - } | |
| 19 | -} | |
| 20 | -$element .= '</select>'; | |
| 1 | +<?php | |
| 2 | +/* @param string $meta Meta name. | |
| 3 | + * @param array $details Contains the details for the field. | |
| 4 | + * @param string $value Contains input value; | |
| 5 | + * @param string $context Context where the function is used. Depending on it some actions are preformed.; | |
| 6 | + * @return string $element input element html string. */ | |
| 7 | + | |
| 8 | +require_once( plugin_dir_path(__FILE__) . '../assets/country/country-select.php' ); | |
| 9 | +$country_list = apply_filters( 'wck-country-list', wck_country_list() ); | |
| 10 | +$element .= '<select name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ) ) .'" id="'; | |
| 11 | +if( !empty( $frontend_prefix ) ) | |
| 12 | + $element .= $frontend_prefix; | |
| 13 | +$element .= esc_attr( Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ) ) .'" class="mb-country-select mb-field" >'; | |
| 14 | +$element .= '<option value="">'. __('...Choose', 'profile-builder') .'</option>'; | |
| 15 | +if( !empty( $country_list ) ){ | |
| 16 | + foreach( $country_list as $option ){ | |
| 17 | + $element .= '<option value="'. esc_attr( $option ) .'" '. selected( $option, $value, false ) .' >'. esc_html( $option ) .'</option>'; | |
| 18 | + } | |
| 19 | +} | |
| 20 | +$element .= '</select>'; | |
| 21 | 21 | ?> |