Changeset 2955166
- Timestamp:
- 08/18/2023 04:11:46 AM (12 months ago)
- Location:
- carousel-slider/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
carousel-slider/trunk/carousel-slider.php
r2949400 r2955166 4 4 * Plugin URI: https://sayfulislam.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash 5 5 * Description: <strong>Carousel Slider</strong> allows you to create beautiful, touch enabled, responsive carousels and sliders. It let you create SEO friendly Image carousel from Media Library or from custom URL, Video carousel using Youtube and Vimeo video, Post carousel, Hero banner slider and various types of WooCommerce products carousels. 6 * Version: 2.2. 26 * Version: 2.2. 7 7 * Author: Sayful Islam 8 8 * Author URI: https://sayfulislam.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash … … 53 53 * @var string 54 54 */ 55 private $version = '2.2. 2';55 private $version = '2.2.'; 56 56 57 57 /** -
carousel-slider/trunk/includes/Admin/Feedback.php
r2841739 r2955166 42 42 43 43 add_action( 'wp_ajax_carousel_slider_deactivate_feedback', [ self::$instance, 'deactivate_feedback' ] ); 44 44 45 45 46 add_action( 'admin_notices', [ self::$instance, 'admin_notice' ] ); 46 add_action( 'admin_init', [ self::$instance, 'handle_optin_optout' ] );47 47 48 48 add_filter( 'cron_schedules', [ self::$instance, 'add_weekly_schedule' ] ); … … 56 56 * Add weekly cron schedule 57 57 * 58 * @param array $schedulesList of schedules.58 * @param List of schedules. 59 59 * 60 60 * @return array … … 91 91 */ 92 92 public function deactivate_feedback() { 93 if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], '_carousel_slider_deactivate_feedback_nonce' ) ) { 93 if ( ! isset( $_POST['_wpnonce'] ) || 94 ! wp_verify_nonce( $_POST['_wpnonce'], '_carousel_slider_deactivate_feedback_nonce' ) 95 ) { 94 96 wp_send_json_error(); 95 97 } … … 159 161 'not_working' => [ 160 162 'title' => esc_html__( 'I couldn\'t get the plugin to work', 'carousel-slider' ), 161 'input_placeholder' => esc_html__( 'Could you tell us a bit more whats not working?', 'carousel-slider' ), 163 'input_placeholder' => esc_html__( 164 'Could you tell us a bit more whats not working?', 165 'carousel-slider' 166 ), 162 167 ], 163 168 'missing_a_feature' => [ … … 171 176 'carousel_slider_pro' => [ 172 177 'title' => esc_html__( 'I have Carousel Slider Pro', 'carousel-slider' ), 173 'alert' => esc_html__( 'Wait! Don\'t deactivate Carousel Slider. You have to activate both Carousel Slider and Carousel Slider Pro in order for the plugin to work.', 'carousel-slider' ), 178 'alert' => esc_html__( 179 'Wait! Don\'t deactivate Carousel Slider. You have to activate both Carousel Slider and Carousel Slider Pro in order for the plugin to work.', 180 'carousel-slider' 181 ), 174 182 ], 175 183 'other' => [ … … 190 198 191 199 <div class="feedback-dialog__form-caption"> 192 <?php echo esc_html__( 'If you have a moment, please share why you are deactivating Carousel Slider:', 'carousel-slider' ); ?> 200 <?php 201 echo esc_html__( 202 'If you have a moment, please share why you are deactivating Carousel Slider:', 203 'carousel-slider' 204 ); 205 ?> 193 206 </div> 194 207 <div class="feedback-dialog__form-body"> … … 203 216 <?php if ( ! empty( $reason['input_placeholder'] ) ) : ?> 204 217 <textarea 205 class="carousel-slider-feedback-text"206 name="reason_<?php echo esc_attr( $reason_key ); ?>"207 placeholder="<?php echo esc_attr( $reason['input_placeholder'] ); ?>"208 rows="2"218 class="carousel-slider-feedback-text" 219 name="reason_<?php echo esc_attr( $reason_key ); ?>" 220 placeholder="<?php echo esc_attr( $reason['input_placeholder'] ); ?>" 221 rows="2" 209 222 ></textarea> 210 223 <?php endif; ?> … … 237 250 238 251 /** 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 239 269 * Show tracker notice to admin 240 270 * … … 250 280 251 281 /* translators: 1 - Plugin name */ 252 $message = sprintf( __( 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.', 'carousel-slider' ), 'Carousel Slider' ); 253 254 $message .= ' (<a class="carousel-slider-insights-data-we-collect" href="#">' . __( 'what we collect', 'carousel-slider' ) . '</a>)'; 255 $message .= '<p class="description" style="display:none;">' . implode( ', ', $this->data_we_collect() ) . '. No sensitive data is tracked. '; 282 $message = sprintf( 283 __( 284 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.', 285 'carousel-slider' 286 ), 287 'Carousel Slider' 288 ); 289 290 $message .= ' (<a class="carousel-slider-insights-data-we-collect" href="#">' . __( 291 'what we collect', 292 'carousel-slider' 293 ) . '</a>)'; 294 $message .= '<p class="description" style="display:none;">' . implode( 295 ', ', 296 $this->data_we_collect() 297 ) . '. No sensitive data is tracked. '; 256 298 $message .= '<a href="' . Api::PRIVACY_URL . '" target="_blank">Learn more</a> about how Carousel Slider collects and handle your data.</p>'; 257 299 258 $optin_url = add_query_arg( 'carousel_slider_tracker_optin', 'true');259 $optout_url = add_query_arg( 'carousel_slider_tracker_optout', 'true');300 $optin_url = ); 301 $optout_url = ); 260 302 261 303 $html = '<div class="updated"><p>'; 262 304 $html .= $message; 263 305 $html .= '</p><p class="submit">'; 264 $html .= ' <a href="' . esc_url( $optin_url ) . '" class="button-primary button-large">' . __( 'Allow', 'carousel-slider' ) . '</a>'; 265 $html .= ' <a href="' . esc_url( $optout_url ) . '" class="button-secondary button-large">' . __( 'No thanks', 'carousel-slider' ) . '</a>'; 306 $html .= ' <a href="' . esc_url( $optin_url ) . '" class="button-primary button-large">' . __( 307 'Allow', 308 'carousel-slider' 309 ) . '</a>'; 310 $html .= ' <a href="' . esc_url( $optout_url ) . '" class="button-secondary button-large">' . __( 311 'No thanks', 312 'carousel-slider' 313 ) . '</a>'; 266 314 $html .= '</p></div>'; 267 315 … … 283 331 */ 284 332 public function handle_optin_optout() { 285 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 286 if ( isset( $_GET['carousel_slider_tracker_optin'] ) && 'true' === $_GET['carousel_slider_tracker_optin'] ) { 287 $this->optin(); 288 289 // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect 290 wp_redirect( remove_query_arg( 'carousel_slider_tracker_optin' ) ); 291 exit; 292 } 293 294 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 295 if ( isset( $_GET['carousel_slider_tracker_optout'] ) && 'true' === $_GET['carousel_slider_tracker_optout'] ) { 296 $this->optout(); 297 298 // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect 299 wp_redirect( remove_query_arg( 'carousel_slider_tracker_optout' ) ); 300 exit; 333 if ( 334 current_user_can( 'manage_options' ) && 335 isset( $_GET['_token'] ) && 336 wp_verify_nonce( $_GET['_token'], 'carousel_slider_tracker' ) 337 ) { 338 if ( isset( $_GET['carousel_slider_tracker_optin'] ) && 'true' === $_GET['carousel_slider_tracker_optin'] ) { 339 $this->optin(); 340 341 wp_safe_redirect( admin_url() ); 342 exit; 343 } 344 345 if ( isset( $_GET['carousel_slider_tracker_optout'] ) && 'true' === $_GET['carousel_slider_tracker_optout'] ) { 346 $this->optout(); 347 348 wp_safe_redirect( admin_url() ); 349 exit; 350 } 301 351 } 302 352 } … … 411 461 * Send tracking data to server 412 462 * 413 * @param boolean $overrideRe-sent even if it is already sent data.463 * @param Re-sent even if it is already sent data. 414 464 * 415 465 * @return void -
carousel-slider/trunk/readme.txt
r2949401 r2955166 6 6 Tested up to: 6.3 7 7 Requires PHP: 7.0 8 Stable tag: 2.2. 28 Stable tag: 2.2. 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.txt … … 97 97 == Changelog == 98 98 99 100 101 99 102 = version 2.2.2 - 2023-08-08 = 100 103 * Dev - Tested with WordPress 6.3 and WooCommerce 7.9
Note: See TracChangeset
for help on using the changeset viewer.