Changeset 3276970
- Timestamp:
- 04/18/2025 11:10:11 PM (10 months ago)
- Location:
- alpha-google-map-for-elementor/trunk
- Files:
-
- 7 edited
-
README.md (modified) (3 diffs)
-
alpha-google-map-for-elementor.php (modified) (2 diffs)
-
assets/js/alpha-map.js (modified) (1 diff)
-
include/class-alpha-google-map-widget.php (modified) (2 diffs)
-
include/class-alpha-google-map.php (modified) (2 diffs)
-
languages/alpha-google-map-for-elementor.pot (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
alpha-google-map-for-elementor/trunk/README.md
r3209591 r3276970 14 14 **Tags:** google-map, google, elementor, maps, page builder 15 15 **Requires at least:** 6.0 16 **Tested up to:** 6. 716 **Tested up to:** 6.8 17 17 **Requires PHP:** 7.4 18 **Stable tag:** 1. 2.218 **Stable tag:** 1.3 19 19 **License:** [GPLv3](https://www.gnu.org/licenses/gpl-3.0.html) 20 20 … … 75 75 ## Upgrade Notice 76 76 77 ### 1. 2.277 ### 1.3 78 78 79 Compatibility for WP 6.6 and refactor the integration with Elementor. 79 Compatibility for WP 6.8 80 Feature: One finger scroll on mobile (GestureHandling) 80 81 81 82 ## Frequently Asked Questions … … 96 97 97 98 ## Changelog 99 100 ### 1.3 - 2025-04-19 101 102 - Compatibility for WP 6.8 and 103 - Feature: One finger scroll on mobile (GestureHandling) 98 104 99 105 ### 1.2.2 - 2024-12-18 -
alpha-google-map-for-elementor/trunk/alpha-google-map-for-elementor.php
r3209591 r3276970 1 1 <?php 2 3 2 /** 4 3 * Plugin Name: Alpha Google Map For Elementor 5 * Plugin URI: https://al phatrio.net4 * Plugin URI: https://ali-ali.org/ 6 5 * Description: Premium Google Map features for WordPress. 7 6 * Author: Ali Ali 8 7 * Author URI: https://github.com/Ali7Ali 9 * Version: 1. 2.28 * Version: 1.3 10 9 * Text Domain: alpha-google-map-for-elementor 11 10 * Domain Path: /languages 12 11 * License: GPLv3 12 * 13 * @package AlphaGoogleMap 13 14 * */ 14 15 … … 31 32 */ 32 33 33 if ( !defined('ABSPATH')) {34 exit; // Exit if accessed directly.34 if ( ! defined( 'ABSPATH' ) ) { 35 exit; // Exit if accessed directly. 35 36 } 36 37 37 define( 'ALPHAMAP_VERSION', '1.2.2');38 define( 'ALPHAMAP_ADDONS_PL_ROOT', __FILE__);39 define( 'ALPHAMAP_PL_URL', plugins_url('/', ALPHAMAP_ADDONS_PL_ROOT));40 define( 'ALPHAMAP_PL_PATH', plugin_dir_path(ALPHAMAP_ADDONS_PL_ROOT));41 define( 'ALPHAMAP_PL_ASSETS', trailingslashit(ALPHAMAP_PL_URL . 'assets'));42 define( 'ALPHAMAP_PL_INCLUDE', trailingslashit(ALPHAMAP_PL_PATH . 'include'));43 define( 'ALPHAMAP_PL_LANGUAGES', trailingslashit(ALPHAMAP_PL_PATH . 'languages'));44 define( 'ALPHAMAP_PLUGIN_BASE', plugin_basename(ALPHAMAP_ADDONS_PL_ROOT));38 define( 'ALPHAMAP_VERSION', '1.3' ); 39 define( 'ALPHAMAP_ADDONS_PL_ROOT', __FILE__ ); 40 define( 'ALPHAMAP_PL_URL', plugins_url( '/', ALPHAMAP_ADDONS_PL_ROOT ) ); 41 define( 'ALPHAMAP_PL_PATH', plugin_dir_path( ALPHAMAP_ADDONS_PL_ROOT ) ); 42 define( 'ALPHAMAP_PL_ASSETS', trailingslashit( ALPHAMAP_PL_URL . 'assets' ) ); 43 define( 'ALPHAMAP_PL_INCLUDE', trailingslashit( ALPHAMAP_PL_PATH . 'include' ) ); 44 define( 'ALPHAMAP_PL_LANGUAGES', trailingslashit( ALPHAMAP_PL_PATH . 'languages' ) ); 45 define( 'ALPHAMAP_PLUGIN_BASE', plugin_basename( ALPHAMAP_ADDONS_PL_ROOT ) ); 45 46 46 function alpha_google_map_addon() 47 { 47 /** 48 * Initializes and runs the Alpha Google Map add-on by including the required plugin file 49 * and invoking the instance of the Alpha_Google_Map class. 50 * 51 * @return void 52 */ 53 function alpha_google_map_addon() { 48 54 49 // Load plugin file 50 include_once ALPHAMAP_PL_INCLUDE . '/class-alpha-google-map.php';55 // Load plugin file. 56 include_once ALPHAMAP_PL_INCLUDE . '/class-alpha-google-map.php'; 51 57 52 // Run the plugin 53 \AlphaGoogleMap\Alpha_Google_Map::instance();58 // Run the plugin. 59 \AlphaGoogleMap\Alpha_Google_Map::instance(); 54 60 } 55 add_action( 'plugins_loaded', 'alpha_google_map_addon');61 add_action( 'plugins_loaded', 'alpha_google_map_addon' ); -
alpha-google-map-for-elementor/trunk/assets/js/alpha-map.js
r3122305 r3276970 40 40 }; 41 41 42 if ("yes" === mapSettings.drag) 43 args.gestureHandling = "none"; 42 if ( settings.gestureHandling ) { 43 args.gestureHandling = settings.gestureHandling; 44 } 45 46 if ( "yes" === settings.drag ) { 47 args.gestureHandling = 'none'; 48 } 44 49 45 50 var markers = map.find(".alpha-pin"); -
alpha-google-map-for-elementor/trunk/include/class-alpha-google-map-widget.php
r3209591 r3276970 1 1 <?php 2 3 namespace AlphaGoogleMap;4 5 if (!defined('ABSPATH')) {6 exit; // If this file is called directly, abort.7 }8 9 2 /** 10 3 * Alpha Google Map Widget. 4 * 5 * @package AlphaGoogleMap 11 6 * */ 7 8 namespace AlphaGoogleMap; 9 10 if ( ! defined( 'ABSPATH' ) ) { 11 exit; // If this file is called directly, abort. 12 } 13 14 12 15 13 16 // Elementor Classes. … … 31 34 * @package Elementor 32 35 */ 33 class Alpha_Google_Map_Widget extends Widget_Base 34 { 35 /** 36 * Id of the widget. 37 * 38 * @return string 39 */ 40 public function get_name(): string 41 { 42 return 'alpha-google-map'; 43 } 44 45 /** 46 * Widget title. 47 * 48 * @return string|void 49 */ 50 public function get_title(): string 51 { 52 return __('Alpha Google Map', 'alpha-google-map-for-elementor'); 53 } 54 55 /** 56 * Widget Icon. 57 * 58 * @return string 59 */ 60 public function get_icon(): string 61 { 62 return 'eicon-google-maps'; 63 } 64 65 /** 66 * Widget keywords. 67 * 68 * @return array 69 */ 70 public function get_keywords(): array 71 { 72 return array('google', 'marker', 'pin'); 73 } 74 75 /** 76 * Register widget controls. 77 */ 78 protected function register_controls(): void 79 { 80 $this->start_controls_section( 81 'section_header', 82 array( 83 'label' => __('Map Window Location', 'alpha-google-map-for-elementor'), 84 ) 85 ); 86 87 $api_key = get_option('elementor_google_maps_api_key'); 88 if (!$api_key) { 89 $this->add_control( 90 'api_key_notification', 91 [ 92 'type' => Controls_Manager::RAW_HTML, 93 'raw' => sprintf( 94 /* translators: 1: Integration settings link open tag, 2: Create API key link open tag, 3: Link close tag. */ 95 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'), 96 '<a href="' . Settings::get_url() . '#tab-integrations" target="_blank">', 97 '<a href="https://developers.google.com/maps/documentation/embed/get-api-key" target="_blank">', 98 '</a>' 99 ), 100 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info', 101 ] 102 ); 103 } 104 105 $this->add_control( 106 'check_demo', 107 [ 108 'type' => Controls_Manager::RAW_HTML, 109 'raw' => sprintf( 110 /* translators: 1: Demo link open tag, 2: Link close tag. */ 111 esc_html__('Check this widget demo %1$shere%2$s.', 'alpha-google-map-for-elementor'), 112 '<a href="https://ali-ali.org/project/alpha-google-map-for-elementor/" target="_blank">', 113 '</a>' 114 ), 115 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info', 116 ] 117 ); 118 119 $this->add_control( 120 'alpha_location_lat', 121 array( 122 'label' => __('Location Latitude', 'alpha-google-map-for-elementor'), 123 'type' => Controls_Manager::TEXT, 124 'dynamic' => array('active' => true), 125 'description' => __('Enter your location latitude', 'alpha-google-map-for-elementor'), 126 'default' => '51.501156639895136', 127 'label_block' => true, 128 ) 129 ); 130 131 $this->add_control( 132 'alpha_location_long', 133 array( 134 'label' => __('Location Longitude', 'alpha-google-map-for-elementor'), 135 'type' => Controls_Manager::TEXT, 136 'dynamic' => array('active' => true), 137 'description' => __('Enter your location longitude', 'alpha-google-map-for-elementor'), 138 'default' => '-0.12479706299020504', 139 'label_block' => true, 140 ) 141 ); 142 143 $this->end_controls_section(); 144 145 $this->start_controls_section( 146 'alpha_map_pins_settings', 147 array( 148 'label' => __('Markers', 'alpha-google-map-for-elementor'), 149 ) 150 ); 151 152 $this->add_control( 153 'alpha_markers_width', 154 array( 155 'label' => __('Max Width', 'alpha-google-map-for-elementor'), 156 'type' => Controls_Manager::NUMBER, 157 'title' => __('Set the Maximum width for markers description box', 'alpha-google-map-for-elementor'), 158 ) 159 ); 160 161 $repeater = new REPEATER(); 162 $upload_dir = wp_upload_dir(); 163 $repeater->add_control( 164 'pin_icon', 165 array( 166 'label' => __('Custom Icon', 'alpha-google-map-for-elementor'), 167 'type' => Controls_Manager::MEDIA, 168 'default' => array( 169 'url' => $upload_dir['baseurl'] . '/alpha-map/alpha-pin.png', 170 ), 171 'dynamic' => array('active' => true), 172 ) 173 ); 174 175 $repeater->add_control( 176 'pin_active_icon', 177 array( 178 'label' => __('Icon On Active Pin', 'alpha-google-map-for-elementor'), 179 'type' => Controls_Manager::MEDIA, 180 'default' => array( 181 'url' => $upload_dir['baseurl'] . '/alpha-map/alpha-pin-hover.png', 182 ), 183 'dynamic' => array('active' => true), 184 'label_block' => true, 185 ) 186 ); 187 188 $repeater->add_control( 189 'pin_icon_size', 190 array( 191 'label' => __('Size', 'alpha-google-map-for-elementor'), 192 'type' => Controls_Manager::SLIDER, 193 'size_units' => array('px', 'em'), 194 'range' => array( 195 'px' => array( 196 'min' => 1, 197 'max' => 200, 198 ), 199 'em' => array( 200 'min' => 1, 201 'max' => 20, 202 ), 203 ), 204 ) 205 ); 206 207 $repeater->add_control( 208 'map_latitude', 209 array( 210 'label' => __('Pin Latitude', 'alpha-google-map-for-elementor'), 211 'type' => Controls_Manager::TEXT, 212 'dynamic' => array('active' => true), 213 'label_block' => true, 214 ) 215 ); 216 217 $repeater->add_control( 218 'map_longitude', 219 array( 220 'label' => __('Pin Longitude', 'alpha-google-map-for-elementor'), 221 'type' => Controls_Manager::TEXT, 222 'dynamic' => array('active' => true), 223 'label_block' => true, 224 ) 225 ); 226 227 $repeater->add_control( 228 'pin_title', 229 array( 230 'label' => __('Title', 'alpha-google-map-for-elementor'), 231 'type' => Controls_Manager::TEXT, 232 'dynamic' => array('active' => true), 233 'label_block' => true, 234 ) 235 ); 236 237 $repeater->add_control( 238 'pin_desc', 239 array( 240 'label' => __('Description', 'alpha-google-map-for-elementor'), 241 'type' => Controls_Manager::WYSIWYG, 242 'dynamic' => array('active' => true), 243 'label_block' => true, 244 ) 245 ); 246 247 $repeater->add_control( 248 'pin_time_desc', 249 array( 250 'label' => __('Time Table', 'alpha-google-map-for-elementor'), 251 'type' => Controls_Manager::WYSIWYG, 252 'dynamic' => array('active' => true), 253 'label_block' => true, 254 ) 255 ); 256 257 $repeater->add_control( 258 'pin_desc_gallery', 259 array( 260 'label' => __('Pin Gallery', 'alpha-google-map-for-elementor'), 261 'type' => Controls_Manager::GALLERY, 262 'dynamic' => array('active' => true), 263 'label_block' => true, 264 ) 265 ); 266 267 $this->add_control( 268 'alpha_map_pins', 269 array( 270 'label' => __('Map Pins', 'alpha-google-map-for-elementor'), 271 'type' => Controls_Manager::REPEATER, 272 'default' => array( 273 'map_latitude' => '51.501156639895136', 274 'map_longitude' => '-0.12479706299020504', 275 'pin_title' => __('Alpha Google Maps', 'alpha-google-map-for-elementor'), 276 'pin_desc' => __('Add an optional description to your map pin', 'alpha-google-map-for-elementor'), 277 'pin_time_desc' => __('Add a time table for the location pin', 'alpha-google-map-for-elementor'), 278 ), 279 'fields' => $repeater->get_controls(), 280 'title_field' => '{{{ pin_title }}}', 281 ) 282 ); 283 284 $this->end_controls_section(); 285 286 $this->start_controls_section( 287 'alpha_map_controls_section', 288 array( 289 'label' => __('Controls', 'alpha-google-map-for-elementor'), 290 ) 291 ); 292 293 $this->add_control( 294 'alpha_map_type', 295 array( 296 'label' => __('Map Type', 'alpha-google-map-for-elementor'), 297 'type' => Controls_Manager::SELECT, 298 'options' => array( 299 'roadmap' => __('Road Map', 'alpha-google-map-for-elementor'), 300 'satellite' => __('Satellite', 'alpha-google-map-for-elementor'), 301 'terrain' => __('Terrain', 'alpha-google-map-for-elementor'), 302 'hybrid' => __('Hybrid', 'alpha-google-map-for-elementor'), 303 ), 304 'default' => 'roadmap', 305 ) 306 ); 307 308 $this->add_responsive_control( 309 'alpha_map_height', 310 array( 311 'label' => __('Height', 'alpha-google-map-for-elementor'), 312 'type' => Controls_Manager::SLIDER, 313 'default' => array( 314 'size' => 500, 315 ), 316 'range' => array( 317 'px' => array( 318 'min' => 80, 319 'max' => 1400, 320 ), 321 ), 322 'selectors' => array( 323 '{{WRAPPER}} .alpha_map_height' => 'height: {{SIZE}}px;', 324 ), 325 ) 326 ); 327 328 $this->add_control( 329 'alpha_map_zoom', 330 array( 331 'label' => __('Zoom', 'alpha-google-map-for-elementor'), 332 'type' => Controls_Manager::SLIDER, 333 'default' => array( 334 'size' => 12, 335 ), 336 'range' => array( 337 'px' => array( 338 'min' => 0, 339 'max' => 22, 340 ), 341 ), 342 ) 343 ); 344 345 $this->add_control( 346 'disable_drag', 347 array( 348 'label' => __('Disable Map Drag', 'alpha-google-map-for-elementor'), 349 'type' => Controls_Manager::SWITCHER, 350 ) 351 ); 352 353 $this->add_control( 354 'alpha_map_option_map_type_control', 355 array( 356 'label' => __('Map Type Controls', 'alpha-google-map-for-elementor'), 357 'type' => Controls_Manager::SWITCHER, 358 ) 359 ); 360 361 $this->add_control( 362 'alpha_map_option_zoom_controls', 363 array( 364 'label' => __('Zoom Controls', 'alpha-google-map-for-elementor'), 365 'type' => Controls_Manager::SWITCHER, 366 ) 367 ); 368 369 $this->add_control( 370 'alpha_map_option_streeview', 371 array( 372 'label' => __('Street View Control', 'alpha-google-map-for-elementor'), 373 'type' => Controls_Manager::SWITCHER, 374 ) 375 ); 376 377 $this->add_control( 378 'alpha_map_option_fullscreen_control', 379 array( 380 'label' => __('Fullscreen Control', 'alpha-google-map-for-elementor'), 381 'type' => Controls_Manager::SWITCHER, 382 ) 383 ); 384 385 $this->add_control( 386 'alpha_map_option_mapscroll', 387 array( 388 'label' => __('Scroll Wheel Zoom', 'alpha-google-map-for-elementor'), 389 'type' => Controls_Manager::SWITCHER, 390 ) 391 ); 392 393 $this->add_control( 394 'alpha_map_marker_open', 395 array( 396 'label' => __('Info Container Always Opened', 'alpha-google-map-for-elementor'), 397 'type' => Controls_Manager::SWITCHER, 398 ) 399 ); 400 401 $this->add_control( 402 'alpha_map_marker_hover_open', 403 array( 404 'label' => __('Info Container Opened when Hovered', 'alpha-google-map-for-elementor'), 405 'type' => Controls_Manager::SWITCHER, 406 ) 407 ); 408 409 $this->add_control( 410 'alpha_map_marker_mouse_out', 411 array( 412 'label' => __('Info Container Closed when Mouse Out', 'alpha-google-map-for-elementor'), 413 'type' => Controls_Manager::SWITCHER, 414 'condition' => [ 415 'alpha_map_marker_hover_open' => 'yes', 416 ], 417 ) 418 ); 419 420 $this->end_controls_section(); 421 422 $this->start_controls_section( 423 'alpha_pin_title_style', 424 array( 425 'label' => __('Title', 'alpha-google-map-for-elementor'), 426 'tab' => Controls_Manager::TAB_STYLE, 427 ) 428 ); 429 430 $this->add_control( 431 'alpha_pin_title_color', 432 array( 433 'label' => __('Color', 'alpha-google-map-for-elementor'), 434 'type' => Controls_Manager::COLOR, 435 'global' => [ 436 'default' => Global_Colors::COLOR_PRIMARY, 437 ], 438 'selectors' => array( 439 '{{WRAPPER}} .alpha-map-info-title' => 'color: {{VALUE}};', 440 ), 441 ) 442 ); 443 444 $this->add_group_control( 445 Group_Control_Typography::get_type(), 446 array( 447 'name' => 'pin_title_typography', 448 'global' => [ 449 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 450 ], 451 'selector' => '{{WRAPPER}} .alpha-map-info-title', 452 ) 453 ); 454 455 $this->add_responsive_control( 456 'alpha_pin_title_margin', 457 array( 458 'label' => __('Margin', 'alpha-google-map-for-elementor'), 459 'type' => Controls_Manager::DIMENSIONS, 460 'size_units' => array('px', 'em', '%'), 461 'selectors' => array( 462 '{{WRAPPER}} .alpha-map-info-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 463 ), 464 ) 465 ); 466 467 $this->add_responsive_control( 468 'alpha_pin_title_padding', 469 array( 470 'label' => __('Padding', 'alpha-google-map-for-elementor'), 471 'type' => Controls_Manager::DIMENSIONS, 472 'size_units' => array('px', 'em', '%'), 473 'selectors' => array( 474 '{{WRAPPER}} .alpha-map-info-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 475 ), 476 ) 477 ); 478 479 $this->add_responsive_control( 480 'alpha_pin_title_align', 481 array( 482 'label' => __('Alignment', 'alpha-google-map-for-elementor'), 483 'type' => Controls_Manager::CHOOSE, 484 'options' => array( 485 'left' => array( 486 'title' => __('Left', 'alpha-google-map-for-elementor'), 487 'icon' => 'fa fa-align-left', 488 ), 489 'center' => array( 490 'title' => __('Center', 'alpha-google-map-for-elementor'), 491 'icon' => 'fa fa-align-center', 492 ), 493 'right' => array( 494 'title' => __('Right', 'alpha-google-map-for-elementor'), 495 'icon' => 'fa fa-align-right', 496 ), 497 ), 498 'default' => 'center', 499 'selectors' => array( 500 '{{WRAPPER}} .alpha-map-info-title' => 'text-align: {{VALUE}};', 501 ), 502 ) 503 ); 504 505 $this->end_controls_section(); 506 507 $this->start_controls_section( 508 'alpha_pin_text_style', 509 array( 510 'label' => __('Description', 'alpha-google-map-for-elementor'), 511 'tab' => Controls_Manager::TAB_STYLE, 512 ) 513 ); 514 515 $this->add_control( 516 'alpha_pin_text_color', 517 array( 518 'label' => __('Color', 'alpha-google-map-for-elementor'), 519 'type' => Controls_Manager::COLOR, 520 'global' => [ 521 'default' => Global_Colors::COLOR_SECONDARY, 522 ], 523 'selectors' => array( 524 '{{WRAPPER}} .alpha-map-info-desc' => 'color: {{VALUE}};', 525 ), 526 ) 527 ); 528 529 $this->add_group_control( 530 Group_Control_Typography::get_type(), 531 array( 532 'name' => 'pin_text_typo', 533 'global' => [ 534 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 535 ], 536 'selector' => '{{WRAPPER}} .alpha-map-info-desc', 537 ) 538 ); 539 540 $this->add_responsive_control( 541 'alpha_pin_text_margin', 542 array( 543 'label' => __('Margin', 'alpha-google-map-for-elementor'), 544 'type' => Controls_Manager::DIMENSIONS, 545 'size_units' => array('px', 'em', '%'), 546 'selectors' => array( 547 '{{WRAPPER}} .alpha-map-info-desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 548 ), 549 ) 550 ); 551 552 $this->add_responsive_control( 553 'alpha_pin_text_padding', 554 array( 555 'label' => __('Padding', 'alpha-google-map-for-elementor'), 556 'type' => Controls_Manager::DIMENSIONS, 557 'size_units' => array('px', 'em', '%'), 558 'selectors' => array( 559 '{{WRAPPER}} .alpha-map-info-desc' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 560 ), 561 ) 562 ); 563 564 $this->add_responsive_control( 565 'alpha_pin_description_align', 566 array( 567 'label' => __('Alignment', 'alpha-google-map-for-elementor'), 568 'type' => Controls_Manager::CHOOSE, 569 'options' => array( 570 'left' => array( 571 'title' => __('Left', 'alpha-google-map-for-elementor'), 572 'icon' => 'fa fa-align-left', 573 ), 574 'center' => array( 575 'title' => __('Center', 'alpha-google-map-for-elementor'), 576 'icon' => 'fa fa-align-center', 577 ), 578 'right' => array( 579 'title' => __('Right', 'alpha-google-map-for-elementor'), 580 'icon' => 'fa fa-align-right', 581 ), 582 ), 583 'default' => 'center', 584 'selectors' => array( 585 '{{WRAPPER}} .alpha-map-info-desc' => 'text-align: {{VALUE}};', 586 ), 587 ) 588 ); 589 590 $this->end_controls_section(); 591 592 $this->start_controls_section( 593 'alpha_pin_time_style', 594 array( 595 'label' => __('Time Table', 'alpha-google-map-for-elementor'), 596 'tab' => Controls_Manager::TAB_STYLE, 597 ) 598 ); 599 600 $this->add_control( 601 'alpha_pin_time_color', 602 array( 603 'label' => __('Color', 'alpha-google-map-for-elementor'), 604 'type' => Controls_Manager::COLOR, 605 'global' => [ 606 'default' => Global_Colors::COLOR_SECONDARY, 607 ], 608 'selectors' => array( 609 '{{WRAPPER}} .alpha-map-info-time-desc' => 'color: {{VALUE}};', 610 ), 611 ) 612 ); 613 614 $this->add_group_control( 615 Group_Control_Typography::get_type(), 616 array( 617 'name' => 'pin_time_typo', 618 'global' => [ 619 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 620 ], 621 'selector' => '{{WRAPPER}} .alpha-map-info-time-desc', 622 ) 623 ); 624 625 $this->add_responsive_control( 626 'alpha_pin_time_margin', 627 array( 628 'label' => __('Margin', 'alpha-google-map-for-elementor'), 629 'type' => Controls_Manager::DIMENSIONS, 630 'size_units' => array('px', 'em', '%'), 631 'selectors' => array( 632 '{{WRAPPER}} .alpha-map-info-time-desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 633 ), 634 ) 635 ); 636 637 $this->add_responsive_control( 638 'alpha_pin_time_padding', 639 array( 640 'label' => __('Padding', 'alpha-google-map-for-elementor'), 641 'type' => Controls_Manager::DIMENSIONS, 642 'size_units' => array('px', 'em', '%'), 643 'selectors' => array( 644 '{{WRAPPER}} .alpha-map-info-time-desc' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 645 ), 646 ) 647 ); 648 649 $this->add_responsive_control( 650 'alpha_pin_time_align', 651 array( 652 'label' => __('Alignment', 'alpha-google-map-for-elementor'), 653 'type' => Controls_Manager::CHOOSE, 654 'options' => array( 655 'left' => array( 656 'title' => __('Left', 'alpha-google-map-for-elementor'), 657 'icon' => 'fa fa-align-left', 658 ), 659 'center' => array( 660 'title' => __('Center', 'alpha-google-map-for-elementor'), 661 'icon' => 'fa fa-align-center', 662 ), 663 'right' => array( 664 'title' => __('Right', 'alpha-google-map-for-elementor'), 665 'icon' => 'fa fa-align-right', 666 ), 667 ), 668 'default' => 'center', 669 'selectors' => array( 670 '{{WRAPPER}} .alpha-map-info-time-desc' => 'text-align: {{VALUE}};', 671 ), 672 ) 673 ); 674 675 $this->end_controls_section(); 676 677 $this->start_controls_section( 678 'alpha_box_style', 679 array( 680 'label' => __('Map', 'alpha-google-map-for-elementor'), 681 'tab' => Controls_Manager::TAB_STYLE, 682 ) 683 ); 684 685 $this->add_group_control( 686 Group_Control_Border::get_type(), 687 array( 688 'name' => 'map_border', 689 'selector' => '{{WRAPPER}} .alpha-map-container', 690 ) 691 ); 692 693 $this->add_control( 694 'alpha_box_radius', 695 array( 696 'label' => __('Border Radius', 'alpha-google-map-for-elementor'), 697 'type' => Controls_Manager::SLIDER, 698 'size_units' => array('px', '%', 'em'), 699 'selectors' => array( 700 '{{WRAPPER}} .alpha-map-container,{{WRAPPER}} .alpha_map_height' => 'border-radius: {{SIZE}}{{UNIT}};', 701 ), 702 ) 703 ); 704 705 $this->add_group_control( 706 Group_Control_Box_Shadow::get_type(), 707 array( 708 'label' => __('Shadow', 'alpha-google-map-for-elementor'), 709 'name' => 'alpha_map_box_shadow', 710 'selector' => '{{WRAPPER}} .alpha-map-container', 711 ) 712 ); 713 714 $this->add_responsive_control( 715 'alpha_box_margin', 716 array( 717 'label' => __('Margin', 'alpha-google-map-for-elementor'), 718 'type' => Controls_Manager::DIMENSIONS, 719 'size_units' => array('px', 'em', '%'), 720 'selectors' => array( 721 '{{WRAPPER}} .alpha-map-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', 722 ), 723 ) 724 ); 725 726 $this->add_responsive_control( 727 'alpha_box_padding', 728 array( 729 'label' => __('Padding', 'alpha-google-map-for-elementor'), 730 'type' => Controls_Manager::DIMENSIONS, 731 'size_units' => array('px', 'em', '%'), 732 'selectors' => array( 733 '{{WRAPPER}} .alpha-map-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', 734 ), 735 ) 736 ); 737 738 $this->end_controls_section(); 739 740 // Map Title Controls. 741 $this->start_controls_section( 742 'section_title', 743 array( 744 'label' => __('Map Title', 'alpha-google-map-for-elementor'), 745 ) 746 ); 747 748 $this->add_control( 749 'title', 750 array( 751 'label' => __('Map Title', 'alpha-google-map-for-elementor'), 752 'type' => Controls_Manager::TEXTAREA, 753 'dynamic' => array( 754 'active' => true, 755 ), 756 'placeholder' => __('Enter your title', 'alpha-google-map-for-elementor'), 757 'default' => __('Add Your Title Text Here', 'alpha-google-map-for-elementor'), 758 ) 759 ); 760 761 $this->add_control( 762 'link', 763 array( 764 'label' => __('Link', 'alpha-google-map-for-elementor'), 765 'type' => Controls_Manager::URL, 766 'dynamic' => array( 767 'active' => true, 768 ), 769 'default' => array( 770 'url' => '', 771 ), 772 'separator' => 'before', 773 ) 774 ); 775 776 $this->add_control( 777 'size', 778 array( 779 'label' => __('Size', 'alpha-google-map-for-elementor'), 780 'type' => Controls_Manager::SELECT, 781 'default' => 'default', 782 'options' => array( 783 'default' => __('Default', 'alpha-google-map-for-elementor'), 784 'small' => __('Small', 'alpha-google-map-for-elementor'), 785 'medium' => __('Medium', 'alpha-google-map-for-elementor'), 786 'large' => __('Large', 'alpha-google-map-for-elementor'), 787 'xl' => __('XL', 'alpha-google-map-for-elementor'), 788 'xxl' => __('XXL', 'alpha-google-map-for-elementor'), 789 ), 790 ) 791 ); 792 793 $this->add_control( 794 'header_size', 795 array( 796 'label' => __('HTML Tag', 'alpha-google-map-for-elementor'), 797 'type' => Controls_Manager::SELECT, 798 'options' => array( 799 'h1' => 'H1', 800 'h2' => 'H2', 801 'h3' => 'H3', 802 'h4' => 'H4', 803 'h5' => 'H5', 804 'h6' => 'H6', 805 'div' => 'div', 806 'span' => 'span', 807 'p' => 'p', 808 ), 809 'default' => 'h2', 810 ) 811 ); 812 813 $this->add_responsive_control( 814 'align', 815 array( 816 'label' => __('Alignment', 'alpha-google-map-for-elementor'), 817 'type' => Controls_Manager::CHOOSE, 818 'options' => array( 819 'left' => array( 820 'title' => __('Left', 'alpha-google-map-for-elementor'), 821 'icon' => 'eicon-text-align-left', 822 ), 823 'center' => array( 824 'title' => __('Center', 'alpha-google-map-for-elementor'), 825 'icon' => 'eicon-text-align-center', 826 ), 827 'right' => array( 828 'title' => __('Right', 'alpha-google-map-for-elementor'), 829 'icon' => 'eicon-text-align-right', 830 ), 831 'justify' => array( 832 'title' => __('Justified', 'alpha-google-map-for-elementor'), 833 'icon' => 'eicon-text-align-justify', 834 ), 835 ), 836 'default' => '', 837 'selectors' => array( 838 '{{WRAPPER}}' => 'text-align: {{VALUE}};', 839 ), 840 ) 841 ); 842 843 $this->add_control( 844 'view', 845 array( 846 'label' => __('View', 'alpha-google-map-for-elementor'), 847 'type' => Controls_Manager::HIDDEN, 848 'default' => 'traditional', 849 ) 850 ); 851 852 $this->end_controls_section(); 853 854 // Map Title Style. 855 $this->start_controls_section( 856 'section_title_style', 857 array( 858 'label' => __('Map Title', 'alpha-google-map-for-elementor'), 859 'tab' => Controls_Manager::TAB_STYLE, 860 ) 861 ); 862 863 $this->add_control( 864 'title_color', 865 array( 866 'label' => __('Text Color', 'alpha-google-map-for-elementor'), 867 'type' => Controls_Manager::COLOR, 868 'global' => array( 869 'default' => Global_Colors::COLOR_PRIMARY, 870 ), 871 'selectors' => array( 872 '{{WRAPPER}} .alpha-map-title' => 'color: {{VALUE}};', 873 ), 874 ) 875 ); 876 877 $this->add_group_control( 878 Group_Control_Typography::get_type(), 879 array( 880 'name' => 'typography', 881 'global' => array( 882 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 883 ), 884 'selector' => '{{WRAPPER}} .alpha-map-title', 885 ) 886 ); 887 888 $this->add_group_control( 889 Group_Control_Text_Shadow::get_type(), 890 array( 891 'name' => 'text_shadow', 892 'selector' => '{{WRAPPER}} .alpha-map-title', 893 ) 894 ); 895 896 $this->add_responsive_control( 897 'title_margin', 898 array( 899 'label' => __('Margin', 'alpha-google-map-for-elementor'), 900 'type' => Controls_Manager::DIMENSIONS, 901 'size_units' => array('px', 'em', '%'), 902 'selectors' => array( 903 '{{WRAPPER}} .alpha-map-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 904 ), 905 ) 906 ); 907 908 $this->add_responsive_control( 909 'title_padding', 910 array( 911 'label' => __('Padding', 'alpha-google-map-for-elementor'), 912 'type' => Controls_Manager::DIMENSIONS, 913 'size_units' => array('px', 'em', '%'), 914 'selectors' => array( 915 '{{WRAPPER}} .alpha-map-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 916 ), 917 ) 918 ); 919 920 $this->end_controls_section(); 921 } 922 923 /** 924 * Show the count of how many images left in the gallery 925 * 926 * @param string $link_html link for an image. 927 * @param string $id the id of an image. 928 * 929 * @return string|string[]|null 930 */ 931 public function add_lightbox_data_to_image_link($link_html, $id) 932 { 933 $settings = $this->get_settings_for_display(); 934 $open_lightbox = isset($settings['open_lightbox']) ? $settings['open_lightbox'] : null; 935 936 if (Plugin::$instance->editor->is_edit_mode()) { 937 $this->add_render_attribute('link', 'class', 'elementor-clickable', true); 938 } 939 940 $this->add_lightbox_data_attributes('link', $id, $open_lightbox, $this->get_id(), true); 941 return preg_replace('/^<a/', '<a ' . $this->get_render_attribute_string('link'), $link_html); 942 } 943 944 /** 945 * Render the widget on the frontend. 946 */ 947 protected function render() 948 { 949 $settings = $this->get_settings_for_display(); 950 951 $map_pins = $settings['alpha_map_pins']; 952 953 $street_view = 'yes' === $settings['alpha_map_option_streeview'] ? 'true' : 'false'; 954 955 $scroll_wheel = 'yes' === $settings['alpha_map_option_mapscroll'] ? 'true' : 'false'; 956 957 $full_screen = 'yes' === $settings['alpha_map_option_fullscreen_control'] ? 'true' : 'false'; 958 959 $zoom_control = 'yes' === $settings['alpha_map_option_zoom_controls'] ? 'true' : 'false'; 960 961 $type_control = 'yes' === $settings['alpha_map_option_map_type_control'] ? 'true' : 'false'; 962 963 $automatic_open = 'yes' === $settings['alpha_map_marker_open'] ? 'true' : 'false'; 964 965 $hover_open = 'yes' === $settings['alpha_map_marker_hover_open'] ? 'true' : 'false'; 966 967 $hover_close = 'yes' === $settings['alpha_map_marker_mouse_out'] ? 'true' : 'false'; 968 969 $locationlat = ! empty($settings['alpha_location_lat']) ? sanitize_text_field($settings['alpha_location_lat']) : '18.591212'; 970 971 $locationlong = ! empty($settings['alpha_location_long']) ? sanitize_text_field($settings['alpha_location_long']) : '73.741261'; 972 973 $marker_width = !empty($settings['alpha_markers_width']) ? $settings['alpha_markers_width'] : 1000; 974 975 $map_settings = array( 976 'zoom' => $settings['alpha_map_zoom']['size'], 977 'maptype' => $settings['alpha_map_type'], 978 'streetViewControl' => $street_view, 979 'locationlat' => $locationlat, 980 'locationlong' => $locationlong, 981 'scrollwheel' => $scroll_wheel, 982 'fullScreen' => $full_screen, 983 'zoomControl' => $zoom_control, 984 'typeControl' => $type_control, 985 'automaticOpen' => $automatic_open, 986 'hoverOpen' => $hover_open, 987 'hoverClose' => $hover_close, 988 'drag' => $settings['disable_drag'], 989 ); 990 991 $this->add_render_attribute( 992 'style_wrapper', 993 array( 994 'class' => 'alpha_map_height', 995 'data-settings' => wp_json_encode($map_settings), 996 ) 997 ); 998 999 ?> 1000 <div class="alpha-map-container" id="alpha-map-container"> 1001 <div class="alpha-google-map-title"> 1002 <?php 1003 if (!empty($settings['title'])) { 1004 // Add class for the title 1005 $this->add_render_attribute('title', 'class', 'alpha-map-title'); 1006 // Check and add size class if provided 1007 if (!empty($settings['size'])) { 1008 $this->add_render_attribute('title', 'class', 'elementor-size-' . sanitize_html_class($settings['size'])); 1009 } 1010 // Allow inline editing of the title 1011 $this->add_inline_editing_attributes('title'); 1012 1013 // Sanitize the title 1014 $title = sanitize_text_field($settings['title']); 1015 // If a link is provided, sanitize and set attributes 1016 if (!empty($settings['link']['url'])) { 1017 $settings['link'] = wp_parse_args($settings['link'], ['url' => '', 'is_external' => '', 'nofollow' => '']); 1018 $this->add_link_attributes('url', $settings['link']); 1019 1020 $title = sprintf( 1021 '<a %1$s>%2$s</a>', 1022 $this->get_render_attribute_string('url'), 1023 esc_html($title) 1024 ); 1025 } 1026 1027 // Validate and sanitize the header size tag 1028 $header_tag = Utils::validate_html_tag($settings['header_size']); 1029 1030 // Construct the title HTML with proper escaping 1031 $title_html = sprintf( 1032 '<%1$s %2$s>%3$s</%1$s>', 1033 esc_html($header_tag), 1034 $this->get_render_attribute_string('title'), 1035 $title 1036 ); 1037 1038 // Sanitize the entire output 1039 echo wp_kses( 1040 $title_html, 1041 [ 1042 'a' => [ 1043 'href' => [], 1044 'target' => [], 1045 'rel' => [], 1046 'class' => [] 1047 ], 1048 $header_tag => [ 1049 'class' => [], 1050 'id' => [], 1051 'style' => [] 1052 ] 1053 ] 1054 ); 1055 } 1056 ?> 1057 </div> 1058 <?php if (! empty($map_pins)) { ?> 1059 <div <?php echo wp_kses_post($this->get_render_attribute_string('style_wrapper')); ?>> 1060 <?php 1061 foreach ($map_pins as $index => $pin) { 1062 $key = 'map_marker_' . $index; 1063 // Sanitize data before use 1064 $latitude = isset($pin['map_latitude']) ? sanitize_text_field($pin['map_latitude']) : ''; 1065 $longitude = isset($pin['map_longitude']) ? sanitize_text_field($pin['map_longitude']) : ''; 1066 $icon_url = isset($pin['pin_icon']['url']) ? esc_url($pin['pin_icon']['url']) : ''; 1067 $icon_active_url = isset($pin['pin_active_icon']['url']) ? esc_url($pin['pin_active_icon']['url']) : ''; 1068 $icon_size = isset($pin['pin_icon_size']['size']) ? intval($pin['pin_icon_size']['size']) : ''; 1069 $data_max_width = isset($marker_width) ? intval($marker_width) : ''; 1070 $data_id = intval($index); 1071 1072 $this->add_render_attribute( 1073 $key, 1074 array( 1075 'class' => 'alpha-pin', 1076 'data-lng' => $longitude, 1077 'data-lat' => $latitude, 1078 'data-icon' => $icon_url, 1079 'data-icon-active' => $icon_active_url, 1080 'data-icon-size' => $icon_size, 1081 'data-max-width' => $data_max_width, 1082 'data-id' => $data_id, 1083 ) 1084 ); 1085 1086 // Sanitize IDs 1087 $ids = array_map('intval', wp_list_pluck($pin['pin_desc_gallery'], 'id')); 1088 $count = count($ids); 1089 $data_count = absint($count - 4); 1090 $this->add_render_attribute('shortcode' . $index, 'ids', implode(',', $ids)); 1091 1092 ?> 1093 <div <?php echo wp_kses_post($this->get_render_attribute_string($key)); ?>> 1094 <?php if (!empty($pin['pin_title']) || !empty($pin['pin_desc']) || !empty($pin['pin_time_desc'])) : ?> 1095 <div class='alpha-map-info-container'> 1096 <p class='alpha-map-info-title'><?php echo wp_kses_post($pin['pin_title']); ?></p> 1097 <div class='alpha-map-info-desc'><?php echo wp_kses_post($pin['pin_desc']); ?></div> 1098 <div class='alpha-map-info-time-desc'><?php echo wp_kses_post($pin['pin_time_desc']); ?></div> 1099 <?php if (!empty($pin['pin_desc_gallery'])) : ?> 1100 <div class="alpha-image-gallery" data-count="<?php echo esc_attr($data_count); ?>"> 1101 <?php 1102 add_filter('wp_get_attachment_link', array($this, 'add_lightbox_data_to_image_link'), 10, 2); 1103 echo do_shortcode('[gallery link="file" ' . $this->get_render_attribute_string('shortcode' . $index) . ']'); 1104 remove_filter('wp_get_attachment_link', array($this, 'add_lightbox_data_to_image_link')); 1105 ?> 1106 </div> 1107 <?php endif; ?> 1108 </div> 1109 <?php endif; ?> 1110 </div> 1111 <?php 1112 } 1113 ?> 1114 </div> 1115 <?php 1116 } 1117 ?> 1118 </div> 1119 <?php 1120 } 36 class Alpha_Google_Map_Widget extends Widget_Base { 37 38 /** 39 * Id of the widget. 40 * 41 * @return string 42 */ 43 public function get_name(): string { 44 return 'alpha-google-map'; 45 } 46 47 /** 48 * Widget title. 49 * 50 * @return string|void 51 */ 52 public function get_title(): string { 53 return __( 'Alpha Google Map', 'alpha-google-map-for-elementor' ); 54 } 55 56 /** 57 * Widget Icon. 58 * 59 * @return string 60 */ 61 public function get_icon(): string { 62 return 'eicon-google-maps'; 63 } 64 65 /** 66 * Widget keywords. 67 * 68 * @return array 69 */ 70 public function get_keywords(): array { 71 return array( 'google', 'marker', 'pin' ); 72 } 73 74 /** 75 * Register widget controls. 76 */ 77 protected function register_controls(): void { 78 $this->start_controls_section( 79 'section_header', 80 array( 81 'label' => __( 'Map Window Location', 'alpha-google-map-for-elementor' ), 82 ) 83 ); 84 85 $api_key = get_option( 'elementor_google_maps_api_key' ); 86 if ( ! $api_key ) { 87 $this->add_control( 88 'api_key_notification', 89 array( 90 'type' => Controls_Manager::RAW_HTML, 91 'raw' => sprintf( 92 /* translators: 1: Integration settings link open tag, 2: Create API key link open tag, 3: Link close tag. */ 93 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' ), 94 '<a href="' . Settings::get_url() . '#tab-integrations" target="_blank">', 95 '<a href="https://developers.google.com/maps/documentation/embed/get-api-key" target="_blank">', 96 '</a>' 97 ), 98 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info', 99 ) 100 ); 101 } 102 103 $this->add_control( 104 'check_demo', 105 array( 106 'type' => Controls_Manager::RAW_HTML, 107 'raw' => sprintf( 108 /* translators: 1: Demo link open tag, 2: Link close tag. */ 109 esc_html__( 'Check this widget demo %1$shere%2$s.', 'alpha-google-map-for-elementor' ), 110 '<a href="https://ali-ali.org/project/alpha-google-map-for-elementor/" target="_blank">', 111 '</a>' 112 ), 113 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info', 114 ) 115 ); 116 117 $this->add_control( 118 'alpha_location_lat', 119 array( 120 'label' => __( 'Location Latitude', 'alpha-google-map-for-elementor' ), 121 'type' => Controls_Manager::TEXT, 122 'dynamic' => array( 'active' => true ), 123 'description' => __( 'Enter your location latitude', 'alpha-google-map-for-elementor' ), 124 'default' => '51.501156639895136', 125 'label_block' => true, 126 ) 127 ); 128 129 $this->add_control( 130 'alpha_location_long', 131 array( 132 'label' => __( 'Location Longitude', 'alpha-google-map-for-elementor' ), 133 'type' => Controls_Manager::TEXT, 134 'dynamic' => array( 'active' => true ), 135 'description' => __( 'Enter your location longitude', 'alpha-google-map-for-elementor' ), 136 'default' => '-0.12479706299020504', 137 'label_block' => true, 138 ) 139 ); 140 141 $this->end_controls_section(); 142 143 $this->start_controls_section( 144 'alpha_map_pins_settings', 145 array( 146 'label' => __( 'Markers', 'alpha-google-map-for-elementor' ), 147 ) 148 ); 149 150 $this->add_control( 151 'alpha_markers_width', 152 array( 153 'label' => __( 'Max Width', 'alpha-google-map-for-elementor' ), 154 'type' => Controls_Manager::NUMBER, 155 'title' => __( 'Set the Maximum width for markers description box', 'alpha-google-map-for-elementor' ), 156 ) 157 ); 158 159 $repeater = new REPEATER(); 160 $upload_dir = wp_upload_dir(); 161 $repeater->add_control( 162 'pin_icon', 163 array( 164 'label' => __( 'Custom Icon', 'alpha-google-map-for-elementor' ), 165 'type' => Controls_Manager::MEDIA, 166 'default' => array( 167 'url' => $upload_dir['baseurl'] . '/alpha-map/alpha-pin.png', 168 ), 169 'dynamic' => array( 'active' => true ), 170 ) 171 ); 172 173 $repeater->add_control( 174 'pin_active_icon', 175 array( 176 'label' => __( 'Icon On Active Pin', 'alpha-google-map-for-elementor' ), 177 'type' => Controls_Manager::MEDIA, 178 'default' => array( 179 'url' => $upload_dir['baseurl'] . '/alpha-map/alpha-pin-hover.png', 180 ), 181 'dynamic' => array( 'active' => true ), 182 'label_block' => true, 183 ) 184 ); 185 186 $repeater->add_control( 187 'pin_icon_size', 188 array( 189 'label' => __( 'Size', 'alpha-google-map-for-elementor' ), 190 'type' => Controls_Manager::SLIDER, 191 'size_units' => array( 'px', 'em' ), 192 'range' => array( 193 'px' => array( 194 'min' => 1, 195 'max' => 200, 196 ), 197 'em' => array( 198 'min' => 1, 199 'max' => 20, 200 ), 201 ), 202 ) 203 ); 204 205 $repeater->add_control( 206 'map_latitude', 207 array( 208 'label' => __( 'Pin Latitude', 'alpha-google-map-for-elementor' ), 209 'type' => Controls_Manager::TEXT, 210 'dynamic' => array( 'active' => true ), 211 'label_block' => true, 212 ) 213 ); 214 215 $repeater->add_control( 216 'map_longitude', 217 array( 218 'label' => __( 'Pin Longitude', 'alpha-google-map-for-elementor' ), 219 'type' => Controls_Manager::TEXT, 220 'dynamic' => array( 'active' => true ), 221 'label_block' => true, 222 ) 223 ); 224 225 $repeater->add_control( 226 'pin_title', 227 array( 228 'label' => __( 'Title', 'alpha-google-map-for-elementor' ), 229 'type' => Controls_Manager::TEXT, 230 'dynamic' => array( 'active' => true ), 231 'label_block' => true, 232 ) 233 ); 234 235 $repeater->add_control( 236 'pin_desc', 237 array( 238 'label' => __( 'Description', 'alpha-google-map-for-elementor' ), 239 'type' => Controls_Manager::WYSIWYG, 240 'dynamic' => array( 'active' => true ), 241 'label_block' => true, 242 ) 243 ); 244 245 $repeater->add_control( 246 'pin_time_desc', 247 array( 248 'label' => __( 'Time Table', 'alpha-google-map-for-elementor' ), 249 'type' => Controls_Manager::WYSIWYG, 250 'dynamic' => array( 'active' => true ), 251 'label_block' => true, 252 ) 253 ); 254 255 $repeater->add_control( 256 'pin_desc_gallery', 257 array( 258 'label' => __( 'Pin Gallery', 'alpha-google-map-for-elementor' ), 259 'type' => Controls_Manager::GALLERY, 260 'dynamic' => array( 'active' => true ), 261 'label_block' => true, 262 ) 263 ); 264 265 $this->add_control( 266 'alpha_map_pins', 267 array( 268 'label' => __( 'Map Pins', 'alpha-google-map-for-elementor' ), 269 'type' => Controls_Manager::REPEATER, 270 'default' => array( 271 'map_latitude' => '51.501156639895136', 272 'map_longitude' => '-0.12479706299020504', 273 'pin_title' => __( 'Alpha Google Maps', 'alpha-google-map-for-elementor' ), 274 'pin_desc' => __( 'Add an optional description to your map pin', 'alpha-google-map-for-elementor' ), 275 'pin_time_desc' => __( 'Add a time table for the location pin', 'alpha-google-map-for-elementor' ), 276 ), 277 'fields' => $repeater->get_controls(), 278 'title_field' => '{{{ pin_title }}}', 279 ) 280 ); 281 282 $this->end_controls_section(); 283 284 $this->start_controls_section( 285 'alpha_map_controls_section', 286 array( 287 'label' => __( 'Controls', 'alpha-google-map-for-elementor' ), 288 ) 289 ); 290 291 $this->add_control( 292 'alpha_map_type', 293 array( 294 'label' => __( 'Map Type', 'alpha-google-map-for-elementor' ), 295 'type' => Controls_Manager::SELECT, 296 'options' => array( 297 'roadmap' => __( 'Road Map', 'alpha-google-map-for-elementor' ), 298 'satellite' => __( 'Satellite', 'alpha-google-map-for-elementor' ), 299 'terrain' => __( 'Terrain', 'alpha-google-map-for-elementor' ), 300 'hybrid' => __( 'Hybrid', 'alpha-google-map-for-elementor' ), 301 ), 302 'default' => 'roadmap', 303 ) 304 ); 305 306 $this->add_responsive_control( 307 'alpha_map_height', 308 array( 309 'label' => __( 'Height', 'alpha-google-map-for-elementor' ), 310 'type' => Controls_Manager::SLIDER, 311 'default' => array( 312 'size' => 500, 313 ), 314 'range' => array( 315 'px' => array( 316 'min' => 80, 317 'max' => 1400, 318 ), 319 ), 320 'selectors' => array( 321 '{{WRAPPER}} .alpha_map_height' => 'height: {{SIZE}}px;', 322 ), 323 ) 324 ); 325 326 $this->add_control( 327 'alpha_map_zoom', 328 array( 329 'label' => __( 'Zoom', 'alpha-google-map-for-elementor' ), 330 'type' => Controls_Manager::SLIDER, 331 'default' => array( 332 'size' => 12, 333 ), 334 'range' => array( 335 'px' => array( 336 'min' => 0, 337 'max' => 22, 338 ), 339 ), 340 ) 341 ); 342 343 $this->add_control( 344 'disable_drag', 345 array( 346 'label' => __( 'Disable Map Drag', 'alpha-google-map-for-elementor' ), 347 'type' => Controls_Manager::SWITCHER, 348 ) 349 ); 350 351 $this->add_control( 352 'alpha_map_option_map_type_control', 353 array( 354 'label' => __( 'Map Type Controls', 'alpha-google-map-for-elementor' ), 355 'type' => Controls_Manager::SWITCHER, 356 ) 357 ); 358 359 $this->add_control( 360 'alpha_map_option_zoom_controls', 361 array( 362 'label' => __( 'Zoom Controls', 'alpha-google-map-for-elementor' ), 363 'type' => Controls_Manager::SWITCHER, 364 ) 365 ); 366 367 $this->add_control( 368 'alpha_map_option_streeview', 369 array( 370 'label' => __( 'Street View Control', 'alpha-google-map-for-elementor' ), 371 'type' => Controls_Manager::SWITCHER, 372 ) 373 ); 374 375 $this->add_control( 376 'alpha_map_option_fullscreen_control', 377 array( 378 'label' => __( 'Fullscreen Control', 'alpha-google-map-for-elementor' ), 379 'type' => Controls_Manager::SWITCHER, 380 ) 381 ); 382 383 $this->add_control( 384 'alpha_map_option_mapscroll', 385 array( 386 'label' => __( 'Scroll Wheel Zoom', 'alpha-google-map-for-elementor' ), 387 'type' => Controls_Manager::SWITCHER, 388 ) 389 ); 390 391 $this->add_control( 392 'alpha_map_gesture_handling', 393 array( 394 'label' => __( 'One‑Finger Scroll (Gesture Handling)', 'alpha-google-map-for-elementor' ), 395 'type' => Controls_Manager::SWITCHER, 396 'label_on' => __( 'Enabled', 'alpha-google-map-for-elementor' ), 397 'label_off' => __( 'Disabled', 'alpha-google-map-for-elementor' ), 398 'return_value' => 'yes', 399 'default' => '', 400 ) 401 ); 402 403 $this->add_control( 404 'alpha_map_marker_open', 405 array( 406 'label' => __( 'Info Container Always Opened', 'alpha-google-map-for-elementor' ), 407 'type' => Controls_Manager::SWITCHER, 408 ) 409 ); 410 411 $this->add_control( 412 'alpha_map_marker_hover_open', 413 array( 414 'label' => __( 'Info Container Opened when Hovered', 'alpha-google-map-for-elementor' ), 415 'type' => Controls_Manager::SWITCHER, 416 ) 417 ); 418 419 $this->add_control( 420 'alpha_map_marker_mouse_out', 421 array( 422 'label' => __( 'Info Container Closed when Mouse Out', 'alpha-google-map-for-elementor' ), 423 'type' => Controls_Manager::SWITCHER, 424 'condition' => array( 425 'alpha_map_marker_hover_open' => 'yes', 426 ), 427 ) 428 ); 429 430 $this->end_controls_section(); 431 432 $this->start_controls_section( 433 'alpha_pin_title_style', 434 array( 435 'label' => __( 'Title', 'alpha-google-map-for-elementor' ), 436 'tab' => Controls_Manager::TAB_STYLE, 437 ) 438 ); 439 440 $this->add_control( 441 'alpha_pin_title_color', 442 array( 443 'label' => __( 'Color', 'alpha-google-map-for-elementor' ), 444 'type' => Controls_Manager::COLOR, 445 'global' => array( 446 'default' => Global_Colors::COLOR_PRIMARY, 447 ), 448 'selectors' => array( 449 '{{WRAPPER}} .alpha-map-info-title' => 'color: {{VALUE}};', 450 ), 451 ) 452 ); 453 454 $this->add_group_control( 455 Group_Control_Typography::get_type(), 456 array( 457 'name' => 'pin_title_typography', 458 'global' => array( 459 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 460 ), 461 'selector' => '{{WRAPPER}} .alpha-map-info-title', 462 ) 463 ); 464 465 $this->add_responsive_control( 466 'alpha_pin_title_margin', 467 array( 468 'label' => __( 'Margin', 'alpha-google-map-for-elementor' ), 469 'type' => Controls_Manager::DIMENSIONS, 470 'size_units' => array( 'px', 'em', '%' ), 471 'selectors' => array( 472 '{{WRAPPER}} .alpha-map-info-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 473 ), 474 ) 475 ); 476 477 $this->add_responsive_control( 478 'alpha_pin_title_padding', 479 array( 480 'label' => __( 'Padding', 'alpha-google-map-for-elementor' ), 481 'type' => Controls_Manager::DIMENSIONS, 482 'size_units' => array( 'px', 'em', '%' ), 483 'selectors' => array( 484 '{{WRAPPER}} .alpha-map-info-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 485 ), 486 ) 487 ); 488 489 $this->add_responsive_control( 490 'alpha_pin_title_align', 491 array( 492 'label' => __( 'Alignment', 'alpha-google-map-for-elementor' ), 493 'type' => Controls_Manager::CHOOSE, 494 'options' => array( 495 'left' => array( 496 'title' => __( 'Left', 'alpha-google-map-for-elementor' ), 497 'icon' => 'fa fa-align-left', 498 ), 499 'center' => array( 500 'title' => __( 'Center', 'alpha-google-map-for-elementor' ), 501 'icon' => 'fa fa-align-center', 502 ), 503 'right' => array( 504 'title' => __( 'Right', 'alpha-google-map-for-elementor' ), 505 'icon' => 'fa fa-align-right', 506 ), 507 ), 508 'default' => 'center', 509 'selectors' => array( 510 '{{WRAPPER}} .alpha-map-info-title' => 'text-align: {{VALUE}};', 511 ), 512 ) 513 ); 514 515 $this->end_controls_section(); 516 517 $this->start_controls_section( 518 'alpha_pin_text_style', 519 array( 520 'label' => __( 'Description', 'alpha-google-map-for-elementor' ), 521 'tab' => Controls_Manager::TAB_STYLE, 522 ) 523 ); 524 525 $this->add_control( 526 'alpha_pin_text_color', 527 array( 528 'label' => __( 'Color', 'alpha-google-map-for-elementor' ), 529 'type' => Controls_Manager::COLOR, 530 'global' => array( 531 'default' => Global_Colors::COLOR_SECONDARY, 532 ), 533 'selectors' => array( 534 '{{WRAPPER}} .alpha-map-info-desc' => 'color: {{VALUE}};', 535 ), 536 ) 537 ); 538 539 $this->add_group_control( 540 Group_Control_Typography::get_type(), 541 array( 542 'name' => 'pin_text_typo', 543 'global' => array( 544 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 545 ), 546 'selector' => '{{WRAPPER}} .alpha-map-info-desc', 547 ) 548 ); 549 550 $this->add_responsive_control( 551 'alpha_pin_text_margin', 552 array( 553 'label' => __( 'Margin', 'alpha-google-map-for-elementor' ), 554 'type' => Controls_Manager::DIMENSIONS, 555 'size_units' => array( 'px', 'em', '%' ), 556 'selectors' => array( 557 '{{WRAPPER}} .alpha-map-info-desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 558 ), 559 ) 560 ); 561 562 $this->add_responsive_control( 563 'alpha_pin_text_padding', 564 array( 565 'label' => __( 'Padding', 'alpha-google-map-for-elementor' ), 566 'type' => Controls_Manager::DIMENSIONS, 567 'size_units' => array( 'px', 'em', '%' ), 568 'selectors' => array( 569 '{{WRAPPER}} .alpha-map-info-desc' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 570 ), 571 ) 572 ); 573 574 $this->add_responsive_control( 575 'alpha_pin_description_align', 576 array( 577 'label' => __( 'Alignment', 'alpha-google-map-for-elementor' ), 578 'type' => Controls_Manager::CHOOSE, 579 'options' => array( 580 'left' => array( 581 'title' => __( 'Left', 'alpha-google-map-for-elementor' ), 582 'icon' => 'fa fa-align-left', 583 ), 584 'center' => array( 585 'title' => __( 'Center', 'alpha-google-map-for-elementor' ), 586 'icon' => 'fa fa-align-center', 587 ), 588 'right' => array( 589 'title' => __( 'Right', 'alpha-google-map-for-elementor' ), 590 'icon' => 'fa fa-align-right', 591 ), 592 ), 593 'default' => 'center', 594 'selectors' => array( 595 '{{WRAPPER}} .alpha-map-info-desc' => 'text-align: {{VALUE}};', 596 ), 597 ) 598 ); 599 600 $this->end_controls_section(); 601 602 $this->start_controls_section( 603 'alpha_pin_time_style', 604 array( 605 'label' => __( 'Time Table', 'alpha-google-map-for-elementor' ), 606 'tab' => Controls_Manager::TAB_STYLE, 607 ) 608 ); 609 610 $this->add_control( 611 'alpha_pin_time_color', 612 array( 613 'label' => __( 'Color', 'alpha-google-map-for-elementor' ), 614 'type' => Controls_Manager::COLOR, 615 'global' => array( 616 'default' => Global_Colors::COLOR_SECONDARY, 617 ), 618 'selectors' => array( 619 '{{WRAPPER}} .alpha-map-info-time-desc' => 'color: {{VALUE}};', 620 ), 621 ) 622 ); 623 624 $this->add_group_control( 625 Group_Control_Typography::get_type(), 626 array( 627 'name' => 'pin_time_typo', 628 'global' => array( 629 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 630 ), 631 'selector' => '{{WRAPPER}} .alpha-map-info-time-desc', 632 ) 633 ); 634 635 $this->add_responsive_control( 636 'alpha_pin_time_margin', 637 array( 638 'label' => __( 'Margin', 'alpha-google-map-for-elementor' ), 639 'type' => Controls_Manager::DIMENSIONS, 640 'size_units' => array( 'px', 'em', '%' ), 641 'selectors' => array( 642 '{{WRAPPER}} .alpha-map-info-time-desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 643 ), 644 ) 645 ); 646 647 $this->add_responsive_control( 648 'alpha_pin_time_padding', 649 array( 650 'label' => __( 'Padding', 'alpha-google-map-for-elementor' ), 651 'type' => Controls_Manager::DIMENSIONS, 652 'size_units' => array( 'px', 'em', '%' ), 653 'selectors' => array( 654 '{{WRAPPER}} .alpha-map-info-time-desc' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 655 ), 656 ) 657 ); 658 659 $this->add_responsive_control( 660 'alpha_pin_time_align', 661 array( 662 'label' => __( 'Alignment', 'alpha-google-map-for-elementor' ), 663 'type' => Controls_Manager::CHOOSE, 664 'options' => array( 665 'left' => array( 666 'title' => __( 'Left', 'alpha-google-map-for-elementor' ), 667 'icon' => 'fa fa-align-left', 668 ), 669 'center' => array( 670 'title' => __( 'Center', 'alpha-google-map-for-elementor' ), 671 'icon' => 'fa fa-align-center', 672 ), 673 'right' => array( 674 'title' => __( 'Right', 'alpha-google-map-for-elementor' ), 675 'icon' => 'fa fa-align-right', 676 ), 677 ), 678 'default' => 'center', 679 'selectors' => array( 680 '{{WRAPPER}} .alpha-map-info-time-desc' => 'text-align: {{VALUE}};', 681 ), 682 ) 683 ); 684 685 $this->end_controls_section(); 686 687 $this->start_controls_section( 688 'alpha_box_style', 689 array( 690 'label' => __( 'Map', 'alpha-google-map-for-elementor' ), 691 'tab' => Controls_Manager::TAB_STYLE, 692 ) 693 ); 694 695 $this->add_group_control( 696 Group_Control_Border::get_type(), 697 array( 698 'name' => 'map_border', 699 'selector' => '{{WRAPPER}} .alpha-map-container', 700 ) 701 ); 702 703 $this->add_control( 704 'alpha_box_radius', 705 array( 706 'label' => __( 'Border Radius', 'alpha-google-map-for-elementor' ), 707 'type' => Controls_Manager::SLIDER, 708 'size_units' => array( 'px', '%', 'em' ), 709 'selectors' => array( 710 '{{WRAPPER}} .alpha-map-container,{{WRAPPER}} .alpha_map_height' => 'border-radius: {{SIZE}}{{UNIT}};', 711 ), 712 ) 713 ); 714 715 $this->add_group_control( 716 Group_Control_Box_Shadow::get_type(), 717 array( 718 'label' => __( 'Shadow', 'alpha-google-map-for-elementor' ), 719 'name' => 'alpha_map_box_shadow', 720 'selector' => '{{WRAPPER}} .alpha-map-container', 721 ) 722 ); 723 724 $this->add_responsive_control( 725 'alpha_box_margin', 726 array( 727 'label' => __( 'Margin', 'alpha-google-map-for-elementor' ), 728 'type' => Controls_Manager::DIMENSIONS, 729 'size_units' => array( 'px', 'em', '%' ), 730 'selectors' => array( 731 '{{WRAPPER}} .alpha-map-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', 732 ), 733 ) 734 ); 735 736 $this->add_responsive_control( 737 'alpha_box_padding', 738 array( 739 'label' => __( 'Padding', 'alpha-google-map-for-elementor' ), 740 'type' => Controls_Manager::DIMENSIONS, 741 'size_units' => array( 'px', 'em', '%' ), 742 'selectors' => array( 743 '{{WRAPPER}} .alpha-map-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', 744 ), 745 ) 746 ); 747 748 $this->end_controls_section(); 749 750 // Map Title Controls. 751 $this->start_controls_section( 752 'section_title', 753 array( 754 'label' => __( 'Map Title', 'alpha-google-map-for-elementor' ), 755 ) 756 ); 757 758 $this->add_control( 759 'title', 760 array( 761 'label' => __( 'Map Title', 'alpha-google-map-for-elementor' ), 762 'type' => Controls_Manager::TEXTAREA, 763 'dynamic' => array( 764 'active' => true, 765 ), 766 'placeholder' => __( 'Enter your title', 'alpha-google-map-for-elementor' ), 767 'default' => __( 'Add Your Title Text Here', 'alpha-google-map-for-elementor' ), 768 ) 769 ); 770 771 $this->add_control( 772 'link', 773 array( 774 'label' => __( 'Link', 'alpha-google-map-for-elementor' ), 775 'type' => Controls_Manager::URL, 776 'dynamic' => array( 777 'active' => true, 778 ), 779 'default' => array( 780 'url' => '', 781 ), 782 'separator' => 'before', 783 ) 784 ); 785 786 $this->add_control( 787 'size', 788 array( 789 'label' => __( 'Size', 'alpha-google-map-for-elementor' ), 790 'type' => Controls_Manager::SELECT, 791 'default' => 'default', 792 'options' => array( 793 'default' => __( 'Default', 'alpha-google-map-for-elementor' ), 794 'small' => __( 'Small', 'alpha-google-map-for-elementor' ), 795 'medium' => __( 'Medium', 'alpha-google-map-for-elementor' ), 796 'large' => __( 'Large', 'alpha-google-map-for-elementor' ), 797 'xl' => __( 'XL', 'alpha-google-map-for-elementor' ), 798 'xxl' => __( 'XXL', 'alpha-google-map-for-elementor' ), 799 ), 800 ) 801 ); 802 803 $this->add_control( 804 'header_size', 805 array( 806 'label' => __( 'HTML Tag', 'alpha-google-map-for-elementor' ), 807 'type' => Controls_Manager::SELECT, 808 'options' => array( 809 'h1' => 'H1', 810 'h2' => 'H2', 811 'h3' => 'H3', 812 'h4' => 'H4', 813 'h5' => 'H5', 814 'h6' => 'H6', 815 'div' => 'div', 816 'span' => 'span', 817 'p' => 'p', 818 ), 819 'default' => 'h2', 820 ) 821 ); 822 823 $this->add_responsive_control( 824 'align', 825 array( 826 'label' => __( 'Alignment', 'alpha-google-map-for-elementor' ), 827 'type' => Controls_Manager::CHOOSE, 828 'options' => array( 829 'left' => array( 830 'title' => __( 'Left', 'alpha-google-map-for-elementor' ), 831 'icon' => 'eicon-text-align-left', 832 ), 833 'center' => array( 834 'title' => __( 'Center', 'alpha-google-map-for-elementor' ), 835 'icon' => 'eicon-text-align-center', 836 ), 837 'right' => array( 838 'title' => __( 'Right', 'alpha-google-map-for-elementor' ), 839 'icon' => 'eicon-text-align-right', 840 ), 841 'justify' => array( 842 'title' => __( 'Justified', 'alpha-google-map-for-elementor' ), 843 'icon' => 'eicon-text-align-justify', 844 ), 845 ), 846 'default' => '', 847 'selectors' => array( 848 '{{WRAPPER}}' => 'text-align: {{VALUE}};', 849 ), 850 ) 851 ); 852 853 $this->add_control( 854 'view', 855 array( 856 'label' => __( 'View', 'alpha-google-map-for-elementor' ), 857 'type' => Controls_Manager::HIDDEN, 858 'default' => 'traditional', 859 ) 860 ); 861 862 $this->end_controls_section(); 863 864 // Map Title Style. 865 $this->start_controls_section( 866 'section_title_style', 867 array( 868 'label' => __( 'Map Title', 'alpha-google-map-for-elementor' ), 869 'tab' => Controls_Manager::TAB_STYLE, 870 ) 871 ); 872 873 $this->add_control( 874 'title_color', 875 array( 876 'label' => __( 'Text Color', 'alpha-google-map-for-elementor' ), 877 'type' => Controls_Manager::COLOR, 878 'global' => array( 879 'default' => Global_Colors::COLOR_PRIMARY, 880 ), 881 'selectors' => array( 882 '{{WRAPPER}} .alpha-map-title' => 'color: {{VALUE}};', 883 ), 884 ) 885 ); 886 887 $this->add_group_control( 888 Group_Control_Typography::get_type(), 889 array( 890 'name' => 'typography', 891 'global' => array( 892 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 893 ), 894 'selector' => '{{WRAPPER}} .alpha-map-title', 895 ) 896 ); 897 898 $this->add_group_control( 899 Group_Control_Text_Shadow::get_type(), 900 array( 901 'name' => 'text_shadow', 902 'selector' => '{{WRAPPER}} .alpha-map-title', 903 ) 904 ); 905 906 $this->add_responsive_control( 907 'title_margin', 908 array( 909 'label' => __( 'Margin', 'alpha-google-map-for-elementor' ), 910 'type' => Controls_Manager::DIMENSIONS, 911 'size_units' => array( 'px', 'em', '%' ), 912 'selectors' => array( 913 '{{WRAPPER}} .alpha-map-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 914 ), 915 ) 916 ); 917 918 $this->add_responsive_control( 919 'title_padding', 920 array( 921 'label' => __( 'Padding', 'alpha-google-map-for-elementor' ), 922 'type' => Controls_Manager::DIMENSIONS, 923 'size_units' => array( 'px', 'em', '%' ), 924 'selectors' => array( 925 '{{WRAPPER}} .alpha-map-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 926 ), 927 ) 928 ); 929 930 $this->end_controls_section(); 931 } 932 933 /** 934 * Show the count of how many images left in the gallery 935 * 936 * @param string $link_html link for an image. 937 * @param string $id the id of an image. 938 * 939 * @return string|string[]|null 940 */ 941 public function add_lightbox_data_to_image_link( $link_html, $id ) { 942 $settings = $this->get_settings_for_display(); 943 $open_lightbox = isset( $settings['open_lightbox'] ) ? $settings['open_lightbox'] : null; 944 945 if ( Plugin::$instance->editor->is_edit_mode() ) { 946 $this->add_render_attribute( 'link', 'class', 'elementor-clickable', true ); 947 } 948 949 $this->add_lightbox_data_attributes( 'link', $id, $open_lightbox, $this->get_id(), true ); 950 return preg_replace( '/^<a/', '<a ' . $this->get_render_attribute_string( 'link' ), $link_html ); 951 } 952 953 /** 954 * Render the widget on the frontend. 955 */ 956 protected function render() { 957 $settings = $this->get_settings_for_display(); 958 959 $map_pins = $settings['alpha_map_pins']; 960 961 $gesture = 'yes' === $settings['alpha_map_gesture_handling'] ? 'greedy' : 'auto'; 962 963 $street_view = 'yes' === $settings['alpha_map_option_streeview'] ? 'true' : 'false'; 964 965 $scroll_wheel = 'yes' === $settings['alpha_map_option_mapscroll'] ? 'true' : 'false'; 966 967 $full_screen = 'yes' === $settings['alpha_map_option_fullscreen_control'] ? 'true' : 'false'; 968 969 $zoom_control = 'yes' === $settings['alpha_map_option_zoom_controls'] ? 'true' : 'false'; 970 971 $type_control = 'yes' === $settings['alpha_map_option_map_type_control'] ? 'true' : 'false'; 972 973 $automatic_open = 'yes' === $settings['alpha_map_marker_open'] ? 'true' : 'false'; 974 975 $hover_open = 'yes' === $settings['alpha_map_marker_hover_open'] ? 'true' : 'false'; 976 977 $hover_close = 'yes' === $settings['alpha_map_marker_mouse_out'] ? 'true' : 'false'; 978 979 $locationlat = ! empty( $settings['alpha_location_lat'] ) ? sanitize_text_field( $settings['alpha_location_lat'] ) : '18.591212'; 980 981 $locationlong = ! empty( $settings['alpha_location_long'] ) ? sanitize_text_field( $settings['alpha_location_long'] ) : '73.741261'; 982 983 $marker_width = ! empty( $settings['alpha_markers_width'] ) ? $settings['alpha_markers_width'] : 1000; 984 985 $map_settings = array( 986 'zoom' => $settings['alpha_map_zoom']['size'], 987 'maptype' => $settings['alpha_map_type'], 988 'streetViewControl' => $street_view, 989 'gestureHandling' => $gesture, 990 'locationlat' => $locationlat, 991 'locationlong' => $locationlong, 992 'scrollwheel' => $scroll_wheel, 993 'fullScreen' => $full_screen, 994 'zoomControl' => $zoom_control, 995 'typeControl' => $type_control, 996 'automaticOpen' => $automatic_open, 997 'hoverOpen' => $hover_open, 998 'hoverClose' => $hover_close, 999 'drag' => $settings['disable_drag'], 1000 ); 1001 1002 $this->add_render_attribute( 1003 'style_wrapper', 1004 array( 1005 'class' => 'alpha_map_height', 1006 'data-settings' => wp_json_encode( $map_settings ), 1007 ) 1008 ); 1009 1010 ?> 1011 <div class="alpha-map-container" id="alpha-map-container"> 1012 <div class="alpha-google-map-title"> 1013 <?php 1014 if ( ! empty( $settings['title'] ) ) { 1015 // Add class for the title. 1016 $this->add_render_attribute( 'title', 'class', 'alpha-map-title' ); 1017 // Check and add size class if provided. 1018 if ( ! empty( $settings['size'] ) ) { 1019 $this->add_render_attribute( 'title', 'class', 'elementor-size-' . sanitize_html_class( $settings['size'] ) ); 1020 } 1021 // Allow inline editing of the title. 1022 $this->add_inline_editing_attributes( 'title' ); 1023 1024 // Sanitize the title. 1025 $title = sanitize_text_field( $settings['title'] ); 1026 // If a link is provided, sanitize and set attributes. 1027 if ( ! empty( $settings['link']['url'] ) ) { 1028 $settings['link'] = wp_parse_args( 1029 $settings['link'], 1030 array( 1031 'url' => '', 1032 'is_external' => '', 1033 'nofollow' => '', 1034 ) 1035 ); 1036 $this->add_link_attributes( 'url', $settings['link'] ); 1037 1038 $title = sprintf( 1039 '<a %1$s>%2$s</a>', 1040 $this->get_render_attribute_string( 'url' ), 1041 esc_html( $title ) 1042 ); 1043 } 1044 1045 // Validate and sanitize the header size tag. 1046 $header_tag = Utils::validate_html_tag( $settings['header_size'] ); 1047 1048 // Construct the title HTML with proper escaping. 1049 $title_html = sprintf( 1050 '<%1$s %2$s>%3$s</%1$s>', 1051 esc_html( $header_tag ), 1052 $this->get_render_attribute_string( 'title' ), 1053 $title 1054 ); 1055 1056 // Sanitize the entire output. 1057 echo wp_kses( 1058 $title_html, 1059 array( 1060 'a' => array( 1061 'href' => array(), 1062 'target' => array(), 1063 'rel' => array(), 1064 'class' => array(), 1065 ), 1066 $header_tag => array( 1067 'class' => array(), 1068 'id' => array(), 1069 'style' => array(), 1070 ), 1071 ) 1072 ); 1073 } 1074 ?> 1075 </div> 1076 <?php if ( ! empty( $map_pins ) ) { ?> 1077 <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'style_wrapper' ) ); ?>> 1078 <?php 1079 foreach ( $map_pins as $index => $pin ) { 1080 $key = 'map_marker_' . $index; 1081 // Sanitize data before use. 1082 $latitude = isset( $pin['map_latitude'] ) ? sanitize_text_field( $pin['map_latitude'] ) : ''; 1083 $longitude = isset( $pin['map_longitude'] ) ? sanitize_text_field( $pin['map_longitude'] ) : ''; 1084 $icon_url = isset( $pin['pin_icon']['url'] ) ? esc_url( $pin['pin_icon']['url'] ) : ''; 1085 $icon_active_url = isset( $pin['pin_active_icon']['url'] ) ? esc_url( $pin['pin_active_icon']['url'] ) : ''; 1086 $icon_size = isset( $pin['pin_icon_size']['size'] ) ? intval( $pin['pin_icon_size']['size'] ) : ''; 1087 $data_max_width = isset( $marker_width ) ? intval( $marker_width ) : ''; 1088 $data_id = intval( $index ); 1089 1090 $this->add_render_attribute( 1091 $key, 1092 array( 1093 'class' => 'alpha-pin', 1094 'data-lng' => $longitude, 1095 'data-lat' => $latitude, 1096 'data-icon' => $icon_url, 1097 'data-icon-active' => $icon_active_url, 1098 'data-icon-size' => $icon_size, 1099 'data-max-width' => $data_max_width, 1100 'data-id' => $data_id, 1101 ) 1102 ); 1103 1104 // Sanitize IDs. 1105 $ids = array_map( 'intval', wp_list_pluck( $pin['pin_desc_gallery'], 'id' ) ); 1106 $count = count( $ids ); 1107 $data_count = absint( $count - 4 ); 1108 $this->add_render_attribute( 'shortcode' . $index, 'ids', implode( ',', $ids ) ); 1109 1110 ?> 1111 <div <?php echo wp_kses_post( $this->get_render_attribute_string( $key ) ); ?>> 1112 <?php if ( ! empty( $pin['pin_title'] ) || ! empty( $pin['pin_desc'] ) || ! empty( $pin['pin_time_desc'] ) ) : ?> 1113 <div class='alpha-map-info-container'> 1114 <p class='alpha-map-info-title'><?php echo wp_kses_post( $pin['pin_title'] ); ?></p> 1115 <div class='alpha-map-info-desc'><?php echo wp_kses_post( $pin['pin_desc'] ); ?></div> 1116 <div class='alpha-map-info-time-desc'><?php echo wp_kses_post( $pin['pin_time_desc'] ); ?></div> 1117 <?php if ( ! empty( $pin['pin_desc_gallery'] ) ) : ?> 1118 <div class="alpha-image-gallery" data-count="<?php echo esc_attr( $data_count ); ?>"> 1119 <?php 1120 add_filter( 'wp_get_attachment_link', array( $this, 'add_lightbox_data_to_image_link' ), 10, 2 ); 1121 echo do_shortcode( '[gallery link="file" ' . $this->get_render_attribute_string( 'shortcode' . $index ) . ']' ); 1122 remove_filter( 'wp_get_attachment_link', array( $this, 'add_lightbox_data_to_image_link' ) ); 1123 ?> 1124 </div> 1125 <?php endif; ?> 1126 </div> 1127 <?php endif; ?> 1128 </div> 1129 <?php 1130 } 1131 ?> 1132 </div> 1133 <?php 1134 } 1135 ?> 1136 </div> 1137 <?php 1138 } 1121 1139 } -
alpha-google-map-for-elementor/trunk/include/class-alpha-google-map.php
r3209591 r3276970 1 1 <?php 2 /** 3 * Alpha Google Map. 4 * 5 * @package AlphaGoogleMap 6 * */ 2 7 3 8 namespace AlphaGoogleMap; 4 9 5 if ( !defined('ABSPATH')) {6 exit; // Exit if accessed directly.10 if ( ! defined( 'ABSPATH' ) ) { 11 exit; // Exit if accessed directly. 7 12 } 8 13 … … 14 19 * @since 1.0.0 15 20 */ 16 final class Alpha_Google_Map 17 { 18 /** 19 * Minimum Elementor Version 20 * 21 * @since 1.0.0 22 * @var string Minimum Elementor version required to run the addon. 23 */ 24 const MINIMUM_ELEMENTOR_VERSION = '3.21.0'; 25 26 /** 27 * Minimum PHP Version 28 * 29 * @since 1.0.0 30 * @var string Minimum PHP version required to run the addon. 31 */ 32 const MINIMUM_PHP_VERSION = '7.4'; 33 34 /** 35 * Instance 36 * 37 * @since 1.0.0 38 * @access private 39 * @static 40 * @var \Elementor_Alpha_Google_Map_Addon\Alpha_Google_Map The single instance of the class. 41 */ 42 private static $_instance = null; 43 44 /** 45 * Instance 46 * 47 * Ensures only one instance of the class is loaded or can be loaded. 48 * 49 * @since 1.0.0 50 * @access public 51 * @static 52 * @return \Elementor_Alpha_Google_Map_Addon\Alpha_Google_Map An instance of the class. 53 */ 54 public static function instance(): self 55 { 56 57 if (is_null(self::$_instance)) { 58 self::$_instance = new self(); 59 } 60 return self::$_instance; 61 } 62 63 /** 64 * Constructor 65 * 66 * Perform some compatibility checks to make sure basic requirements are meet. 67 * If all compatibility checks pass, initialize the functionality. 68 * 69 * @since 1.0.0 70 * @access private 71 */ 72 private function __construct() 73 { 74 if ($this->is_compatible()) { 75 add_action('elementor/init', [$this, 'init']); 76 } 77 } 78 79 /** 80 * Load the plugin text domain. 81 */ 82 public function i18n(): void 83 { 84 load_plugin_textdomain('alpha-google-map-for-elementor', false, ALPHAMAP_PL_LANGUAGES); 85 } 86 87 /** 88 * Compatibility Checks 89 * 90 * Checks whether the site meets the addon requirement. 91 * 92 * @since 1.0.0 93 * @access public 94 */ 95 public function is_compatible(): bool 96 { 97 98 // Check if Elementor installed and activated 99 if (!did_action('elementor/loaded')) { 100 add_action('admin_notices', [$this, 'admin_notice_missing_main_plugin']); 101 return false; 102 } 103 104 // Check for required Elementor version 105 if (!version_compare(ELEMENTOR_VERSION, self::MINIMUM_ELEMENTOR_VERSION, '>=')) { 106 add_action('admin_notices', [$this, 'admin_notice_minimum_elementor_version']); 107 return false; 108 } 109 110 // Check for required PHP version 111 if (version_compare(PHP_VERSION, self::MINIMUM_PHP_VERSION, '<')) { 112 add_action('admin_notices', [$this, 'admin_notice_minimum_php_version']); 113 return false; 114 } 115 116 return true; 117 } 118 119 /** 120 * Initialize the plugin. 121 */ 122 public function init(): void 123 { 124 $this->i18n(); 125 126 $this->add_assets(); 127 add_action('elementor/frontend/after_enqueue_styles', [$this, 'frontend_styles']); 128 add_action('elementor/frontend/after_register_scripts', [$this, 'frontend_scripts']); 129 130 add_action('elementor/widgets/register', [$this, 'register_widgets']); 131 } 132 133 /** 134 * Loading plugin media assets. 135 */ 136 function add_assets(): void 137 { 138 if (! function_exists('WP_Filesystem')) { 139 include_once ABSPATH . 'wp-admin/includes/file.php'; 140 } 141 WP_Filesystem(); 142 global $wp_filesystem; 143 144 $upload_dir = wp_upload_dir(null, true); 145 $dir = trailingslashit($upload_dir['basedir']) . 'alpha-map/'; 146 147 if (! $wp_filesystem->is_dir($dir)) { 148 $wp_filesystem->mkdir($dir); 149 } 150 151 152 $plugin_assets_dir = ALPHAMAP_PL_ASSETS . 'img/'; 153 154 $files = [ 155 'alpha-pin.png', 156 'alpha-pin-hover.png', 157 ]; 158 159 foreach ($files as $file) { 160 $destination = $dir . $file; 161 if (! $wp_filesystem->exists($destination)) { 162 $source = $plugin_assets_dir . $file; 163 164 if ($wp_filesystem->exists($source)) { 165 $contents = $wp_filesystem->get_contents($source); 166 if (! empty($contents)) { 167 $wp_filesystem->put_contents($destination, $contents, FS_CHMOD_FILE); 168 } 169 } 170 } 171 } 172 } 173 174 /** 175 * Admin notice 176 * 177 * Warning when the site doesn't have Elementor installed or activated. 178 * 179 * @since 1.0.0 180 * @access public 181 */ 182 public function admin_notice_missing_main_plugin(): void 183 { 184 $message = sprintf( 185 /* translators: 1: Plugin name 2: Elementor */ 186 __('"%1$s" requires "%2$s" to be installed and activated.', 'alpha-google-map-for-elementor'), 187 '<strong>' . __('Alpha Google Map For Elementor', 'alpha-google-map-for-elementor') . '</strong>', 188 '<strong>' . __('Elementor', 'alpha-google-map-for-elementor') . '</strong>' 189 ); 190 191 $elementor = 'elementor/elementor.php'; 192 $pathpluginurl = \WP_PLUGIN_DIR . '/' . $elementor; 193 $isinstalled = file_exists($pathpluginurl); 194 // If installed but didn't load 195 if ($isinstalled && !did_action('elementor/loaded')) { 196 $activation_url = wp_nonce_url('plugins.php?action=activate&plugin=' . $elementor . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $elementor); 197 $button_text = esc_html__('Activate Elementor', 'alpha-google-map-for-elementor'); 198 } else { 199 $activation_url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=elementor'), 'install-plugin_elementor'); 200 $button_text = esc_html__('Install Elementor', 'alpha-google-map-for-elementor'); 201 } 202 $button = '<p><a href="' . esc_url($activation_url) . '" class="button-primary">' . esc_html($button_text) . '</a></p>'; 203 204 $allowed_html = [ 205 'strong' => [], 206 'a' => [ 207 'href' => [], 208 'class' => [], 209 ], 210 'p' => [], 211 'div' => [ 212 'class' => [], 213 ], 214 ]; 215 216 printf( 217 '<div class="notice notice-warning is-dismissible">%s</div>', 218 wp_kses('<p>' . $message . '</p>' . $button, $allowed_html) 219 ); 220 } 221 222 /** 223 * Admin notice 224 * 225 * Warning when the site doesn't have a minimum required Elementor version. 226 * 227 * @since 1.0.0 228 * @access public 229 */ 230 public function admin_notice_minimum_elementor_version(): void 231 { 232 $message = sprintf( 233 /* translators: 1: Plugin name 2: Elementor 3: Required Elementor version */ 234 __('"%1$s" requires "%2$s" version %3$s or greater.', 'alpha-google-map-for-elementor'), 235 '<strong>' . __('Alpha Google Map For Elementor', 'alpha-google-map-for-elementor') . '</strong>', 236 '<strong>' . __('Elementor', 'alpha-google-map-for-elementor') . '</strong>', 237 self::MINIMUM_ELEMENTOR_VERSION 238 ); 239 240 $allowed_html = [ 241 'strong' => [], 242 'p' => [], 243 'div' => [ 244 'class' => [], 245 ], 246 ]; 247 248 printf( 249 '<div class="notice notice-warning is-dismissible">%s</div>', 250 wp_kses('<p>' . $message . '</p>', $allowed_html) 251 ); 252 } 253 254 /** 255 * Admin notice 256 * 257 * Warning when the site doesn't have a minimum required PHP version. 258 * 259 * @since 1.0.0 260 * @access public 261 */ 262 public function admin_notice_minimum_php_version(): void 263 { 264 $message = sprintf( 265 /* translators: 1: Plugin name 2: PHP 3: Required PHP version */ 266 __('"%1$s" requires "%2$s" version %3$s or greater.', 'alpha-google-map-for-elementor'), 267 '<strong>' . __('Alpha Google Map For Elementor', 'alpha-google-map-for-elementor') . '</strong>', 268 '<strong>' . __('PHP', 'alpha-google-map-for-elementor') . '</strong>', 269 self::MINIMUM_PHP_VERSION 270 ); 271 272 $allowed_html = [ 273 'strong' => [], 274 'p' => [], 275 'div' => [ 276 'class' => [], 277 ], 278 ]; 279 280 printf( 281 '<div class="notice notice-warning is-dismissible">%s</div>', 282 wp_kses('<p>' . $message . '</p>', $allowed_html) 283 ); 284 } 285 286 /** 287 * Loading plugin css. 288 */ 289 public function frontend_styles(): void 290 { 291 wp_enqueue_style('alphamap-widget', ALPHAMAP_PL_ASSETS . 'css/alpha-map-widget.css', '', ALPHAMAP_VERSION); 292 } 293 294 /** 295 * Loading plugin JavaScript. 296 */ 297 public function frontend_scripts(): void 298 { 299 // Script register. 300 wp_enqueue_script( 301 'alphamap', ALPHAMAP_PL_ASSETS . 'js/alpha-map.js', ['jquery', 'alpha-api-js'], ALPHAMAP_VERSION, array( 302 'in_footer' => true, 303 'strategy' => 'defer', 304 ) 305 ); 306 307 // get an option. 308 $api_key = get_option('elementor_google_maps_api_key'); 309 310 $api = sprintf('https://maps.googleapis.com/maps/api/js?key=%1$s&language=en&callback=blur', $api_key); 311 wp_enqueue_script( 312 'alpha-api-js', 313 $api, 314 array(), 315 '1.0.0', 316 array( 317 'in_footer' => true, 318 'strategy' => 'defer', 319 ) 320 ); 321 } 322 323 /** 324 * Register Widgets 325 * 326 * Load widgets files and register new Elementor widgets. 327 * 328 * Fired by `elementor/widgets/register` action hook. 329 * 330 * @param \Elementor\Widgets_Manager $widgets_manager Elementor widgets manager. 331 */ 332 public function register_widgets($widgets_manager): void 333 { 334 // Include Widget files. 335 include_once ALPHAMAP_PL_INCLUDE . '/class-alpha-google-map-widget.php'; 336 // Register widget. 337 $widgets_manager->register(new \AlphaGoogleMap\Alpha_Google_Map_Widget()); 338 } 21 final class Alpha_Google_Map { 22 23 /** 24 * Minimum Elementor Version 25 * 26 * @since 1.0.0 27 * @var string Minimum Elementor version required to run the addon. 28 */ 29 const MINIMUM_ELEMENTOR_VERSION = '3.21.0'; 30 31 /** 32 * Minimum PHP Version 33 * 34 * @since 1.0.0 35 * @var string Minimum PHP version required to run the addon. 36 */ 37 const MINIMUM_PHP_VERSION = '7.4'; 38 39 /** 40 * Instance 41 * 42 * @since 1.0.0 43 * @access private 44 * @static 45 * @var \Elementor_Alpha_Google_Map_Addon\Alpha_Google_Map The single instance of the class. 46 */ 47 private static $_instance = null; 48 49 /** 50 * Instance 51 * 52 * Ensures only one instance of the class is loaded or can be loaded. 53 * 54 * @since 1.0.0 55 * @access public 56 * @static 57 * @return \Elementor_Alpha_Google_Map_Addon\Alpha_Google_Map An instance of the class. 58 */ 59 public static function instance(): self { 60 61 if ( is_null( self::$_instance ) ) { 62 self::$_instance = new self(); 63 } 64 return self::$_instance; 65 } 66 67 /** 68 * Constructor 69 * 70 * Perform some compatibility checks to make sure basic requirements are meet. 71 * If all compatibility checks pass, initialize the functionality. 72 * 73 * @since 1.0.0 74 * @access private 75 */ 76 private function __construct() { 77 if ( $this->is_compatible() ) { 78 add_action( 'elementor/init', array( $this, 'init' ) ); 79 } 80 } 81 82 /** 83 * Load the plugin text domain. 84 */ 85 public function i18n(): void { 86 load_plugin_textdomain( 'alpha-google-map-for-elementor', false, ALPHAMAP_PL_LANGUAGES ); 87 } 88 89 /** 90 * Compatibility Checks 91 * 92 * Checks whether the site meets the addon requirement. 93 * 94 * @since 1.0.0 95 * @access public 96 */ 97 public function is_compatible(): bool { 98 99 // Check if Elementor installed and activated. 100 if ( ! did_action( 'elementor/loaded' ) ) { 101 add_action( 'admin_notices', array( $this, 'admin_notice_missing_main_plugin' ) ); 102 return false; 103 } 104 105 // Check for required Elementor version. 106 if ( ! version_compare( ELEMENTOR_VERSION, self::MINIMUM_ELEMENTOR_VERSION, '>=' ) ) { 107 add_action( 'admin_notices', array( $this, 'admin_notice_minimum_elementor_version' ) ); 108 return false; 109 } 110 111 // Check for required PHP version. 112 if ( version_compare( PHP_VERSION, self::MINIMUM_PHP_VERSION, '<' ) ) { 113 add_action( 'admin_notices', array( $this, 'admin_notice_minimum_php_version' ) ); 114 return false; 115 } 116 117 return true; 118 } 119 120 /** 121 * Initialize the plugin. 122 */ 123 public function init(): void { 124 $this->i18n(); 125 126 $this->add_assets(); 127 add_action( 'elementor/frontend/after_enqueue_styles', array( $this, 'frontend_styles' ) ); 128 add_action( 'elementor/frontend/after_register_scripts', array( $this, 'frontend_scripts' ) ); 129 130 add_action( 'elementor/widgets/register', array( $this, 'register_widgets' ) ); 131 } 132 133 /** 134 * Loading plugin media assets. 135 */ 136 public function add_assets(): void { 137 if ( ! function_exists( 'WP_Filesystem' ) ) { 138 include_once ABSPATH . 'wp-admin/includes/file.php'; 139 } 140 WP_Filesystem(); 141 global $wp_filesystem; 142 143 $upload_dir = wp_upload_dir( null, true ); 144 $dir = trailingslashit( $upload_dir['basedir'] ) . 'alpha-map/'; 145 146 if ( ! $wp_filesystem->is_dir( $dir ) ) { 147 $wp_filesystem->mkdir( $dir ); 148 } 149 150 $plugin_assets_dir = ALPHAMAP_PL_ASSETS . 'img/'; 151 152 $files = array( 153 'alpha-pin.png', 154 'alpha-pin-hover.png', 155 ); 156 157 foreach ( $files as $file ) { 158 $destination = $dir . $file; 159 if ( ! $wp_filesystem->exists( $destination ) ) { 160 $source = $plugin_assets_dir . $file; 161 162 if ( $wp_filesystem->exists( $source ) ) { 163 $contents = $wp_filesystem->get_contents( $source ); 164 if ( ! empty( $contents ) ) { 165 $wp_filesystem->put_contents( $destination, $contents, FS_CHMOD_FILE ); 166 } 167 } 168 } 169 } 170 } 171 172 /** 173 * Admin notice 174 * 175 * Warning when the site doesn't have Elementor installed or activated. 176 * 177 * @since 1.0.0 178 * @access public 179 */ 180 public function admin_notice_missing_main_plugin(): void { 181 $message = sprintf( 182 /* translators: 1: Plugin name 2: Elementor */ 183 __( '"%1$s" requires "%2$s" to be installed and activated.', 'alpha-google-map-for-elementor' ), 184 '<strong>' . __( 'Alpha Google Map For Elementor', 'alpha-google-map-for-elementor' ) . '</strong>', 185 '<strong>' . __( 'Elementor', 'alpha-google-map-for-elementor' ) . '</strong>' 186 ); 187 188 $elementor = 'elementor/elementor.php'; 189 $pathpluginurl = \WP_PLUGIN_DIR . '/' . $elementor; 190 $isinstalled = file_exists( $pathpluginurl ); 191 // If installed but didn't load. 192 if ( $isinstalled && ! did_action( 'elementor/loaded' ) ) { 193 $activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $elementor . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $elementor ); 194 $button_text = esc_html__( 'Activate Elementor', 'alpha-google-map-for-elementor' ); 195 } else { 196 $activation_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' ); 197 $button_text = esc_html__( 'Install Elementor', 'alpha-google-map-for-elementor' ); 198 } 199 $button = '<p><a href="' . esc_url( $activation_url ) . '" class="button-primary">' . esc_html( $button_text ) . '</a></p>'; 200 201 $allowed_html = array( 202 'strong' => array(), 203 'a' => array( 204 'href' => array(), 205 'class' => array(), 206 ), 207 'p' => array(), 208 'div' => array( 209 'class' => array(), 210 ), 211 ); 212 213 printf( 214 '<div class="notice notice-warning is-dismissible">%s</div>', 215 wp_kses( '<p>' . $message . '</p>' . $button, $allowed_html ) 216 ); 217 } 218 219 /** 220 * Admin notice 221 * 222 * Warning when the site doesn't have a minimum required Elementor version. 223 * 224 * @since 1.0.0 225 * @access public 226 */ 227 public function admin_notice_minimum_elementor_version(): void { 228 $message = sprintf( 229 /* translators: 1: Plugin name 2: Elementor 3: Required Elementor version */ 230 __( '"%1$s" requires "%2$s" version %3$s or greater', 'alpha-google-map-for-elementor' ), 231 '<strong>' . __( 'Alpha Google Map For Elementor', 'alpha-google-map-for-elementor' ) . '</strong>', 232 '<strong>' . __( 'Elementor', 'alpha-google-map-for-elementor' ) . '</strong>', 233 self::MINIMUM_ELEMENTOR_VERSION 234 ); 235 236 $allowed_html = array( 237 'strong' => array(), 238 'p' => array(), 239 'div' => array( 240 'class' => array(), 241 ), 242 ); 243 244 printf( 245 '<div class="notice notice-warning is-dismissible">%s</div>', 246 wp_kses( '<p>' . $message . '</p>', $allowed_html ) 247 ); 248 } 249 250 /** 251 * Admin notice 252 * 253 * Warning when the site doesn't have a minimum required PHP version. 254 * 255 * @since 1.0.0 256 * @access public 257 */ 258 public function admin_notice_minimum_php_version(): void { 259 $message = sprintf( 260 /* translators: 1: Plugin name 2: PHP 3: Required PHP version */ 261 __( '"%1$s" requires "%2$s" version %3$s or greater.', 'alpha-google-map-for-elementor' ), 262 '<strong>' . __( 'Alpha Google Map For Elementor', 'alpha-google-map-for-elementor' ) . '</strong>', 263 '<strong>' . __( 'PHP', 'alpha-google-map-for-elementor' ) . '</strong>', 264 self::MINIMUM_PHP_VERSION 265 ); 266 267 $allowed_html = array( 268 'strong' => array(), 269 'p' => array(), 270 'div' => array( 271 'class' => array(), 272 ), 273 ); 274 275 printf( 276 '<div class="notice notice-warning is-dismissible">%s</div>', 277 wp_kses( '<p>' . $message . '</p>', $allowed_html ) 278 ); 279 } 280 281 /** 282 * Loading plugin css. 283 */ 284 public function frontend_styles(): void { 285 wp_enqueue_style( 'alphamap-widget', ALPHAMAP_PL_ASSETS . 'css/alpha-map-widget.css', '', ALPHAMAP_VERSION ); 286 } 287 288 /** 289 * Loading plugin JavaScript. 290 */ 291 public function frontend_scripts(): void { 292 // Script register. 293 wp_enqueue_script( 294 'alphamap', 295 ALPHAMAP_PL_ASSETS . 'js/alpha-map.js', 296 array( 'jquery', 'alpha-api-js' ), 297 ALPHAMAP_VERSION, 298 array( 299 'in_footer' => true, 300 'strategy' => 'defer', 301 ) 302 ); 303 304 // get an option. 305 $api_key = get_option( 'elementor_google_maps_api_key' ); 306 307 $api = sprintf( 'https://maps.googleapis.com/maps/api/js?key=%1$s&language=en&callback=blur', $api_key ); 308 wp_enqueue_script( 309 'alpha-api-js', 310 $api, 311 array(), 312 '1.0.0', 313 array( 314 'in_footer' => true, 315 'strategy' => 'defer', 316 ) 317 ); 318 } 319 320 /** 321 * Register Widgets 322 * 323 * Load widgets files and register new Elementor widgets. 324 * 325 * Fired by `elementor/widgets/register` action hook. 326 * 327 * @param \Elementor\Widgets_Manager $widgets_manager Elementor widgets manager. 328 */ 329 public function register_widgets( $widgets_manager ): void { 330 // Include Widget files. 331 include_once ALPHAMAP_PL_INCLUDE . '/class-alpha-google-map-widget.php'; 332 // Register widget. 333 $widgets_manager->register( new \AlphaGoogleMap\Alpha_Google_Map_Widget() ); 334 } 339 335 } -
alpha-google-map-for-elementor/trunk/languages/alpha-google-map-for-elementor.pot
r2994430 r3276970 1 # Copyright (C) 202 3Ali Ali1 # Copyright (C) 2025 Ali Ali 2 2 # This file is distributed under the GPLv3. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Alpha Google Map For Elementor 1. 0.9\n"5 "Project-Id-Version: Alpha Google Map For Elementor 1.3\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/alpha-google-map-for-elementor\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-11-11T13:54:59+00:00\n"12 "POT-Creation-Date: 2025-04-17T10:34:32+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 5.0\n"14 "X-Generator: WP-CLI 2.11.0\n" 15 15 "X-Domain: alpha-google-map-for-elementor\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: include/class-alpha-google-map.php:200 19 #: include/class-alpha-google-map.php:221 18 #: alpha-google-map-for-elementor.php 19 #: include/class-alpha-google-map.php:184 20 #: include/class-alpha-google-map.php:231 21 #: include/class-alpha-google-map.php:262 20 22 msgid "Alpha Google Map For Elementor" 21 23 msgstr "" 22 24 23 25 #. Plugin URI of the plugin 24 msgid "https://alphatrio.net" 26 #: alpha-google-map-for-elementor.php 27 msgid "https://ali-ali.org/" 25 28 msgstr "" 26 29 27 30 #. Description of the plugin 31 #: alpha-google-map-for-elementor.php 28 32 msgid "Premium Google Map features for WordPress." 29 33 msgstr "" 30 34 31 35 #. Author of the plugin 36 #: alpha-google-map-for-elementor.php 32 37 msgid "Ali Ali" 33 38 msgstr "" 34 39 35 40 #. Author URI of the plugin 41 #: alpha-google-map-for-elementor.php 36 42 msgid "https://github.com/Ali7Ali" 37 43 msgstr "" 38 44 39 #: include/class-alpha-google-map-widget.php:5 245 #: include/class-alpha-google-map-widget.php:53 40 46 msgid "Alpha Google Map" 41 47 msgstr "" 42 48 43 #: include/class-alpha-google-map-widget.php:8 349 #: include/class-alpha-google-map-widget.php:81 44 50 msgid "Map Window Location" 45 51 msgstr "" 46 52 47 53 #. translators: 1: Integration settings link open tag, 2: Create API key link open tag, 3: Link close tag. 48 #: include/class-alpha-google-map-widget.php:9 554 #: include/class-alpha-google-map-widget.php:93 49 55 msgid "Set your Google Maps API Key in Elementor's %1$sIntegrations Settings%3$s page. Create your key %2$shere.%3$s" 50 56 msgstr "" 51 57 52 58 #. translators: 1: Demo link open tag, 2: Link close tag. 53 #: include/class-alpha-google-map-widget.php:1 1159 #: include/class-alpha-google-map-widget.php:109 54 60 msgid "Check this widget demo %1$shere%2$s." 55 61 msgstr "" 56 62 57 #: include/class-alpha-google-map-widget.php:12 263 #: include/class-alpha-google-map-widget.php:120 58 64 msgid "Location Latitude" 59 65 msgstr "" 60 66 61 #: include/class-alpha-google-map-widget.php:12 567 #: include/class-alpha-google-map-widget.php:123 62 68 msgid "Enter your location latitude" 63 69 msgstr "" 64 70 65 #: include/class-alpha-google-map-widget.php:13 471 #: include/class-alpha-google-map-widget.php:132 66 72 msgid "Location Longitude" 67 73 msgstr "" 68 74 69 #: include/class-alpha-google-map-widget.php:13 775 #: include/class-alpha-google-map-widget.php:135 70 76 msgid "Enter your location longitude" 71 77 msgstr "" 72 78 73 #: include/class-alpha-google-map-widget.php:14 879 #: include/class-alpha-google-map-widget.php:146 74 80 msgid "Markers" 75 81 msgstr "" 76 82 83 #: include/class-alpha-google-map-widget.php:153 84 msgid "Max Width" 85 msgstr "" 86 77 87 #: include/class-alpha-google-map-widget.php:155 78 msgid "Max Width"79 msgstr ""80 81 #: include/class-alpha-google-map-widget.php:15782 88 msgid "Set the Maximum width for markers description box" 83 89 msgstr "" 84 90 85 #: include/class-alpha-google-map-widget.php:16 691 #: include/class-alpha-google-map-widget.php:164 86 92 msgid "Custom Icon" 87 93 msgstr "" 88 94 89 #: include/class-alpha-google-map-widget.php:17 895 #: include/class-alpha-google-map-widget.php:176 90 96 msgid "Icon On Active Pin" 91 97 msgstr "" 92 98 93 #: include/class-alpha-google-map-widget.php:1 9194 #: include/class-alpha-google-map-widget.php:7 7699 #: include/class-alpha-google-map-widget.php:189 100 #: include/class-alpha-google-map-widget.php:789 95 101 msgid "Size" 96 102 msgstr "" 97 103 98 #: include/class-alpha-google-map-widget.php:2 10104 #: include/class-alpha-google-map-widget.php:208 99 105 msgid "Pin Latitude" 100 106 msgstr "" 101 107 102 #: include/class-alpha-google-map-widget.php:2 20108 #: include/class-alpha-google-map-widget.php:218 103 109 msgid "Pin Longitude" 104 110 msgstr "" 105 111 106 #: include/class-alpha-google-map-widget.php:2 30107 #: include/class-alpha-google-map-widget.php:4 25112 #: include/class-alpha-google-map-widget.php:228 113 #: include/class-alpha-google-map-widget.php:435 108 114 msgid "Title" 109 115 msgstr "" 110 116 111 #: include/class-alpha-google-map-widget.php:2 40112 #: include/class-alpha-google-map-widget.php:5 09117 #: include/class-alpha-google-map-widget.php:238 118 #: include/class-alpha-google-map-widget.php:520 113 119 msgid "Description" 114 120 msgstr "" 115 121 116 #: include/class-alpha-google-map-widget.php:2 50117 #: include/class-alpha-google-map-widget.php: 593122 #: include/class-alpha-google-map-widget.php:248 123 #: include/class-alpha-google-map-widget.php:605 118 124 msgid "Time Table" 119 125 msgstr "" 120 126 121 #: include/class-alpha-google-map-widget.php:2 60127 #: include/class-alpha-google-map-widget.php:258 122 128 msgid "Pin Gallery" 123 129 msgstr "" 124 130 125 #: include/class-alpha-google-map-widget.php:2 70131 #: include/class-alpha-google-map-widget.php:268 126 132 msgid "Map Pins" 127 133 msgstr "" 128 134 135 #: include/class-alpha-google-map-widget.php:273 136 msgid "Alpha Google Maps" 137 msgstr "" 138 139 #: include/class-alpha-google-map-widget.php:274 140 msgid "Add an optional description to your map pin" 141 msgstr "" 142 129 143 #: include/class-alpha-google-map-widget.php:275 130 msgid "Alpha Google Maps"131 msgstr ""132 133 #: include/class-alpha-google-map-widget.php:276134 msgid "Add an optional description to your map pin"135 msgstr ""136 137 #: include/class-alpha-google-map-widget.php:277138 144 msgid "Add a time table for the location pin" 139 145 msgstr "" 140 146 141 #: include/class-alpha-google-map-widget.php:28 9147 #: include/class-alpha-google-map-widget.php:287 142 148 msgid "Controls" 143 149 msgstr "" 144 150 145 #: include/class-alpha-google-map-widget.php:29 6151 #: include/class-alpha-google-map-widget.php:294 146 152 msgid "Map Type" 147 153 msgstr "" 148 154 155 #: include/class-alpha-google-map-widget.php:297 156 msgid "Road Map" 157 msgstr "" 158 159 #: include/class-alpha-google-map-widget.php:298 160 msgid "Satellite" 161 msgstr "" 162 149 163 #: include/class-alpha-google-map-widget.php:299 150 msgid " Road Map"164 msgid "Terrain" 151 165 msgstr "" 152 166 153 167 #: include/class-alpha-google-map-widget.php:300 154 msgid "Satellite"155 msgstr ""156 157 #: include/class-alpha-google-map-widget.php:301158 msgid "Terrain"159 msgstr ""160 161 #: include/class-alpha-google-map-widget.php:302162 168 msgid "Hybrid" 163 169 msgstr "" 164 170 165 #: include/class-alpha-google-map-widget.php:3 11171 #: include/class-alpha-google-map-widget.php:309 166 172 msgid "Height" 167 173 msgstr "" 168 174 169 #: include/class-alpha-google-map-widget.php:3 31175 #: include/class-alpha-google-map-widget.php:329 170 176 msgid "Zoom" 171 177 msgstr "" 172 178 173 #: include/class-alpha-google-map-widget.php:34 8179 #: include/class-alpha-google-map-widget.php:346 174 180 msgid "Disable Map Drag" 175 181 msgstr "" 176 182 177 #: include/class-alpha-google-map-widget.php:35 6183 #: include/class-alpha-google-map-widget.php:354 178 184 msgid "Map Type Controls" 179 185 msgstr "" 180 186 181 #: include/class-alpha-google-map-widget.php:36 4187 #: include/class-alpha-google-map-widget.php:362 182 188 msgid "Zoom Controls" 183 189 msgstr "" 184 190 185 #: include/class-alpha-google-map-widget.php:37 2191 #: include/class-alpha-google-map-widget.php:370 186 192 msgid "Street View Control" 187 193 msgstr "" 188 194 189 #: include/class-alpha-google-map-widget.php:3 80195 #: include/class-alpha-google-map-widget.php:378 190 196 msgid "Fullscreen Control" 191 197 msgstr "" 192 198 193 #: include/class-alpha-google-map-widget.php:38 8199 #: include/class-alpha-google-map-widget.php:386 194 200 msgid "Scroll Wheel Zoom" 195 201 msgstr "" 196 202 203 #: include/class-alpha-google-map-widget.php:394 204 msgid "One‑Finger Scroll (Gesture Handling)" 205 msgstr "" 206 197 207 #: include/class-alpha-google-map-widget.php:396 208 msgid "Enabled" 209 msgstr "" 210 211 #: include/class-alpha-google-map-widget.php:397 212 msgid "Disabled" 213 msgstr "" 214 215 #: include/class-alpha-google-map-widget.php:406 198 216 msgid "Info Container Always Opened" 199 217 msgstr "" 200 218 201 #: include/class-alpha-google-map-widget.php:4 04219 #: include/class-alpha-google-map-widget.php:414 202 220 msgid "Info Container Opened when Hovered" 203 221 msgstr "" 204 222 205 #: include/class-alpha-google-map-widget.php:4 12223 #: include/class-alpha-google-map-widget.php:422 206 224 msgid "Info Container Closed when Mouse Out" 207 225 msgstr "" 208 226 209 #: include/class-alpha-google-map-widget.php:4 33210 #: include/class-alpha-google-map-widget.php:5 17211 #: include/class-alpha-google-map-widget.php:6 01227 #: include/class-alpha-google-map-widget.php:443 228 #: include/class-alpha-google-map-widget.php:528 229 #: include/class-alpha-google-map-widget.php:613 212 230 msgid "Color" 213 231 msgstr "" 214 232 215 #: include/class-alpha-google-map-widget.php:4 57216 #: include/class-alpha-google-map-widget.php:5 41217 #: include/class-alpha-google-map-widget.php:6 25218 #: include/class-alpha-google-map-widget.php:7 14219 #: include/class-alpha-google-map-widget.php: 896233 #: include/class-alpha-google-map-widget.php:468 234 #: include/class-alpha-google-map-widget.php:553 235 #: include/class-alpha-google-map-widget.php:638 236 #: include/class-alpha-google-map-widget.php:727 237 #: include/class-alpha-google-map-widget.php:909 220 238 msgid "Margin" 221 239 msgstr "" 222 240 223 #: include/class-alpha-google-map-widget.php:4 69224 #: include/class-alpha-google-map-widget.php:5 53225 #: include/class-alpha-google-map-widget.php:6 37226 #: include/class-alpha-google-map-widget.php:7 26227 #: include/class-alpha-google-map-widget.php:9 08241 #: include/class-alpha-google-map-widget.php:480 242 #: include/class-alpha-google-map-widget.php:565 243 #: include/class-alpha-google-map-widget.php:650 244 #: include/class-alpha-google-map-widget.php:739 245 #: include/class-alpha-google-map-widget.php:921 228 246 msgid "Padding" 229 247 msgstr "" 230 248 231 #: include/class-alpha-google-map-widget.php:4 81232 #: include/class-alpha-google-map-widget.php:5 65233 #: include/class-alpha-google-map-widget.php:6 49234 #: include/class-alpha-google-map-widget.php:8 13249 #: include/class-alpha-google-map-widget.php:492 250 #: include/class-alpha-google-map-widget.php:577 251 #: include/class-alpha-google-map-widget.php:662 252 #: include/class-alpha-google-map-widget.php:826 235 253 msgid "Alignment" 236 254 msgstr "" 237 255 238 #: include/class-alpha-google-map-widget.php:4 85239 #: include/class-alpha-google-map-widget.php:5 69240 #: include/class-alpha-google-map-widget.php:6 53241 #: include/class-alpha-google-map-widget.php:8 17256 #: include/class-alpha-google-map-widget.php:496 257 #: include/class-alpha-google-map-widget.php:581 258 #: include/class-alpha-google-map-widget.php:666 259 #: include/class-alpha-google-map-widget.php:830 242 260 msgid "Left" 243 261 msgstr "" 244 262 245 #: include/class-alpha-google-map-widget.php: 489246 #: include/class-alpha-google-map-widget.php:5 73247 #: include/class-alpha-google-map-widget.php:6 57248 #: include/class-alpha-google-map-widget.php:8 21263 #: include/class-alpha-google-map-widget.php:500 264 #: include/class-alpha-google-map-widget.php:585 265 #: include/class-alpha-google-map-widget.php:670 266 #: include/class-alpha-google-map-widget.php:834 249 267 msgid "Center" 250 268 msgstr "" 251 269 252 #: include/class-alpha-google-map-widget.php: 493253 #: include/class-alpha-google-map-widget.php:5 77254 #: include/class-alpha-google-map-widget.php:6 61255 #: include/class-alpha-google-map-widget.php:8 25270 #: include/class-alpha-google-map-widget.php:504 271 #: include/class-alpha-google-map-widget.php:589 272 #: include/class-alpha-google-map-widget.php:674 273 #: include/class-alpha-google-map-widget.php:838 256 274 msgid "Right" 257 275 msgstr "" 258 276 259 #: include/class-alpha-google-map-widget.php:6 77277 #: include/class-alpha-google-map-widget.php:690 260 278 msgid "Map" 261 279 msgstr "" 262 280 263 #: include/class-alpha-google-map-widget.php: 693281 #: include/class-alpha-google-map-widget.php:706 264 282 msgid "Border Radius" 265 283 msgstr "" 266 284 267 #: include/class-alpha-google-map-widget.php:7 05285 #: include/class-alpha-google-map-widget.php:718 268 286 msgid "Shadow" 269 287 msgstr "" 270 288 271 #: include/class-alpha-google-map-widget.php:7 41272 #: include/class-alpha-google-map-widget.php:7 48273 #: include/class-alpha-google-map-widget.php:8 55289 #: include/class-alpha-google-map-widget.php:754 290 #: include/class-alpha-google-map-widget.php:761 291 #: include/class-alpha-google-map-widget.php:868 274 292 msgid "Map Title" 275 293 msgstr "" 276 294 277 #: include/class-alpha-google-map-widget.php:7 53295 #: include/class-alpha-google-map-widget.php:766 278 296 msgid "Enter your title" 279 297 msgstr "" 280 298 281 #: include/class-alpha-google-map-widget.php:7 54299 #: include/class-alpha-google-map-widget.php:767 282 300 msgid "Add Your Title Text Here" 283 301 msgstr "" 284 302 285 #: include/class-alpha-google-map-widget.php:7 61303 #: include/class-alpha-google-map-widget.php:774 286 304 msgid "Link" 287 305 msgstr "" 288 306 289 #: include/class-alpha-google-map-widget.php:7 80307 #: include/class-alpha-google-map-widget.php:793 290 308 msgid "Default" 291 309 msgstr "" 292 310 293 #: include/class-alpha-google-map-widget.php:7 81311 #: include/class-alpha-google-map-widget.php:794 294 312 msgid "Small" 295 313 msgstr "" 296 314 297 #: include/class-alpha-google-map-widget.php:7 82315 #: include/class-alpha-google-map-widget.php:795 298 316 msgid "Medium" 299 317 msgstr "" 300 318 301 #: include/class-alpha-google-map-widget.php:7 83319 #: include/class-alpha-google-map-widget.php:796 302 320 msgid "Large" 303 321 msgstr "" 304 322 305 #: include/class-alpha-google-map-widget.php:7 84323 #: include/class-alpha-google-map-widget.php:797 306 324 msgid "XL" 307 325 msgstr "" 308 326 309 #: include/class-alpha-google-map-widget.php:7 85327 #: include/class-alpha-google-map-widget.php:798 310 328 msgid "XXL" 311 329 msgstr "" 312 330 313 #: include/class-alpha-google-map-widget.php: 793331 #: include/class-alpha-google-map-widget.php:806 314 332 msgid "HTML Tag" 315 333 msgstr "" 316 334 317 #: include/class-alpha-google-map-widget.php:8 29335 #: include/class-alpha-google-map-widget.php:842 318 336 msgid "Justified" 319 337 msgstr "" 320 338 321 #: include/class-alpha-google-map-widget.php:8 43339 #: include/class-alpha-google-map-widget.php:856 322 340 msgid "View" 323 341 msgstr "" 324 342 325 #: include/class-alpha-google-map-widget.php:8 63343 #: include/class-alpha-google-map-widget.php:876 326 344 msgid "Text Color" 327 345 msgstr "" 328 346 329 #. translators: 1: Just text decoration 2: Just text decoration 330 #: include/class-alpha-google-map.php:172 331 msgid "%1$sAlpha Google Map For Elementor%2$s requires %1$s\"Elementor\"%2$s plugin to be active. Please activate Elementor to continue." 332 msgstr "" 333 334 #: include/class-alpha-google-map.php:173 347 #. translators: 1: Plugin name 2: Elementor 348 #: include/class-alpha-google-map.php:183 349 msgid "\"%1$s\" requires \"%2$s\" to be installed and activated." 350 msgstr "" 351 352 #: include/class-alpha-google-map.php:185 353 #: include/class-alpha-google-map.php:232 354 msgid "Elementor" 355 msgstr "" 356 357 #: include/class-alpha-google-map.php:194 335 358 msgid "Activate Elementor" 336 359 msgstr "" 337 360 338 #. translators: 1: Just text decoration 2: Just text decoration 339 #: include/class-alpha-google-map.php:180 340 msgid "%1$sAlpha Google Map For Elementor%2$s requires %1$s\"Elementor\"%2$s plugin to be installed and activated. Please install Elementor to continue." 341 msgstr "" 342 343 #: include/class-alpha-google-map.php:181 361 #: include/class-alpha-google-map.php:197 344 362 msgid "Install Elementor" 345 363 msgstr "" 346 364 347 365 #. translators: 1: Plugin name 2: Elementor 3: Required Elementor version 348 #: include/class-alpha-google-map.php:199 366 #: include/class-alpha-google-map.php:230 367 msgid "\"%1$s\" requires \"%2$s\" version %3$s or greater" 368 msgstr "" 369 370 #. translators: 1: Plugin name 2: PHP 3: Required PHP version 371 #: include/class-alpha-google-map.php:261 349 372 msgid "\"%1$s\" requires \"%2$s\" version %3$s or greater." 350 373 msgstr "" 351 374 352 #: include/class-alpha-google-map.php:201 353 msgid "Elementor" 354 msgstr "" 355 356 #. translators: 1: Plugin name 2: Required PHP version 357 #: include/class-alpha-google-map.php:220 358 msgid "\"%1$s\" requires PHP version %3$s or greater." 359 msgstr "" 375 #: include/class-alpha-google-map.php:263 376 msgid "PHP" 377 msgstr "" -
alpha-google-map-for-elementor/trunk/readme.txt
r3209591 r3276970 4 4 Tags: google-map, google, elementor, maps, page builder 5 5 Requires at least: 6.0 6 Tested up to: 6. 76 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 1. 2.28 Stable tag: 1.3 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 64 64 == Upgrade Notice == 65 65 66 = 1.2.2 = 67 Compatibility for the updated Elementor colors and typography schema. 66 = 1.3 = 67 Compatibility for WP 6.8 68 Feature: One finger scroll on mobile (GestureHandling) 68 69 69 70 == Frequently Asked Questions == … … 84 85 85 86 == Changelog == 87 88 = 1.3 - 2025-04-19 = 89 * Compatibility for WP 6.8 and 90 * Feature: One finger scroll on mobile (GestureHandling) 86 91 87 92 = 1.2.2 - 2024-12-18 =
Note: See TracChangeset
for help on using the changeset viewer.