Changeset 1084839
- Timestamp:
- 02/08/2015 08:26:12 AM (11 years ago)
- Location:
- kush-micro-news/trunk
- Files:
-
- 5 edited
-
includes/admin.php (modified) (5 diffs)
-
includes/core.php (modified) (3 diffs)
-
index.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kush-micro-news/trunk/includes/admin.php
r1053260 r1084839 13 13 14 14 //check for plugin version and updating default 15 $d = get_plugin_data( KUSH_MICRO_NEWS_DIR.'index.php');16 if($d['Version'] == "1.4.4")//17 {18 update_option("kush_mn_load_nav_swap","true");19 }15 // $d = get_plugin_data( KUSH_MICRO_NEWS_DIR.'index.php'); 16 // if($d['Version'] == "1.4.4")// 17 // { 18 // update_option("kush_mn_load_nav_swap","true"); 19 // } 20 20 21 21 } … … 23 23 function micro_news_config_page(){ 24 24 $what=''; 25 //$_POST = array_map('stripslashes_deep', $_POST['myRename']); 25 26 if(isset($_POST['valSub'])) 26 27 { … … 34 35 } 35 36 else 36 echo _e('<h3>No of post cannot left blank.</h3>'); 37 { 38 update_option( "kush_mn_num_news",'5'); 39 echo _e('<h4>Number of post cannot left blank, reverted to default.</h4>'); 40 } 37 41 } 38 42 … … 57 61 if(isset($_POST['myRename'])) 58 62 { 63 $_POST['myRename'] = stripslashes($_POST['myRename']); 64 59 65 if($_POST['myRename']!='') 60 { update_option("kush_mn_widget_name",$_POST['myRename']);66 { update_option("kush_mn_widget_name", htmlspecialchars($_POST['myRename'])); 61 67 $what='Changes Saved !'; 62 68 } 63 else 64 echo _e('<h3>Name cannot be left blank.</h3>'); 69 else 70 { 71 update_option("kush_mn_widget_name", 'Micro News'); 72 } 73 74 } 75 76 if(isset($_POST['fullStoryText'])) 77 { 78 79 $_POST['fullStoryText'] = stripslashes($_POST['fullStoryText']); 80 81 if($_POST['fullStoryText']!='') 82 {update_option("kush_mn_read_story_text", htmlspecialchars($_POST['fullStoryText'])); 83 $what='Changes Saved !'; 84 } 85 else 86 { 87 update_option("kush_mn_read_story_text",'Read Full story »'); 88 } 89 65 90 66 91 } … … 139 164 <label for="myRename">Title over news:</label> 140 165 <input type="text" name="myRename" value="<?php echo get_option("kush_mn_widget_name");?>"/> 141 <h5 style="display:inline-block;margin:0;">(Do not use any special character like inverted commas)</h5> 142 </div> 166 <h5 style="display:inline-block;margin:0;">(Default: Micro News)</h5> 167 </div> 168 <div class="options"> 169 <label for="myRename">Full Story Text:</label> 170 <input type="text" name="fullStoryText" value="<?php echo get_option("kush_mn_read_story_text");?>"/> 171 <h5 style="display:inline-block;margin:0;">(Default: Read Full story »)</h5> 172 </div> 143 173 <div class="options"> 144 174 <label for="titleColor">Title Color:</label> -
kush-micro-news/trunk/includes/core.php
r1053230 r1084839 32 32 33 33 34 function kush_micro_news_output($no_of_news=0, $header="true",$limit=0,$onlyNews="false"){34 function kush_micro_news_output($no_of_news=0, $header="true", $limit=0, $onlyNews="false"){ 35 35 //this is responsible for displaying the final output to user site in widgets or anywhere this function is called! 36 36 //$header attribute will decide whether to show Micro News Header or not … … 43 43 $i=0;//counter for multiple colors. 44 44 if($no_of_news==0) 45 {$no_of_news=get_option( "kush_mn_num_news" );}46 $showBorder=get_option('kush_mn_show_lborder' );47 $cleanHov=get_option('kush_mn_show_linkclean' );48 $widgetName = get_option('kush_mn_widget_name' );45 {$no_of_news=get_option( "kush_mn_num_news", '5');} 46 $showBorder=get_option('kush_mn_show_lborder', 'false'); 47 $cleanHov=get_option('kush_mn_show_linkclean', 'false'); 48 $widgetName = get_option('kush_mn_widget_name', 'Micro News'); 49 49 $titleColor = get_option('kush_mn_color_title'); 50 50 $textColor = get_option('kush_mn_color_text'); 51 51 $linkColor = get_option('kush_mn_color_link'); 52 $loadNav = get_option('kush_mn_load_nav'); 53 $loadNavSwap = get_option('kush_mn_load_nav_swap'); 54 52 $loadNav = get_option('kush_mn_load_nav','true'); 53 $loadNavSwap = get_option('kush_mn_load_nav_swap','true'); 54 $readStoryText = get_option('kush_mn_read_story_text','Read Full story »'); 55 56 55 57 //way of updating news in navigation 56 58 $navStyle = ($loadNavSwap == 'true') ? 'swap' : 'append'; … … 102 104 if($cleanHov!='true')//check if show link color inverted 103 105 $output_html .='clean'; 104 $output_html .='"><a href="'.$row->url.'" title="'.$row->name.'" target="_blank" style="color:'.$linkColor.'"> Read Full story »</a></span>';106 $output_html .='"><a href="'.$row->url.'" title="'.$row->name.'" target="_blank" style="color:'.$linkColor.'">'.$readStoryText.'</a></span>'; 105 107 endif; 106 108 -
kush-micro-news/trunk/index.php
r1053260 r1084839 3 3 Plugin Name: Kush Micro News 4 4 Description: Spread the news in shortest possible way. Use links to refer data and title to concise it. 5 Version: 1.5. 15 Version: 1.5.2 6 6 Author: Kush Sharma 7 7 Author Email: thekushsharma@gmail.com 8 8 Author URI: http://softnuke.com/ 9 9 Plugin URI: https://github.com/kushsharma/micro-news 10 Last Officially Updated: 24 December 201410 Last Officially Updated: 08 Feb 2015 11 11 */ 12 12 … … 174 174 add_option('kush_mn_load_nav','false'); 175 175 add_option('kush_mn_load_nav_swap','true'); 176 176 add_option('kush_mn_read_story_text','Read Full story »'); 177 177 } 178 178 kush_mn_install(); -
kush-micro-news/trunk/readme.txt
r1053260 r1084839 5 5 Requires at least: 3.0.1 6 6 Tested up to: 4.1 7 Stable tag: 1.5. 17 Stable tag: 1.5.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 83 83 84 84 == Changelog == 85 86 = 1.5.2 = 87 * Added option to change text of "Read Full Story". 85 88 86 89 = 1.5.1 = -
kush-micro-news/trunk/uninstall.php
r1053230 r1084839 17 17 delete_option('kush_mn_load_nav'); 18 18 delete_option('kush_mn_load_nav_swap'); 19 delete_option('kush_mn_read_story_text'); 19 20 20 21 global $wpdb;
Note: See TracChangeset
for help on using the changeset viewer.