Plugin Directory

Changeset 3436557


Ignore:
Timestamp:
01/10/2026 11:09:09 AM (3 months ago)
Author:
nishatbd31
Message:

Major Version Upgrade

Location:
autocomplete-google-address
Files:
512 added
22 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • autocomplete-google-address/trunk/autocomplete-google-address.php

    r3207589 r3436557  
    1 <?php
    2 /*
    3 Plugin Name: Autocomplete Google Address
    4 Description: Adds Google Address Autocomplete functionality to WordPress forms.
    5 Version: 3.0.8
    6 Author: Md Nishath Khandakar
    7 Author URI: https://devsupport.vercel.app/
    8 License: GPL v2 or later
    9 License URI: https://www.gnu.org/licenses/gpl-2.0.html
    10 Text Domain: ga-auto
    11 Domain Path: /languages
    12 */
     1<?php
    132
    14 // Exit if accessed directly
    15 if (!defined('ABSPATH')) {
    16     exit;
     3/**
     4 * Plugin Name:       Autocomplete Google Address
     5 * Plugin URI:        https://wordpress.org/plugins/autocomplete-google-address/
     6 * Description:       Add Google Places address autocomplete to any existing form in WordPress using a selector-based mapping builder.
     7 * Version:           4.0.0
     8 * Author:            Md Nishath Khandakar
     9 * Author URI:        https://profiles.wordpress.org/nishatbd31/
     10 * License:           GPL-2.0-or-later
     11 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
     12 * Text Domain:       autocomplete-google-address
     13 * Domain Path:       /languages
     14 */
     15// If this file is called directly, abort.
     16if ( !defined( 'WPINC' ) ) {
     17    die;
    1718}
    18 
    19 // Freemius Integration
    20 if ( ! function_exists( 'google_autocomplete' ) ) {
     19if ( !function_exists( 'google_autocomplete' ) ) {
    2120    // Create a helper function for easy SDK access.
    2221    function google_autocomplete() {
    2322        global $google_autocomplete;
    24 
    25         if ( ! isset( $google_autocomplete ) ) {
     23        if ( !isset( $google_autocomplete ) ) {
    2624            // Include Freemius SDK.
    27             require_once dirname(__FILE__) . '/freemius/start.php';
    28 
     25            require_once dirname( __FILE__ ) . '/vendor/freemius/start.php';
    2926            $google_autocomplete = fs_dynamic_init( array(
    30                 'id'                  => '6886',
    31                 'slug'                => 'form-autocomplete-nish',
    32                 'premium_slug'        => 'google-autocomplete-premium',
    33                 'type'                => 'plugin',
    34                 'public_key'          => 'pk_f939b69fc6977108e74fa9e7e3136',
    35                 'is_premium'          => false,
    36                 // If your plugin is a serviceware, set this option to false.
    37                 'has_premium_version' => false,
    38                 'has_addons'          => false,
    39                 'has_paid_plans'      => true,
    40                 'trial'               => array(
     27                'id'              => '6886',
     28                'slug'            => 'form-autocomplete-nish',
     29                'premium_slug'    => 'google-autocomplete-premium',
     30                'type'            => 'plugin',
     31                'public_key'      => 'pk_f939b69fc6977108e74fa9e7e3136',
     32                'is_premium'      => false,
     33                'has_addons'      => false,
     34                'has_paid_plans'  => true,
     35                'trial'           => array(
    4136                    'days'               => 3,
    4237                    'is_require_payment' => true,
    4338                ),
    44                 'has_affiliation'     => 'all',
    45                 'menu'                => array(
    46                     'slug'           => 'google-autocomplete-plugin',
    47                     'first-path'     => 'admin.php?page=google-autocomplete-plugin',
    48                     'support'        => false,
     39                'has_affiliation' => 'all',
     40                'menu'            => array(
     41                    'slug'       => 'edit.php?post_type=aga_form',
     42                    'first-path' => 'admin.php?page=aga-settings',
     43                    'support'    => false,
    4944                ),
     45                'is_live'         => true,
    5046            ) );
    5147        }
    52 
    5348        return $google_autocomplete;
    5449    }
     
    5954    do_action( 'google_autocomplete_loaded' );
    6055}
    61 // Define constants
    62 define('GAP_PLUGIN_DIR', plugin_dir_path(__FILE__));
    63 define('GAP_PLUGIN_URL', plugin_dir_url(__FILE__));
    64 
    65 // // Include necessary files
    66 // require_once GAP_PLUGIN_DIR . 'includes/class-rest-api.php';
    67 require_once GAP_PLUGIN_DIR . 'includes/class-autocomplete-api.php';
    68 require_once GAP_PLUGIN_DIR . 'includes/class-enqueue-scripts.php';
    69 
    70 
    71 
    72 
    73 // Database Table Creation on Activation
    74 register_activation_hook(__FILE__, 'gap_create_db_table');
    75 function gap_create_db_table() {
    76     global $wpdb;
    77 
    78     $table_name = $wpdb->prefix . 'gap_configs';
    79     $charset_collate = $wpdb->get_charset_collate();
    80 
    81     $sql = "CREATE TABLE $table_name (
    82         id INT NOT NULL AUTO_INCREMENT,
    83         config_name VARCHAR(255) NOT NULL,
    84         api_key TEXT NOT NULL,
    85         created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    86         PRIMARY KEY (id)
    87     ) $charset_collate;";
    88 
    89     require_once ABSPATH . 'wp-admin/includes/upgrade.php';
    90     dbDelta($sql);
     56/**
     57 * Currently plugin version.
     58 */
     59define( 'AGA_VERSION', '1.0.0' );
     60/**
     61 * Plugin directory path.
     62 */
     63define( 'AGA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     64/**
     65 * Plugin directory URL.
     66 */
     67define( 'AGA_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     68/**
     69 * The core plugin class that is used to define internationalization,
     70 * admin-specific hooks, and public-facing site hooks.
     71 */
     72require AGA_PLUGIN_DIR . 'includes/class-aga-plugin.php';
     73/**
     74 * Begins execution of the plugin.
     75 *
     76 * Since everything within the plugin is registered via hooks,
     77 * then kicking off the plugin from this point in the file does
     78 * not affect the page life cycle.
     79 *
     80 * @since    1.0.0
     81 */
     82function run_aga_plugin() {
     83    $plugin = new AGA_Plugin();
     84    $plugin->run();
    9185}
    9286
    93 // // Freemius Uninstall Hook
    94 google_autocomplete()->add_action('after_uninstall', 'google_autocomplete_uninstall_cleanup');
    95 
    96 // Uninstall Cleanup Logic
    97 function google_autocomplete_uninstall_cleanup() {
    98     global $wpdb;
    99 
    100     // Delete plugin settings
    101     delete_option('google_api_key');
    102     delete_option('gap_configs');
    103     delete_option('gap_language');
    104     delete_option('gap_clear_log');
    105 
    106     // Drop the `gap_configs` table
    107     $table_name = $wpdb->prefix . 'gap_configs';
    108     $wpdb->query("DROP TABLE IF EXISTS {$table_name}");
    109 }
    110 
    111 // Render Admin Page
    112 function gap_render_admin_page() {
    113     $page = isset($_GET['page']) && $_GET['page'] === 'google-autocomplete-settings' ? 'settings' : 'configurations';
    114     ?>
    115     <div id="root" class="wrap">
    116         <h1>Google Autocomplete <?php echo ucfirst($page); ?></h1>
    117     </div>
    118     <script>
    119         window.gapPageContext = "<?php echo esc_js($page); ?>";
    120     </script>
    121     <?php
    122 }
    123 
    124 // Add Admin Menu
    125 add_action('admin_menu', function () {
    126     add_menu_page(
    127         'Google Autocomplete',
    128         'Autocomplete',
    129         'manage_options',
    130         'google-autocomplete-plugin',
    131         'gap_render_admin_page',
    132         'dashicons-location-alt',
    133         20 // Position in the menu
    134     );
    135 
    136     add_submenu_page(
    137         'google-autocomplete-plugin',
    138         'Autocomplete Settings',
    139         'Settings',
    140         'manage_options',
    141         'google-autocomplete-settings',
    142         'gap_render_admin_page'
    143     );
    144 });
     87run_aga_plugin();
  • autocomplete-google-address/trunk/readme.txt

    r3207592 r3436557  
    11=== Autocomplete Google Address ===
    2 Contributors: nishathbd31
    3 Donate link: https://www.facebook.com/nishat.rafi.60
    4 Tags: Autocomplete,Google Address Autocomplete,Autocomplete Google Address,Address Autocomplete
    5 Requires at least: 5.0
    6 Tested up to: 6.7.1
    7 Stable tag: trunk
    8 Requires PHP: 5.4
    9 License: GPLv2 or later
     2Contributors: nishatbd31, freemius
     3Tags: google, maps, places, autocomplete, address, form, woocommerce, contact form 7
     4Requires at least: 5.4
     5Tested up to: 6.9
     6Stable tag: 1.0.0
     7License: GPL-2.0-or-later
    108License URI: https://www.gnu.org/licenses/gpl-2.0.html
    119
    12 This plugin will help you to use Place Autocomplete API key.
     10Add Google Places address autocomplete to any existing form in WordPress using a selector-based mapping builder.
    1311
    1412== Description ==
    1513
    16 This plugin will help you to use Place Autocomplete API key to enable address auto-completion to any text input fields.You just need to fill the text input ID. You can add multiple input by using " , ".
    17 [youtube https://youtu.be/NO1CFjuyWqo?si=MgAOCYbxx16vNYJP]
     14Tired of manually typing addresses? Autocomplete Google Address integrates the power of Google Places Autocomplete with any form on your WordPress site.
    1815
    19 == Installation ==
    20 1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
    21 1. Activate the plugin through the 'Plugins' screen in WordPress
    22 1. Use the Settings->Plugin Name screen to configure the plugin
    23 1. (Make your instructions match the desired user flow for activating and installing your plugin. Include any steps that might be needed for explanatory purposes)
     16This plugin doesn't force you to create new forms. Instead, it provides a powerful, selector-based "form builder" that lets you map Google's rich address data to your *existing* form fields. It's compatible with WooCommerce, Contact Form 7, WPForms, Gravity Forms, and virtually any other form.
    2417
     18**Key Features:**
    2519
     20*   **Works with Any Form:** Add address autocomplete to checkout fields, contact forms, registration forms, and more.
     21*   **Selector-Based Mapping:** A simple but powerful UI lets you connect Google Address components to your form fields using CSS selectors (like `#billing_address` or `.shipping-street`).
     22*   **Two Powerful Modes:**
     23    *   **Single Line Mode:** A single field autocompletes the full, formatted address. Perfect for simple address fields.
     24    *   **Smart Mapping Mode:** One field triggers the autocomplete, and the plugin intelligently fills multiple fields like Street, City, State, Zip, and Country.
     25*   **Unlimited Configurations:** Create as many mapping configurations as you need. You can have different setups for your checkout form and your contact form on the same site.
     26*   **Developer Friendly:** Use the `[aga_form id="123"]` shortcode or the `aga_render_form_config(123)` PHP function to apply configurations exactly where you need them.
     27*   **Conflict Prevention:** Includes an option to prevent the plugin from loading the Google Maps API if another plugin or your theme already does.
    2628
    2729== Installation ==
    2830
    29 This section describes how to install the plugin and get it working.
    30 
    31 e.g.
    32 
    33 1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
    34 1. Activate the plugin through the 'Plugins' screen in WordPress
    35 1. Use the Settings->Plugin Name screen to configure the plugin
    36 1. (Make your instructions match the desired user flow for activating and installing your plugin. Include any steps that might be needed for explanatory purposes)
     311.  Upload the `autocomplete-google-address` folder to the `/wp-content/plugins/` directory.
     322.  Activate the plugin through the 'Plugins' menu in WordPress.
     333.  Go to **Google Address > Settings** and enter your Google Maps API Key. You must enable the **Places API** and **Maps JavaScript API** for your key in the Google Cloud Console.
     344.  Go to **Google Address > Add New** to create your first form configuration.
     355.  Follow the instructions on the Help page (**Google Address > Help**) to find your form field selectors and set up your mapping.
     366.  Place the generated shortcode (e.g., `[aga_form id="123"]`) on the page where your form is located.
    3737
    3838== Frequently Asked Questions ==
    3939
    40 = Can i use multiple text ID? =
     40= Does this work with WooCommerce checkout? =
    4141
    42 Yes,you can use by separating comma.
     42Yes. You can use the "Smart Mapping" mode to map the address components to the WooCommerce billing and shipping address fields.
    4343
    44 = Is this a paid plugin? =
     44= Do I need a Google Maps API Key? =
    4545
    46 No, It's totally free. No paid version is available.
     46Yes, a Google Maps API key is required. You can get one from the [Google Cloud Platform Console](https://console.cloud.google.com/). You must enable the "Places API" and "Maps JavaScript API" for your key.
    4747
     48= Can I restrict results to a specific country? =
     49
     50Yes. You can set a default country restriction in the plugin's global Settings page.
    4851
    4952== Screenshots ==
    5053
    51 1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif).
    52 2. This is the second screen shot
     541.  The configuration builder interface.
     552.  The global settings page.
     563.  Example of autocomplete on a frontend form.
     57
     58== Changelog ==
     59
     60= 1.0.0 =
     61*   Initial release.
    5362
    5463== Upgrade Notice ==
    55 Default id issue solved
    56 == 3.0.8 ==
    57 Db clean not mandatory for all
    58 == 3.0.7 ==
    59 state type solved
    60 country restriction for free and lang updated
    61 == 3.0.6 ==
    62 state type solved
    63 == 3.0.5 ==
    64 Search type and address long shot solved
    65 == 3.0.4 ==
    66 Address type long fixed
    67 == 3.0.3 ==
    68 search type error, place name added
    69 == 3.0.1 ==
    70 This a major update. Before update take a coppy off your previous version plugin.
    71 In this version you will see lot's of improvments and style changes.
    72 == 3.0.0 ==
    73 design upgrade, developer support added, map api consol error solved, typescript added for better readability and code maintenance, tested with lates wordpress 6.7
    74 == 2.0.3 ==
    75 simple upgrade
    76 == 2.0.2 ==
    77 Payment system to upgrade
    78 == 2.0.1 ==
    79 version compatablity
    80 new checkout
    81 setup video
    82 = 1.9.6=
    83 = 1.9.3=
    84 version compatablity
    85 == Changelog ==
    86 = 1.9.2=
    87 multiple autocomplete issue solved.
    88 = 1.9.1=
    89 Missing address solved (Ninja Form,Gravity form and all froms)
    9064
    91 
    92 == Upgrade Notice ==
    93 = 1.9.1=
    94 tested with wp 6.1.1 nothing changed
    95 
    96 = 1.9.1=
    97 jquery bug fixed you will not lose any data after update
    98 = 1.8 =
    99 jQuery On load function updated to support latest jQuery version
    100 == Upgrade Notice ==
    101 = 1.9 =
    102 WordPress 5.7 version compatibility
     65= 1.0.0 =
     66*   The first version of the plugin. No upgrade notices yet.
Note: See TracChangeset for help on using the changeset viewer.