Ditty News Ticker - Version 2.1.18

Version Description

  • Fixed bug in extension license page
Download this release

Release Info

Developer metaphorcreations
Plugin Icon 128x128 Ditty News Ticker
Version 2.1.18
Comparing to
See all releases

Code changes from version 2.1.17 to 2.1.18

Files changed (3) hide show
  1. ditty-news-ticker.php +2 -2
  2. eddsl/eddsl.php +27 -4
  3. readme.txt +5 -2
ditty-news-ticker.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://dittynewsticker.com/
5
  Description: Ditty News Ticker is a multi-functional data display plugin
6
  Text Domain: ditty-news-ticker
7
  Domain Path: languages
8
- Version: 2.1.17
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
@@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31
 
32
 
33
 
34
- define( 'MTPHR_DNT_VERSION', '2.1.17' );
35
  define( 'MTPHR_DNT_DIR', trailingslashit(plugin_dir_path( __FILE__ )) );
36
  define( 'MTPHR_DNT_FILE', trailingslashit( __FILE__ ) );
37
  define( 'MTPHR_DNT_STORE_URL', 'https://www.metaphorcreations.com' );
5
  Description: Ditty News Ticker is a multi-functional data display plugin
6
  Text Domain: ditty-news-ticker
7
  Domain Path: languages
8
+ Version: 2.1.18
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
31
 
32
 
33
 
34
+ define( 'MTPHR_DNT_VERSION', '2.1.18' );
35
  define( 'MTPHR_DNT_DIR', trailingslashit(plugin_dir_path( __FILE__ )) );
36
  define( 'MTPHR_DNT_FILE', trailingslashit( __FILE__ ) );
37
  define( 'MTPHR_DNT_STORE_URL', 'https://www.metaphorcreations.com' );
