Ditty News Ticker - Version 2.1.24

Version Description

  • Added 'Reverse the order of the ticks' to the ticker Global Settings panel
Download this release

Release Info

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

Code changes from version 2.1.23 to 2.1.24

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.23
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.23' );
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.24
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
31
 
32
 
33
 
34
+ define( 'MTPHR_DNT_VERSION', '2.1.24' );
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' );
includes/admin/meta-boxes.php CHANGED
@@ -965,7 +965,7 @@ function mtphr_dnt_list_fields() {
965
 
966
 
967
  /* --------------------------------------------------------- */
968
- /* !Return the global values - 2.1.10 */
969
  /* --------------------------------------------------------- */
970
 
971
  if( !function_exists('mtphr_dnt_global_values') ) {
@@ -979,6 +979,7 @@ function mtphr_dnt_global_values() {
979
  'inline_title' => '',
980
  'hide' => '',
981
  'shuffle' => '',
 
982
  'width' => 0,
983
  'offset' => 20,
984
  'trim_ticks' => '',
@@ -1000,6 +1001,7 @@ function mtphr_dnt_global_values() {
1000
  'inline_title' => get_post_meta( $post->ID, '_mtphr_dnt_inline_title', true ),
1001
  'hide' => get_post_meta( $post->ID, '_mtphr_dnt_hide', true ),
1002
  'shuffle' => get_post_meta( $post->ID, '_mtphr_dnt_shuffle', true ),
 
1003
  'width' => get_post_meta( $post->ID, '_mtphr_dnt_ticker_width', true ),
1004
  'offset' => get_post_meta( $post->ID, '_mtphr_dnt_offset', true ),
1005
  'trim_ticks' => get_post_meta( $post->ID, '_mtphr_dnt_trim_ticks', true ),
@@ -1082,6 +1084,14 @@ function mtphr_dnt_global_fields() {
1082
  'label' => __('Randomly shuffle the ticks', 'ditty-news-ticker')
1083
  ),
1084
 
 
 
 
 
 
 
 
 
1085
  /* !Trim ticks - 2.0.2 */
1086
  'trim_ticks' => array(
1087
  'type' => 'checkbox',
@@ -1379,6 +1389,7 @@ function mtphr_dnt_metabox_save( $post_id ) {
1379
  $inline_title = isset($_POST['_mtphr_dnt_inline_title']) ? $_POST['_mtphr_dnt_inline_title'] : '';
1380
  $hide = isset($_POST['_mtphr_dnt_hide']) ? $_POST['_mtphr_dnt_hide'] : '';
1381
  $shuffle = isset($_POST['_mtphr_dnt_shuffle']) ? $_POST['_mtphr_dnt_shuffle'] : '';
 
1382
  $width = isset($_POST['_mtphr_dnt_ticker_width']) ? intval($_POST['_mtphr_dnt_ticker_width']) : 0;
1383
  $offset = isset($_POST['_mtphr_dnt_offset']) ? intval($_POST['_mtphr_dnt_offset']) : 20;
1384
  $trim = isset($_POST['_mtphr_dnt_trim_ticks']) ? $_POST['_mtphr_dnt_trim_ticks'] : '';
@@ -1396,6 +1407,7 @@ function mtphr_dnt_metabox_save( $post_id ) {
1396
  update_post_meta( $post_id, '_mtphr_dnt_inline_title', $inline_title );
1397
  update_post_meta( $post_id, '_mtphr_dnt_hide', $hide );
1398
  update_post_meta( $post_id, '_mtphr_dnt_shuffle', $shuffle );
 
1399
  update_post_meta( $post_id, '_mtphr_dnt_ticker_width', $width );
1400
  update_post_meta( $post_id, '_mtphr_dnt_offset', $offset );
1401
  update_post_meta( $post_id, '_mtphr_dnt_trim_ticks', $trim );
965
 
966
 
967
  /* --------------------------------------------------------- */
968
+ /* !Return the global values - 2.1.24 */
969
  /* --------------------------------------------------------- */
970
 
971
  if( !function_exists('mtphr_dnt_global_values') ) {
979
  'inline_title' => '',
980
  'hide' => '',
981
  'shuffle' => '',
982
+ 'reverse' => '',
983
  'width' => 0,
984
  'offset' => 20,
985
  'trim_ticks' => '',
1001
  'inline_title' => get_post_meta( $post->ID, '_mtphr_dnt_inline_title', true ),
1002
  'hide' => get_post_meta( $post->ID, '_mtphr_dnt_hide', true ),
1003
  'shuffle' => get_post_meta( $post->ID, '_mtphr_dnt_shuffle', true ),
1004
+ 'reverse' => get_post_meta( $post->ID, '_mtphr_dnt_reverse', true ),
1005
  'width' => get_post_meta( $post->ID, '_mtphr_dnt_ticker_width', true ),
1006
  'offset' => get_post_meta( $post->ID, '_mtphr_dnt_offset', true ),
1007
  'trim_ticks' => get_post_meta( $post->ID, '_mtphr_dnt_trim_ticks', true ),
1084
  'label' => __('Randomly shuffle the ticks', 'ditty-news-ticker')
1085
  ),
1086
 
1087
+ /* !Reverse ticks - 2.0.4 */
1088
+ 'reverse' => array(
1089
+ 'type' => 'checkbox',
1090
+ 'name' => '_mtphr_dnt_reverse',
1091
+ 'value' => $values['reverse'],
1092
+ 'label' => __('Reverse the order of the ticks', 'ditty-news-ticker')
1093
+ ),
1094
+
1095
  /* !Trim ticks - 2.0.2 */
1096
  'trim_ticks' => array(
1097
  'type' => 'checkbox',
1389
  $inline_title = isset($_POST['_mtphr_dnt_inline_title']) ? $_POST['_mtphr_dnt_inline_title'] : '';
1390
  $hide = isset($_POST['_mtphr_dnt_hide']) ? $_POST['_mtphr_dnt_hide'] : '';
1391
  $shuffle = isset($_POST['_mtphr_dnt_shuffle']) ? $_POST['_mtphr_dnt_shuffle'] : '';
1392
+ $reverse = isset($_POST['_mtphr_dnt_reverse']) ? $_POST['_mtphr_dnt_reverse'] : '';
1393
  $width = isset($_POST['_mtphr_dnt_ticker_width']) ? intval($_POST['_mtphr_dnt_ticker_width']) : 0;
1394
  $offset = isset($_POST['_mtphr_dnt_offset']) ? intval($_POST['_mtphr_dnt_offset']) : 20;
1395
  $trim = isset($_POST['_mtphr_dnt_trim_ticks']) ? $_POST['_mtphr_dnt_trim_ticks'] : '';
1407
  update_post_meta( $post_id, '_mtphr_dnt_inline_title', $inline_title );
1408
  update_post_meta( $post_id, '_mtphr_dnt_hide', $hide );
1409
  update_post_meta( $post_id, '_mtphr_dnt_shuffle', $shuffle );
1410
+ update_post_meta( $post_id, '_mtphr_dnt_reverse', $reverse );
1411
  update_post_meta( $post_id, '_mtphr_dnt_ticker_width', $width );
1412
  update_post_meta( $post_id, '_mtphr_dnt_offset', $offset );
1413
  update_post_meta( $post_id, '_mtphr_dnt_trim_ticks', $trim );
includes/functions.php CHANGED
@@ -173,7 +173,7 @@ function render_mtphr_dnt_ticker( $id='', $class='', $meta_data=false ) {
173
 
174
  // Grab the paged ticks
175
  if( $_mtphr_dnt_mode == 'list' && (isset($_mtphr_dnt_list_tick_paging) && $_mtphr_dnt_list_tick_paging) ) {
176
- $page = isset( $_GET['tickpage'] ) ? esc_html($_GET['tickpage']) : 1;
177
  $offset = ($page-1) * $_mtphr_dnt_list_tick_count;
178
  $dnt_ticks = array_slice( $dnt_ticks, $offset, $_mtphr_dnt_list_tick_count );
179
  }
173
 
174
  // Grab the paged ticks
175
  if( $_mtphr_dnt_mode == 'list' && (isset($_mtphr_dnt_list_tick_paging) && $_mtphr_dnt_list_tick_paging) ) {
176
+ $page = isset( $_GET['tickpage'] ) ? intval($_GET['tickpage']) : 1;
177
  $offset = ($page-1) * $_mtphr_dnt_list_tick_count;
178
  $dnt_ticks = array_slice( $dnt_ticks, $offset, $_mtphr_dnt_list_tick_count );
179
  }
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: 5.0
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.23 =
76
  * Escaped $_GET variables for additional security measures
77
 
@@ -476,4 +479,4 @@ The most common cause for an unresponsive ticker (when using scroll or rotate mo
476
 
477
  == Upgrade Notice ==
478
 
479
- Escaped $_GET variables for additional security measures
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: 5.0.2
7
  Stable tag: /trunk/
8
  License: GPL2
9
 
72
 
73
  == Changelog ==
74
 
75
+ = 2.1.24 =
76
+ * Added 'Reverse the order of the ticks' to the ticker Global Settings panel
77
+
78
  = 2.1.23 =
79
  * Escaped $_GET variables for additional security measures
80
 
479
 
480
  == Upgrade Notice ==
481
 
482
+ Added 'Reverse the order of the ticks' to the ticker Global Settings panel
templates/pagination.php CHANGED
@@ -8,7 +8,7 @@ if( $_mtphr_dnt_mode == 'list' && isset($_mtphr_dnt_list_tick_paging) && $_mtphr
8
 
9
  $spacing = 'margin-top:'.intval($_mtphr_dnt_list_tick_spacing).'px;';
10
  $total_pages = ceil( $_mtphr_dnt_total_ticks/$_mtphr_dnt_list_tick_count );
11
- $current_page = isset( $_GET['tickpage'] ) ? esc_html($_GET['tickpage']) : 1;
12
 
13
  $big = 999999999;
14
  $args = array(
8
 
9
  $spacing = 'margin-top:'.intval($_mtphr_dnt_list_tick_spacing).'px;';
10
  $total_pages = ceil( $_mtphr_dnt_total_ticks/$_mtphr_dnt_list_tick_count );
11
+ $current_page = isset( $_GET['tickpage'] ) ? intval($_GET['tickpage']) : 1;
12
 
13
  $big = 999999999;
14
  $args = array(