变更集601475
时间戳: 2012年9月20日上午08:02:24 ( 12年 (之前) 位置: 带缩略图的特色立柱 文件夹: -
6已编辑 已复制1个
-
标签/1.5.2 (已复制) (复制自 带拖车/行李箱的特色立柱 ) -
标签/1.5.2/index.php (已修改) ( 4个差异 ) -
标签/1.5.2/readme.txt (已修改) ( 2个差异 ) -
tags/1.5.2/scripts/yiw-featured-post-widget.php (已修改) ( 3个差异 ) -
主干/索引.php (已修改) ( 4个差异 ) -
中继/自述.txt (已修改) ( 2个差异 ) -
trunk/scripts/yiw-featured-post-widget.php (已修改) ( 3个差异 )
图例:
未修改 补充 远离的
-
featured-post-with-thumbnail/tags/1.5.2/index.php 588810兰特 601475兰特 62 62 对象开始(); 63 63 ob_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 }其他{ 68 69 $first_img=$featured_post_plugin_path。 “images/default.gif”; 69 70 } 71 70 72 返回$first_img; 71 73 } … … 144 146 145 147 <ul id=“yiw-featured-post”> 148 <? php foreach($featuredposts作为$post): 149 setup_postdata($post); 150 ?> 146 151 <li> 147 152 <a href=“<?php the_permalink()?>”class=“featured-thumb”> … … 159 164 </h4> 160 165 </li> 166 <? php端foreach;?> 161 167 </ul> 162 168 … … 263 269 函数yiw_add_widget_script(){ 264 270 全局$featured_post_plugin_path; 265 wp_enqueue_script('yiw_widget_script',$featured_post_plugin_path。'js/yiw_widget_script.js'); 271 wp_enqueue_script('yiw_widget_script',$featured_post_plugin_path。'js/yiw_widget_script.js', 272 数组(“jquery”), 273 错误, 274 true); 266 275 } 267 276 add_action('admin_head','yiw_add_widget_script'); -
featured-post带缩略图/tags/1.5.2/readme.txt 588810兰特 601475兰特 5 5 标签:帖子、帖子、突出显示、小部件、缩略图、带缩略图的特色帖子、特色帖子,帖子,突出显示最佳文章, 6 6 要求至少:2.8,PHP4和PHP5 7 测试时间: 2.9 8 稳定标签:1.5。 1 7 测试达到: 3.4.2 8 稳定标签:1.5。 2 9 9 10 10 这是一种在网站上发布特色帖子的简单方法。 … … 57 57 ==变更日志== 58 58 59 = 1.5.2 = 60 *固定:显示所有特色帖子 61 *已修复:在没有图像的帖子中显示默认图像 62 59 63 = 1.5.1 = 60 64 -
featured-post with-thumbnail/tags/1.5.2/scripts/yiw-featured-post小部件.php 582086兰特 601475兰特 7 7 8 8 9 /* 9 /* 10 10 *Aggiungiamo la nostra funzione al gancio小部件_init 11 11 *将我们的函数添加到widgets_init挂钩 … … 178 178 179 179 私有函数showFeaturedOrCategory($instance){ 180 回声'<p >'; 180 回声'<p id=“yiw_featured_post_show” >'; 181 181 echo'<label for=“'.$this->get_field_id('show').'”>'_ e(“特色或类别?”,YIW_TEXT_DOMAIN)</ 标签>'; 182 182 echo'<select id=“'.$this->get_field_id('show').'”name=“'.$this->get_field_name('show’).'“>'; … … 186 186 echo“</p>”; 187 187 188 回声'<p >'; 188 回声'<p id=“yiw_featured_post_category” >'; 189 189 echo'<label for=“'.$this->get_field_id('category').'”>'_ e(“类别”,YIW_TEXT_DOMAIN)。”</ 标签>'; 190 190 echo'<select id=“'.$this->get_field_id('类别').'”name=“'.$this->get_field_name('类别]).'“>'; 191 $categories=获取类别( $个参数 ); 191 $categories=获取类别( ); 192 192 foreach($categories作为$c){ 193 193 echo'<option value=“'.$c->cat_ID.'”'。 选中($instance['category'],$c->cat_ID).'>'$ c->名称。”</ 选项>'; -
带缩略图/trunk/index.php的特色支柱 588810兰特 601475兰特 62 62 对象开始(); 63 63 ob_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 }其他{ 68 69 $first_img=$featured_post_plugin_path。 “images/default.gif”; 69 70 } 71 70 72 返回$first_img; 71 73 } … … 144 146 145 147 <ul id=“yiw-featured-post”> 148 <? php foreach($featured_posts作为$post): 149 setup_postdata($post); 150 ?> 146 151 <li> 147 152 <a href=“<?php the_permalink()?>”class=“featured-thumb”> … … 159 164 </h4> 160 165 </li> 166 <? php端foreach;?> 161 167 </ul> 162 168 … … 263 269 函数yiw_add_widget_script(){ 264 270 全局$featured_post_plugin_path; 265 wp_enque_script('yiw_widget_script',$featured_post_plugin_path.'js/yiw_widget_script.js'); 271 wp_enqueue_script('yiw_widget_script',$featured_post_plugin_path。'js/yiw_widget_script.js', 272 数组(“jquery”), 273 错误, 274 true); 266 275 } 267 276 add_action('admin_head','yiw_add_widget_script'); -
featured-post带缩略图/trunk/readme.txt 588810兰特 601475兰特 5 5 标签:帖子、帖子、突出显示、小部件、缩略图、带缩略图的特色帖子、特色帖子,帖子,突出显示最佳文章, 6 6 要求至少:2.8,PHP4和PHP5 7 测试达到: 2.9 8 稳定标签:1.5。 1 7 测试达到: 3.4.2 8 稳定标签:1.5。 2 9 9 10 10 这是一种在网站上发布特色帖子的简单方法。 … … 57 57 ==变更日志== 58 58 59 = 1.5.2 = 60 *固定:显示所有特色帖子 61 *修复:在没有图像的帖子中显示默认图像 62 59 63 = 1.5.1 = 60 64 -
featured-post with-thumbnail/trunk/scripts/yiw-featured-post小部件.php 582086兰特 601475兰特 7 7 8 8 9 /* 9 /* 10 10 *Aggiungiamo la nostra funzione al gancio小部件_init 11 11 *将我们的函数添加到widgets_init挂钩 … … 178 178 179 179 私有函数showFeaturedOrCategory($instance){ 180 回声'<p >'; 180 回声'<p id=“yiw_featured_post_show” >'; 181 181 echo'<label for=“'.$this->get_field_id('show').'”>'_ e(“特色或类别?”,YIW_TEXT_DOMAIN)</ 标签>'; 182 182 echo'<select id=“'.$this->get_field_id('show').'”name=“'.$this->get_field_name('show’).'“>'; … … 186 186 echo“</p>”; 187 187 188 回声'<p >'; 188 回声'<p id=“yiw_featured_post_category” >'; 189 189 echo'<label for=“'.$this->get_field_id('category').'”>'_ e(“类别”,YIW_TEXT_DOMAIN)。”</ 标签>'; 190 190 echo'<select id=“'.$this->get_field_id('类别').'”name=“'.$this->get_field_name('类别]).'“>'; 191 $categories=获取类别( $个参数 ); 191 $categories=获取类别( ); 192 192 foreach($categories作为$c){ 193 193 echo'<option value=“'.$c->cat_ID.'”'。 选中($instance['category'],$c->cat_ID).'>'$ c->名称。”</ 选项>';