Plugin Directory

Changeset 1399647

Timestamp:
04/19/2016 08:09:16 PM (8 years ago)
Author:
emilushi
Message:

Updated to 1.2.0: Changed plugin name to prevent blocking from adblock, added horizontal option

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/*--------------------------------------------------------------
     2Copyright (C) shomtek.com
     3Website: http://www.shomtek.com
     4Support: info@shomtek.com
     5Author: Eduart Milushi
     6---------------------------------------------------------------*/
     7h2.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}
     18h2.shomtek_title > a {
     19  color: #ECF0F1 !important;
     20  text-decoration: none;
     21}
     22h2.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
    13/*--------------------------------------------------------------
    24Copyright (C) shomtek.com
     
    2426  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
    2527  > a {
    26     color: @dataColor;
     28    color: @dataColor;
    2729    text-decoration: none;
    2830    &:link {
    29       color: @dataColor;
     31      color: @dataColor;
    3032    }
    3133  }
     
    6668.show_ads {
    6769  text-align: center;
     70
     71
    6872  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  
    3131        'title'               => 'Latest Posts with Pics',
    3232
     33
     34
    3335        'image_size'          => 'medium',
    3436
    3537        'adstext'             => '',
    3638
    37         'comments_count'     => 1,
     39        'comments_count'     => 1,
    3840
    3941        'showdate'            => 1,
     
    4951      $title = esc_attr($instance['title']); // widget title
    5052
     53
     54
    5155      $image_size = $instance['image_size']; // post image size
    5256
     
    5559      $comments_count = ( $instance['comments_count'] === 1 ) ? true : false; // show/hide comments count
    5660
    57       $showdate = ( $instance['showdate'] === 1 ) ? true : false; // show/hide post date 
     61      $showdate = ( $instance['showdate'] === 1 ) ? true : false; // show/hide post date
    5862
    5963      $adsnumber = intval($instance['adsnumber']); // Show ads between posts
     
    6771        <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']; ?>" />
    6872      </p>
     73
     74
     75
     76
     77
     78
     79
     80
    6981
    7082      <p>
     
    109121    // Save widget settings
    110122    function update( $new_instance, $old_instance ) {
    111      
     123
    112124      $instance = $old_instance;
    113125
    114126      $instance['title'] = strip_tags( $new_instance['title'] );
     127
     128
    115129
    116130      $instance['image_size'] = $new_instance['image_size'];
     
    143157      $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
    144158
    145       $image_size = $instance['image_size'];
     159      $view = $instance['view'];
     160
     161      $image_size = $instance['image_size'];
    146162
    147163      $number = $instance['number'];
     
    201217
    202218        if ( $title ):
    203           echo $before_title; 
     219          echo $before_title;
    204220          echo $title;
    205221          echo $after_title;
    206222        endif;
    207223
     224
     225
     226
     227
     228
    208229        $postnum = 0;
    209230
    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(); ?>
    211236
    212237        <div class="shomtek_post">
    213238
    214239          <div class="shomtek_img_container">
    215              
     240
    216241             <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" >
    217              
    218               <?php if(has_post_thumbnail()) { 
     242
     243              <?php if(has_post_thumbnail()) {
    219244
    220245                the_post_thumbnail( $image_size, array('class' => 'shomtek_post_image'));
    221              
     246
    222247              } else {
    223248
     
    233258
    234259              <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a>
    235            
     260
    236261            </h2>
    237  
     262
    238263          <?php if (( $showdate ) or ( $comments_count )) : ?>
    239264
     
    262287
    263288            if ($postnum % $adsnumber == 0) { ?>
    264              
     289
    265290              <div class="show_ads">
    266291
     
    272297          <?php endif; ?>
    273298
    274       <?php  endwhile; endif;
     299      <?php  endwhile;
     300      echo '</div>';
     301      endif;
    275302
    276303      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 ===
    22Contributors: emilushi
    3 Tags: widget, latest post, recent posts, sidebar, latest posts with thumbnails, thumbnails, ads
     3Tags: widget, latest post, recent posts, sidebar, latest posts with thumbnails, thumbnails, ads
    44Requires at least: 3.2
    5 Tested up to: 4.3
    6 Stable tag: 1.0.1
     5Tested up to: 4.
     6Stable tag: 1.
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3737* Fix remove empty div when Ads Code textarea is left empty.
    3838* 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/*--------------------------------------------------------------
     2Copyright (C) shomtek.com
     3Website: http://www.shomtek.com
     4Support: info@shomtek.com
     5Author: Eduart Milushi
     6---------------------------------------------------------------*/
     7h2.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}
     18h2.shomtek_title > a {
     19  color: #ECF0F1 !important;
     20  text-decoration: none;
     21}
     22h2.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
    13/*--------------------------------------------------------------
    24Copyright (C) shomtek.com
     
    2426  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
    2527  > a {
    26     color: @dataColor;
     28    color: @dataColor;
    2729    text-decoration: none;
    2830    &:link {
    29       color: @dataColor;
     31      color: @dataColor;
    3032    }
    3133  }
     
    6668.show_ads {
    6769  text-align: center;
     70
     71
    6872  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  
    3131        'title'               => 'Latest Posts with Pics',
    3232
     33
     34
    3335        'image_size'          => 'medium',
    3436
    3537        'adstext'             => '',
    3638
    37         'comments_count'     => 1,
     39        'comments_count'     => 1,
    3840
    3941        'showdate'            => 1,
     
    4951      $title = esc_attr($instance['title']); // widget title
    5052
     53
     54
    5155      $image_size = $instance['image_size']; // post image size
    5256
     
    5559      $comments_count = ( $instance['comments_count'] === 1 ) ? true : false; // show/hide comments count
    5660
    57       $showdate = ( $instance['showdate'] === 1 ) ? true : false; // show/hide post date 
     61      $showdate = ( $instance['showdate'] === 1 ) ? true : false; // show/hide post date
    5862
    5963      $adsnumber = intval($instance['adsnumber']); // Show ads between posts
     
    6771        <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']; ?>" />
    6872      </p>
     73
     74
     75
     76
     77
     78
     79
     80
    6981
    7082      <p>
     
    109121    // Save widget settings
    110122    function update( $new_instance, $old_instance ) {
    111      
     123
    112124      $instance = $old_instance;
    113125
    114126      $instance['title'] = strip_tags( $new_instance['title'] );
     127
     128
    115129
    116130      $instance['image_size'] = $new_instance['image_size'];
     
    143157      $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
    144158
    145       $image_size = $instance['image_size'];
     159      $view = $instance['view'];
     160
     161      $image_size = $instance['image_size'];
    146162
    147163      $number = $instance['number'];
     
    201217
    202218        if ( $title ):
    203           echo $before_title; 
     219          echo $before_title;
    204220          echo $title;
    205221          echo $after_title;
    206222        endif;
    207223
     224
     225
     226
     227
     228
    208229        $postnum = 0;
    209230
    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(); ?>
    211236
    212237        <div class="shomtek_post">
    213238
    214239          <div class="shomtek_img_container">
    215              
     240
    216241             <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" >
    217              
    218               <?php if(has_post_thumbnail()) { 
     242
     243              <?php if(has_post_thumbnail()) {
    219244
    220245                the_post_thumbnail( $image_size, array('class' => 'shomtek_post_image'));
    221              
     246
    222247              } else {
    223248
     
    233258
    234259              <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a>
    235            
     260
    236261            </h2>
    237  
     262
    238263          <?php if (( $showdate ) or ( $comments_count )) : ?>
    239264
     
    262287
    263288            if ($postnum % $adsnumber == 0) { ?>
    264              
     289
    265290              <div class="show_ads">
    266291
     
    272297          <?php endif; ?>
    273298
    274       <?php  endwhile; endif;
     299      <?php  endwhile;
     300      echo '</div>';
     301      endif;
    275302
    276303      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 ===
    22Contributors: emilushi
    3 Tags: widget, latest post, recent posts, sidebar, latest posts with thumbnails, thumbnails, ads
     3Tags: widget, latest post, recent posts, sidebar, latest posts with thumbnails, thumbnails, ads
    44Requires at least: 3.2
    5 Tested up to: 4.3
    6 Stable tag: 1.0.1
     5Tested up to: 4.
     6Stable tag: 1.
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3737* Fix remove empty div when Ads Code textarea is left empty.
    3838* Added choose Image size option.
     39
     40
     41
     42
     43
     44
Note: See TracChangeset for help on using the changeset viewer.