Changeset 1719995
- Timestamp:
- 08/27/2017 02:16:34 AM (9 years ago)
- Location:
- ticker-pro/trunk
- Files:
-
- 12 added
- 5 edited
-
color-picker (added)
-
color-picker/css (added)
-
color-picker/css/bootstrap-colorpicker.min.css (added)
-
color-picker/img (added)
-
color-picker/img/alpha-horizontal.png (added)
-
color-picker/img/alpha.png (added)
-
color-picker/img/hue-horizontal.png (added)
-
color-picker/img/hue.png (added)
-
color-picker/img/saturation.png (added)
-
color-picker/js (added)
-
color-picker/js/bootstrap-colorpicker-activator.js (added)
-
color-picker/js/bootstrap-colorpicker.min.js (added)
-
includes/form-handler.php (modified) (3 diffs)
-
includes/form-view.php (modified) (3 diffs)
-
includes/plugin_init.php (modified) (1 diff)
-
plugin_script.php (modified) (4 diffs)
-
ticker-pro.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ticker-pro/trunk/includes/form-handler.php
r1719156 r1719995 17 17 ); 18 18 } 19 } elseif (!empty($_POST['delete_ticker']) && !empty($_POST['ticker_id']) && is_numeric($_POST['ticker_id']) && wp_verify_nonce($_POST['ticker_pro_nonce'], 'ticker_pro_nonce_delete')) {19 }elseif (!empty($_POST['delete_ticker']) && !empty($_POST['ticker_id']) && is_numeric($_POST['ticker_id']) && wp_verify_nonce($_POST['ticker_pro_nonce'], 'ticker_pro_nonce_delete')) { 20 20 21 21 global $wpdb; … … 31 31 if (wp_verify_nonce($_POST['ticker_pro_nonce'], 'ticker_pro_nonce_options')) { 32 32 $options = $_POST['ticker_pro']; 33 34 if (empty($options['itemSpeed']) or empty($options['cursorSpeed']) or !is_numeric($options['itemSpeed']) or !is_numeric($options['cursorSpeed'])) { 35 // Cheking the user input 36 // 33 34 $options['ticker_heading_bd']=trim($options['ticker_heading_bd'],"#"); //Triming hex color code 35 36 37 if (empty($options['itemSpeed']) or empty($options['cursorSpeed']) or !is_numeric($options['itemSpeed']) or !is_numeric($options['cursorSpeed']) or !ctype_xdigit($options['ticker_heading_bd']) or strlen($options['ticker_heading_bd'])!=6) { 38 //Cheking the user input 39 37 40 // ---------Admin notice-------- 38 41 add_action('admin_notices', function() { … … 45 48 } else { 46 49 // Update options 50 51 52 47 53 isset($options['pauseOnHover']) ? $options['pauseOnHover'] = true : $options['pauseOnHover'] = false; 48 54 update_option('ticker_pro_options', $options); -
ticker-pro/trunk/includes/form-view.php
r1719156 r1719995 24 24 <h2>Ticker Pro Options</h2> 25 25 <table class="table"> 26 27 28 <tr> 29 <th> 30 <label for="ticker_heading_bd">Ticker Heading Bacgroung</label> 31 </th> 32 <td> 33 <div id="ticker_heading_bd" class="input-group colorpicker-component"> 34 <input class="form-control" type="text " required value="<?php echo $option['ticker_heading_bd'] ?>" name="ticker_pro[ticker_heading_bd]" class="form-control" /> 35 <span class="input-group-addon"><i></i></span> 36 </div> 37 </td> 38 </tr> 26 39 <tr> 27 40 <th> … … 29 42 </th> 30 43 <td> 31 <input type="" required id="itemSpeed" name="ticker_pro[itemSpeed]" value="<?php echo $option['itemSpeed'] ?>"/>44 <input type="" class="form-control" required id="itemSpeed" name="ticker_pro[itemSpeed]" value="<?php echo $option['itemSpeed'] ?>"/> 32 45 </td> 33 34 46 </tr> 35 47 <tr> 36 48 <th><label for="cursorSpeed">Ticker Cursor Speed</label></th> 37 49 <td> 38 <input id="cursorSpeed" required name="ticker_pro[cursorSpeed]" value="<?php echo $option['cursorSpeed'] ?>"/>50 <input id="cursorSpeed" class="form-control" required name="ticker_pro[cursorSpeed]" value="<?php echo $option['cursorSpeed'] ?>"/> 39 51 </td> 40 52 </tr> … … 44 56 </th> 45 57 <td> 46 <input type="checkbox" id="pauseOnHover" name="ticker_pro[pauseOnHover]" <?php echo checked($option['pauseOnHover']) ?> />58 <input class="form-control" type="checkbox" id="pauseOnHover" name="ticker_pro[pauseOnHover]" <?php echo checked($option['pauseOnHover']) ?> /> 47 59 </td> 48 60 </tr> -
ticker-pro/trunk/includes/plugin_init.php
r1719156 r1719995 41 41 'finishOnHover' => true, // Whether or not to complete the ticker item instantly when moused over 42 42 'fadeInSpeed' => 600, // Speed of the fade-in animation 43 'fadeOutSpeed' => 300 // Speed of the fade-out animation 43 'fadeOutSpeed' => 300, // Speed of the fade-out animation 44 'ticker_heading_bd'=>'ff0000' 44 45 ); 45 46 -
ticker-pro/trunk/plugin_script.php
r1719156 r1719995 8 8 wp_enqueue_style('ticker_pro_admin_css', plugin_dir_url(__FILE__) . 'css/main.css'); 9 9 wp_enqueue_style('bootstrap_admin_css', plugin_dir_url(__FILE__) . 'css/bootstrap.min.css'); 10 11 // color picker 12 wp_enqueue_style('bootstrap-colorpicker_css', plugin_dir_url(__FILE__) . 'color-picker/css/bootstrap-colorpicker.min.css'); 13 wp_enqueue_script('bootstrap-colorpicker_js', plugin_dir_url(__FILE__) . 'color-picker/js/bootstrap-colorpicker.min.js', array('jquery'), 2.5, true); 14 wp_enqueue_script('bootstrap-colorpicker_activator_js', plugin_dir_url(__FILE__) . 'color-picker/js/bootstrap-colorpicker-activator.js', array('jquery'), null, true); 10 15 } 11 16 … … 21 26 22 27 function ticker_init_script() { 23 $option = get_option('ticker_pro_options');24 $itemSpeed =$option['itemSpeed'];25 $cursorSpeed=$option['cursorSpeed'];26 $pauseOnHover=$option['pauseOnHover'];27 $pauseOnHover?$pauseOnHover='true':$pauseOnHover='false';28 // $finishOnHover=$option['finishOnHover'];29 // 30 // $fade=$option['fade=$option'];31 // $fadeInSpeed=$option['fadeInSpeed'];32 // $fadeOutSpeed=$option['fadeOutSpeed'];28 $option = get_option('ticker_pro_options'); 29 $itemSpeed = $option['itemSpeed']; 30 $cursorSpeed = $option['cursorSpeed']; 31 $pauseOnHover = $option['pauseOnHover']; 32 $pauseOnHover ? $pauseOnHover = 'true' : $pauseOnHover = 'false'; 33 $finishOnHover = $option['finishOnHover']; 34 35 $fade = $option['fade=$option']; 36 $fadeInSpeed = $option['fadeInSpeed']; 37 $fadeOutSpeed = $option['fadeOutSpeed']; 33 38 ?> 34 39 <script type="text/javascript"> 35 40 jQuery(document).ready(function () { 36 41 jQuery('.ticker').ticker( 37 {38 itemSpeed: <?php echo $itemSpeed ?>, // The pause on each ticker item before being replaced39 cursorSpeed: <?php echo $cursorSpeed ?>, // Speed at which the characters are typed40 pauseOnHover: <?php echo $pauseOnHover ?>, // Whether to pause when the mouse hovers over the ticker41 finishOnHover: true, // Whether or not to complete the ticker item instantly when moused over42 cursorOne: '_', // The symbol for the first part of the cursor43 cursorTwo: '-', // The symbol for the second part of the cursor44 fade: true, // Whether to fade between ticker items or not45 fadeInSpeed: 600, // Speed of the fade-in animation46 fadeOutSpeed: 300 // Speed of the fade-out animation47 });42 { 43 itemSpeed: <?php echo $itemSpeed ?>, // The pause on each ticker item before being replaced 44 cursorSpeed: <?php echo $cursorSpeed ?>, // Speed at which the characters are typed 45 pauseOnHover: <?php echo $pauseOnHover ?>, // Whether to pause when the mouse hovers over the ticker 46 finishOnHover: true, // Whether or not to complete the ticker item instantly when moused over 47 cursorOne: '_', // The symbol for the first part of the cursor 48 cursorTwo: '-', // The symbol for the second part of the cursor 49 fade: true, // Whether to fade between ticker items or not 50 fadeInSpeed: 600, // Speed of the fade-in animation 51 fadeOutSpeed: 300 // Speed of the fade-out animation 52 }); 48 53 }); 49 54 … … 51 56 52 57 <?php 53 54 58 } 55 59 56 add_action('wp_ head', 'ticker_init_script', 1000);60 add_action('wp_footer', 'ticker_init_script', 1000); 57 61 58 62 function ticker_style() { 63 $option = get_option('ticker_pro_options'); 64 59 65 ?> 60 66 <style> 61 67 .ticker { 62 width: 500px;68 width: 100%; 63 69 margin: 10px auto; 70 background-color: #f5f5f5; 64 71 } 65 72 /* The HTML list gets replaced with a single div, … … 69 76 display: inline; 70 77 word-wrap: break-word; 78 71 79 } 72 </style> 80 .ticker strong{ 81 background-color: #<?php echo $option['ticker_heading_bd'] ?>; 82 padding: 2px 15px; 83 border-radius: 0px 1000px 1000px 0px; 84 } 85 </style> 86 73 87 <?php 74 75 88 } 76 89 -
ticker-pro/trunk/ticker-pro.php
r1719156 r1719995 3 3 /* 4 4 Plugin Name:Ticker Pro 5 Plugin URI: https:// github.com/mirajnetxp/ticker-pro/blob/master/ticker-pro.zip5 Plugin URI: https://wordpress.org/plugins/ticker-pro/ 6 6 Description:Ticker Pro probably the simplest and lightweight ticker in the world. Which display your ticker ony any page or post. 7 Version: 2.07 Version: 3.0 8 8 Author: Md Miraj Khan 9 9 Author URI: https://www.upwork.com/o/profiles/users/_~012282969fe4714e35/ … … 47 47 require_once( TICKER_PRO_PLUGIN_DIR . '/includes/plugin_shortcode.php' ); 48 48 require_once( TICKER_PRO_PLUGIN_DIR . '/includes/form-view.php' ); 49 require_once( TICKER_PRO_PLUGIN_DIR . '/includes/plugin-options.php' );49 //require_once( TICKER_PRO_PLUGIN_DIR . '/includes/plugin-options.php' ); 50 50 51 51 … … 70 70 } 71 71 72 add_action('admin_menu', 'ticker_pro_menu'); 73 74 75 76 72 add_action('admin_menu', 'ticker_pro_menu'); 77 73 }
Note: See TracChangeset
for help on using the changeset viewer.