Changeset 3133754
- Timestamp:
- 08/11/2024 02:58:46 PM (20 months ago)
- Location:
- acf-city-selector
- Files:
-
- 32 edited
- 1 copied
-
tags/1.14.0 (copied) (copied from acf-city-selector/trunk)
-
tags/1.14.0/ACF_City_Selector.php (modified) (6 diffs)
-
tags/1.14.0/admin/acf-city-selector-v4.php (modified) (6 diffs)
-
tags/1.14.0/admin/acf-city-selector-v5.php (modified) (5 diffs)
-
tags/1.14.0/admin/acfcs-search.php (modified) (3 diffs)
-
tags/1.14.0/admin/acfcs-settings.php (modified) (1 diff)
-
tags/1.14.0/admin/admin-right.php (modified) (1 diff)
-
tags/1.14.0/inc/acfcs-actions.php (modified) (1 diff)
-
tags/1.14.0/inc/acfcs-ajax.php (modified) (2 diffs)
-
tags/1.14.0/inc/acfcs-functions.php (modified) (32 diffs)
-
tags/1.14.0/inc/form-handling.php (modified) (3 diffs)
-
tags/1.14.0/languages/acf-city-selector-de_DE.mo (modified) (previous)
-
tags/1.14.0/languages/acf-city-selector-de_DE.po (modified) (21 diffs)
-
tags/1.14.0/languages/acf-city-selector-nl_NL.mo (modified) (previous)
-
tags/1.14.0/languages/acf-city-selector-nl_NL.po (modified) (20 diffs)
-
tags/1.14.0/languages/acf-city-selector.pot (modified) (11 diffs)
-
tags/1.14.0/readme.txt (modified) (2 diffs)
-
trunk/ACF_City_Selector.php (modified) (6 diffs)
-
trunk/admin/acf-city-selector-v4.php (modified) (6 diffs)
-
trunk/admin/acf-city-selector-v5.php (modified) (5 diffs)
-
trunk/admin/acfcs-search.php (modified) (3 diffs)
-
trunk/admin/acfcs-settings.php (modified) (1 diff)
-
trunk/admin/admin-right.php (modified) (1 diff)
-
trunk/inc/acfcs-actions.php (modified) (1 diff)
-
trunk/inc/acfcs-ajax.php (modified) (2 diffs)
-
trunk/inc/acfcs-functions.php (modified) (32 diffs)
-
trunk/inc/form-handling.php (modified) (3 diffs)
-
trunk/languages/acf-city-selector-de_DE.mo (modified) (previous)
-
trunk/languages/acf-city-selector-de_DE.po (modified) (21 diffs)
-
trunk/languages/acf-city-selector-nl_NL.mo (modified) (previous)
-
trunk/languages/acf-city-selector-nl_NL.po (modified) (20 diffs)
-
trunk/languages/acf-city-selector.pot (modified) (11 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
acf-city-selector/tags/1.14.0/ACF_City_Selector.php
r3074624 r3133754 4 4 Plugin URI: https://acf-city-selector.com 5 5 Description: An extension for ACF which allows you to select a city based on country and province/state. 6 Version: 1.1 3.07 Tested up to: 6. 5.26 Version: 1.14.0 7 Tested up to: 6.6.1 8 8 Requires PHP: 7.0 9 9 Author: Beee … … 32 32 */ 33 33 public function __construct() { 34 35 $this->settings = array(34 35 $this->settings = [ 36 36 'db_version' => '1.0', 37 37 'url' => plugin_dir_url( __FILE__ ), 38 'version' => '1.1 3.0',39 );40 38 'version' => '1.14.0', 39 ]; 40 41 41 if ( ! class_exists( 'ACFCS_WEBSITE_URL' ) ) { 42 42 define( 'ACFCS_WEBSITE_URL', 'https://acf-city-selector.com' ); … … 47 47 define( 'ACFCS_PLUGIN_PATH', $plugin_path ); 48 48 } 49 50 register_activation_hook( __FILE__, array( $this, 'acfcs_plugin_activation' ));51 register_deactivation_hook( __FILE__, array( $this, 'acfcs_plugin_deactivation' ));52 53 add_action( 'acf/register_fields', array( $this, 'acfcs_include_field_types' )); // v454 add_action( 'acf/include_field_types', array( $this, 'acfcs_include_field_types' )); // v555 56 add_action( 'admin_enqueue_scripts', array( $this, 'acfcs_add_scripts' ));57 add_action( 'wp_enqueue_scripts', array( $this, 'acfcs_add_scripts' ));58 59 add_action( 'admin_menu', array( $this, 'acfcs_add_admin_pages' ));60 add_action( 'admin_init', array( $this, 'acfcs_admin_menu' ));61 add_action( 'admin_init', array( $this, 'acfcs_errors' ));62 add_action( 'admin_init', array( $this, 'acfcs_check_table' ));63 add_action( 'admin_notices', array( $this, 'acfcs_check_cities' ));64 add_action( 'init', array( $this, 'acfcs_load_textdomain' ));65 add_action( 'plugins_loaded', array( $this, 'acfcs_change_plugin_order' ), 5 );66 add_action( 'plugins_loaded', array( $this, 'acfcs_check_for_acf' ), 6 );67 add_action( 'plugins_loaded', array( $this, 'acfcs_check_acf_version' ));68 69 add_action( 'acf/input/admin_l10n', array( $this, 'acfcs_error_messages' ));70 71 add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'acfcs_settings_link' ));72 49 50 register_activation_hook( __FILE__, [ $this, 'acfcs_plugin_activation' ] ); 51 register_deactivation_hook( __FILE__, [ $this, 'acfcs_plugin_deactivation' ] ); 52 53 add_action( 'acf/register_fields', [ $this, 'acfcs_include_field_types' ] ); // v4 54 add_action( 'acf/include_field_types', [ $this, 'acfcs_include_field_types' ] ); // v5 55 56 add_action( 'admin_enqueue_scripts', [ $this, 'acfcs_add_scripts' ] ); 57 add_action( 'wp_enqueue_scripts', [ $this, 'acfcs_add_scripts' ] ); 58 59 add_action( 'admin_menu', [ $this, 'acfcs_add_admin_pages' ] ); 60 add_action( 'admin_init', [ $this, 'acfcs_admin_menu' ] ); 61 add_action( 'admin_init', [ $this, 'acfcs_errors' ] ); 62 add_action( 'admin_init', [ $this, 'acfcs_check_table' ] ); 63 add_action( 'admin_notices', [ $this, 'acfcs_check_cities' ] ); 64 add_action( 'init', [ $this, 'acfcs_load_textdomain' ] ); 65 add_action( 'plugins_loaded', [ $this, 'acfcs_change_plugin_order' ], 5 ); 66 add_action( 'plugins_loaded', [ $this, 'acfcs_check_for_acf' ], 6 ); 67 add_action( 'plugins_loaded', [ $this, 'acfcs_check_acf_version' ] ); 68 69 add_action( 'acf/input/admin_l10n', [ $this, 'acfcs_error_messages' ] ); 70 71 add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), [ $this, 'acfcs_settings_link' ] ); 72 73 73 // functions & hooks 74 74 include 'inc/acfcs-actions.php'; … … 106 106 public function acfcs_plugin_deactivation() { 107 107 delete_option( 'acfcs_db_version' ); 108 // this hook is here because I didn't want to create a new hook for an existing action109 do_action( 'acfcs_delete_transients' );110 108 // other important stuff gets done in uninstall.php 111 109 } … … 150 148 } 151 149 } 152 153 154 /**155 * Check if cities need to be re-imported156 *157 * @return void158 */150 151 152 /** 153 * Check if cities need to be re-imported 154 * 155 * @return void 156 */ 159 157 public function acfcs_check_cities() { 160 if ( '1.7.0' < $this->settings[ 'version' ] && false == get_option( 'acfcs_city_update_1_8_0' ) ) {161 $countries = [ 'nl', 'be' ];162 foreach( $countries as $country_code ) {163 if ( true === acfcs_has_cities( $country_code ) ) {164 $reimport[] = $country_code;165 }166 }167 if ( isset( $reimport ) ) {168 $country_name = 1 === count( $reimport ) ? acfcs_get_country_name( $reimport[ 0 ] ) : false;169 $notice = sprintf( __( 'Several %s had broken ascii characters. You need to re-import these countries to get the correct city names.', 'acf-city-selector' ), _n( sprintf( __( 'cities in %s', 'acf-city-selector' ), $country_name ), __( 'cities in Belgium and Netherlands', 'acf-city-selector' ), count( $reimport ), 'acf-city-selector' ) );170 echo sprintf( '<div class="notice notice-warning is-dismissible"><p>%s</p></div>', $notice );171 } else {172 update_option( 'acfcs_city_update_1_8_0', 'done' );173 }174 }158 if ( '1.7.0' < $this->settings[ 'version' ] && false == get_option( 'acfcs_city_update_1_8_0' ) ) { 159 $countries = [ 'nl', 'be' ]; 160 foreach( $countries as $country_code ) { 161 if ( true === acfcs_has_cities( $country_code ) ) { 162 $reimport[] = $country_code; 163 } 164 } 165 if ( isset( $reimport ) ) { 166 $country_name = 1 === count( $reimport ) ? acfcs_get_country_name( $reimport[ 0 ] ) : false; 167 $notice = sprintf( __( 'Several %s had broken ascii characters. You need to re-import these countries to get the correct city names.', 'acf-city-selector' ), _n( sprintf( __( 'cities in %s', 'acf-city-selector' ), $country_name ), __( 'cities in Belgium and Netherlands', 'acf-city-selector' ), count( $reimport ), 'acf-city-selector' ) ); 168 echo sprintf( '<div class="notice notice-warning is-dismissible"><p>%s</p></div>', $notice ); 169 } else { 170 update_option( 'acfcs_city_update_1_8_0', 'done' ); 171 } 172 } 175 173 } 176 174 … … 345 343 346 344 public function acfcs_load_textdomain() { 347 load_plugin_textdomain( 'acf-city-selector', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );345 load_plugin_textdomain( 'acf-city-selector', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 348 346 } 349 347 -
acf-city-selector/tags/1.14.0/admin/acf-city-selector-v4.php
r2696652 r3133754 13 13 var $settings, // will hold info such as dir / path 14 14 $defaults; // will hold default field options 15 16 17 /* 18 * __construct 19 * 20 * Set name / label needed for actions / filters 21 * 22 * @since 3.6 23 * @date 23/01/13 24 */ 15 16 17 /** 18 * __construct 19 * 20 * Set name / label needed for actions / filters 21 * 22 * @since 3.6 23 * @date 23/01/13 24 * 25 * @param $settings 26 */ 25 27 function __construct( $settings ) { 26 28 … … 42 44 43 45 44 /* 45 * create_options() 46 * 47 * Create extra options for your field. This is rendered when editing a field. 48 * The value of $field['name'] can be used (like below) to save extra data to the $field 49 * 50 * @type action 51 * @since 3.6 52 * @date 23/01/13 53 * 54 * @param $field - an array holding all the field's data 55 */ 46 /** 47 * create_options() 48 * 49 * Create extra options for your field. This is rendered when editing a field. 50 * The value of $field['name'] can be used (like below) to save extra data to the $field 51 * 52 * @type action 53 * @since 3.6 54 * @date 23/01/13 55 * 56 * @param $field 57 * 58 * @return void 59 */ 56 60 function create_options( $field ) { 57 61 $field = array_merge($this->defaults, $field); … … 130 134 131 135 132 /* 133 * create_field() 134 * 135 * Create the HTML interface for your field 136 * 137 * @param $field - an array holding all the field's data 138 * 139 * @type action 140 * @since 3.6 141 * @date 23/01/13 142 */ 136 /** 137 * create_field() 138 * 139 * Create the HTML interface for your field 140 * 141 * @type action 142 * @since 3.6 143 * @date 23/01/13 144 * 145 * @param $field 146 * 147 * @return void 148 */ 143 149 function create_field( $field ) { 144 150 $field = array_merge( $this->defaults, $field ); … … 197 203 198 204 199 /* 200 * input_admin_enqueue_scripts() 201 * 202 * This action is called in the admin_enqueue_scripts action on the edit screen where your field is created. 203 * Use this action to add CSS + JavaScript to assist your create_field() action. 204 * 205 * $info https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts 206 * @type action 207 * @since 3.6 208 * @date 23/01/13 209 * 210 * @TODO: DRY 211 */ 205 /** 206 * input_admin_enqueue_scripts() 207 * 208 * This action is called in the admin_enqueue_scripts action on the edit screen where your field is created. 209 * Use this action to add CSS + JavaScript to assist your create_field() action. 210 * 211 * $info https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts 212 * @type action 213 * @since 3.6 214 * @date 23/01/13 215 * 216 * @return void 217 * 218 * @TODO: DRY 219 */ 212 220 function input_admin_enqueue_scripts() { 213 221 … … 265 273 266 274 267 /* 268 *load_value()269 *270 *This filter is applied to the $value after it is loaded from the db271 *272 * @typefilter273 * @since3.6274 * @date23/01/13275 *276 * @param $value - the value found in the database277 * @param $post_id - the $post_id from which the value was loaded278 * @param $field - the field array holding all the field options279 *280 * @TODO: DRY281 *282 * @return $value - the value to be saved in the database283 */275 /** 276 * load_value() 277 * 278 * This filter is applied to the $value after it is loaded from the db 279 * 280 * @type filter 281 * @since 3.6 282 * @date 23/01/13 283 * 284 * @param $value 285 * @param $post_id 286 * @param $field 287 * 288 * @return mixed 289 * 290 * @TODO: DRY 291 */ 284 292 function load_value( $value, $post_id, $field ) { 285 293 $state_code = false; … … 388 396 } 389 397 390 391 398 // initialize 392 399 new acf_field_city_selector( $this->settings ); 393 400 394 395 // class_exists check396 401 endif; -
acf-city-selector/tags/1.14.0/admin/acf-city-selector-v5.php
r2906374 r3133754 69 69 'value' => $field[ 'show_labels' ], 70 70 ) ); 71 72 acf_render_field_setting( $field, array(71 72 acf_render_field_setting( $field, array( 73 73 'choices' => $select_options, 74 74 'instructions' => esc_html__( 'Use select2 for dropdowns', 'acf-city-selector' ), … … 124 124 */ 125 125 function render_field( $field ) { 126 $default_country = ( isset( $field[ 'default_country' ] ) && ! empty( $field[ 'default_country' ] ) ) ? $field[ 'default_country' ] : false;127 $prefill_cities = [];128 $prefill_states = [];129 $selected_country = ( isset( $field[ 'value' ][ 'countryCode' ] ) ) ? $field[ 'value' ][ 'countryCode' ] : false;130 $selected_state = ( isset( $field[ 'value' ][ 'stateCode' ] ) ) ? $field[ 'value' ][ 'stateCode' ] : false;131 $selected_city = ( isset( $field[ 'value' ][ 'cityName' ] ) ) ? $field[ 'value' ][ 'cityName' ] : false;132 $show_first = true;133 $store_meta = ( isset( $field[ 'store_meta' ] ) ) ? $field[ 'store_meta' ] : false;134 $which_fields = ( isset( $field[ 'which_fields' ] ) ) ? $field[ 'which_fields' ] : 'all';135 136 if ( false !== $default_country && false == $selected_country ) {126 $default_country = ( isset( $field[ 'default_country' ] ) && ! empty( $field[ 'default_country' ] ) ) ? $field[ 'default_country' ] : false; 127 $prefill_cities = []; 128 $prefill_states = []; 129 $selected_country = ( isset( $field[ 'value' ][ 'countryCode' ] ) ) ? $field[ 'value' ][ 'countryCode' ] : false; 130 $selected_state = ( isset( $field[ 'value' ][ 'stateCode' ] ) ) ? $field[ 'value' ][ 'stateCode' ] : false; 131 $selected_city = ( isset( $field[ 'value' ][ 'cityName' ] ) ) ? $field[ 'value' ][ 'cityName' ] : false; 132 $show_first = true; 133 $store_meta = ( isset( $field[ 'store_meta' ] ) ) ? $field[ 'store_meta' ] : false; 134 $which_fields = ( isset( $field[ 'which_fields' ] ) ) ? $field[ 'which_fields' ] : 'all'; 135 136 if ( false !== $default_country && false == $selected_country ) { 137 137 // New post with default country 138 138 if ( in_array( $which_fields, [ 'all', 'country_state', 'state_city' ] ) ) { … … 176 176 echo acfcs_render_dropdown( 'city', $field, $selected_city, $prefill_values ); 177 177 } 178 if ( ! isset( $field[ 'parent_layout' ] ) && ! isset( $field[ 'parent_repeater' ] ) && $store_meta ) {179 echo acfcs_render_hidden_field( 'store_meta', '1' );178 if ( ! isset( $field[ 'parent_layout' ] ) && ! isset( $field[ 'parent_repeater' ] ) && $store_meta ) { 179 echo acfcs_render_hidden_field( 'store_meta', '1' ); 180 180 } 181 181 } … … 238 238 } 239 239 } 240 240 241 241 if ( strlen( $country_code ) == 2 && false != $state_code ) { 242 242 global $wpdb; 243 $table = $wpdb->prefix . 'cities';244 $sql_query = $wpdb->prepare( "SELECT country, state_name FROM {$table} WHERE country_code = %s AND state_code = %s", $country_code, $state_code );245 $row = $wpdb->get_row( $sql_query );246 $value[ 'stateCode' ] = $state_code;247 $value[ 'stateName' ] = ( isset( $row->state_name ) ) ? $row->state_name : false;248 $value[ 'countryName' ] = ( isset( $row->country ) ) ? $row->country : false;243 $table = $wpdb->prefix . 'cities'; 244 $sql_query = $wpdb->prepare( "SELECT country, state_name FROM {$table} WHERE country_code = %s AND state_code = %s", $country_code, $state_code ); 245 $row = $wpdb->get_row( $sql_query ); 246 $value[ 'stateCode' ] = $state_code; 247 $value[ 'stateName' ] = ( isset( $row->state_name ) ) ? $row->state_name : false; 248 $value[ 'countryName' ] = ( isset( $row->country ) ) ? $row->country : false; 249 249 } 250 250 … … 325 325 } 326 326 } 327 328 if ( ! isset( $field[ 'parent_layout' ] ) && ! isset( $field[ 'parent_repeater' ] ) ) {329 do_action( 'acfcs_store_meta', $value, $post_id );330 }327 328 if ( ! isset( $field[ 'parent_layout' ] ) && ! isset( $field[ 'parent_repeater' ] ) ) { 329 do_action( 'acfcs_store_meta', $value, $post_id ); 330 } 331 331 332 332 return $value; -
acf-city-selector/tags/1.14.0/admin/acfcs-search.php
r2791052 r3133754 113 113 114 114 <div class="acfcs__search-criteria acfcs__search-criteria--search"> 115 <label for="acfcs_search" class="screen-reader-text"><?php esc_attr_e( 'Search term', 'acf-city-selector' ); ?></label>115 <label for="acfcs_search" class="screen-reader-text"><?php esc_attr_e( 'Search term', 'acf-city-selector' ); ?></label> 116 116 <input name="acfcs_search" id="acfcs_search" type="text" value="<?php if ( false != $searched_term ) { echo stripslashes( $searched_term ); } ?>" placeholder="<?php esc_html_e( 'City name', 'acf-city-selector' ); ?>"> 117 117 </div> … … 120 120 121 121 <div class="acfcs__search-criteria acfcs__search-criteria--limit"> 122 <label for="acfcs_limit" class="screen-reader-text"><?php esc_attr_e( 'Limit', 'acf-city-selector' ); ?></label>122 <label for="acfcs_limit" class="screen-reader-text"><?php esc_attr_e( 'Limit', 'acf-city-selector' ); ?></label> 123 123 <input name="acfcs_limit" id="acfcs_limit" type="number" value="<?php if ( false != $selected_limit ) { echo $selected_limit; } ?>" placeholder="<?php esc_html_e( 'Limit', 'acf-city-selector' ); ?>"> 124 124 </div> … … 127 127 128 128 <div class="acfcs__search-criteria acfcs__search-criteria--orderby"> 129 <label for="acfcs_orderby" class="screen-reader-text"><?php esc_attr_e( 'Order by', 'acf-city-selector' ); ?></label>129 <label for="acfcs_orderby" class="screen-reader-text"><?php esc_attr_e( 'Order by', 'acf-city-selector' ); ?></label> 130 130 <select name="acfcs_orderby" id="acfcs_orderby"> 131 131 <option value=""> -
acf-city-selector/tags/1.14.0/admin/acfcs-settings.php
r2685642 r3133754 61 61 62 62 <form method="post" action=""> 63 <input name="acfcs_delete_transients" value="<?php echo wp_create_nonce( 'acfcs-delete-transients-nonce' ); ?>" type="hidden" />64 <?php echo sprintf( '<h2>%s</h2>', esc_html__( 'Delete transients', 'acf-city-selector' ) ); ?>65 <?php echo sprintf( '<p>%s</p>', esc_html__( "If you're seeing unexpected results in your dropdowns, try clearing all transients with this option.", 'acf-city-selector' ) ); ?>66 <input type="submit" class="button button-primary" value="<?php esc_html_e( "Delete transients", 'acf-city-selector' ); ?>" />67 </form>68 69 <br /><hr />70 71 <form method="post" action="">72 63 <input name="acfcs_truncate_table_nonce" value="<?php echo wp_create_nonce( 'acfcs-truncate-table-nonce' ); ?>" type="hidden" /> 73 64 <?php echo sprintf( '<h2>%s</h2>', esc_html__( 'Clear the database', 'acf-city-selector' ) ); ?> -
acf-city-selector/tags/1.14.0/admin/admin-right.php
r2791052 r3133754 25 25 echo sprintf( '<p>%s</p>', esc_html__( 'If you have some good suggestions for improvements and/or new features, please share them with us, maybe we can incorporate it.', 'acf-city-selector' ) ); 26 26 ?> 27 28 27 </div> 29 28 </div> -
acf-city-selector/tags/1.14.0/inc/acfcs-actions.php
r3074624 r3133754 1 1 <?php 2 2 /** 3 * Function to delete transients3 * Do stuff after certain imports 4 4 * 5 * @param false $country_code 5 * @param $country_code 6 * 7 * @return void 6 8 */ 7 function acfcs_delete_transients( $country_code = false ) { 8 if ( false != $country_code ) { 9 delete_transient( 'acfcs_states_' . strtolower( $country_code ) ); 10 11 // get states for country code 12 $states = acfcs_get_states( $country_code ); 13 foreach( $states as $key => $state ) { 14 $country_code_with_state = strtolower( $key ); 15 delete_transient( 'acfcs_cities_' . $country_code_with_state ); 16 } 9 function acfcs_reimport_cities( $country_code = false ) { 10 if ( $country_code && in_array( $country_code, [ 'nl', 'be' ] ) ) { 11 update_option( 'acfcs_city_update_1_8_0_' . $country_code, 'done' ); 17 12 18 } else { 19 delete_transient( 'acfcs_countries' ); 20 $countries = acfcs_get_countries( false, false, true ); 21 22 if ( ! empty( $countries ) ) { 23 foreach( $countries as $country_code => $label ) { 24 do_action( 'acfcs_delete_transients', $country_code ); 25 delete_transient( sprintf( 'acfcs_states_%s', $country_code ) ); 26 } 13 $belgium_done = get_option( 'acfcs_city_update_1_8_0_be' ); 14 $netherlands_done = get_option( 'acfcs_city_update_1_8_0_nl' ); 15 16 if ( $belgium_done && $netherlands_done ) { 17 delete_option( 'acfcs_city_update_1_8_0_be' ); 18 delete_option( 'acfcs_city_update_1_8_0_nl' ); 19 update_option( 'acfcs_city_update_1_8_0', 'done' ); 27 20 } 28 21 } 29 22 } 30 add_action( 'acfcs_delete_transients', 'acfcs_delete_transients' ); 31 add_action( 'acfcs_after_success_import', 'acfcs_delete_transients' ); 32 add_action( 'acfcs_after_success_import_raw', 'acfcs_delete_transients' ); 33 add_action( 'acfcs_after_success_nuke', 'acfcs_delete_transients' ); 34 35 36 /** 37 * Do stuff after certain imports 38 * 39 * @param $country_code 40 * 41 * @return void 42 */ 43 function acfcs_reimport_cities( $country_code = false ) { 44 if ( $country_code && in_array( $country_code, [ 'nl', 'be' ] ) ) { 45 update_option( 'acfcs_city_update_1_8_0_' . $country_code, 'done' ); 46 47 $belgium_done = get_option( 'acfcs_city_update_1_8_0_be' ); 48 $netherlands_done = get_option( 'acfcs_city_update_1_8_0_nl' ); 49 50 if ( $belgium_done && $netherlands_done ) { 51 delete_option( 'acfcs_city_update_1_8_0_be' ); 52 delete_option( 'acfcs_city_update_1_8_0_nl' ); 53 update_option( 'acfcs_city_update_1_8_0', 'done' ); 54 } 55 } 56 } 57 add_action( 'acfcs_after_success_import', 'acfcs_reimport_cities' ); 58 59 60 /** 61 * Save location as single meta values 62 * 63 * @param $value 64 * @param $post_id 65 * 66 * @return void 67 */ 68 function acfcs_save_single_meta( $value, $post_id ) { 69 if ( isset( $_POST[ 'store_meta' ] ) && 1 == $_POST[ 'store_meta' ] ) { 70 if ( ! empty( $value[ 'countryCode' ] ) ) { 71 update_post_meta( $post_id, 'acfcs_search_country', $value[ 'countryCode' ] ); 72 } 73 if ( ! empty( $value[ 'stateCode' ] ) ) { 74 update_post_meta( $post_id, 'acfcs_search_state', $value[ 'stateCode' ] ); 75 } 76 if ( ! empty( $value[ 'cityName' ] ) ) { 77 update_post_meta( $post_id, 'acfcs_search_city', $value[ 'cityName' ] ); 78 } 79 } elseif ( $post_id ) { 80 // remove meta 81 delete_post_meta( $post_id, 'acfcs_search_country' ); 82 delete_post_meta( $post_id, 'acfcs_search_state' ); 83 delete_post_meta( $post_id, 'acfcs_search_city' ); 84 } 85 } 86 add_action( 'acfcs_store_meta', 'acfcs_save_single_meta', 10, 2 ); 23 add_action( 'acfcs_after_success_import', 'acfcs_reimport_cities' ); 24 25 26 /** 27 * Save location as single meta values 28 * 29 * @param $value 30 * @param $post_id 31 * 32 * @return void 33 */ 34 function acfcs_save_single_meta( $value, $post_id ) { 35 if ( isset( $_POST[ 'store_meta' ] ) && 1 == $_POST[ 'store_meta' ] ) { 36 if ( ! empty( $value[ 'countryCode' ] ) ) { 37 update_post_meta( $post_id, 'acfcs_search_country', $value[ 'countryCode' ] ); 38 } 39 if ( ! empty( $value[ 'stateCode' ] ) ) { 40 update_post_meta( $post_id, 'acfcs_search_state', $value[ 'stateCode' ] ); 41 } 42 if ( ! empty( $value[ 'cityName' ] ) ) { 43 update_post_meta( $post_id, 'acfcs_search_city', $value[ 'cityName' ] ); 44 } 45 } elseif ( $post_id ) { 46 // remove meta 47 delete_post_meta( $post_id, 'acfcs_search_country' ); 48 delete_post_meta( $post_id, 'acfcs_search_state' ); 49 delete_post_meta( $post_id, 'acfcs_search_city' ); 50 } 51 } 52 add_action( 'acfcs_store_meta', 'acfcs_save_single_meta', 10, 2 ); -
acf-city-selector/tags/1.14.0/inc/acfcs-ajax.php
r2841215 r3133754 27 27 } 28 28 } 29 29 30 30 if ( ! isset( $field[ 'show_labels' ] ) && isset( $_POST[ 'show_labels' ] ) ) { 31 $field[ 'show_labels' ] = ( '1' == sanitize_text_field( $_POST[ 'show_labels' ] ) ) ? true : false;32 }31 $field[ 'show_labels' ] = ( '1' == sanitize_text_field( $_POST[ 'show_labels' ] ) ) ? true : false; 32 } 33 33 34 34 if ( isset( $country_code ) ) { … … 80 80 } 81 81 } 82 82 83 83 if ( ! isset( $field[ 'show_labels' ] ) && isset( $_POST[ 'show_labels' ] ) ) { 84 $show_labels = sanitize_text_field( $_POST[ 'show_labels' ] );85 if ( '1' == $show_labels ) {86 $field[ 'show_labels' ] = true;87 } elseif ( '0' == $show_labels ) {88 $field[ 'show_labels' ] = false;89 }84 $show_labels = sanitize_text_field( $_POST[ 'show_labels' ] ); 85 if ( '1' == $show_labels ) { 86 $field[ 'show_labels' ] = true; 87 } elseif ( '0' == $show_labels ) { 88 $field[ 'show_labels' ] = false; 89 } 90 90 } 91 91 -
acf-city-selector/tags/1.14.0/inc/acfcs-functions.php
r2841215 r3133754 18 18 */ 19 19 function acfcs_get_countries( $show_first = true, $field = false, $force = false ) { 20 $countries = array();20 $countries = []; 21 21 $select_country_label = apply_filters( 'acfcs_select_country_label', esc_html__( 'Select a country', 'acf-city-selector' ) ); 22 22 $show_labels = ( isset( $field[ 'show_labels' ] ) ) ? $field[ 'show_labels' ] : true; 23 23 24 24 if ( $show_first ) { 25 25 $countries[ '' ] = '-'; … … 28 28 } 29 29 } 30 31 global $wpdb;32 $table = $wpdb->prefix . 'cities';33 $results = $wpdb->get_results( "SELECT * FROM $table GROUP BY country ORDER BY country ASC" );30 31 global $wpdb; 32 $table = $wpdb->prefix . 'cities'; 33 $results = $wpdb->get_results( "SELECT * FROM $table GROUP BY country ORDER BY country ASC" ); 34 34 35 35 if ( ! empty( $results ) ) { 36 $country_results = array();36 $country_results = []; 37 37 foreach ( $results as $data ) { 38 38 if ( isset( $data->country_code ) && isset( $data->country ) ) { … … 59 59 $select_province_state_label = apply_filters( 'acfcs_select_province_state_label', esc_attr__( 'Select a province/state', 'acf-city-selector' ) ); 60 60 $show_labels = ( isset( $field[ 'show_labels' ] ) ) ? $field[ 'show_labels' ] : true; 61 $states = array();62 61 $states = []; 62 63 63 if ( $show_first ) { 64 64 if ( $show_labels ) { … … 70 70 71 71 if ( false != $country_code ) { 72 $transient = get_transient( 'acfcs_states_' . strtolower( $country_code ) ); 73 if ( false == $transient || is_array( $transient ) && empty( $transient ) ) { 74 $order = ' ORDER BY state_name ASC'; 75 if ( 'FR' == $country_code ) { 76 $order = " ORDER BY LENGTH(state_name), state_name"; 77 } 78 79 global $wpdb; 80 $table = $wpdb->prefix . 'cities'; 81 $sql = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s GROUP BY state_code" . $order, strtoupper( $country_code ) ); 82 $results = $wpdb->get_results( $sql ); 83 84 $state_results = array(); 85 foreach ( $results as $data ) { 86 $state_results[ strtoupper( $country_code ) . '-' . $data->state_code ] = esc_attr__( $data->state_name, 'acf-city-selector' ); 87 } 88 89 set_transient( 'acfcs_states_' . strtolower( $country_code ), $state_results, DAY_IN_SECONDS ); 90 91 $states = array_merge( $states, $state_results ); 92 93 } else { 94 $states = array_merge( $states, $transient ); 95 } 72 $order = ' ORDER BY state_name ASC'; 73 if ( 'FR' == $country_code ) { 74 $order = " ORDER BY LENGTH(state_name), state_name"; 75 } 76 77 global $wpdb; 78 $table = $wpdb->prefix . 'cities'; 79 $sql = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s GROUP BY state_code" . $order, strtoupper( $country_code ) ); 80 $state_results = []; 81 $results = $wpdb->get_results( $sql ); 82 83 foreach ( $results as $data ) { 84 $state_results[ strtoupper( $country_code ) . '-' . $data->state_code ] = esc_attr__( $data->state_name, 'acf-city-selector' ); 85 } 86 87 $states = array_merge( $states, $state_results ); 96 88 } 97 89 … … 110 102 */ 111 103 function acfcs_get_cities( $country_code = false, $state_code = false, $field = false ) { 112 $cities = array(); 113 $cities_transient = false; 104 $cities = []; 114 105 $select_city_label = apply_filters( 'acfcs_select_city_label', esc_attr__( 'Select a city', 'acf-city-selector' ) ); 115 $set_transient = false;116 106 $show_labels = ( isset( $field[ 'show_labels' ] ) ) ? $field[ 'show_labels' ] : true; 117 107 … … 122 112 } 123 113 124 if ( $country_code && ! $state_code ) { 125 $cities_transient = get_transient( 'acfcs_cities_' . strtolower( $country_code ) ); 126 } elseif ( $country_code && $state_code ) { 127 $cities_transient = get_transient( 'acfcs_cities_' . strtolower( $country_code ) . '-' . strtolower( $state_code ) ); 128 } 129 130 if ( false == $cities_transient || empty( $cities_transient ) ) { 131 $set_transient = true; 132 } else { 133 foreach ( $cities_transient as $data ) { 134 $city_array[ esc_attr__( $data, 'acf-city-selector' ) ] = esc_attr__( $data, 'acf-city-selector' ); 114 if ( $country_code ) { 115 global $wpdb; 116 $table = $wpdb->prefix . 'cities'; 117 $query = "SELECT * FROM $table"; 118 119 if ( $state_code ) { 120 if ( 3 < strlen( $state_code ) ) { 121 $state_code = substr( $state_code, 3 ); 122 } 123 $query = $wpdb->prepare( $query . " WHERE country_code = %s AND state_code = %s ORDER BY state_name, city_name ASC", $country_code, $state_code ); 124 } elseif ( $country_code ) { 125 $query = $wpdb->prepare( $query . " WHERE country_code = %s", $country_code ); 126 } 127 128 $city_results = []; 129 $results = $wpdb->get_results( $query ); 130 131 foreach ( $results as $data ) { 132 $city_results[] = [ 133 'city_name' => $data->city_name, 134 ]; 135 } 136 137 if ( ! empty( $city_results ) ) { 138 uasort( $city_results, 'acfcs_sort_array_with_quotes' ); 139 } 140 foreach ( $city_results as $data ) { 141 $city_array[ esc_attr__( $data[ 'city_name' ], 'acf-city-selector' ) ] = esc_attr__( $data[ 'city_name' ], 'acf-city-selector' ); 135 142 } 136 143 if ( isset( $city_array ) ) { … … 139 146 } 140 147 141 if ( $set_transient ) {142 if ( false !== $country_code ) {143 global $wpdb;144 $table = $wpdb->prefix . 'cities';145 $query = "SELECT * FROM $table";146 if ( $country_code && $state_code ) {147 if ( 3 < strlen( $state_code ) ) {148 $state_code = substr( $state_code, 3 );149 }150 $query = $wpdb->prepare( $query . " WHERE country_code = %s AND state_code = %s ORDER BY state_name, city_name ASC", $country_code, $state_code );151 } elseif ( $country_code ) {152 $query = $wpdb->prepare( $query . " WHERE country_code = %s", $country_code );153 }154 $city_results = array();155 $results = $wpdb->get_results( $query );156 foreach ( $results as $data ) {157 $city_results[] = [158 'city_name' => $data->city_name,159 ];160 }161 162 if ( ! empty( $city_results ) ) {163 uasort( $city_results, 'acfcs_sort_array_with_quotes' );164 }165 foreach ( $city_results as $data ) {166 $city_array[ esc_attr__( $data[ 'city_name' ], 'acf-city-selector' ) ] = esc_attr__( $data[ 'city_name' ], 'acf-city-selector' );167 }168 if ( isset( $city_array ) ) {169 $cities = array_merge( $cities, $city_array );170 }171 if ( ! $state_code ) {172 set_transient( 'acfcs_cities_' . strtolower( $country_code ), $city_array, DAY_IN_SECONDS );173 } elseif ( $state_code ) {174 set_transient( 'acfcs_cities_' . strtolower( $country_code ) . '-' . strtolower( $state_code ), $city_array, DAY_IN_SECONDS );175 }176 }177 }178 179 148 return $cities; 180 149 } … … 190 159 function acfcs_get_country_name( $country_code = false ) { 191 160 if ( false != $country_code ) { 192 global $wpdb;193 $table = $wpdb->prefix . 'cities';194 $query = $wpdb->prepare( "SELECT country FROM $table WHERE country_code = %s", $country_code );195 $country = $wpdb->get_row( $query );161 global $wpdb; 162 $table = $wpdb->prefix . 'cities'; 163 $query = $wpdb->prepare( "SELECT country FROM $table WHERE country_code = %s", $country_code ); 164 $country = $wpdb->get_row( $query ); 196 165 197 166 if ( isset( $country->country ) ) { … … 207 176 return $country_code; 208 177 } 209 210 211 /**178 179 180 /** 212 181 * Checks if there are any cities in the database (for page availability) 213 *214 * @param $country_code215 *216 * @return bool217 */182 * 183 * @param $country_code 184 * 185 * @return bool 186 */ 218 187 function acfcs_has_cities( $country_code = false ) { 219 188 global $wpdb; 220 $table = $wpdb->prefix . 'cities'; 221 $query = "SELECT * FROM $table LIMIT 1"; 222 if ( $country_code ) { 223 $query = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s LIMIT 1", $country_code ); 224 } 189 $table = $wpdb->prefix . 'cities'; 190 $query = "SELECT * FROM $table LIMIT 1"; 191 192 if ( $country_code ) { 193 $query = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s LIMIT 1", $country_code ); 194 } 225 195 226 196 $results = $wpdb->get_results( $query ); … … 240 210 */ 241 211 function acfcs_check_if_files() { 242 $actual_files = [];243 $target_dir = acfcs_upload_folder();244 245 if ( is_dir( $target_dir ) ) {212 $actual_files = []; 213 $target_dir = acfcs_upload_folder(); 214 215 if ( is_dir( $target_dir ) ) { 246 216 $file_index = scandir( $target_dir ); 247 $ excluded_files = [217 $default_excluded_files = [ 248 218 '.', 249 219 '..', … … 251 221 'debug.json', 252 222 ]; 253 223 $excluded_files = apply_filters( 'acfcs_exclude_files', $default_excluded_files ); 224 254 225 if ( is_array( $file_index ) ) { 255 226 foreach ( $file_index as $file ) { … … 281 252 function acfcs_csv_to_array( $file_name, $upload_folder = '', $delimiter = ';', $verify = false, $max_lines = false ) { 282 253 $upload_folder = ( ! empty( $upload_folder ) ) ? $upload_folder : acfcs_upload_folder( '/' ); 283 $csv_array = array();254 $csv_array = []; 284 255 $empty_array = false; 285 256 $errors = ACF_City_Selector::acfcs_errors(); 286 $new_array = array();287 257 $new_array = []; 258 288 259 if ( ( file_exists( $upload_folder . $file_name ) && $handle = fopen( $upload_folder . $file_name, "r" ) ) !== false ) { 289 260 $column_benchmark = 5; … … 313 284 if ( $errors->has_errors() ) { 314 285 $empty_array = true; 315 $new_array = array();286 $new_array = []; 316 287 } else { 317 288 // create a new array for each row 318 $new_line = array();289 $new_line = []; 319 290 foreach ( $csv_line as $item ) { 320 291 $new_line[] = $item; … … 418 389 $url = ACFCS_WEBSITE_URL . '/wp-json/countries/v1/' . $endpoint; 419 390 $request = new WP_Http; 420 $result = $request->request( $url, array( 'method' => 'GET' ));391 $result = $request->request( $url, [ 'method' => 'GET' ] ); 421 392 if ( 200 == $result[ 'response' ][ 'code' ] ) { 422 393 $response = json_decode( $result[ 'body' ] ); … … 425 396 } 426 397 427 return array();398 return []; 428 399 } 429 400 … … 436 407 function acfcs_get_countries_info() { 437 408 global $wpdb; 438 $table = $wpdb->prefix . 'cities';439 $results = $wpdb->get_results( "SELECT country_code FROM $table GROUP BY country_code ORDER BY country_code ASC" );440 441 $acfcs_info = array();409 $acfcs_info = []; 410 $table = $wpdb->prefix . 'cities'; 411 $results = $wpdb->get_results( "SELECT country_code FROM $table GROUP BY country_code ORDER BY country_code ASC" ); 412 442 413 foreach ( $results as $data ) { 443 $country_code = $data->country_code;444 $query = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s ORDER BY country_code ASC", $country_code );445 $results = $wpdb->get_results( $query );414 $country_code = $data->country_code; 415 $query = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s ORDER BY country_code ASC", $country_code ); 416 $results = $wpdb->get_results( $query ); 446 417 447 418 $acfcs_info[ $country_code ] = [ … … 478 449 function acfcs_custom_sort_with_quotes( $city ) { 479 450 // strip quote marks 480 if ( strpos( $city, "'s" ) !== false ) {481 $city = trim( $city, '\'s ' );482 $city = preg_replace( '/^\s*\'s \s+/i', '', $city );483 } elseif ( strpos( $city, "'t" ) !== false ) {484 $city = trim( $city, '\'t ' );485 $city = preg_replace( '/^\s*\'t \s+/i', '', $city );486 }451 if ( strpos( $city, "'s" ) !== false ) { 452 $city = trim( $city, '\'s ' ); 453 $city = preg_replace( '/^\s*\'s \s+/i', '', $city ); 454 } elseif ( strpos( $city, "'t" ) !== false ) { 455 $city = trim( $city, '\'t ' ); 456 $city = preg_replace( '/^\s*\'t \s+/i', '', $city ); 457 } 487 458 488 459 return $city; … … 578 549 return $dropdown; 579 550 } 580 581 582 function acfcs_render_hidden_field( $name, $value ) {583 if ( $name && $value ) {584 return sprintf( '<input type="hidden" name="%s" value="%s" />', $name, $value );585 }586 587 return false;551 552 553 function acfcs_render_hidden_field( $name, $value ) { 554 if ( $name && $value ) { 555 return sprintf( '<input type="hidden" name="%s" value="%s" />', $name, $value ); 556 } 557 558 return false; 588 559 } 589 560 … … 626 597 foreach ( $csv_array[ 'data' ] as $line ) { 627 598 $line_number++; 628 629 $city_row = array(599 600 $city_row = [ 630 601 'city_name' => $line[ 0 ], 631 602 'state_code' => $line[ 1 ], … … 633 604 'country_code' => $line[ 3 ], 634 605 'country' => $line[ 4 ], 635 );636 606 ]; 607 637 608 global $wpdb; 638 609 $wpdb->insert( $wpdb->prefix . 'cities', $city_row ); … … 661 632 foreach ( $verified_data as $line ) { 662 633 $line_number++; 663 664 $city_row = array(634 635 $city_row = [ 665 636 'city_name' => $line[ 0 ], 666 637 'state_code' => $line[ 1 ], … … 668 639 'country_code' => $line[ 3 ], 669 640 'country' => $line[ 4 ], 670 );671 641 ]; 642 672 643 $wpdb->insert( $wpdb->prefix . 'cities', $city_row ); 673 644 } … … 709 680 function acfcs_delete_country( $countries ) { 710 681 $country_names_and = false; 711 $sanitized_country_codes = array(); 682 $sanitized_country_codes = []; 683 712 684 foreach( $countries as $country_code ) { 713 $sanitized_country_code = sanitize_text_field( $country_code);685 $sanitized_country_code = sanitize_text_field( strtoupper( $country_code ) ); 714 686 $sanitized_country_codes[] = $sanitized_country_code; 715 687 $country_names[] = acfcs_get_country_name( $sanitized_country_code ); 716 688 } 689 717 690 if ( ! empty( $country_names ) ) { 718 691 $country_names_quotes = "'" . implode( "', '", $country_names ) . "'"; … … 725 698 726 699 if ( ! empty( $sanitized_country_codes ) ) { 700 if ( 1 === count( $sanitized_country_codes ) ) { 701 $country_string = strtoupper( $sanitized_country_codes[ 0 ] ); 702 } else { 703 $country_string = strtoupper( "'" . implode( "', '", $sanitized_country_codes ) . "'" ); 704 } 705 727 706 global $wpdb; 728 $table = $wpdb->prefix . 'cities'; 729 $country_string = strtoupper( "'" . implode( "', '", $sanitized_country_codes ) . "'" ); 730 $query = $wpdb->prepare( "DELETE FROM $table WHERE `country_code` IN (%s)", $country_string ); 731 $result = $wpdb->query( $query ); 707 $table = $wpdb->prefix . 'cities'; 708 $query = $wpdb->prepare( "DELETE FROM $table WHERE country_code IN (%s)", $country_string ); 709 $result = $wpdb->query( $query ); 732 710 733 711 if ( $result > 0 ) { 734 ACF_City_Selector::acfcs_errors()->add( 'success_country_remove', sprintf( esc_html__( 'You have successfully removed all entries for %s.', 'acf-city-selector' ), $country_names_and ) ); 735 foreach( $countries as $country_code ) { 736 do_action( 'acfcs_delete_transients', $country_code ); 737 } 712 ACF_City_Selector::acfcs_errors()->add( 'success_country_remove', sprintf( esc_html__( 'You have successfully removed all entries for %s.', 'acf-city-selector' ), $country_names_and ) ); 738 713 } 739 714 } … … 766 741 function acfcs_render_preview_results( $csv_data = [] ) { 767 742 $table = ''; 768 if ( ! empty( $csv_data ) ) {743 if ( ! empty( $csv_data ) ) { 769 744 $table_columns = [ 770 745 esc_html__( 'City', 'acf-city-selector' ), … … 793 768 $table = sprintf( '<table class="acfcs__table acfcs__table--preview-result scrollable">%s%s</table>', $table_headers, $table_body ); 794 769 } 795 796 return $table;770 771 return $table; 797 772 } 798 773 … … 807 782 function acfcs_get_states_optgroup() { 808 783 $results = acfcs_get_countries( false ); 809 $states = [];784 $states = []; 810 785 811 786 // if there is at least 1 country … … 820 795 // get states for these countries 821 796 if ( ! empty( $countries ) ) { 822 global $wpdb;823 $table= $wpdb->prefix . 'cities';824 825 foreach( $countries as $country ) {826 $states[] = array(797 global $wpdb; 798 $table = $wpdb->prefix . 'cities'; 799 800 foreach( $countries as $country ) { 801 $states[] = [ 827 802 'state' => 'open_optgroup', 828 803 'name' => esc_attr__( acfcs_get_country_name( $country[ 'code' ] ), 'acf-city-selector' ), 829 );830 804 ]; 805 831 806 $order = 'ORDER BY state_name ASC'; 832 807 if ( 'FR' == $country[ 'code' ] ) { … … 840 815 if ( count( $results ) > 0 ) { 841 816 foreach ( $results as $data ) { 842 $states[] = array(817 $states[] = [ 843 818 'state' => strtolower( $data->country_code ) . '-' . strtolower( $data->state_code ), 844 819 'name' => esc_attr__( $data->state_name, 'acf-city-selector' ), 845 );820 ]; 846 821 } 847 822 } 848 849 $states[] = array(823 824 $states[] = [ 850 825 'state' => 'close_optgroup', 851 826 'name' => '', 852 );853 } 854 } 855 } 856 857 return $states;827 ]; 828 } 829 } 830 } 831 832 return $states; 858 833 } 859 834 … … 868 843 function acfcs_get_searched_cities() { 869 844 global $wpdb; 845 $orderby = false; 846 $table = $wpdb->prefix . 'cities'; 870 847 $search_criteria_state = ( isset( $_POST[ 'acfcs_state' ] ) ) ? sanitize_text_field( $_POST[ 'acfcs_state' ] ) : false; 871 848 $search_criteria_country = ( isset( $_POST[ 'acfcs_country' ] ) ) ? sanitize_text_field( $_POST[ 'acfcs_country' ] ) : false; 872 $search_limit = false;873 849 $searched_orderby = ( ! empty( $_POST[ 'acfcs_orderby' ] ) ) ? sanitize_text_field( $_POST[ 'acfcs_orderby' ] ) : false; 874 850 $searched_term = ( ! empty( $_POST[ 'acfcs_search' ] ) ) ? sanitize_text_field( $_POST[ 'acfcs_search' ] ) : false; 875 851 $selected_limit = ( ! empty( $_POST[ 'acfcs_limit' ] ) ) ? (int) $_POST[ 'acfcs_limit' ] : 100; 876 $ where = array();877 852 $select = "SELECT * FROM $table WHERE"; 853 878 854 if ( false != $search_criteria_state ) { 879 $ where[] = "state_code = '" . substr( $search_criteria_state, 3, 3) . "' AND country_code = '" . substr( $search_criteria_state, 0, 2) . "'";855 $select .= " state_code = '" . strtoupper( substr( $search_criteria_state, 3, 3 ) ) . "' AND country_code = '" . strtoupper( substr( $search_criteria_state, 0, 2 ) ) . "'"; 880 856 } elseif ( false != $search_criteria_country ) { 881 $where[] = "country_code = '" . $search_criteria_country . "'"; 882 } 857 $select .= sprintf( " country_code = '%s'", $search_criteria_country ); 858 } 859 883 860 if ( false != $searched_term ) { 884 $search [] = 'city_name LIKE "%' . $searched_term . '%"';861 $search = ' AND city_name LIKE "%' . $searched_term . '%"'; 885 862 886 863 if ( $search_criteria_country || $search_criteria_state ) { 887 $where[] = '(' . implode( ' OR ', $search ) . ')'; 888 } else { 889 $where[] = implode( ' OR ', $search ); 890 } 891 892 } 864 $select .= $search; 865 } 866 } 867 868 if ( 'state' == $searched_orderby ) { 869 $select .= ' ORDER BY state_name ASC, city_name ASC'; 870 } else { 871 $select .= ' ORDER BY city_name ASC, state_name ASC'; 872 } 873 893 874 if ( 0 != $selected_limit ) { 894 $search_limit = "LIMIT " . $selected_limit; 895 } 896 897 if ( ! empty( $where ) ) { 898 $where = "WHERE " . implode( ' AND ', $where ); 899 } else { 900 $where = false; 901 } 902 903 if ( 'state' == $searched_orderby ) { 904 $orderby = 'ORDER BY state_name ASC, city_name ASC'; 905 } else { 906 $orderby = 'ORDER BY city_name ASC, state_name ASC'; 907 } 908 909 $table = $wpdb->prefix . 'cities'; 910 $query = $wpdb->prepare( "SELECT * FROM $table %s %s %s", $where, $orderby, $search_limit ); 911 $cities = $wpdb->get_results( $query ); 875 $select .= " LIMIT " . $selected_limit; 876 } 877 878 $cities = $wpdb->get_results( $select ); 912 879 913 880 return $cities; … … 923 890 */ 924 891 function acfcs_get_js_translations() { 925 $translations = array(892 $translations = [ 926 893 'no_countries' => esc_attr__( 'No countries', 'acf-city-selector' ), 927 894 'select_city' => esc_attr( apply_filters( 'acfcs_select_city_label', __( 'Select a city', 'acf-city-selector' ) ) ), … … 930 897 'select_state' => esc_attr( apply_filters( 'acfcs_select_province_state_label', __( 'Select a province/state', 'acf-city-selector' ) ) ), 931 898 'select_state_first' => esc_attr( apply_filters( 'acfcs_select_state_first', __( 'No results (yet), first select a state', 'acf-city-selector' ) ) ), 932 );933 899 ]; 900 934 901 return $translations; 935 902 } -
acf-city-selector/tags/1.14.0/inc/form-handling.php
r2841215 r3133754 119 119 } 120 120 } 121 $cities = implode( ', ', $cities );122 $row_ids = implode( ',', $ids );123 $table = $wpdb->prefix . 'cities';124 $query = $wpdb->prepare( "DELETE FROM {$table} WHERE id IN (%s)", $row_ids );125 $amount = $wpdb->query( $query );121 $cities = implode( ', ', $cities ); 122 $row_ids = implode( ',', $ids ); 123 $table = $wpdb->prefix . 'cities'; 124 $query = $wpdb->prepare( "DELETE FROM {$table} WHERE id IN (%s)", $row_ids ); 125 $amount = $wpdb->query( $query ); 126 126 127 127 if ( $amount > 0 ) { … … 133 133 } 134 134 add_action( 'admin_init', 'acfcs_delete_rows' ); 135 136 137 /**138 * Form to handle deleting of all transients139 */140 function acfcs_delete_all_transients() {141 if ( isset( $_POST[ 'acfcs_delete_transients' ] ) ) {142 if ( ! wp_verify_nonce( $_POST[ 'acfcs_delete_transients' ], 'acfcs-delete-transients-nonce' ) ) {143 ACF_City_Selector::acfcs_errors()->add( 'error_no_nonce_match', esc_html__( 'Something went wrong, please try again.', 'acf-city-selector' ) );144 } else {145 do_action( 'acfcs_delete_transients' );146 ACF_City_Selector::acfcs_errors()->add( 'success_transients_delete', esc_html__( 'You have successfully deleted all transients.', 'acf-city-selector' ) );147 }148 }149 }150 add_action( 'admin_init', 'acfcs_delete_all_transients' );151 135 152 136 … … 201 185 if ( isset( $_POST[ 'acfcs_import_be' ] ) && 1 == $_POST[ 'acfcs_import_be' ] ) { 202 186 acfcs_import_data( 'be.csv', ACFCS_PLUGIN_PATH . 'import/' ); 203 do_action( 'acfcs_delete_transients', 'be' );204 187 } 205 188 if ( isset( $_POST[ 'acfcs_import_nl' ] ) && 1 == $_POST[ 'acfcs_import_nl' ] ) { 206 189 acfcs_import_data( 'nl.csv', ACFCS_PLUGIN_PATH . 'import/' ); 207 do_action( 'acfcs_delete_transients', 'nl' );208 190 } 209 191 do_action( 'acfcs_after_success_import' ); -
acf-city-selector/tags/1.14.0/languages/acf-city-selector-de_DE.po
r2841217 r3133754 3 3 "Project-Id-Version: ACF City Selector\n" 4 4 "POT-Creation-Date: 2022-12-29 19:50+0100\n" 5 "PO-Revision-Date: 202 2-12-29 19:50+0100\n"5 "PO-Revision-Date: 2024-08-08 23:57+0200\n" 6 6 "Last-Translator: Beee\n" 7 7 "Language-Team: \n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 2.4.3\n" 12 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 "X-Generator: Poedit 3.4.4\n" 13 14 "X-Poedit-Basepath: ..\n" 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n"15 15 "X-Poedit-KeywordsList: __;_e;_n;_n:1,2;_n_noop;_nx_noop;esc_html__;" 16 16 "esc_html_e;esc_attr;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n" … … 25 25 "countries to get the correct city names." 26 26 msgstr "" 27 "Mehrere %s hatten defekte ASCII-Zeichen. Du musst diese Länder neu " 28 "importieren um die korrekten Städtenamen zu erhalten." 27 29 28 30 #: ACF_City_Selector.php:169 29 #, fuzzy, php-format 30 #| msgid "# cities" 31 #, php-format 31 32 msgid "cities in %s" 32 msgstr " # Städte"33 msgstr "Städte in %s" 33 34 34 35 #: ACF_City_Selector.php:169 35 #, fuzzy36 #| msgid "Import all cities in Holland/The Netherlands"37 36 msgid "cities in Belgium and Netherlands" 38 msgstr " Importiere alleStädte in Holland/Niederlande"37 msgstr "Städte in Holland/Niederlande" 39 38 40 39 #: ACF_City_Selector.php:261 ACF_City_Selector.php:278 … … 75 74 76 75 #: ACF_City_Selector.php:334 77 #, fuzzy, php-format 78 #| msgid "" 79 #| "<b>Warning</b>: The \"%s\" plugin will probably not work properly " 80 #| "(anymore) with %s v4.x. Please upgrade to PRO." 76 #, php-format 81 77 msgid "" 82 78 "%s: The \"%s\" plugin will probably not work properly (anymore) with %s v4." 83 79 "x. Please upgrade to PRO." 84 80 msgstr "" 85 " <b>Warnung</b>: Das Plugin \"%s\" funktioniert warscheinlich leider nicht"86 " (mehr)ordnungsgemäß mit %s v4.x. Bitte aktualisiere auf die PRO Version."81 "%s: Das Plugin \"%s\" funktioniert wahrscheinlich leider nicht (mehr) " 82 "ordnungsgemäß mit %s v4.x. Bitte aktualisiere auf die PRO Version." 87 83 88 84 #: ACF_City_Selector.php:335 … … 174 170 #: admin/acf-city-selector-v5.php:84 175 171 msgid "Store location as single meta values" 176 msgstr " "172 msgstr "Standort als einzelnen Meta Wert speichern" 177 173 178 174 #: admin/acf-city-selector-v5.php:85 179 175 msgid "Store meta" 180 msgstr " "176 msgstr "Meta speichern" 181 177 182 178 #: admin/acf-city-selector-v5.php:352 … … 292 288 #: admin/acfcs-countries.php:149 293 289 msgid "request" 294 msgstr " "290 msgstr "anfragen" 295 291 296 292 #: admin/acfcs-countries.php:151 … … 310 306 "Max lines has no effect when verifying. The entire file will be checked." 311 307 msgstr "" 308 "Max lines hat keinen Effekt bei der Verifizierung. Die gesamte Datei wird " 309 "geprüft werden." 312 310 313 311 #: admin/acfcs-dashboard.php:43 … … 475 473 #: admin/acfcs-info.php:238 476 474 msgid "left-click to open, right-click to save" 477 msgstr " "475 msgstr "Linksklick zum öffnen, Rechtsklick zum speichern" 478 476 479 477 #: admin/acfcs-preview-form.php:6 … … 564 562 msgid "You haven't imported any cities yet. Import any files from your %s." 565 563 msgstr "" 564 "Du hast noch keine Städte importiert. Importiere Dateien von deiner %s." 566 565 567 566 #: admin/acfcs-search.php:68 admin/acfcs-search.php:71 … … 736 735 #, php-format 737 736 msgid "%s for the plugin's official website." 738 msgstr " "737 msgstr "%s für die offizielle Plugin Webseite." 739 738 740 739 #: admin/admin-right.php:13 741 740 msgid "Click here" 742 msgstr " "741 msgstr "Klicke hier" 743 742 744 743 #: admin/admin-right.php:17 … … 749 748 #, php-format 750 749 msgid "If you need support for this plugin, please turn to %s." 751 msgstr " "750 msgstr "Wende dich an %s wenn du Hilfe für diesem Plugin benötigst." 752 751 753 752 #: admin/admin-right.php:23 754 753 msgid "Requests" 755 msgstr " "754 msgstr "Anfragen" 756 755 757 756 #: admin/admin-right.php:25 758 #, fuzzy759 #| msgid ""760 #| "If you need support for this plugin or if you have some good suggestions "761 #| "for improvements and/or new features, please turn to %s."762 757 msgid "" 763 758 "If you have some good suggestions for improvements and/or new features, " … … 781 776 #: admin/raw-input-form.php:8 782 777 msgid "Raw CSV import" 783 msgstr " "778 msgstr "Roher CSV Import" 784 779 785 780 #: admin/raw-input-form.php:12 … … 1010 1005 "If you need more countries, you can get them on the official website: %s." 1011 1006 msgstr "" 1007 "Wenn du weitere Länder benötigst, kannst du diese auf der offiziellen " 1008 "Webseite herunterladen: %s." 1012 1009 1013 1010 #: inc/acfcs-help-tabs.php:101 … … 1017 1014 #: inc/acfcs-i18n.php:16 1018 1015 msgid "Andorra" 1019 msgstr " "1016 msgstr "Andorra" 1020 1017 1021 1018 #: inc/acfcs-i18n.php:17 1022 1019 msgid "Aruba" 1023 msgstr " "1020 msgstr "Aruba" 1024 1021 1025 1022 #: inc/acfcs-i18n.php:18 … … 1041 1038 #: inc/acfcs-i18n.php:22 1042 1039 msgid "China" 1043 msgstr " "1040 msgstr "China" 1044 1041 1045 1042 #: inc/acfcs-i18n.php:23 1046 1043 msgid "Curaçao" 1047 msgstr " "1044 msgstr "Curaçao" 1048 1045 1049 1046 #: inc/acfcs-i18n.php:24 … … 1061 1058 #: inc/acfcs-i18n.php:27 1062 1059 msgid "Grenada" 1063 msgstr " "1060 msgstr "Genada" 1064 1061 1065 1062 #: inc/acfcs-i18n.php:28 … … 1073 1070 #: inc/acfcs-i18n.php:30 1074 1071 msgid "Mexico" 1075 msgstr " "1072 msgstr "Mexiko" 1076 1073 1077 1074 #: inc/acfcs-i18n.php:31 … … 1085 1082 #: inc/acfcs-i18n.php:33 1086 1083 msgid "Portugal" 1087 msgstr " "1084 msgstr "Portugal" 1088 1085 1089 1086 #: inc/acfcs-i18n.php:34 … … 1105 1102 #: inc/acfcs-i18n.php:38 1106 1103 msgid "Uruguay" 1107 msgstr " "1104 msgstr "Uruguay" 1108 1105 1109 1106 #: inc/acfcs-i18n.php:39 … … 1233 1230 #, php-format 1234 1231 #~ msgid "" 1235 #~ "<strong>!!!</strong> The default delimiters has been changed from "1236 #~ " ','(comma) to ';' (semi-colon). Read more about it <a href=\"%s\">%s</a>."1232 #~ "<strong>!!!</strong> The default delimiters has been changed from ',' " 1233 #~ "(comma) to ';' (semi-colon). Read more about it <a href=\"%s\">%s</a>." 1237 1234 #~ msgstr "" 1238 1235 #~ "<strong>!!!</strong> Die Standardtrennzeichen wurden von ',' (Komma) in " … … 1335 1332 #~ msgstr "" 1336 1333 #~ "Vielen Dank für die Installation des 'City Selector' Plugins. Ich hoffe " 1337 #~ "es gefällt dir. Bitte denke über <a href=\"%s\" rel=\"noopener\" target="1338 #~ " \"_blank\">eine Spende nach</a> wenn du das Plugin gefällt, damit ich das"1339 #~ " Plugin noch besser machen kann."1334 #~ "es gefällt dir. Bitte denke über <a href=\"%s\" rel=\"noopener\" " 1335 #~ "target=\"_blank\">eine Spende nach</a> wenn du das Plugin gefällt, damit " 1336 #~ "ich das Plugin noch besser machen kann." 1340 1337 1341 1338 #~ msgid "Admin email" -
acf-city-selector/tags/1.14.0/languages/acf-city-selector-nl_NL.po
r2841217 r3133754 2 2 msgstr "" 3 3 "Project-Id-Version: ACF City Selector 1.0\n" 4 "POT-Creation-Date: 202 2-12-29 19:49+0100\n"5 "PO-Revision-Date: 202 2-12-29 19:50+0100\n"4 "POT-Creation-Date: 2024-07-29 20:47+0200\n" 5 "PO-Revision-Date: 2024-07-29 20:47+0200\n" 6 6 "Last-Translator: Beee\n" 7 7 "Language-Team: \n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 2.4.3\n" 12 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 "X-Generator: Poedit 3.4.4\n" 13 14 "X-Poedit-Basepath: ..\n" 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n"15 15 "X-Poedit-KeywordsList: __;_e;_x;_ex;_n;_nx;_n:1,2;_n_noop;_nx_noop;" 16 16 "esc_html__;esc_html_e;esc_html_x;esc_attr__;esc_attr_e;esc_attr_x\n" … … 18 18 "X-Poedit-SearchPathExcluded-0: languages\n" 19 19 20 #: ACF_City_Selector.php:16 920 #: ACF_City_Selector.php:167 21 21 #, php-format 22 22 msgid "" … … 27 27 "importeren om de correcte namen te krijgen." 28 28 29 #: ACF_City_Selector.php:16 929 #: ACF_City_Selector.php:167 30 30 #, php-format 31 31 msgid "cities in %s" 32 32 msgstr "steden in %s" 33 33 34 #: ACF_City_Selector.php:16 934 #: ACF_City_Selector.php:167 35 35 msgid "cities in Belgium and Netherlands" 36 36 msgstr "steden in België en Nederland" 37 37 38 #: ACF_City_Selector.php:2 61 ACF_City_Selector.php:27839 #: ACF_City_Selector.php:38 638 #: ACF_City_Selector.php:259 ACF_City_Selector.php:276 39 #: ACF_City_Selector.php:384 40 40 msgid "Settings" 41 41 msgstr "Instellingen" 42 42 43 #: ACF_City_Selector.php:27 743 #: ACF_City_Selector.php:275 44 44 msgid "Dashboard" 45 45 msgstr "Dashboard" 46 46 47 #: ACF_City_Selector.php:2 81 ACF_City_Selector.php:38847 #: ACF_City_Selector.php:279 ACF_City_Selector.php:386 48 48 #: admin/acfcs-search.php:148 49 49 msgid "Search" 50 50 msgstr "Zoeken" 51 51 52 #: ACF_City_Selector.php:28 452 #: ACF_City_Selector.php:282 53 53 msgid "Preview" 54 54 msgstr "Preview" 55 55 56 #: ACF_City_Selector.php:28 7 ACF_City_Selector.php:389admin/acfcs-info.php:2656 #: ACF_City_Selector.php:285 ACF_City_Selector.php:387 admin/acfcs-info.php:26 57 57 msgid "Info" 58 58 msgstr "Informatie" 59 59 60 #: ACF_City_Selector.php:2 9060 #: ACF_City_Selector.php:288 61 61 msgid "Get more countries" 62 62 msgstr "Meer landen" 63 63 64 #: ACF_City_Selector.php:31 264 #: ACF_City_Selector.php:310 65 65 #, php-format 66 66 msgid "" … … 71 71 "werkt \"%s\" niet. Activeer hem <a href=\"%s\">hier</a>." 72 72 73 #: ACF_City_Selector.php:33 473 #: ACF_City_Selector.php:332 74 74 #, php-format 75 75 msgid "" … … 80 80 "upgrade naar PRO." 81 81 82 #: ACF_City_Selector.php:33 582 #: ACF_City_Selector.php:333 83 83 msgid "Warning" 84 84 msgstr "Waarschuwing" 85 85 86 #: ACF_City_Selector.php:38 5admin/acfcs-preview.php:3686 #: ACF_City_Selector.php:383 admin/acfcs-preview.php:36 87 87 msgid "Preview data" 88 88 msgstr "Data bekijken" 89 89 90 #: ACF_City_Selector.php:38 7admin/acfcs-countries.php:5090 #: ACF_City_Selector.php:385 admin/acfcs-countries.php:50 91 91 msgid "Get countries" 92 92 msgstr "Meer landen" 93 93 94 #: admin/acf-city-selector-v4.php: 29admin/acf-city-selector-v5.php:3494 #: admin/acf-city-selector-v4.php:31 admin/acf-city-selector-v5.php:34 95 95 msgid "Choice" 96 96 msgstr "Keuze" 97 97 98 #: admin/acf-city-selector-v4.php:6 4admin/acf-city-selector-v5.php:10298 #: admin/acf-city-selector-v4.php:68 admin/acf-city-selector-v5.php:102 99 99 msgid "All fields [default]" 100 100 msgstr "Alle velden [standaard]" 101 101 102 #: admin/acf-city-selector-v4.php:6 5admin/acf-city-selector-v5.php:103102 #: admin/acf-city-selector-v4.php:69 admin/acf-city-selector-v5.php:103 103 103 msgid "Country only" 104 104 msgstr "Alleen land" 105 105 106 #: admin/acf-city-selector-v4.php: 66admin/acf-city-selector-v5.php:104106 #: admin/acf-city-selector-v4.php:70 admin/acf-city-selector-v5.php:104 107 107 msgid "Country + State/province" 108 108 msgstr "Land + Staat/Provincies" 109 109 110 #: admin/acf-city-selector-v4.php: 67admin/acf-city-selector-v5.php:105110 #: admin/acf-city-selector-v4.php:71 admin/acf-city-selector-v5.php:105 111 111 msgid "Country + City" 112 112 msgstr "Land + Stad" 113 113 114 #: admin/acf-city-selector-v4.php: 68admin/acf-city-selector-v5.php:106114 #: admin/acf-city-selector-v4.php:72 admin/acf-city-selector-v5.php:106 115 115 msgid "State/province + City" 116 116 msgstr "Staat/Provincie + Stad" 117 117 118 #: admin/acf-city-selector-v4.php:7 2admin/acf-city-selector-v5.php:59118 #: admin/acf-city-selector-v4.php:76 admin/acf-city-selector-v5.php:59 119 119 #: admin/acfcs-info.php:170 120 120 msgid "Yes" 121 121 msgstr "Ja" 122 122 123 #: admin/acf-city-selector-v4.php:7 3admin/acf-city-selector-v5.php:60123 #: admin/acf-city-selector-v4.php:77 admin/acf-city-selector-v5.php:60 124 124 #: admin/acfcs-info.php:170 125 125 msgid "No" 126 126 msgstr "Nee" 127 127 128 #: admin/acf-city-selector-v4.php:8 0admin/acf-city-selector-v5.php:65128 #: admin/acf-city-selector-v4.php:84 admin/acf-city-selector-v5.php:65 129 129 msgid "Show labels" 130 130 msgstr "Toon labels" 131 131 132 #: admin/acf-city-selector-v4.php:8 1admin/acf-city-selector-v5.php:64132 #: admin/acf-city-selector-v4.php:85 admin/acf-city-selector-v5.php:64 133 133 msgid "Show field labels above the dropdown menus" 134 134 msgstr "Labels tonen boven de dropdown menu’s" 135 135 136 #: admin/acf-city-selector-v4.php: 97admin/acf-city-selector-v5.php:96136 #: admin/acf-city-selector-v4.php:101 admin/acf-city-selector-v5.php:96 137 137 msgid "Default country" 138 138 msgstr "Default land" 139 139 140 #: admin/acf-city-selector-v4.php: 98admin/acf-city-selector-v5.php:95140 #: admin/acf-city-selector-v4.php:102 admin/acf-city-selector-v5.php:95 141 141 msgid "Select a default country for a new field" 142 142 msgstr "Selecteer een standaard land voor een nieuw veld" 143 143 144 #: admin/acf-city-selector-v4.php:11 4admin/acf-city-selector-v5.php:111144 #: admin/acf-city-selector-v4.php:118 admin/acf-city-selector-v5.php:111 145 145 msgid "Fields to use" 146 146 msgstr "Velden om te gebruiken" 147 147 148 #: admin/acf-city-selector-v4.php:11 5admin/acf-city-selector-v5.php:110148 #: admin/acf-city-selector-v4.php:119 admin/acf-city-selector-v5.php:110 149 149 msgid "Select which fields are used" 150 150 msgstr "Kies welke velden gebruikt worden" 151 151 152 #: admin/acf-city-selector-v4.php:1 78admin/acf-city-selector-v5.php:160152 #: admin/acf-city-selector-v4.php:184 admin/acf-city-selector-v5.php:160 153 153 msgid "" 154 154 "You haven't set a default country, so NO provinces/states and cities will be " … … 233 233 234 234 #: admin/acfcs-countries.php:66 admin/acfcs-search.php:172 235 #: inc/acfcs-functions.php:7 74inc/acfcs-help-tabs.php:46235 #: inc/acfcs-functions.php:749 inc/acfcs-help-tabs.php:46 236 236 msgid "Country" 237 237 msgstr "Land" … … 558 558 559 559 #: admin/acfcs-search.php:68 admin/acfcs-search.php:71 560 #: inc/acfcs-functions.php:21 inc/acfcs-functions.php: 506561 #: inc/acfcs-functions.php: 928560 #: inc/acfcs-functions.php:21 inc/acfcs-functions.php:477 561 #: inc/acfcs-functions.php:895 562 562 msgid "Select a country" 563 563 msgstr "Selecteer een land" … … 568 568 569 569 #: admin/acfcs-search.php:89 admin/acfcs-search.php:93 570 #: inc/acfcs-functions.php:59 inc/acfcs-functions.php: 513571 #: inc/acfcs-functions.php: 930570 #: inc/acfcs-functions.php:59 inc/acfcs-functions.php:484 571 #: inc/acfcs-functions.php:897 572 572 msgid "Select a province/state" 573 573 msgstr "Selecteer een provincie/staat" … … 590 590 591 591 #: admin/acfcs-search.php:136 admin/acfcs-search.php:170 592 #: inc/acfcs-functions.php:7 70inc/acfcs-help-tabs.php:26592 #: inc/acfcs-functions.php:745 inc/acfcs-help-tabs.php:26 593 593 msgid "City" 594 594 msgstr "Stad" 595 595 596 596 #: admin/acfcs-search.php:137 admin/acfcs-search.php:171 597 #: inc/acfcs-functions.php:7 72inc/acfcs-help-tabs.php:36597 #: inc/acfcs-functions.php:747 inc/acfcs-help-tabs.php:36 598 598 msgid "State" 599 599 msgstr "Staat/provincie" … … 658 658 msgstr "Verwijder geselecteerde landen" 659 659 660 #: admin/acfcs-settings.php:64 admin/acfcs-settings.php:66 661 msgid "Delete transients" 662 msgstr "Verwijder transients" 663 664 #: admin/acfcs-settings.php:65 665 msgid "" 666 "If you're seeing unexpected results in your dropdowns, try clearing all " 667 "transients with this option." 668 msgstr "" 669 "Als je onverwachte resultaten zien in je dropdowns, probeer dan de " 670 "transients te verwijderen met deze optie." 671 672 #: admin/acfcs-settings.php:73 660 #: admin/acfcs-settings.php:64 673 661 msgid "Clear the database" 674 662 msgstr "Maak de database leeg" 675 663 676 #: admin/acfcs-settings.php: 74664 #: admin/acfcs-settings.php:65 677 665 msgid "" 678 666 "By selecting this option, you will remove all cities, which are present in " … … 684 672 "wilt." 685 673 686 #: admin/acfcs-settings.php: 75674 #: admin/acfcs-settings.php:66 687 675 msgid "Delete everything" 688 676 msgstr "Verwijder alles" 689 677 690 #: admin/acfcs-settings.php: 82678 #: admin/acfcs-settings.php:73 691 679 msgid "Delete data" 692 680 msgstr "Verwijder data" 693 681 694 #: admin/acfcs-settings.php: 83682 #: admin/acfcs-settings.php:74 695 683 msgid "" 696 684 "When the plugin is deleted, all cities are not automatically deleted. Select " … … 701 689 "als de plugin wordt verwijderd." 702 690 703 #: admin/acfcs-settings.php: 88 admin/acfcs-settings.php:89691 #: admin/acfcs-settings.php:79 admin/acfcs-settings.php:80 704 692 msgid "Remove cities table on plugin deletion" 705 693 msgstr "Verwijder steden bij verwijderen plugin" 706 694 707 #: admin/acfcs-settings.php: 93695 #: admin/acfcs-settings.php:84 708 696 msgid "Save settings" 709 697 msgstr "Instellingen opslaan" … … 794 782 msgstr "" 795 783 796 #: inc/acfcs-functions.php:1 14 inc/acfcs-functions.php:504797 #: inc/acfcs-functions.php: 927784 #: inc/acfcs-functions.php:105 inc/acfcs-functions.php:475 785 #: inc/acfcs-functions.php:894 798 786 msgid "Select a city" 799 787 msgstr "Selecteer een stad" 800 788 801 #: inc/acfcs-functions.php: 300 inc/acfcs-functions.php:305789 #: inc/acfcs-functions.php:271 inc/acfcs-functions.php:276 802 790 msgid "Since your file is not accurate anymore, the file is deleted." 803 791 msgstr "Aangezien je bestand fouten bevat, is deze verwijderd." 804 792 805 #: inc/acfcs-functions.php: 301793 #: inc/acfcs-functions.php:272 806 794 #, php-format 807 795 msgid "There are too few columns on line %d. %s" 808 796 msgstr "Er zijn te weinig kolommen op regel %d. %s" 809 797 810 #: inc/acfcs-functions.php: 309798 #: inc/acfcs-functions.php:280 811 799 #, php-format 812 800 msgid "There are too many columns on line %d. %s" 813 801 msgstr "Er zijn te veel kolommen op regel %d. %s" 814 802 815 #: inc/acfcs-functions.php:3 80803 #: inc/acfcs-functions.php:351 816 804 #, php-format 817 805 msgid "There are too few columns on line %d." 818 806 msgstr "Er zijn te weinig kolommen op regel %d." 819 807 820 #: inc/acfcs-functions.php:3 85808 #: inc/acfcs-functions.php:356 821 809 #, php-format 822 810 msgid "There are too many columns on line %d." 823 811 msgstr "Er zijn te veel kolommen op regel %d." 824 812 825 #: inc/acfcs-functions.php:3 96813 #: inc/acfcs-functions.php:367 826 814 #, php-format 827 815 msgid "The length of the country abbreviation on line %d is incorrect." 828 816 msgstr "De lengte van de land afkorting op regel %d is incorrect." 829 817 830 #: inc/acfcs-functions.php: 601818 #: inc/acfcs-functions.php:572 831 819 #, php-format 832 820 msgid "Congratulations, there appear to be no errors in CSV file: \"%s\"." 833 821 msgstr "Gefeliciteerd, er lijken geen fouten te zitten in CSV bestand: \"%s\"." 834 822 835 #: inc/acfcs-functions.php:6 42 inc/acfcs-functions.php:644823 #: inc/acfcs-functions.php:613 inc/acfcs-functions.php:615 836 824 #, php-format 837 825 msgid "You have successfully imported %d cities from \"%s\"." 838 826 msgstr "Gefeliciteerd, je hebt %d steden geïmporteerd uit \"%s\"." 839 827 840 #: inc/acfcs-functions.php:6 74828 #: inc/acfcs-functions.php:645 841 829 #, php-format 842 830 msgid "Congratulations, you imported 1 city." … … 845 833 msgstr[1] "Gefeliciteerd, je hebt %d steden geïmporteerd." 846 834 847 #: inc/acfcs-functions.php:6 80inc/form-handling.php:33835 #: inc/acfcs-functions.php:651 inc/form-handling.php:33 848 836 msgid "You didn't select a file." 849 837 msgstr "Je hebt geen bestand gekozen." 850 838 851 #: inc/acfcs-functions.php:6 94839 #: inc/acfcs-functions.php:665 852 840 #, php-format 853 841 msgid "File \"%s\" successfully deleted." 854 842 msgstr "File “%s” is succesvol verwijderd." 855 843 856 #: inc/acfcs-functions.php:6 97844 #: inc/acfcs-functions.php:668 857 845 #, php-format 858 846 msgid "File \"%s\" is not deleted. Please try again." 859 847 msgstr "Het bestand \"%s\" is niet verwijderd. Probeer het aub opnieuw." 860 848 861 #: inc/acfcs-functions.php:7 34849 #: inc/acfcs-functions.php:712 862 850 #, php-format 863 851 msgid "You have successfully removed all entries for %s." 864 852 msgstr "Je hebt alle steden verwijderd voor %s." 865 853 866 #: inc/acfcs-functions.php:7 71inc/acfcs-help-tabs.php:31854 #: inc/acfcs-functions.php:746 inc/acfcs-help-tabs.php:31 867 855 msgid "State code" 868 856 msgstr "Staat/provincie code" 869 857 870 #: inc/acfcs-functions.php:7 73inc/acfcs-help-tabs.php:41858 #: inc/acfcs-functions.php:748 inc/acfcs-help-tabs.php:41 871 859 msgid "Country code" 872 860 msgstr "Land code" 873 861 874 #: inc/acfcs-functions.php: 926862 #: inc/acfcs-functions.php:893 875 863 msgid "No countries" 876 864 msgstr "Geen landen" 877 865 878 #: inc/acfcs-functions.php: 929866 #: inc/acfcs-functions.php:896 879 867 msgid "No results (yet), first select a country" 880 868 msgstr "Nog geen resultaten, kies eerst een land" 881 869 882 #: inc/acfcs-functions.php: 931870 #: inc/acfcs-functions.php:898 883 871 msgid "No results (yet), first select a state" 884 872 msgstr "Nog geen resultaten, kies eerst een staat/provincie" … … 1104 1092 #: inc/form-handling.php:8 inc/form-handling.php:30 inc/form-handling.php:64 1105 1093 #: inc/form-handling.php:88 inc/form-handling.php:109 inc/form-handling.php:143 1106 #: inc/form-handling.php:159 inc/form-handling.php:178 1107 #: inc/form-handling.php:198 1094 #: inc/form-handling.php:162 inc/form-handling.php:182 1108 1095 msgid "Something went wrong, please try again." 1109 1096 msgstr "Er ging iets fout, probeer het aub nog een keer." … … 1137 1124 msgstr[1] "Je hebt de volgende steden verwijderd: %s." 1138 1125 1139 #: inc/form-handling.php:146 1140 msgid "You have successfully deleted all transients." 1141 msgstr "Je hebt alle transients succesvol verwijderd." 1142 1143 #: inc/form-handling.php:164 1126 #: inc/form-handling.php:148 1144 1127 msgid "All cities are deleted." 1145 1128 msgstr "Alle steden zijn verwijderd." 1146 1129 1147 #: inc/form-handling.php:1 851130 #: inc/form-handling.php:169 1148 1131 msgid "Settings saved" 1149 1132 msgstr "Instellingen opgeslagen" 1133 1134 #~ msgid "Delete transients" 1135 #~ msgstr "Verwijder transients" 1136 1137 #~ msgid "" 1138 #~ "If you're seeing unexpected results in your dropdowns, try clearing all " 1139 #~ "transients with this option." 1140 #~ msgstr "" 1141 #~ "Als je onverwachte resultaten zien in je dropdowns, probeer dan de " 1142 #~ "transients te verwijderen met deze optie." 1143 1144 #~ msgid "You have successfully deleted all transients." 1145 #~ msgstr "Je hebt alle transients succesvol verwijderd." 1150 1146 1151 1147 #~ msgid "We might ask for this info if support is helping you fix a problem." … … 1199 1195 #~ msgstr "" 1200 1196 #~ "Als je meer landen nodig hebt, kan je deze krijgen op de officiële " 1201 #~ "website: <a href=\"https://acf-city-selector.com/get-countries/\" target="1202 #~ " \"_blank\" rel=\"noopener\">acf-city-selector.com</a>."1197 #~ "website: <a href=\"https://acf-city-selector.com/get-countries/\" " 1198 #~ "target=\"_blank\" rel=\"noopener\">acf-city-selector.com</a>." 1203 1199 1204 1200 #~ msgid "Save data" … … 1220 1216 #, php-format 1221 1217 #~ msgid "" 1222 #~ "<strong>!!!</strong> The default delimiters has been changed from "1223 #~ " ','(comma) to ';' (semi-colon). Read more about it <a href=\"%s\">%s</a>."1218 #~ "<strong>!!!</strong> The default delimiters has been changed from ',' " 1219 #~ "(comma) to ';' (semi-colon). Read more about it <a href=\"%s\">%s</a>." 1224 1220 #~ msgstr "" 1225 1221 #~ "<strong>!!!</strong> De default delimiter is gewijzigd van ',' (komma) " … … 1233 1229 #~ msgstr "" 1234 1230 #~ "<strong>!!!</strong> In één van de volgende versies (vermoedelijk " 1235 #~ "0.30.0), wordt de default delimiter gewijzigd van ',' (komma) naar "1236 #~ " ';'(punt komma). Lees er <a href=\"%s\">%s</a> meer over."1231 #~ "0.30.0), wordt de default delimiter gewijzigd van ',' (komma) naar ';' " 1232 #~ "(punt komma). Lees er <a href=\"%s\">%s</a> meer over." 1237 1233 1238 1234 #~ msgid "Antwerp" -
acf-city-selector/tags/1.14.0/languages/acf-city-selector.pot
r2841217 r3133754 3 3 msgstr "" 4 4 "Project-Id-Version: ACF City Selector\n" 5 "POT-Creation-Date: 202 2-12-29 19:49+0100\n"5 "POT-Creation-Date: 2024-07-29 20:44+0200\n" 6 6 "PO-Revision-Date: 2019-09-14 15:00+0200\n" 7 7 "Last-Translator: Beee\n" 8 8 "Language-Team: \n" 9 "Language: en\n" 9 10 "MIME-Version: 1.0\n" 10 11 "Content-Type: text/plain; charset=UTF-8\n" 11 12 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 2.4.3\n" 13 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 14 "X-Generator: Poedit 3.4.4\n" 13 15 "X-Poedit-Basepath: ..\n" 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n"15 "Language: en\n"16 16 "X-Poedit-KeywordsList: __;_e;_n;_n:1,2;_n_noop;_nx_noop;esc_html__;esc_html_e;esc_attr;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n" 17 17 "X-Poedit-SearchPath-0: .\n" … … 19 19 "X-Poedit-SearchPathExcluded-1: assets/js/init.js\n" 20 20 21 #: ACF_City_Selector.php:16 921 #: ACF_City_Selector.php:167 22 22 #, php-format 23 23 msgid "Several %s had broken ascii characters. You need to re-import these countries to get the correct city names." 24 24 msgstr "" 25 25 26 #: ACF_City_Selector.php:16 926 #: ACF_City_Selector.php:167 27 27 #, php-format 28 28 msgid "cities in %s" 29 29 msgstr "" 30 30 31 #: ACF_City_Selector.php:16 931 #: ACF_City_Selector.php:167 32 32 msgid "cities in Belgium and Netherlands" 33 33 msgstr "" 34 34 35 #: ACF_City_Selector.php:2 61 ACF_City_Selector.php:27836 #: ACF_City_Selector.php:38 635 #: ACF_City_Selector.php:259 ACF_City_Selector.php:276 36 #: ACF_City_Selector.php:384 37 37 msgid "Settings" 38 38 msgstr "" 39 39 40 #: ACF_City_Selector.php:27 740 #: ACF_City_Selector.php:275 41 41 msgid "Dashboard" 42 42 msgstr "" 43 43 44 #: ACF_City_Selector.php:2 81 ACF_City_Selector.php:38844 #: ACF_City_Selector.php:279 ACF_City_Selector.php:386 45 45 #: admin/acfcs-search.php:148 46 46 msgid "Search" 47 47 msgstr "" 48 48 49 #: ACF_City_Selector.php:28 449 #: ACF_City_Selector.php:282 50 50 msgid "Preview" 51 51 msgstr "" 52 52 53 #: ACF_City_Selector.php:28 7 ACF_City_Selector.php:389admin/acfcs-info.php:2653 #: ACF_City_Selector.php:285 ACF_City_Selector.php:387 admin/acfcs-info.php:26 54 54 msgid "Info" 55 55 msgstr "" 56 56 57 #: ACF_City_Selector.php:2 9057 #: ACF_City_Selector.php:288 58 58 msgid "Get more countries" 59 59 msgstr "" 60 60 61 #: ACF_City_Selector.php:31 261 #: ACF_City_Selector.php:310 62 62 #, php-format 63 63 msgid "\"%s\" is not activated. This plugin <strong>must</strong> be activated, because without it \"%s\" won't work. Activate it <a href=\"%s\">here</a>." 64 64 msgstr "" 65 65 66 #: ACF_City_Selector.php:33 466 #: ACF_City_Selector.php:332 67 67 #, php-format 68 68 msgid "%s: The \"%s\" plugin will probably not work properly (anymore) with %s v4.x. Please upgrade to PRO." 69 69 msgstr "" 70 70 71 #: ACF_City_Selector.php:33 571 #: ACF_City_Selector.php:333 72 72 msgid "Warning" 73 73 msgstr "" 74 74 75 #: ACF_City_Selector.php:38 5admin/acfcs-preview.php:3675 #: ACF_City_Selector.php:383 admin/acfcs-preview.php:36 76 76 msgid "Preview data" 77 77 msgstr "" 78 78 79 #: ACF_City_Selector.php:38 7admin/acfcs-countries.php:5079 #: ACF_City_Selector.php:385 admin/acfcs-countries.php:50 80 80 msgid "Get countries" 81 81 msgstr "" 82 82 83 #: admin/acf-city-selector-v4.php: 29admin/acf-city-selector-v5.php:3483 #: admin/acf-city-selector-v4.php:31 admin/acf-city-selector-v5.php:34 84 84 msgid "Choice" 85 85 msgstr "" 86 86 87 #: admin/acf-city-selector-v4.php:6 4admin/acf-city-selector-v5.php:10287 #: admin/acf-city-selector-v4.php:68 admin/acf-city-selector-v5.php:102 88 88 msgid "All fields [default]" 89 89 msgstr "" 90 90 91 #: admin/acf-city-selector-v4.php:6 5admin/acf-city-selector-v5.php:10391 #: admin/acf-city-selector-v4.php:69 admin/acf-city-selector-v5.php:103 92 92 msgid "Country only" 93 93 msgstr "" 94 94 95 #: admin/acf-city-selector-v4.php: 66admin/acf-city-selector-v5.php:10495 #: admin/acf-city-selector-v4.php:70 admin/acf-city-selector-v5.php:104 96 96 msgid "Country + State/province" 97 97 msgstr "" 98 98 99 #: admin/acf-city-selector-v4.php: 67admin/acf-city-selector-v5.php:10599 #: admin/acf-city-selector-v4.php:71 admin/acf-city-selector-v5.php:105 100 100 msgid "Country + City" 101 101 msgstr "" 102 102 103 #: admin/acf-city-selector-v4.php: 68admin/acf-city-selector-v5.php:106103 #: admin/acf-city-selector-v4.php:72 admin/acf-city-selector-v5.php:106 104 104 msgid "State/province + City" 105 105 msgstr "" 106 106 107 #: admin/acf-city-selector-v4.php:7 2admin/acf-city-selector-v5.php:59107 #: admin/acf-city-selector-v4.php:76 admin/acf-city-selector-v5.php:59 108 108 #: admin/acfcs-info.php:170 109 109 msgid "Yes" 110 110 msgstr "" 111 111 112 #: admin/acf-city-selector-v4.php:7 3admin/acf-city-selector-v5.php:60112 #: admin/acf-city-selector-v4.php:77 admin/acf-city-selector-v5.php:60 113 113 #: admin/acfcs-info.php:170 114 114 msgid "No" 115 115 msgstr "" 116 116 117 #: admin/acf-city-selector-v4.php:8 0admin/acf-city-selector-v5.php:65117 #: admin/acf-city-selector-v4.php:84 admin/acf-city-selector-v5.php:65 118 118 msgid "Show labels" 119 119 msgstr "" 120 120 121 #: admin/acf-city-selector-v4.php:8 1admin/acf-city-selector-v5.php:64121 #: admin/acf-city-selector-v4.php:85 admin/acf-city-selector-v5.php:64 122 122 msgid "Show field labels above the dropdown menus" 123 123 msgstr "" 124 124 125 #: admin/acf-city-selector-v4.php: 97admin/acf-city-selector-v5.php:96125 #: admin/acf-city-selector-v4.php:101 admin/acf-city-selector-v5.php:96 126 126 msgid "Default country" 127 127 msgstr "" 128 128 129 #: admin/acf-city-selector-v4.php: 98admin/acf-city-selector-v5.php:95129 #: admin/acf-city-selector-v4.php:102 admin/acf-city-selector-v5.php:95 130 130 msgid "Select a default country for a new field" 131 131 msgstr "" 132 132 133 #: admin/acf-city-selector-v4.php:11 4admin/acf-city-selector-v5.php:111133 #: admin/acf-city-selector-v4.php:118 admin/acf-city-selector-v5.php:111 134 134 msgid "Fields to use" 135 135 msgstr "" 136 136 137 #: admin/acf-city-selector-v4.php:11 5admin/acf-city-selector-v5.php:110137 #: admin/acf-city-selector-v4.php:119 admin/acf-city-selector-v5.php:110 138 138 msgid "Select which fields are used" 139 139 msgstr "" 140 140 141 #: admin/acf-city-selector-v4.php:1 78admin/acf-city-selector-v5.php:160141 #: admin/acf-city-selector-v4.php:184 admin/acf-city-selector-v5.php:160 142 142 msgid "You haven't set a default country, so NO provinces/states and cities will be loaded." 143 143 msgstr "" … … 210 210 211 211 #: admin/acfcs-countries.php:66 admin/acfcs-search.php:172 212 #: inc/acfcs-functions.php:7 74inc/acfcs-help-tabs.php:46212 #: inc/acfcs-functions.php:749 inc/acfcs-help-tabs.php:46 213 213 msgid "Country" 214 214 msgstr "" … … 503 503 504 504 #: admin/acfcs-search.php:68 admin/acfcs-search.php:71 505 #: inc/acfcs-functions.php:21 inc/acfcs-functions.php: 506506 #: inc/acfcs-functions.php: 928505 #: inc/acfcs-functions.php:21 inc/acfcs-functions.php:477 506 #: inc/acfcs-functions.php:895 507 507 msgid "Select a country" 508 508 msgstr "" … … 513 513 514 514 #: admin/acfcs-search.php:89 admin/acfcs-search.php:93 515 #: inc/acfcs-functions.php:59 inc/acfcs-functions.php: 513516 #: inc/acfcs-functions.php: 930515 #: inc/acfcs-functions.php:59 inc/acfcs-functions.php:484 516 #: inc/acfcs-functions.php:897 517 517 msgid "Select a province/state" 518 518 msgstr "" … … 535 535 536 536 #: admin/acfcs-search.php:136 admin/acfcs-search.php:170 537 #: inc/acfcs-functions.php:7 70inc/acfcs-help-tabs.php:26537 #: inc/acfcs-functions.php:745 inc/acfcs-help-tabs.php:26 538 538 msgid "City" 539 539 msgstr "" 540 540 541 541 #: admin/acfcs-search.php:137 admin/acfcs-search.php:171 542 #: inc/acfcs-functions.php:7 72inc/acfcs-help-tabs.php:36542 #: inc/acfcs-functions.php:747 inc/acfcs-help-tabs.php:36 543 543 msgid "State" 544 544 msgstr "" … … 598 598 msgstr "" 599 599 600 #: admin/acfcs-settings.php:64 admin/acfcs-settings.php:66601 msgid " Delete transients"600 #: admin/acfcs-settings.php:64 601 msgid "Clear the database" 602 602 msgstr "" 603 603 604 604 #: admin/acfcs-settings.php:65 605 msgid "If you're seeing unexpected results in your dropdowns, try clearing all transients with this option." 605 msgid "By selecting this option, you will remove all cities, which are present in the database. This is useful if you don't need the preset cities or you want a fresh start." 606 msgstr "" 607 608 #: admin/acfcs-settings.php:66 609 msgid "Delete everything" 606 610 msgstr "" 607 611 608 612 #: admin/acfcs-settings.php:73 609 msgid " Clear the database"613 msgid "Delete data" 610 614 msgstr "" 611 615 612 616 #: admin/acfcs-settings.php:74 613 msgid "By selecting this option, you will remove all cities, which are present in the database. This is useful if you don't need the preset cities or you want a fresh start."614 msgstr ""615 616 #: admin/acfcs-settings.php:75617 msgid "Delete everything"618 msgstr ""619 620 #: admin/acfcs-settings.php:82621 msgid "Delete data"622 msgstr ""623 624 #: admin/acfcs-settings.php:83625 617 msgid "When the plugin is deleted, all cities are not automatically deleted. Select this option to delete the cities table as well upon deletion." 626 618 msgstr "" 627 619 628 #: admin/acfcs-settings.php: 88 admin/acfcs-settings.php:89620 #: admin/acfcs-settings.php:79 admin/acfcs-settings.php:80 629 621 msgid "Remove cities table on plugin deletion" 630 622 msgstr "" 631 623 632 #: admin/acfcs-settings.php: 93624 #: admin/acfcs-settings.php:84 633 625 msgid "Save settings" 634 626 msgstr "" … … 705 697 msgstr "" 706 698 707 #: inc/acfcs-functions.php:1 14 inc/acfcs-functions.php:504708 #: inc/acfcs-functions.php: 927699 #: inc/acfcs-functions.php:105 inc/acfcs-functions.php:475 700 #: inc/acfcs-functions.php:894 709 701 msgid "Select a city" 710 702 msgstr "" 711 703 712 #: inc/acfcs-functions.php: 300 inc/acfcs-functions.php:305704 #: inc/acfcs-functions.php:271 inc/acfcs-functions.php:276 713 705 msgid "Since your file is not accurate anymore, the file is deleted." 714 706 msgstr "" 715 707 716 #: inc/acfcs-functions.php: 301708 #: inc/acfcs-functions.php:272 717 709 #, php-format 718 710 msgid "There are too few columns on line %d. %s" 719 711 msgstr "" 720 712 721 #: inc/acfcs-functions.php: 309713 #: inc/acfcs-functions.php:280 722 714 #, php-format 723 715 msgid "There are too many columns on line %d. %s" 724 716 msgstr "" 725 717 726 #: inc/acfcs-functions.php:3 80718 #: inc/acfcs-functions.php:351 727 719 #, php-format 728 720 msgid "There are too few columns on line %d." 729 721 msgstr "" 730 722 731 #: inc/acfcs-functions.php:3 85723 #: inc/acfcs-functions.php:356 732 724 #, php-format 733 725 msgid "There are too many columns on line %d." 734 726 msgstr "" 735 727 736 #: inc/acfcs-functions.php:3 96728 #: inc/acfcs-functions.php:367 737 729 #, php-format 738 730 msgid "The length of the country abbreviation on line %d is incorrect." 739 731 msgstr "" 740 732 741 #: inc/acfcs-functions.php: 601733 #: inc/acfcs-functions.php:572 742 734 #, php-format 743 735 msgid "Congratulations, there appear to be no errors in CSV file: \"%s\"." 744 736 msgstr "" 745 737 746 #: inc/acfcs-functions.php:6 42 inc/acfcs-functions.php:644738 #: inc/acfcs-functions.php:613 inc/acfcs-functions.php:615 747 739 #, php-format 748 740 msgid "You have successfully imported %d cities from \"%s\"." 749 741 msgstr "" 750 742 751 #: inc/acfcs-functions.php:6 74743 #: inc/acfcs-functions.php:645 752 744 #, php-format 753 745 msgid "Congratulations, you imported 1 city." … … 756 748 msgstr[1] "" 757 749 758 #: inc/acfcs-functions.php:6 80inc/form-handling.php:33750 #: inc/acfcs-functions.php:651 inc/form-handling.php:33 759 751 msgid "You didn't select a file." 760 752 msgstr "" 761 753 762 #: inc/acfcs-functions.php:6 94754 #: inc/acfcs-functions.php:665 763 755 #, php-format 764 756 msgid "File \"%s\" successfully deleted." 765 757 msgstr "" 766 758 767 #: inc/acfcs-functions.php:6 97759 #: inc/acfcs-functions.php:668 768 760 #, php-format 769 761 msgid "File \"%s\" is not deleted. Please try again." 770 762 msgstr "" 771 763 772 #: inc/acfcs-functions.php:7 34764 #: inc/acfcs-functions.php:712 773 765 #, php-format 774 766 msgid "You have successfully removed all entries for %s." 775 767 msgstr "" 776 768 777 #: inc/acfcs-functions.php:7 71inc/acfcs-help-tabs.php:31769 #: inc/acfcs-functions.php:746 inc/acfcs-help-tabs.php:31 778 770 msgid "State code" 779 771 msgstr "" 780 772 781 #: inc/acfcs-functions.php:7 73inc/acfcs-help-tabs.php:41773 #: inc/acfcs-functions.php:748 inc/acfcs-help-tabs.php:41 782 774 msgid "Country code" 783 775 msgstr "" 784 776 785 #: inc/acfcs-functions.php: 926777 #: inc/acfcs-functions.php:893 786 778 msgid "No countries" 787 779 msgstr "" 788 780 789 #: inc/acfcs-functions.php: 929781 #: inc/acfcs-functions.php:896 790 782 msgid "No results (yet), first select a country" 791 783 msgstr "" 792 784 793 #: inc/acfcs-functions.php: 931785 #: inc/acfcs-functions.php:898 794 786 msgid "No results (yet), first select a state" 795 787 msgstr "" … … 990 982 #: inc/form-handling.php:8 inc/form-handling.php:30 inc/form-handling.php:64 991 983 #: inc/form-handling.php:88 inc/form-handling.php:109 inc/form-handling.php:143 992 #: inc/form-handling.php:159 inc/form-handling.php:178 993 #: inc/form-handling.php:198 984 #: inc/form-handling.php:162 inc/form-handling.php:182 994 985 msgid "Something went wrong, please try again." 995 986 msgstr "" … … 1019 1010 msgstr[1] "" 1020 1011 1021 #: inc/form-handling.php:146 1022 msgid "You have successfully deleted all transients." 1023 msgstr "" 1024 1025 #: inc/form-handling.php:164 1012 #: inc/form-handling.php:148 1026 1013 msgid "All cities are deleted." 1027 1014 msgstr "" 1028 1015 1029 #: inc/form-handling.php:1 851016 #: inc/form-handling.php:169 1030 1017 msgid "Settings saved" 1031 1018 msgstr "" -
acf-city-selector/tags/1.14.0/readme.txt
r3074624 r3133754 4 4 Requires at least: 3.6.0 5 5 Requires PHP: 7.0 6 Tested up to: 6. 5.27 Stable tag: 1.1 3.06 Tested up to: 6.6.1 7 Stable tag: 1.14.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 42 42 == Changelog == 43 43 44 = 1.14.0 = 45 * update database queries for searching citites in admin 46 * update database queries for deleting countries in admin 47 * removed transients because it conflicted with translation 48 44 49 = 1.13.0 = 45 50 * Fix typo in function call -
acf-city-selector/trunk/ACF_City_Selector.php
r3074624 r3133754 4 4 Plugin URI: https://acf-city-selector.com 5 5 Description: An extension for ACF which allows you to select a city based on country and province/state. 6 Version: 1.1 3.07 Tested up to: 6. 5.26 Version: 1.14.0 7 Tested up to: 6.6.1 8 8 Requires PHP: 7.0 9 9 Author: Beee … … 32 32 */ 33 33 public function __construct() { 34 35 $this->settings = array(34 35 $this->settings = [ 36 36 'db_version' => '1.0', 37 37 'url' => plugin_dir_url( __FILE__ ), 38 'version' => '1.1 3.0',39 );40 38 'version' => '1.14.0', 39 ]; 40 41 41 if ( ! class_exists( 'ACFCS_WEBSITE_URL' ) ) { 42 42 define( 'ACFCS_WEBSITE_URL', 'https://acf-city-selector.com' ); … … 47 47 define( 'ACFCS_PLUGIN_PATH', $plugin_path ); 48 48 } 49 50 register_activation_hook( __FILE__, array( $this, 'acfcs_plugin_activation' ));51 register_deactivation_hook( __FILE__, array( $this, 'acfcs_plugin_deactivation' ));52 53 add_action( 'acf/register_fields', array( $this, 'acfcs_include_field_types' )); // v454 add_action( 'acf/include_field_types', array( $this, 'acfcs_include_field_types' )); // v555 56 add_action( 'admin_enqueue_scripts', array( $this, 'acfcs_add_scripts' ));57 add_action( 'wp_enqueue_scripts', array( $this, 'acfcs_add_scripts' ));58 59 add_action( 'admin_menu', array( $this, 'acfcs_add_admin_pages' ));60 add_action( 'admin_init', array( $this, 'acfcs_admin_menu' ));61 add_action( 'admin_init', array( $this, 'acfcs_errors' ));62 add_action( 'admin_init', array( $this, 'acfcs_check_table' ));63 add_action( 'admin_notices', array( $this, 'acfcs_check_cities' ));64 add_action( 'init', array( $this, 'acfcs_load_textdomain' ));65 add_action( 'plugins_loaded', array( $this, 'acfcs_change_plugin_order' ), 5 );66 add_action( 'plugins_loaded', array( $this, 'acfcs_check_for_acf' ), 6 );67 add_action( 'plugins_loaded', array( $this, 'acfcs_check_acf_version' ));68 69 add_action( 'acf/input/admin_l10n', array( $this, 'acfcs_error_messages' ));70 71 add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'acfcs_settings_link' ));72 49 50 register_activation_hook( __FILE__, [ $this, 'acfcs_plugin_activation' ] ); 51 register_deactivation_hook( __FILE__, [ $this, 'acfcs_plugin_deactivation' ] ); 52 53 add_action( 'acf/register_fields', [ $this, 'acfcs_include_field_types' ] ); // v4 54 add_action( 'acf/include_field_types', [ $this, 'acfcs_include_field_types' ] ); // v5 55 56 add_action( 'admin_enqueue_scripts', [ $this, 'acfcs_add_scripts' ] ); 57 add_action( 'wp_enqueue_scripts', [ $this, 'acfcs_add_scripts' ] ); 58 59 add_action( 'admin_menu', [ $this, 'acfcs_add_admin_pages' ] ); 60 add_action( 'admin_init', [ $this, 'acfcs_admin_menu' ] ); 61 add_action( 'admin_init', [ $this, 'acfcs_errors' ] ); 62 add_action( 'admin_init', [ $this, 'acfcs_check_table' ] ); 63 add_action( 'admin_notices', [ $this, 'acfcs_check_cities' ] ); 64 add_action( 'init', [ $this, 'acfcs_load_textdomain' ] ); 65 add_action( 'plugins_loaded', [ $this, 'acfcs_change_plugin_order' ], 5 ); 66 add_action( 'plugins_loaded', [ $this, 'acfcs_check_for_acf' ], 6 ); 67 add_action( 'plugins_loaded', [ $this, 'acfcs_check_acf_version' ] ); 68 69 add_action( 'acf/input/admin_l10n', [ $this, 'acfcs_error_messages' ] ); 70 71 add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), [ $this, 'acfcs_settings_link' ] ); 72 73 73 // functions & hooks 74 74 include 'inc/acfcs-actions.php'; … … 106 106 public function acfcs_plugin_deactivation() { 107 107 delete_option( 'acfcs_db_version' ); 108 // this hook is here because I didn't want to create a new hook for an existing action109 do_action( 'acfcs_delete_transients' );110 108 // other important stuff gets done in uninstall.php 111 109 } … … 150 148 } 151 149 } 152 153 154 /**155 * Check if cities need to be re-imported156 *157 * @return void158 */150 151 152 /** 153 * Check if cities need to be re-imported 154 * 155 * @return void 156 */ 159 157 public function acfcs_check_cities() { 160 if ( '1.7.0' < $this->settings[ 'version' ] && false == get_option( 'acfcs_city_update_1_8_0' ) ) {161 $countries = [ 'nl', 'be' ];162 foreach( $countries as $country_code ) {163 if ( true === acfcs_has_cities( $country_code ) ) {164 $reimport[] = $country_code;165 }166 }167 if ( isset( $reimport ) ) {168 $country_name = 1 === count( $reimport ) ? acfcs_get_country_name( $reimport[ 0 ] ) : false;169 $notice = sprintf( __( 'Several %s had broken ascii characters. You need to re-import these countries to get the correct city names.', 'acf-city-selector' ), _n( sprintf( __( 'cities in %s', 'acf-city-selector' ), $country_name ), __( 'cities in Belgium and Netherlands', 'acf-city-selector' ), count( $reimport ), 'acf-city-selector' ) );170 echo sprintf( '<div class="notice notice-warning is-dismissible"><p>%s</p></div>', $notice );171 } else {172 update_option( 'acfcs_city_update_1_8_0', 'done' );173 }174 }158 if ( '1.7.0' < $this->settings[ 'version' ] && false == get_option( 'acfcs_city_update_1_8_0' ) ) { 159 $countries = [ 'nl', 'be' ]; 160 foreach( $countries as $country_code ) { 161 if ( true === acfcs_has_cities( $country_code ) ) { 162 $reimport[] = $country_code; 163 } 164 } 165 if ( isset( $reimport ) ) { 166 $country_name = 1 === count( $reimport ) ? acfcs_get_country_name( $reimport[ 0 ] ) : false; 167 $notice = sprintf( __( 'Several %s had broken ascii characters. You need to re-import these countries to get the correct city names.', 'acf-city-selector' ), _n( sprintf( __( 'cities in %s', 'acf-city-selector' ), $country_name ), __( 'cities in Belgium and Netherlands', 'acf-city-selector' ), count( $reimport ), 'acf-city-selector' ) ); 168 echo sprintf( '<div class="notice notice-warning is-dismissible"><p>%s</p></div>', $notice ); 169 } else { 170 update_option( 'acfcs_city_update_1_8_0', 'done' ); 171 } 172 } 175 173 } 176 174 … … 345 343 346 344 public function acfcs_load_textdomain() { 347 load_plugin_textdomain( 'acf-city-selector', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );345 load_plugin_textdomain( 'acf-city-selector', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 348 346 } 349 347 -
acf-city-selector/trunk/admin/acf-city-selector-v4.php
r2696652 r3133754 13 13 var $settings, // will hold info such as dir / path 14 14 $defaults; // will hold default field options 15 16 17 /* 18 * __construct 19 * 20 * Set name / label needed for actions / filters 21 * 22 * @since 3.6 23 * @date 23/01/13 24 */ 15 16 17 /** 18 * __construct 19 * 20 * Set name / label needed for actions / filters 21 * 22 * @since 3.6 23 * @date 23/01/13 24 * 25 * @param $settings 26 */ 25 27 function __construct( $settings ) { 26 28 … … 42 44 43 45 44 /* 45 * create_options() 46 * 47 * Create extra options for your field. This is rendered when editing a field. 48 * The value of $field['name'] can be used (like below) to save extra data to the $field 49 * 50 * @type action 51 * @since 3.6 52 * @date 23/01/13 53 * 54 * @param $field - an array holding all the field's data 55 */ 46 /** 47 * create_options() 48 * 49 * Create extra options for your field. This is rendered when editing a field. 50 * The value of $field['name'] can be used (like below) to save extra data to the $field 51 * 52 * @type action 53 * @since 3.6 54 * @date 23/01/13 55 * 56 * @param $field 57 * 58 * @return void 59 */ 56 60 function create_options( $field ) { 57 61 $field = array_merge($this->defaults, $field); … … 130 134 131 135 132 /* 133 * create_field() 134 * 135 * Create the HTML interface for your field 136 * 137 * @param $field - an array holding all the field's data 138 * 139 * @type action 140 * @since 3.6 141 * @date 23/01/13 142 */ 136 /** 137 * create_field() 138 * 139 * Create the HTML interface for your field 140 * 141 * @type action 142 * @since 3.6 143 * @date 23/01/13 144 * 145 * @param $field 146 * 147 * @return void 148 */ 143 149 function create_field( $field ) { 144 150 $field = array_merge( $this->defaults, $field ); … … 197 203 198 204 199 /* 200 * input_admin_enqueue_scripts() 201 * 202 * This action is called in the admin_enqueue_scripts action on the edit screen where your field is created. 203 * Use this action to add CSS + JavaScript to assist your create_field() action. 204 * 205 * $info https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts 206 * @type action 207 * @since 3.6 208 * @date 23/01/13 209 * 210 * @TODO: DRY 211 */ 205 /** 206 * input_admin_enqueue_scripts() 207 * 208 * This action is called in the admin_enqueue_scripts action on the edit screen where your field is created. 209 * Use this action to add CSS + JavaScript to assist your create_field() action. 210 * 211 * $info https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts 212 * @type action 213 * @since 3.6 214 * @date 23/01/13 215 * 216 * @return void 217 * 218 * @TODO: DRY 219 */ 212 220 function input_admin_enqueue_scripts() { 213 221 … … 265 273 266 274 267 /* 268 *load_value()269 *270 *This filter is applied to the $value after it is loaded from the db271 *272 * @typefilter273 * @since3.6274 * @date23/01/13275 *276 * @param $value - the value found in the database277 * @param $post_id - the $post_id from which the value was loaded278 * @param $field - the field array holding all the field options279 *280 * @TODO: DRY281 *282 * @return $value - the value to be saved in the database283 */275 /** 276 * load_value() 277 * 278 * This filter is applied to the $value after it is loaded from the db 279 * 280 * @type filter 281 * @since 3.6 282 * @date 23/01/13 283 * 284 * @param $value 285 * @param $post_id 286 * @param $field 287 * 288 * @return mixed 289 * 290 * @TODO: DRY 291 */ 284 292 function load_value( $value, $post_id, $field ) { 285 293 $state_code = false; … … 388 396 } 389 397 390 391 398 // initialize 392 399 new acf_field_city_selector( $this->settings ); 393 400 394 395 // class_exists check396 401 endif; -
acf-city-selector/trunk/admin/acf-city-selector-v5.php
r2906374 r3133754 69 69 'value' => $field[ 'show_labels' ], 70 70 ) ); 71 72 acf_render_field_setting( $field, array(71 72 acf_render_field_setting( $field, array( 73 73 'choices' => $select_options, 74 74 'instructions' => esc_html__( 'Use select2 for dropdowns', 'acf-city-selector' ), … … 124 124 */ 125 125 function render_field( $field ) { 126 $default_country = ( isset( $field[ 'default_country' ] ) && ! empty( $field[ 'default_country' ] ) ) ? $field[ 'default_country' ] : false;127 $prefill_cities = [];128 $prefill_states = [];129 $selected_country = ( isset( $field[ 'value' ][ 'countryCode' ] ) ) ? $field[ 'value' ][ 'countryCode' ] : false;130 $selected_state = ( isset( $field[ 'value' ][ 'stateCode' ] ) ) ? $field[ 'value' ][ 'stateCode' ] : false;131 $selected_city = ( isset( $field[ 'value' ][ 'cityName' ] ) ) ? $field[ 'value' ][ 'cityName' ] : false;132 $show_first = true;133 $store_meta = ( isset( $field[ 'store_meta' ] ) ) ? $field[ 'store_meta' ] : false;134 $which_fields = ( isset( $field[ 'which_fields' ] ) ) ? $field[ 'which_fields' ] : 'all';135 136 if ( false !== $default_country && false == $selected_country ) {126 $default_country = ( isset( $field[ 'default_country' ] ) && ! empty( $field[ 'default_country' ] ) ) ? $field[ 'default_country' ] : false; 127 $prefill_cities = []; 128 $prefill_states = []; 129 $selected_country = ( isset( $field[ 'value' ][ 'countryCode' ] ) ) ? $field[ 'value' ][ 'countryCode' ] : false; 130 $selected_state = ( isset( $field[ 'value' ][ 'stateCode' ] ) ) ? $field[ 'value' ][ 'stateCode' ] : false; 131 $selected_city = ( isset( $field[ 'value' ][ 'cityName' ] ) ) ? $field[ 'value' ][ 'cityName' ] : false; 132 $show_first = true; 133 $store_meta = ( isset( $field[ 'store_meta' ] ) ) ? $field[ 'store_meta' ] : false; 134 $which_fields = ( isset( $field[ 'which_fields' ] ) ) ? $field[ 'which_fields' ] : 'all'; 135 136 if ( false !== $default_country && false == $selected_country ) { 137 137 // New post with default country 138 138 if ( in_array( $which_fields, [ 'all', 'country_state', 'state_city' ] ) ) { … … 176 176 echo acfcs_render_dropdown( 'city', $field, $selected_city, $prefill_values ); 177 177 } 178 if ( ! isset( $field[ 'parent_layout' ] ) && ! isset( $field[ 'parent_repeater' ] ) && $store_meta ) {179 echo acfcs_render_hidden_field( 'store_meta', '1' );178 if ( ! isset( $field[ 'parent_layout' ] ) && ! isset( $field[ 'parent_repeater' ] ) && $store_meta ) { 179 echo acfcs_render_hidden_field( 'store_meta', '1' ); 180 180 } 181 181 } … … 238 238 } 239 239 } 240 240 241 241 if ( strlen( $country_code ) == 2 && false != $state_code ) { 242 242 global $wpdb; 243 $table = $wpdb->prefix . 'cities';244 $sql_query = $wpdb->prepare( "SELECT country, state_name FROM {$table} WHERE country_code = %s AND state_code = %s", $country_code, $state_code );245 $row = $wpdb->get_row( $sql_query );246 $value[ 'stateCode' ] = $state_code;247 $value[ 'stateName' ] = ( isset( $row->state_name ) ) ? $row->state_name : false;248 $value[ 'countryName' ] = ( isset( $row->country ) ) ? $row->country : false;243 $table = $wpdb->prefix . 'cities'; 244 $sql_query = $wpdb->prepare( "SELECT country, state_name FROM {$table} WHERE country_code = %s AND state_code = %s", $country_code, $state_code ); 245 $row = $wpdb->get_row( $sql_query ); 246 $value[ 'stateCode' ] = $state_code; 247 $value[ 'stateName' ] = ( isset( $row->state_name ) ) ? $row->state_name : false; 248 $value[ 'countryName' ] = ( isset( $row->country ) ) ? $row->country : false; 249 249 } 250 250 … … 325 325 } 326 326 } 327 328 if ( ! isset( $field[ 'parent_layout' ] ) && ! isset( $field[ 'parent_repeater' ] ) ) {329 do_action( 'acfcs_store_meta', $value, $post_id );330 }327 328 if ( ! isset( $field[ 'parent_layout' ] ) && ! isset( $field[ 'parent_repeater' ] ) ) { 329 do_action( 'acfcs_store_meta', $value, $post_id ); 330 } 331 331 332 332 return $value; -
acf-city-selector/trunk/admin/acfcs-search.php
r2791052 r3133754 113 113 114 114 <div class="acfcs__search-criteria acfcs__search-criteria--search"> 115 <label for="acfcs_search" class="screen-reader-text"><?php esc_attr_e( 'Search term', 'acf-city-selector' ); ?></label>115 <label for="acfcs_search" class="screen-reader-text"><?php esc_attr_e( 'Search term', 'acf-city-selector' ); ?></label> 116 116 <input name="acfcs_search" id="acfcs_search" type="text" value="<?php if ( false != $searched_term ) { echo stripslashes( $searched_term ); } ?>" placeholder="<?php esc_html_e( 'City name', 'acf-city-selector' ); ?>"> 117 117 </div> … … 120 120 121 121 <div class="acfcs__search-criteria acfcs__search-criteria--limit"> 122 <label for="acfcs_limit" class="screen-reader-text"><?php esc_attr_e( 'Limit', 'acf-city-selector' ); ?></label>122 <label for="acfcs_limit" class="screen-reader-text"><?php esc_attr_e( 'Limit', 'acf-city-selector' ); ?></label> 123 123 <input name="acfcs_limit" id="acfcs_limit" type="number" value="<?php if ( false != $selected_limit ) { echo $selected_limit; } ?>" placeholder="<?php esc_html_e( 'Limit', 'acf-city-selector' ); ?>"> 124 124 </div> … … 127 127 128 128 <div class="acfcs__search-criteria acfcs__search-criteria--orderby"> 129 <label for="acfcs_orderby" class="screen-reader-text"><?php esc_attr_e( 'Order by', 'acf-city-selector' ); ?></label>129 <label for="acfcs_orderby" class="screen-reader-text"><?php esc_attr_e( 'Order by', 'acf-city-selector' ); ?></label> 130 130 <select name="acfcs_orderby" id="acfcs_orderby"> 131 131 <option value=""> -
acf-city-selector/trunk/admin/acfcs-settings.php
r2685642 r3133754 61 61 62 62 <form method="post" action=""> 63 <input name="acfcs_delete_transients" value="<?php echo wp_create_nonce( 'acfcs-delete-transients-nonce' ); ?>" type="hidden" />64 <?php echo sprintf( '<h2>%s</h2>', esc_html__( 'Delete transients', 'acf-city-selector' ) ); ?>65 <?php echo sprintf( '<p>%s</p>', esc_html__( "If you're seeing unexpected results in your dropdowns, try clearing all transients with this option.", 'acf-city-selector' ) ); ?>66 <input type="submit" class="button button-primary" value="<?php esc_html_e( "Delete transients", 'acf-city-selector' ); ?>" />67 </form>68 69 <br /><hr />70 71 <form method="post" action="">72 63 <input name="acfcs_truncate_table_nonce" value="<?php echo wp_create_nonce( 'acfcs-truncate-table-nonce' ); ?>" type="hidden" /> 73 64 <?php echo sprintf( '<h2>%s</h2>', esc_html__( 'Clear the database', 'acf-city-selector' ) ); ?> -
acf-city-selector/trunk/admin/admin-right.php
r2791052 r3133754 25 25 echo sprintf( '<p>%s</p>', esc_html__( 'If you have some good suggestions for improvements and/or new features, please share them with us, maybe we can incorporate it.', 'acf-city-selector' ) ); 26 26 ?> 27 28 27 </div> 29 28 </div> -
acf-city-selector/trunk/inc/acfcs-actions.php
r3074624 r3133754 1 1 <?php 2 2 /** 3 * Function to delete transients3 * Do stuff after certain imports 4 4 * 5 * @param false $country_code 5 * @param $country_code 6 * 7 * @return void 6 8 */ 7 function acfcs_delete_transients( $country_code = false ) { 8 if ( false != $country_code ) { 9 delete_transient( 'acfcs_states_' . strtolower( $country_code ) ); 10 11 // get states for country code 12 $states = acfcs_get_states( $country_code ); 13 foreach( $states as $key => $state ) { 14 $country_code_with_state = strtolower( $key ); 15 delete_transient( 'acfcs_cities_' . $country_code_with_state ); 16 } 9 function acfcs_reimport_cities( $country_code = false ) { 10 if ( $country_code && in_array( $country_code, [ 'nl', 'be' ] ) ) { 11 update_option( 'acfcs_city_update_1_8_0_' . $country_code, 'done' ); 17 12 18 } else { 19 delete_transient( 'acfcs_countries' ); 20 $countries = acfcs_get_countries( false, false, true ); 21 22 if ( ! empty( $countries ) ) { 23 foreach( $countries as $country_code => $label ) { 24 do_action( 'acfcs_delete_transients', $country_code ); 25 delete_transient( sprintf( 'acfcs_states_%s', $country_code ) ); 26 } 13 $belgium_done = get_option( 'acfcs_city_update_1_8_0_be' ); 14 $netherlands_done = get_option( 'acfcs_city_update_1_8_0_nl' ); 15 16 if ( $belgium_done && $netherlands_done ) { 17 delete_option( 'acfcs_city_update_1_8_0_be' ); 18 delete_option( 'acfcs_city_update_1_8_0_nl' ); 19 update_option( 'acfcs_city_update_1_8_0', 'done' ); 27 20 } 28 21 } 29 22 } 30 add_action( 'acfcs_delete_transients', 'acfcs_delete_transients' ); 31 add_action( 'acfcs_after_success_import', 'acfcs_delete_transients' ); 32 add_action( 'acfcs_after_success_import_raw', 'acfcs_delete_transients' ); 33 add_action( 'acfcs_after_success_nuke', 'acfcs_delete_transients' ); 34 35 36 /** 37 * Do stuff after certain imports 38 * 39 * @param $country_code 40 * 41 * @return void 42 */ 43 function acfcs_reimport_cities( $country_code = false ) { 44 if ( $country_code && in_array( $country_code, [ 'nl', 'be' ] ) ) { 45 update_option( 'acfcs_city_update_1_8_0_' . $country_code, 'done' ); 46 47 $belgium_done = get_option( 'acfcs_city_update_1_8_0_be' ); 48 $netherlands_done = get_option( 'acfcs_city_update_1_8_0_nl' ); 49 50 if ( $belgium_done && $netherlands_done ) { 51 delete_option( 'acfcs_city_update_1_8_0_be' ); 52 delete_option( 'acfcs_city_update_1_8_0_nl' ); 53 update_option( 'acfcs_city_update_1_8_0', 'done' ); 54 } 55 } 56 } 57 add_action( 'acfcs_after_success_import', 'acfcs_reimport_cities' ); 58 59 60 /** 61 * Save location as single meta values 62 * 63 * @param $value 64 * @param $post_id 65 * 66 * @return void 67 */ 68 function acfcs_save_single_meta( $value, $post_id ) { 69 if ( isset( $_POST[ 'store_meta' ] ) && 1 == $_POST[ 'store_meta' ] ) { 70 if ( ! empty( $value[ 'countryCode' ] ) ) { 71 update_post_meta( $post_id, 'acfcs_search_country', $value[ 'countryCode' ] ); 72 } 73 if ( ! empty( $value[ 'stateCode' ] ) ) { 74 update_post_meta( $post_id, 'acfcs_search_state', $value[ 'stateCode' ] ); 75 } 76 if ( ! empty( $value[ 'cityName' ] ) ) { 77 update_post_meta( $post_id, 'acfcs_search_city', $value[ 'cityName' ] ); 78 } 79 } elseif ( $post_id ) { 80 // remove meta 81 delete_post_meta( $post_id, 'acfcs_search_country' ); 82 delete_post_meta( $post_id, 'acfcs_search_state' ); 83 delete_post_meta( $post_id, 'acfcs_search_city' ); 84 } 85 } 86 add_action( 'acfcs_store_meta', 'acfcs_save_single_meta', 10, 2 ); 23 add_action( 'acfcs_after_success_import', 'acfcs_reimport_cities' ); 24 25 26 /** 27 * Save location as single meta values 28 * 29 * @param $value 30 * @param $post_id 31 * 32 * @return void 33 */ 34 function acfcs_save_single_meta( $value, $post_id ) { 35 if ( isset( $_POST[ 'store_meta' ] ) && 1 == $_POST[ 'store_meta' ] ) { 36 if ( ! empty( $value[ 'countryCode' ] ) ) { 37 update_post_meta( $post_id, 'acfcs_search_country', $value[ 'countryCode' ] ); 38 } 39 if ( ! empty( $value[ 'stateCode' ] ) ) { 40 update_post_meta( $post_id, 'acfcs_search_state', $value[ 'stateCode' ] ); 41 } 42 if ( ! empty( $value[ 'cityName' ] ) ) { 43 update_post_meta( $post_id, 'acfcs_search_city', $value[ 'cityName' ] ); 44 } 45 } elseif ( $post_id ) { 46 // remove meta 47 delete_post_meta( $post_id, 'acfcs_search_country' ); 48 delete_post_meta( $post_id, 'acfcs_search_state' ); 49 delete_post_meta( $post_id, 'acfcs_search_city' ); 50 } 51 } 52 add_action( 'acfcs_store_meta', 'acfcs_save_single_meta', 10, 2 ); -
acf-city-selector/trunk/inc/acfcs-ajax.php
r2841215 r3133754 27 27 } 28 28 } 29 29 30 30 if ( ! isset( $field[ 'show_labels' ] ) && isset( $_POST[ 'show_labels' ] ) ) { 31 $field[ 'show_labels' ] = ( '1' == sanitize_text_field( $_POST[ 'show_labels' ] ) ) ? true : false;32 }31 $field[ 'show_labels' ] = ( '1' == sanitize_text_field( $_POST[ 'show_labels' ] ) ) ? true : false; 32 } 33 33 34 34 if ( isset( $country_code ) ) { … … 80 80 } 81 81 } 82 82 83 83 if ( ! isset( $field[ 'show_labels' ] ) && isset( $_POST[ 'show_labels' ] ) ) { 84 $show_labels = sanitize_text_field( $_POST[ 'show_labels' ] );85 if ( '1' == $show_labels ) {86 $field[ 'show_labels' ] = true;87 } elseif ( '0' == $show_labels ) {88 $field[ 'show_labels' ] = false;89 }84 $show_labels = sanitize_text_field( $_POST[ 'show_labels' ] ); 85 if ( '1' == $show_labels ) { 86 $field[ 'show_labels' ] = true; 87 } elseif ( '0' == $show_labels ) { 88 $field[ 'show_labels' ] = false; 89 } 90 90 } 91 91 -
acf-city-selector/trunk/inc/acfcs-functions.php
r2841215 r3133754 18 18 */ 19 19 function acfcs_get_countries( $show_first = true, $field = false, $force = false ) { 20 $countries = array();20 $countries = []; 21 21 $select_country_label = apply_filters( 'acfcs_select_country_label', esc_html__( 'Select a country', 'acf-city-selector' ) ); 22 22 $show_labels = ( isset( $field[ 'show_labels' ] ) ) ? $field[ 'show_labels' ] : true; 23 23 24 24 if ( $show_first ) { 25 25 $countries[ '' ] = '-'; … … 28 28 } 29 29 } 30 31 global $wpdb;32 $table = $wpdb->prefix . 'cities';33 $results = $wpdb->get_results( "SELECT * FROM $table GROUP BY country ORDER BY country ASC" );30 31 global $wpdb; 32 $table = $wpdb->prefix . 'cities'; 33 $results = $wpdb->get_results( "SELECT * FROM $table GROUP BY country ORDER BY country ASC" ); 34 34 35 35 if ( ! empty( $results ) ) { 36 $country_results = array();36 $country_results = []; 37 37 foreach ( $results as $data ) { 38 38 if ( isset( $data->country_code ) && isset( $data->country ) ) { … … 59 59 $select_province_state_label = apply_filters( 'acfcs_select_province_state_label', esc_attr__( 'Select a province/state', 'acf-city-selector' ) ); 60 60 $show_labels = ( isset( $field[ 'show_labels' ] ) ) ? $field[ 'show_labels' ] : true; 61 $states = array();62 61 $states = []; 62 63 63 if ( $show_first ) { 64 64 if ( $show_labels ) { … … 70 70 71 71 if ( false != $country_code ) { 72 $transient = get_transient( 'acfcs_states_' . strtolower( $country_code ) ); 73 if ( false == $transient || is_array( $transient ) && empty( $transient ) ) { 74 $order = ' ORDER BY state_name ASC'; 75 if ( 'FR' == $country_code ) { 76 $order = " ORDER BY LENGTH(state_name), state_name"; 77 } 78 79 global $wpdb; 80 $table = $wpdb->prefix . 'cities'; 81 $sql = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s GROUP BY state_code" . $order, strtoupper( $country_code ) ); 82 $results = $wpdb->get_results( $sql ); 83 84 $state_results = array(); 85 foreach ( $results as $data ) { 86 $state_results[ strtoupper( $country_code ) . '-' . $data->state_code ] = esc_attr__( $data->state_name, 'acf-city-selector' ); 87 } 88 89 set_transient( 'acfcs_states_' . strtolower( $country_code ), $state_results, DAY_IN_SECONDS ); 90 91 $states = array_merge( $states, $state_results ); 92 93 } else { 94 $states = array_merge( $states, $transient ); 95 } 72 $order = ' ORDER BY state_name ASC'; 73 if ( 'FR' == $country_code ) { 74 $order = " ORDER BY LENGTH(state_name), state_name"; 75 } 76 77 global $wpdb; 78 $table = $wpdb->prefix . 'cities'; 79 $sql = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s GROUP BY state_code" . $order, strtoupper( $country_code ) ); 80 $state_results = []; 81 $results = $wpdb->get_results( $sql ); 82 83 foreach ( $results as $data ) { 84 $state_results[ strtoupper( $country_code ) . '-' . $data->state_code ] = esc_attr__( $data->state_name, 'acf-city-selector' ); 85 } 86 87 $states = array_merge( $states, $state_results ); 96 88 } 97 89 … … 110 102 */ 111 103 function acfcs_get_cities( $country_code = false, $state_code = false, $field = false ) { 112 $cities = array(); 113 $cities_transient = false; 104 $cities = []; 114 105 $select_city_label = apply_filters( 'acfcs_select_city_label', esc_attr__( 'Select a city', 'acf-city-selector' ) ); 115 $set_transient = false;116 106 $show_labels = ( isset( $field[ 'show_labels' ] ) ) ? $field[ 'show_labels' ] : true; 117 107 … … 122 112 } 123 113 124 if ( $country_code && ! $state_code ) { 125 $cities_transient = get_transient( 'acfcs_cities_' . strtolower( $country_code ) ); 126 } elseif ( $country_code && $state_code ) { 127 $cities_transient = get_transient( 'acfcs_cities_' . strtolower( $country_code ) . '-' . strtolower( $state_code ) ); 128 } 129 130 if ( false == $cities_transient || empty( $cities_transient ) ) { 131 $set_transient = true; 132 } else { 133 foreach ( $cities_transient as $data ) { 134 $city_array[ esc_attr__( $data, 'acf-city-selector' ) ] = esc_attr__( $data, 'acf-city-selector' ); 114 if ( $country_code ) { 115 global $wpdb; 116 $table = $wpdb->prefix . 'cities'; 117 $query = "SELECT * FROM $table"; 118 119 if ( $state_code ) { 120 if ( 3 < strlen( $state_code ) ) { 121 $state_code = substr( $state_code, 3 ); 122 } 123 $query = $wpdb->prepare( $query . " WHERE country_code = %s AND state_code = %s ORDER BY state_name, city_name ASC", $country_code, $state_code ); 124 } elseif ( $country_code ) { 125 $query = $wpdb->prepare( $query . " WHERE country_code = %s", $country_code ); 126 } 127 128 $city_results = []; 129 $results = $wpdb->get_results( $query ); 130 131 foreach ( $results as $data ) { 132 $city_results[] = [ 133 'city_name' => $data->city_name, 134 ]; 135 } 136 137 if ( ! empty( $city_results ) ) { 138 uasort( $city_results, 'acfcs_sort_array_with_quotes' ); 139 } 140 foreach ( $city_results as $data ) { 141 $city_array[ esc_attr__( $data[ 'city_name' ], 'acf-city-selector' ) ] = esc_attr__( $data[ 'city_name' ], 'acf-city-selector' ); 135 142 } 136 143 if ( isset( $city_array ) ) { … … 139 146 } 140 147 141 if ( $set_transient ) {142 if ( false !== $country_code ) {143 global $wpdb;144 $table = $wpdb->prefix . 'cities';145 $query = "SELECT * FROM $table";146 if ( $country_code && $state_code ) {147 if ( 3 < strlen( $state_code ) ) {148 $state_code = substr( $state_code, 3 );149 }150 $query = $wpdb->prepare( $query . " WHERE country_code = %s AND state_code = %s ORDER BY state_name, city_name ASC", $country_code, $state_code );151 } elseif ( $country_code ) {152 $query = $wpdb->prepare( $query . " WHERE country_code = %s", $country_code );153 }154 $city_results = array();155 $results = $wpdb->get_results( $query );156 foreach ( $results as $data ) {157 $city_results[] = [158 'city_name' => $data->city_name,159 ];160 }161 162 if ( ! empty( $city_results ) ) {163 uasort( $city_results, 'acfcs_sort_array_with_quotes' );164 }165 foreach ( $city_results as $data ) {166 $city_array[ esc_attr__( $data[ 'city_name' ], 'acf-city-selector' ) ] = esc_attr__( $data[ 'city_name' ], 'acf-city-selector' );167 }168 if ( isset( $city_array ) ) {169 $cities = array_merge( $cities, $city_array );170 }171 if ( ! $state_code ) {172 set_transient( 'acfcs_cities_' . strtolower( $country_code ), $city_array, DAY_IN_SECONDS );173 } elseif ( $state_code ) {174 set_transient( 'acfcs_cities_' . strtolower( $country_code ) . '-' . strtolower( $state_code ), $city_array, DAY_IN_SECONDS );175 }176 }177 }178 179 148 return $cities; 180 149 } … … 190 159 function acfcs_get_country_name( $country_code = false ) { 191 160 if ( false != $country_code ) { 192 global $wpdb;193 $table = $wpdb->prefix . 'cities';194 $query = $wpdb->prepare( "SELECT country FROM $table WHERE country_code = %s", $country_code );195 $country = $wpdb->get_row( $query );161 global $wpdb; 162 $table = $wpdb->prefix . 'cities'; 163 $query = $wpdb->prepare( "SELECT country FROM $table WHERE country_code = %s", $country_code ); 164 $country = $wpdb->get_row( $query ); 196 165 197 166 if ( isset( $country->country ) ) { … … 207 176 return $country_code; 208 177 } 209 210 211 /**178 179 180 /** 212 181 * Checks if there are any cities in the database (for page availability) 213 *214 * @param $country_code215 *216 * @return bool217 */182 * 183 * @param $country_code 184 * 185 * @return bool 186 */ 218 187 function acfcs_has_cities( $country_code = false ) { 219 188 global $wpdb; 220 $table = $wpdb->prefix . 'cities'; 221 $query = "SELECT * FROM $table LIMIT 1"; 222 if ( $country_code ) { 223 $query = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s LIMIT 1", $country_code ); 224 } 189 $table = $wpdb->prefix . 'cities'; 190 $query = "SELECT * FROM $table LIMIT 1"; 191 192 if ( $country_code ) { 193 $query = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s LIMIT 1", $country_code ); 194 } 225 195 226 196 $results = $wpdb->get_results( $query ); … … 240 210 */ 241 211 function acfcs_check_if_files() { 242 $actual_files = [];243 $target_dir = acfcs_upload_folder();244 245 if ( is_dir( $target_dir ) ) {212 $actual_files = []; 213 $target_dir = acfcs_upload_folder(); 214 215 if ( is_dir( $target_dir ) ) { 246 216 $file_index = scandir( $target_dir ); 247 $ excluded_files = [217 $default_excluded_files = [ 248 218 '.', 249 219 '..', … … 251 221 'debug.json', 252 222 ]; 253 223 $excluded_files = apply_filters( 'acfcs_exclude_files', $default_excluded_files ); 224 254 225 if ( is_array( $file_index ) ) { 255 226 foreach ( $file_index as $file ) { … … 281 252 function acfcs_csv_to_array( $file_name, $upload_folder = '', $delimiter = ';', $verify = false, $max_lines = false ) { 282 253 $upload_folder = ( ! empty( $upload_folder ) ) ? $upload_folder : acfcs_upload_folder( '/' ); 283 $csv_array = array();254 $csv_array = []; 284 255 $empty_array = false; 285 256 $errors = ACF_City_Selector::acfcs_errors(); 286 $new_array = array();287 257 $new_array = []; 258 288 259 if ( ( file_exists( $upload_folder . $file_name ) && $handle = fopen( $upload_folder . $file_name, "r" ) ) !== false ) { 289 260 $column_benchmark = 5; … … 313 284 if ( $errors->has_errors() ) { 314 285 $empty_array = true; 315 $new_array = array();286 $new_array = []; 316 287 } else { 317 288 // create a new array for each row 318 $new_line = array();289 $new_line = []; 319 290 foreach ( $csv_line as $item ) { 320 291 $new_line[] = $item; … … 418 389 $url = ACFCS_WEBSITE_URL . '/wp-json/countries/v1/' . $endpoint; 419 390 $request = new WP_Http; 420 $result = $request->request( $url, array( 'method' => 'GET' ));391 $result = $request->request( $url, [ 'method' => 'GET' ] ); 421 392 if ( 200 == $result[ 'response' ][ 'code' ] ) { 422 393 $response = json_decode( $result[ 'body' ] ); … … 425 396 } 426 397 427 return array();398 return []; 428 399 } 429 400 … … 436 407 function acfcs_get_countries_info() { 437 408 global $wpdb; 438 $table = $wpdb->prefix . 'cities';439 $results = $wpdb->get_results( "SELECT country_code FROM $table GROUP BY country_code ORDER BY country_code ASC" );440 441 $acfcs_info = array();409 $acfcs_info = []; 410 $table = $wpdb->prefix . 'cities'; 411 $results = $wpdb->get_results( "SELECT country_code FROM $table GROUP BY country_code ORDER BY country_code ASC" ); 412 442 413 foreach ( $results as $data ) { 443 $country_code = $data->country_code;444 $query = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s ORDER BY country_code ASC", $country_code );445 $results = $wpdb->get_results( $query );414 $country_code = $data->country_code; 415 $query = $wpdb->prepare( "SELECT * FROM $table WHERE country_code = %s ORDER BY country_code ASC", $country_code ); 416 $results = $wpdb->get_results( $query ); 446 417 447 418 $acfcs_info[ $country_code ] = [ … … 478 449 function acfcs_custom_sort_with_quotes( $city ) { 479 450 // strip quote marks 480 if ( strpos( $city, "'s" ) !== false ) {481 $city = trim( $city, '\'s ' );482 $city = preg_replace( '/^\s*\'s \s+/i', '', $city );483 } elseif ( strpos( $city, "'t" ) !== false ) {484 $city = trim( $city, '\'t ' );485 $city = preg_replace( '/^\s*\'t \s+/i', '', $city );486 }451 if ( strpos( $city, "'s" ) !== false ) { 452 $city = trim( $city, '\'s ' ); 453 $city = preg_replace( '/^\s*\'s \s+/i', '', $city ); 454 } elseif ( strpos( $city, "'t" ) !== false ) { 455 $city = trim( $city, '\'t ' ); 456 $city = preg_replace( '/^\s*\'t \s+/i', '', $city ); 457 } 487 458 488 459 return $city; … … 578 549 return $dropdown; 579 550 } 580 581 582 function acfcs_render_hidden_field( $name, $value ) {583 if ( $name && $value ) {584 return sprintf( '<input type="hidden" name="%s" value="%s" />', $name, $value );585 }586 587 return false;551 552 553 function acfcs_render_hidden_field( $name, $value ) { 554 if ( $name && $value ) { 555 return sprintf( '<input type="hidden" name="%s" value="%s" />', $name, $value ); 556 } 557 558 return false; 588 559 } 589 560 … … 626 597 foreach ( $csv_array[ 'data' ] as $line ) { 627 598 $line_number++; 628 629 $city_row = array(599 600 $city_row = [ 630 601 'city_name' => $line[ 0 ], 631 602 'state_code' => $line[ 1 ], … … 633 604 'country_code' => $line[ 3 ], 634 605 'country' => $line[ 4 ], 635 );636 606 ]; 607 637 608 global $wpdb; 638 609 $wpdb->insert( $wpdb->prefix . 'cities', $city_row ); … … 661 632 foreach ( $verified_data as $line ) { 662 633 $line_number++; 663 664 $city_row = array(634 635 $city_row = [ 665 636 'city_name' => $line[ 0 ], 666 637 'state_code' => $line[ 1 ], … … 668 639 'country_code' => $line[ 3 ], 669 640 'country' => $line[ 4 ], 670 );671 641 ]; 642 672 643 $wpdb->insert( $wpdb->prefix . 'cities', $city_row ); 673 644 } … … 709 680 function acfcs_delete_country( $countries ) { 710 681 $country_names_and = false; 711 $sanitized_country_codes = array(); 682 $sanitized_country_codes = []; 683 712 684 foreach( $countries as $country_code ) { 713 $sanitized_country_code = sanitize_text_field( $country_code);685 $sanitized_country_code = sanitize_text_field( strtoupper( $country_code ) ); 714 686 $sanitized_country_codes[] = $sanitized_country_code; 715 687 $country_names[] = acfcs_get_country_name( $sanitized_country_code ); 716 688 } 689 717 690 if ( ! empty( $country_names ) ) { 718 691 $country_names_quotes = "'" . implode( "', '", $country_names ) . "'"; … … 725 698 726 699 if ( ! empty( $sanitized_country_codes ) ) { 700 if ( 1 === count( $sanitized_country_codes ) ) { 701 $country_string = strtoupper( $sanitized_country_codes[ 0 ] ); 702 } else { 703 $country_string = strtoupper( "'" . implode( "', '", $sanitized_country_codes ) . "'" ); 704 } 705 727 706 global $wpdb; 728 $table = $wpdb->prefix . 'cities'; 729 $country_string = strtoupper( "'" . implode( "', '", $sanitized_country_codes ) . "'" ); 730 $query = $wpdb->prepare( "DELETE FROM $table WHERE `country_code` IN (%s)", $country_string ); 731 $result = $wpdb->query( $query ); 707 $table = $wpdb->prefix . 'cities'; 708 $query = $wpdb->prepare( "DELETE FROM $table WHERE country_code IN (%s)", $country_string ); 709 $result = $wpdb->query( $query ); 732 710 733 711 if ( $result > 0 ) { 734 ACF_City_Selector::acfcs_errors()->add( 'success_country_remove', sprintf( esc_html__( 'You have successfully removed all entries for %s.', 'acf-city-selector' ), $country_names_and ) ); 735 foreach( $countries as $country_code ) { 736 do_action( 'acfcs_delete_transients', $country_code ); 737 } 712 ACF_City_Selector::acfcs_errors()->add( 'success_country_remove', sprintf( esc_html__( 'You have successfully removed all entries for %s.', 'acf-city-selector' ), $country_names_and ) ); 738 713 } 739 714 } … … 766 741 function acfcs_render_preview_results( $csv_data = [] ) { 767 742 $table = ''; 768 if ( ! empty( $csv_data ) ) {743 if ( ! empty( $csv_data ) ) { 769 744 $table_columns = [ 770 745 esc_html__( 'City', 'acf-city-selector' ), … … 793 768 $table = sprintf( '<table class="acfcs__table acfcs__table--preview-result scrollable">%s%s</table>', $table_headers, $table_body ); 794 769 } 795 796 return $table;770 771 return $table; 797 772 } 798 773 … … 807 782 function acfcs_get_states_optgroup() { 808 783 $results = acfcs_get_countries( false ); 809 $states = [];784 $states = []; 810 785 811 786 // if there is at least 1 country … … 820 795 // get states for these countries 821 796 if ( ! empty( $countries ) ) { 822 global $wpdb;823 $table= $wpdb->prefix . 'cities';824 825 foreach( $countries as $country ) {826 $states[] = array(797 global $wpdb; 798 $table = $wpdb->prefix . 'cities'; 799 800 foreach( $countries as $country ) { 801 $states[] = [ 827 802 'state' => 'open_optgroup', 828 803 'name' => esc_attr__( acfcs_get_country_name( $country[ 'code' ] ), 'acf-city-selector' ), 829 );830 804 ]; 805 831 806 $order = 'ORDER BY state_name ASC'; 832 807 if ( 'FR' == $country[ 'code' ] ) { … … 840 815 if ( count( $results ) > 0 ) { 841 816 foreach ( $results as $data ) { 842 $states[] = array(817 $states[] = [ 843 818 'state' => strtolower( $data->country_code ) . '-' . strtolower( $data->state_code ), 844 819 'name' => esc_attr__( $data->state_name, 'acf-city-selector' ), 845 );820 ]; 846 821 } 847 822 } 848 849 $states[] = array(823 824 $states[] = [ 850 825 'state' => 'close_optgroup', 851 826 'name' => '', 852 );853 } 854 } 855 } 856 857 return $states;827 ]; 828 } 829 } 830 } 831 832 return $states; 858 833 } 859 834 … … 868 843 function acfcs_get_searched_cities() { 869 844 global $wpdb; 845 $orderby = false; 846 $table = $wpdb->prefix . 'cities'; 870 847 $search_criteria_state = ( isset( $_POST[ 'acfcs_state' ] ) ) ? sanitize_text_field( $_POST[ 'acfcs_state' ] ) : false; 871 848 $search_criteria_country = ( isset( $_POST[ 'acfcs_country' ] ) ) ? sanitize_text_field( $_POST[ 'acfcs_country' ] ) : false; 872 $search_limit = false;873 849 $searched_orderby = ( ! empty( $_POST[ 'acfcs_orderby' ] ) ) ? sanitize_text_field( $_POST[ 'acfcs_orderby' ] ) : false; 874 850 $searched_term = ( ! empty( $_POST[ 'acfcs_search' ] ) ) ? sanitize_text_field( $_POST[ 'acfcs_search' ] ) : false; 875 851 $selected_limit = ( ! empty( $_POST[ 'acfcs_limit' ] ) ) ? (int) $_POST[ 'acfcs_limit' ] : 100; 876 $ where = array();877 852 $select = "SELECT * FROM $table WHERE"; 853 878 854 if ( false != $search_criteria_state ) { 879 $ where[] = "state_code = '" . substr( $search_criteria_state, 3, 3) . "' AND country_code = '" . substr( $search_criteria_state, 0, 2) . "'";855 $select .= " state_code = '" . strtoupper( substr( $search_criteria_state, 3, 3 ) ) . "' AND country_code = '" . strtoupper( substr( $search_criteria_state, 0, 2 ) ) . "'"; 880 856 } elseif ( false != $search_criteria_country ) { 881 $where[] = "country_code = '" . $search_criteria_country . "'"; 882 } 857 $select .= sprintf( " country_code = '%s'", $search_criteria_country ); 858 } 859 883 860 if ( false != $searched_term ) { 884 $search [] = 'city_name LIKE "%' . $searched_term . '%"';861 $search = ' AND city_name LIKE "%' . $searched_term . '%"'; 885 862 886 863 if ( $search_criteria_country || $search_criteria_state ) { 887 $where[] = '(' . implode( ' OR ', $search ) . ')'; 888 } else { 889 $where[] = implode( ' OR ', $search ); 890 } 891 892 } 864 $select .= $search; 865 } 866 } 867 868 if ( 'state' == $searched_orderby ) { 869 $select .= ' ORDER BY state_name ASC, city_name ASC'; 870 } else { 871 $select .= ' ORDER BY city_name ASC, state_name ASC'; 872 } 873 893 874 if ( 0 != $selected_limit ) { 894 $search_limit = "LIMIT " . $selected_limit; 895 } 896 897 if ( ! empty( $where ) ) { 898 $where = "WHERE " . implode( ' AND ', $where ); 899 } else { 900 $where = false; 901 } 902 903 if ( 'state' == $searched_orderby ) { 904 $orderby = 'ORDER BY state_name ASC, city_name ASC'; 905 } else { 906 $orderby = 'ORDER BY city_name ASC, state_name ASC'; 907 } 908 909 $table = $wpdb->prefix . 'cities'; 910 $query = $wpdb->prepare( "SELECT * FROM $table %s %s %s", $where, $orderby, $search_limit ); 911 $cities = $wpdb->get_results( $query ); 875 $select .= " LIMIT " . $selected_limit; 876 } 877 878 $cities = $wpdb->get_results( $select ); 912 879 913 880 return $cities; … … 923 890 */ 924 891 function acfcs_get_js_translations() { 925 $translations = array(892 $translations = [ 926 893 'no_countries' => esc_attr__( 'No countries', 'acf-city-selector' ), 927 894 'select_city' => esc_attr( apply_filters( 'acfcs_select_city_label', __( 'Select a city', 'acf-city-selector' ) ) ), … … 930 897 'select_state' => esc_attr( apply_filters( 'acfcs_select_province_state_label', __( 'Select a province/state', 'acf-city-selector' ) ) ), 931 898 'select_state_first' => esc_attr( apply_filters( 'acfcs_select_state_first', __( 'No results (yet), first select a state', 'acf-city-selector' ) ) ), 932 );933 899 ]; 900 934 901 return $translations; 935 902 } -
acf-city-selector/trunk/inc/form-handling.php
r2841215 r3133754 119 119 } 120 120 } 121 $cities = implode( ', ', $cities );122 $row_ids = implode( ',', $ids );123 $table = $wpdb->prefix . 'cities';124 $query = $wpdb->prepare( "DELETE FROM {$table} WHERE id IN (%s)", $row_ids );125 $amount = $wpdb->query( $query );121 $cities = implode( ', ', $cities ); 122 $row_ids = implode( ',', $ids ); 123 $table = $wpdb->prefix . 'cities'; 124 $query = $wpdb->prepare( "DELETE FROM {$table} WHERE id IN (%s)", $row_ids ); 125 $amount = $wpdb->query( $query ); 126 126 127 127 if ( $amount > 0 ) { … … 133 133 } 134 134 add_action( 'admin_init', 'acfcs_delete_rows' ); 135 136 137 /**138 * Form to handle deleting of all transients139 */140 function acfcs_delete_all_transients() {141 if ( isset( $_POST[ 'acfcs_delete_transients' ] ) ) {142 if ( ! wp_verify_nonce( $_POST[ 'acfcs_delete_transients' ], 'acfcs-delete-transients-nonce' ) ) {143 ACF_City_Selector::acfcs_errors()->add( 'error_no_nonce_match', esc_html__( 'Something went wrong, please try again.', 'acf-city-selector' ) );144 } else {145 do_action( 'acfcs_delete_transients' );146 ACF_City_Selector::acfcs_errors()->add( 'success_transients_delete', esc_html__( 'You have successfully deleted all transients.', 'acf-city-selector' ) );147 }148 }149 }150 add_action( 'admin_init', 'acfcs_delete_all_transients' );151 135 152 136 … … 201 185 if ( isset( $_POST[ 'acfcs_import_be' ] ) && 1 == $_POST[ 'acfcs_import_be' ] ) { 202 186 acfcs_import_data( 'be.csv', ACFCS_PLUGIN_PATH . 'import/' ); 203 do_action( 'acfcs_delete_transients', 'be' );204 187 } 205 188 if ( isset( $_POST[ 'acfcs_import_nl' ] ) && 1 == $_POST[ 'acfcs_import_nl' ] ) { 206 189 acfcs_import_data( 'nl.csv', ACFCS_PLUGIN_PATH . 'import/' ); 207 do_action( 'acfcs_delete_transients', 'nl' );208 190 } 209 191 do_action( 'acfcs_after_success_import' ); -
acf-city-selector/trunk/languages/acf-city-selector-de_DE.po
r2841217 r3133754 3 3 "Project-Id-Version: ACF City Selector\n" 4 4 "POT-Creation-Date: 2022-12-29 19:50+0100\n" 5 "PO-Revision-Date: 202 2-12-29 19:50+0100\n"5 "PO-Revision-Date: 2024-08-08 23:57+0200\n" 6 6 "Last-Translator: Beee\n" 7 7 "Language-Team: \n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 2.4.3\n" 12 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 "X-Generator: Poedit 3.4.4\n" 13 14 "X-Poedit-Basepath: ..\n" 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n"15 15 "X-Poedit-KeywordsList: __;_e;_n;_n:1,2;_n_noop;_nx_noop;esc_html__;" 16 16 "esc_html_e;esc_attr;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n" … … 25 25 "countries to get the correct city names." 26 26 msgstr "" 27 "Mehrere %s hatten defekte ASCII-Zeichen. Du musst diese Länder neu " 28 "importieren um die korrekten Städtenamen zu erhalten." 27 29 28 30 #: ACF_City_Selector.php:169 29 #, fuzzy, php-format 30 #| msgid "# cities" 31 #, php-format 31 32 msgid "cities in %s" 32 msgstr " # Städte"33 msgstr "Städte in %s" 33 34 34 35 #: ACF_City_Selector.php:169 35 #, fuzzy36 #| msgid "Import all cities in Holland/The Netherlands"37 36 msgid "cities in Belgium and Netherlands" 38 msgstr " Importiere alleStädte in Holland/Niederlande"37 msgstr "Städte in Holland/Niederlande" 39 38 40 39 #: ACF_City_Selector.php:261 ACF_City_Selector.php:278 … … 75 74 76 75 #: ACF_City_Selector.php:334 77 #, fuzzy, php-format 78 #| msgid "" 79 #| "<b>Warning</b>: The \"%s\" plugin will probably not work properly " 80 #| "(anymore) with %s v4.x. Please upgrade to PRO." 76 #, php-format 81 77 msgid "" 82 78 "%s: The \"%s\" plugin will probably not work properly (anymore) with %s v4." 83 79 "x. Please upgrade to PRO." 84 80 msgstr "" 85 " <b>Warnung</b>: Das Plugin \"%s\" funktioniert warscheinlich leider nicht"86 " (mehr)ordnungsgemäß mit %s v4.x. Bitte aktualisiere auf die PRO Version."81 "%s: Das Plugin \"%s\" funktioniert wahrscheinlich leider nicht (mehr) " 82 "ordnungsgemäß mit %s v4.x. Bitte aktualisiere auf die PRO Version." 87 83 88 84 #: ACF_City_Selector.php:335 … … 174 170 #: admin/acf-city-selector-v5.php:84 175 171 msgid "Store location as single meta values" 176 msgstr " "172 msgstr "Standort als einzelnen Meta Wert speichern" 177 173 178 174 #: admin/acf-city-selector-v5.php:85 179 175 msgid "Store meta" 180 msgstr " "176 msgstr "Meta speichern" 181 177 182 178 #: admin/acf-city-selector-v5.php:352 … … 292 288 #: admin/acfcs-countries.php:149 293 289 msgid "request" 294 msgstr " "290 msgstr "anfragen" 295 291 296 292 #: admin/acfcs-countries.php:151 … … 310 306 "Max lines has no effect when verifying. The entire file will be checked." 311 307 msgstr "" 308 "Max lines hat keinen Effekt bei der Verifizierung. Die gesamte Datei wird " 309 "geprüft werden." 312 310 313 311 #: admin/acfcs-dashboard.php:43 … … 475 473 #: admin/acfcs-info.php:238 476 474 msgid "left-click to open, right-click to save" 477 msgstr " "475 msgstr "Linksklick zum öffnen, Rechtsklick zum speichern" 478 476 479 477 #: admin/acfcs-preview-form.php:6 … … 564 562 msgid "You haven't imported any cities yet. Import any files from your %s." 565 563 msgstr "" 564 "Du hast noch keine Städte importiert. Importiere Dateien von deiner %s." 566 565 567 566 #: admin/acfcs-search.php:68 admin/acfcs-search.php:71 … … 736 735 #, php-format 737 736 msgid "%s for the plugin's official website." 738 msgstr " "737 msgstr "%s für die offizielle Plugin Webseite." 739 738 740 739 #: admin/admin-right.php:13 741 740 msgid "Click here" 742 msgstr " "741 msgstr "Klicke hier" 743 742 744 743 #: admin/admin-right.php:17 … … 749 748 #, php-format 750 749 msgid "If you need support for this plugin, please turn to %s." 751 msgstr " "750 msgstr "Wende dich an %s wenn du Hilfe für diesem Plugin benötigst." 752 751 753 752 #: admin/admin-right.php:23 754 753 msgid "Requests" 755 msgstr " "754 msgstr "Anfragen" 756 755 757 756 #: admin/admin-right.php:25 758 #, fuzzy759 #| msgid ""760 #| "If you need support for this plugin or if you have some good suggestions "761 #| "for improvements and/or new features, please turn to %s."762 757 msgid "" 763 758 "If you have some good suggestions for improvements and/or new features, " … … 781 776 #: admin/raw-input-form.php:8 782 777 msgid "Raw CSV import" 783 msgstr " "778 msgstr "Roher CSV Import" 784 779 785 780 #: admin/raw-input-form.php:12 … … 1010 1005 "If you need more countries, you can get them on the official website: %s." 1011 1006 msgstr "" 1007 "Wenn du weitere Länder benötigst, kannst du diese auf der offiziellen " 1008 "Webseite herunterladen: %s." 1012 1009 1013 1010 #: inc/acfcs-help-tabs.php:101 … … 1017 1014 #: inc/acfcs-i18n.php:16 1018 1015 msgid "Andorra" 1019 msgstr " "1016 msgstr "Andorra" 1020 1017 1021 1018 #: inc/acfcs-i18n.php:17 1022 1019 msgid "Aruba" 1023 msgstr " "1020 msgstr "Aruba" 1024 1021 1025 1022 #: inc/acfcs-i18n.php:18 … … 1041 1038 #: inc/acfcs-i18n.php:22 1042 1039 msgid "China" 1043 msgstr " "1040 msgstr "China" 1044 1041 1045 1042 #: inc/acfcs-i18n.php:23 1046 1043 msgid "Curaçao" 1047 msgstr " "1044 msgstr "Curaçao" 1048 1045 1049 1046 #: inc/acfcs-i18n.php:24 … … 1061 1058 #: inc/acfcs-i18n.php:27 1062 1059 msgid "Grenada" 1063 msgstr " "1060 msgstr "Genada" 1064 1061 1065 1062 #: inc/acfcs-i18n.php:28 … … 1073 1070 #: inc/acfcs-i18n.php:30 1074 1071 msgid "Mexico" 1075 msgstr " "1072 msgstr "Mexiko" 1076 1073 1077 1074 #: inc/acfcs-i18n.php:31 … … 1085 1082 #: inc/acfcs-i18n.php:33 1086 1083 msgid "Portugal" 1087 msgstr " "1084 msgstr "Portugal" 1088 1085 1089 1086 #: inc/acfcs-i18n.php:34 … … 1105 1102 #: inc/acfcs-i18n.php:38 1106 1103 msgid "Uruguay" 1107 msgstr " "1104 msgstr "Uruguay" 1108 1105 1109 1106 #: inc/acfcs-i18n.php:39 … … 1233 1230 #, php-format 1234 1231 #~ msgid "" 1235 #~ "<strong>!!!</strong> The default delimiters has been changed from "1236 #~ " ','(comma) to ';' (semi-colon). Read more about it <a href=\"%s\">%s</a>."1232 #~ "<strong>!!!</strong> The default delimiters has been changed from ',' " 1233 #~ "(comma) to ';' (semi-colon). Read more about it <a href=\"%s\">%s</a>." 1237 1234 #~ msgstr "" 1238 1235 #~ "<strong>!!!</strong> Die Standardtrennzeichen wurden von ',' (Komma) in " … … 1335 1332 #~ msgstr "" 1336 1333 #~ "Vielen Dank für die Installation des 'City Selector' Plugins. Ich hoffe " 1337 #~ "es gefällt dir. Bitte denke über <a href=\"%s\" rel=\"noopener\" target="1338 #~ " \"_blank\">eine Spende nach</a> wenn du das Plugin gefällt, damit ich das"1339 #~ " Plugin noch besser machen kann."1334 #~ "es gefällt dir. Bitte denke über <a href=\"%s\" rel=\"noopener\" " 1335 #~ "target=\"_blank\">eine Spende nach</a> wenn du das Plugin gefällt, damit " 1336 #~ "ich das Plugin noch besser machen kann." 1340 1337 1341 1338 #~ msgid "Admin email" -
acf-city-selector/trunk/languages/acf-city-selector-nl_NL.po
r2841217 r3133754 2 2 msgstr "" 3 3 "Project-Id-Version: ACF City Selector 1.0\n" 4 "POT-Creation-Date: 202 2-12-29 19:49+0100\n"5 "PO-Revision-Date: 202 2-12-29 19:50+0100\n"4 "POT-Creation-Date: 2024-07-29 20:47+0200\n" 5 "PO-Revision-Date: 2024-07-29 20:47+0200\n" 6 6 "Last-Translator: Beee\n" 7 7 "Language-Team: \n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 2.4.3\n" 12 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 "X-Generator: Poedit 3.4.4\n" 13 14 "X-Poedit-Basepath: ..\n" 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n"15 15 "X-Poedit-KeywordsList: __;_e;_x;_ex;_n;_nx;_n:1,2;_n_noop;_nx_noop;" 16 16 "esc_html__;esc_html_e;esc_html_x;esc_attr__;esc_attr_e;esc_attr_x\n" … … 18 18 "X-Poedit-SearchPathExcluded-0: languages\n" 19 19 20 #: ACF_City_Selector.php:16 920 #: ACF_City_Selector.php:167 21 21 #, php-format 22 22 msgid "" … … 27 27 "importeren om de correcte namen te krijgen." 28 28 29 #: ACF_City_Selector.php:16 929 #: ACF_City_Selector.php:167 30 30 #, php-format 31 31 msgid "cities in %s" 32 32 msgstr "steden in %s" 33 33 34 #: ACF_City_Selector.php:16 934 #: ACF_City_Selector.php:167 35 35 msgid "cities in Belgium and Netherlands" 36 36 msgstr "steden in België en Nederland" 37 37 38 #: ACF_City_Selector.php:2 61 ACF_City_Selector.php:27839 #: ACF_City_Selector.php:38 638 #: ACF_City_Selector.php:259 ACF_City_Selector.php:276 39 #: ACF_City_Selector.php:384 40 40 msgid "Settings" 41 41 msgstr "Instellingen" 42 42 43 #: ACF_City_Selector.php:27 743 #: ACF_City_Selector.php:275 44 44 msgid "Dashboard" 45 45 msgstr "Dashboard" 46 46 47 #: ACF_City_Selector.php:2 81 ACF_City_Selector.php:38847 #: ACF_City_Selector.php:279 ACF_City_Selector.php:386 48 48 #: admin/acfcs-search.php:148 49 49 msgid "Search" 50 50 msgstr "Zoeken" 51 51 52 #: ACF_City_Selector.php:28 452 #: ACF_City_Selector.php:282 53 53 msgid "Preview" 54 54 msgstr "Preview" 55 55 56 #: ACF_City_Selector.php:28 7 ACF_City_Selector.php:389admin/acfcs-info.php:2656 #: ACF_City_Selector.php:285 ACF_City_Selector.php:387 admin/acfcs-info.php:26 57 57 msgid "Info" 58 58 msgstr "Informatie" 59 59 60 #: ACF_City_Selector.php:2 9060 #: ACF_City_Selector.php:288 61 61 msgid "Get more countries" 62 62 msgstr "Meer landen" 63 63 64 #: ACF_City_Selector.php:31 264 #: ACF_City_Selector.php:310 65 65 #, php-format 66 66 msgid "" … … 71 71 "werkt \"%s\" niet. Activeer hem <a href=\"%s\">hier</a>." 72 72 73 #: ACF_City_Selector.php:33 473 #: ACF_City_Selector.php:332 74 74 #, php-format 75 75 msgid "" … … 80 80 "upgrade naar PRO." 81 81 82 #: ACF_City_Selector.php:33 582 #: ACF_City_Selector.php:333 83 83 msgid "Warning" 84 84 msgstr "Waarschuwing" 85 85 86 #: ACF_City_Selector.php:38 5admin/acfcs-preview.php:3686 #: ACF_City_Selector.php:383 admin/acfcs-preview.php:36 87 87 msgid "Preview data" 88 88 msgstr "Data bekijken" 89 89 90 #: ACF_City_Selector.php:38 7admin/acfcs-countries.php:5090 #: ACF_City_Selector.php:385 admin/acfcs-countries.php:50 91 91 msgid "Get countries" 92 92 msgstr "Meer landen" 93 93 94 #: admin/acf-city-selector-v4.php: 29admin/acf-city-selector-v5.php:3494 #: admin/acf-city-selector-v4.php:31 admin/acf-city-selector-v5.php:34 95 95 msgid "Choice" 96 96 msgstr "Keuze" 97 97 98 #: admin/acf-city-selector-v4.php:6 4admin/acf-city-selector-v5.php:10298 #: admin/acf-city-selector-v4.php:68 admin/acf-city-selector-v5.php:102 99 99 msgid "All fields [default]" 100 100 msgstr "Alle velden [standaard]" 101 101 102 #: admin/acf-city-selector-v4.php:6 5admin/acf-city-selector-v5.php:103102 #: admin/acf-city-selector-v4.php:69 admin/acf-city-selector-v5.php:103 103 103 msgid "Country only" 104 104 msgstr "Alleen land" 105 105 106 #: admin/acf-city-selector-v4.php: 66admin/acf-city-selector-v5.php:104106 #: admin/acf-city-selector-v4.php:70 admin/acf-city-selector-v5.php:104 107 107 msgid "Country + State/province" 108 108 msgstr "Land + Staat/Provincies" 109 109 110 #: admin/acf-city-selector-v4.php: 67admin/acf-city-selector-v5.php:105110 #: admin/acf-city-selector-v4.php:71 admin/acf-city-selector-v5.php:105 111 111 msgid "Country + City" 112 112 msgstr "Land + Stad" 113 113 114 #: admin/acf-city-selector-v4.php: 68admin/acf-city-selector-v5.php:106114 #: admin/acf-city-selector-v4.php:72 admin/acf-city-selector-v5.php:106 115 115 msgid "State/province + City" 116 116 msgstr "Staat/Provincie + Stad" 117 117 118 #: admin/acf-city-selector-v4.php:7 2admin/acf-city-selector-v5.php:59118 #: admin/acf-city-selector-v4.php:76 admin/acf-city-selector-v5.php:59 119 119 #: admin/acfcs-info.php:170 120 120 msgid "Yes" 121 121 msgstr "Ja" 122 122 123 #: admin/acf-city-selector-v4.php:7 3admin/acf-city-selector-v5.php:60123 #: admin/acf-city-selector-v4.php:77 admin/acf-city-selector-v5.php:60 124 124 #: admin/acfcs-info.php:170 125 125 msgid "No" 126 126 msgstr "Nee" 127 127 128 #: admin/acf-city-selector-v4.php:8 0admin/acf-city-selector-v5.php:65128 #: admin/acf-city-selector-v4.php:84 admin/acf-city-selector-v5.php:65 129 129 msgid "Show labels" 130 130 msgstr "Toon labels" 131 131 132 #: admin/acf-city-selector-v4.php:8 1admin/acf-city-selector-v5.php:64132 #: admin/acf-city-selector-v4.php:85 admin/acf-city-selector-v5.php:64 133 133 msgid "Show field labels above the dropdown menus" 134 134 msgstr "Labels tonen boven de dropdown menu’s" 135 135 136 #: admin/acf-city-selector-v4.php: 97admin/acf-city-selector-v5.php:96136 #: admin/acf-city-selector-v4.php:101 admin/acf-city-selector-v5.php:96 137 137 msgid "Default country" 138 138 msgstr "Default land" 139 139 140 #: admin/acf-city-selector-v4.php: 98admin/acf-city-selector-v5.php:95140 #: admin/acf-city-selector-v4.php:102 admin/acf-city-selector-v5.php:95 141 141 msgid "Select a default country for a new field" 142 142 msgstr "Selecteer een standaard land voor een nieuw veld" 143 143 144 #: admin/acf-city-selector-v4.php:11 4admin/acf-city-selector-v5.php:111144 #: admin/acf-city-selector-v4.php:118 admin/acf-city-selector-v5.php:111 145 145 msgid "Fields to use" 146 146 msgstr "Velden om te gebruiken" 147 147 148 #: admin/acf-city-selector-v4.php:11 5admin/acf-city-selector-v5.php:110148 #: admin/acf-city-selector-v4.php:119 admin/acf-city-selector-v5.php:110 149 149 msgid "Select which fields are used" 150 150 msgstr "Kies welke velden gebruikt worden" 151 151 152 #: admin/acf-city-selector-v4.php:1 78admin/acf-city-selector-v5.php:160152 #: admin/acf-city-selector-v4.php:184 admin/acf-city-selector-v5.php:160 153 153 msgid "" 154 154 "You haven't set a default country, so NO provinces/states and cities will be " … … 233 233 234 234 #: admin/acfcs-countries.php:66 admin/acfcs-search.php:172 235 #: inc/acfcs-functions.php:7 74inc/acfcs-help-tabs.php:46235 #: inc/acfcs-functions.php:749 inc/acfcs-help-tabs.php:46 236 236 msgid "Country" 237 237 msgstr "Land" … … 558 558 559 559 #: admin/acfcs-search.php:68 admin/acfcs-search.php:71 560 #: inc/acfcs-functions.php:21 inc/acfcs-functions.php: 506561 #: inc/acfcs-functions.php: 928560 #: inc/acfcs-functions.php:21 inc/acfcs-functions.php:477 561 #: inc/acfcs-functions.php:895 562 562 msgid "Select a country" 563 563 msgstr "Selecteer een land" … … 568 568 569 569 #: admin/acfcs-search.php:89 admin/acfcs-search.php:93 570 #: inc/acfcs-functions.php:59 inc/acfcs-functions.php: 513571 #: inc/acfcs-functions.php: 930570 #: inc/acfcs-functions.php:59 inc/acfcs-functions.php:484 571 #: inc/acfcs-functions.php:897 572 572 msgid "Select a province/state" 573 573 msgstr "Selecteer een provincie/staat" … … 590 590 591 591 #: admin/acfcs-search.php:136 admin/acfcs-search.php:170 592 #: inc/acfcs-functions.php:7 70inc/acfcs-help-tabs.php:26592 #: inc/acfcs-functions.php:745 inc/acfcs-help-tabs.php:26 593 593 msgid "City" 594 594 msgstr "Stad" 595 595 596 596 #: admin/acfcs-search.php:137 admin/acfcs-search.php:171 597 #: inc/acfcs-functions.php:7 72inc/acfcs-help-tabs.php:36597 #: inc/acfcs-functions.php:747 inc/acfcs-help-tabs.php:36 598 598 msgid "State" 599 599 msgstr "Staat/provincie" … … 658 658 msgstr "Verwijder geselecteerde landen" 659 659 660 #: admin/acfcs-settings.php:64 admin/acfcs-settings.php:66 661 msgid "Delete transients" 662 msgstr "Verwijder transients" 663 664 #: admin/acfcs-settings.php:65 665 msgid "" 666 "If you're seeing unexpected results in your dropdowns, try clearing all " 667 "transients with this option." 668 msgstr "" 669 "Als je onverwachte resultaten zien in je dropdowns, probeer dan de " 670 "transients te verwijderen met deze optie." 671 672 #: admin/acfcs-settings.php:73 660 #: admin/acfcs-settings.php:64 673 661 msgid "Clear the database" 674 662 msgstr "Maak de database leeg" 675 663 676 #: admin/acfcs-settings.php: 74664 #: admin/acfcs-settings.php:65 677 665 msgid "" 678 666 "By selecting this option, you will remove all cities, which are present in " … … 684 672 "wilt." 685 673 686 #: admin/acfcs-settings.php: 75674 #: admin/acfcs-settings.php:66 687 675 msgid "Delete everything" 688 676 msgstr "Verwijder alles" 689 677 690 #: admin/acfcs-settings.php: 82678 #: admin/acfcs-settings.php:73 691 679 msgid "Delete data" 692 680 msgstr "Verwijder data" 693 681 694 #: admin/acfcs-settings.php: 83682 #: admin/acfcs-settings.php:74 695 683 msgid "" 696 684 "When the plugin is deleted, all cities are not automatically deleted. Select " … … 701 689 "als de plugin wordt verwijderd." 702 690 703 #: admin/acfcs-settings.php: 88 admin/acfcs-settings.php:89691 #: admin/acfcs-settings.php:79 admin/acfcs-settings.php:80 704 692 msgid "Remove cities table on plugin deletion" 705 693 msgstr "Verwijder steden bij verwijderen plugin" 706 694 707 #: admin/acfcs-settings.php: 93695 #: admin/acfcs-settings.php:84 708 696 msgid "Save settings" 709 697 msgstr "Instellingen opslaan" … … 794 782 msgstr "" 795 783 796 #: inc/acfcs-functions.php:1 14 inc/acfcs-functions.php:504797 #: inc/acfcs-functions.php: 927784 #: inc/acfcs-functions.php:105 inc/acfcs-functions.php:475 785 #: inc/acfcs-functions.php:894 798 786 msgid "Select a city" 799 787 msgstr "Selecteer een stad" 800 788 801 #: inc/acfcs-functions.php: 300 inc/acfcs-functions.php:305789 #: inc/acfcs-functions.php:271 inc/acfcs-functions.php:276 802 790 msgid "Since your file is not accurate anymore, the file is deleted." 803 791 msgstr "Aangezien je bestand fouten bevat, is deze verwijderd." 804 792 805 #: inc/acfcs-functions.php: 301793 #: inc/acfcs-functions.php:272 806 794 #, php-format 807 795 msgid "There are too few columns on line %d. %s" 808 796 msgstr "Er zijn te weinig kolommen op regel %d. %s" 809 797 810 #: inc/acfcs-functions.php: 309798 #: inc/acfcs-functions.php:280 811 799 #, php-format 812 800 msgid "There are too many columns on line %d. %s" 813 801 msgstr "Er zijn te veel kolommen op regel %d. %s" 814 802 815 #: inc/acfcs-functions.php:3 80803 #: inc/acfcs-functions.php:351 816 804 #, php-format 817 805 msgid "There are too few columns on line %d." 818 806 msgstr "Er zijn te weinig kolommen op regel %d." 819 807 820 #: inc/acfcs-functions.php:3 85808 #: inc/acfcs-functions.php:356 821 809 #, php-format 822 810 msgid "There are too many columns on line %d." 823 811 msgstr "Er zijn te veel kolommen op regel %d." 824 812 825 #: inc/acfcs-functions.php:3 96813 #: inc/acfcs-functions.php:367 826 814 #, php-format 827 815 msgid "The length of the country abbreviation on line %d is incorrect." 828 816 msgstr "De lengte van de land afkorting op regel %d is incorrect." 829 817 830 #: inc/acfcs-functions.php: 601818 #: inc/acfcs-functions.php:572 831 819 #, php-format 832 820 msgid "Congratulations, there appear to be no errors in CSV file: \"%s\"." 833 821 msgstr "Gefeliciteerd, er lijken geen fouten te zitten in CSV bestand: \"%s\"." 834 822 835 #: inc/acfcs-functions.php:6 42 inc/acfcs-functions.php:644823 #: inc/acfcs-functions.php:613 inc/acfcs-functions.php:615 836 824 #, php-format 837 825 msgid "You have successfully imported %d cities from \"%s\"." 838 826 msgstr "Gefeliciteerd, je hebt %d steden geïmporteerd uit \"%s\"." 839 827 840 #: inc/acfcs-functions.php:6 74828 #: inc/acfcs-functions.php:645 841 829 #, php-format 842 830 msgid "Congratulations, you imported 1 city." … … 845 833 msgstr[1] "Gefeliciteerd, je hebt %d steden geïmporteerd." 846 834 847 #: inc/acfcs-functions.php:6 80inc/form-handling.php:33835 #: inc/acfcs-functions.php:651 inc/form-handling.php:33 848 836 msgid "You didn't select a file." 849 837 msgstr "Je hebt geen bestand gekozen." 850 838 851 #: inc/acfcs-functions.php:6 94839 #: inc/acfcs-functions.php:665 852 840 #, php-format 853 841 msgid "File \"%s\" successfully deleted." 854 842 msgstr "File “%s” is succesvol verwijderd." 855 843 856 #: inc/acfcs-functions.php:6 97844 #: inc/acfcs-functions.php:668 857 845 #, php-format 858 846 msgid "File \"%s\" is not deleted. Please try again." 859 847 msgstr "Het bestand \"%s\" is niet verwijderd. Probeer het aub opnieuw." 860 848 861 #: inc/acfcs-functions.php:7 34849 #: inc/acfcs-functions.php:712 862 850 #, php-format 863 851 msgid "You have successfully removed all entries for %s." 864 852 msgstr "Je hebt alle steden verwijderd voor %s." 865 853 866 #: inc/acfcs-functions.php:7 71inc/acfcs-help-tabs.php:31854 #: inc/acfcs-functions.php:746 inc/acfcs-help-tabs.php:31 867 855 msgid "State code" 868 856 msgstr "Staat/provincie code" 869 857 870 #: inc/acfcs-functions.php:7 73inc/acfcs-help-tabs.php:41858 #: inc/acfcs-functions.php:748 inc/acfcs-help-tabs.php:41 871 859 msgid "Country code" 872 860 msgstr "Land code" 873 861 874 #: inc/acfcs-functions.php: 926862 #: inc/acfcs-functions.php:893 875 863 msgid "No countries" 876 864 msgstr "Geen landen" 877 865 878 #: inc/acfcs-functions.php: 929866 #: inc/acfcs-functions.php:896 879 867 msgid "No results (yet), first select a country" 880 868 msgstr "Nog geen resultaten, kies eerst een land" 881 869 882 #: inc/acfcs-functions.php: 931870 #: inc/acfcs-functions.php:898 883 871 msgid "No results (yet), first select a state" 884 872 msgstr "Nog geen resultaten, kies eerst een staat/provincie" … … 1104 1092 #: inc/form-handling.php:8 inc/form-handling.php:30 inc/form-handling.php:64 1105 1093 #: inc/form-handling.php:88 inc/form-handling.php:109 inc/form-handling.php:143 1106 #: inc/form-handling.php:159 inc/form-handling.php:178 1107 #: inc/form-handling.php:198 1094 #: inc/form-handling.php:162 inc/form-handling.php:182 1108 1095 msgid "Something went wrong, please try again." 1109 1096 msgstr "Er ging iets fout, probeer het aub nog een keer." … … 1137 1124 msgstr[1] "Je hebt de volgende steden verwijderd: %s." 1138 1125 1139 #: inc/form-handling.php:146 1140 msgid "You have successfully deleted all transients." 1141 msgstr "Je hebt alle transients succesvol verwijderd." 1142 1143 #: inc/form-handling.php:164 1126 #: inc/form-handling.php:148 1144 1127 msgid "All cities are deleted." 1145 1128 msgstr "Alle steden zijn verwijderd." 1146 1129 1147 #: inc/form-handling.php:1 851130 #: inc/form-handling.php:169 1148 1131 msgid "Settings saved" 1149 1132 msgstr "Instellingen opgeslagen" 1133 1134 #~ msgid "Delete transients" 1135 #~ msgstr "Verwijder transients" 1136 1137 #~ msgid "" 1138 #~ "If you're seeing unexpected results in your dropdowns, try clearing all " 1139 #~ "transients with this option." 1140 #~ msgstr "" 1141 #~ "Als je onverwachte resultaten zien in je dropdowns, probeer dan de " 1142 #~ "transients te verwijderen met deze optie." 1143 1144 #~ msgid "You have successfully deleted all transients." 1145 #~ msgstr "Je hebt alle transients succesvol verwijderd." 1150 1146 1151 1147 #~ msgid "We might ask for this info if support is helping you fix a problem." … … 1199 1195 #~ msgstr "" 1200 1196 #~ "Als je meer landen nodig hebt, kan je deze krijgen op de officiële " 1201 #~ "website: <a href=\"https://acf-city-selector.com/get-countries/\" target="1202 #~ " \"_blank\" rel=\"noopener\">acf-city-selector.com</a>."1197 #~ "website: <a href=\"https://acf-city-selector.com/get-countries/\" " 1198 #~ "target=\"_blank\" rel=\"noopener\">acf-city-selector.com</a>." 1203 1199 1204 1200 #~ msgid "Save data" … … 1220 1216 #, php-format 1221 1217 #~ msgid "" 1222 #~ "<strong>!!!</strong> The default delimiters has been changed from "1223 #~ " ','(comma) to ';' (semi-colon). Read more about it <a href=\"%s\">%s</a>."1218 #~ "<strong>!!!</strong> The default delimiters has been changed from ',' " 1219 #~ "(comma) to ';' (semi-colon). Read more about it <a href=\"%s\">%s</a>." 1224 1220 #~ msgstr "" 1225 1221 #~ "<strong>!!!</strong> De default delimiter is gewijzigd van ',' (komma) " … … 1233 1229 #~ msgstr "" 1234 1230 #~ "<strong>!!!</strong> In één van de volgende versies (vermoedelijk " 1235 #~ "0.30.0), wordt de default delimiter gewijzigd van ',' (komma) naar "1236 #~ " ';'(punt komma). Lees er <a href=\"%s\">%s</a> meer over."1231 #~ "0.30.0), wordt de default delimiter gewijzigd van ',' (komma) naar ';' " 1232 #~ "(punt komma). Lees er <a href=\"%s\">%s</a> meer over." 1237 1233 1238 1234 #~ msgid "Antwerp" -
acf-city-selector/trunk/languages/acf-city-selector.pot
r2841217 r3133754 3 3 msgstr "" 4 4 "Project-Id-Version: ACF City Selector\n" 5 "POT-Creation-Date: 202 2-12-29 19:49+0100\n"5 "POT-Creation-Date: 2024-07-29 20:44+0200\n" 6 6 "PO-Revision-Date: 2019-09-14 15:00+0200\n" 7 7 "Last-Translator: Beee\n" 8 8 "Language-Team: \n" 9 "Language: en\n" 9 10 "MIME-Version: 1.0\n" 10 11 "Content-Type: text/plain; charset=UTF-8\n" 11 12 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 2.4.3\n" 13 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 14 "X-Generator: Poedit 3.4.4\n" 13 15 "X-Poedit-Basepath: ..\n" 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n"15 "Language: en\n"16 16 "X-Poedit-KeywordsList: __;_e;_n;_n:1,2;_n_noop;_nx_noop;esc_html__;esc_html_e;esc_attr;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n" 17 17 "X-Poedit-SearchPath-0: .\n" … … 19 19 "X-Poedit-SearchPathExcluded-1: assets/js/init.js\n" 20 20 21 #: ACF_City_Selector.php:16 921 #: ACF_City_Selector.php:167 22 22 #, php-format 23 23 msgid "Several %s had broken ascii characters. You need to re-import these countries to get the correct city names." 24 24 msgstr "" 25 25 26 #: ACF_City_Selector.php:16 926 #: ACF_City_Selector.php:167 27 27 #, php-format 28 28 msgid "cities in %s" 29 29 msgstr "" 30 30 31 #: ACF_City_Selector.php:16 931 #: ACF_City_Selector.php:167 32 32 msgid "cities in Belgium and Netherlands" 33 33 msgstr "" 34 34 35 #: ACF_City_Selector.php:2 61 ACF_City_Selector.php:27836 #: ACF_City_Selector.php:38 635 #: ACF_City_Selector.php:259 ACF_City_Selector.php:276 36 #: ACF_City_Selector.php:384 37 37 msgid "Settings" 38 38 msgstr "" 39 39 40 #: ACF_City_Selector.php:27 740 #: ACF_City_Selector.php:275 41 41 msgid "Dashboard" 42 42 msgstr "" 43 43 44 #: ACF_City_Selector.php:2 81 ACF_City_Selector.php:38844 #: ACF_City_Selector.php:279 ACF_City_Selector.php:386 45 45 #: admin/acfcs-search.php:148 46 46 msgid "Search" 47 47 msgstr "" 48 48 49 #: ACF_City_Selector.php:28 449 #: ACF_City_Selector.php:282 50 50 msgid "Preview" 51 51 msgstr "" 52 52 53 #: ACF_City_Selector.php:28 7 ACF_City_Selector.php:389admin/acfcs-info.php:2653 #: ACF_City_Selector.php:285 ACF_City_Selector.php:387 admin/acfcs-info.php:26 54 54 msgid "Info" 55 55 msgstr "" 56 56 57 #: ACF_City_Selector.php:2 9057 #: ACF_City_Selector.php:288 58 58 msgid "Get more countries" 59 59 msgstr "" 60 60 61 #: ACF_City_Selector.php:31 261 #: ACF_City_Selector.php:310 62 62 #, php-format 63 63 msgid "\"%s\" is not activated. This plugin <strong>must</strong> be activated, because without it \"%s\" won't work. Activate it <a href=\"%s\">here</a>." 64 64 msgstr "" 65 65 66 #: ACF_City_Selector.php:33 466 #: ACF_City_Selector.php:332 67 67 #, php-format 68 68 msgid "%s: The \"%s\" plugin will probably not work properly (anymore) with %s v4.x. Please upgrade to PRO." 69 69 msgstr "" 70 70 71 #: ACF_City_Selector.php:33 571 #: ACF_City_Selector.php:333 72 72 msgid "Warning" 73 73 msgstr "" 74 74 75 #: ACF_City_Selector.php:38 5admin/acfcs-preview.php:3675 #: ACF_City_Selector.php:383 admin/acfcs-preview.php:36 76 76 msgid "Preview data" 77 77 msgstr "" 78 78 79 #: ACF_City_Selector.php:38 7admin/acfcs-countries.php:5079 #: ACF_City_Selector.php:385 admin/acfcs-countries.php:50 80 80 msgid "Get countries" 81 81 msgstr "" 82 82 83 #: admin/acf-city-selector-v4.php: 29admin/acf-city-selector-v5.php:3483 #: admin/acf-city-selector-v4.php:31 admin/acf-city-selector-v5.php:34 84 84 msgid "Choice" 85 85 msgstr "" 86 86 87 #: admin/acf-city-selector-v4.php:6 4admin/acf-city-selector-v5.php:10287 #: admin/acf-city-selector-v4.php:68 admin/acf-city-selector-v5.php:102 88 88 msgid "All fields [default]" 89 89 msgstr "" 90 90 91 #: admin/acf-city-selector-v4.php:6 5admin/acf-city-selector-v5.php:10391 #: admin/acf-city-selector-v4.php:69 admin/acf-city-selector-v5.php:103 92 92 msgid "Country only" 93 93 msgstr "" 94 94 95 #: admin/acf-city-selector-v4.php: 66admin/acf-city-selector-v5.php:10495 #: admin/acf-city-selector-v4.php:70 admin/acf-city-selector-v5.php:104 96 96 msgid "Country + State/province" 97 97 msgstr "" 98 98 99 #: admin/acf-city-selector-v4.php: 67admin/acf-city-selector-v5.php:10599 #: admin/acf-city-selector-v4.php:71 admin/acf-city-selector-v5.php:105 100 100 msgid "Country + City" 101 101 msgstr "" 102 102 103 #: admin/acf-city-selector-v4.php: 68admin/acf-city-selector-v5.php:106103 #: admin/acf-city-selector-v4.php:72 admin/acf-city-selector-v5.php:106 104 104 msgid "State/province + City" 105 105 msgstr "" 106 106 107 #: admin/acf-city-selector-v4.php:7 2admin/acf-city-selector-v5.php:59107 #: admin/acf-city-selector-v4.php:76 admin/acf-city-selector-v5.php:59 108 108 #: admin/acfcs-info.php:170 109 109 msgid "Yes" 110 110 msgstr "" 111 111 112 #: admin/acf-city-selector-v4.php:7 3admin/acf-city-selector-v5.php:60112 #: admin/acf-city-selector-v4.php:77 admin/acf-city-selector-v5.php:60 113 113 #: admin/acfcs-info.php:170 114 114 msgid "No" 115 115 msgstr "" 116 116 117 #: admin/acf-city-selector-v4.php:8 0admin/acf-city-selector-v5.php:65117 #: admin/acf-city-selector-v4.php:84 admin/acf-city-selector-v5.php:65 118 118 msgid "Show labels" 119 119 msgstr "" 120 120 121 #: admin/acf-city-selector-v4.php:8 1admin/acf-city-selector-v5.php:64121 #: admin/acf-city-selector-v4.php:85 admin/acf-city-selector-v5.php:64 122 122 msgid "Show field labels above the dropdown menus" 123 123 msgstr "" 124 124 125 #: admin/acf-city-selector-v4.php: 97admin/acf-city-selector-v5.php:96125 #: admin/acf-city-selector-v4.php:101 admin/acf-city-selector-v5.php:96 126 126 msgid "Default country" 127 127 msgstr "" 128 128 129 #: admin/acf-city-selector-v4.php: 98admin/acf-city-selector-v5.php:95129 #: admin/acf-city-selector-v4.php:102 admin/acf-city-selector-v5.php:95 130 130 msgid "Select a default country for a new field" 131 131 msgstr "" 132 132 133 #: admin/acf-city-selector-v4.php:11 4admin/acf-city-selector-v5.php:111133 #: admin/acf-city-selector-v4.php:118 admin/acf-city-selector-v5.php:111 134 134 msgid "Fields to use" 135 135 msgstr "" 136 136 137 #: admin/acf-city-selector-v4.php:11 5admin/acf-city-selector-v5.php:110137 #: admin/acf-city-selector-v4.php:119 admin/acf-city-selector-v5.php:110 138 138 msgid "Select which fields are used" 139 139 msgstr "" 140 140 141 #: admin/acf-city-selector-v4.php:1 78admin/acf-city-selector-v5.php:160141 #: admin/acf-city-selector-v4.php:184 admin/acf-city-selector-v5.php:160 142 142 msgid "You haven't set a default country, so NO provinces/states and cities will be loaded." 143 143 msgstr "" … … 210 210 211 211 #: admin/acfcs-countries.php:66 admin/acfcs-search.php:172 212 #: inc/acfcs-functions.php:7 74inc/acfcs-help-tabs.php:46212 #: inc/acfcs-functions.php:749 inc/acfcs-help-tabs.php:46 213 213 msgid "Country" 214 214 msgstr "" … … 503 503 504 504 #: admin/acfcs-search.php:68 admin/acfcs-search.php:71 505 #: inc/acfcs-functions.php:21 inc/acfcs-functions.php: 506506 #: inc/acfcs-functions.php: 928505 #: inc/acfcs-functions.php:21 inc/acfcs-functions.php:477 506 #: inc/acfcs-functions.php:895 507 507 msgid "Select a country" 508 508 msgstr "" … … 513 513 514 514 #: admin/acfcs-search.php:89 admin/acfcs-search.php:93 515 #: inc/acfcs-functions.php:59 inc/acfcs-functions.php: 513516 #: inc/acfcs-functions.php: 930515 #: inc/acfcs-functions.php:59 inc/acfcs-functions.php:484 516 #: inc/acfcs-functions.php:897 517 517 msgid "Select a province/state" 518 518 msgstr "" … … 535 535 536 536 #: admin/acfcs-search.php:136 admin/acfcs-search.php:170 537 #: inc/acfcs-functions.php:7 70inc/acfcs-help-tabs.php:26537 #: inc/acfcs-functions.php:745 inc/acfcs-help-tabs.php:26 538 538 msgid "City" 539 539 msgstr "" 540 540 541 541 #: admin/acfcs-search.php:137 admin/acfcs-search.php:171 542 #: inc/acfcs-functions.php:7 72inc/acfcs-help-tabs.php:36542 #: inc/acfcs-functions.php:747 inc/acfcs-help-tabs.php:36 543 543 msgid "State" 544 544 msgstr "" … … 598 598 msgstr "" 599 599 600 #: admin/acfcs-settings.php:64 admin/acfcs-settings.php:66601 msgid " Delete transients"600 #: admin/acfcs-settings.php:64 601 msgid "Clear the database" 602 602 msgstr "" 603 603 604 604 #: admin/acfcs-settings.php:65 605 msgid "If you're seeing unexpected results in your dropdowns, try clearing all transients with this option." 605 msgid "By selecting this option, you will remove all cities, which are present in the database. This is useful if you don't need the preset cities or you want a fresh start." 606 msgstr "" 607 608 #: admin/acfcs-settings.php:66 609 msgid "Delete everything" 606 610 msgstr "" 607 611 608 612 #: admin/acfcs-settings.php:73 609 msgid " Clear the database"613 msgid "Delete data" 610 614 msgstr "" 611 615 612 616 #: admin/acfcs-settings.php:74 613 msgid "By selecting this option, you will remove all cities, which are present in the database. This is useful if you don't need the preset cities or you want a fresh start."614 msgstr ""615 616 #: admin/acfcs-settings.php:75617 msgid "Delete everything"618 msgstr ""619 620 #: admin/acfcs-settings.php:82621 msgid "Delete data"622 msgstr ""623 624 #: admin/acfcs-settings.php:83625 617 msgid "When the plugin is deleted, all cities are not automatically deleted. Select this option to delete the cities table as well upon deletion." 626 618 msgstr "" 627 619 628 #: admin/acfcs-settings.php: 88 admin/acfcs-settings.php:89620 #: admin/acfcs-settings.php:79 admin/acfcs-settings.php:80 629 621 msgid "Remove cities table on plugin deletion" 630 622 msgstr "" 631 623 632 #: admin/acfcs-settings.php: 93624 #: admin/acfcs-settings.php:84 633 625 msgid "Save settings" 634 626 msgstr "" … … 705 697 msgstr "" 706 698 707 #: inc/acfcs-functions.php:1 14 inc/acfcs-functions.php:504708 #: inc/acfcs-functions.php: 927699 #: inc/acfcs-functions.php:105 inc/acfcs-functions.php:475 700 #: inc/acfcs-functions.php:894 709 701 msgid "Select a city" 710 702 msgstr "" 711 703 712 #: inc/acfcs-functions.php: 300 inc/acfcs-functions.php:305704 #: inc/acfcs-functions.php:271 inc/acfcs-functions.php:276 713 705 msgid "Since your file is not accurate anymore, the file is deleted." 714 706 msgstr "" 715 707 716 #: inc/acfcs-functions.php: 301708 #: inc/acfcs-functions.php:272 717 709 #, php-format 718 710 msgid "There are too few columns on line %d. %s" 719 711 msgstr "" 720 712 721 #: inc/acfcs-functions.php: 309713 #: inc/acfcs-functions.php:280 722 714 #, php-format 723 715 msgid "There are too many columns on line %d. %s" 724 716 msgstr "" 725 717 726 #: inc/acfcs-functions.php:3 80718 #: inc/acfcs-functions.php:351 727 719 #, php-format 728 720 msgid "There are too few columns on line %d." 729 721 msgstr "" 730 722 731 #: inc/acfcs-functions.php:3 85723 #: inc/acfcs-functions.php:356 732 724 #, php-format 733 725 msgid "There are too many columns on line %d." 734 726 msgstr "" 735 727 736 #: inc/acfcs-functions.php:3 96728 #: inc/acfcs-functions.php:367 737 729 #, php-format 738 730 msgid "The length of the country abbreviation on line %d is incorrect." 739 731 msgstr "" 740 732 741 #: inc/acfcs-functions.php: 601733 #: inc/acfcs-functions.php:572 742 734 #, php-format 743 735 msgid "Congratulations, there appear to be no errors in CSV file: \"%s\"." 744 736 msgstr "" 745 737 746 #: inc/acfcs-functions.php:6 42 inc/acfcs-functions.php:644738 #: inc/acfcs-functions.php:613 inc/acfcs-functions.php:615 747 739 #, php-format 748 740 msgid "You have successfully imported %d cities from \"%s\"." 749 741 msgstr "" 750 742 751 #: inc/acfcs-functions.php:6 74743 #: inc/acfcs-functions.php:645 752 744 #, php-format 753 745 msgid "Congratulations, you imported 1 city." … … 756 748 msgstr[1] "" 757 749 758 #: inc/acfcs-functions.php:6 80inc/form-handling.php:33750 #: inc/acfcs-functions.php:651 inc/form-handling.php:33 759 751 msgid "You didn't select a file." 760 752 msgstr "" 761 753 762 #: inc/acfcs-functions.php:6 94754 #: inc/acfcs-functions.php:665 763 755 #, php-format 764 756 msgid "File \"%s\" successfully deleted." 765 757 msgstr "" 766 758 767 #: inc/acfcs-functions.php:6 97759 #: inc/acfcs-functions.php:668 768 760 #, php-format 769 761 msgid "File \"%s\" is not deleted. Please try again." 770 762 msgstr "" 771 763 772 #: inc/acfcs-functions.php:7 34764 #: inc/acfcs-functions.php:712 773 765 #, php-format 774 766 msgid "You have successfully removed all entries for %s." 775 767 msgstr "" 776 768 777 #: inc/acfcs-functions.php:7 71inc/acfcs-help-tabs.php:31769 #: inc/acfcs-functions.php:746 inc/acfcs-help-tabs.php:31 778 770 msgid "State code" 779 771 msgstr "" 780 772 781 #: inc/acfcs-functions.php:7 73inc/acfcs-help-tabs.php:41773 #: inc/acfcs-functions.php:748 inc/acfcs-help-tabs.php:41 782 774 msgid "Country code" 783 775 msgstr "" 784 776 785 #: inc/acfcs-functions.php: 926777 #: inc/acfcs-functions.php:893 786 778 msgid "No countries" 787 779 msgstr "" 788 780 789 #: inc/acfcs-functions.php: 929781 #: inc/acfcs-functions.php:896 790 782 msgid "No results (yet), first select a country" 791 783 msgstr "" 792 784 793 #: inc/acfcs-functions.php: 931785 #: inc/acfcs-functions.php:898 794 786 msgid "No results (yet), first select a state" 795 787 msgstr "" … … 990 982 #: inc/form-handling.php:8 inc/form-handling.php:30 inc/form-handling.php:64 991 983 #: inc/form-handling.php:88 inc/form-handling.php:109 inc/form-handling.php:143 992 #: inc/form-handling.php:159 inc/form-handling.php:178 993 #: inc/form-handling.php:198 984 #: inc/form-handling.php:162 inc/form-handling.php:182 994 985 msgid "Something went wrong, please try again." 995 986 msgstr "" … … 1019 1010 msgstr[1] "" 1020 1011 1021 #: inc/form-handling.php:146 1022 msgid "You have successfully deleted all transients." 1023 msgstr "" 1024 1025 #: inc/form-handling.php:164 1012 #: inc/form-handling.php:148 1026 1013 msgid "All cities are deleted." 1027 1014 msgstr "" 1028 1015 1029 #: inc/form-handling.php:1 851016 #: inc/form-handling.php:169 1030 1017 msgid "Settings saved" 1031 1018 msgstr "" -
acf-city-selector/trunk/readme.txt
r3074624 r3133754 4 4 Requires at least: 3.6.0 5 5 Requires PHP: 7.0 6 Tested up to: 6. 5.27 Stable tag: 1.1 3.06 Tested up to: 6.6.1 7 Stable tag: 1.14.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 42 42 == Changelog == 43 43 44 = 1.14.0 = 45 * update database queries for searching citites in admin 46 * update database queries for deleting countries in admin 47 * removed transients because it conflicted with translation 48 44 49 = 1.13.0 = 45 50 * Fix typo in function call
Note: See TracChangeset
for help on using the changeset viewer.