Version Description
Download this release
Release Info
Developer | satrya |
Plugin | Recent Posts Widget Extended |
Version | 0.9.9.5 |
Comparing to | |
See all releases |
Code changes from version 0.9.9.4 to 0.9.9.5
- includes/form.php +14 -16
- includes/functions.php +3 -3
- includes/helpers.php +0 -21
- readme.txt +1 -1
- rpwe.php +1 -1
includes/form.php
CHANGED
@@ -104,8 +104,8 @@
|
|
104 |
<?php _e( 'Order', 'recent-posts-widget-extended' ); ?>
|
105 |
</label>
|
106 |
<select class="widefat" id="<?php echo $this->get_field_id( 'order' ); ?>" name="<?php echo $this->get_field_name( 'order' ); ?>" style="width:100%;">
|
107 |
-
<option value="DESC" <?php selected( $instance['order'], 'DESC' ); ?>><?php _e( 'Descending', '
|
108 |
-
<option value="ASC" <?php selected( $instance['order'], 'ASC' ); ?>><?php _e( 'Ascending', '
|
109 |
</select>
|
110 |
</p>
|
111 |
|
@@ -114,14 +114,14 @@
|
|
114 |
<?php _e( 'Orderby', 'recent-posts-widget-extended' ); ?>
|
115 |
</label>
|
116 |
<select class="widefat" id="<?php echo $this->get_field_id( 'orderby' ); ?>" name="<?php echo $this->get_field_name( 'orderby' ); ?>" style="width:100%;">
|
117 |
-
<option value="ID" <?php selected( $instance['orderby'], 'ID' ); ?>><?php _e( 'ID', '
|
118 |
-
<option value="author" <?php selected( $instance['orderby'], 'author' ); ?>><?php _e( 'Author', '
|
119 |
-
<option value="title" <?php selected( $instance['orderby'], 'title' ); ?>><?php _e( 'Title', '
|
120 |
-
<option value="date" <?php selected( $instance['orderby'], 'date' ); ?>><?php _e( 'Date', '
|
121 |
-
<option value="modified" <?php selected( $instance['orderby'], 'modified' ); ?>><?php _e( 'Modified', '
|
122 |
-
<option value="rand" <?php selected( $instance['orderby'], 'rand' ); ?>><?php _e( 'Random', '
|
123 |
-
<option value="comment_count" <?php selected( $instance['orderby'], 'comment_count' ); ?>><?php _e( 'Comment Count', '
|
124 |
-
<option value="menu_order" <?php selected( $instance['orderby'], 'menu_order' ); ?>><?php _e( 'Menu Order', '
|
125 |
</select>
|
126 |
</p>
|
127 |
|
@@ -162,8 +162,8 @@
|
|
162 |
<?php _e( 'Limit to Taxonomy', 'recent-posts-widget-extended' ); ?>
|
163 |
</label>
|
164 |
<input type="text" class="widefat" id="<?php echo $this->get_field_id( 'taxonomy' ); ?>" name="<?php echo $this->get_field_name( 'taxonomy' ); ?>" value="<?php echo esc_attr( $instance['taxonomy'] ); ?>" />
|
165 |
-
<small><?php _e( 'Ex: category=1,2,4&post_tag=6,12', '
|
166 |
-
<?php _e( 'Available: ', '
|
167 |
</p>
|
168 |
|
169 |
</div>
|
@@ -185,7 +185,7 @@
|
|
185 |
<small><?php _e( 'The number of posts to skip', 'recent-posts-widget-extended' ); ?></small>
|
186 |
</p>
|
187 |
|
188 |
-
<?php if ( current_theme_supports( 'post-thumbnails' ) )
|
189 |
|
190 |
<p>
|
191 |
<input id="<?php echo $this->get_field_id( 'thumb' ); ?>" name="<?php echo $this->get_field_name( 'thumb' ); ?>" type="checkbox" <?php checked( $instance['thumb'] ); ?> />
|
@@ -215,9 +215,7 @@
|
|
215 |
<small><?php _e( 'Leave it blank to disable.', 'recent-posts-widget-extended' ); ?></small>
|
216 |
</p>
|
217 |
|
218 |
-
<?php
|
219 |
-
<p><?php printf( __( 'Your theme does not support Post Thumbnail feature, please go to %1$shttp://codex.wordpress.org/Post_Thumbnails%2$s to read more info and how to activate it in your theme.', 'recent-posts-widget-extended' ), '<a href="http://codex.wordpress.org/Post_Thumbnails" target="_blank">', '</a>' ); ?></p>
|
220 |
-
<?php endif; ?>
|
221 |
|
222 |
<p>
|
223 |
<input id="<?php echo $this->get_field_id( 'excerpt' ); ?>" name="<?php echo $this->get_field_name( 'excerpt' ); ?>" type="checkbox" <?php checked( $instance['excerpt'] ); ?> />
|
104 |
<?php _e( 'Order', 'recent-posts-widget-extended' ); ?>
|
105 |
</label>
|
106 |
<select class="widefat" id="<?php echo $this->get_field_id( 'order' ); ?>" name="<?php echo $this->get_field_name( 'order' ); ?>" style="width:100%;">
|
107 |
+
<option value="DESC" <?php selected( $instance['order'], 'DESC' ); ?>><?php _e( 'Descending', 'rpwe' ) ?></option>
|
108 |
+
<option value="ASC" <?php selected( $instance['order'], 'ASC' ); ?>><?php _e( 'Ascending', 'rpwe' ) ?></option>
|
109 |
</select>
|
110 |
</p>
|
111 |
|
114 |
<?php _e( 'Orderby', 'recent-posts-widget-extended' ); ?>
|
115 |
</label>
|
116 |
<select class="widefat" id="<?php echo $this->get_field_id( 'orderby' ); ?>" name="<?php echo $this->get_field_name( 'orderby' ); ?>" style="width:100%;">
|
117 |
+
<option value="ID" <?php selected( $instance['orderby'], 'ID' ); ?>><?php _e( 'ID', 'rpwe' ) ?></option>
|
118 |
+
<option value="author" <?php selected( $instance['orderby'], 'author' ); ?>><?php _e( 'Author', 'rpwe' ) ?></option>
|
119 |
+
<option value="title" <?php selected( $instance['orderby'], 'title' ); ?>><?php _e( 'Title', 'rpwe' ) ?></option>
|
120 |
+
<option value="date" <?php selected( $instance['orderby'], 'date' ); ?>><?php _e( 'Date', 'rpwe' ) ?></option>
|
121 |
+
<option value="modified" <?php selected( $instance['orderby'], 'modified' ); ?>><?php _e( 'Modified', 'rpwe' ) ?></option>
|
122 |
+
<option value="rand" <?php selected( $instance['orderby'], 'rand' ); ?>><?php _e( 'Random', 'rpwe' ) ?></option>
|
123 |
+
<option value="comment_count" <?php selected( $instance['orderby'], 'comment_count' ); ?>><?php _e( 'Comment Count', 'rpwe' ) ?></option>
|
124 |
+
<option value="menu_order" <?php selected( $instance['orderby'], 'menu_order' ); ?>><?php _e( 'Menu Order', 'rpwe' ) ?></option>
|
125 |
</select>
|
126 |
</p>
|
127 |
|
162 |
<?php _e( 'Limit to Taxonomy', 'recent-posts-widget-extended' ); ?>
|
163 |
</label>
|
164 |
<input type="text" class="widefat" id="<?php echo $this->get_field_id( 'taxonomy' ); ?>" name="<?php echo $this->get_field_name( 'taxonomy' ); ?>" value="<?php echo esc_attr( $instance['taxonomy'] ); ?>" />
|
165 |
+
<small><?php _e( 'Ex: category=1,2,4&post_tag=6,12', 'rpwe' );?><br />
|
166 |
+
<?php _e( 'Available: ', 'rpwe' ); echo implode( ', ', get_taxonomies( array( 'public' => true ) ) ); ?></small>
|
167 |
</p>
|
168 |
|
169 |
</div>
|
185 |
<small><?php _e( 'The number of posts to skip', 'recent-posts-widget-extended' ); ?></small>
|
186 |
</p>
|
187 |
|
188 |
+
<?php if ( current_theme_supports( 'post-thumbnails' ) ) { ?>
|
189 |
|
190 |
<p>
|
191 |
<input id="<?php echo $this->get_field_id( 'thumb' ); ?>" name="<?php echo $this->get_field_name( 'thumb' ); ?>" type="checkbox" <?php checked( $instance['thumb'] ); ?> />
|
215 |
<small><?php _e( 'Leave it blank to disable.', 'recent-posts-widget-extended' ); ?></small>
|
216 |
</p>
|
217 |
|
218 |
+
<?php } ?>
|
|
|
|
|
219 |
|
220 |
<p>
|
221 |
<input id="<?php echo $this->get_field_id( 'excerpt' ); ?>" name="<?php echo $this->get_field_name( 'excerpt' ); ?>" type="checkbox" <?php checked( $instance['excerpt'] ); ?> />
|
includes/functions.php
CHANGED
@@ -19,7 +19,7 @@ function rpwe_get_default_args() {
|
|
19 |
$css_defaults = ".rpwe-block ul{\nlist-style: none !important;\nmargin-left: 0 !important;\npadding-left: 0 !important;\n}\n\n.rpwe-block li{\nborder-bottom: 1px solid #eee;\nmargin-bottom: 10px;\npadding-bottom: 10px;\nlist-style-type: none;\n}\n\n.rpwe-block a{\ndisplay: inline !important;\ntext-decoration: none;\n}\n\n.rpwe-block h3{\nbackground: none !important;\nclear: none;\nmargin-bottom: 0 !important;\nmargin-top: 0 !important;\nfont-weight: 400;\nfont-size: 12px !important;\nline-height: 1.5em;\n}\n\n.rpwe-thumb{\nborder: 1px solid #eee !important;\nbox-shadow: none !important;\nmargin: 2px 10px 2px 0;\npadding: 3px !important;\n}\n\n.rpwe-summary{\nfont-size: 12px;\n}\n\n.rpwe-time{\ncolor: #bbb;\nfont-size: 11px;\n}\n\n.rpwe-comment{\ncolor: #bbb;\nfont-size: 11px;\npadding-left: 5px;\n}\n\n.rpwe-alignleft{\ndisplay: inline;\nfloat: left;\n}\n\n.rpwe-alignright{\ndisplay: inline;\nfloat: right;\n}\n\n.rpwe-aligncenter{\ndisplay: block;\nmargin-left: auto;\nmargin-right: auto;\n}\n\n.rpwe-clearfix:before,\n.rpwe-clearfix:after{\ncontent: \"\";\ndisplay: table !important;\n}\n\n.rpwe-clearfix:after{\nclear: both;\n}\n\n.rpwe-clearfix{\nzoom: 1;\n}\n";
|
20 |
|
21 |
$defaults = array(
|
22 |
-
'title' => esc_attr__( 'Recent Posts', '
|
23 |
'title_url' => '',
|
24 |
|
25 |
'limit' => 5,
|
@@ -121,7 +121,7 @@ function rpwe_get_recent_posts( $args = array() ) {
|
|
121 |
$image = rpwe_resize( $img_url, $args['thumb_width'], $args['thumb_height'], true );
|
122 |
|
123 |
// Start recent posts markup.
|
124 |
-
$html .= '<li class="
|
125 |
|
126 |
if ( $args['thumb'] ) :
|
127 |
|
@@ -167,7 +167,7 @@ function rpwe_get_recent_posts( $args = array() ) {
|
|
167 |
|
168 |
endif;
|
169 |
|
170 |
-
$html .= '<h3 class="rpwe-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . esc_attr( get_the_title() ) . '</a></h3>';
|
171 |
|
172 |
if ( $args['date'] ) :
|
173 |
$date = get_the_date();
|
19 |
$css_defaults = ".rpwe-block ul{\nlist-style: none !important;\nmargin-left: 0 !important;\npadding-left: 0 !important;\n}\n\n.rpwe-block li{\nborder-bottom: 1px solid #eee;\nmargin-bottom: 10px;\npadding-bottom: 10px;\nlist-style-type: none;\n}\n\n.rpwe-block a{\ndisplay: inline !important;\ntext-decoration: none;\n}\n\n.rpwe-block h3{\nbackground: none !important;\nclear: none;\nmargin-bottom: 0 !important;\nmargin-top: 0 !important;\nfont-weight: 400;\nfont-size: 12px !important;\nline-height: 1.5em;\n}\n\n.rpwe-thumb{\nborder: 1px solid #eee !important;\nbox-shadow: none !important;\nmargin: 2px 10px 2px 0;\npadding: 3px !important;\n}\n\n.rpwe-summary{\nfont-size: 12px;\n}\n\n.rpwe-time{\ncolor: #bbb;\nfont-size: 11px;\n}\n\n.rpwe-comment{\ncolor: #bbb;\nfont-size: 11px;\npadding-left: 5px;\n}\n\n.rpwe-alignleft{\ndisplay: inline;\nfloat: left;\n}\n\n.rpwe-alignright{\ndisplay: inline;\nfloat: right;\n}\n\n.rpwe-aligncenter{\ndisplay: block;\nmargin-left: auto;\nmargin-right: auto;\n}\n\n.rpwe-clearfix:before,\n.rpwe-clearfix:after{\ncontent: \"\";\ndisplay: table !important;\n}\n\n.rpwe-clearfix:after{\nclear: both;\n}\n\n.rpwe-clearfix{\nzoom: 1;\n}\n";
|
20 |
|
21 |
$defaults = array(
|
22 |
+
'title' => esc_attr__( 'Recent Posts', 'rpwe' ),
|
23 |
'title_url' => '',
|
24 |
|
25 |
'limit' => 5,
|
121 |
$image = rpwe_resize( $img_url, $args['thumb_width'], $args['thumb_height'], true );
|
122 |
|
123 |
// Start recent posts markup.
|
124 |
+
$html .= '<li class="rpwe-li rpwe-clearfix">';
|
125 |
|
126 |
if ( $args['thumb'] ) :
|
127 |
|
167 |
|
168 |
endif;
|
169 |
|
170 |
+
$html .= '<h3 class="rpwe-title"><a href="' . esc_url( get_permalink() ) . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'recent-posts-widget-extended' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark">' . esc_attr( get_the_title() ) . '</a></h3>';
|
171 |
|
172 |
if ( $args['date'] ) :
|
173 |
$date = get_the_date();
|
includes/helpers.php
CHANGED
@@ -49,25 +49,4 @@ function rpwe_cats_list() {
|
|
49 |
$cats = get_terms( 'category', $args );
|
50 |
|
51 |
return $cats;
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Add 'first' and 'last' class
|
56 |
-
*
|
57 |
-
* @since 1.0.0
|
58 |
-
*/
|
59 |
-
function rpwe_get_first_last_class( $query = '' ) {
|
60 |
-
|
61 |
-
// Set up empty variable.
|
62 |
-
$class = '';
|
63 |
-
|
64 |
-
// Get the 'first' and 'last' class.
|
65 |
-
if ( 0 == $query->current_post ) {
|
66 |
-
$class = 'rpwe-first ';
|
67 |
-
} elseif ( ( $query->current_post + 1 ) == $query->post_count ) {
|
68 |
-
$class = 'rpwe-last ';
|
69 |
-
}
|
70 |
-
|
71 |
-
return $class;
|
72 |
-
|
73 |
}
|
49 |
$cats = get_terms( 'category', $args );
|
50 |
|
51 |
return $cats;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: themejunkie, satrya
|
|
3 |
Tags: recent posts, random posts, popular posts, thumbnails, widget, widgets, sidebar, excerpt, category, post tag, taxonomy, post type, post status, shortcode, multiple widgets
|
4 |
Requires at least: 3.9
|
5 |
Tested up to: 4.3.1
|
6 |
-
Stable tag: 0.9.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
3 |
Tags: recent posts, random posts, popular posts, thumbnails, widget, widgets, sidebar, excerpt, category, post tag, taxonomy, post type, post status, shortcode, multiple widgets
|
4 |
Requires at least: 3.9
|
5 |
Tested up to: 4.3.1
|
6 |
+
Stable tag: 0.9.9.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
rpwe.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Recent Posts Widget Extended
|
4 |
* Plugin URI: http://www.theme-junkie.com/plugins/recent-posts-widget-extended/
|
5 |
* Description: Enables advanced widget that gives you total control over the output of your site’s most recent Posts.
|
6 |
-
* Version: 0.9.9.
|
7 |
* Author: Satrya
|
8 |
* Author URI: http://www.theme-junkie.com/
|
9 |
* Author Email: support@theme-junkie.com
|
3 |
* Plugin Name: Recent Posts Widget Extended
|
4 |
* Plugin URI: http://www.theme-junkie.com/plugins/recent-posts-widget-extended/
|
5 |
* Description: Enables advanced widget that gives you total control over the output of your site’s most recent Posts.
|
6 |
+
* Version: 0.9.9.5
|
7 |
* Author: Satrya
|
8 |
* Author URI: http://www.theme-junkie.com/
|
9 |
* Author Email: support@theme-junkie.com
|