Version Description
- Removed type & mode selections from accidentally showing up in other post types
Download this release
Release Info
Developer | metaphorcreations |
Plugin | Ditty News Ticker |
Version | 1.3.4 |
Comparing to | |
See all releases |
Code changes from version 1.3.3 to 1.3.4
- ditty-news-ticker.php +3 -3
- includes/meta-boxes.php +54 -51
- readme.txt +4 -1
ditty-news-ticker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Ditty News Ticker
|
4 |
Plugin URI: http://dittynewsticker.com/
|
5 |
Description: Ditty News Ticker is a multi-functional data display plugin
|
6 |
-
Version: 1.3.
|
7 |
Author: Metaphor Creations
|
8 |
Author URI: http://www.metaphorcreations.com
|
9 |
License: GPL2
|
@@ -45,9 +45,9 @@ The icons are licensed under a Creative Commons Attribution
|
|
45 |
* @since 1.2.1
|
46 |
*/
|
47 |
if ( WP_DEBUG ) {
|
48 |
-
define ( 'MTPHR_DNT_VERSION', '1.3.
|
49 |
} else {
|
50 |
-
define ( 'MTPHR_DNT_VERSION', '1.3.
|
51 |
}
|
52 |
define ( 'MTPHR_DNT_DIR', plugin_dir_path(__FILE__) );
|
53 |
define ( 'MTPHR_DNT_URL', plugins_url().'/ditty-news-ticker' );
|
3 |
Plugin Name: Ditty News Ticker
|
4 |
Plugin URI: http://dittynewsticker.com/
|
5 |
Description: Ditty News Ticker is a multi-functional data display plugin
|
6 |
+
Version: 1.3.4
|
7 |
Author: Metaphor Creations
|
8 |
Author URI: http://www.metaphorcreations.com
|
9 |
License: GPL2
|
45 |
* @since 1.2.1
|
46 |
*/
|
47 |
if ( WP_DEBUG ) {
|
48 |
+
define ( 'MTPHR_DNT_VERSION', '1.3.4-'.time() );
|
49 |
} else {
|
50 |
+
define ( 'MTPHR_DNT_VERSION', '1.3.4' );
|
51 |
}
|
52 |
define ( 'MTPHR_DNT_DIR', plugin_dir_path(__FILE__) );
|
53 |
define ( 'MTPHR_DNT_URL', plugins_url().'/ditty-news-ticker' );
|
includes/meta-boxes.php
CHANGED
@@ -559,66 +559,69 @@ function mtphr_dnt_display_metabox() {
|
|
559 |
|
560 |
|
561 |
/* --------------------------------------------------------- */
|
562 |
-
/* !Add the main ticker options - 1.3.
|
563 |
/* --------------------------------------------------------- */
|
564 |
|
565 |
function mtphr_dnt_option_buttons() {
|
566 |
|
567 |
-
global $post;
|
568 |
-
|
569 |
-
$types = mtphr_dnt_types_array();
|
570 |
-
$type = get_post_meta( $post->ID, '_mtphr_dnt_type', true );
|
571 |
-
$type = ( $type != '' ) ? $type : 'default';
|
572 |
|
573 |
-
$
|
574 |
-
$mode = get_post_meta( $post->ID, '_mtphr_dnt_mode', true );
|
575 |
-
$type = ( $type != '' ) ? $type : 'scroll';
|
576 |
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
echo '</div>';
|
597 |
-
echo '</
|
598 |
-
echo '</td>';
|
599 |
-
|
600 |
-
echo '<td id="ditty-news-ticker-mode-select">';
|
601 |
-
echo '<div class="wrapper">';
|
602 |
-
echo '<h2>'.__('Ticker Mode', 'ditty-news-ticker').'</h2>';
|
603 |
-
echo '<p>'.__('Select the mode of the ticker', 'ditty-news-ticker').'</p>';
|
604 |
-
echo '<div class="mtphr-dnt-metabox-toggle">';
|
605 |
-
echo '<input type="hidden" name="_mtphr_dnt_mode" value="'.$mode.'" />';
|
606 |
-
foreach( $modes as $i=>$m ) {
|
607 |
-
|
608 |
-
$value = '';
|
609 |
-
$button = $m['button'];
|
610 |
-
$metaboxes = $m['metaboxes'];
|
611 |
-
$metabox_list = join( ',', $metaboxes );
|
612 |
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
617 |
echo '</div>';
|
618 |
-
echo '</
|
619 |
-
echo '</
|
620 |
-
echo '</
|
621 |
-
|
622 |
}
|
623 |
add_action( 'edit_form_after_title', 'mtphr_dnt_option_buttons' );
|
624 |
|
559 |
|
560 |
|
561 |
/* --------------------------------------------------------- */
|
562 |
+
/* !Add the main ticker options - 1.3.4 */
|
563 |
/* --------------------------------------------------------- */
|
564 |
|
565 |
function mtphr_dnt_option_buttons() {
|
566 |
|
567 |
+
global $post, $typenow;
|
|
|
|
|
|
|
|
|
568 |
|
569 |
+
if( $typenow == 'ditty_news_ticker' ) {
|
|
|
|
|
570 |
|
571 |
+
$types = mtphr_dnt_types_array();
|
572 |
+
$type = get_post_meta( $post->ID, '_mtphr_dnt_type', true );
|
573 |
+
$type = ( $type != '' ) ? $type : 'default';
|
574 |
+
|
575 |
+
$modes = mtphr_dnt_modes_array();
|
576 |
+
$mode = get_post_meta( $post->ID, '_mtphr_dnt_mode', true );
|
577 |
+
$type = ( $type != '' ) ? $type : 'scroll';
|
578 |
+
|
579 |
+
echo '<table id="ditty-news-ticker-settings-select">';
|
580 |
+
echo '<tr>';
|
581 |
+
echo '<td id="ditty-news-ticker-type-select">';
|
582 |
+
echo '<div class="wrapper">';
|
583 |
+
echo '<h2>'.__('Ticker Type', 'ditty-news-ticker').' <a href="http://dittynewsticker.com" target="_blank"><small>'.__('View all types', 'ditty-news-ticker').'</small></a></h2>';
|
584 |
+
echo '<p>'.__('Select the type of ticker you\'d like to use', 'ditty-news-ticker').'</p>';
|
585 |
+
echo '<div class="mtphr-dnt-metabox-toggle">';
|
586 |
+
echo '<input type="hidden" name="_mtphr_dnt_type" value="'.$type.'" />';
|
587 |
+
foreach( $types as $i=>$t ) {
|
588 |
+
|
589 |
+
$value = '';
|
590 |
+
$button = $t['button'];
|
591 |
+
$metaboxes = $t['metaboxes'];
|
592 |
+
$metabox_list = join( ',', $metaboxes );
|
593 |
+
|
594 |
+
// Create a button
|
595 |
+
$selected = ( $type == $i ) ? ' button-primary' : '';
|
596 |
+
echo '<a href="'.$i.'" metaboxes="'.$metabox_list.'" class="mtphr-dnt-metaboxer-metabox-toggle button'.$selected.'">'.$button.'</a> ';
|
597 |
+
}
|
598 |
+
echo '</div>';
|
599 |
echo '</div>';
|
600 |
+
echo '</td>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
601 |
|
602 |
+
echo '<td id="ditty-news-ticker-mode-select">';
|
603 |
+
echo '<div class="wrapper">';
|
604 |
+
echo '<h2>'.__('Ticker Mode', 'ditty-news-ticker').'</h2>';
|
605 |
+
echo '<p>'.__('Select the mode of the ticker', 'ditty-news-ticker').'</p>';
|
606 |
+
echo '<div class="mtphr-dnt-metabox-toggle">';
|
607 |
+
echo '<input type="hidden" name="_mtphr_dnt_mode" value="'.$mode.'" />';
|
608 |
+
foreach( $modes as $i=>$m ) {
|
609 |
+
|
610 |
+
$value = '';
|
611 |
+
$button = $m['button'];
|
612 |
+
$metaboxes = $m['metaboxes'];
|
613 |
+
$metabox_list = join( ',', $metaboxes );
|
614 |
+
|
615 |
+
// Create a button
|
616 |
+
$selected = ( $mode == $i ) ? ' button-primary' : '';
|
617 |
+
echo '<a href="'.$i.'" metaboxes="'.$metabox_list.'" class="mtphr-dnt-metaboxer-metabox-toggle button'.$selected.'">'.$button.'</a> ';
|
618 |
+
}
|
619 |
+
echo '</div>';
|
620 |
echo '</div>';
|
621 |
+
echo '</td>';
|
622 |
+
echo '</tr>';
|
623 |
+
echo '</table>';
|
624 |
+
}
|
625 |
}
|
626 |
add_action( 'edit_form_after_title', 'mtphr_dnt_option_buttons' );
|
627 |
|
readme.txt
CHANGED
@@ -52,6 +52,9 @@ Each individual Ticker post has multiple settings to customize.
|
|
52 |
|
53 |
== Changelog ==
|
54 |
|
|
|
|
|
|
|
55 |
= 1.3.3 =
|
56 |
* Moved type & mode selections out of metaboxes
|
57 |
* Added a default tick to the mixed type
|
@@ -173,4 +176,4 @@ Each individual Ticker post has multiple settings to customize.
|
|
173 |
|
174 |
== Upgrade Notice ==
|
175 |
|
176 |
-
|
52 |
|
53 |
== Changelog ==
|
54 |
|
55 |
+
= 1.3.4 =
|
56 |
+
* Removed type & mode selections from accidentally showing up in other post types
|
57 |
+
|
58 |
= 1.3.3 =
|
59 |
* Moved type & mode selections out of metaboxes
|
60 |
* Added a default tick to the mixed type
|
176 |
|
177 |
== Upgrade Notice ==
|
178 |
|
179 |
+
Removed type & mode selections from accidentally showing up in other post types
|