diff --git a/classes/import-export.php b/classes/import-export.php index b0818e6..7380073 100644 --- a/classes/import-export.php +++ b/classes/import-export.php @@ -524,10 +524,8 @@ public function do_csv_preview() { global $simple_map, $blog_id; $options = $simple_map->get_options(); - /* if ( !isset( $options['api_key'] ) ) $options['api_key'] = ''; - */ extract( $options ); @@ -697,10 +695,8 @@ public function print_page() { global $simple_map; $options = $simple_map->get_options(); - /* if ( !isset( $options['api_key'] ) ) $options['api_key'] = ''; - */ extract( $options ); @@ -810,9 +806,9 @@ public function print_page() { value="'; _e( 'Import CSV File', 'SimpleMap' ); echo '"/>'; - /* if ( '' == $options['api_key'] ) : ?> + if ( '' == $options['api_key'] ) : ?> API key if you need your locaitons geocoded.", 'SimpleMap' ), admin_url( "admin.php?page=simplemap" ) ); ?> - diff --git a/classes/locations.php b/classes/locations.php index 4e56e51..47e3882 100644 --- a/classes/locations.php +++ b/classes/locations.php @@ -633,7 +633,7 @@ function save_post_meta( $post ) { $options = $simple_map->get_options(); $post_object = get_post( $post ); - //$api_key = ( isset( $options['api_key'] ) && !empty( $options['api_key'] ) ) ? $options['api_key'] : ''; + $api_key = ( isset( $options['api_key'] ) && !empty( $options['api_key'] ) ) ? $options['api_key'] : ''; // Grab old data. $location_address = get_post_meta( $post, 'location_address', true ) ?: ' '; diff --git a/classes/options-general.php b/classes/options-general.php index a13823c..33c9305 100644 --- a/classes/options-general.php +++ b/classes/options-general.php @@ -68,7 +68,7 @@ function update_options() { $new_options = $options; // Validate POST Options - //$new_options['api_key'] = ( ! empty( $_POST['api_key'] ) ) ? $_POST['api_key'] : ''; + $new_options['api_key'] = ( ! empty( $_POST['api_key'] ) ) ? $_POST['api_key'] : ''; $new_options['map_width'] = ( ! empty( $_POST['map_width'] ) ) ? $_POST['map_width'] : $options['map_width']; $new_options['map_height'] = ( ! empty( $_POST['map_height'] ) ) ? $_POST['map_height'] : $options['map_height']; $new_options['default_lat'] = ( ! empty( $_POST['default_lat'] ) ) ? $_POST['default_lat'] : $options['default_lat']; @@ -401,16 +401,14 @@ function print_page() {
- get_api_link() . '">', ''); ?> + get_api_link() . '" target="_blank">', ''); ?> |
- */ ?>
-
' . __( 'You must enter an API key for your domain.', 'SimpleMap' ).' ' . __( 'Enter a key on the General Options page.', 'SimpleMap' ) . '