插件目录

变更集601475


忽略:
时间戳:
2012年9月20日上午08:02:24(12年(之前)
作者:
木偶
消息:

未显示固定帖子。显示默认图像

位置:
带缩略图的特色立柱
文件夹:
6已编辑
已复制1个

图例:

未修改
补充
远离的
  • featured-post-with-thumbnail/tags/1.5.2/index.php

    588810兰特 601475兰特  
    6262对象开始();
    6363ob_end_clean();
    64 $output=preg_match_all('/<img.+src=[\'“]([^\'”]+)[\'“].*>/i',$post->post_content,$matches);
    65 $first_img=$个匹配项[1][0];
    66 
    67 if(空($first_img)){//定义默认图像
     64$num_images=preg_match_all('/<img.+src=[\'“]([^\'“]+)[\'”].*>/i',$post->post_content,$matches);
     65
     66如果($num_images>0){
     67$first_img=$个匹配项[1][0];
     68}其他{
    6869$first_img=$featured_post_plugin_path。“images/default.gif”;
    6970   }
     71
    7072返回$first_img;
    7173}       
     
    144146   
    145147<ul id=“yiw-featured-post”>
     148<?php foreach($featuredposts作为$post):
     149setup_postdata($post);
     150?>
    146151<li>
    147152<a href=“<?php the_permalink()?>”class=“featured-thumb”>
     
    159164</h4>
    160165</li>
     166<?php端foreach;?>
    161167</ul>
    162168   
     
    263269函数yiw_add_widget_script(){
    264270全局$featured_post_plugin_path;
    265 wp_enqueue_script('yiw_widget_script',$featured_post_plugin_path。'js/yiw_widget_script.js');
     271wp_enqueue_script('yiw_widget_script',$featured_post_plugin_path。'js/yiw_widget_script.js',
     272数组(“jquery”),
     273错误,
     274true);
    266275}
    267276add_action('admin_head','yiw_add_widget_script');
  • featured-post带缩略图/tags/1.5.2/readme.txt

    588810兰特 601475兰特  
    55标签:帖子、帖子、突出显示、小部件、缩略图、带缩略图的特色帖子、特色帖子,帖子,突出显示最佳文章,
    66要求至少:2.8,PHP4和PHP5
    7 测试时间:2.9
    8 稳定标签:1.5。1
     7测试达到:3.4.2
     8稳定标签:1.5。2
    99 
    1010这是一种在网站上发布特色帖子的简单方法。
     
    5757==变更日志==
    5858
     59= 1.5.2 =
     60*固定:显示所有特色帖子
     61*已修复:在没有图像的帖子中显示默认图像
     62
    5963= 1.5.1 =
    6064
  • featured-post with-thumbnail/tags/1.5.2/scripts/yiw-featured-post小部件.php

    582086兰特 601475兰特  
    77
    88
    9  /*
     9/*
    1010*Aggiungiamo la nostra funzione al gancio小部件_init
    1111*将我们的函数添加到widgets_init挂钩
     
    178178
    179179私有函数showFeaturedOrCategory($instance){
    180 回声'<p>';
     180回声'<pid=“yiw_featured_post_show”>';
    181181echo'<label for=“'.$this->get_field_id('show').'”>'_e(“特色或类别?”,YIW_TEXT_DOMAIN)</标签>';
    182182echo'<select id=“'.$this->get_field_id('show').'”name=“'.$this->get_field_name('show’).'“>';
     
    186186echo“</p>”;
    187187
    188 回声'<p>';
     188回声'<pid=“yiw_featured_post_category”>';
    189189echo'<label for=“'.$this->get_field_id('category').'”>'_e(“类别”,YIW_TEXT_DOMAIN)。”</标签>';
    190190echo'<select id=“'.$this->get_field_id('类别').'”name=“'.$this->get_field_name('类别]).'“>';
    191 $categories=获取类别($个参数);
     191$categories=获取类别();
    192192foreach($categories作为$c){
    193193echo'<option value=“'.$c->cat_ID.'”'。选中($instance['category'],$c->cat_ID).'>'$c->名称。”</选项>';
  • 带缩略图/trunk/index.php的特色支柱

    588810兰特 601475兰特  
    6262对象开始();
    6363ob_end_clean();
    64 $output=preg_match_all('/<img.+src=[\'“]([^\'“]+)[\'”].*>/i',$post->post_content,$matches);
    65 $first_img=$个匹配项[1][0];
    66 
    67 if(空($first_img)){//定义默认图像
     64$num_images=preg_match_all('/<img.+src=[\'“]([^\'“]+)[\'”].*>/i',$post->post_content,$matches);
     65
     66如果($num_images>0){
     67$first_img=$个匹配项[1][0];
     68}其他{
    6869$first_img=$featured_post_plugin_path。“images/default.gif”;
    6970   }
     71
    7072返回$first_img;
    7173}       
     
    144146   
    145147<ul id=“yiw-featured-post”>
     148<?php foreach($featured_posts作为$post):
     149setup_postdata($post);
     150?>
    146151<li>
    147152<a href=“<?php the_permalink()?>”class=“featured-thumb”>
     
    159164</h4>
    160165</li>
     166<?php端foreach;?>
    161167</ul>
    162168   
     
    263269函数yiw_add_widget_script(){
    264270全局$featured_post_plugin_path;
    265 wp_enque_script('yiw_widget_script',$featured_post_plugin_path.'js/yiw_widget_script.js');
     271wp_enqueue_script('yiw_widget_script',$featured_post_plugin_path。'js/yiw_widget_script.js',
     272数组(“jquery”),
     273错误,
     274true);
    266275}
    267276add_action('admin_head','yiw_add_widget_script');
  • featured-post带缩略图/trunk/readme.txt

    588810兰特 601475兰特  
    55标签:帖子、帖子、突出显示、小部件、缩略图、带缩略图的特色帖子、特色帖子,帖子,突出显示最佳文章,
    66要求至少:2.8,PHP4和PHP5
    7 测试达到:2.9
    8 稳定标签:1.5。1
     7测试达到:3.4.2
     8稳定标签:1.5。2
    99 
    1010这是一种在网站上发布特色帖子的简单方法。
     
    5757==变更日志==
    5858
     59= 1.5.2 =
     60*固定:显示所有特色帖子
     61*修复:在没有图像的帖子中显示默认图像
     62
    5963= 1.5.1 =
    6064
  • featured-post with-thumbnail/trunk/scripts/yiw-featured-post小部件.php

    582086兰特 601475兰特  
    77
    88
    9  /*
     9/*
    1010*Aggiungiamo la nostra funzione al gancio小部件_init
    1111*将我们的函数添加到widgets_init挂钩
     
    178178
    179179私有函数showFeaturedOrCategory($instance){
    180 回声'<p>';
     180回声'<pid=“yiw_featured_post_show”>';
    181181echo'<label for=“'.$this->get_field_id('show').'”>'_e(“特色或类别?”,YIW_TEXT_DOMAIN)</标签>';
    182182echo'<select id=“'.$this->get_field_id('show').'”name=“'.$this->get_field_name('show’).'“>';
     
    186186echo“</p>”;
    187187
    188 回声'<p>';
     188回声'<pid=“yiw_featured_post_category”>';
    189189echo'<label for=“'.$this->get_field_id('category').'”>'_e(“类别”,YIW_TEXT_DOMAIN)。”</标签>';
    190190echo'<select id=“'.$this->get_field_id('类别').'”name=“'.$this->get_field_name('类别]).'“>';
    191 $categories=获取类别($个参数);
     191$categories=获取类别();
    192192foreach($categories作为$c){
    193193echo'<option value=“'.$c->cat_ID.'”'。选中($instance['category'],$c->cat_ID).'>'$c->名称。”</选项>';
注:请参阅TracChangeset(跟踪变更集)获取有关使用变更集查看器的帮助。