Changeset 3217400
- Timestamp:
- 01/06/2025 05:28:35 AM (13 months ago)
- Location:
- news-ticker-widget-for-elementor/trunk
- Files:
-
- 3 edited
-
elementor-news-ticker.php (modified) (5 diffs)
-
elements/news-ticker-widget.php (modified) (32 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
news-ticker-widget-for-elementor/trunk/elementor-news-ticker.php
r3030068 r3217400 4 4 * Plugin URI: https://flickdevs.com/elementor/ 5 5 * description: It showcases your most recent posts in a ticker style. 6 * Version: 1.3. 27 * Elementor tested up to: 3. 19.06 * Version: 1.3.3 7 * Elementor tested up to: 3.26.3 8 8 * Author: FlickDevs 9 9 * Author URI: https://flickdevs.com … … 46 46 */ 47 47 function fd_nt_elementor_load_plugin() { 48 load_plugin_textdomain(' ELEMENTORNEWTICKER_DOMAIN');48 load_plugin_textdomain('elementor-news-ticker'); 49 49 if (!did_action('elementor/loaded')) { 50 50 add_action('admin_notices', 'fd_nt_elementor_widgets_fail_load'); … … 69 69 } 70 70 $activation_url = wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin); 71 $message = '<p>' . __('Elementor News Ticker not working because you need to activate the Elementor plugin.', ELEMENTORNEWTICKER_DOMAIN) . '</p>';72 $message .= '<p>' . sprintf('<a href="%s" class="button-primary">%s</a>', $activation_url, __('Activate Elementor Now', ELEMENTORNEWTICKER_DOMAIN)) . '</p>';71 $message = '<p>' . __('Elementor News Ticker not working because you need to activate the Elementor plugin.', 'elementor-news-ticker') . '</p>'; 72 $message .= '<p>' . sprintf('<a href="%s" class="button-primary">%s</a>', $activation_url, __('Activate Elementor Now', 'elementor-news-ticker')) . '</p>'; 73 73 } else { 74 74 if (!current_user_can('install_plugins')) { … … 76 76 } 77 77 $install_url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=elementor'), 'install-plugin_elementor'); 78 $message = '<p>' . __('Elementor News Ticker not working because you need to install the Elemenor plugin', ELEMENTORNEWTICKER_DOMAIN) . '</p>';79 $message .= '<p>' . sprintf('<a href="%s" class="button-primary">%s</a>', $install_url, __('Install Elementor Now', ELEMENTORNEWTICKER_DOMAIN)) . '</p>';80 } 81 echo '<div class="error"><p>' . $message. '</p></div>';78 $message = '<p>' . __('Elementor News Ticker not working because you need to install the Elemenor plugin', 'elementor-news-ticker') . '</p>'; 79 $message .= '<p>' . sprintf('<a href="%s" class="button-primary">%s</a>', $install_url, __('Install Elementor Now', 'elementor-news-ticker')) . '</p>'; 80 } 81 echo '<div class="error"><p>' . esc_html($message) . '</p></div>'; 82 82 } 83 83 function fd_nt_elementor_fail_load_out_of_date() { … … 87 87 $file_path = 'elementor/elementor.php'; 88 88 $upgrade_link = wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file_path, 'upgrade-plugin_' . $file_path); 89 $message = '<p>' . __('Elementor News Ticker not working because you are using an old version of Elementor.', ELEMENTORNEWTICKER_DOMAIN) . '</p>';90 $message .= '<p>' . sprintf('<a href="%s" class="button-primary">%s</a>', $upgrade_link, __('Update Elementor Now', ELEMENTORNEWTICKER_DOMAIN)) . '</p>';91 echo '<div class="error">' . $message. '</div>';89 $message = '<p>' . __('Elementor News Ticker not working because you are using an old version of Elementor.', 'elementor-news-ticker') . '</p>'; 90 $message .= '<p>' . sprintf('<a href="%s" class="button-primary">%s</a>', $upgrade_link, __('Update Elementor Now', 'elementor-news-ticker')) . '</p>'; 91 echo '<div class="error">' . esc_html($message) . '</div>'; 92 92 } 93 93 if (!function_exists('_is_elementor_installed')) { -
news-ticker-widget-for-elementor/trunk/elements/news-ticker-widget.php
r3030068 r3217400 7 7 } 8 8 public function get_title() { //Function for get the name of the element. 9 return __( 'News Ticker', ELEMENTORNEWTICKER_DOMAIN);9 return __( 'News Ticker', 'elementor-news-ticker' ); 10 10 } 11 11 public function get_icon() { //Function for get the icon of the element. … … 34 34 'section_content', 35 35 [ 36 'label' => __( 'General Settings', ELEMENTORNEWTICKER_DOMAIN),36 'label' => __( 'General Settings', 'elementor-news-ticker' ), 37 37 ] 38 38 ); … … 42 42 'post_type', 43 43 [ 44 'label' => __('Source', ELEMENTORNEWTICKER_DOMAIN),44 'label' => __('Source', 'elementor-news-ticker'), 45 45 'type' => Controls_Manager::SELECT, 46 46 'options' => $post_types1, … … 76 76 'no_of_post', 77 77 [ 78 'label' => __( 'Post Number', ELEMENTORNEWTICKER_DOMAIN),78 'label' => __( 'Post Number', 'elementor-news-ticker' ), 79 79 'type' => Controls_Manager::NUMBER, 80 'default' => __( '6', ELEMENTORNEWTICKER_DOMAIN)80 'default' => __( '6', 'elementor-news-ticker' ) 81 81 ] 82 82 ); … … 84 84 'label', 85 85 [ 86 'label' => __( 'Show label', ELEMENTORNEWTICKER_DOMAIN),86 'label' => __( 'Show label', 'elementor-news-ticker' ), 87 87 'type' => Controls_Manager::SWITCHER, 88 'label_off' => __( 'Off', ELEMENTORNEWTICKER_DOMAIN),89 'label_on' => __( 'On', ELEMENTORNEWTICKER_DOMAIN),88 'label_off' => __( 'Off', 'elementor-news-ticker' ), 89 'label_on' => __( 'On', 'elementor-news-ticker' ), 90 90 'default' => 'yes', 91 91 ] … … 93 93 $this->add_control( 94 94 'label_heading', [ 95 'label' => __( 'Label', ELEMENTORNEWTICKER_DOMAIN),95 'label' => __( 'Label', 'elementor-news-ticker' ), 96 96 'type' => Controls_Manager::TEXT, 97 'default' => __( 'Latest News', ELEMENTORNEWTICKER_DOMAIN),98 'placeholder' => __( 'Latest News', ELEMENTORNEWTICKER_DOMAIN),97 'default' => __( 'Latest News', 'elementor-news-ticker'), 98 'placeholder' => __( 'Latest News', 'elementor-news-ticker' ), 99 99 'condition' => [ 100 100 'label' => 'yes', … … 105 105 'label_icon', 106 106 [ 107 'label' => __('Icon', ELEMENTORNEWTICKER_DOMAIN),107 'label' => __('Icon', 'elementor-news-ticker'), 108 108 'type' => Controls_Manager::ICONS, 109 109 'fa4compatibility' => 'icon', … … 118 118 'sep_content', 119 119 [ 120 'label' => __( 'Separator', ELEMENTORNEWTICKER_DOMAIN),120 'label' => __( 'Separator', 'elementor-news-ticker' ), 121 121 ] 122 122 ); … … 124 124 'sep_type', 125 125 [ 126 'label' => __( 'Separator Type', ELEMENTORNEWTICKER_DOMAIN),126 'label' => __( 'Separator Type', 'elementor-news-ticker' ), 127 127 'type' => Controls_Manager::SELECT, 128 128 'options' => [ 129 'icon' => __( 'Icon', ELEMENTORNEWTICKER_DOMAIN),130 'text' => __( 'Text', ELEMENTORNEWTICKER_DOMAIN),131 'fimage' => __( 'Feature Image', ELEMENTORNEWTICKER_DOMAIN),132 'pdate' => __( 'Date', ELEMENTORNEWTICKER_DOMAIN),129 'icon' => __( 'Icon', 'elementor-news-ticker' ), 130 'text' => __( 'Text', 'elementor-news-ticker' ), 131 'fimage' => __( 'Feature Image', 'elementor-news-ticker' ), 132 'pdate' => __( 'Date', 'elementor-news-ticker' ), 133 133 134 134 ], … … 139 139 'sep_icon', 140 140 [ 141 'label' => __('Icon', ELEMENTORNEWTICKER_DOMAIN),141 'label' => __('Icon', 'elementor-news-ticker'), 142 142 'type' => Controls_Manager::ICONS, 143 143 'fa4compatibility' => 'icon', … … 151 151 'sep_text', 152 152 [ 153 'label' => __( 'Text', ELEMENTORNEWTICKER_DOMAIN),153 'label' => __( 'Text', 'elementor-news-ticker' ), 154 154 'type' => Controls_Manager::TEXT, 155 'default' => __( '|', ELEMENTORNEWTICKER_DOMAIN),156 'placeholder' => __( 'Text', ELEMENTORNEWTICKER_DOMAIN),155 'default' => __( '|', 'elementor-news-ticker'), 156 'placeholder' => __( 'Text', 'elementor-news-ticker' ), 157 157 'condition' => [ 158 158 'sep_type' => 'text', … … 164 164 'animation_style', 165 165 [ 166 'label' => __('Animation', ELEMENTORNEWTICKER_DOMAIN),166 'label' => __('Animation', 'elementor-news-ticker' ), 167 167 'tab' => Controls_Manager::TAB_STYLE, 168 168 ] … … 171 171 'animation_speed', 172 172 [ 173 'label' => __( 'Animation Speed', ELEMENTORNEWTICKER_DOMAIN),173 'label' => __( 'Animation Speed', 'elementor-news-ticker' ), 174 174 'type' => Controls_Manager::NUMBER, 175 175 'dynamic' => [ 176 176 'active' => true, 177 177 ], 178 'default' => __( '50', ELEMENTORNEWTICKER_DOMAIN),178 'default' => __( '50', 'elementor-news-ticker'), 179 179 ] 180 180 ); … … 182 182 'nt_background_color', 183 183 [ 184 'label' => __( 'Background Color', ELEMENTORNEWTICKER_DOMAIN),184 'label' => __( 'Background Color', 'elementor-news-ticker' ), 185 185 'type' => Controls_Manager::COLOR, 186 186 'global' => [ … … 197 197 'label_style', 198 198 [ 199 'label' => __( 'Label', ELEMENTORNEWTICKER_DOMAIN),199 'label' => __( 'Label', 'elementor-news-ticker' ), 200 200 'tab' => Controls_Manager::TAB_STYLE, 201 201 'condition' => [ … … 207 207 'label_icon_indent', 208 208 [ 209 'label' => __( 'Icon Spacing', ELEMENTORNEWTICKER_DOMAIN),209 'label' => __( 'Icon Spacing', 'elementor-news-ticker' ), 210 210 'type' => Controls_Manager::SLIDER, 211 211 'range' => [ … … 222 222 'label_color', 223 223 [ 224 'label' => __( 'Label Color', ELEMENTORNEWTICKER_DOMAIN),224 'label' => __( 'Label Color', 'elementor-news-ticker' ), 225 225 'type' => Controls_Manager::COLOR, 226 226 'global' => [ … … 236 236 'label_background_color', 237 237 [ 238 'label' => __( 'Background Color', ELEMENTORNEWTICKER_DOMAIN),238 'label' => __( 'Background Color', 'elementor-news-ticker' ), 239 239 'type' => Controls_Manager::COLOR, 240 240 'global' => [ … … 261 261 'title_style', 262 262 [ 263 'label' => __( 'Title', ELEMENTORNEWTICKER_DOMAIN),263 'label' => __( 'Title', 'elementor-news-ticker' ), 264 264 'tab' => Controls_Manager::TAB_STYLE, 265 265 ] … … 267 267 $this->add_responsive_control('title_padding', 268 268 [ 269 'label' => esc_html__('Padding', ELEMENTORNEWTICKER_DOMAIN),269 'label' => esc_html__('Padding', 'elementor-news-ticker'), 270 270 'type' => Controls_Manager::DIMENSIONS, 271 271 'size_units' => [ 'px', 'em', '%' ], … … 286 286 'title_color', 287 287 [ 288 'label' => __( 'Title Color', ELEMENTORNEWTICKER_DOMAIN),288 'label' => __( 'Title Color', 'elementor-news-ticker' ), 289 289 'type' => Controls_Manager::COLOR, 290 290 'global' => [ … … 312 312 'icon_style', 313 313 [ 314 'label' => __( 'Icon Separator', ELEMENTORNEWTICKER_DOMAIN),314 'label' => __( 'Icon Separator', 'elementor-news-ticker' ), 315 315 'tab' => Controls_Manager::TAB_STYLE, 316 316 'condition' => [ … … 322 322 'icon_color', 323 323 [ 324 'label' => __( 'Icon Color', ELEMENTORNEWTICKER_DOMAIN),324 'label' => __( 'Icon Color', 'elementor-news-ticker' ), 325 325 'type' => Controls_Manager::COLOR, 326 326 'global' => [ … … 336 336 'icon_size', 337 337 [ 338 'label' => __( 'Icon Size', ELEMENTORNEWTICKER_DOMAIN),338 'label' => __( 'Icon Size', 'elementor-news-ticker' ), 339 339 'type' => Controls_Manager::SLIDER, 340 340 'range' => [ … … 352 352 'sep_text_style', 353 353 [ 354 'label' => __( 'Text Separator', ELEMENTORNEWTICKER_DOMAIN),354 'label' => __( 'Text Separator', 'elementor-news-ticker' ), 355 355 'tab' => Controls_Manager::TAB_STYLE, 356 356 'condition' => [ … … 362 362 'sep_text_color', 363 363 [ 364 'label' => __( 'Text Color', ELEMENTORNEWTICKER_DOMAIN),364 'label' => __( 'Text Color', 'elementor-news-ticker' ), 365 365 'type' => Controls_Manager::COLOR, 366 366 'global' => [ … … 376 376 'sep_text_bg_color', 377 377 [ 378 'label' => __( 'Background Color', ELEMENTORNEWTICKER_DOMAIN),378 'label' => __( 'Background Color', 'elementor-news-ticker' ), 379 379 'type' => Controls_Manager::COLOR, 380 380 'global' => [ … … 402 402 'sep_date_style', 403 403 [ 404 'label' => __( 'Date Separator', ELEMENTORNEWTICKER_DOMAIN),404 'label' => __( 'Date Separator', 'elementor-news-ticker' ), 405 405 'tab' => Controls_Manager::TAB_STYLE, 406 406 'condition' => [ … … 412 412 'sep_date_color', 413 413 [ 414 'label' => __( 'Color', ELEMENTORNEWTICKER_DOMAIN),414 'label' => __( 'Color', 'elementor-news-ticker' ), 415 415 'type' => Controls_Manager::COLOR, 416 416 'global' => [ … … 426 426 'sep_date_bg_color', 427 427 [ 428 'label' => __( 'Background Color', ELEMENTORNEWTICKER_DOMAIN),428 'label' => __( 'Background Color', 'elementor-news-ticker' ), 429 429 'type' => Controls_Manager::COLOR, 430 430 'global' => [ … … 517 517 <?php endif; ?> 518 518 </span> 519 <?php echo $settings['label_heading']?>519 <?php echo esc_html($settings['label_heading']); ?> 520 520 </div> 521 521 <?php } ?> 522 <div class="fd-elementor-news-ticker" id="fd-ticker-<?php echo $this->get_id(); ?>" data-speed="<?php echo $settings['animation_speed'];?>">522 <div class="fd-elementor-news-ticker" id="fd-ticker-<?php echo esc_attr($this->get_id()); ?>" data-speed="<?php echo esc_attr($settings['animation_speed']); ?>"> 523 523 <?php 524 524 foreach( $myposts as $post ) : 525 525 //setup_postdata($post); 526 526 if($settings['sep_type']=='fimage') { ?> 527 <span class="news-item-<?php echo $this->get_id();?> feature-image"> <?php echo the_post_thumbnail( array( 35,35 ) ); ?></span> 527 <span class="news-item-<?php echo esc_attr($this->get_id()); ?> feature-image"> <?php if (has_post_thumbnail()) { 528 echo get_the_post_thumbnail($post->ID, [35, 35]); 529 } ?></span> 528 530 <?php } ?> 529 <a class="top-heading news-item-<?php echo $this->get_id(); ?>" href="<?php echo get_permalink(); ?>"> <?php echo get_the_title(); ?></a>531 <a class="top-heading news-item-<?php echo esc_attr($this->get_id()); ?>" href="<?php echo esc_url(get_permalink()); ?>"> <?php echo esc_html(get_the_title()); ?></a> 530 532 <?php if (!empty ( $settings['sep_icon'] ) && $settings['sep_type']=='icon') { ?> 531 <span class="news-item-<?php echo $this->get_id(); ?> sep_icon">533 <span class="news-item-<?php echo esc_attr($this->get_id()); ?> sep_icon"> 532 534 <?php Icons_Manager::render_icon( $settings['sep_icon'], [ 'aria-hidden' => 'true' ]); ?> 533 535 </span> 534 536 <?php } if(!empty ( $settings['sep_text'] ) && $settings['sep_type']=='text'){ ?> 535 <span class="news-item-<?php echo $this->get_id(); ?> sep_text"><?php echo $settings['sep_text']; ?></span>537 <span class="news-item-<?php echo esc_attr($this->get_id()); ?> sep_text"><?php echo esc_html($settings['sep_text']) ; ?></span> 536 538 <?php 537 539 } if ($settings['sep_type']=='pdate') { ?> 538 <span class="news-item-<?php echo $this->get_id(); ?> sep_date"><?php echo get_the_date(); ?></span>540 <span class="news-item-<?php echo esc_attr($this->get_id()); ?> sep_date"><?php echo esc_html(get_the_date()); ?></span> 539 541 <?php 540 542 } … … 545 547 <script> 546 548 jQuery(document).ready(function($) { 547 jQuery("#fd-ticker-<?php echo $this->get_id(); ?>").ticker({548 speed:<?php echo $settings['animation_speed'];?>,549 jQuery("#fd-ticker-<?php echo esc_attr($this->get_id()); ?>").ticker({ 550 speed:<?php echo esc_attr($settings['animation_speed']);?>, 549 551 pauseOnHover:!0, 550 item:".news-item-<?php echo $this->get_id(); ?>"552 item:".news-item-<?php echo esc_attr($this->get_id()); ?>" 551 553 }).data("ticker"); 552 554 }); -
news-ticker-widget-for-elementor/trunk/readme.txt
r3030068 r3217400 3 3 Tags: marquee, News Headlines, news ticker, elementor news ticker, post rotator, post ticker, blog ticker, elementor addon widget 4 4 Requires at least: 5.9 5 Tested up to: 6. 4.25 Tested up to: 6.7.1 6 6 Requires PHP: 7.0 7 Stable tag: 1.3. 27 Stable tag: 1.3.3 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 58 58 == Changelog == 59 59 60 = 1.3.3 = 61 * Compatibility with latest Elementor plugin and Fixed fatal error 62 * Compatibility with latest WordPress 63 * Minor fixes 64 60 65 = 1.3.2 = 61 66 * Minor fixes
Note: See TracChangeset
for help on using the changeset viewer.