dep
1 month ago
premium-banner.php
3 weeks ago
premium-blog.php
3 weeks ago
premium-button.php
3 weeks ago
premium-carousel.php
3 weeks ago
premium-contactform.php
3 weeks ago
premium-countdown.php
3 weeks ago
premium-counter.php
3 weeks ago
premium-dual-header.php
3 weeks ago
premium-fancytext.php
3 weeks ago
premium-grid.php
3 weeks ago
premium-icon-list.php
3 weeks ago
premium-image-button.php
3 weeks ago
premium-image-scroll.php
3 weeks ago
premium-image-separator.php
3 weeks ago
premium-lottie.php
3 weeks ago
premium-maps.php
3 weeks ago
premium-media-wheel.php
3 weeks ago
premium-mobile-menu.php
3 weeks ago
premium-modalbox.php
3 weeks ago
premium-nav-menu.php
3 weeks ago
premium-notifications.php
3 weeks ago
premium-person.php
3 weeks ago
premium-pinterest-feed.php
3 weeks ago
premium-post-ticker.php
3 weeks ago
premium-pricing-table.php
3 weeks ago
premium-progressbar.php
3 weeks ago
premium-search-form.php
3 weeks ago
premium-svg-drawer.php
3 weeks ago
premium-tcloud.php
3 weeks ago
premium-testimonials.php
3 weeks ago
premium-textual-showcase.php
3 weeks ago
premium-tiktok-feed.php
3 weeks ago
premium-title.php
3 weeks ago
premium-videobox.php
3 weeks ago
premium-vscroll.php
3 weeks ago
premium-weather.php
3 weeks ago
premium-world-clock.php
3 weeks ago
premium-world-clock.php
3270 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Premium World Clock. |
| 4 | */ |
| 5 | |
| 6 | namespace PremiumAddons\Widgets; |
| 7 | |
| 8 | // Elementor Classes. |
| 9 | use Elementor\Plugin; |
| 10 | use Elementor\Widget_Base; |
| 11 | use Elementor\Icons_Manager; |
| 12 | use Elementor\Controls_Manager; |
| 13 | use Elementor\Control_Media; |
| 14 | use Elementor\Group_Control_Border; |
| 15 | use Elementor\Group_Control_Typography; |
| 16 | use Elementor\Group_Control_Text_Shadow; |
| 17 | use Elementor\Group_Control_Box_Shadow; |
| 18 | use Elementor\Core\Kits\Documents\Tabs\Global_Colors; |
| 19 | use Elementor\Core\Kits\Documents\Tabs\Global_Typography; |
| 20 | |
| 21 | // PremiumAddons Classes. |
| 22 | use PremiumAddons\Includes\Helper_Functions; |
| 23 | use PremiumAddons\Includes\Controls\Premium_Background; |
| 24 | |
| 25 | if ( ! defined( 'ABSPATH' ) ) { |
| 26 | exit; // If this file is called directly, abort. |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Class Premium_World_Clock. |
| 31 | */ |
| 32 | class Premium_World_Clock extends Widget_Base { |
| 33 | |
| 34 | /** |
| 35 | * Options |
| 36 | * |
| 37 | * @var options |
| 38 | */ |
| 39 | private $options = null; |
| 40 | |
| 41 | /** |
| 42 | * Retrieve Widget Name. |
| 43 | * |
| 44 | * @since 1.0.0 |
| 45 | * @access public |
| 46 | */ |
| 47 | public function get_name() { |
| 48 | return 'premium-world-clock'; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Retrieve Widget Title. |
| 53 | * |
| 54 | * @since 1.0.0 |
| 55 | * @access public |
| 56 | */ |
| 57 | public function get_title() { |
| 58 | return __( 'World Clock', 'premium-addons-for-elementor' ); |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Retrieve Widget Icon. |
| 63 | * |
| 64 | * @since 1.0.0 |
| 65 | * @access public |
| 66 | * |
| 67 | * @return string widget icon. |
| 68 | */ |
| 69 | public function get_icon() { |
| 70 | return 'pa-world-clock'; |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Retrieve Widget Dependent CSS. |
| 75 | * |
| 76 | * @since 1.0.0 |
| 77 | * @access public |
| 78 | * |
| 79 | * @return array CSS style handles. |
| 80 | */ |
| 81 | public function get_style_depends() { |
| 82 | return array( |
| 83 | 'pa-glass', |
| 84 | 'pa-world-clock', |
| 85 | ); |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Retrieve Widget Dependent JS. |
| 90 | * |
| 91 | * @since 1.0.0 |
| 92 | * @access public |
| 93 | * |
| 94 | * @return array JS script handles. |
| 95 | */ |
| 96 | public function get_script_depends() { |
| 97 | |
| 98 | return array( |
| 99 | 'pa-glass', |
| 100 | 'pa-luxon', |
| 101 | 'premium-addons', |
| 102 | ); |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Retrieve Widget Categories. |
| 107 | * |
| 108 | * @since 1.5.1 |
| 109 | * @access public |
| 110 | * |
| 111 | * @return array Widget categories. |
| 112 | */ |
| 113 | public function get_categories() { |
| 114 | return array( 'premium-elements' ); |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * Retrieve Widget Dependent CSS. |
| 119 | * |
| 120 | * @since 1.0.0 |
| 121 | * @access public |
| 122 | * |
| 123 | * @return array CSS style handles. |
| 124 | */ |
| 125 | public function get_keywords() { |
| 126 | return array( 'pa', 'premium', 'premium world clock', 'world', 'clock', 'timezone', 'time' ); |
| 127 | } |
| 128 | |
| 129 | protected function is_dynamic_content(): bool { |
| 130 | return false; |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * Retrieve Widget Support URL. |
| 135 | * |
| 136 | * @access public |
| 137 | * |
| 138 | * @return string support URL. |
| 139 | */ |
| 140 | public function get_custom_help_url() { |
| 141 | return 'https://premiumaddons.com/support/'; |
| 142 | } |
| 143 | |
| 144 | public function has_widget_inner_wrapper(): bool { |
| 145 | return ! Helper_Functions::check_elementor_experiment( 'e_optimized_markup' ); |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * Register World Clock controls. |
| 150 | * |
| 151 | * @since 1.0.0 |
| 152 | * @access protected |
| 153 | */ |
| 154 | protected function register_controls() { |
| 155 | |
| 156 | $this->options = apply_filters( |
| 157 | 'pa_clock_options', |
| 158 | array( |
| 159 | 'skins' => array( |
| 160 | 'digital' => array( |
| 161 | 'label' => __( 'Digital', 'premium-addons-for-elementor' ), |
| 162 | 'options' => array( |
| 163 | 'skin-2' => __( 'Layout 1', 'premium-addons-for-elementor' ), |
| 164 | 'skin-3' => __( 'Layout 2', 'premium-addons-for-elementor' ), |
| 165 | 'skin-4' => __( 'Layout 3 (Pro)', 'premium-addons-for-elementor' ), |
| 166 | ), |
| 167 | ), |
| 168 | 'analog' => array( |
| 169 | 'label' => __( 'Analog', 'premium-addons-for-elementor' ), |
| 170 | 'options' => array( |
| 171 | 'skin-1' => __( 'Style 1', 'premium-addons-for-elementor' ), |
| 172 | 'skin-5' => __( 'Style 2', 'premium-addons-for-elementor' ), |
| 173 | 'skin-6' => __( 'Style 3 (Pro)', 'premium-addons-for-elementor' ), |
| 174 | 'skin-7' => __( 'Style 4 (Pro)', 'premium-addons-for-elementor' ), |
| 175 | ), |
| 176 | ), |
| 177 | ), |
| 178 | 'skin_condition' => array( 'skin-4', 'skin-6', 'skin-7' ), |
| 179 | ) |
| 180 | ); |
| 181 | |
| 182 | $this->add_clock_controls(); |
| 183 | |
| 184 | $this->add_additional_option_controls(); |
| 185 | |
| 186 | $this->add_helpful_info_section(); |
| 187 | |
| 188 | $this->add_units_style_controls(); |
| 189 | |
| 190 | Helper_Functions::register_papro_promotion_controls( $this, 'clock' ); |
| 191 | |
| 192 | $this->add_clock_style_controls(); |
| 193 | |
| 194 | $this->add_info_style_controls(); |
| 195 | |
| 196 | $this->add_days_style_controls(); |
| 197 | |
| 198 | $this->add_clock_num_style_controls(); |
| 199 | } |
| 200 | |
| 201 | /** Content Controls. */ |
| 202 | private function add_clock_controls() { |
| 203 | |
| 204 | $this->start_controls_section( |
| 205 | 'premium_world_clock_content', |
| 206 | array( |
| 207 | 'label' => __( 'Clock', 'premium-addons-for-elementor' ), |
| 208 | ) |
| 209 | ); |
| 210 | |
| 211 | $demo = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/elementor-world-clock-widget/', 'clock', 'wp-editor', 'demo' ); |
| 212 | Helper_Functions::add_templates_controls( $this, 'world-clock', $demo ); |
| 213 | |
| 214 | $this->add_control( |
| 215 | 'tz_type', |
| 216 | array( |
| 217 | 'label' => __( 'Timezone', 'premium-addons-for-elementor' ), |
| 218 | 'type' => Controls_Manager::SELECT, |
| 219 | 'options' => array( |
| 220 | 'local' => __( 'Current Timezone', 'premium-addons-for-elementor' ), |
| 221 | 'custom' => __( 'Custom Timezone', 'premium-addons-for-elementor' ), |
| 222 | ), |
| 223 | 'default' => 'local', |
| 224 | 'render_type' => 'template', |
| 225 | ) |
| 226 | ); |
| 227 | |
| 228 | $this->add_control( |
| 229 | 'custom_tz', |
| 230 | array( |
| 231 | 'label' => __( 'Zone Name', 'premium-addons-for-elementor' ), |
| 232 | 'type' => Controls_Manager::TEXT, |
| 233 | 'label_block' => true, |
| 234 | 'description' => 'Get your Time Zone from <a href="https://timezonedb.com/time-zones" target="_blank">Time Zones Of The World.</a>.', |
| 235 | 'dynamic' => array( 'active' => true ), |
| 236 | 'condition' => array( |
| 237 | 'tz_type' => 'custom', |
| 238 | ), |
| 239 | 'render_type' => 'template', |
| 240 | 'ai' => array( |
| 241 | 'active' => false, |
| 242 | ), |
| 243 | ) |
| 244 | ); |
| 245 | |
| 246 | $papro_activated = Helper_Functions::check_papro_version(); |
| 247 | |
| 248 | $this->add_control( |
| 249 | 'skin', |
| 250 | array( |
| 251 | 'label' => __( 'Layout', 'premium-addons-for-elementor' ), |
| 252 | 'type' => Controls_Manager::SELECT, |
| 253 | 'prefix_class' => 'premium-world-clock__', |
| 254 | 'render_type' => 'template', |
| 255 | 'groups' => $this->options['skins'], |
| 256 | 'default' => 'skin-2', |
| 257 | ) |
| 258 | ); |
| 259 | |
| 260 | if ( ! $papro_activated ) { |
| 261 | |
| 262 | $get_pro = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/pro', 'clock-widget', 'wp-editor', 'get-pro' ); |
| 263 | |
| 264 | $this->add_control( |
| 265 | 'clock_notice', |
| 266 | array( |
| 267 | 'type' => Controls_Manager::RAW_HTML, |
| 268 | 'raw' => __( 'This option is available in Premium Addons Pro. ', 'premium-addons-for-elementor' ) . '<a href="' . esc_url( $get_pro ) . '" target="_blank">' . __( 'Upgrade now!', 'premium-addons-for-elementor' ) . '</a>', |
| 269 | 'content_classes' => 'papro-upgrade-notice', |
| 270 | 'condition' => array( |
| 271 | 'skin' => $this->options['skin_condition'], |
| 272 | ), |
| 273 | ) |
| 274 | ); |
| 275 | |
| 276 | } |
| 277 | |
| 278 | $this->add_control( |
| 279 | 'clock_hands', |
| 280 | array( |
| 281 | 'label' => __( 'Clock Hands Style', 'premium-addons-for-elementor' ), |
| 282 | 'type' => Controls_Manager::SELECT, |
| 283 | 'prefix_class' => 'premium-world-clock__', |
| 284 | 'options' => array( |
| 285 | 'hand-0' => __( 'Style 1', 'premium-addons-for-elementor' ), |
| 286 | 'hand-1' => __( 'Style 2', 'premium-addons-for-elementor' ), |
| 287 | 'hand-2' => __( 'Style 3', 'premium-addons-for-elementor' ), |
| 288 | 'hand-3' => __( 'Style 4', 'premium-addons-for-elementor' ), |
| 289 | 'hand-4' => __( 'Style 5', 'premium-addons-for-elementor' ), |
| 290 | 'hand-5' => __( 'Style 6', 'premium-addons-for-elementor' ), |
| 291 | ), |
| 292 | 'default' => 'hand-0', |
| 293 | 'condition' => array( |
| 294 | 'skin' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), |
| 295 | ), |
| 296 | ) |
| 297 | ); |
| 298 | |
| 299 | $this->add_control( |
| 300 | 'time_format', |
| 301 | array( |
| 302 | 'label' => __( 'Time Format', 'premium-addons-for-elementor' ), |
| 303 | 'type' => Controls_Manager::SELECT, |
| 304 | 'options' => array( |
| 305 | 'hh' => __( '12 Hours', 'premium-addons-for-elementor' ), |
| 306 | 'HH' => __( '24 Hours', 'premium-addons-for-elementor' ), |
| 307 | ), |
| 308 | 'default' => 'HH', |
| 309 | 'render_type' => 'template', |
| 310 | 'condition' => array( |
| 311 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 312 | ), |
| 313 | ) |
| 314 | ); |
| 315 | |
| 316 | $this->add_control( |
| 317 | 'show_time', |
| 318 | array( |
| 319 | 'label' => __( 'Show Clock', 'premium-addons-for-elementor' ), |
| 320 | 'type' => Controls_Manager::SWITCHER, |
| 321 | 'default' => 'yes', |
| 322 | ) |
| 323 | ); |
| 324 | |
| 325 | $this->add_control( |
| 326 | 'show_indicators', |
| 327 | array( |
| 328 | 'label' => __( 'Show Clock Faces', 'premium-addons-for-elementor' ), |
| 329 | 'type' => Controls_Manager::SWITCHER, |
| 330 | 'default' => 'yes', |
| 331 | 'condition' => array( |
| 332 | 'show_time' => 'yes', |
| 333 | 'show_clock_num!' => 'yes', |
| 334 | 'skin' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), |
| 335 | ), |
| 336 | ) |
| 337 | ); |
| 338 | |
| 339 | $this->add_control( |
| 340 | 'show_clock_num', |
| 341 | array( |
| 342 | 'label' => __( 'Show Clock Numbers', 'premium-addons-for-elementor' ), |
| 343 | 'type' => Controls_Manager::SWITCHER, |
| 344 | 'condition' => array( |
| 345 | 'show_time' => 'yes', |
| 346 | 'skin' => array( 'skin-1', 'skin-5', 'skin-6' ), |
| 347 | ), |
| 348 | ) |
| 349 | ); |
| 350 | |
| 351 | $this->add_responsive_control( |
| 352 | 'clock_num_spacing', |
| 353 | array( |
| 354 | 'label' => __( 'Clock Number Spacing', 'premium-addons-for-elementor' ), |
| 355 | 'type' => Controls_Manager::SLIDER, |
| 356 | 'size_units' => array( 'px' ), |
| 357 | 'selectors' => array( |
| 358 | '{{WRAPPER}} .premium-world-clock__clock-numbers' => 'width: calc( 100% - {{SIZE}}% ); height: calc( 100% - {{SIZE}}% );', |
| 359 | ), |
| 360 | 'condition' => array( |
| 361 | 'show_time' => 'yes', |
| 362 | 'show_clock_num' => 'yes', |
| 363 | 'skin' => array( 'skin-1', 'skin-5', 'skin-6' ), |
| 364 | ), |
| 365 | ) |
| 366 | ); |
| 367 | |
| 368 | $this->add_control( |
| 369 | 'show_seconds', |
| 370 | array( |
| 371 | 'label' => __( 'Show Seconds', 'premium-addons-for-elementor' ), |
| 372 | 'type' => Controls_Manager::SWITCHER, |
| 373 | 'condition' => array( |
| 374 | 'show_time' => 'yes', |
| 375 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 376 | ), |
| 377 | ) |
| 378 | ); |
| 379 | |
| 380 | $this->add_control( |
| 381 | 'show_meridiem', |
| 382 | array( |
| 383 | 'label' => __( 'Show Meridiem', 'premium-addons-for-elementor' ), |
| 384 | 'type' => Controls_Manager::SWITCHER, |
| 385 | 'default' => 'yes', |
| 386 | 'conditions' => array( |
| 387 | 'relation' => 'and', |
| 388 | 'terms' => array( |
| 389 | array( |
| 390 | 'name' => 'show_time', |
| 391 | 'operator' => '===', |
| 392 | 'value' => 'yes', |
| 393 | ), |
| 394 | array( |
| 395 | 'relation' => 'or', |
| 396 | 'terms' => array( |
| 397 | array( |
| 398 | 'name' => 'skin', |
| 399 | 'operator' => 'in', |
| 400 | 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), |
| 401 | ), |
| 402 | array( |
| 403 | 'relation' => 'and', |
| 404 | 'terms' => array( |
| 405 | array( |
| 406 | 'name' => 'skin', |
| 407 | 'operator' => '!in', |
| 408 | 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), |
| 409 | ), |
| 410 | array( |
| 411 | 'name' => 'time_format', |
| 412 | 'operator' => '===', |
| 413 | 'value' => 'hh', |
| 414 | ), |
| 415 | ), |
| 416 | ), |
| 417 | ), |
| 418 | ), |
| 419 | ), |
| 420 | ), |
| 421 | ) |
| 422 | ); |
| 423 | |
| 424 | $this->add_control( |
| 425 | 'meridiem_type', |
| 426 | array( |
| 427 | 'label' => __( 'Show As:', 'premium-addons-for-elementor' ), |
| 428 | 'type' => Controls_Manager::SELECT, |
| 429 | 'render_type' => 'template', |
| 430 | 'options' => array( |
| 431 | 'text' => __( 'Text', 'premium-addons-for-elementor' ), |
| 432 | 'icon' => __( 'Icon', 'premium-addons-for-elementor' ), |
| 433 | ), |
| 434 | 'default' => 'text', |
| 435 | 'condition' => array( |
| 436 | 'time_format' => 'hh', |
| 437 | 'show_time' => 'yes', |
| 438 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 439 | ), |
| 440 | ) |
| 441 | ); |
| 442 | |
| 443 | $this->add_control( |
| 444 | 'show_timezone_offset', |
| 445 | array( |
| 446 | 'label' => __( 'Show GMT Offset', 'premium-addons-for-elementor' ), |
| 447 | 'type' => Controls_Manager::SWITCHER, |
| 448 | 'description' => __( 'Shows the number of hours and minutes that the time differs from Greenwich Mean Time', 'premium-addons-for-elementor' ), |
| 449 | ) |
| 450 | ); |
| 451 | |
| 452 | $this->add_control( |
| 453 | 'offset_format', |
| 454 | array( |
| 455 | 'label' => __( 'Offset Format', 'premium-addons-for-elementor' ), |
| 456 | 'type' => Controls_Manager::SELECT, |
| 457 | 'options' => array( |
| 458 | 'Z' => __( '+5HRS', 'premium-addons-for-elementor' ), |
| 459 | 'ZZ' => __( '+05:00', 'premium-addons-for-elementor' ), |
| 460 | ), |
| 461 | 'default' => 'ZZ', |
| 462 | 'render_type' => 'template', |
| 463 | 'condition' => array( |
| 464 | 'show_timezone_offset' => 'yes', |
| 465 | ), |
| 466 | ) |
| 467 | ); |
| 468 | |
| 469 | $this->add_responsive_control( |
| 470 | 'clock_size', |
| 471 | array( |
| 472 | 'label' => __( 'Clock Size', 'premium-addons-for-elementor' ), |
| 473 | 'type' => Controls_Manager::SLIDER, |
| 474 | 'size_units' => array( 'px' ), |
| 475 | 'range' => array( |
| 476 | 'px' => array( |
| 477 | 'min' => 0, |
| 478 | 'max' => 1000, |
| 479 | ), |
| 480 | ), |
| 481 | 'selectors' => array( |
| 482 | '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-4) .premium-world-clock__time-wrapper, |
| 483 | {{WRAPPER}}.premium-world-clock__skin-1 .premium-world-clock__circle, |
| 484 | {{WRAPPER}}.premium-world-clock__skin-5 .premium-world-clock__circle, |
| 485 | {{WRAPPER}}.premium-world-clock__skin-6 .premium-world-clock__circle, |
| 486 | {{WRAPPER}}.premium-world-clock__skin-7 .premium-world-clock__circle' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', |
| 487 | '{{WRAPPER}}.premium-world-clock__skin-4 .premium-world-clock__time-wrapper, |
| 488 | {{WRAPPER}}.premium-world-clock__skin-4 .premium-world-clock__date-wrapper' => 'width: {{SIZE}}{{UNIT}};', |
| 489 | ), |
| 490 | 'condition' => array( |
| 491 | 'skin!' => array( 'skin-3' ), |
| 492 | 'show_time' => 'yes', |
| 493 | ), |
| 494 | ) |
| 495 | ); |
| 496 | |
| 497 | $this->add_responsive_control( |
| 498 | 'time_spacing', |
| 499 | array( |
| 500 | 'label' => __( 'Units Spacing', 'premium-addons-for-elementor' ), |
| 501 | 'type' => Controls_Manager::SLIDER, |
| 502 | 'size_units' => array( 'px' ), |
| 503 | 'condition' => array( |
| 504 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 505 | 'show_time' => 'yes', |
| 506 | ), |
| 507 | 'selectors' => array( |
| 508 | '{{WRAPPER}} .premium-world-clock__time-wrapper' => 'gap: {{SIZE}}px;', |
| 509 | ), |
| 510 | ) |
| 511 | ); |
| 512 | |
| 513 | $this->add_responsive_control( |
| 514 | 'meridiem_hor', |
| 515 | array( |
| 516 | 'label' => __( 'Meridiem Horizontal Position', 'premium-addons-for-elementor' ), |
| 517 | 'type' => Controls_Manager::SLIDER, |
| 518 | 'size_units' => array( 'px' ), |
| 519 | 'range' => array( |
| 520 | 'px' => array( |
| 521 | 'min' => -100, |
| 522 | 'max' => 300, |
| 523 | ), |
| 524 | ), |
| 525 | 'conditions' => array( |
| 526 | 'terms' => array( |
| 527 | array( |
| 528 | 'name' => 'show_time', |
| 529 | 'operator' => '===', |
| 530 | 'value' => 'yes', |
| 531 | ), |
| 532 | array( |
| 533 | 'name' => 'show_meridiem', |
| 534 | 'operator' => '===', |
| 535 | 'value' => 'yes', |
| 536 | ), |
| 537 | array( |
| 538 | 'relation' => 'or', |
| 539 | 'terms' => array( |
| 540 | array( |
| 541 | 'name' => 'skin', |
| 542 | 'operator' => 'in', |
| 543 | 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), |
| 544 | ), |
| 545 | array( |
| 546 | 'terms' => array( |
| 547 | array( |
| 548 | 'name' => 'skin', |
| 549 | 'operator' => '!in', |
| 550 | 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), |
| 551 | ), |
| 552 | array( |
| 553 | 'name' => 'time_format', |
| 554 | 'operator' => '===', |
| 555 | 'value' => 'hh', |
| 556 | ), |
| 557 | ), |
| 558 | ), |
| 559 | ), |
| 560 | ), |
| 561 | ), |
| 562 | ), |
| 563 | 'selectors' => array( |
| 564 | '{{WRAPPER}} .premium-world-clock__meridiem' => 'left: {{SIZE}}px;', |
| 565 | ), |
| 566 | ) |
| 567 | ); |
| 568 | |
| 569 | $this->add_responsive_control( |
| 570 | 'meridiem_ver', |
| 571 | array( |
| 572 | 'label' => __( 'Meridiem Vertical Position', 'premium-addons-for-elementor' ), |
| 573 | 'type' => Controls_Manager::SLIDER, |
| 574 | 'size_units' => array( 'px' ), |
| 575 | 'range' => array( |
| 576 | 'px' => array( |
| 577 | 'min' => -100, |
| 578 | 'max' => 300, |
| 579 | ), |
| 580 | ), |
| 581 | 'conditions' => array( |
| 582 | 'terms' => array( |
| 583 | array( |
| 584 | 'name' => 'show_time', |
| 585 | 'operator' => '===', |
| 586 | 'value' => 'yes', |
| 587 | ), |
| 588 | array( |
| 589 | 'name' => 'show_meridiem', |
| 590 | 'operator' => '===', |
| 591 | 'value' => 'yes', |
| 592 | ), |
| 593 | array( |
| 594 | 'relation' => 'or', |
| 595 | 'terms' => array( |
| 596 | array( |
| 597 | 'name' => 'skin', |
| 598 | 'operator' => 'in', |
| 599 | 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), |
| 600 | ), |
| 601 | array( |
| 602 | 'terms' => array( |
| 603 | array( |
| 604 | 'name' => 'skin', |
| 605 | 'operator' => '!in', |
| 606 | 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), |
| 607 | ), |
| 608 | array( |
| 609 | 'name' => 'time_format', |
| 610 | 'operator' => '===', |
| 611 | 'value' => 'hh', |
| 612 | ), |
| 613 | ), |
| 614 | ), |
| 615 | ), |
| 616 | ), |
| 617 | ), |
| 618 | ), |
| 619 | 'selectors' => array( |
| 620 | '{{WRAPPER}} .premium-world-clock__meridiem' => 'top: {{SIZE}}px;', |
| 621 | ), |
| 622 | ) |
| 623 | ); |
| 624 | |
| 625 | $this->end_controls_section(); |
| 626 | } |
| 627 | |
| 628 | private function add_additional_option_controls() { |
| 629 | |
| 630 | $info_conditions = array( |
| 631 | 'relation' => 'or', |
| 632 | 'terms' => array( |
| 633 | array( |
| 634 | 'name' => 'clock_title', |
| 635 | 'operator' => '!==', |
| 636 | 'value' => '', |
| 637 | ), |
| 638 | array( |
| 639 | 'name' => 'date', |
| 640 | 'value' => 'yes', |
| 641 | ), |
| 642 | array( |
| 643 | 'name' => 'show_timezone_offset', |
| 644 | 'value' => 'yes', |
| 645 | ), |
| 646 | ), |
| 647 | ); |
| 648 | |
| 649 | $info_display_conditions = array( |
| 650 | 'relation' => 'or', |
| 651 | 'terms' => array( |
| 652 | array( |
| 653 | 'terms' => array( |
| 654 | array( |
| 655 | 'name' => 'clock_title', |
| 656 | 'operator' => '!==', |
| 657 | 'value' => '', |
| 658 | ), |
| 659 | array( |
| 660 | 'name' => 'date', |
| 661 | 'value' => 'yes', |
| 662 | ), |
| 663 | ), |
| 664 | ), |
| 665 | array( |
| 666 | 'terms' => array( |
| 667 | array( |
| 668 | 'name' => 'clock_title', |
| 669 | 'operator' => '!==', |
| 670 | 'value' => '', |
| 671 | ), |
| 672 | array( |
| 673 | 'name' => 'show_timezone_offset', |
| 674 | 'value' => 'yes', |
| 675 | ), |
| 676 | ), |
| 677 | ), |
| 678 | array( |
| 679 | 'terms' => array( |
| 680 | array( |
| 681 | 'name' => 'show_timezone_offset', |
| 682 | 'value' => 'yes', |
| 683 | ), |
| 684 | array( |
| 685 | 'name' => 'date', |
| 686 | 'value' => 'yes', |
| 687 | ), |
| 688 | ), |
| 689 | ), |
| 690 | ), |
| 691 | ); |
| 692 | |
| 693 | $this->start_controls_section( |
| 694 | 'additional_options_section', |
| 695 | array( |
| 696 | 'label' => __( 'Additional Settings', 'premium-addons-for-elementor' ), |
| 697 | 'condition' => array( |
| 698 | 'skin!' => $this->options['skin_condition'], |
| 699 | ), |
| 700 | ) |
| 701 | ); |
| 702 | |
| 703 | $this->add_control( |
| 704 | 'clock_title', |
| 705 | array( |
| 706 | 'label' => __( 'Title', 'premium-addons-for-elementor' ), |
| 707 | 'type' => Controls_Manager::TEXT, |
| 708 | 'label_block' => true, |
| 709 | 'dynamic' => array( 'active' => true ), |
| 710 | ) |
| 711 | ); |
| 712 | |
| 713 | $this->add_control( |
| 714 | 'date', |
| 715 | array( |
| 716 | 'label' => __( 'Show Date', 'premium-addons-for-elementor' ), |
| 717 | 'type' => Controls_Manager::SWITCHER, |
| 718 | 'default' => 'yes', |
| 719 | ) |
| 720 | ); |
| 721 | |
| 722 | $this->add_control( |
| 723 | 'days_num', |
| 724 | array( |
| 725 | 'label' => __( 'Days Before/After', 'premium-addons-for-elementor' ), |
| 726 | 'type' => Controls_Manager::SELECT, |
| 727 | 'description' => __( 'Number of days to show before/after the current day.', 'premium-addons-for-elementor' ), |
| 728 | 'options' => array( |
| 729 | '1' => __( '1 Day', 'premium-addons-for-elementor' ), |
| 730 | '2' => __( '2 Days', 'premium-addons-for-elementor' ), |
| 731 | '3' => __( '3 Days', 'premium-addons-for-elementor' ), |
| 732 | ), |
| 733 | 'default' => '3', |
| 734 | 'render_type' => 'template', |
| 735 | 'condition' => array( |
| 736 | 'date' => 'yes', |
| 737 | 'skin' => 'skin-3', |
| 738 | ), |
| 739 | ) |
| 740 | ); |
| 741 | |
| 742 | $this->add_control( |
| 743 | 'date_format', |
| 744 | array( |
| 745 | 'label' => __( 'Date Format', 'premium-addons-for-elementor' ), |
| 746 | 'type' => Controls_Manager::SELECT, |
| 747 | 'render_type' => 'template', |
| 748 | 'options' => array( |
| 749 | 'D' => __( '8/6/2023', 'premium-addons-for-elementor' ), |
| 750 | 'DD' => __( 'Aug 6, 2023', 'premium-addons-for-elementor' ), |
| 751 | 'DDD' => __( 'August 6, 2023', 'premium-addons-for-elementor' ), |
| 752 | 'DDDD' => __( 'Wednesday, August 6, 2023', 'premium-addons-for-elementor' ), |
| 753 | ), |
| 754 | 'default' => 'DDD', |
| 755 | 'condition' => array( |
| 756 | 'date' => 'yes', |
| 757 | 'skin!' => array( 'skin-3', 'skin-4' ), |
| 758 | ), |
| 759 | ) |
| 760 | ); |
| 761 | |
| 762 | $this->add_control( |
| 763 | 'date_format_digital', |
| 764 | array( |
| 765 | 'label' => __( 'Date Format', 'premium-addons-for-elementor' ), |
| 766 | 'type' => Controls_Manager::SELECT, |
| 767 | 'render_type' => 'template', |
| 768 | 'options' => array( |
| 769 | 'dn|m|d' => __( 'Day Number | Month | Day', 'premium-addons-for-elementor' ), |
| 770 | 'm|dn|d' => __( 'Month | Day Number | Day', 'premium-addons-for-elementor' ), |
| 771 | 'custom' => __( 'custom', 'premium-addons-for-elementor' ), |
| 772 | ), |
| 773 | 'default' => 'm|dn|d', |
| 774 | 'condition' => array( |
| 775 | 'date' => 'yes', |
| 776 | 'skin' => 'skin-4', |
| 777 | ), |
| 778 | ) |
| 779 | ); |
| 780 | |
| 781 | $this->add_control( |
| 782 | 'custom_date_format', |
| 783 | array( |
| 784 | 'label' => __( 'Custom Date Format', 'premium-addons-for-elementor' ), |
| 785 | 'type' => Controls_Manager::TEXT, |
| 786 | 'label_block' => true, |
| 787 | 'description' => 'Use this option to re-arrange the date segments separated by |, EX: d|m|dn, d = day name, m = month name, dn = day number', |
| 788 | 'render_type' => 'template', |
| 789 | 'condition' => array( |
| 790 | 'skin' => 'skin-4', |
| 791 | 'date' => 'yes', |
| 792 | 'date_format_digital' => 'custom', |
| 793 | ), |
| 794 | 'ai' => array( |
| 795 | 'active' => false, |
| 796 | ), |
| 797 | ) |
| 798 | ); |
| 799 | |
| 800 | $this->add_responsive_control( |
| 801 | 'unit_display', |
| 802 | array( |
| 803 | 'label' => __( 'Units Display', 'premium-addons-for-elementor' ), |
| 804 | 'type' => Controls_Manager::CHOOSE, |
| 805 | 'prefix_class' => 'premium-world-clock__unit-', |
| 806 | 'toggle' => false, |
| 807 | 'separator' => 'before', |
| 808 | 'options' => array( |
| 809 | 'row' => array( |
| 810 | 'title' => __( 'Inline', 'premium-addons-for-elementor' ), |
| 811 | 'icon' => 'eicon-navigation-horizontal', |
| 812 | ), |
| 813 | 'column' => array( |
| 814 | 'title' => __( 'Block', 'premium-addons-for-elementor' ), |
| 815 | 'icon' => 'eicon-navigation-vertical', |
| 816 | ), |
| 817 | ), |
| 818 | 'default' => 'row', |
| 819 | 'condition' => array( |
| 820 | 'skin' => 'skin-2', |
| 821 | 'show_time' => 'yes', |
| 822 | ), |
| 823 | 'selectors' => array( |
| 824 | '{{WRAPPER}} .premium-world-clock__time-wrapper' => 'flex-direction: {{VALUE}}', |
| 825 | 'body.rtl {{WRAPPER}}.premium-world-clock__unit-row .premium-world-clock__time-wrapper' => 'flex-direction: row-reverse;', |
| 826 | ), |
| 827 | ) |
| 828 | ); |
| 829 | |
| 830 | $this->add_responsive_control( |
| 831 | 'layout', |
| 832 | array( |
| 833 | 'label' => __( 'Display', 'premium-addons-for-elementor' ), |
| 834 | 'type' => Controls_Manager::CHOOSE, |
| 835 | 'prefix_class' => 'premium-world-clock__', |
| 836 | 'toggle' => false, |
| 837 | 'separator' => 'before', |
| 838 | 'options' => array( |
| 839 | 'row' => array( |
| 840 | 'title' => __( 'Inline', 'premium-addons-for-elementor' ), |
| 841 | 'icon' => 'eicon-navigation-horizontal', |
| 842 | ), |
| 843 | 'column' => array( |
| 844 | 'title' => __( 'Block', 'premium-addons-for-elementor' ), |
| 845 | 'icon' => 'eicon-navigation-vertical', |
| 846 | ), |
| 847 | ), |
| 848 | 'default' => 'column', |
| 849 | 'conditions' => array( |
| 850 | 'terms' => array( |
| 851 | array( |
| 852 | 'name' => 'show_time', |
| 853 | 'value' => 'yes', |
| 854 | ), |
| 855 | array( |
| 856 | 'name' => 'skin', |
| 857 | 'operator' => '!==', |
| 858 | 'value' => 'skin-3', |
| 859 | ), |
| 860 | $info_conditions, |
| 861 | ), |
| 862 | ), |
| 863 | 'selectors' => array( |
| 864 | '{{WRAPPER}} .premium-world-clock__clock-wrapper' => 'flex-direction: {{VALUE}}', |
| 865 | ), |
| 866 | ) |
| 867 | ); |
| 868 | |
| 869 | $this->add_responsive_control( |
| 870 | 'info_layout', |
| 871 | array( |
| 872 | 'label' => __( 'Info Display', 'premium-addons-for-elementor' ), |
| 873 | 'type' => Controls_Manager::CHOOSE, |
| 874 | 'prefix_class' => 'premium-world-clock__info-', |
| 875 | 'toggle' => false, |
| 876 | 'options' => array( |
| 877 | 'row' => array( |
| 878 | 'title' => __( 'Inline', 'premium-addons-for-elementor' ), |
| 879 | 'icon' => 'eicon-navigation-horizontal', |
| 880 | ), |
| 881 | 'column' => array( |
| 882 | 'title' => __( 'Block', 'premium-addons-for-elementor' ), |
| 883 | 'icon' => 'eicon-navigation-vertical', |
| 884 | ), |
| 885 | ), |
| 886 | 'default' => 'column', |
| 887 | 'conditions' => array( |
| 888 | 'terms' => array( |
| 889 | array( |
| 890 | 'terms' => array( |
| 891 | array( |
| 892 | 'name' => 'skin', |
| 893 | 'operator' => '!in', |
| 894 | 'value' => array( 'skin-3', 'skin-4' ), |
| 895 | ), |
| 896 | $info_display_conditions, |
| 897 | ), |
| 898 | ), |
| 899 | ), |
| 900 | ), |
| 901 | 'selectors' => array( |
| 902 | '{{WRAPPER}} .premium-world-clock__additional-info' => 'flex-direction: {{VALUE}}', |
| 903 | ), |
| 904 | ) |
| 905 | ); |
| 906 | |
| 907 | $this->add_responsive_control( |
| 908 | 'info_layout_digital', |
| 909 | array( |
| 910 | 'label' => __( 'Info Display', 'premium-addons-for-elementor' ), |
| 911 | 'type' => Controls_Manager::CHOOSE, |
| 912 | 'prefix_class' => 'premium-world-clock__info-', |
| 913 | 'toggle' => false, |
| 914 | 'options' => array( |
| 915 | 'row' => array( |
| 916 | 'title' => __( 'Inline', 'premium-addons-for-elementor' ), |
| 917 | 'icon' => 'eicon-navigation-horizontal', |
| 918 | ), |
| 919 | 'column' => array( |
| 920 | 'title' => __( 'Block', 'premium-addons-for-elementor' ), |
| 921 | 'icon' => 'eicon-navigation-vertical', |
| 922 | ), |
| 923 | ), |
| 924 | 'default' => 'column', |
| 925 | 'conditions' => array( |
| 926 | 'terms' => array( |
| 927 | array( |
| 928 | 'name' => 'skin', |
| 929 | 'operator' => 'in', |
| 930 | 'value' => array( 'skin-3', 'skin-4' ), |
| 931 | ), |
| 932 | array( |
| 933 | 'name' => 'clock_title', |
| 934 | 'operator' => '!==', |
| 935 | 'value' => '', |
| 936 | ), |
| 937 | array( |
| 938 | 'name' => 'show_timezone_offset', |
| 939 | 'value' => 'yes', |
| 940 | ), |
| 941 | ), |
| 942 | ), |
| 943 | 'selectors' => array( |
| 944 | '{{WRAPPER}} .premium-world-clock__additional-info' => 'flex-direction: {{VALUE}}', |
| 945 | ), |
| 946 | ) |
| 947 | ); |
| 948 | |
| 949 | $this->add_responsive_control( |
| 950 | 'info_order', |
| 951 | array( |
| 952 | 'label' => __( 'Clock Info Order', 'premium-addons-for-elementor' ), |
| 953 | 'type' => Controls_Manager::CHOOSE, |
| 954 | 'toggle' => false, |
| 955 | 'options' => array( |
| 956 | '0' => array( |
| 957 | 'title' => __( 'Start', 'premium-addons-for-elementor' ), |
| 958 | 'icon' => 'eicon-order-start', |
| 959 | ), |
| 960 | '2' => array( |
| 961 | 'title' => __( 'End', 'premium-addons-for-elementor' ), |
| 962 | 'icon' => 'eicon-order-end', |
| 963 | ), |
| 964 | ), |
| 965 | 'default' => '0', |
| 966 | 'conditions' => array( |
| 967 | 'terms' => array( |
| 968 | array( |
| 969 | 'name' => 'show_time', |
| 970 | 'operator' => '===', |
| 971 | 'value' => 'yes', |
| 972 | ), |
| 973 | $info_conditions, |
| 974 | ), |
| 975 | ), |
| 976 | 'selectors' => array( |
| 977 | '{{WRAPPER}} .premium-world-clock__additional-info' => 'order: {{VALUE}}', |
| 978 | ), |
| 979 | ) |
| 980 | ); |
| 981 | |
| 982 | $this->add_responsive_control( |
| 983 | 'title_order', |
| 984 | array( |
| 985 | 'label' => __( 'Title Order', 'premium-addons-for-elementor' ), |
| 986 | 'type' => Controls_Manager::CHOOSE, |
| 987 | 'toggle' => false, |
| 988 | 'options' => array( |
| 989 | '0' => array( |
| 990 | 'title' => __( 'Start', 'premium-addons-for-elementor' ), |
| 991 | 'icon' => 'eicon-order-start', |
| 992 | ), |
| 993 | '2' => array( |
| 994 | 'title' => __( 'End', 'premium-addons-for-elementor' ), |
| 995 | 'icon' => 'eicon-order-end', |
| 996 | ), |
| 997 | ), |
| 998 | 'default' => '0', |
| 999 | 'conditions' => array( |
| 1000 | 'terms' => array( |
| 1001 | array( |
| 1002 | 'name' => 'skin', |
| 1003 | 'operator' => '!in', |
| 1004 | 'value' => array( 'skin-3', 'skin-4' ), |
| 1005 | ), |
| 1006 | array( |
| 1007 | 'relation' => 'or', |
| 1008 | 'terms' => array( |
| 1009 | array( |
| 1010 | 'terms' => array( |
| 1011 | array( |
| 1012 | 'name' => 'clock_title', |
| 1013 | 'operator' => '!==', |
| 1014 | 'value' => '', |
| 1015 | ), |
| 1016 | array( |
| 1017 | 'name' => 'date', |
| 1018 | 'value' => 'yes', |
| 1019 | ), |
| 1020 | ), |
| 1021 | ), |
| 1022 | array( |
| 1023 | 'terms' => array( |
| 1024 | array( |
| 1025 | 'name' => 'clock_title', |
| 1026 | 'operator' => '!==', |
| 1027 | 'value' => '', |
| 1028 | ), |
| 1029 | array( |
| 1030 | 'name' => 'show_timezone_offset', |
| 1031 | 'value' => 'yes', |
| 1032 | ), |
| 1033 | ), |
| 1034 | ), |
| 1035 | ), |
| 1036 | ), |
| 1037 | ), |
| 1038 | ), |
| 1039 | 'selectors' => array( |
| 1040 | '{{WRAPPER}} .premium-world-clock__clock-title' => 'order: {{VALUE}}', |
| 1041 | ), |
| 1042 | ) |
| 1043 | ); |
| 1044 | |
| 1045 | $this->add_control( |
| 1046 | 'clock_alignment', |
| 1047 | array( |
| 1048 | 'label' => __( 'Clock Alignment', 'premium-addons-for-elementor' ), |
| 1049 | 'type' => Controls_Manager::CHOOSE, |
| 1050 | 'options' => array( |
| 1051 | 'flex-start' => array( |
| 1052 | 'title' => __( 'Start', 'premium-addons-for-elementor' ), |
| 1053 | 'icon' => 'eicon-order-start', |
| 1054 | ), |
| 1055 | 'center' => array( |
| 1056 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 1057 | 'icon' => 'eicon-h-align-center', |
| 1058 | ), |
| 1059 | 'flex-end' => array( |
| 1060 | 'title' => __( 'End', 'premium-addons-for-elementor' ), |
| 1061 | 'icon' => 'eicon-order-end', |
| 1062 | ), |
| 1063 | ), |
| 1064 | 'default' => 'center', |
| 1065 | 'toggle' => false, |
| 1066 | 'selectors' => array( |
| 1067 | '{{WRAPPER}}:not(.premium-world-clock__column) .premium-world-clock__clock-wrapper' => 'justify-content: {{VALUE}};', |
| 1068 | '{{WRAPPER}}.premium-world-clock__column .premium-world-clock__clock-wrapper' => 'align-items: {{VALUE}};', |
| 1069 | ), |
| 1070 | ) |
| 1071 | ); |
| 1072 | |
| 1073 | $this->add_responsive_control( |
| 1074 | 'clock_ver_align', |
| 1075 | array( |
| 1076 | 'label' => __( 'Clock Vertical Alignment', 'premium-addons-for-elementor' ), |
| 1077 | 'type' => Controls_Manager::CHOOSE, |
| 1078 | 'options' => array( |
| 1079 | 'flex-start' => array( |
| 1080 | 'title' => __( 'Top', 'premium-addons-for-elementor' ), |
| 1081 | 'icon' => 'eicon-arrow-up', |
| 1082 | ), |
| 1083 | 'center' => array( |
| 1084 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 1085 | 'icon' => 'eicon-text-align-justify', |
| 1086 | ), |
| 1087 | 'flex-end' => array( |
| 1088 | 'title' => __( 'Bottom', 'premium-addons-for-elementor' ), |
| 1089 | 'icon' => 'eicon-arrow-down', |
| 1090 | ), |
| 1091 | ), |
| 1092 | 'default' => 'center', |
| 1093 | 'toggle' => false, |
| 1094 | 'conditions' => array( |
| 1095 | 'relation' => 'and', |
| 1096 | 'terms' => array( |
| 1097 | $info_conditions, |
| 1098 | array( |
| 1099 | 'name' => 'layout', |
| 1100 | 'value' => 'row', |
| 1101 | ), |
| 1102 | array( |
| 1103 | 'name' => 'show_time', |
| 1104 | 'value' => 'yes', |
| 1105 | ), |
| 1106 | ), |
| 1107 | ), |
| 1108 | 'selectors' => array( |
| 1109 | '{{WRAPPER}} .premium-world-clock__clock-wrapper' => 'align-items: {{VALUE}};', |
| 1110 | ), |
| 1111 | ) |
| 1112 | ); |
| 1113 | |
| 1114 | $this->add_responsive_control( |
| 1115 | 'info_txt_align', |
| 1116 | array( |
| 1117 | 'label' => __( 'Info Alignment', 'premium-addons-for-elementor' ), |
| 1118 | 'type' => Controls_Manager::CHOOSE, |
| 1119 | 'options' => array( |
| 1120 | 'left' => array( |
| 1121 | 'title' => __( 'Left', 'premium-addons-for-elementor' ), |
| 1122 | 'icon' => 'eicon-text-align-left', |
| 1123 | ), |
| 1124 | 'center' => array( |
| 1125 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 1126 | 'icon' => 'eicon-text-align-center', |
| 1127 | ), |
| 1128 | 'right' => array( |
| 1129 | 'title' => __( 'Right', 'premium-addons-for-elementor' ), |
| 1130 | 'icon' => 'eicon-text-align-right', |
| 1131 | ), |
| 1132 | ), |
| 1133 | 'toggle' => false, |
| 1134 | 'default' => 'center', |
| 1135 | 'conditions' => array( |
| 1136 | 'relation' => 'and', |
| 1137 | 'terms' => array( |
| 1138 | array( |
| 1139 | 'name' => 'skin', |
| 1140 | 'operator' => '!in', |
| 1141 | 'value' => array( 'skin-3', 'skin-4' ), |
| 1142 | ), |
| 1143 | array( |
| 1144 | 'name' => 'info_layout', |
| 1145 | 'operator' => '===', |
| 1146 | 'value' => 'column', |
| 1147 | ), |
| 1148 | array( |
| 1149 | 'relation' => 'or', |
| 1150 | 'terms' => array( |
| 1151 | array( |
| 1152 | 'terms' => array( |
| 1153 | array( |
| 1154 | 'name' => 'clock_title', |
| 1155 | 'operator' => '!==', |
| 1156 | 'value' => '', |
| 1157 | ), |
| 1158 | array( |
| 1159 | 'name' => 'date', |
| 1160 | 'value' => 'yes', |
| 1161 | ), |
| 1162 | ), |
| 1163 | ), |
| 1164 | array( |
| 1165 | 'terms' => array( |
| 1166 | array( |
| 1167 | 'name' => 'clock_title', |
| 1168 | 'operator' => '!==', |
| 1169 | 'value' => '', |
| 1170 | ), |
| 1171 | array( |
| 1172 | 'name' => 'show_timezone_offset', |
| 1173 | 'value' => 'yes', |
| 1174 | ), |
| 1175 | ), |
| 1176 | ), |
| 1177 | array( |
| 1178 | 'terms' => array( |
| 1179 | array( |
| 1180 | 'name' => 'show_timezone_offset', |
| 1181 | 'value' => 'yes', |
| 1182 | ), |
| 1183 | array( |
| 1184 | 'name' => 'date', |
| 1185 | 'value' => 'yes', |
| 1186 | ), |
| 1187 | ), |
| 1188 | ), |
| 1189 | ), |
| 1190 | ), |
| 1191 | ), |
| 1192 | ), |
| 1193 | 'selectors' => array( |
| 1194 | '{{WRAPPER}} .premium-world-clock__additional-info' => 'text-align: {{VALUE}};', |
| 1195 | ), |
| 1196 | ) |
| 1197 | ); |
| 1198 | |
| 1199 | $this->add_responsive_control( |
| 1200 | 'info_txt_align_digital', |
| 1201 | array( |
| 1202 | 'label' => __( 'Info Alignment', 'premium-addons-for-elementor' ), |
| 1203 | 'type' => Controls_Manager::CHOOSE, |
| 1204 | 'options' => array( |
| 1205 | 'flex-start' => array( |
| 1206 | 'title' => __( 'Start', 'premium-addons-for-elementor' ), |
| 1207 | 'icon' => 'eicon-text-align-left', |
| 1208 | ), |
| 1209 | 'center' => array( |
| 1210 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 1211 | 'icon' => 'eicon-text-align-center', |
| 1212 | ), |
| 1213 | 'flex-end' => array( |
| 1214 | 'title' => __( 'End', 'premium-addons-for-elementor' ), |
| 1215 | 'icon' => 'eicon-text-align-right', |
| 1216 | ), |
| 1217 | ), |
| 1218 | 'toggle' => false, |
| 1219 | 'default' => 'center', |
| 1220 | 'conditions' => array( |
| 1221 | 'relation' => 'or', |
| 1222 | 'terms' => array( |
| 1223 | array( |
| 1224 | 'relation' => 'and', |
| 1225 | 'terms' => array( |
| 1226 | array( |
| 1227 | 'name' => 'skin', |
| 1228 | 'operator' => '===', |
| 1229 | 'value' => 'skin-4', |
| 1230 | ), |
| 1231 | array( |
| 1232 | 'name' => 'info_layout', |
| 1233 | 'operator' => '===', |
| 1234 | 'value' => 'column', |
| 1235 | ), |
| 1236 | array( |
| 1237 | 'name' => 'clock_title', |
| 1238 | 'operator' => '!==', |
| 1239 | 'value' => '', |
| 1240 | ), |
| 1241 | array( |
| 1242 | 'name' => 'show_timezone_offset', |
| 1243 | 'value' => 'yes', |
| 1244 | ), |
| 1245 | ), |
| 1246 | ), |
| 1247 | array( |
| 1248 | 'relation' => 'and', |
| 1249 | 'terms' => array( |
| 1250 | array( |
| 1251 | 'name' => 'skin', |
| 1252 | 'operator' => '===', |
| 1253 | 'value' => 'skin-3', |
| 1254 | ), |
| 1255 | array( |
| 1256 | 'relation' => 'or', |
| 1257 | 'terms' => array( |
| 1258 | array( |
| 1259 | 'name' => 'clock_title', |
| 1260 | 'operator' => '!==', |
| 1261 | 'value' => '', |
| 1262 | ), |
| 1263 | array( |
| 1264 | 'name' => 'show_timezone_offset', |
| 1265 | 'value' => 'yes', |
| 1266 | ), |
| 1267 | ), |
| 1268 | ), |
| 1269 | ), |
| 1270 | ), |
| 1271 | ), |
| 1272 | ), |
| 1273 | 'selectors' => array( |
| 1274 | '{{WRAPPER}}.premium-world-clock__info-column .premium-world-clock__additional-info' => 'align-items: {{VALUE}};', |
| 1275 | '{{WRAPPER}}:not(.premium-world-clock__info-column) .premium-world-clock__additional-info' => 'justify-content: {{VALUE}};', |
| 1276 | ), |
| 1277 | ) |
| 1278 | ); |
| 1279 | |
| 1280 | $this->add_responsive_control( |
| 1281 | 'days_align', |
| 1282 | array( |
| 1283 | 'label' => __( 'Days Alignment', 'premium-addons-for-elementor' ), |
| 1284 | 'type' => Controls_Manager::CHOOSE, |
| 1285 | 'options' => array( |
| 1286 | 'left' => array( |
| 1287 | 'title' => __( 'Left', 'premium-addons-for-elementor' ), |
| 1288 | 'icon' => 'eicon-text-align-left', |
| 1289 | ), |
| 1290 | 'center' => array( |
| 1291 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 1292 | 'icon' => 'eicon-text-align-center', |
| 1293 | ), |
| 1294 | 'right' => array( |
| 1295 | 'title' => __( 'Right', 'premium-addons-for-elementor' ), |
| 1296 | 'icon' => 'eicon-text-align-right', |
| 1297 | ), |
| 1298 | ), |
| 1299 | 'toggle' => false, |
| 1300 | 'default' => 'left', |
| 1301 | 'condition' => array( |
| 1302 | 'skin' => 'skin-3', |
| 1303 | 'date' => 'yes', |
| 1304 | ), |
| 1305 | 'selectors' => array( |
| 1306 | '{{WRAPPER}} .premium-world-clock__days-wrapper' => 'text-align: {{VALUE}};', |
| 1307 | ), |
| 1308 | ) |
| 1309 | ); |
| 1310 | |
| 1311 | $this->add_responsive_control( |
| 1312 | 'clock_container_spacing', |
| 1313 | array( |
| 1314 | 'label' => __( 'Spacing', 'premium-addons-for-elementor' ), |
| 1315 | 'type' => Controls_Manager::SLIDER, |
| 1316 | 'size_units' => array( 'px' ), |
| 1317 | 'separator' => 'before', |
| 1318 | 'conditions' => array( |
| 1319 | 'terms' => array( |
| 1320 | array( |
| 1321 | 'name' => 'show_time', |
| 1322 | 'value' => 'yes', |
| 1323 | ), |
| 1324 | array( |
| 1325 | 'name' => 'skin', |
| 1326 | 'operator' => '!==', |
| 1327 | 'value' => 'skin-4', |
| 1328 | ), |
| 1329 | $info_conditions, |
| 1330 | ), |
| 1331 | ), |
| 1332 | 'selectors' => array( |
| 1333 | '{{WRAPPER}}:not(.premium-world-clock__skin-3) .premium-world-clock__clock-wrapper' => 'gap: {{SIZE}}px;', |
| 1334 | '{{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__clock-wrapper' => 'gap: unset; column-gap: {{SIZE}}px;', |
| 1335 | ), |
| 1336 | ) |
| 1337 | ); |
| 1338 | |
| 1339 | $this->add_responsive_control( |
| 1340 | 'info_spacing', |
| 1341 | array( |
| 1342 | 'label' => __( 'Info Spacing', 'premium-addons-for-elementor' ), |
| 1343 | 'type' => Controls_Manager::SLIDER, |
| 1344 | 'size_units' => array( 'px' ), |
| 1345 | 'conditions' => array( |
| 1346 | 'relation' => 'and', |
| 1347 | 'terms' => array( |
| 1348 | array( |
| 1349 | 'name' => 'skin', |
| 1350 | 'operator' => '!in', |
| 1351 | 'value' => array( 'skin-3', 'skin-4' ), |
| 1352 | ), |
| 1353 | array( |
| 1354 | 'relation' => 'or', |
| 1355 | 'terms' => array( |
| 1356 | array( |
| 1357 | 'terms' => array( |
| 1358 | array( |
| 1359 | 'name' => 'clock_title', |
| 1360 | 'operator' => '!==', |
| 1361 | 'value' => '', |
| 1362 | ), |
| 1363 | array( |
| 1364 | 'name' => 'date', |
| 1365 | 'value' => 'yes', |
| 1366 | ), |
| 1367 | ), |
| 1368 | ), |
| 1369 | array( |
| 1370 | 'terms' => array( |
| 1371 | array( |
| 1372 | 'name' => 'clock_title', |
| 1373 | 'operator' => '!==', |
| 1374 | 'value' => '', |
| 1375 | ), |
| 1376 | array( |
| 1377 | 'name' => 'show_timezone_offset', |
| 1378 | 'value' => 'yes', |
| 1379 | ), |
| 1380 | ), |
| 1381 | ), |
| 1382 | array( |
| 1383 | 'terms' => array( |
| 1384 | array( |
| 1385 | 'name' => 'show_timezone_offset', |
| 1386 | 'value' => 'yes', |
| 1387 | ), |
| 1388 | array( |
| 1389 | 'name' => 'date', |
| 1390 | 'value' => 'yes', |
| 1391 | ), |
| 1392 | ), |
| 1393 | ), |
| 1394 | ), |
| 1395 | ), |
| 1396 | ), |
| 1397 | ), |
| 1398 | 'selectors' => array( |
| 1399 | '{{WRAPPER}} .premium-world-clock__additional-info' => 'gap: {{SIZE}}px;', |
| 1400 | ), |
| 1401 | ) |
| 1402 | ); |
| 1403 | |
| 1404 | $this->add_control( |
| 1405 | 'equal_width', |
| 1406 | array( |
| 1407 | 'label' => __( 'Equal Units Width', 'premium-addons-for-elementor' ), |
| 1408 | 'type' => Controls_Manager::SWITCHER, |
| 1409 | 'description' => __( 'Applies equal width on the time units', 'premium-addons-for-elementor' ), |
| 1410 | 'separator' => 'before', |
| 1411 | 'condition' => array( |
| 1412 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 1413 | ), |
| 1414 | ) |
| 1415 | ); |
| 1416 | |
| 1417 | $this->add_control( |
| 1418 | 'language_prefix', |
| 1419 | array( |
| 1420 | 'label' => __( 'Language', 'premium-addons-for-elementor' ), |
| 1421 | 'type' => Controls_Manager::TEXT, |
| 1422 | 'description' => __( 'Enter language prefix, eg. en for English, ja for Japanese, if you don\'t know your language prefix, please check <a href="https://developers.google.com/maps/faq#languagesupport" target="_blank">here</a>', 'premium-addons-for-elementor' ), |
| 1423 | 'ai' => array( |
| 1424 | 'active' => false, |
| 1425 | ), |
| 1426 | ) |
| 1427 | ); |
| 1428 | |
| 1429 | $this->end_controls_section(); |
| 1430 | } |
| 1431 | |
| 1432 | private function add_helpful_info_section() { |
| 1433 | |
| 1434 | $this->start_controls_section( |
| 1435 | 'section_pa_docs', |
| 1436 | array( |
| 1437 | 'label' => __( 'Help & Docs', 'premium-addons-for-elementor' ), |
| 1438 | ) |
| 1439 | ); |
| 1440 | |
| 1441 | $docs = array( |
| 1442 | 'https://premiumaddons.com/docs/elementor-world-clock-widget/' => __( 'Getting started »', 'premium-addons-for-elementor' ), |
| 1443 | ); |
| 1444 | |
| 1445 | $doc_index = 1; |
| 1446 | foreach ( $docs as $url => $title ) { |
| 1447 | |
| 1448 | $doc_url = Helper_Functions::get_campaign_link( $url, 'clock-widget', 'wp-editor', 'get-support' ); |
| 1449 | |
| 1450 | $this->add_control( |
| 1451 | 'doc_' . $doc_index, |
| 1452 | array( |
| 1453 | 'type' => Controls_Manager::RAW_HTML, |
| 1454 | 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc_url, $title ), |
| 1455 | 'content_classes' => 'editor-pa-doc', |
| 1456 | ) |
| 1457 | ); |
| 1458 | |
| 1459 | ++$doc_index; |
| 1460 | |
| 1461 | } |
| 1462 | |
| 1463 | Helper_Functions::register_element_feedback_controls( $this ); |
| 1464 | |
| 1465 | $this->end_controls_section(); |
| 1466 | } |
| 1467 | |
| 1468 | /** Style Controls. */ |
| 1469 | private function add_clock_style_controls() { |
| 1470 | |
| 1471 | $this->start_controls_section( |
| 1472 | 'clock_style_section', |
| 1473 | array( |
| 1474 | 'label' => __( 'Clock', 'premium-addons-for-elementor' ), |
| 1475 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1476 | 'condition' => array( |
| 1477 | 'show_time' => 'yes', |
| 1478 | 'skin!' => $this->options['skin_condition'], |
| 1479 | ), |
| 1480 | ) |
| 1481 | ); |
| 1482 | |
| 1483 | $this->add_control( |
| 1484 | 'clock_face_fill', |
| 1485 | array( |
| 1486 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 1487 | 'type' => Controls_Manager::COLOR, |
| 1488 | 'selectors' => array( |
| 1489 | '{{WRAPPER}} .premium-world-clock__circle > svg, {{WRAPPER}} .premium-world-clock__circle > svg *' => 'fill: {{VALUE}};', |
| 1490 | ), |
| 1491 | 'condition' => array( |
| 1492 | 'skin' => array( 'skin-5', 'skin-6', 'skin-7' ), |
| 1493 | ), |
| 1494 | ) |
| 1495 | ); |
| 1496 | |
| 1497 | $this->add_group_control( |
| 1498 | Group_Control_Box_Shadow::get_type(), |
| 1499 | array( |
| 1500 | 'name' => 'clock_box_shadow', |
| 1501 | 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__time-wrapper, |
| 1502 | {{WRAPPER}}.premium-world-clock__skin-1 .premium-world-clock__circle, |
| 1503 | {{WRAPPER}}.premium-world-clock__skin-5 .premium-world-clock__circle, |
| 1504 | {{WRAPPER}}.premium-world-clock__skin-6 .premium-world-clock__circle, |
| 1505 | {{WRAPPER}}.premium-world-clock__skin-7 .premium-world-clock__circle', |
| 1506 | ) |
| 1507 | ); |
| 1508 | |
| 1509 | $this->add_group_control( |
| 1510 | Premium_Background::get_type(), |
| 1511 | array( |
| 1512 | 'name' => 'clock_background', |
| 1513 | 'types' => array( 'classic', 'gradient' ), |
| 1514 | 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__time-wrapper, |
| 1515 | {{WRAPPER}}.premium-world-clock__skin-1 .premium-world-clock__circle, |
| 1516 | {{WRAPPER}}.premium-world-clock__skin-5 .premium-world-clock__circle, |
| 1517 | {{WRAPPER}}.premium-world-clock__skin-6 .premium-world-clock__circle, |
| 1518 | {{WRAPPER}}.premium-world-clock__skin-7 .premium-world-clock__circle', |
| 1519 | ) |
| 1520 | ); |
| 1521 | |
| 1522 | $this->add_control( |
| 1523 | 'clock_lq_effect', |
| 1524 | array( |
| 1525 | 'label' => __( 'Liquid Glass Effect', 'premium-addons-for-elementor' ), |
| 1526 | 'type' => Controls_Manager::SELECT, |
| 1527 | 'description' => sprintf( |
| 1528 | /* translators: 1: `<a>` opening tag, 2: `</a>` closing tag. */ |
| 1529 | esc_html__( 'Important: Make sure this element has a semi-transparent background color to see the effect. See all presets from %1$shere%2$s.', 'premium-addons-for-elementor' ), |
| 1530 | '<a href="https://premiumaddons.com/liquid-glass/" target="_blank">', |
| 1531 | '</a>' |
| 1532 | ), |
| 1533 | 'options' => array( |
| 1534 | 'none' => __( 'None', 'premium-addons-for-elementor' ), |
| 1535 | 'glass1' => __( 'Preset 01', 'premium-addons-for-elementor' ), |
| 1536 | 'glass2' => __( 'Preset 02', 'premium-addons-for-elementor' ), |
| 1537 | 'glass3' => apply_filters( 'pa_pro_label', __( 'Preset 03 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1538 | 'glass4' => apply_filters( 'pa_pro_label', __( 'Preset 04 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1539 | 'glass5' => apply_filters( 'pa_pro_label', __( 'Preset 05 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1540 | 'glass6' => apply_filters( 'pa_pro_label', __( 'Preset 06 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1541 | ), |
| 1542 | 'default' => 'none', |
| 1543 | 'label_block' => true, |
| 1544 | 'condition' => array( |
| 1545 | 'skin!' => 'skin-4', |
| 1546 | ), |
| 1547 | ) |
| 1548 | ); |
| 1549 | |
| 1550 | $this->add_group_control( |
| 1551 | Group_Control_Border::get_type(), |
| 1552 | array( |
| 1553 | 'name' => 'clock_border', |
| 1554 | 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__time-wrapper, |
| 1555 | {{WRAPPER}}.premium-world-clock__skin-1 .premium-world-clock__circle, |
| 1556 | {{WRAPPER}}.premium-world-clock__skin-5 .premium-world-clock__circle, |
| 1557 | {{WRAPPER}}.premium-world-clock__skin-6 .premium-world-clock__circle, |
| 1558 | {{WRAPPER}}.premium-world-clock__skin-7 .premium-world-clock__circle', |
| 1559 | ) |
| 1560 | ); |
| 1561 | |
| 1562 | $this->add_control( |
| 1563 | 'time_rad', |
| 1564 | array( |
| 1565 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 1566 | 'type' => Controls_Manager::SLIDER, |
| 1567 | 'size_units' => array( 'px', '%', 'em' ), |
| 1568 | 'selectors' => array( |
| 1569 | '{{WRAPPER}} .premium-world-clock__time-wrapper' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 1570 | ), |
| 1571 | 'condition' => array( |
| 1572 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 1573 | ), |
| 1574 | ) |
| 1575 | ); |
| 1576 | |
| 1577 | $this->add_responsive_control( |
| 1578 | 'time_padding', |
| 1579 | array( |
| 1580 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 1581 | 'type' => Controls_Manager::DIMENSIONS, |
| 1582 | 'size_units' => array( 'px', 'em' ), |
| 1583 | 'selectors' => array( |
| 1584 | '{{WRAPPER}} .premium-world-clock__time-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1585 | ), |
| 1586 | 'condition' => array( |
| 1587 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 1588 | ), |
| 1589 | ) |
| 1590 | ); |
| 1591 | |
| 1592 | $this->end_controls_section(); |
| 1593 | } |
| 1594 | |
| 1595 | private function add_info_style_controls() { |
| 1596 | |
| 1597 | $info_conditions = array( |
| 1598 | 'relation' => 'or', |
| 1599 | 'terms' => array( |
| 1600 | array( |
| 1601 | 'name' => 'clock_title', |
| 1602 | 'operator' => '!==', |
| 1603 | 'value' => '', |
| 1604 | ), |
| 1605 | array( |
| 1606 | 'name' => 'date', |
| 1607 | 'value' => 'yes', |
| 1608 | ), |
| 1609 | array( |
| 1610 | 'name' => 'show_timezone_offset', |
| 1611 | 'value' => 'yes', |
| 1612 | ), |
| 1613 | ), |
| 1614 | ); |
| 1615 | |
| 1616 | $this->start_controls_section( |
| 1617 | 'clock_info_style_section', |
| 1618 | array( |
| 1619 | 'label' => __( 'Clock Info', 'premium-addons-for-elementor' ), |
| 1620 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1621 | 'conditions' => $info_conditions, |
| 1622 | ) |
| 1623 | ); |
| 1624 | |
| 1625 | $this->add_control( |
| 1626 | 'title_heading', |
| 1627 | array( |
| 1628 | 'label' => esc_html__( 'Title', 'premium-addons-for-elementor' ), |
| 1629 | 'type' => Controls_Manager::HEADING, |
| 1630 | 'condition' => array( |
| 1631 | 'clock_title!' => '', |
| 1632 | ), |
| 1633 | ) |
| 1634 | ); |
| 1635 | |
| 1636 | $this->add_group_control( |
| 1637 | Group_Control_Typography::get_type(), |
| 1638 | array( |
| 1639 | 'name' => 'clock_title_typo', |
| 1640 | 'selector' => '{{WRAPPER}} .premium-world-clock__clock-title', |
| 1641 | 'condition' => array( |
| 1642 | 'clock_title!' => '', |
| 1643 | ), |
| 1644 | ) |
| 1645 | ); |
| 1646 | |
| 1647 | $this->add_control( |
| 1648 | 'clock_title_color', |
| 1649 | array( |
| 1650 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 1651 | 'type' => Controls_Manager::COLOR, |
| 1652 | 'global' => array( |
| 1653 | 'default' => Global_Colors::COLOR_SECONDARY, |
| 1654 | ), |
| 1655 | 'selectors' => array( |
| 1656 | '{{WRAPPER}} .premium-world-clock__clock-title' => 'color: {{VALUE}};', |
| 1657 | ), |
| 1658 | 'condition' => array( |
| 1659 | 'clock_title!' => '', |
| 1660 | ), |
| 1661 | ) |
| 1662 | ); |
| 1663 | |
| 1664 | $this->add_control( |
| 1665 | 'date_heading', |
| 1666 | array( |
| 1667 | 'label' => esc_html__( 'Date', 'premium-addons-for-elementor' ), |
| 1668 | 'type' => Controls_Manager::HEADING, |
| 1669 | 'separator' => 'before', |
| 1670 | 'condition' => array( |
| 1671 | 'date' => 'yes', |
| 1672 | ), |
| 1673 | ) |
| 1674 | ); |
| 1675 | |
| 1676 | $this->add_group_control( |
| 1677 | Group_Control_Typography::get_type(), |
| 1678 | array( |
| 1679 | 'name' => 'date_typo', |
| 1680 | 'selector' => '{{WRAPPER}} .premium-world-clock__date, |
| 1681 | {{WRAPPER}} .premium-world-clock__month, {{WRAPPER}} .premium-world-clock__day, {{WRAPPER}} .premium-world-clock__date-segment', |
| 1682 | 'condition' => array( |
| 1683 | 'date' => 'yes', |
| 1684 | ), |
| 1685 | ) |
| 1686 | ); |
| 1687 | |
| 1688 | $this->add_control( |
| 1689 | 'date_color', |
| 1690 | array( |
| 1691 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 1692 | 'type' => Controls_Manager::COLOR, |
| 1693 | 'global' => array( |
| 1694 | 'default' => Global_Colors::COLOR_SECONDARY, |
| 1695 | ), |
| 1696 | 'selectors' => array( |
| 1697 | '{{WRAPPER}} .premium-world-clock__date, |
| 1698 | {{WRAPPER}} .premium-world-clock__month-wrapper, |
| 1699 | {{WRAPPER}} .premium-world-clock__day-wrapper, |
| 1700 | {{WRAPPER}} .premium-world-clock__date-segment' => 'color: {{VALUE}};', |
| 1701 | ), |
| 1702 | 'condition' => array( |
| 1703 | 'date' => 'yes', |
| 1704 | ), |
| 1705 | ) |
| 1706 | ); |
| 1707 | |
| 1708 | $this->add_control( |
| 1709 | 'date_border_color', |
| 1710 | array( |
| 1711 | 'label' => __( 'Border Color', 'premium-addons-for-elementor' ), |
| 1712 | 'type' => Controls_Manager::COLOR, |
| 1713 | 'global' => array( |
| 1714 | 'default' => Global_Colors::COLOR_SECONDARY, |
| 1715 | ), |
| 1716 | 'selectors' => array( |
| 1717 | '{{WRAPPER}} .premium-world-clock__date-segment' => 'border-color: {{VALUE}};', |
| 1718 | ), |
| 1719 | 'condition' => array( |
| 1720 | 'date' => 'yes', |
| 1721 | 'skin' => 'skin-4', |
| 1722 | ), |
| 1723 | ) |
| 1724 | ); |
| 1725 | |
| 1726 | $this->add_responsive_control( |
| 1727 | 'date_border_width', |
| 1728 | array( |
| 1729 | 'label' => __( 'Border Thickness', 'premium-addons-for-elementor' ), |
| 1730 | 'type' => Controls_Manager::SLIDER, |
| 1731 | 'size_units' => array( 'px', '%', 'em' ), |
| 1732 | 'selectors' => array( |
| 1733 | '{{WRAPPER}} .premium-world-clock__date-segment' => 'border-width: {{SIZE}}{{UNIT}};', |
| 1734 | ), |
| 1735 | 'condition' => array( |
| 1736 | 'date' => 'yes', |
| 1737 | 'skin' => 'skin-4', |
| 1738 | ), |
| 1739 | ) |
| 1740 | ); |
| 1741 | |
| 1742 | $this->add_control( |
| 1743 | 'date_cont_heading', |
| 1744 | array( |
| 1745 | 'label' => esc_html__( 'Date Container', 'premium-addons-for-elementor' ), |
| 1746 | 'type' => Controls_Manager::HEADING, |
| 1747 | 'separator' => 'before', |
| 1748 | 'condition' => array( |
| 1749 | 'date' => 'yes', |
| 1750 | 'skin' => 'skin-4', |
| 1751 | ), |
| 1752 | ) |
| 1753 | ); |
| 1754 | |
| 1755 | $this->add_group_control( |
| 1756 | Premium_Background::get_type(), |
| 1757 | array( |
| 1758 | 'name' => 'date_bg', |
| 1759 | 'types' => array( 'classic', 'gradient' ), |
| 1760 | 'selector' => '{{WRAPPER}} .premium-world-clock__date-wrapper', |
| 1761 | 'condition' => array( |
| 1762 | 'date' => 'yes', |
| 1763 | 'skin' => 'skin-4', |
| 1764 | ), |
| 1765 | ) |
| 1766 | ); |
| 1767 | |
| 1768 | $this->add_control( |
| 1769 | 'date_rad', |
| 1770 | array( |
| 1771 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 1772 | 'type' => Controls_Manager::SLIDER, |
| 1773 | 'size_units' => array( 'px', '%', 'em' ), |
| 1774 | 'selectors' => array( |
| 1775 | '{{WRAPPER}} .premium-world-clock__date-wrapper' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 1776 | ), |
| 1777 | 'condition' => array( |
| 1778 | 'date' => 'yes', |
| 1779 | 'skin' => 'skin-4', |
| 1780 | ), |
| 1781 | ) |
| 1782 | ); |
| 1783 | |
| 1784 | $this->add_responsive_control( |
| 1785 | 'date_margin', |
| 1786 | array( |
| 1787 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 1788 | 'type' => Controls_Manager::DIMENSIONS, |
| 1789 | 'size_units' => array( 'px', 'em', 'custom' ), |
| 1790 | 'selectors' => array( |
| 1791 | '{{WRAPPER}} .premium-world-clock__date-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1792 | ), |
| 1793 | 'condition' => array( |
| 1794 | 'date' => 'yes', |
| 1795 | 'skin' => 'skin-4', |
| 1796 | ), |
| 1797 | ) |
| 1798 | ); |
| 1799 | |
| 1800 | $this->add_control( |
| 1801 | 'offset_heading', |
| 1802 | array( |
| 1803 | 'label' => esc_html__( 'GMT Offset', 'premium-addons-for-elementor' ), |
| 1804 | 'type' => Controls_Manager::HEADING, |
| 1805 | 'separator' => 'before', |
| 1806 | 'condition' => array( |
| 1807 | 'show_timezone_offset' => 'yes', |
| 1808 | ), |
| 1809 | ) |
| 1810 | ); |
| 1811 | |
| 1812 | $this->add_group_control( |
| 1813 | Group_Control_Typography::get_type(), |
| 1814 | array( |
| 1815 | 'name' => 'offset_typo', |
| 1816 | 'selector' => '{{WRAPPER}} .premium-world-clock__gmt-offset', |
| 1817 | 'condition' => array( |
| 1818 | 'show_timezone_offset' => 'yes', |
| 1819 | ), |
| 1820 | ) |
| 1821 | ); |
| 1822 | |
| 1823 | $this->add_control( |
| 1824 | 'offset_color', |
| 1825 | array( |
| 1826 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 1827 | 'type' => Controls_Manager::COLOR, |
| 1828 | 'global' => array( |
| 1829 | 'default' => Global_Colors::COLOR_SECONDARY, |
| 1830 | ), |
| 1831 | 'selectors' => array( |
| 1832 | '{{WRAPPER}} .premium-world-clock__gmt-offset' => 'color: {{VALUE}};', |
| 1833 | ), |
| 1834 | 'condition' => array( |
| 1835 | 'show_timezone_offset' => 'yes', |
| 1836 | ), |
| 1837 | ) |
| 1838 | ); |
| 1839 | |
| 1840 | $this->add_control( |
| 1841 | 'info_cont_heading', |
| 1842 | array( |
| 1843 | 'label' => esc_html__( 'Info Container', 'premium-addons-for-elementor' ), |
| 1844 | 'type' => Controls_Manager::HEADING, |
| 1845 | 'separator' => 'before', |
| 1846 | ) |
| 1847 | ); |
| 1848 | |
| 1849 | $this->add_group_control( |
| 1850 | Premium_Background::get_type(), |
| 1851 | array( |
| 1852 | 'name' => 'clock_info_bg', |
| 1853 | 'types' => array( 'classic', 'gradient' ), |
| 1854 | 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additional-info', |
| 1855 | ) |
| 1856 | ); |
| 1857 | |
| 1858 | $this->add_group_control( |
| 1859 | Group_Control_Box_Shadow::get_type(), |
| 1860 | array( |
| 1861 | 'name' => 'clock_info_shadow', |
| 1862 | 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additional-info', |
| 1863 | ) |
| 1864 | ); |
| 1865 | |
| 1866 | $this->add_group_control( |
| 1867 | Group_Control_Border::get_type(), |
| 1868 | array( |
| 1869 | 'name' => 'clock_info_border', |
| 1870 | 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additional-info', |
| 1871 | ) |
| 1872 | ); |
| 1873 | |
| 1874 | $this->add_control( |
| 1875 | 'clock_info_rad', |
| 1876 | array( |
| 1877 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 1878 | 'type' => Controls_Manager::SLIDER, |
| 1879 | 'size_units' => array( 'px', '%', 'em' ), |
| 1880 | 'selectors' => array( |
| 1881 | '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additional-info' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 1882 | ), |
| 1883 | ) |
| 1884 | ); |
| 1885 | |
| 1886 | $this->add_responsive_control( |
| 1887 | 'clock_info_padding', |
| 1888 | array( |
| 1889 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 1890 | 'type' => Controls_Manager::DIMENSIONS, |
| 1891 | 'size_units' => array( 'px', 'em' ), |
| 1892 | 'selectors' => array( |
| 1893 | '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additional-info' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1894 | ), |
| 1895 | ) |
| 1896 | ); |
| 1897 | |
| 1898 | $this->add_responsive_control( |
| 1899 | 'clock_info_margin', |
| 1900 | array( |
| 1901 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 1902 | 'type' => Controls_Manager::DIMENSIONS, |
| 1903 | 'size_units' => array( 'px', 'em', 'custom' ), |
| 1904 | 'selectors' => array( |
| 1905 | '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additional-info' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1906 | ), |
| 1907 | ) |
| 1908 | ); |
| 1909 | |
| 1910 | $this->end_controls_section(); |
| 1911 | } |
| 1912 | |
| 1913 | private function add_units_style_controls() { |
| 1914 | |
| 1915 | $mer_conditions = array( |
| 1916 | 'relation' => 'and', |
| 1917 | 'terms' => array( |
| 1918 | array( |
| 1919 | 'name' => 'show_time', |
| 1920 | 'operator' => '===', |
| 1921 | 'value' => 'yes', |
| 1922 | ), |
| 1923 | array( |
| 1924 | 'name' => 'show_meridiem', |
| 1925 | 'operator' => '===', |
| 1926 | 'value' => 'yes', |
| 1927 | ), |
| 1928 | array( |
| 1929 | 'relation' => 'or', |
| 1930 | 'terms' => array( |
| 1931 | array( |
| 1932 | 'name' => 'skin', |
| 1933 | 'operator' => '!in', |
| 1934 | 'value' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 1935 | ), |
| 1936 | array( |
| 1937 | 'relation' => 'and', |
| 1938 | 'terms' => array( |
| 1939 | array( |
| 1940 | 'name' => 'skin', |
| 1941 | 'operator' => 'in', |
| 1942 | 'value' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 1943 | ), |
| 1944 | array( |
| 1945 | 'name' => 'time_format', |
| 1946 | 'operator' => '===', |
| 1947 | 'value' => 'hh', |
| 1948 | ), |
| 1949 | ), |
| 1950 | ), |
| 1951 | ), |
| 1952 | ), |
| 1953 | ), |
| 1954 | ); |
| 1955 | |
| 1956 | $this->start_controls_section( |
| 1957 | 'time_style_section', |
| 1958 | array( |
| 1959 | 'label' => __( 'Time Units', 'premium-addons-for-elementor' ), |
| 1960 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1961 | 'condition' => array( |
| 1962 | 'show_time' => 'yes', |
| 1963 | 'skin!' => $this->options['skin_condition'], |
| 1964 | ), |
| 1965 | ) |
| 1966 | ); |
| 1967 | |
| 1968 | $this->add_group_control( |
| 1969 | Group_Control_Typography::get_type(), |
| 1970 | array( |
| 1971 | 'name' => 'time_typo', |
| 1972 | 'label' => 'Units Typography', |
| 1973 | 'selector' => '{{WRAPPER}} .premium-world-clock__time-wrapper *:not(.premium-world-clock__meridiem)', |
| 1974 | 'condition' => array( |
| 1975 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 1976 | ), |
| 1977 | ) |
| 1978 | ); |
| 1979 | |
| 1980 | $this->add_group_control( |
| 1981 | Group_Control_Text_Shadow::get_type(), |
| 1982 | array( |
| 1983 | 'name' => 'time_text_shadow', |
| 1984 | 'selector' => '{{WRAPPER}} .premium-world-clock__time-wrapper *', |
| 1985 | 'condition' => array( |
| 1986 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 1987 | ), |
| 1988 | ) |
| 1989 | ); |
| 1990 | |
| 1991 | $this->add_group_control( |
| 1992 | Group_Control_Typography::get_type(), |
| 1993 | array( |
| 1994 | 'name' => 'meridiem_typo', |
| 1995 | 'label' => 'Meridiem Typography', |
| 1996 | 'selector' => '{{WRAPPER}} .premium-world-clock__meridiem', |
| 1997 | 'conditions' => $mer_conditions, |
| 1998 | ) |
| 1999 | ); |
| 2000 | |
| 2001 | $this->add_control( |
| 2002 | 'meridiem_size', |
| 2003 | array( |
| 2004 | 'label' => __( 'Meridiem Icon Size', 'premium-addons-for-elementor' ), |
| 2005 | 'type' => Controls_Manager::SLIDER, |
| 2006 | 'size_units' => array( 'px', '%', 'em' ), |
| 2007 | 'selectors' => array( |
| 2008 | '{{WRAPPER}} .premium-world-clock__meridiem > svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};', |
| 2009 | ), |
| 2010 | 'condition' => array( |
| 2011 | 'show_meridiem' => 'yes', |
| 2012 | 'time_format' => 'hh', |
| 2013 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2014 | 'meridiem_type' => 'icon', |
| 2015 | ), |
| 2016 | ) |
| 2017 | ); |
| 2018 | |
| 2019 | $this->add_responsive_control( |
| 2020 | 'time_skew', |
| 2021 | array( |
| 2022 | 'label' => __( 'Skew (deg)', 'premium-addons-for-elementor' ), |
| 2023 | 'type' => Controls_Manager::SLIDER, |
| 2024 | 'size_units' => array( 'deg' ), |
| 2025 | 'default' => array( |
| 2026 | 'size' => '-10', |
| 2027 | 'unit' => 'deg', |
| 2028 | ), |
| 2029 | 'range' => array( |
| 2030 | 'deg' => array( |
| 2031 | 'min' => -50, |
| 2032 | 'max' => 50, |
| 2033 | ), |
| 2034 | ), |
| 2035 | 'selectors' => array( |
| 2036 | '{{WRAPPER}} .premium-world-clock__hand, {{WRAPPER}} .premium-world-clock__separator' => 'transform: skew({{SIZE}}deg);', |
| 2037 | ), |
| 2038 | 'condition' => array( |
| 2039 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2040 | ), |
| 2041 | ) |
| 2042 | ); |
| 2043 | |
| 2044 | $this->start_controls_tabs( 'clock_units_tabs' ); |
| 2045 | |
| 2046 | $this->start_controls_tab( |
| 2047 | 'hours_tab', |
| 2048 | array( |
| 2049 | 'label' => __( 'Hours', 'premium-addons-for-elementor' ), |
| 2050 | ) |
| 2051 | ); |
| 2052 | |
| 2053 | $this->add_control( |
| 2054 | 'hours_color', |
| 2055 | array( |
| 2056 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 2057 | 'type' => Controls_Manager::COLOR, |
| 2058 | 'selectors' => array( |
| 2059 | '{{WRAPPER}}.premium-world-clock__hand-0 .premium-world-clock__hours::before, |
| 2060 | {{WRAPPER}}.premium-world-clock__hand-1 .premium-world-clock__hours::before, |
| 2061 | {{WRAPPER}}.premium-world-clock__hand-2 .premium-world-clock__hours::before, |
| 2062 | {{WRAPPER}}.premium-world-clock__hand-3 .premium-world-clock__hours::before, |
| 2063 | {{WRAPPER}}.premium-world-clock__hand-4 .premium-world-clock__hours::before, |
| 2064 | {{WRAPPER}}.premium-world-clock__hand-5 .premium-world-clock__hours::before' => 'background-color: {{VALUE}};', |
| 2065 | '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__hours' => 'color: {{VALUE}};', |
| 2066 | ), |
| 2067 | ) |
| 2068 | ); |
| 2069 | |
| 2070 | $this->add_group_control( |
| 2071 | Premium_Background::get_type(), |
| 2072 | array( |
| 2073 | 'name' => 'hours_bg', |
| 2074 | 'types' => array( 'classic', 'gradient' ), |
| 2075 | 'selector' => '{{WRAPPER}} .premium-world-clock__hours', |
| 2076 | 'condition' => array( |
| 2077 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2078 | ), |
| 2079 | ) |
| 2080 | ); |
| 2081 | |
| 2082 | $this->add_group_control( |
| 2083 | Group_Control_Border::get_type(), |
| 2084 | array( |
| 2085 | 'name' => 'hours_border', |
| 2086 | 'selector' => '{{WRAPPER}} .premium-world-clock__hours', |
| 2087 | 'condition' => array( |
| 2088 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2089 | ), |
| 2090 | ) |
| 2091 | ); |
| 2092 | |
| 2093 | $this->add_control( |
| 2094 | 'hours_rad', |
| 2095 | array( |
| 2096 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 2097 | 'type' => Controls_Manager::SLIDER, |
| 2098 | 'size_units' => array( 'px', '%', 'em' ), |
| 2099 | 'selectors' => array( |
| 2100 | '{{WRAPPER}} .premium-world-clock__hours' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 2101 | ), |
| 2102 | 'condition' => array( |
| 2103 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2104 | ), |
| 2105 | ) |
| 2106 | ); |
| 2107 | |
| 2108 | $this->add_responsive_control( |
| 2109 | 'hours_padding', |
| 2110 | array( |
| 2111 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 2112 | 'type' => Controls_Manager::DIMENSIONS, |
| 2113 | 'size_units' => array( 'px', 'em' ), |
| 2114 | 'selectors' => array( |
| 2115 | '{{WRAPPER}} .premium-world-clock__hours' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2116 | ), |
| 2117 | 'condition' => array( |
| 2118 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2119 | ), |
| 2120 | ) |
| 2121 | ); |
| 2122 | |
| 2123 | $this->add_responsive_control( |
| 2124 | 'hours_thickness', |
| 2125 | array( |
| 2126 | 'label' => __( 'Thickness', 'premium-addons-for-elementor' ), |
| 2127 | 'type' => Controls_Manager::SLIDER, |
| 2128 | 'size_units' => array( 'px' ), |
| 2129 | 'range' => array( |
| 2130 | 'px' => array( |
| 2131 | 'min' => 0, |
| 2132 | 'max' => 10, |
| 2133 | ), |
| 2134 | ), |
| 2135 | 'condition' => array( |
| 2136 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2137 | ), |
| 2138 | 'selectors' => array( |
| 2139 | '{{WRAPPER}} .premium-world-clock__hours::before' => 'width: {{SIZE}}px;', |
| 2140 | ), |
| 2141 | ) |
| 2142 | ); |
| 2143 | |
| 2144 | $this->add_responsive_control( |
| 2145 | 'hours_len', |
| 2146 | array( |
| 2147 | 'label' => __( 'Length', 'premium-addons-for-elementor' ), |
| 2148 | 'type' => Controls_Manager::SLIDER, |
| 2149 | 'size_units' => array( 'px' ), |
| 2150 | 'range' => array( |
| 2151 | 'px' => array( |
| 2152 | 'min' => 0, |
| 2153 | 'max' => 500, |
| 2154 | ), |
| 2155 | ), |
| 2156 | 'condition' => array( |
| 2157 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2158 | ), |
| 2159 | 'selectors' => array( |
| 2160 | '{{WRAPPER}} .premium-world-clock__hours' => 'width: {{SIZE}}px; height: {{SIZE}}px;', |
| 2161 | ), |
| 2162 | ) |
| 2163 | ); |
| 2164 | |
| 2165 | $this->add_responsive_control( |
| 2166 | 'hours_pos', |
| 2167 | array( |
| 2168 | 'label' => __( 'Position', 'premium-addons-for-elementor' ), |
| 2169 | 'type' => Controls_Manager::SLIDER, |
| 2170 | 'size_units' => array( '%' ), |
| 2171 | 'condition' => array( |
| 2172 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2173 | ), |
| 2174 | 'selectors' => array( |
| 2175 | '{{WRAPPER}} .premium-world-clock__hours::before' => 'height: calc( 50% + {{SIZE}}% );', |
| 2176 | ), |
| 2177 | ) |
| 2178 | ); |
| 2179 | |
| 2180 | $this->end_controls_tab(); |
| 2181 | |
| 2182 | $this->start_controls_tab( |
| 2183 | 'min_tab', |
| 2184 | array( |
| 2185 | 'label' => __( 'Minutes', 'premium-addons-for-elementor' ), |
| 2186 | ) |
| 2187 | ); |
| 2188 | |
| 2189 | $this->add_control( |
| 2190 | 'min_color', |
| 2191 | array( |
| 2192 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 2193 | 'type' => Controls_Manager::COLOR, |
| 2194 | 'selectors' => array( |
| 2195 | '{{WRAPPER}}.premium-world-clock__hand-0 .premium-world-clock__minutes::before, |
| 2196 | {{WRAPPER}}.premium-world-clock__hand-1 .premium-world-clock__minutes::before, |
| 2197 | {{WRAPPER}}.premium-world-clock__hand-2 .premium-world-clock__minutes::before, |
| 2198 | {{WRAPPER}}.premium-world-clock__hand-3 .premium-world-clock__minutes::before, |
| 2199 | {{WRAPPER}}.premium-world-clock__hand-4 .premium-world-clock__minutes::before, |
| 2200 | {{WRAPPER}}.premium-world-clock__hand-5 .premium-world-clock__minutes::before' => 'background-color: {{VALUE}};', |
| 2201 | '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__minutes' => 'color: {{VALUE}};', |
| 2202 | ), |
| 2203 | ) |
| 2204 | ); |
| 2205 | |
| 2206 | $this->add_group_control( |
| 2207 | Premium_Background::get_type(), |
| 2208 | array( |
| 2209 | 'name' => 'min_bg', |
| 2210 | 'types' => array( 'classic', 'gradient' ), |
| 2211 | 'selector' => '{{WRAPPER}} .premium-world-clock__minutes', |
| 2212 | 'condition' => array( |
| 2213 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2214 | ), |
| 2215 | ) |
| 2216 | ); |
| 2217 | |
| 2218 | $this->add_group_control( |
| 2219 | Group_Control_Border::get_type(), |
| 2220 | array( |
| 2221 | 'name' => 'min_border', |
| 2222 | 'selector' => '{{WRAPPER}} .premium-world-clock__minutes', |
| 2223 | 'condition' => array( |
| 2224 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2225 | ), |
| 2226 | ) |
| 2227 | ); |
| 2228 | |
| 2229 | $this->add_control( |
| 2230 | 'min_rad', |
| 2231 | array( |
| 2232 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 2233 | 'type' => Controls_Manager::SLIDER, |
| 2234 | 'size_units' => array( 'px', '%', 'em' ), |
| 2235 | 'selectors' => array( |
| 2236 | '{{WRAPPER}} .premium-world-clock__minutes' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 2237 | ), |
| 2238 | 'condition' => array( |
| 2239 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2240 | ), |
| 2241 | ) |
| 2242 | ); |
| 2243 | |
| 2244 | $this->add_responsive_control( |
| 2245 | 'min_padding', |
| 2246 | array( |
| 2247 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 2248 | 'type' => Controls_Manager::DIMENSIONS, |
| 2249 | 'size_units' => array( 'px', 'em' ), |
| 2250 | 'selectors' => array( |
| 2251 | '{{WRAPPER}} .premium-world-clock__minutes' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2252 | ), |
| 2253 | 'condition' => array( |
| 2254 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2255 | ), |
| 2256 | ) |
| 2257 | ); |
| 2258 | |
| 2259 | $this->add_responsive_control( |
| 2260 | 'min_thickness', |
| 2261 | array( |
| 2262 | 'label' => __( 'Thickness', 'premium-addons-for-elementor' ), |
| 2263 | 'type' => Controls_Manager::SLIDER, |
| 2264 | 'size_units' => array( 'px' ), |
| 2265 | 'range' => array( |
| 2266 | 'px' => array( |
| 2267 | 'min' => 0, |
| 2268 | 'max' => 10, |
| 2269 | ), |
| 2270 | ), |
| 2271 | 'condition' => array( |
| 2272 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2273 | ), |
| 2274 | 'selectors' => array( |
| 2275 | '{{WRAPPER}} .premium-world-clock__minutes::before' => 'width: {{SIZE}}px;', |
| 2276 | ), |
| 2277 | ) |
| 2278 | ); |
| 2279 | |
| 2280 | $this->add_responsive_control( |
| 2281 | 'min_len', |
| 2282 | array( |
| 2283 | 'label' => __( 'Length', 'premium-addons-for-elementor' ), |
| 2284 | 'type' => Controls_Manager::SLIDER, |
| 2285 | 'size_units' => array( 'px' ), |
| 2286 | 'range' => array( |
| 2287 | 'px' => array( |
| 2288 | 'min' => 0, |
| 2289 | 'max' => 500, |
| 2290 | ), |
| 2291 | ), |
| 2292 | 'condition' => array( |
| 2293 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2294 | ), |
| 2295 | 'selectors' => array( |
| 2296 | '{{WRAPPER}} .premium-world-clock__minutes' => 'width: {{SIZE}}px; height: {{SIZE}}px;', |
| 2297 | ), |
| 2298 | ) |
| 2299 | ); |
| 2300 | |
| 2301 | $this->add_responsive_control( |
| 2302 | 'min_pos', |
| 2303 | array( |
| 2304 | 'label' => __( 'Position', 'premium-addons-for-elementor' ), |
| 2305 | 'type' => Controls_Manager::SLIDER, |
| 2306 | 'size_units' => array( '%' ), |
| 2307 | 'condition' => array( |
| 2308 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2309 | ), |
| 2310 | 'selectors' => array( |
| 2311 | '{{WRAPPER}} .premium-world-clock__minutes::before' => 'height: calc( 50% + {{SIZE}}% );', |
| 2312 | ), |
| 2313 | ) |
| 2314 | ); |
| 2315 | |
| 2316 | $this->end_controls_tab(); |
| 2317 | |
| 2318 | $this->start_controls_tab( |
| 2319 | 'sec_tab', |
| 2320 | array( |
| 2321 | 'label' => __( 'Seconds', 'premium-addons-for-elementor' ), |
| 2322 | ) |
| 2323 | ); |
| 2324 | |
| 2325 | $this->add_group_control( |
| 2326 | Group_Control_Typography::get_type(), |
| 2327 | array( |
| 2328 | 'name' => 'sec_typo', |
| 2329 | 'selector' => '{{WRAPPER}} .premium-world-clock__seconds', |
| 2330 | 'condition' => array( |
| 2331 | 'skin' => 'skin-3', |
| 2332 | ), |
| 2333 | ) |
| 2334 | ); |
| 2335 | |
| 2336 | $this->add_control( |
| 2337 | 'sec_color', |
| 2338 | array( |
| 2339 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 2340 | 'type' => Controls_Manager::COLOR, |
| 2341 | 'selectors' => array( |
| 2342 | '{{WRAPPER}} .premium-world-clock__seconds::before' => 'background-color: {{VALUE}};', |
| 2343 | '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__seconds, |
| 2344 | {{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__sec-wrapper *' => 'color: {{VALUE}};', |
| 2345 | ), |
| 2346 | ) |
| 2347 | ); |
| 2348 | |
| 2349 | $this->add_group_control( |
| 2350 | Premium_Background::get_type(), |
| 2351 | array( |
| 2352 | 'name' => 'sec_bg', |
| 2353 | 'types' => array( 'classic', 'gradient' ), |
| 2354 | 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-3) .premium-world-clock__seconds, |
| 2355 | {{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__sec-wrapper', |
| 2356 | 'condition' => array( |
| 2357 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2358 | ), |
| 2359 | ) |
| 2360 | ); |
| 2361 | |
| 2362 | $this->add_group_control( |
| 2363 | Group_Control_Border::get_type(), |
| 2364 | array( |
| 2365 | 'name' => 'sec_border', |
| 2366 | 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-3) .premium-world-clock__seconds, |
| 2367 | {{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__sec-wrapper', |
| 2368 | 'condition' => array( |
| 2369 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2370 | ), |
| 2371 | ) |
| 2372 | ); |
| 2373 | |
| 2374 | $this->add_control( |
| 2375 | 'sec_border_rad', |
| 2376 | array( |
| 2377 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 2378 | 'type' => Controls_Manager::SLIDER, |
| 2379 | 'size_units' => array( 'px', '%', 'em' ), |
| 2380 | 'selectors' => array( |
| 2381 | '{{WRAPPER}}:not(.premium-world-clock__skin-3) .premium-world-clock__seconds, |
| 2382 | {{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__sec-wrapper' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 2383 | ), |
| 2384 | 'condition' => array( |
| 2385 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2386 | ), |
| 2387 | ) |
| 2388 | ); |
| 2389 | |
| 2390 | $this->add_responsive_control( |
| 2391 | 'sec_padding', |
| 2392 | array( |
| 2393 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 2394 | 'type' => Controls_Manager::DIMENSIONS, |
| 2395 | 'size_units' => array( 'px', 'em' ), |
| 2396 | 'selectors' => array( |
| 2397 | '{{WRAPPER}}:not(.premium-world-clock__skin-3) .premium-world-clock__seconds, |
| 2398 | {{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__sec-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2399 | ), |
| 2400 | 'condition' => array( |
| 2401 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2402 | ), |
| 2403 | ) |
| 2404 | ); |
| 2405 | |
| 2406 | $this->add_responsive_control( |
| 2407 | 'sec_thickness', |
| 2408 | array( |
| 2409 | 'label' => __( 'Thickness', 'premium-addons-for-elementor' ), |
| 2410 | 'type' => Controls_Manager::SLIDER, |
| 2411 | 'size_units' => array( 'px' ), |
| 2412 | 'range' => array( |
| 2413 | 'px' => array( |
| 2414 | 'min' => 0, |
| 2415 | 'max' => 10, |
| 2416 | ), |
| 2417 | ), |
| 2418 | 'condition' => array( |
| 2419 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2420 | ), |
| 2421 | 'selectors' => array( |
| 2422 | '{{WRAPPER}} .premium-world-clock__seconds::before' => 'width: {{SIZE}}px;', |
| 2423 | ), |
| 2424 | ) |
| 2425 | ); |
| 2426 | |
| 2427 | $this->add_responsive_control( |
| 2428 | 'sec_len', |
| 2429 | array( |
| 2430 | 'label' => __( 'Length', 'premium-addons-for-elementor' ), |
| 2431 | 'type' => Controls_Manager::SLIDER, |
| 2432 | 'size_units' => array( 'px' ), |
| 2433 | 'range' => array( |
| 2434 | 'px' => array( |
| 2435 | 'min' => 0, |
| 2436 | 'max' => 500, |
| 2437 | ), |
| 2438 | ), |
| 2439 | 'condition' => array( |
| 2440 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2441 | ), |
| 2442 | 'selectors' => array( |
| 2443 | '{{WRAPPER}} .premium-world-clock__seconds' => 'width: {{SIZE}}px; height: {{SIZE}}px;', |
| 2444 | ), |
| 2445 | ) |
| 2446 | ); |
| 2447 | |
| 2448 | $this->add_responsive_control( |
| 2449 | 'sec_pos', |
| 2450 | array( |
| 2451 | 'label' => __( 'Position', 'premium-addons-for-elementor' ), |
| 2452 | 'type' => Controls_Manager::SLIDER, |
| 2453 | 'size_units' => array( '%' ), |
| 2454 | 'condition' => array( |
| 2455 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2456 | ), |
| 2457 | 'selectors' => array( |
| 2458 | '{{WRAPPER}} .premium-world-clock__seconds::before' => 'height: calc( 50% + {{SIZE}}% );', |
| 2459 | ), |
| 2460 | ) |
| 2461 | ); |
| 2462 | |
| 2463 | $this->end_controls_tab(); |
| 2464 | |
| 2465 | $this->start_controls_tab( |
| 2466 | 'mer_tab', |
| 2467 | array( |
| 2468 | 'label' => __( 'Meridiem', 'premium-addons-for-elementor' ), |
| 2469 | 'conditions' => $mer_conditions, |
| 2470 | ) |
| 2471 | ); |
| 2472 | |
| 2473 | $this->add_control( |
| 2474 | 'mer_color', |
| 2475 | array( |
| 2476 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 2477 | 'type' => Controls_Manager::COLOR, |
| 2478 | 'selectors' => array( |
| 2479 | '{{WRAPPER}} .premium-world-clock__meridiem' => 'color: {{VALUE}};', |
| 2480 | '{{WRAPPER}} .premium-world-clock__meridiem *' => 'fill: {{VALUE}};', |
| 2481 | ), |
| 2482 | 'conditions' => $mer_conditions, |
| 2483 | ) |
| 2484 | ); |
| 2485 | |
| 2486 | $this->add_group_control( |
| 2487 | Premium_Background::get_type(), |
| 2488 | array( |
| 2489 | 'name' => 'mer_bg', |
| 2490 | 'types' => array( 'classic', 'gradient' ), |
| 2491 | 'selector' => '{{WRAPPER}} .premium-world-clock__meridiem', |
| 2492 | 'conditions' => $mer_conditions, |
| 2493 | ) |
| 2494 | ); |
| 2495 | |
| 2496 | $this->add_group_control( |
| 2497 | Group_Control_Border::get_type(), |
| 2498 | array( |
| 2499 | 'name' => 'mer_border', |
| 2500 | 'selector' => '{{WRAPPER}} .premium-world-clock__meridiem', |
| 2501 | 'conditions' => $mer_conditions, |
| 2502 | ) |
| 2503 | ); |
| 2504 | |
| 2505 | $this->add_control( |
| 2506 | 'mer_rad', |
| 2507 | array( |
| 2508 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 2509 | 'type' => Controls_Manager::SLIDER, |
| 2510 | 'size_units' => array( 'px', '%', 'em' ), |
| 2511 | 'selectors' => array( |
| 2512 | '{{WRAPPER}} .premium-world-clock__meridiem' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 2513 | ), |
| 2514 | 'conditions' => $mer_conditions, |
| 2515 | ) |
| 2516 | ); |
| 2517 | |
| 2518 | $this->add_responsive_control( |
| 2519 | 'mer_padding', |
| 2520 | array( |
| 2521 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 2522 | 'type' => Controls_Manager::DIMENSIONS, |
| 2523 | 'size_units' => array( 'px', 'em' ), |
| 2524 | 'selectors' => array( |
| 2525 | '{{WRAPPER}} .premium-world-clock__meridiem' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2526 | ), |
| 2527 | 'conditions' => $mer_conditions, |
| 2528 | ) |
| 2529 | ); |
| 2530 | |
| 2531 | $this->end_controls_tab(); |
| 2532 | |
| 2533 | $this->start_controls_tab( |
| 2534 | 'faces_tab', |
| 2535 | array( |
| 2536 | 'label' => __( 'Faces', 'premium-addons-for-elementor' ), |
| 2537 | 'condition' => array( |
| 2538 | 'show_indicators' => 'yes', |
| 2539 | 'skin' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), |
| 2540 | ), |
| 2541 | ) |
| 2542 | ); |
| 2543 | |
| 2544 | $this->add_control( |
| 2545 | 'clock_face_color', |
| 2546 | array( |
| 2547 | 'label' => __( 'Clock Face Color', 'premium-addons-for-elementor' ), |
| 2548 | 'type' => Controls_Manager::COLOR, |
| 2549 | 'selectors' => array( |
| 2550 | '{{WRAPPER}} .premium-world-clock__face' => 'background-color: {{VALUE}};', |
| 2551 | '{{WRAPPER}}:not(.premium-world-clock__skin-1) .premium-world-clock__circle > svg, {{WRAPPER}}:not(.premium-world-clock__skin-1) .premium-world-clock__circle > svg *' => 'fill: {{VALUE}};', |
| 2552 | ), |
| 2553 | 'condition' => array( |
| 2554 | 'show_indicators' => 'yes', |
| 2555 | 'skin' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), |
| 2556 | ), |
| 2557 | ) |
| 2558 | ); |
| 2559 | |
| 2560 | $this->add_responsive_control( |
| 2561 | 'clock_face_thickness', |
| 2562 | array( |
| 2563 | 'label' => __( 'Clock Faces Thickness', 'premium-addons-for-elementor' ), |
| 2564 | 'type' => Controls_Manager::SLIDER, |
| 2565 | 'size_units' => array( 'px' ), |
| 2566 | 'range' => array( |
| 2567 | 'px' => array( |
| 2568 | 'min' => 0, |
| 2569 | 'max' => 10, |
| 2570 | ), |
| 2571 | ), |
| 2572 | 'selectors' => array( |
| 2573 | '{{WRAPPER}} .premium-world-clock__face' => 'height: {{SIZE}}px;', |
| 2574 | ), |
| 2575 | 'condition' => array( |
| 2576 | 'show_indicators' => 'yes', |
| 2577 | 'skin' => array( 'skin-1' ), |
| 2578 | ), |
| 2579 | ) |
| 2580 | ); |
| 2581 | |
| 2582 | $this->add_responsive_control( |
| 2583 | 'clock_face_len', |
| 2584 | array( |
| 2585 | 'label' => __( 'Clock Faces Length', 'premium-addons-for-elementor' ), |
| 2586 | 'type' => Controls_Manager::SLIDER, |
| 2587 | 'size_units' => array( 'px' ), |
| 2588 | 'range' => array( |
| 2589 | 'px' => array( |
| 2590 | 'min' => 0, |
| 2591 | 'max' => 50, |
| 2592 | ), |
| 2593 | ), |
| 2594 | 'selectors' => array( |
| 2595 | '{{WRAPPER}} .premium-world-clock__face' => 'width: {{SIZE}}px;', |
| 2596 | ), |
| 2597 | 'condition' => array( |
| 2598 | 'show_indicators' => 'yes', |
| 2599 | 'skin' => array( 'skin-1' ), |
| 2600 | ), |
| 2601 | ) |
| 2602 | ); |
| 2603 | |
| 2604 | $this->end_controls_tab(); |
| 2605 | |
| 2606 | $this->end_controls_tabs(); |
| 2607 | |
| 2608 | $this->add_control( |
| 2609 | 'separator_color', |
| 2610 | array( |
| 2611 | 'label' => __( 'Separator Color', 'premium-addons-for-elementor' ), |
| 2612 | 'type' => Controls_Manager::COLOR, |
| 2613 | 'separator' => 'before', |
| 2614 | 'selectors' => array( |
| 2615 | '{{WRAPPER}} .premium-world-clock__separator' => 'color: {{VALUE}};', |
| 2616 | ), |
| 2617 | 'condition' => array( |
| 2618 | 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2619 | ), |
| 2620 | ) |
| 2621 | ); |
| 2622 | |
| 2623 | $this->add_control( |
| 2624 | 'clock_rounder', |
| 2625 | array( |
| 2626 | 'label' => esc_html__( 'Rounder', 'premium-addons-for-elementor' ), |
| 2627 | 'separator' => 'before', |
| 2628 | 'type' => Controls_Manager::HEADING, |
| 2629 | 'condition' => array( |
| 2630 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2631 | ), |
| 2632 | ) |
| 2633 | ); |
| 2634 | |
| 2635 | $this->add_responsive_control( |
| 2636 | 'rounder_size', |
| 2637 | array( |
| 2638 | 'label' => __( 'Size', 'premium-addons-for-elementor' ), |
| 2639 | 'type' => Controls_Manager::SLIDER, |
| 2640 | 'size_units' => array( 'px' ), |
| 2641 | 'range' => array( |
| 2642 | 'px' => array( |
| 2643 | 'min' => 0, |
| 2644 | 'max' => 10, |
| 2645 | ), |
| 2646 | ), |
| 2647 | 'selectors' => array( |
| 2648 | '{{WRAPPER}} .premium-world-clock__rounder' => 'width: {{SIZE}}px; height: {{SIZE}}px;', |
| 2649 | ), |
| 2650 | 'condition' => array( |
| 2651 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2652 | ), |
| 2653 | ) |
| 2654 | ); |
| 2655 | |
| 2656 | $this->add_control( |
| 2657 | 'rounder_bg', |
| 2658 | array( |
| 2659 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 2660 | 'type' => Controls_Manager::COLOR, |
| 2661 | 'selectors' => array( |
| 2662 | '{{WRAPPER}} .premium-world-clock__rounder' => 'background-color: {{VALUE}};', |
| 2663 | ), |
| 2664 | 'condition' => array( |
| 2665 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2666 | ), |
| 2667 | ) |
| 2668 | ); |
| 2669 | |
| 2670 | $this->add_control( |
| 2671 | 'rounder_border_color', |
| 2672 | array( |
| 2673 | 'label' => __( 'Border Color', 'premium-addons-for-elementor' ), |
| 2674 | 'type' => Controls_Manager::COLOR, |
| 2675 | 'selectors' => array( |
| 2676 | '{{WRAPPER}} .premium-world-clock__rounder' => 'border-color: {{VALUE}};', |
| 2677 | ), |
| 2678 | 'condition' => array( |
| 2679 | 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), |
| 2680 | ), |
| 2681 | ) |
| 2682 | ); |
| 2683 | |
| 2684 | $this->end_controls_section(); |
| 2685 | } |
| 2686 | |
| 2687 | private function add_days_style_controls() { |
| 2688 | |
| 2689 | $this->start_controls_section( |
| 2690 | 'days_style_section', |
| 2691 | array( |
| 2692 | 'label' => __( 'Days', 'premium-addons-for-elementor' ), |
| 2693 | 'tab' => Controls_Manager::TAB_STYLE, |
| 2694 | 'condition' => array( |
| 2695 | 'date' => 'yes', |
| 2696 | 'skin' => 'skin-3', |
| 2697 | ), |
| 2698 | ) |
| 2699 | ); |
| 2700 | |
| 2701 | $this->start_controls_tabs( 'days_tabs' ); |
| 2702 | |
| 2703 | $this->start_controls_tab( |
| 2704 | 'normal_tab', |
| 2705 | array( |
| 2706 | 'label' => __( 'Normal', 'premium-addons-for-elementor' ), |
| 2707 | ) |
| 2708 | ); |
| 2709 | |
| 2710 | $this->add_group_control( |
| 2711 | Group_Control_Typography::get_type(), |
| 2712 | array( |
| 2713 | 'name' => 'day_typo', |
| 2714 | 'selector' => '{{WRAPPER}} .premium-world-clock__day-name', |
| 2715 | ) |
| 2716 | ); |
| 2717 | |
| 2718 | $this->add_control( |
| 2719 | 'days_color', |
| 2720 | array( |
| 2721 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 2722 | 'type' => Controls_Manager::COLOR, |
| 2723 | 'selectors' => array( |
| 2724 | '{{WRAPPER}} .premium-world-clock__day-name' => 'color: {{VALUE}};', |
| 2725 | ), |
| 2726 | ) |
| 2727 | ); |
| 2728 | |
| 2729 | $this->add_group_control( |
| 2730 | Premium_Background::get_type(), |
| 2731 | array( |
| 2732 | 'name' => 'days_bg', |
| 2733 | 'types' => array( 'classic', 'gradient' ), |
| 2734 | 'selector' => '{{WRAPPER}} .premium-world-clock__day-name', |
| 2735 | ) |
| 2736 | ); |
| 2737 | |
| 2738 | $this->add_group_control( |
| 2739 | Group_Control_Border::get_type(), |
| 2740 | array( |
| 2741 | 'name' => 'days_border', |
| 2742 | 'selector' => '{{WRAPPER}} .premium-world-clock__day-name', |
| 2743 | ) |
| 2744 | ); |
| 2745 | |
| 2746 | $this->add_control( |
| 2747 | 'days_rad', |
| 2748 | array( |
| 2749 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 2750 | 'type' => Controls_Manager::SLIDER, |
| 2751 | 'size_units' => array( 'px', '%', 'em' ), |
| 2752 | 'selectors' => array( |
| 2753 | '{{WRAPPER}} .premium-world-clock__day-name' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 2754 | ), |
| 2755 | ) |
| 2756 | ); |
| 2757 | |
| 2758 | $this->add_responsive_control( |
| 2759 | 'days_padding', |
| 2760 | array( |
| 2761 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 2762 | 'type' => Controls_Manager::DIMENSIONS, |
| 2763 | 'size_units' => array( 'px', 'em' ), |
| 2764 | 'selectors' => array( |
| 2765 | '{{WRAPPER}} .premium-world-clock__day-name' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2766 | ), |
| 2767 | ) |
| 2768 | ); |
| 2769 | |
| 2770 | $this->end_controls_tab(); |
| 2771 | |
| 2772 | $this->start_controls_tab( |
| 2773 | 'active_tab', |
| 2774 | array( |
| 2775 | 'label' => __( 'Active', 'premium-addons-for-elementor' ), |
| 2776 | ) |
| 2777 | ); |
| 2778 | |
| 2779 | $this->add_group_control( |
| 2780 | Group_Control_Typography::get_type(), |
| 2781 | array( |
| 2782 | 'name' => 'day_typo_act', |
| 2783 | 'selector' => '{{WRAPPER}} .premium-world-clock__day-name.current-day', |
| 2784 | ) |
| 2785 | ); |
| 2786 | |
| 2787 | $this->add_control( |
| 2788 | 'days_color_act', |
| 2789 | array( |
| 2790 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 2791 | 'type' => Controls_Manager::COLOR, |
| 2792 | 'selectors' => array( |
| 2793 | '{{WRAPPER}} .premium-world-clock__day-name.current-day' => 'color: {{VALUE}};', |
| 2794 | ), |
| 2795 | ) |
| 2796 | ); |
| 2797 | |
| 2798 | $this->add_group_control( |
| 2799 | Premium_Background::get_type(), |
| 2800 | array( |
| 2801 | 'name' => 'days_bg_act', |
| 2802 | 'types' => array( 'classic', 'gradient' ), |
| 2803 | 'selector' => '{{WRAPPER}} .premium-world-clock__day-name.current-day', |
| 2804 | ) |
| 2805 | ); |
| 2806 | |
| 2807 | $this->add_group_control( |
| 2808 | Group_Control_Border::get_type(), |
| 2809 | array( |
| 2810 | 'name' => 'days_border_act', |
| 2811 | 'selector' => '{{WRAPPER}} .premium-world-clock__day-name.current-day', |
| 2812 | ) |
| 2813 | ); |
| 2814 | |
| 2815 | $this->add_control( |
| 2816 | 'days_rad_act', |
| 2817 | array( |
| 2818 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 2819 | 'type' => Controls_Manager::SLIDER, |
| 2820 | 'size_units' => array( 'px', '%', 'em' ), |
| 2821 | 'selectors' => array( |
| 2822 | '{{WRAPPER}} .premium-world-clock__day-name.current-day' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 2823 | ), |
| 2824 | ) |
| 2825 | ); |
| 2826 | |
| 2827 | $this->add_responsive_control( |
| 2828 | 'days_padding_act', |
| 2829 | array( |
| 2830 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 2831 | 'type' => Controls_Manager::DIMENSIONS, |
| 2832 | 'size_units' => array( 'px', 'em' ), |
| 2833 | 'selectors' => array( |
| 2834 | '{{WRAPPER}} .premium-world-clock__day-name.current-day' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2835 | ), |
| 2836 | ) |
| 2837 | ); |
| 2838 | |
| 2839 | $this->end_controls_tab(); |
| 2840 | $this->end_controls_tabs(); |
| 2841 | |
| 2842 | $this->add_control( |
| 2843 | 'days_container', |
| 2844 | array( |
| 2845 | 'label' => esc_html__( 'Container', 'premium-addons-for-elementor' ), |
| 2846 | 'separator' => 'before', |
| 2847 | 'type' => Controls_Manager::HEADING, |
| 2848 | ) |
| 2849 | ); |
| 2850 | |
| 2851 | $this->add_responsive_control( |
| 2852 | 'days_spacing', |
| 2853 | array( |
| 2854 | 'label' => __( 'Spacing', 'premium-addons-for-elementor' ), |
| 2855 | 'type' => Controls_Manager::SLIDER, |
| 2856 | 'size_units' => array( 'px', '%', 'em' ), |
| 2857 | 'selectors' => array( |
| 2858 | '{{WRAPPER}} .premium-world-clock__days-wrapper' => 'gap: {{SIZE}}{{UNIT}};', |
| 2859 | ), |
| 2860 | ) |
| 2861 | ); |
| 2862 | |
| 2863 | $this->add_group_control( |
| 2864 | Premium_Background::get_type(), |
| 2865 | array( |
| 2866 | 'name' => 'days_cont_bg', |
| 2867 | 'types' => array( 'classic', 'gradient' ), |
| 2868 | 'selector' => '{{WRAPPER}} .premium-world-clock__days-wrapper', |
| 2869 | ) |
| 2870 | ); |
| 2871 | |
| 2872 | $this->add_group_control( |
| 2873 | Group_Control_Box_Shadow::get_type(), |
| 2874 | array( |
| 2875 | 'name' => 'days_cont_shadow', |
| 2876 | 'selector' => '{{WRAPPER}} .premium-world-clock__days-wrapper', |
| 2877 | ) |
| 2878 | ); |
| 2879 | |
| 2880 | $this->add_group_control( |
| 2881 | Group_Control_Border::get_type(), |
| 2882 | array( |
| 2883 | 'name' => 'days_cont_border', |
| 2884 | 'selector' => '{{WRAPPER}} .premium-world-clock__days-wrapper', |
| 2885 | ) |
| 2886 | ); |
| 2887 | |
| 2888 | $this->add_control( |
| 2889 | 'days_cont_rad', |
| 2890 | array( |
| 2891 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 2892 | 'type' => Controls_Manager::SLIDER, |
| 2893 | 'size_units' => array( 'px', '%', 'em' ), |
| 2894 | 'selectors' => array( |
| 2895 | '{{WRAPPER}} .premium-world-clock__days-wrapper' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 2896 | ), |
| 2897 | ) |
| 2898 | ); |
| 2899 | |
| 2900 | $this->add_responsive_control( |
| 2901 | 'days_cont_padding', |
| 2902 | array( |
| 2903 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 2904 | 'type' => Controls_Manager::DIMENSIONS, |
| 2905 | 'size_units' => array( 'px', 'em' ), |
| 2906 | 'selectors' => array( |
| 2907 | '{{WRAPPER}} .premium-world-clock__days-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2908 | ), |
| 2909 | ) |
| 2910 | ); |
| 2911 | |
| 2912 | $this->add_responsive_control( |
| 2913 | 'days_cont_margin', |
| 2914 | array( |
| 2915 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 2916 | 'type' => Controls_Manager::DIMENSIONS, |
| 2917 | 'size_units' => array( 'px', 'em' ), |
| 2918 | 'selectors' => array( |
| 2919 | '{{WRAPPER}} .premium-world-clock__days-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2920 | ), |
| 2921 | ) |
| 2922 | ); |
| 2923 | |
| 2924 | $this->end_controls_section(); |
| 2925 | } |
| 2926 | |
| 2927 | private function add_clock_num_style_controls() { |
| 2928 | |
| 2929 | $this->start_controls_section( |
| 2930 | 'clock_num_style_section', |
| 2931 | array( |
| 2932 | 'label' => __( 'Clock Numbers', 'premium-addons-for-elementor' ), |
| 2933 | 'tab' => Controls_Manager::TAB_STYLE, |
| 2934 | 'condition' => array( |
| 2935 | 'show_time' => 'yes', |
| 2936 | 'show_clock_num' => 'yes', |
| 2937 | 'skin' => array( 'skin-1', 'skin-5', 'skin-6' ), |
| 2938 | ), |
| 2939 | ) |
| 2940 | ); |
| 2941 | |
| 2942 | $this->add_group_control( |
| 2943 | Group_Control_Typography::get_type(), |
| 2944 | array( |
| 2945 | 'name' => 'clock_num_typo', |
| 2946 | 'selector' => '{{WRAPPER}} .premium-world-clock__clock-number', |
| 2947 | ) |
| 2948 | ); |
| 2949 | |
| 2950 | $this->add_group_control( |
| 2951 | Group_Control_Text_Shadow::get_type(), |
| 2952 | array( |
| 2953 | 'name' => 'clock_num_shadow', |
| 2954 | 'selector' => '{{WRAPPER}} .premium-world-clock__clock-number', |
| 2955 | ) |
| 2956 | ); |
| 2957 | |
| 2958 | $this->add_control( |
| 2959 | 'clock_num_color', |
| 2960 | array( |
| 2961 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 2962 | 'type' => Controls_Manager::COLOR, |
| 2963 | 'selectors' => array( |
| 2964 | '{{WRAPPER}} .premium-world-clock__clock-number' => 'color: {{VALUE}};', |
| 2965 | ), |
| 2966 | ) |
| 2967 | ); |
| 2968 | |
| 2969 | $this->add_group_control( |
| 2970 | Premium_Background::get_type(), |
| 2971 | array( |
| 2972 | 'name' => 'clock_num_bg', |
| 2973 | 'types' => array( 'classic', 'gradient' ), |
| 2974 | 'selector' => '{{WRAPPER}} .premium-world-clock__clock-number', |
| 2975 | ) |
| 2976 | ); |
| 2977 | |
| 2978 | $this->add_group_control( |
| 2979 | Group_Control_Border::get_type(), |
| 2980 | array( |
| 2981 | 'name' => 'clock_num_border', |
| 2982 | 'selector' => '{{WRAPPER}} .premium-world-clock__clock-number', |
| 2983 | ) |
| 2984 | ); |
| 2985 | |
| 2986 | $this->add_control( |
| 2987 | 'clock_num_rad', |
| 2988 | array( |
| 2989 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 2990 | 'type' => Controls_Manager::SLIDER, |
| 2991 | 'size_units' => array( 'px', '%', 'em' ), |
| 2992 | 'selectors' => array( |
| 2993 | '{{WRAPPER}} .premium-world-clock__clock-number' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 2994 | ), |
| 2995 | ) |
| 2996 | ); |
| 2997 | |
| 2998 | $this->add_responsive_control( |
| 2999 | 'clock_num_size', |
| 3000 | array( |
| 3001 | 'label' => __( 'Size', 'premium-addons-for-elementor' ), |
| 3002 | 'type' => Controls_Manager::SLIDER, |
| 3003 | 'size_units' => array( 'px', '%', 'em' ), |
| 3004 | 'selectors' => array( |
| 3005 | '{{WRAPPER}} .premium-world-clock__clock-number' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', |
| 3006 | ), |
| 3007 | ) |
| 3008 | ); |
| 3009 | |
| 3010 | $this->end_controls_section(); |
| 3011 | } |
| 3012 | /** |
| 3013 | * Render title widget output on the frontend. |
| 3014 | * |
| 3015 | * Written in PHP and used to generate the final HTML. |
| 3016 | * |
| 3017 | * @since 1.0.0 |
| 3018 | * @access protected |
| 3019 | */ |
| 3020 | protected function render() { |
| 3021 | |
| 3022 | $settings = $this->get_settings_for_display(); |
| 3023 | |
| 3024 | $papro_activated = Helper_Functions::check_papro_version(); |
| 3025 | |
| 3026 | if ( ! $papro_activated && in_array( $settings['skin'], array( 'skin-4', 'skin-6', 'skin-7' ), true ) ) { |
| 3027 | ?> |
| 3028 | <div class="premium-error-notice"> |
| 3029 | <?php |
| 3030 | $message = __( 'This option is available in <b>Premium Addons Pro</b>.', 'premium-addons-for-elementor' ); |
| 3031 | echo wp_kses_post( $message ); |
| 3032 | ?> |
| 3033 | </div> |
| 3034 | <?php |
| 3035 | return false; |
| 3036 | } |
| 3037 | |
| 3038 | $time_zone = 'custom' === $settings['tz_type'] ? $settings['custom_tz'] : $settings['tz_type']; |
| 3039 | |
| 3040 | $clock_title = $settings['clock_title']; |
| 3041 | |
| 3042 | $skin = $settings['skin']; |
| 3043 | |
| 3044 | $show_timezone = 'yes' === $settings['show_timezone_offset'] ? true : false; |
| 3045 | |
| 3046 | $show_time = 'yes' === $settings['show_time'] ? true : false; |
| 3047 | |
| 3048 | $analog_skins = array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ); |
| 3049 | |
| 3050 | $show_seconds = ! in_array( $skin, $analog_skins, true ) && 'yes' === $settings['show_seconds'] ? true : false; |
| 3051 | |
| 3052 | $show_meridiem = 'yes' === $settings['show_meridiem'] ? true : false; |
| 3053 | |
| 3054 | $show_clock_numbers = 'yes' === $settings['show_clock_num'] ? true : false; |
| 3055 | |
| 3056 | $show_indicators = 'yes' === $settings['show_indicators'] && 'skin-1' === $skin && ! $show_clock_numbers ? true : false; |
| 3057 | |
| 3058 | $show_date = 'yes' === $settings['date'] ? true : false; |
| 3059 | |
| 3060 | $clock_setting = array( |
| 3061 | 'timezone' => $time_zone, |
| 3062 | 'format' => in_array( $skin, $analog_skins, true ) ? 'hh' : $settings['time_format'], |
| 3063 | 'skin' => $skin, |
| 3064 | 'showSeconds' => $show_seconds, |
| 3065 | 'showMeridiem' => $show_meridiem, |
| 3066 | 'meridiemType' => $settings['meridiem_type'], |
| 3067 | 'date' => $show_date, |
| 3068 | 'gmtOffset' => $show_timezone, |
| 3069 | 'showClockNum' => $show_clock_numbers, |
| 3070 | 'equalWidth' => 'yes' === $settings['equal_width'] && in_array( $skin, array( 'skin-2', 'skin-3', 'skin-4' ), true ) ? true : false, |
| 3071 | 'language' => $settings['language_prefix'], |
| 3072 | ); |
| 3073 | |
| 3074 | if ( $show_date ) { |
| 3075 | |
| 3076 | if ( 'skin-4' === $skin ) { |
| 3077 | |
| 3078 | $digital_date_format = 'custom' === $settings['date_format_digital'] ? explode( '|', $settings['custom_date_format'] ) : explode( '|', $settings['date_format_digital'] ); |
| 3079 | $clock_setting['dateFormat'] = $digital_date_format; |
| 3080 | |
| 3081 | } elseif ( 'skin-3' === $skin ) { |
| 3082 | |
| 3083 | $clock_setting['daysNum'] = $settings['days_num']; |
| 3084 | } else { |
| 3085 | $clock_setting['dateFormat'] = $settings['date_format']; |
| 3086 | } |
| 3087 | } |
| 3088 | |
| 3089 | if ( $show_timezone ) { |
| 3090 | $clock_setting['offsetFormat'] = $settings['offset_format']; |
| 3091 | } |
| 3092 | |
| 3093 | $this->add_render_attribute( |
| 3094 | 'pa-clock-wrapper', |
| 3095 | array( |
| 3096 | 'class' => array( 'premium-world-clock__clock-wrapper', 'premium-addons__v-hidden' ), |
| 3097 | 'data-settings' => wp_json_encode( $clock_setting ), |
| 3098 | ) |
| 3099 | ); |
| 3100 | |
| 3101 | $this->add_render_attribute( 'time_wrapper', 'class', 'premium-world-clock__time-wrapper' ); |
| 3102 | |
| 3103 | if ( 'none' !== $settings['clock_lq_effect'] && 'skin4' !== $settings['skin'] ) { |
| 3104 | $this->add_render_attribute( 'time_wrapper', 'class', 'premium-con-lq__' . $settings['clock_lq_effect'] ); |
| 3105 | } |
| 3106 | |
| 3107 | ?> |
| 3108 | <div <?php $this->print_render_attribute_string( 'pa-clock-wrapper' ); ?>> |
| 3109 | <?php if ( in_array( $skin, array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), true ) ) { ?> |
| 3110 | <?php if ( $show_time ) : ?> |
| 3111 | <div <?php $this->print_render_attribute_string( 'time_wrapper' ); ?>> |
| 3112 | <div class="premium-world-clock__circle"> |
| 3113 | <?php |
| 3114 | if ( 'skin-1' !== $skin ) { |
| 3115 | $this->get_clock_face( $skin ); |
| 3116 | } |
| 3117 | ?> |
| 3118 | |
| 3119 | <?php if ( $show_indicators ) { ?> |
| 3120 | <span class="premium-world-clock__twelve premium-world-clock__face"></span> |
| 3121 | <span class="premium-world-clock__three premium-world-clock__face"></span> |
| 3122 | <span class="premium-world-clock__six premium-world-clock__face"></span> |
| 3123 | <span class="premium-world-clock__nine premium-world-clock__face"></span> |
| 3124 | <?php } ?> |
| 3125 | |
| 3126 | <?php if ( $show_clock_numbers ) { ?> |
| 3127 | |
| 3128 | <div class="premium-world-clock__clock-numbers"> |
| 3129 | <span class="premium-world-clock__clock-number">3</span> |
| 3130 | <span class="premium-world-clock__clock-number">4</span> |
| 3131 | <span class="premium-world-clock__clock-number">5</span> |
| 3132 | <span class="premium-world-clock__clock-number">6</span> |
| 3133 | <span class="premium-world-clock__clock-number">7</span> |
| 3134 | <span class="premium-world-clock__clock-number">8</span> |
| 3135 | <span class="premium-world-clock__clock-number">9</span> |
| 3136 | <span class="premium-world-clock__clock-number">10</span> |
| 3137 | <span class="premium-world-clock__clock-number">11</span> |
| 3138 | <span class="premium-world-clock__clock-number">12</span> |
| 3139 | <span class="premium-world-clock__clock-number">1</span> |
| 3140 | <span class="premium-world-clock__clock-number">2</span> |
| 3141 | </div> |
| 3142 | <?php } ?> |
| 3143 | |
| 3144 | <div class="premium-world-clock__rounder"></div> |
| 3145 | <div class="premium-world-clock__hours premium-world-clock__hand"></div> |
| 3146 | <div class="premium-world-clock__minutes premium-world-clock__hand"></div> |
| 3147 | <div class="premium-world-clock__seconds premium-world-clock__hand"></div> |
| 3148 | <?php |
| 3149 | if ( $show_meridiem ) { |
| 3150 | ?> |
| 3151 | <span class="premium-world-clock__meridiem">AM</span> |
| 3152 | <?php |
| 3153 | } |
| 3154 | ?> |
| 3155 | </div> |
| 3156 | </div> |
| 3157 | <?php endif; ?> |
| 3158 | |
| 3159 | <?php } elseif ( 'skin-2' === $skin ) { ?> |
| 3160 | |
| 3161 | <?php if ( $show_time ) : ?> |
| 3162 | |
| 3163 | <div <?php $this->print_render_attribute_string( 'time_wrapper' ); ?>> |
| 3164 | <span class="premium-world-clock__hours premium-world-clock__hand"></span> |
| 3165 | <span class="premium-world-clock__separator">:</span> |
| 3166 | <span class="premium-world-clock__minutes premium-world-clock__hand"></span> |
| 3167 | |
| 3168 | <?php if ( $show_seconds ) : ?> |
| 3169 | <span class="premium-world-clock__separator">:</span> |
| 3170 | <span class="premium-world-clock__seconds premium-world-clock__hand"></span> |
| 3171 | <?php endif; ?> |
| 3172 | |
| 3173 | <span class="premium-world-clock__meridiem"></span> |
| 3174 | </div> |
| 3175 | |
| 3176 | <?php endif; ?> |
| 3177 | |
| 3178 | <?php } elseif ( 'skin-3' === $skin ) { ?> |
| 3179 | <?php if ( $show_date ) { ?> |
| 3180 | <div class='premium-world-clock__days-wrapper'></div> |
| 3181 | <?php } ?> |
| 3182 | <?php if ( $show_time ) : ?> |
| 3183 | <div <?php $this->print_render_attribute_string( 'time_wrapper' ); ?>> |
| 3184 | <span class='premium-world-clock__hours premium-world-clock__hand'></span> |
| 3185 | <span class='premium-world-clock__separator'>:</span> |
| 3186 | <span class='premium-world-clock__minutes premium-world-clock__hand'></span> |
| 3187 | <span class='premium-world-clock__meridiem'></span> |
| 3188 | </div> |
| 3189 | <?php endif; ?> |
| 3190 | <div class='premium-world-clock__date-wrapper'> |
| 3191 | <?php if ( $show_seconds ) : ?> |
| 3192 | <div class="premium-world-clock__sec-wrapper"> |
| 3193 | <span class='premium-world-clock__seconds premium-world-clock__hand'></span> |
| 3194 | <span class='premium-world-clock__symbol premium-world-clock__second-symbol'>S</span> |
| 3195 | </div> |
| 3196 | <?php endif; ?> |
| 3197 | |
| 3198 | <?php if ( $show_date ) { ?> |
| 3199 | <div class="premium-world-clock__month-wrapper"> |
| 3200 | <span class='premium-world-clock__date-segment premium-world-clock__month'></span> |
| 3201 | <span class='premium-world-clock__symbol'>M</span> |
| 3202 | </div> |
| 3203 | <div class="premium-world-clock__day-wrapper"> |
| 3204 | <span class='premium-world-clock__date-segment premium-world-clock__day'></span> |
| 3205 | <span class='premium-world-clock__symbol'>D</span> |
| 3206 | </div> |
| 3207 | <?php } ?> |
| 3208 | </div> |
| 3209 | <?php } elseif ( 'skin-4' === $skin ) { ?> |
| 3210 | <?php if ( $show_time ) : ?> |
| 3211 | <div <?php $this->print_render_attribute_string( 'time_wrapper' ); ?>> |
| 3212 | <span class="premium-world-clock__hours premium-world-clock__hand"></span> |
| 3213 | <span class="premium-world-clock__separator">:</span> |
| 3214 | <span class="premium-world-clock__minutes premium-world-clock__hand"></span> |
| 3215 | <?php if ( $show_seconds ) : ?> |
| 3216 | <span class="premium-world-clock__separator">:</span> |
| 3217 | <span class="premium-world-clock__seconds premium-world-clock__hand"></span> |
| 3218 | <?php endif; ?> |
| 3219 | <span class="premium-world-clock__meridiem"></span> |
| 3220 | </div> |
| 3221 | <?php endif; ?> |
| 3222 | |
| 3223 | <?php if ( $show_date ) { ?> |
| 3224 | <div class="premium-world-clock__date-wrapper"></div> |
| 3225 | <?php } ?> |
| 3226 | |
| 3227 | <?php } ?> |
| 3228 | |
| 3229 | <?php if ( ! empty( $clock_title ) || $show_date || $show_timezone ) : ?> |
| 3230 | <div class='premium-world-clock__additional-info'> |
| 3231 | |
| 3232 | <?php if ( ! empty( $clock_title ) ) : ?> |
| 3233 | <span class='premium-world-clock__clock-title'> |
| 3234 | <?php echo esc_html( $clock_title ); ?> |
| 3235 | </span> |
| 3236 | <?php endif; ?> |
| 3237 | |
| 3238 | <?php if ( $show_date && ! in_array( $skin, array( 'skin-3', 'skin-4' ), true ) ) : ?> |
| 3239 | <span class='premium-world-clock__date'></span> |
| 3240 | <?php endif; ?> |
| 3241 | |
| 3242 | <?php if ( $show_timezone ) : ?> |
| 3243 | <span class='premium-world-clock__gmt-offset'></span> |
| 3244 | <?php endif; ?> |
| 3245 | </div> |
| 3246 | <?php endif; ?> |
| 3247 | </div> |
| 3248 | <?php |
| 3249 | } |
| 3250 | |
| 3251 | /** |
| 3252 | * Get Clock Face. |
| 3253 | * |
| 3254 | * @access private |
| 3255 | * @since 2.8.23 |
| 3256 | * |
| 3257 | * @param string $skin clock skin. |
| 3258 | */ |
| 3259 | private function get_clock_face( $skin ) { |
| 3260 | |
| 3261 | $clock_faces = array( |
| 3262 | 'skin-5' => '<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="125.62" height="125.62" viewBox="0 0 125.62 125.62"><defs><style>.premium-clock-svg{fill:#333;}</style></defs><g id="Face_1" data-name="Face 1"><path class="premium-clock-svg" d="M87.64,14.11l-1,4.58.61.14,1-4.59C88.05,14.19,87.84,14.14,87.64,14.11Zm-6.43-1-.5,4.67.62.07.49-4.68Zm12.73,2.64-1.45,4.46.59.2L94.53,16ZM100,18.07l-1.91,4.28.57.26,1.91-4.29Z" transform="translate(-12.19 -12.19)"/><path class="premium-clock-svg" d="M75,12.19A62.81,62.81,0,1,0,137.81,75,62.87,62.87,0,0,0,75,12.19Zm61.88,69-4.66-.49c0,.2-.05.41-.07.62l4.67.49c-.22,2-.52,3.9-.92,5.81l-4.58-1c0,.2-.1.4-.14.61l4.59,1q-.63,2.89-1.53,5.69l-4.45-1.45c-.06.2-.13.39-.2.59l4.46,1.45q-.93,2.82-2.11,5.5l-4.28-1.91c-.08.19-.17.38-.26.57l4.29,1.9h0q-1.09,2.4-2.38,4.69l-6.21-3.59c-.31.55-.62,1.09-.94,1.62l6.21,3.59q-1.35,2.27-2.9,4.39l-3.77-2.75c-.12.17-.24.35-.37.51l3.78,2.74a58.25,58.25,0,0,1-3.71,4.57l-3.46-3.12c-.14.16-.27.32-.41.47l3.45,3.12a58,58,0,0,1-4.15,4.15l-3.12-3.45-.47.41,3.12,3.46q-2.19,2-4.56,3.71l-2.75-3.77-.51.36,2.75,3.78q-2.13,1.55-4.39,2.89l-3.59-6.2c-.53.32-1.08.63-1.62.93l3.58,6.22q-2.3,1.29-4.69,2.37l-1.91-4.28-.56.26,1.9,4.28q-2.69,1.19-5.5,2.11l-1.44-4.46-.59.2,1.44,4.45q-2.79.9-5.68,1.53l-1-4.59-.6.14,1,4.58c-1.91.4-3.85.7-5.82.92l-.49-4.67-.62.07.49,4.66q-2.59.27-5.25.3V130L75,130l-.93,0v7.2c-1.77,0-3.52-.12-5.25-.29l.49-4.67-.62-.07-.49,4.67a58.77,58.77,0,0,1-5.82-.92l1-4.58-.61-.14-1,4.59c-1.93-.42-3.82-.92-5.68-1.52l1.44-4.46-.59-.2-1.45,4.46A58.65,58.65,0,0,1,50,131.94l1.91-4.28c-.2-.08-.38-.17-.57-.26l-1.91,4.29q-2.4-1.09-4.69-2.38l3.58-6.21c-.54-.31-1.09-.62-1.62-.94l-3.58,6.21c-1.51-.9-3-1.87-4.4-2.89l2.75-3.78-.51-.37-2.74,3.78a58.25,58.25,0,0,1-4.57-3.71l3.12-3.46-.47-.41L33.19,121A58.59,58.59,0,0,1,29,116.82l3.46-3.11c-.14-.16-.27-.32-.41-.47l-3.46,3.12a58.25,58.25,0,0,1-3.71-4.57l3.77-2.74-.36-.51-3.78,2.74q-1.55-2.13-2.9-4.39l6.21-3.58c-.32-.53-.63-1.08-.93-1.62l-6.22,3.58q-1.29-2.3-2.37-4.69l4.28-1.91c-.08-.19-.17-.38-.26-.57L18.06,100q-1.18-2.69-2.11-5.5l4.46-1.44c-.06-.2-.13-.4-.2-.6l-4.45,1.45q-.9-2.79-1.53-5.69l4.59-1c0-.2-.09-.41-.14-.61l-4.58,1c-.4-1.91-.7-3.85-.92-5.81l4.67-.49c0-.21-.05-.42-.07-.62l-4.66.49c-.18-1.73-.28-3.49-.3-5.26H20c0-.31,0-.62,0-.93s0-.63,0-.94h-7.2q0-2.66.3-5.25l4.66.49c0-.21,0-.42.07-.62l-4.67-.49a58.79,58.79,0,0,1,.93-5.82l4.57,1,.15-.6-4.6-1q.63-2.9,1.53-5.69l4.45,1.45.21-.59L16,55.48q.93-2.82,2.12-5.5l4.28,1.91c.08-.19.17-.38.26-.57l-4.29-1.91q1.09-2.4,2.38-4.69l6.21,3.59c.31-.55.61-1.09.94-1.62L21.64,43.1q1.35-2.26,2.89-4.39l3.78,2.75.37-.51L24.9,38.21a58.25,58.25,0,0,1,3.71-4.57l3.46,3.12.42-.47L29,33.17A56.3,56.3,0,0,1,33.19,29l3.11,3.47.47-.42L33.65,28.6a58.25,58.25,0,0,1,4.57-3.71L41,28.67l.51-.37-2.74-3.78c1.41-1,2.88-2,4.38-2.89l3.59,6.21q.79-.48,1.62-.93l-3.59-6.22q2.3-1.29,4.69-2.38l1.91,4.29.57-.26L50,18.06A58.65,58.65,0,0,1,55.49,16l1.45,4.46.59-.2-1.45-4.45q2.79-.9,5.68-1.53l1,4.59.61-.14-1-4.58c1.91-.4,3.85-.7,5.82-.92l.49,4.67.62-.07-.49-4.66c1.73-.18,3.49-.28,5.26-.3V20L75,20l.94,0v-7.2c1.78,0,3.53.12,5.27.3l.61.06q3,.33,5.82.93c.2,0,.41.08.61.13a57.38,57.38,0,0,1,5.69,1.52l.59.19q2.81.93,5.49,2.12l.57.25q2.4,1.09,4.69,2.38l-3.59,6.21c.55.31,1.09.61,1.63.94l3.58-6.21c1.51.9,3,1.86,4.39,2.9l-2.75,3.77.51.36,2.74-3.77a58.25,58.25,0,0,1,4.57,3.71l-3.12,3.46.47.41L116.82,29A58.31,58.31,0,0,1,121,33.18l-3.46,3.12.42.47,3.46-3.12c1.31,1.46,2.54,3,3.71,4.56L121.33,41c.13.16.24.34.36.51l3.78-2.75q1.55,2.13,2.9,4.39l-6.21,3.58c.32.54.63,1.08.93,1.63l6.22-3.59q1.29,2.3,2.38,4.69h0l-4.29,1.9.26.57,4.28-1.9q1.19,2.67,2.11,5.48l-4.46,1.46c.06.19.14.39.2.59l4.45-1.45q.9,2.79,1.53,5.69l-4.59,1c0,.2.1.4.14.61l4.58-1c.4,1.91.7,3.85.92,5.81l-4.67.49c0,.2,0,.41.07.62l4.66-.5c.18,1.73.28,3.49.3,5.26H130c0,.31,0,.63,0,.94s0,.62,0,.93h7.2C137.16,77.7,137.06,79.46,136.88,81.19Z" transform="translate(-12.19 -12.19)"/></g></svg>', |
| 3263 | 'skin-6' => '<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="125.62" height="125.62" viewBox="0 0 125.62 125.62"><defs><style>.premium-clock-svg{fill:#333;}</style></defs><g id="Face_2" data-name="Face 2"><path class="premium-clock-svg" d="M75,12.19A62.81,62.81,0,1,0,137.81,75,62.89,62.89,0,0,0,75,12.19Zm62.18,61.87H132.8c0-1.62-.12-3.21-.28-4.79l4.36-.47C137.06,70.53,137.16,72.29,137.18,74.06Zm-.36-5.88-4.36.47q-.3-2.73-.85-5.37l4.28-.91C136.3,64.28,136.6,66.22,136.82,68.18Zm-1.06-6.42-4.28.91a53.82,53.82,0,0,0-1.4-5.24l4.16-1.35A57.19,57.19,0,0,1,135.76,61.76Zm-1.71-6.28-4.16,1.36c-.57-1.73-1.23-3.42-2-5.07l4-1.78Q133.13,52.68,134.05,55.48Zm-2.37-6.07-4,1.78c-.66-1.46-1.39-2.89-2.17-4.28l3.79-2.19Q130.59,47,131.68,49.41Zm-3.32-6.31-3.79,2.19q-1.23-2.07-2.65-4l3.54-2.57C126.5,40.13,127.46,41.59,128.36,43.1Zm-3.26-4.9-3.54,2.58q-1.61-2.19-3.42-4.22l3.25-2.92Q123.36,35.83,125.1,38.2Zm-4.13-5-3.24,2.92c-1.23-1.34-2.5-2.61-3.84-3.83L116.82,29A58,58,0,0,1,121,33.17Zm-4.62-4.57-2.93,3.24q-2-1.8-4.21-3.41l2.57-3.54A58.25,58.25,0,0,1,116.35,28.6Zm-5.07-4.08-2.58,3.54c-1.29-.94-2.63-1.82-4-2.64l2.18-3.79C108.39,22.53,109.86,23.5,111.28,24.52Zm-10.7-6.21c1.59.73,3.16,1.52,4.68,2.38l-2.19,3.79Q101,23.3,98.79,22.31l1.78-4Zm-.57-.25-1.79,4c-1.65-.73-3.33-1.38-5.06-1.95L94.51,16Q97.33,16.88,100,18.06Zm-6.09-2.31-1.36,4.17a53.82,53.82,0,0,0-5.24-1.4l.91-4.29Q91.13,14.86,93.92,15.75Zm-7.21,2.63c-1.76-.36-3.55-.65-5.37-.84l.46-4.36a58.77,58.77,0,0,1,5.82.92ZM75.92,12.82c1.78,0,3.53.12,5.27.3l-.47,4.35q-2.37-.24-4.8-.27Zm-1.88,0V17.2c-1.62,0-3.21.12-4.79.28l-.46-4.36C70.52,13,72.27,12.84,74,12.82Zm-5.87.37.46,4.36a52.91,52.91,0,0,0-5.36.84l-.91-4.28Q65.22,13.51,68.17,13.19Zm-6.42,1.05.91,4.28a53.82,53.82,0,0,0-5.24,1.4l-1.36-4.16A57.38,57.38,0,0,1,61.75,14.24ZM55.47,16l1.36,4.17q-2.59.86-5.07,1.95l-1.78-4Q52.67,16.89,55.47,16Zm-6.06,2.37,1.78,4c-1.46.66-2.89,1.39-4.28,2.17L44.72,20.7Q47,19.41,49.41,18.32ZM43.1,21.64l2.19,3.79q-2.07,1.23-4,2.64l-2.57-3.54Q40.84,23,43.1,21.64ZM38.2,24.9l2.57,3.54Q38.58,30,36.56,31.85l-2.92-3.24Q35.83,26.65,38.2,24.9Zm-5,4.12,2.92,3.25q-2,1.83-3.84,3.84L29,33.19A58.59,58.59,0,0,1,33.18,29ZM28.6,33.65l3.24,2.92q-1.78,2-3.41,4.21l-3.54-2.56A58.25,58.25,0,0,1,28.6,33.65Zm-4.07,5.07,3.53,2.57c-.93,1.29-1.82,2.63-2.64,4l-3.79-2.19Q23,40.85,24.53,38.72Zm-3.84,6,3.8,2.19Q23.31,49,22.32,51.2l-4-1.78Q19.4,47,20.69,44.73ZM18.06,50l4,1.78c-.72,1.65-1.38,3.34-1.95,5.07L16,55.49Q16.88,52.67,18.06,50Zm-2.3,6.09,4.16,1.35a53.82,53.82,0,0,0-1.4,5.24l-4.29-.91Q14.86,58.86,15.76,56.08ZM14.1,62.37l4.29.91q-.55,2.64-.85,5.36l-4.36-.46C13.4,66.22,13.7,64.28,14.1,62.37Zm-1,6.43,4.36.46c-.16,1.58-.26,3.18-.28,4.8H12.82C12.84,72.29,12.94,70.53,13.12,68.8Zm-.3,7.13H17.2c0,1.62.12,3.21.27,4.79l-4.36.46C12.94,79.45,12.84,77.7,12.82,75.93Zm.36,5.88,4.36-.47c.19,1.82.48,3.61.84,5.37l-4.28.91C13.7,85.71,13.4,83.77,13.18,81.81Zm1.05,6.42,4.29-.91a53.82,53.82,0,0,0,1.4,5.24l-4.17,1.35C15.15,92.05,14.65,90.16,14.23,88.23ZM16,94.51l4.16-1.36q.86,2.59,1.95,5.07l-4,1.78A58.65,58.65,0,0,1,16,94.51Zm2.36,6.06,4-1.78q1,2.19,2.17,4.28l-3.79,2.2Q19.4,103,18.31,100.57Zm3.32,6.31,3.79-2.18c.82,1.38,1.71,2.72,2.64,4l-3.54,2.56C23.49,109.85,22.52,108.39,21.63,106.88Zm3.26,4.9,3.54-2.57q1.61,2.19,3.41,4.22l-3.24,2.92A58.25,58.25,0,0,1,24.89,111.78Zm4.12,5,3.25-2.92c1.22,1.34,2.49,2.61,3.83,3.84L33.17,121A56.3,56.3,0,0,1,29,116.81Zm4.63,4.58,2.92-3.25q2,1.81,4.21,3.42l-2.56,3.54A58.25,58.25,0,0,1,33.64,121.39Zm5.06,4.07,2.58-3.53q1.94,1.41,4,2.64l-2.19,3.79Q40.84,127,38.7,125.46Zm6,3.84,2.19-3.79c1.39.78,2.82,1.51,4.28,2.17l-1.78,4Q47,130.58,44.72,129.3ZM50,131.93l1.78-4c1.65.73,3.33,1.38,5.06,1.95l-1.35,4.17Q52.67,133.12,50,131.93Zm6.09,2.31,1.35-4.16a54,54,0,0,0,5.25,1.4l-.92,4.28A57.19,57.19,0,0,1,56.07,134.24Zm12.11,2.58q-3-.33-5.82-.93l.92-4.28q2.64.55,5.36.85Zm5.86.36c-1.77,0-3.51-.12-5.24-.3l.46-4.36c1.57.16,3.17.26,4.78.28ZM75,127.5l-.94,0v4.71A56.77,56.77,0,0,1,47.22,125l2.33-4c-.54-.3-1.09-.61-1.62-.93l-2.33,4A57.7,57.7,0,0,1,26,104.39l4-2.33c-.32-.54-.63-1.08-.94-1.63l-4,2.33a56.69,56.69,0,0,1-7.2-26.83H22.5c0-.31,0-.62,0-.93s0-.63,0-.94H17.82A56.8,56.8,0,0,1,25,47.23l4,2.33c.3-.55.61-1.09.93-1.63l-4-2.32A57.7,57.7,0,0,1,45.6,26l2.33,4q.8-.48,1.62-.93l-2.33-4A56.77,56.77,0,0,1,74,17.82v4.7l.94,0,.94,0v-4.7A56.73,56.73,0,0,1,102.76,25l-2.34,4.06c.55.3,1.09.61,1.63.93L104.39,26A57.58,57.58,0,0,1,124,45.6L120,47.94c.33.54.64,1.08.94,1.63L125,47.22a56.71,56.71,0,0,1,7.21,26.84h-4.72c0,.31,0,.62,0,.94s0,.62,0,.93h4.72A56.63,56.63,0,0,1,125,102.78l-4.06-2.35c-.3.54-.61,1.09-.93,1.62L124,104.4a57.67,57.67,0,0,1-19.66,19.65L102,120c-.53.32-1.08.63-1.62.93l2.34,4.06a56.73,56.73,0,0,1-26.84,7.2v-4.71Zm.94,9.68V132.8c1.62,0,3.21-.11,4.79-.27l.46,4.36C79.44,137.06,77.69,137.16,75.92,137.18Zm5.88-.36-.47-4.36c1.82-.19,3.61-.48,5.37-.84l.91,4.28Q84.75,136.5,81.8,136.82Zm6.42-1-.91-4.28c1.78-.39,3.54-.86,5.25-1.41l1.35,4.17A57.38,57.38,0,0,1,88.22,135.77Zm6.28-1.71-1.35-4.17q2.59-.85,5.07-1.95l1.78,4Q97.32,133.13,94.5,134.06Zm6.07-2.37-1.78-4q2.19-1,4.28-2.17l2.19,3.79Q103,130.6,100.57,131.69Zm6.31-3.32-2.19-3.79q2.07-1.23,4-2.64l2.57,3.54C109.85,126.51,108.39,127.48,106.88,128.37Zm4.9-3.26-2.57-3.54q2.19-1.6,4.21-3.41l2.93,3.24A58.25,58.25,0,0,1,111.78,125.11Zm5-4.12-2.92-3.25c1.34-1.22,2.61-2.49,3.84-3.83l3.24,2.92A56.3,56.3,0,0,1,116.81,121Zm4.58-4.63-3.24-2.93q1.8-2,3.41-4.21l3.54,2.57A58.25,58.25,0,0,1,121.39,116.36Zm4.08-5.07-3.54-2.58c.94-1.29,1.82-2.63,2.64-4l3.79,2.18C127.47,108.4,126.5,109.87,125.47,111.29Zm3.83-6-3.79-2.19c.79-1.4,1.51-2.83,2.18-4.29l4,1.77C131,102.17,130.17,103.75,129.3,105.28Zm2.64-5.28-4-1.78c.73-1.65,1.38-3.33,1.95-5.06l4.16,1.36Q133.12,97.33,131.94,100Zm2.3-6.08-4.16-1.35a54,54,0,0,0,1.4-5.25l4.29.92Q135.14,91.14,134.24,93.92Zm1.66-6.3-4.28-.91q.54-2.64.84-5.36l4.36.46C136.6,83.77,136.3,85.71,135.9,87.62Zm1-6.43-4.36-.46c.16-1.58.26-3.18.28-4.8h4.38C137.16,77.7,137.06,79.46,136.88,81.19Z" transform="translate(-12.19 -12.19)"/></g></svg>', |
| 3264 | 'skin-7' => '<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="125.62" height="125.62" viewBox="0 0 125.62 125.62"><defs><style>.premium-clock-svg{fill:#333;}</style></defs><g id="Face_3" data-name="Face 3"><path class="premium-clock-svg" d="M75,12.19A62.81,62.81,0,1,0,137.81,75,62.89,62.89,0,0,0,75,12.19Zm62.18,61.87H132.8c0-1.62-.12-3.21-.28-4.79l4.36-.47C137.06,70.53,137.16,72.29,137.18,74.06Zm-.36-5.88-4.36.47q-.3-2.73-.85-5.37l4.28-.91C136.3,64.28,136.6,66.22,136.82,68.18Zm-1.06-6.42-4.28.91a53.82,53.82,0,0,0-1.4-5.24l4.16-1.35A57.19,57.19,0,0,1,135.76,61.76Zm-1.71-6.28-4.16,1.36c-.57-1.73-1.23-3.42-2-5.07l4-1.78Q133.13,52.68,134.05,55.48Zm-2.37-6.07-4,1.78c-.66-1.46-1.39-2.89-2.17-4.28l3.79-2.19Q130.59,47,131.68,49.41Zm-3.32-6.31-3.79,2.19q-1.23-2.07-2.65-4l3.54-2.57C126.5,40.13,127.46,41.59,128.36,43.1Zm-3.26-4.9-3.54,2.58q-1.61-2.19-3.42-4.22l3.25-2.92Q123.36,35.83,125.1,38.2Zm-4.13-5-3.24,2.92c-1.23-1.34-2.5-2.61-3.84-3.83L116.82,29A58,58,0,0,1,121,33.17Zm-4.62-4.57-2.93,3.24q-2-1.8-4.21-3.41l2.57-3.54A58.25,58.25,0,0,1,116.35,28.6Zm-5.07-4.08-2.58,3.54c-1.29-.94-2.63-1.82-4-2.64l2.18-3.79C108.39,22.53,109.86,23.5,111.28,24.52Zm-10.7-6.21c1.59.73,3.16,1.52,4.68,2.38l-2.19,3.79Q101,23.3,98.79,22.31l1.78-4Zm-.57-.25-1.79,4c-1.65-.73-3.33-1.38-5.06-1.95L94.51,16Q97.33,16.88,100,18.06Zm-6.09-2.31-1.36,4.17a53.82,53.82,0,0,0-5.24-1.4l.91-4.29Q91.13,14.86,93.92,15.75Zm-7.21,2.63c-1.76-.36-3.55-.65-5.37-.84l.46-4.36a58.77,58.77,0,0,1,5.82.92ZM75.92,12.82c1.78,0,3.53.12,5.27.3l-.47,4.35q-2.37-.24-4.8-.27Zm-1.88,0V17.2c-1.62,0-3.21.12-4.79.28l-.46-4.36C70.52,13,72.27,12.84,74,12.82Zm-5.87.37.46,4.36a52.91,52.91,0,0,0-5.36.84l-.91-4.28Q65.22,13.51,68.17,13.19Zm-6.42,1.05.91,4.28a53.82,53.82,0,0,0-5.24,1.4l-1.36-4.16A57.38,57.38,0,0,1,61.75,14.24ZM55.47,16l1.36,4.17q-2.59.86-5.07,1.95l-1.78-4Q52.67,16.89,55.47,16Zm-6.06,2.37,1.78,4c-1.46.66-2.89,1.39-4.28,2.17L44.72,20.7Q47,19.41,49.41,18.32ZM43.1,21.64l2.19,3.79q-2.07,1.23-4,2.64l-2.57-3.54Q40.84,23,43.1,21.64ZM38.2,24.9l2.57,3.54Q38.58,30,36.56,31.85l-2.92-3.24Q35.83,26.65,38.2,24.9Zm-5,4.12,2.92,3.25q-2,1.83-3.84,3.84L29,33.19A58.59,58.59,0,0,1,33.18,29ZM28.6,33.65l3.24,2.92q-1.78,2-3.41,4.21l-3.54-2.56A58.25,58.25,0,0,1,28.6,33.65Zm-4.07,5.07,3.53,2.57c-.93,1.29-1.82,2.63-2.64,4l-3.79-2.19Q23,40.85,24.53,38.72Zm-3.84,6,3.8,2.19Q23.31,49,22.32,51.2l-4-1.78Q19.4,47,20.69,44.73ZM18.06,50l4,1.78c-.72,1.65-1.38,3.34-1.95,5.07L16,55.49Q16.88,52.67,18.06,50Zm-2.3,6.09,4.16,1.35a53.82,53.82,0,0,0-1.4,5.24l-4.29-.91Q14.86,58.86,15.76,56.08ZM14.1,62.37l4.29.91q-.55,2.64-.85,5.36l-4.36-.46C13.4,66.22,13.7,64.28,14.1,62.37Zm-1,6.43,4.36.46c-.16,1.58-.26,3.18-.28,4.8H12.82C12.84,72.29,12.94,70.53,13.12,68.8Zm-.3,7.13H17.2c0,1.62.12,3.21.27,4.79l-4.36.46C12.94,79.45,12.84,77.7,12.82,75.93Zm.36,5.88,4.36-.47c.19,1.82.48,3.61.84,5.37l-4.28.91C13.7,85.71,13.4,83.77,13.18,81.81Zm1.05,6.42,4.29-.91a53.82,53.82,0,0,0,1.4,5.24l-4.17,1.35C15.15,92.05,14.65,90.16,14.23,88.23ZM16,94.51l4.16-1.36q.86,2.59,1.95,5.07l-4,1.78A58.65,58.65,0,0,1,16,94.51Zm2.36,6.06,4-1.78q1,2.19,2.17,4.28l-3.79,2.2Q19.4,103,18.31,100.57Zm3.32,6.31,3.79-2.18c.82,1.38,1.71,2.72,2.64,4l-3.54,2.56C23.49,109.85,22.52,108.39,21.63,106.88Zm3.26,4.9,3.54-2.57q1.61,2.19,3.41,4.22l-3.24,2.92A58.25,58.25,0,0,1,24.89,111.78Zm4.12,5,3.25-2.92c1.22,1.34,2.49,2.61,3.83,3.84L33.17,121A56.3,56.3,0,0,1,29,116.81Zm4.63,4.58,2.92-3.25q2,1.81,4.21,3.42l-2.56,3.54A58.25,58.25,0,0,1,33.64,121.39Zm5.06,4.07,2.58-3.53q1.94,1.41,4,2.64l-2.19,3.79Q40.84,127,38.7,125.46Zm6,3.84,2.19-3.79c1.39.78,2.82,1.51,4.28,2.17l-1.78,4Q47,130.58,44.72,129.3ZM50,131.93l1.78-4c1.65.73,3.33,1.38,5.06,1.95l-1.35,4.17Q52.67,133.12,50,131.93Zm6.09,2.31,1.35-4.16a54,54,0,0,0,5.25,1.4l-.92,4.28A57.19,57.19,0,0,1,56.07,134.24Zm12.11,2.58q-3-.33-5.82-.93l.92-4.28q2.64.55,5.36.85Zm5.86.36c-1.77,0-3.51-.12-5.24-.3l.46-4.36c1.57.16,3.17.26,4.78.28ZM75,127.5l-.94,0v4.71A56.77,56.77,0,0,1,47.22,125l2.33-4c-.54-.3-1.09-.61-1.62-.93l-2.33,4A57.7,57.7,0,0,1,26,104.39l4-2.33c-.32-.54-.63-1.08-.94-1.63l-4,2.33a56.69,56.69,0,0,1-7.2-26.83H22.5c0-.31,0-.62,0-.93s0-.63,0-.94H17.82A56.8,56.8,0,0,1,25,47.23l4,2.33c.3-.55.61-1.09.93-1.63l-4-2.32A57.7,57.7,0,0,1,45.6,26l2.33,4q.8-.48,1.62-.93l-2.33-4A56.77,56.77,0,0,1,74,17.82v4.7l.94,0,.94,0v-4.7A56.73,56.73,0,0,1,102.76,25l-2.34,4.06c.55.3,1.09.61,1.63.93L104.39,26A57.58,57.58,0,0,1,124,45.6L120,47.94c.33.54.64,1.08.94,1.63L125,47.22a56.71,56.71,0,0,1,7.21,26.84h-4.72c0,.31,0,.62,0,.94s0,.62,0,.93h4.72A56.63,56.63,0,0,1,125,102.78l-4.06-2.35c-.3.54-.61,1.09-.93,1.62L124,104.4a57.67,57.67,0,0,1-19.66,19.65L102,120c-.53.32-1.08.63-1.62.93l2.34,4.06a56.73,56.73,0,0,1-26.84,7.2v-4.71Zm.94,9.68V132.8c1.62,0,3.21-.11,4.79-.27l.46,4.36C79.44,137.06,77.69,137.16,75.92,137.18Zm5.88-.36-.47-4.36c1.82-.19,3.61-.48,5.37-.84l.91,4.28Q84.75,136.5,81.8,136.82Zm6.42-1-.91-4.28c1.78-.39,3.54-.86,5.25-1.41l1.35,4.17A57.38,57.38,0,0,1,88.22,135.77Zm6.28-1.71-1.35-4.17q2.59-.85,5.07-1.95l1.78,4Q97.32,133.13,94.5,134.06Zm6.07-2.37-1.78-4q2.19-1,4.28-2.17l2.19,3.79Q103,130.6,100.57,131.69Zm6.31-3.32-2.19-3.79q2.07-1.23,4-2.64l2.57,3.54C109.85,126.51,108.39,127.48,106.88,128.37Zm4.9-3.26-2.57-3.54q2.19-1.6,4.21-3.41l2.93,3.24A58.25,58.25,0,0,1,111.78,125.11Zm5-4.12-2.92-3.25c1.34-1.22,2.61-2.49,3.84-3.83l3.24,2.92A56.3,56.3,0,0,1,116.81,121Zm4.58-4.63-3.24-2.93q1.8-2,3.41-4.21l3.54,2.57A58.25,58.25,0,0,1,121.39,116.36Zm4.08-5.07-3.54-2.58c.94-1.29,1.82-2.63,2.64-4l3.79,2.18C127.47,108.4,126.5,109.87,125.47,111.29Zm3.83-6-3.79-2.19c.79-1.4,1.51-2.83,2.18-4.29l4,1.77C131,102.17,130.17,103.75,129.3,105.28Zm2.64-5.28-4-1.78c.73-1.65,1.38-3.33,1.95-5.06l4.16,1.36Q133.12,97.33,131.94,100Zm2.3-6.08-4.16-1.35a54,54,0,0,0,1.4-5.25l4.29.92Q135.14,91.14,134.24,93.92Zm1.66-6.3-4.28-.91q.54-2.64.84-5.36l4.36.46C136.6,83.77,136.3,85.71,135.9,87.62Zm1-6.43-4.36-.46c.16-1.58.26-3.18.28-4.8h4.38C137.16,77.7,137.06,79.46,136.88,81.19Z" transform="translate(-12.19 -12.19)"/><path class="premium-clock-svg" d="M75.55,111.15A36.45,36.45,0,1,1,112,74.71,36.49,36.49,0,0,1,75.55,111.15Zm0-72.29A35.85,35.85,0,1,0,111.4,74.71,35.89,35.89,0,0,0,75.55,38.86Z" transform="translate(-12.19 -12.19)"/><path class="premium-clock-svg" d="M109.55,50.35a2.77,2.77,0,0,0,.89.85l5.67-3.27a3.27,3.27,0,0,0-.33-1.25l.45-.19L118,49.6l-.45.18a2.74,2.74,0,0,0-.88-.85L111,52.2a3.46,3.46,0,0,0,.33,1.25l-.45.19-1.79-3.11ZM112,54.57a2.85,2.85,0,0,0,.88.85l5.67-3.28a3.27,3.27,0,0,0-.33-1.25l.45-.19,1.8,3.11L120,54a2.85,2.85,0,0,0-.88-.85l-5.67,3.27a3.37,3.37,0,0,0,.33,1.26l-.45.19-1.8-3.11ZM95,37.82a2.75,2.75,0,0,0,1.19.29l3.27-5.67a3.46,3.46,0,0,0-.91-.92l.29-.39,3.11,1.8-.3.38A2.78,2.78,0,0,0,100.5,33l-3.27,5.67a3.19,3.19,0,0,0,.91.92l-.3.39-3.11-1.8Zm22.25,30.29a2.65,2.65,0,0,0,.34,1.17h6.54a3.1,3.1,0,0,0,.34-1.24l.49.06v3.59l-.49-.08a2.65,2.65,0,0,0-.34-1.17h-6.54a3.1,3.1,0,0,0-.34,1.25l-.49-.06V68Zm0,4.86a2.69,2.69,0,0,0,.34,1.18h6.54a3.19,3.19,0,0,0,.34-1.25L125,73v3.59l-.49-.07a2.69,2.69,0,0,0-.34-1.18h-6.54a3.19,3.19,0,0,0-.34,1.25l-.49-.06V72.9Zm0,4.87a2.65,2.65,0,0,0,.34,1.17h6.54a3.1,3.1,0,0,0,.34-1.25l.49.07v3.59l-.49-.08a2.65,2.65,0,0,0-.34-1.17h-6.54a3.1,3.1,0,0,0-.34,1.25l-.49-.07V77.76Zm-2.67,12.68a2.75,2.75,0,0,0-.29,1.19L120,95a3.46,3.46,0,0,0,.92-.91l.39.29-1.8,3.11-.38-.3a2.78,2.78,0,0,0,.29-1.19l-5.67-3.28a3.5,3.5,0,0,0-.92.92l-.39-.3,1.8-3.11ZM118,98.44a2.68,2.68,0,0,0,.78-.68l.39.29-1.73,3-.38-.31a2.75,2.75,0,0,0,.29-1.19l-6.06-1.07,4,4.71a3.5,3.5,0,0,0,.9-.9l.39.3L115,105.34l-.38-.3a2.49,2.49,0,0,0,.24-1.11l-5-6.09.39-.67Zm-15.39,16.71a2.54,2.54,0,0,0,1-.21l.19.45-3,1.73-.18-.45a3,3,0,0,0,.85-.89l-4.71-4,1.08,6.07a3.31,3.31,0,0,0,1.22-.33l.19.45-2.75,1.59-.18-.45a2.49,2.49,0,0,0,.77-.84l-1.29-7.77.68-.39Zm-21.4,8.19a2.63,2.63,0,0,0,1,.33l-.06.48H78.69l.07-.48a2.83,2.83,0,0,0,1.18-.34l-2.1-5.79-2.1,5.8a3.4,3.4,0,0,0,1.23.33l-.07.48H73.73l.07-.48a2.45,2.45,0,0,0,1.08-.34L77.66,116h.77Zm-8.17-6.9a2.78,2.78,0,0,0-1.18.34v6.55a3.27,3.27,0,0,0,1.25.34l-.06.48H69.47l.07-.48a2.83,2.83,0,0,0,1.18-.34v-6.55a3.37,3.37,0,0,0-1.25-.34l.06-.48h3.59ZM58.2,120.82a2.56,2.56,0,0,0,.69.77l-.3.39-3-1.72.3-.39a3,3,0,0,0,1.19.3l1.08-6.06-4.72,4a3.31,3.31,0,0,0,.9.89l-.3.39-2.75-1.58.31-.39a2.46,2.46,0,0,0,1.1.25l6.09-5,.68.39Zm-3.63-10.07a2.78,2.78,0,0,0-1.19-.29l-3.28,5.67a3.36,3.36,0,0,0,.92.92l-.3.39-3.11-1.79.31-.39a2.91,2.91,0,0,0,1.19.3l3.27-5.68a3.28,3.28,0,0,0-.91-.91l.29-.39,3.11,1.79Zm-4.22-2.43a2.74,2.74,0,0,0-1.18-.29l-3.28,5.67a3.46,3.46,0,0,0,.91.92l-.29.39-3.11-1.8.3-.38a2.82,2.82,0,0,0,1.19.29l3.28-5.67a3.46,3.46,0,0,0-.91-.92l.29-.39,3.11,1.8Zm-11.53-.23a2.85,2.85,0,0,0,.21,1l-.45.19-1.73-3,.46-.18a3,3,0,0,0,.88.85l4-4.71-6.07,1.08a3.75,3.75,0,0,0,.33,1.22l-.45.19L34.37,102l.46-.18a2.55,2.55,0,0,0,.83.77l7.78-1.28.39.67Zm1.89-10.53a2.64,2.64,0,0,0-.88-.85L34.16,100a3.27,3.27,0,0,0,.33,1.25l-.45.19-1.8-3.11.46-.18a2.74,2.74,0,0,0,.88.85l5.67-3.27a3.27,3.27,0,0,0-.33-1.25l.45-.19,1.8,3.11Zm-2.43-4.22a2.85,2.85,0,0,0-.88-.85l-5.67,3.28A3.27,3.27,0,0,0,32.06,97l-.45.19-1.8-3.11.46-.18a2.85,2.85,0,0,0,.88.85l5.67-3.28a3.37,3.37,0,0,0-.33-1.25l.45-.19,1.8,3.11Zm-2.43-4.21a3,3,0,0,0-.88-.85l-5.68,3.27a3.57,3.57,0,0,0,.33,1.26l-.45.19-1.79-3.11.46-.18a2.85,2.85,0,0,0,.88.85l5.67-3.28A3.27,3.27,0,0,0,34.06,86l.45-.19L36.3,89Zm-2-8.4a2.87,2.87,0,0,0-.34-1.18H26.93a3.57,3.57,0,0,0-.34,1.25l-.48-.06V77.15l.48.08a2.78,2.78,0,0,0,.34,1.17h6.55a3.27,3.27,0,0,0,.34-1.25l.49.06V80.8Zm0-4.23a1.7,1.7,0,0,0-.65-1.42l-3-2.22L27,75.16c-.28.21-.38.46-.44,1.17l-.48-.06V72.62l.48.07a1.71,1.71,0,0,0,.35,1l2.33-1.67-2.34-1.76a2.28,2.28,0,0,0-.34,1l-.48-.06v-3l.48.07a1.33,1.33,0,0,0,.49,1.13l2.79,2.1,3.32-2.4A1.71,1.71,0,0,0,33.82,68l.49.06v3.69l-.49-.07c0-.57-.08-.91-.36-1.13l-2.63,1.9,2.66,2c.23-.15.33-.53.33-1.22l.49.06v3.3Zm3.61-19.07a1.65,1.65,0,0,0,.14-1.55l-1.44-3.4-3.91.4c-.35,0-.56.21-1,.79l-.4-.29,1.83-3.16.38.3a1.76,1.76,0,0,0-.21,1.07l2.86-.29-1.15-2.69a2.28,2.28,0,0,0-.81.72L33.37,49l1.47-2.55.39.3A1.36,1.36,0,0,0,35.08,48l1.37,3.21,4.08-.41a1.76,1.76,0,0,0,1.16-.76l.39.29-1.84,3.2-.38-.31c.28-.49.38-.83.24-1.16l-3.23.34,1.31,3.07c.28,0,.55-.29.89-.89l.39.29-1.65,2.86ZM49.07,42a1.66,1.66,0,0,0,.9-1.28l.45-3.66-3.59-1.61c-.32-.14-.59-.1-1.23.2l-.19-.45,3.16-1.82.18.45a1.72,1.72,0,0,0-.71.82l2.61,1.18.35-2.9a2.2,2.2,0,0,0-1.06.22l-.19-.45,2.55-1.47.18.45c-.49.34-.69.6-.73,1l-.42,3.46,3.74,1.68a1.69,1.69,0,0,0,1.38-.08l.2.46L53.45,40l-.18-.46c.5-.28.75-.53.8-.88l-3-1.32-.41,3.31c.25.13.63,0,1.23-.32l.19.45-2.86,1.65ZM57,37.41a2.64,2.64,0,0,0,.85-.88l-3.27-5.67a3.27,3.27,0,0,0-1.25.33l-.19-.45,3.1-1.8.18.46a2.71,2.71,0,0,0-.84.88L58.86,36a3.27,3.27,0,0,0,1.25-.33l.19.46-3.11,1.79ZM66.5,33a1.69,1.69,0,0,0,1.42-.66l2.22-2.95-2.31-3.19c-.2-.28-.46-.37-1.16-.43l.06-.49h3.65l-.07.49a1.64,1.64,0,0,0-1,.35L71,28.43l1.76-2.34a2.1,2.1,0,0,0-1-.34l.06-.49h3l-.08.49a1.36,1.36,0,0,0-1.13.48L71.39,29l2.4,3.32A1.73,1.73,0,0,0,75,33l-.06.48H71.28l.07-.48c.57,0,.91-.09,1.13-.37L70.57,30l-2,2.67c.16.23.53.33,1.23.33l-.07.48H66.43Zm9.17,0a3,3,0,0,0,1.18-.34V26.09a3.19,3.19,0,0,0-1.25-.34l.06-.49h3.59l-.08.49a2.65,2.65,0,0,0-1.17.34v6.55a3.46,3.46,0,0,0,1.25.34l-.06.48H75.6Zm4.86,0a2.94,2.94,0,0,0,1.18-.34V26.09a3.1,3.1,0,0,0-1.25-.34l.06-.49h3.59l-.07.49a2.73,2.73,0,0,0-1.18.34v6.55a3.57,3.57,0,0,0,1.25.34l-.06.48H80.46Z" transform="translate(-12.19 -12.19)"/></g></svg>', |
| 3265 | ); |
| 3266 | |
| 3267 | echo $clock_faces[ $skin ]; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 3268 | } |
| 3269 | } |
| 3270 |