Skip to content

Commit

Permalink
Update deprecated functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ali7ali committed Jan 15, 2023
1 parent fb0a3e2 commit b3f1b3d
Show file tree
Hide file tree
Showing 5 changed files with 295 additions and 271 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ Tags: google-map, google, premium, elementor, alpha, page builder, landing page,

Requires at least: 5.0

Tested up to: 6.0
Tested up to: 6.1.1

Requires PHP: 5.6

Stable tag: 1.0.4
Stable tag: 1.0.5

License: GPLv3

Expand Down Expand Up @@ -54,7 +54,7 @@ Elementor Website Builder comes with an exclusive toolset, that lets you create

= We recommend your host supports: =

- PHP version 7.0 or greater
- PHP version 7.4 or greater
- MySQL version 5.6 or greater
- WordPress Memory limit of 64 MB or greater (128 MB or higher is preferred)

Expand All @@ -77,8 +77,8 @@ Manual or using sFTP install:

== Upgrade Notice ==

= 1.0.4 =
Fixing urgent bug.
= 1.0.5 =
Update deprecated functions.

== Frequently Asked Questions ==

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

== Changelog ==

= 1.0.5 - 2023-01-11 =

- Update deprecated functions.

= 1.0.4 - 2022-07-13 =

- Applying PHPCS standards and fixing bugs.
Expand Down
11 changes: 6 additions & 5 deletions alpha-google-map-for-elementor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Description: Premium Google Map features for WordPress.
* Author: Ali Ali
* Author URI: https://github.com/Ali7Ali
* Version: 1.0.4
* Version: 1.0.5
* Text Domain: alpha-google-map-for-elementor
* Domain Path: /languages
* License: GPLv3
*
* WC tested up to: 6.4.1
* Elementor tested up to: 3.6.4
* Elementor Pro tested up to: 3.6.5
* WC tested up to: 7.3.0
* Elementor tested up to: 3.10.0
* Elementor Pro tested up to: 3.10.1
*
* @package alpha-google-map-for-elementor
*/
Expand All @@ -39,12 +39,13 @@
exit; // Exit if accessed directly.
}

define('ALPHAMAP_VERSION', '1.0.4');
define('ALPHAMAP_VERSION', '1.0.5');
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));
define('ALPHAMAP_PL_ASSETS', trailingslashit(ALPHAMAP_PL_URL . 'assets'));
define('ALPHAMAP_PL_INCLUDE', trailingslashit(ALPHAMAP_PL_PATH . 'include'));
define('ALPHAMAP_PLUGIN_BASE', plugin_basename(ALPHAMAP_ADDONS_PL_ROOT));

// Required File.
require ALPHAMAP_PL_INCLUDE . '/class-alpha-google-map.php';
42 changes: 21 additions & 21 deletions include/class-alpha-google-map-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,27 @@ protected function register_controls()
$this->start_controls_section(
'section_header',
array(
'label' => __('API', 'alpha-google-map-for-elementor'),
)
);

$this->add_control(
'alpha_google_api_key',
array(
'label' => __('API Key', 'alpha-google-map-for-elementor'),
'type' => Controls_Manager::TEXT,
'default' => __('Enter your Google API Key', 'alpha-google-map-for-elementor'),
)
);
'label' => __('Map Window Location', 'alpha-google-map-for-elementor'),
)
);

$api_key = get_option('elementor_google_maps_api_key');
if (!$api_key) {
$this->add_control(
'api_key_notification',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => sprintf(
/* translators: 1: Integration settings link open tag, 2: Create API key link open tag, 3: Link close tag. */
esc_html__('Set your Google Maps API Key in Elementor\'s %1$sIntegrations Settings%3$s page. Create your key %2$shere.%3$s', 'alpha-google-map-for-elementor'),
'<a href="' . Settings::get_url() . '#tab-integrations" target="_blank">',
'<a href="https://developers.google.com/maps/documentation/embed/get-api-key" target="_blank">',
'</a>'
),
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
]
);
}

$this->add_control(
'alpha_location_lat',
Expand Down Expand Up @@ -970,15 +979,6 @@ protected function render()
)
);

// get an option.
$key = get_option('alpha_google_api_key');
if (empty($key) && !empty($settings['alpha_api_key'])) {
// add a new option.
add_option('alpha_google_api_key', $settings['alpha_api_key']);
} elseif (!empty($key) && !empty($settings['alpha_api_key'])) {
update_option('alpha_google_api_key', $settings['alpha_api_key']);
}

?>
<div class="alpha-map-container" id="alpha-map-container">
<div class="alpha-google-map-title">
Expand Down
Loading

0 comments on commit b3f1b3d

Please sign in to comment.