eddsl/eddsl.php CHANGED
@@ -446,7 +446,7 @@ add_action( 'wp_ajax_mtphr_dnt_license_bug_dismiss', 'mtphr_dnt_license_bug_dism
446
 
447
  /**
448
  * Deactivate a license via ajax
449
- * @since 2.1.17
450
  */
451
  function mtphr_dnt_license_deactivate_ajax() {
452
 
@@ -473,6 +473,14 @@ function mtphr_dnt_license_deactivate_ajax() {
473
  if( $slug && $all_license_data[$slug] ) {
474
 
475
  $mtphr_edd_licenses = get_option( 'mtphr_edd_licenses', array() );
 
 
 
 
 
 
 
 
476
  $license = isset( $mtphr_edd_licenses[$slug] ) ? trim( $mtphr_edd_licenses[$slug] ) : '';
477
 
478
  // data to send in our API request
@@ -507,6 +515,10 @@ function mtphr_dnt_license_deactivate_ajax() {
507
  unset($mtphr_edd_license_data[$slug]);
508
  update_option( 'mtphr_edd_license_data', $mtphr_edd_license_data );
509
  }
 
 
 
 
510
  }
511
 
512
  if( $status == 'deactivated' ) {
@@ -531,7 +543,7 @@ add_action( 'wp_ajax_mtphr_dnt_license_deactivate_ajax', 'mtphr_dnt_license_deac
531
 
532
  /**
533
  * Aactivate a license via ajax
534
- * @since 2.1.17
535
  */
536
  function mtphr_dnt_license_activate_ajax() {
537
 
@@ -556,6 +568,13 @@ function mtphr_dnt_license_activate_ajax() {
556
 
557
  $all_license_data = mtphr_dnt_all_license_data();
558
  $mtphr_edd_licenses = get_option( 'mtphr_edd_licenses', array() );
 
 
 
 
 
 
 
559
 
560
  // data to send in our API request
561
  $api_params = array(
@@ -590,6 +609,10 @@ function mtphr_dnt_license_activate_ajax() {
590
  // Store the license
591
  $mtphr_edd_licenses[$slug] = $license;
592
  update_option( 'mtphr_edd_licenses', $mtphr_edd_licenses );
 
 
 
 
593
 
594
  if( $status == 'valid' ) {
595
  $message = mtphr_dnt_string('successful_activation');
@@ -613,7 +636,7 @@ add_action( 'wp_ajax_mtphr_dnt_license_activate_ajax', 'mtphr_dnt_license_activa
613
 
614
  /**
615
  * Admin footer scripts
616
- * @since 2.1.17
617
  */
618
  function mtphr_dnt_license_bug_ajax() {
619
  ?>
@@ -678,7 +701,7 @@ function mtphr_dnt_license_bug_ajax() {
678
  var data = {
679
  action: 'mtphr_dnt_license_activate_ajax',
680
  license: $input.val(),
681
- slug: $(this).data('slug'),
682
  security: '<?php echo wp_create_nonce( 'ditty-news-ticker' ); ?>'
683
  };
684
 
446
 
447
  /**
448
  * Deactivate a license via ajax
449
+ * @since 2.1.18
450
  */
451
  function mtphr_dnt_license_deactivate_ajax() {
452
 
473
  if( $slug && $all_license_data[$slug] ) {
474
 
475
  $mtphr_edd_licenses = get_option( 'mtphr_edd_licenses', array() );
476
+ $mtphr_edd_license_notices = get_option( 'mtphr_edd_license_notices', array() );
477
+ if( !is_array($mtphr_edd_licenses) ) {
478
+ $mtphr_edd_licenses = array();
479
+ }
480
+ if( !is_array($mtphr_edd_license_notices) ) {
481
+ $mtphr_edd_license_notices = array();
482
+ }
483
+
484
  $license = isset( $mtphr_edd_licenses[$slug] ) ? trim( $mtphr_edd_licenses[$slug] ) : '';
485
 
486
  // data to send in our API request
515
  unset($mtphr_edd_license_data[$slug]);
516
  update_option( 'mtphr_edd_license_data', $mtphr_edd_license_data );
517
  }
518
+ if( isset($mtphr_edd_license_notices[$slug]) ) {
519
+ unset($mtphr_edd_license_notices[$slug]);
520
+ update_option( 'mtphr_edd_license_notices', $mtphr_edd_license_notices );
521
+ }
522
  }
523
 
524
  if( $status == 'deactivated' ) {
543
 
544
  /**
545
  * Aactivate a license via ajax
546
+ * @since 2.1.18
547
  */
548
  function mtphr_dnt_license_activate_ajax() {
549
 
568
 
569
  $all_license_data = mtphr_dnt_all_license_data();
570
  $mtphr_edd_licenses = get_option( 'mtphr_edd_licenses', array() );
571
+ $mtphr_edd_license_notices = get_option( 'mtphr_edd_license_notices', array() );
572
+ if( !is_array($mtphr_edd_licenses) ) {
573
+ $mtphr_edd_licenses = array();
574
+ }
575
+ if( !is_array($mtphr_edd_license_notices) ) {
576
+ $mtphr_edd_license_notices = array();
577
+ }
578
 
579
  // data to send in our API request
580
  $api_params = array(
609
  // Store the license
610
  $mtphr_edd_licenses[$slug] = $license;
611
  update_option( 'mtphr_edd_licenses', $mtphr_edd_licenses );
612
+
613
+ // Update the license notice
614
+ $mtphr_edd_license_notices[$slug] = $slug;
615
+ update_option( 'mtphr_edd_license_notices', $mtphr_edd_license_notices );
616
 
617
  if( $status == 'valid' ) {
618
  $message = mtphr_dnt_string('successful_activation');
636
 
637
  /**
638
  * Admin footer scripts
639
+ * @since 2.1.18
640
  */
641
  function mtphr_dnt_license_bug_ajax() {
642
  ?>
701
  var data = {
702
  action: 'mtphr_dnt_license_activate_ajax',
703
  license: $input.val(),
704
+ slug: $button.attr('data-slug'),
705
  security: '<?php echo wp_create_nonce( 'ditty-news-ticker' ); ?>'
706
  };
707
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: metaphorcreations
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FUZKZGAJSBAE6
4
  Tags: ticker, news, news ticker, rotator, data rotator, lists, data
5
  Requires at least: 4.5
6
- Tested up to: 4.9.7
7
  Stable tag: /trunk/
8
  License: GPL2
9
 
@@ -72,6 +72,9 @@ The most common cause for an unresponsive ticker (when using scroll or rotate mo
72
 
73
  == Changelog ==
74
 
 
 
 
75
  = 2.1.17 =
76
  * Fixed widget ticker title bug.
77
  * Added a centralized licensing system for all extensions. Extensions will be updated soon to utilize this feature.
@@ -458,4 +461,4 @@ The most common cause for an unresponsive ticker (when using scroll or rotate mo
458
 
459
  == Upgrade Notice ==
460
 
461
- Fixed widget ticker title bug. Added centralized licensing code.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FUZKZGAJSBAE6
4
  Tags: ticker, news, news ticker, rotator, data rotator, lists, data
5
  Requires at least: 4.5
6
+ Tested up to: 4.9.8
7
  Stable tag: /trunk/
8
  License: GPL2
9
 
72
 
73
  == Changelog ==
74
 
75
+ = 2.1.18 =
76
+ * Fixed bug in extension license page
77
+
78
  = 2.1.17 =
79
  * Fixed widget ticker title bug.
80
  * Added a centralized licensing system for all extensions. Extensions will be updated soon to utilize this feature.
461
 
462
  == Upgrade Notice ==
463
 
464
+ Fixed bug in extension license page.