Changeset 2048846
- Timestamp:
- 03/12/2019 08:34:32 AM (7 years ago)
- Location:
- autocompletamento-indirizzo-contact-form-7/trunk
- Files:
-
- 2 edited
-
autocompletamento-indirizzo-contact-form-7.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
autocompletamento-indirizzo-contact-form-7/trunk/autocompletamento-indirizzo-contact-form-7.php
r2048106 r2048846 5 5 */ 6 6 /* 7 Plugin Name: Autocompletamento indirizzo contact form 77 Plugin Name: Autocompletamento indirizzo Contact Form 7 8 8 Plugin URI: http://wordpress.org/plugins/autocompletamento-indirizzo-contact-form-7/ 9 9 Description: Aiuta i tuoi utenti con l'autocompilazione dei campi di Indirizzo (partenza, destinazione) e calcola la distanza con il servizio Google Place. CF7 10 10 Author: DevFabio 11 Version: 0.1. 211 Version: 0.1.3 12 12 Author URI: http://inventyourtrade.it 13 13 */ 14 14 15 /* Below we are making sure the script is only loaded on the page designated in the Google Places API settings page (i.e. Contact, Home, etc.). */ 16 17 /* Once you have your key enter it in the Google Places API Key field on the Google Places API settings page. */ 18 wp_enqueue_script( 'autocompletament_script', plugin_dir_url(__FILE__). 'js/script-mappa.js', array(), 'null', true ); 15 function autocompletament_load_primo(){ 16 wp_enqueue_script( 'autocompletament_script', plugin_dir_url(__FILE__). 'js/script-mappa.js', array(), 'null', true ); 17 wp_localize_script( 'autocompletament_script', 'url_sitoweb', plugin_dir_url(__FILE__).'calcola-distanza.php' ); 18 wp_enqueue_script( 'autocompletament_script' ); 19 } 20 add_action('wp_enqueue_scripts','autocompletament_load_primo'); 19 21 add_action( 'wp_enqueue_scripts', 'autocompletament_gpa_load_user_api' ); 20 21 //wp_enqueue_script( 'autocompletament_indirizzo-carica-google-map', $api_script, array(), 'null', true );22 23 wp_localize_script( 'autocompletament_script', 'url_sitoweb', plugin_dir_url(__FILE__).'calcola-distanza.php' );24 25 26 wp_enqueue_script( 'autocompletament_script' );27 22 /* Inizio seconda parte*/ 28 23 /*************** … … 43 38 $securee = 'http'; 44 39 } 45 $api_script .= $securee.'://maps.googleapis.com/maps/api/js?key=' . $api_key . '&libraries=places&callback=initAutocomplete'; 46 47 /* Below we are making sure the script is only loaded on the page designated in the Google Places API settings page (i.e. Contact, Home, etc.). */ 48 49 /* Once you have your key enter it in the Google Places API Key field on the Google Places API settings page. */ 50 wp_enqueue_script( 'gpa-google-places-api', $api_script, array(), 'null', true ); 40 $api_script = $securee.'://maps.googleapis.com/maps/api/js?key=' . $api_key . '&libraries=places&callback=initAutocomplete'; 41 42 wp_enqueue_script( 'gpa-google-places-api', $api_script, array(), 'null', true ); 51 43 52 44 } … … 158 150 { 159 151 ?> 160 <input type=" text" required name="orem_cf7_geo_api_key" id="api_key" value="<?php echo get_option('orem_cf7_geo_api_key')?>" />152 <input type="password" required name="orem_cf7_geo_api_key" id="api_key" value="<?php echo get_option('orem_cf7_geo_api_key')?>" /> 161 153 <?php 162 154 } … … 387 379 388 380 function autocompletament_indirizzo_add_form_tag() { 389 wpcf7_add_shortcode(array( 'partenza', 'arrivo','distanza'), 'autocompletament_indirizzo_partenza_form_tag_handler', true); 390 wpcf7_add_form_tag( array( 'partenza', 'arrivo','distanza'), 'autocompletament_indirizzo_partenza_form_tag_handler' ); // partenza 381 wpcf7_add_form_tag( array( 'partenza', 'arrivo','distanza'), 'autocompletament_indirizzo_partenza_form_tag_handler', true ); // partenza 391 382 } 392 383 function autocompletament_indirizzo_partenza_form_tag_handler( $tag ) { -
autocompletamento-indirizzo-contact-form-7/trunk/readme.txt
r2048106 r2048846 1 === Autocompletamento indirizzo contact form 7 ===1 === Autocompletamento indirizzo Contact Form 7 === 2 2 Contributors: DevFabio 3 3 Tags: Cf7, Address, Google map, Distanza … … 17 17 - Google Place API 18 18 - Autocompilazione campi di indirizzo (partenza, destinazione) 19 - calcolo della distanza19 - Calcolo della distanza
Note: See TracChangeset
for help on using the changeset viewer.