Changeset 1399647
- Timestamp:
- 04/19/2016 08:09:16 PM (8 years ago)
- Location:
- latest-posts-with-thumbnails-and-ads
- Files:
-
- 4 edited
- 10 copied
Legend:
- Unmodified
- Added
- Removed
-
latest-posts-with-thumbnails-and-ads/tags/1.2.0/assets/style.css
r1233865 r1399647 1 h2.shomtek_title{font-family:inherit;font-size:14px;font-weight:bold;text-transform:uppercase;color:#ecf0f1;text-align:center;line-height:1.3em;border-bottom:1px solid rgba(44,62,80,0.3);box-shadow:0 1px 0 rgba(255,255,255,0.2)}h2.shomtek_title>a{color:#ecf0f1;text-decoration:none}h2.shomtek_title>a:link{color:#ecf0f1}.shomtek_post{background:#ecf0f1;padding:10px;margin-bottom:15px}.shomtek_post .shomtek_title_block{padding:0 5px}.shomtek_post .shomtek_img_container{height:auto;position:relative;overflow:hidden}.shomtek_post .shomtek_img_container img.shomtek_post_image{width:100%}.shomtek_post .shomtek_post_data{position:absolute;bottom:0;left:0;right:0;padding:5px;background-color:rgba(44,62,80,0.7);color:#ecf0f1}.shomtek_post .shomtek_post_data .shomtek_post_date{float:left}.shomtek_post .shomtek_post_data .shomtek_comments_count{float:right}.show_ads{text-align:center;margin-bottom: 15px;} 1 /*-------------------------------------------------------------- 2 Copyright (C) shomtek.com 3 Website: http://www.shomtek.com 4 Support: info@shomtek.com 5 Author: Eduart Milushi 6 ---------------------------------------------------------------*/ 7 h2.shomtek_title { 8 font-family: inherit; 9 font-size: 14px; 10 font-weight: bold; 11 text-transform: uppercase; 12 color: #ECF0F1; 13 text-align: center; 14 line-height: 1.3em; 15 border-bottom: 1px solid rgba(44, 62, 80, 0.3); 16 box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2); 17 } 18 h2.shomtek_title > a { 19 color: #ECF0F1 !important; 20 text-decoration: none; 21 } 22 h2.shomtek_title > a:link { 23 color: #ECF0F1 !important; 24 } 25 .shomtek_post { 26 background: #ECF0F1; 27 padding: 10px; 28 margin-bottom: 15px; 29 } 30 .shomtek_post .shomtek_title_block { 31 padding: 0 5px; 32 } 33 .shomtek_post .shomtek_img_container { 34 height: auto; 35 position: relative; 36 overflow: hidden; 37 } 38 .shomtek_post .shomtek_img_container img.shomtek_post_image { 39 width: 100%; 40 } 41 .shomtek_post .shomtek_post_data { 42 position: absolute; 43 bottom: 0; 44 left: 0; 45 right: 0; 46 padding: 5px; 47 background-color: rgba(44, 62, 80, 0.7); 48 color: #ECF0F1; 49 } 50 .shomtek_post .shomtek_post_data .shomtek_post_date { 51 float: left; 52 } 53 .shomtek_post .shomtek_post_data .shomtek_comments_count { 54 float: right; 55 } 56 .show_ads { 57 text-align: center; 58 background: #ECF0F1; 59 padding: 10px; 60 margin-bottom: 15px; 61 } 62 .shomtek_post_horizontal { 63 z-index: 1; 64 } 65 .shomtek_post_horizontal .owl-nav .owl-prev, 66 .shomtek_post_horizontal .owl-nav .owl-next { 67 position: absolute; 68 top: 50%; 69 margin-top: -23px; 70 padding: 8px; 71 background: #2C3E50; 72 color: #ECF0F1; 73 width: 30px; 74 height: 30px; 75 -webkit-border-radius: 5px; 76 -moz-border-radius: 5px; 77 border-radius: 5px; 78 font-size: 13px; 79 line-height: 1; 80 text-align: center; 81 opacity: 0.5; 82 filter: alpha(opacity=50); 83 -webkit-transition: all 0.2s; 84 -moz-transition: all 0.2s; 85 -o-transition: all 0.2s; 86 transition: all 0.2s; 87 z-index: 2; 88 } 89 .shomtek_post_horizontal .owl-nav .owl-prev:hover, 90 .shomtek_post_horizontal .owl-nav .owl-next:hover { 91 opacity: 1; 92 filter: alpha(opacity=100); 93 } 94 .shomtek_post_horizontal .owl-nav .owl-prev { 95 left: 0; 96 } 97 .shomtek_post_horizontal .owl-nav .owl-next { 98 right: 0; 99 } -
latest-posts-with-thumbnails-and-ads/tags/1.2.0/assets/style.less
r1233865 r1399647 1 2 1 3 /*-------------------------------------------------------------- 2 4 Copyright (C) shomtek.com … … 24 26 box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2); 25 27 > a { 26 color: @dataColor ;28 color: @dataColor; 27 29 text-decoration: none; 28 30 &:link { 29 color: @dataColor ;31 color: @dataColor; 30 32 } 31 33 } … … 66 68 .show_ads { 67 69 text-align: center; 70 71 68 72 margin-bottom: 15px; 69 } 73 } 74 75 //horizontal style 76 .shomtek_post_horizontal { 77 z-index: 1; 78 .owl-nav { 79 .owl-prev, 80 .owl-next { 81 position: absolute; 82 top: 50%; 83 margin-top: -23px; 84 padding: 8px; 85 background: @dataBG; 86 color: @dataColor; 87 width: 30px; 88 height: 30px; 89 -webkit-border-radius: 5px; 90 -moz-border-radius: 5px; 91 border-radius: 5px; 92 font-size: 13px; 93 line-height: 1; 94 text-align: center; 95 opacity: 0.5; 96 filter: alpha(opacity=50); 97 -webkit-transition: all 0.2s; 98 -moz-transition: all 0.2s; 99 -o-transition: all 0.2s; 100 transition: all 0.2s; 101 z-index: 2; 102 } 103 .owl-prev:hover, 104 .owl-next:hover { 105 opacity: 1; 106 filter: alpha(opacity=100); 107 } 108 .owl-prev { 109 left: 0; 110 } 111 .owl-next { 112 right: 0; 113 } 114 } 115 } -
latest-posts-with-thumbnails-and-ads/tags/1.2.0/latest-posts.php
r1233865 r1399647 31 31 'title' => 'Latest Posts with Pics', 32 32 33 34 33 35 'image_size' => 'medium', 34 36 35 37 'adstext' => '', 36 38 37 'comments_count' => 1,39 'comments_count' => 1, 38 40 39 41 'showdate' => 1, … … 49 51 $title = esc_attr($instance['title']); // widget title 50 52 53 54 51 55 $image_size = $instance['image_size']; // post image size 52 56 … … 55 59 $comments_count = ( $instance['comments_count'] === 1 ) ? true : false; // show/hide comments count 56 60 57 $showdate = ( $instance['showdate'] === 1 ) ? true : false; // show/hide post date 61 $showdate = ( $instance['showdate'] === 1 ) ? true : false; // show/hide post date 58 62 59 63 $adsnumber = intval($instance['adsnumber']); // Show ads between posts … … 67 71 <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" /> 68 72 </p> 73 74 75 76 77 78 79 80 69 81 70 82 <p> … … 109 121 // Save widget settings 110 122 function update( $new_instance, $old_instance ) { 111 123 112 124 $instance = $old_instance; 113 125 114 126 $instance['title'] = strip_tags( $new_instance['title'] ); 127 128 115 129 116 130 $instance['image_size'] = $new_instance['image_size']; … … 143 157 $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); 144 158 145 $image_size = $instance['image_size']; 159 $view = $instance['view']; 160 161 $image_size = $instance['image_size']; 146 162 147 163 $number = $instance['number']; … … 201 217 202 218 if ( $title ): 203 echo $before_title; 219 echo $before_title; 204 220 echo $title; 205 221 echo $after_title; 206 222 endif; 207 223 224 225 226 227 228 208 229 $postnum = 0; 209 230 210 if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?> 231 if ($query->have_posts()) : ?> 232 233 <div class="<?php echo $prefered_view; ?>"> 234 235 <?php while ($query->have_posts()) : $query->the_post(); ?> 211 236 212 237 <div class="shomtek_post"> 213 238 214 239 <div class="shomtek_img_container"> 215 240 216 241 <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" > 217 218 <?php if(has_post_thumbnail()) { 242 243 <?php if(has_post_thumbnail()) { 219 244 220 245 the_post_thumbnail( $image_size, array('class' => 'shomtek_post_image')); 221 246 222 247 } else { 223 248 … … 233 258 234 259 <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a> 235 260 236 261 </h2> 237 262 238 263 <?php if (( $showdate ) or ( $comments_count )) : ?> 239 264 … … 262 287 263 288 if ($postnum % $adsnumber == 0) { ?> 264 289 265 290 <div class="show_ads"> 266 291 … … 272 297 <?php endif; ?> 273 298 274 <?php endwhile; endif; 299 <?php endwhile; 300 echo '</div>'; 301 endif; 275 302 276 303 wp_reset_query(); -
latest-posts-with-thumbnails-and-ads/tags/1.2.0/readme.txt
r1233865 r1399647 1 === Latest Posts With Thumbnails and Ads===1 === Latest Posts With Thumbnails and === 2 2 Contributors: emilushi 3 Tags: widget, latest post, recent posts, sidebar, latest posts with thumbnails, thumbnails, ads 3 Tags: widget, latest post, recent posts, sidebar, latest posts with thumbnails, thumbnails, ads 4 4 Requires at least: 3.2 5 Tested up to: 4. 36 Stable tag: 1. 0.15 Tested up to: 4. 6 Stable tag: 1. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 37 37 * Fix remove empty div when Ads Code textarea is left empty. 38 38 * Added choose Image size option. 39 40 41 42 43 44 -
latest-posts-with-thumbnails-and-ads/trunk/assets/style.css
r1233865 r1399647 1 h2.shomtek_title{font-family:inherit;font-size:14px;font-weight:bold;text-transform:uppercase;color:#ecf0f1;text-align:center;line-height:1.3em;border-bottom:1px solid rgba(44,62,80,0.3);box-shadow:0 1px 0 rgba(255,255,255,0.2)}h2.shomtek_title>a{color:#ecf0f1;text-decoration:none}h2.shomtek_title>a:link{color:#ecf0f1}.shomtek_post{background:#ecf0f1;padding:10px;margin-bottom:15px}.shomtek_post .shomtek_title_block{padding:0 5px}.shomtek_post .shomtek_img_container{height:auto;position:relative;overflow:hidden}.shomtek_post .shomtek_img_container img.shomtek_post_image{width:100%}.shomtek_post .shomtek_post_data{position:absolute;bottom:0;left:0;right:0;padding:5px;background-color:rgba(44,62,80,0.7);color:#ecf0f1}.shomtek_post .shomtek_post_data .shomtek_post_date{float:left}.shomtek_post .shomtek_post_data .shomtek_comments_count{float:right}.show_ads{text-align:center;margin-bottom: 15px;} 1 /*-------------------------------------------------------------- 2 Copyright (C) shomtek.com 3 Website: http://www.shomtek.com 4 Support: info@shomtek.com 5 Author: Eduart Milushi 6 ---------------------------------------------------------------*/ 7 h2.shomtek_title { 8 font-family: inherit; 9 font-size: 14px; 10 font-weight: bold; 11 text-transform: uppercase; 12 color: #ECF0F1; 13 text-align: center; 14 line-height: 1.3em; 15 border-bottom: 1px solid rgba(44, 62, 80, 0.3); 16 box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2); 17 } 18 h2.shomtek_title > a { 19 color: #ECF0F1 !important; 20 text-decoration: none; 21 } 22 h2.shomtek_title > a:link { 23 color: #ECF0F1 !important; 24 } 25 .shomtek_post { 26 background: #ECF0F1; 27 padding: 10px; 28 margin-bottom: 15px; 29 } 30 .shomtek_post .shomtek_title_block { 31 padding: 0 5px; 32 } 33 .shomtek_post .shomtek_img_container { 34 height: auto; 35 position: relative; 36 overflow: hidden; 37 } 38 .shomtek_post .shomtek_img_container img.shomtek_post_image { 39 width: 100%; 40 } 41 .shomtek_post .shomtek_post_data { 42 position: absolute; 43 bottom: 0; 44 left: 0; 45 right: 0; 46 padding: 5px; 47 background-color: rgba(44, 62, 80, 0.7); 48 color: #ECF0F1; 49 } 50 .shomtek_post .shomtek_post_data .shomtek_post_date { 51 float: left; 52 } 53 .shomtek_post .shomtek_post_data .shomtek_comments_count { 54 float: right; 55 } 56 .show_ads { 57 text-align: center; 58 background: #ECF0F1; 59 padding: 10px; 60 margin-bottom: 15px; 61 } 62 .shomtek_post_horizontal { 63 z-index: 1; 64 } 65 .shomtek_post_horizontal .owl-nav .owl-prev, 66 .shomtek_post_horizontal .owl-nav .owl-next { 67 position: absolute; 68 top: 50%; 69 margin-top: -23px; 70 padding: 8px; 71 background: #2C3E50; 72 color: #ECF0F1; 73 width: 30px; 74 height: 30px; 75 -webkit-border-radius: 5px; 76 -moz-border-radius: 5px; 77 border-radius: 5px; 78 font-size: 13px; 79 line-height: 1; 80 text-align: center; 81 opacity: 0.5; 82 filter: alpha(opacity=50); 83 -webkit-transition: all 0.2s; 84 -moz-transition: all 0.2s; 85 -o-transition: all 0.2s; 86 transition: all 0.2s; 87 z-index: 2; 88 } 89 .shomtek_post_horizontal .owl-nav .owl-prev:hover, 90 .shomtek_post_horizontal .owl-nav .owl-next:hover { 91 opacity: 1; 92 filter: alpha(opacity=100); 93 } 94 .shomtek_post_horizontal .owl-nav .owl-prev { 95 left: 0; 96 } 97 .shomtek_post_horizontal .owl-nav .owl-next { 98 right: 0; 99 } -
latest-posts-with-thumbnails-and-ads/trunk/assets/style.less
r1233865 r1399647 1 2 1 3 /*-------------------------------------------------------------- 2 4 Copyright (C) shomtek.com … … 24 26 box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2); 25 27 > a { 26 color: @dataColor ;28 color: @dataColor; 27 29 text-decoration: none; 28 30 &:link { 29 color: @dataColor ;31 color: @dataColor; 30 32 } 31 33 } … … 66 68 .show_ads { 67 69 text-align: center; 70 71 68 72 margin-bottom: 15px; 69 } 73 } 74 75 //horizontal style 76 .shomtek_post_horizontal { 77 z-index: 1; 78 .owl-nav { 79 .owl-prev, 80 .owl-next { 81 position: absolute; 82 top: 50%; 83 margin-top: -23px; 84 padding: 8px; 85 background: @dataBG; 86 color: @dataColor; 87 width: 30px; 88 height: 30px; 89 -webkit-border-radius: 5px; 90 -moz-border-radius: 5px; 91 border-radius: 5px; 92 font-size: 13px; 93 line-height: 1; 94 text-align: center; 95 opacity: 0.5; 96 filter: alpha(opacity=50); 97 -webkit-transition: all 0.2s; 98 -moz-transition: all 0.2s; 99 -o-transition: all 0.2s; 100 transition: all 0.2s; 101 z-index: 2; 102 } 103 .owl-prev:hover, 104 .owl-next:hover { 105 opacity: 1; 106 filter: alpha(opacity=100); 107 } 108 .owl-prev { 109 left: 0; 110 } 111 .owl-next { 112 right: 0; 113 } 114 } 115 } -
latest-posts-with-thumbnails-and-ads/trunk/latest-posts.php
r1233865 r1399647 31 31 'title' => 'Latest Posts with Pics', 32 32 33 34 33 35 'image_size' => 'medium', 34 36 35 37 'adstext' => '', 36 38 37 'comments_count' => 1,39 'comments_count' => 1, 38 40 39 41 'showdate' => 1, … … 49 51 $title = esc_attr($instance['title']); // widget title 50 52 53 54 51 55 $image_size = $instance['image_size']; // post image size 52 56 … … 55 59 $comments_count = ( $instance['comments_count'] === 1 ) ? true : false; // show/hide comments count 56 60 57 $showdate = ( $instance['showdate'] === 1 ) ? true : false; // show/hide post date 61 $showdate = ( $instance['showdate'] === 1 ) ? true : false; // show/hide post date 58 62 59 63 $adsnumber = intval($instance['adsnumber']); // Show ads between posts … … 67 71 <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" /> 68 72 </p> 73 74 75 76 77 78 79 80 69 81 70 82 <p> … … 109 121 // Save widget settings 110 122 function update( $new_instance, $old_instance ) { 111 123 112 124 $instance = $old_instance; 113 125 114 126 $instance['title'] = strip_tags( $new_instance['title'] ); 127 128 115 129 116 130 $instance['image_size'] = $new_instance['image_size']; … … 143 157 $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); 144 158 145 $image_size = $instance['image_size']; 159 $view = $instance['view']; 160 161 $image_size = $instance['image_size']; 146 162 147 163 $number = $instance['number']; … … 201 217 202 218 if ( $title ): 203 echo $before_title; 219 echo $before_title; 204 220 echo $title; 205 221 echo $after_title; 206 222 endif; 207 223 224 225 226 227 228 208 229 $postnum = 0; 209 230 210 if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?> 231 if ($query->have_posts()) : ?> 232 233 <div class="<?php echo $prefered_view; ?>"> 234 235 <?php while ($query->have_posts()) : $query->the_post(); ?> 211 236 212 237 <div class="shomtek_post"> 213 238 214 239 <div class="shomtek_img_container"> 215 240 216 241 <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" > 217 218 <?php if(has_post_thumbnail()) { 242 243 <?php if(has_post_thumbnail()) { 219 244 220 245 the_post_thumbnail( $image_size, array('class' => 'shomtek_post_image')); 221 246 222 247 } else { 223 248 … … 233 258 234 259 <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a> 235 260 236 261 </h2> 237 262 238 263 <?php if (( $showdate ) or ( $comments_count )) : ?> 239 264 … … 262 287 263 288 if ($postnum % $adsnumber == 0) { ?> 264 289 265 290 <div class="show_ads"> 266 291 … … 272 297 <?php endif; ?> 273 298 274 <?php endwhile; endif; 299 <?php endwhile; 300 echo '</div>'; 301 endif; 275 302 276 303 wp_reset_query(); -
latest-posts-with-thumbnails-and-ads/trunk/readme.txt
r1233865 r1399647 1 === Latest Posts With Thumbnails and Ads===1 === Latest Posts With Thumbnails and === 2 2 Contributors: emilushi 3 Tags: widget, latest post, recent posts, sidebar, latest posts with thumbnails, thumbnails, ads 3 Tags: widget, latest post, recent posts, sidebar, latest posts with thumbnails, thumbnails, ads 4 4 Requires at least: 3.2 5 Tested up to: 4. 36 Stable tag: 1. 0.15 Tested up to: 4. 6 Stable tag: 1. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 37 37 * Fix remove empty div when Ads Code textarea is left empty. 38 38 * Added choose Image size option. 39 40 41 42 43 44
Note: See TracChangeset
for help on using the changeset viewer.