变更集1763638
时间戳: 2017年11月11日上午09:57:56 ( 7年 (之前) 位置: ultimate-news-plus-widget/trunk 文件夹: -
添加了2个 1个已删除 4已编辑
-
资产/css/ccs-news-style.css (已修改) ( 1个差异 ) -
ccs-ultimate-news-plus-widget.php (已修改) ( 3个差异 ) -
包括/widgets/ccs-unpw-news-list-widget.php (已修改) ( 1个差异 ) -
包括/widgets/ccs-unpw-news-thumb-widget.php (已删除) -
自述.txt (已修改) ( 5个差异 ) -
模板/news-list-widget.php (新增) -
模板/news-thumb-list-widget.php (新增)
图例:
未修改 补充 远离的
-
ultimate-news-plus-widget/trunk/assets/css/ccs-news-style.css 1754671元 1763638兰特 130 130 131 131 /*带拇指的小部件*/ 132 .ccs_Unpw_News_thmb_Widget.ccs-Unpw-recent-News-items.ccs-Unpw-News-li{padding:10px 0!important;clear:border-bottom:1px solid#ddd;margin:0!importable;list-style:none!importance;display:table;} 133 .ccs_Unpw_News_thmb_Widget.ccs-Unpw-recent-News-items.ccs-Unpw-News-li:last-child{border-bottom:none;} 134 .ccs_Unpw_News_thmb_Widget.ccs-Unpw-recent-News-items.ccs-Unpw-News-thumb-left{垂直对齐:顶部;宽度:90px;高度:90px;} 135 .ccs_Unpw_News_thmb_Widget.ccs取消剪切最近的新闻项目.ccs取消剪切新闻拇指左侧img{高度:100%!重要;宽度:100%!重要;对象适合度:封面;对象位置:顶部中心;边界半径:0;框阴影:无;线高度:正常;} 136 .ccs_Unpw_News_thmb_Widget.ccs-Unpw-recent-News-items.ccs-Unpw-News-thumb-left一个{display:block;} 137 .ccs_Unpw_News_thmb_Widget.ccs-Unpw-recent-News-items.ccs-Unpw-News-thumb-right{padding-left:10px;} 138 .ccs_Unpw_News_thmb_Widget.ccs-Unpw-recent-News-items.ccs-Unpw-News-thumb-right{display:table-cell;vertical-align:top;} 139 .ccs_Unpw_News_thmb_Widget.ccs-Unpw-recent-News-items.ccs-Unpw-News-thumb-right一个{color:#444;} 132 .ccs-unpw-recent-news-items.ccs-unpw-news-li{padding:10px 0!important;clear:bother-bottom:1px solid#ddd;margin:0!importance;list-style:none!importent;display:table;} 133 .ccs-unpw-recent-news-items.ccs-unpw-news-l:最后一个子项{border-bottom:无;} 134 .ccs取消剪切最近的新闻项目。ccs取消剪切新闻拇指左{垂直对齐:顶部;宽度:90px;高度:90px;浮动:左侧;} 135 .ccs-unpw-recent-news-items.ccs-unpw-news-thumb-left img{height:100%!important;width:100%!importate;object-fit:cover;object-position:顶部中心;border-radius:0;box-shadow:无;line-height:正常;} 136 .ccs-unpw-recent-news-items.ccs-unpw-news-thumb-left a{display:block;} 137 .ccs取消剪切最近的新闻项目。ccs取消剪切新闻拇指左a:悬停{box shadow:none;} 138 .ccs-unpw-recent-news-items.ccs-unpw-news-thumb-right{padding-left:10px;} 139 .ccs-unpw-recent-news-items.ccs-unpw-news-thumb-right{显示:表格-单元格;垂直对齐:顶部;} 140 .ccs-unpw-recent-news-items.ccs-unpw-news-thumb-right一个{color:#444;} 141 .ccs-unpw-recent-news-items ul li.ccs-unipw-news-li{float:左;} -
ultimate-news-plus-widget/trunk/ccs-ultimate-news-plus-widget.php 1754671元 1763638兰特 4 4 插件URI: http://www.conceptcorners.com/ 5 5 描述:一个简单的Ultimate News Plus Widgets插件。 用最新的新闻设计显示新闻。 6 版本:2。 0 6 版本:2。 1 7 7 作者:概念角 8 8 作者URI: http://www.conceptcorners.com/ … … 10 10 11 11 if(!已定义('CCS_UNPW_VERSION')){ 12 define('CCS_UNPW_VERSION','2。 0 ' ); // 插件版本 12 define('CCS_UNPW_VERSION','2。 1 ' ); // 插件版本 13 13 } 14 14 if(!已定义('CCS_UNPW_DIR')){ … … 84 84 //小工具类 85 85 require_once(CCS_UNPW_DIR.'/includes/widgets/CCS-UNPW-news-list-widget.php'); 86 require_once(CCS_UNPW_DIR.'/includes/widgets/CCS-UNPW-news-thumb-widget.php'); -
ultimate-news-plus-widget/trunk/includes/widgets/ccs-unpw-news-list-widget.php 741117卢比 1763638兰特 1 <? php类ccs_Unpw_News_Widget扩展了WP_Widget{ 2 1 <? php(电话) 2 /** 三 *小工具API:最新新闻小工具类 4 * 5 *@package Ultimate News Plus小工具 6 *@自1.0起 7 */ 8 9 //直接访问时退出 10 如果(!defined('ABSPATH'))退出; 11 12 /*注册小部件*/ 13 函数ccs_unpw_widget_load_widgets(){ 14 注册表小部件(“Ccs_Unpw_News_widget”); 15 } 16 17 /*加载小部件*/ 18 add_action(“widgets_init”,“ccs_unpw_widget_load_widgets”); 19 20 类Ccs_Unpw_News_Widget扩展了WP_Widget{ 21 22 /** 23 *设置新的小部件实例。 24 * 25 *@package Ultimate News Plus小工具 26 *@自1.0起 27 */ 三 28 函数__construct(){ 4 29 5 30 $widget_ops=数组('classname'=>'ccs_unpw_News_widget','description'=>__('在侧栏中显示新闻中的最新新闻项目','ccs-ultimate-News-plus-widget'); 6 $control_ops=数组('width'=>350,'height'=>450,'id_base'=>'ccs_unpw_news_widget'); 7 父项::__construct('ccs_unpw_news_widget',__('ccs-最新新闻小部件','ccs-ultimate-news-plus-widget]),$widget_ops,$control_ops); 8 } 9 31 父项::__construct('ccs_unpw_news_widget',__('ccs-最新新闻小部件','ccs-ultimate-news-plus-widget]),$widget_ops); 32 } 33 34 /** 35 *处理当前小部件实例的更新设置。 36 * 37 *@package Ultimate News Plus小工具 38 *@自1.0起 39 */ 40 函数更新($new_instance,$old_instance){ 41 42 $instance=$old_instance; 43 44 $instance['title']=清理文本字段($new_instance['标题']); 45 $instance['num_items']=$new_instance['num_iems']; 46 $instance['date']=! 空($new_instance['date'])? 1 : 0; 47 $instance['show_category']=! 空($new_instance['show_category'])? 1 : 0; 48 $instance['category']=intval($new_instance['类别']); 49 $instance['list_type']=$new_instance['列表类型']; 50 return$instance; 51 } 52 53 /** 54 *输出小部件的设置表单。 55 * 56 *@package Ultimate News Plus小工具 57 *@自1.0起 58 */ 10 59 函数形式($instance){ 11 60 $defaults=数组( 12 ' 限制' => 5, 13 “标题”=> '' , 14 “日期”=> 假 , 15 “show_category”=> 假 , 61 ' num_items(项数) => 5, 62 “标题”=> __(“最新新闻”,“ccs-ultimate-News-plus-widget”) , 63 “日期”=> 0 , 64 “show_category”=> 0 , 16 65 “类别”=>0, 66 “list_type”=>“新闻列表”, 17 67 ); 18 68 19 69 $instance=wp_parse_args((数组)$instance,$defaults); 20 $title=isset($instance['title'])? esc_attr($instance['title']):''; 21 $num_items=isset($instance['num_items'])? absint($instance['num_items']):5; 22 ?> 23 <p><label for=“<?php echo$this->get_field_id('title');?>”><? php_e(“标题:”,“ccs-ultimate-news-plus-widget”);?>< 输入class=“widefat”id=“<?php echo$this->get_field_id('title');?>”name=“<?hp echo$this->get_field_name('title');”>“type=”text“value=”<?php-echo esc_attr($title);?>>“/></label></p> 24 <p><label for=“<?php echo$this->get_field_id('num_items');?>”><? php_e(“项目数:”,“ccs-ultimate-news-plus-widget”);?> <input class=“widefat”id=“<?php echo$this->get_field_id('num_items');?>”name=“<?hp echo$this->get_field_name('num _items`);?”type=“text”value=“<?php echo esc_attr($num_items);?>>“/></label></p> 70 ?> 71 <!-- 标题--> 25 72 <p> 26 <input id=“<?php echo$this->get_field_id('date');?>”name=“<?php echo$this->get_field_name('date]);?”type=“checkbox”<? php已检查($instance['date'],1);?>/> 73 <label for=“<?php echo$this->get_field_id('title');?>”><? php_e(“标题:”,“ccs-ultimate-news-plus-widget”);?> 74 <input class=“widefat”id=“<?php echo$this->get_field_id('title');?>”name=“<?hp echo$this->get_field_name('title');”>“type=”text“value=”<?php-echo esc_attr($instance['title']);?>>“/> 75 </label> 76 </p> 77 78 <!-- 新闻数量--> 79 <p> 80 <label for=“<?php echo$this->get_field_id('num_items');?>”><? php_e(“项目数:”,“ccs-ultimate-news-plus-widget”);?> 81 <input class=“widefat”id=“<?php echo$this->get_field_id('num_items');?>”name=“<?hp echo$this->get _field_name('num _items`);?”type=“number”min=“1”value=“<?php echo$1instance['num _ items'];?>“/> 82 </label> 83 </p> 84 85 <!-- 日期--> 86 <p> 87 <input id=“<?php echo$this->get_field_id('date');?>”name=“<?php echo$this->get_field_name('date]);?”type=“checkbox”value=“1”<? php已检查($instance['date'],1);?>/> 27 88 <label for=“<?php echo$this->get_field_id('date');?>”><? php_e(“显示日期”,“ccs-ultimate-news-plus-widget”);?></ 标签> 28 89 </p> 29 <p> 30 <input id=“<?php echo$this->get_field_id('show_category');?>”name=“<?php echo$this->get_field_name('show _category');“?>”type=“checkbox”<? php已检查($instance['show_category'],1);?>/> 90 91 <!-- 显示类别--> 92 <p> 93 <input id=“<?php echo$this->get_field_id('show_category');?>”name=“<?php echo$this->get_field_name('show _category');“?>”type=“checkbox”value=“1”? php已检查($instance['show_category'],1);?>/> 31 94 <label for=“<?php echo$this->get_field_id('show_category');?>”><? php_e(“显示类别”,“ccs-ultimate-news-plus-widget”);?></ 标签> 32 95 </p> 96 97 <!-- 类别--> 33 98 <p> 34 99 <label for=“<?php echo$this->get_field_id('类别');?>”><? php_e(“类别:”,“ccs终极新闻加小部件”);?></ 标签> 35 100 <? php(电话) 36 $ 下拉列表 _args=阵列( 37 “分类法” =>CCS_UNPW_CAT, 38 “类” =>“宽默认”, 39 '显示选项_全部' =>__('All','ccs-ultimate-news-plus-widget'), 40 “id” =>$this->get_field_id(“类别”), 41 “名称” =>$this->get_field_name(“类别”), 42 '已选择' =>$instance[“类别”] 101 $ 新闻_卫星 _args=阵列( 102 '分类' =>CCS_UNPW_CAT, 103 “类” =>“宽默认”, 104 '显示选项_全部' =>__('All','ccs-ultimate-news-plus-widget'), 105 “id” =>$this->get_field_id(“类别”), 106 “名称” =>$this->get_field_name(“类别”), 107 '已选择' =>$instance[“类别”] 43 108 ); 44 wp_下拉_类别($ 下拉列表 _参数); 109 wp_下拉_类别($ 新闻_卫星 _参数); 45 110 ?> 46 <span class=“description”><? php_e('注意:当您在最新新闻中添加类别时,此处将显示类别。','ccs-ultimate-News-plus-widget')?></ span> 47 </p> 111 <span class=“description”><em><? php_e('注意:当您在最新新闻中添加类别时,此处将显示类别。','ccs-ultimate-News-plus-widget')?></ 电子邮箱></span> 112 </p> 113 114 <!-- 列表类型--> 115 <p> 116 <label for=“<?php echo$this->get_field_id('list_type');?>”><? php_e('列表类型:','ccs-ultimate-news-plus-widget');?></ 标签> 117 <select class=“widefat”name=“<?php echo$this->get_field_name('list_type');?>”id=“<?php echo$this->get_field_id('list_type',?>”> 118 <option value=“news_list”<? 已选择php($instance['list_type'],'news_list');?>><? php _e(“最新新闻列表”,“ccs-ultimate-News-plus-widget”)?></ 选项> 119 <option value=“news_thumb”<? php选中($instance['list_type'],'newst_thumb');?>><? php _e(“最新新闻列表(Thumb)”,“ccs-ultimate-News-plus-widget”)?></ 选项> 120 </选择> 121 </p> 122 48 123 <? php(电话) 49 124 } 50 125 51 函数更新($new_instance,$old_instance){ 52 $instance=$old_instance; 53 $instance['title']=$new_instance['标题']; 54 $instance['num_items']=$new_instance['num_iems']; 55 $instance['date']=(bool)esc_attr($new_instance['日期']); 56 $instance['show_category']=(bool)esc_attr($new_instance['show_catagory']); 57 $instance['category']=intval($new_instance['类别']); 58 return$instance; 59 } 126 /** 127 *输出小部件的设置表单。 128 * 129 *@package Ultimate News Plus小工具 130 *@自1.0起 131 */ 60 132 函数小部件($news_args,$instance){ 133 61 134 提取($news_args,EXTR_SKIP); 62 135 63 $current_post_name=获取查询变量(“名称”); 64 65 $title=空($instance['title'])?'': apply_filters('widget_title',$instance['title']); 66 $num_items=空($instance['num_items'])?' 5':应用过滤器('widget_title',$instance['num_items']); 67 if(isset($instance['date'])&&(1==$instance['date'])){$date=“true”;}其他{$date=“false”;} 68 if(isset($instance['show_category'])&&(1==$instance['show-category'])){$show_catagory=“true”;}其他{$show _category=“false”;} 69 if(isset($instance['category'])&&is_numeric($instance['cat戈ry']))$category=intval($instance['category']]); 70 $postcount=0; 71 136 $title=apply_filters('widget_title',isset($instance['title'])$ instance[“标题”]:__(“最新新闻”,“ccs-ultimate-News-plus-widget”),$instance,$this->id_base); 137 $num_items=$instance['num_items']; 138 $date=(isset($instance['date'])&&($instance['date']==1))? “true”:“false”; 139 $show_category=(isset($instance['show_catagory'])&&($instance['show _category']==1))? “true”:“false”; 140 $category=$instance['category']; 141 $list_type=$instance['list_type']; 142 143 全球$邮政; 144 145 $news_args=数组( 146 “posts_per_page”=>$num_items, 147 “post_type”=>CCS_UNPW_post_type, 148 “post_status”=>数组(“publish”), 149 “订单”=>“DESC” 150 ); 151 152 if($category!=0){ 153 $news_args['tax_query']=数组( 154 阵列( 155 “分类法”=>CCS_UNPW_CAT, 156 “字段”=>“term_id”, 157 “术语”=>$category 158 )); 159 } 160 161 $ccs_custom_lop=新的WP_Query($news_args); 162 72 163 echo$before_widget; 73 ?> 74 75 <div class=“widget-title”> 76 <? php echo$title?> 77 </div> 78 79 <div class=“ccs-unpw-recent-news-items”> 80 <ul> 81 <? php//设置查询 82 $news_args=数组( 83 “posts_per_page”=>$num_items, 84 “post_type”=>CCS_UNPW_post_type, 85 “post_status”=>数组(“publish”), 86 “订单”=>“DESC” 87 ); 88 89 if($category!=0){ 90 $news_args['tax_query']=数组( 91 阵列( 92 “分类法”=>CCS_UNPW_CAT, 93 “字段”=>“term_id”, 94 “术语”=>$category 95 )); 96 } 97 98 $ccs_custom_loop=新WP_Query($news_args); 99 全球$邮政; 100 101 $post_count=$ccs_custom_loop->post_coount; 102 $count=0; 103 104 if($ccs_custom_loop->have_posts()):while($ccs_custome_loop->have_posts()):$ccs_custom_loop->the_post()$ 后计数++; 105 $count++; 106 $post_link=ccs_unpw_get_post_link($post->ID); 107 $terms=get_the_terms($post->ID,CCS_UNPW_CAT); 108 $news_links=数组(); 109 110 if($terms){ 111 foreach($terms作为$term){ 112 $term_link=get_term_link($term); 113 $news_links[]='<a href=“'.esc_url($term_link).'”>'$ 术语->名称。'</ a> '; 114 } 115 } 116 117 $cate_name=加入(“,”,$news_links);?> 118 119 <li class=“ccs-unpw-news-li”> 120 <a class=“ccs unpw newspost title”href=“<?php echo$post_link?>”title=“<?php the_title();?>”><? php the_title();?></ a> 121 122 <? php if($date==“true”||$show_category==“true”){?> 123 124 <div class=“ccs-unpw-widget-date-post”> 125 <? php-echo($date==“true”)? get_the_date():“”;?> 126 <? php-echo($date==“true”&&$show_category==“true”&&$类别名称!='')? " | " : "";?> 127 <? php-echo($show_category=='true'&&$cate_name!='')$ 类别名称:“”?> 128 </div> 129 130 <? php}?> 131 </li> 132 133 <? php endwhile; endif; 134 wp_reset_query();?> 135 136 </ul> 137 </div> 138 <? php(电话) 164 165 if($title){?> 166 <div class=“widget-title”> 167 <? php-echo$before_title$ 标题$ 在标题之后;?> 168 </div> 169 <? php}?> 170 171 <? php如果($ccs_custom_loop->have_posts()):?> 172 173 <div class=“ccs-unpw-recent-news-items”> 174 175 <ul> 176 177 <? php while($ccs_custom_loop->have_posts()):$ccs_custom_loop->the_post(); 178 179 $post_link=ccs_unpw_get_post_link($post->ID); 180 $terms=get_the_terms($post->ID,CCS_UNPW_CAT); 181 $feat_image=wp_get_attachment_image_src(get_post_thumbnail_id($post->id),‘缩略图’); 182 $no_feat_image=空($feat_image)?' ccs-no-feat-img“:”; 183 $news_links=数组(); 184 185 if($terms){ 186 187 foreach($terms作为$term){ 188 189 $term_link=get_term_link($term); 190 $news_links[]='<a href=“'.esc_url($term_link).'”>'$ 术语->名称。'</ a> '; 191 } 192 } 193 194 $cate_name=加入(“,”,$news_links); 195 196 if($listtype==“新闻列表”){ 197 include(CCS_UNPW_DIR.'/templates/news-list-widget.php'); 198 }其他{ 199 include(CCS_UNPW_DIR.'/templates/news-thumb-list-widget.php'); 200 } 201 endwhile; 202 wp_reset_query();?> 203 </ul> 204 </div><? php(电话) 205 endif; 139 206 echo$after_widget; 140 207 } 141 208 } 142 /*注册小部件*/ 143 函数ccs_unpw_widget_load_widgets(){ 144 register_widget(“ccs_Unpw_News_widget”); 145 } 146 /*加载小部件*/ 147 add_action(“widgets_init”,“ccs_unpw_widget_load_widgets”); -
最终消息-plus-widget/trunk/readme.txt 1754671元 1763638兰特 三 三 标签:wordpress新闻插件、简单新闻、新闻提要、wordpress将帖子或页面设置为新闻、wordpress-dynamic news、news、最新新闻、自定义帖子类型、cpt、小部件、新闻小部件、分类新闻、新闻广告、概念角、新闻网站、新闻插件、最新博客新闻、最新消息小部件、加速新闻、突发新闻、新闻时间线、, 新闻管理器,wordpress新闻,新闻滑块,滑块,最新新闻滑块,移动滑块,移动新闻滑块,具有自定义帖子类型的最新新闻 4 4 要求至少:3.1 5 测试达到:4.8。 2 5 测试达到:4.8。 三 6 6 作者URI: http://www.conceptcorners.com/ 7 7 稳定标签:行李箱 … … 22 22 23 23 *模板代码:<code><? php echo do_shortcode(“[ccs_news]”);?></ 代码> 24 * <代码><? php echo do_shortcode('[ccs_news_slider]');?></ 代码> 24 <代码><? php echo do_shortcode('[ccs_news_slider]');?></ 代码> 25 25 26 26 =以下是[ccs_News]的新闻参数:= … … 80 80 <code>[ccs_news_slider]</code>用于在滑块中显示新闻 81 81 82 =升级到2.1后是否出现致命错误? 83 =只需转到小部件并保存一次新闻小部件。 84 82 85 ==屏幕截图== 83 86 … … 87 90 88 91 ==变更日志== 92 93 = 2.1 = 94 *[*]为了更好地使用而合并了小工具。 95 *[*]解决了其他主题的CSS错误。 89 96 90 97 = 2.0 = … … 114 121 ==升级通知== 115 122 123 = 2.1 = 124 *[*]为了更好地使用而合并了小工具。 125 *[*]解决了其他主题的CSS错误。 126 116 127 = 2.0 = 117 128 *[+]添加了滑块快捷代码。