Skip to content

Commit

Permalink
Improvements and demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ali7ali committed Jul 2, 2023
1 parent 09aa5a3 commit bdb39a2
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 13 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Tested up to: 6.2.2

Requires PHP: 5.6

Stable tag: 1.0.6
Stable tag: 1.0.7

License: GPLv3

Expand All @@ -44,6 +44,17 @@ Plugin features

Elementor Website Builder comes with an exclusive toolset, that lets you create a truly responsive website in a whole new and visual way. From different font sizes, padding, and margin per device, to reverse column ordering, this is the most powerful mobile site builder for creating perfect responsive websites.

= Demo =
Check this widget demo here [here](https://alphatrio.net/alpha-google-map-for-elementor/).

= Contributing and reporting bugs =

You can contribute code to this plugin via GitHub: [https://github.com/ali7ali/Alpha-Google-Map-For-Elementor](https://github.com/ali7ali/Alpha-Google-Map-For-Elementor)

= Support =

Use the WordPress.org forums for community support. If you spot a bug, you can of course log it on [Github](https://github.com/ali7ali/Alpha-Google-Map-For-Elementor/issues/new/choose) instead where we can act upon it more efficiently.

== Installation ==

= Minimum Requirements =
Expand Down Expand Up @@ -77,8 +88,8 @@ Manual or using sFTP install:

== Upgrade Notice ==

= 1.0.6 =
Update deprecated functions.
= 1.0.7 =
Minor improvements and adding a demo.

== Frequently Asked Questions ==

Expand All @@ -98,6 +109,10 @@ No. You need to install Elementor Website Builder first.

== Changelog ==

= 1.0.7 - 2023-06-23 =

- Minor improvements and adding a demo.

= 1.0.6 - 2023-06-10 =

- Update deprecated functions.
Expand Down
7 changes: 4 additions & 3 deletions alpha-google-map-for-elementor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

/**
* Plugin Name: Alpha Google Map For Elementor
* Plugin URI: https://alphatrio.net
* Description: Premium Google Map features for WordPress.
* Author: Ali Ali
* Author URI: https://github.com/Ali7Ali
* Version: 1.0.6
* Version: 1.0.7
* Text Domain: alpha-google-map-for-elementor
* Domain Path: /languages
* License: GPLv3
*
* Elementor tested up to: 3.13.4
* Elementor tested up to: 3.14.1
*
* @package alpha-google-map-for-elementor
*/
Expand All @@ -37,7 +38,7 @@
exit; // Exit if accessed directly.
}

define('ALPHAMAP_VERSION', '1.0.6');
define('ALPHAMAP_VERSION', '1.0.7');
define('ALPHAMAP_ADDONS_PL_ROOT', __FILE__);
define('ALPHAMAP_PL_URL', plugins_url('/', ALPHAMAP_ADDONS_PL_ROOT));
define('ALPHAMAP_PL_PATH', plugin_dir_path(ALPHAMAP_ADDONS_PL_ROOT));
Expand Down
14 changes: 14 additions & 0 deletions include/class-alpha-google-map-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,20 @@ protected function register_controls()
);
}

$this->add_control(
'check_demo',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => sprintf(
/* translators: 1: Demo link open tag, 2: Link close tag. */
esc_html__('Check this widget demo %1$shere%2$s.', 'alpha-google-map-for-elementor'),
'<a href="https://alphatrio.net/alpha-google-map-for-elementor/" target="_blank">',
'</a>'
),
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
]
);

$this->add_control(
'alpha_location_lat',
array(
Expand Down
13 changes: 10 additions & 3 deletions include/class-alpha-google-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,19 @@ public function init()
*/
public function add_assets()
{
require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
$upload_dir = wp_upload_dir(null, true);
$dir = $upload_dir['basedir'];
if (!empty($dir)) {
wp_mkdir_p($dir . '/alpha-map');
copy(ALPHAMAP_PL_ASSETS . 'img/alpha-pin.png', $dir . '/alpha-map/alpha-pin.png');
copy(ALPHAMAP_PL_ASSETS . 'img/alpha-pin-hover.png', $dir . '/alpha-map/alpha-pin-hover.png');
$wp_file_sys = new WP_Filesystem_Direct('direct');
if (!$wp_file_sys->exists($dir . '/alpha-map/alpha-pin.png')) {
$wp_file_sys->put_contents($dir . '/alpha-map/alpha-pin.png', $wp_file_sys->get_contents(ALPHAMAP_PL_ASSETS . 'img/alpha-pin.png'));
}
if (!$wp_file_sys->exists($dir . '/alpha-map/alpha-pin-hover.png')) {
$wp_file_sys->put_contents($dir . '/alpha-map/alpha-pin-hover.png', $wp_file_sys->get_contents(ALPHAMAP_PL_ASSETS . 'img/alpha-pin-hover.png'));
}
}
}

Expand Down Expand Up @@ -237,7 +244,7 @@ public function plugin_js()
// get an option.
$api_key = get_option('elementor_google_maps_api_key');

$api = sprintf('https://maps.googleapis.com/maps/api/js?key=%1$s&language=en&callback=initMap', $api_key);
$api = sprintf('https://maps.googleapis.com/maps/api/js?key=%1$s&language=en&callback=blur', $api_key);
wp_enqueue_script(
'alpha-api-js',
$api,
Expand Down
22 changes: 18 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Tags: google-map, google, premium, elementor, alpha, page builder, landing page,
Requires at least: 5.0
Tested up to: 6.2.2
Requires PHP: 5.6
Stable tag: 1.0.6
Stable tag: 1.0.7
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Alpha Google Map For Elementor is a plugin that offers premium Google Map features for WordPress.

== Description ==
This plugin offers the generally needed google Maps functionality with additional premium features.
This plugin offers the generally needed Google Maps functionality with additional premium features.

Plugin features
* Custom map pins
Expand All @@ -23,6 +23,17 @@ Plugin features

Elementor Website Builder comes with an exclusive toolset, that lets you create a truly responsive website in a whole new and visual way. From different font sizes, padding, and margin per device, to reverse column ordering, this is the most powerful mobile site builder for creating perfect responsive websites.

= Demo =
Check this widget demo here [here](https://alphatrio.net/alpha-google-map-for-elementor/).

= Contributing and reporting bugs =

You can contribute code to this plugin via GitHub: [https://github.com/ali7ali/Alpha-Google-Map-For-Elementor](https://github.com/ali7ali/Alpha-Google-Map-For-Elementor)

= Support =

Use the WordPress.org forums for community support. If you spot a bug, you can of course log it on [Github](https://github.com/ali7ali/Alpha-Google-Map-For-Elementor/issues/new/choose) instead where we can act upon it more efficiently.

== Installation ==

= Minimum Requirements =
Expand Down Expand Up @@ -55,8 +66,8 @@ Manual or using sFTP install:

== Upgrade Notice ==

= 1.0.6 =
Update deprecated functions.
= 1.0.7 =
Minor improvements and adding a demo.

== Frequently Asked Questions ==

Expand All @@ -76,6 +87,9 @@ No. You need to install Elementor Website Builder first.

== Changelog ==

= 1.0.7 - 2023-06-23 =
* Minor improvements and adding a demo.

= 1.0.6 - 2023-06-10 =
* Update deprecated functions.

Expand Down

0 comments on commit bdb39a2

Please sign in to comment.