Version Description
- 4/22/2014 =
- If you use caching plugin, please flush the cache after updating
- Only load admin widget style on Widgets page
- Replaced
get_the_excerpt()
withget_the_content()
for the post excert. Props Akbyte - Fix issue when no posts exist
- Set
suppress_filters
to false to support WPML - Removed date format option. I have to removed it since some people need the date translatable, it will uses 'Date Format' on Settings > General panel.
- Update language
Download this release
Release Info
Developer | satrya |
Plugin | Recent Posts Widget Extended |
Version | 0.9.1 |
Comparing to | |
See all releases |
Code changes from version 0.9 to 0.9.1
- includes/widget-recent-posts-extended.php +128 -124
- languages/rpwe.mo +0 -0
- languages/rpwe.po +45 -55
- readme.txt +69 -84
- rpwe.php +58 -19
includes/widget-recent-posts-extended.php
CHANGED
@@ -3,34 +3,46 @@
|
|
3 |
* The custom recent posts widget.
|
4 |
* This widget gives total control over the output to the user.
|
5 |
*
|
6 |
-
* @
|
7 |
-
* @
|
8 |
-
* @
|
|
|
|
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
-
*
|
|
|
|
|
14 |
*/
|
15 |
function __construct() {
|
16 |
|
17 |
-
|
|
|
18 |
'classname' => 'rpwe_widget recent-posts-extended',
|
19 |
'description' => __( 'An advanced widget that gives you total control over the output of your site’s most recent Posts.', 'rpwe' )
|
20 |
);
|
21 |
|
22 |
-
$
|
23 |
-
'width'
|
24 |
-
'height'
|
25 |
-
'id_base' => 'rpwe_widget'
|
26 |
);
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
}
|
31 |
|
32 |
/**
|
33 |
-
*
|
|
|
|
|
34 |
*/
|
35 |
function widget( $args, $instance ) {
|
36 |
extract( $args, EXTR_SKIP );
|
@@ -53,7 +65,6 @@ class rpwe_widget extends WP_Widget {
|
|
53 |
$tag = $instance['tag'];
|
54 |
$post_type = $instance['post_type'];
|
55 |
$date = $instance['date'];
|
56 |
-
$date_format = strip_tags( $instance['date_format'] );
|
57 |
$readmore = $instance['readmore'];
|
58 |
$readmore_text = strip_tags( $instance['readmore_text'] );
|
59 |
$styles_default = $instance['styles_default'];
|
@@ -81,111 +92,118 @@ class rpwe_widget extends WP_Widget {
|
|
81 |
|
82 |
global $post;
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
104 |
|
|
|
|
|
105 |
?>
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
<ul class="rpwe-ul">
|
110 |
-
|
111 |
-
<?php foreach ( $rpwewidget as $post ) : setup_postdata( $post ); ?>
|
112 |
-
|
113 |
-
<li class="rpwe-clearfix">
|
114 |
-
|
115 |
-
<?php if ( $thumb == true ) { // Check if the thumbnail option enable. ?>
|
116 |
-
|
117 |
-
<?php if ( has_post_thumbnail() ) { // Check If post has post thumbnail. ?>
|
118 |
-
|
119 |
-
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'rpwe' ), the_title_attribute('echo=0' ) ); ?>" rel="bookmark">
|
120 |
-
<?php the_post_thumbnail(
|
121 |
-
array( $thumb_height, $thumb_width, true ),
|
122 |
-
array(
|
123 |
-
'class' => $thumb_align . ' rpwe-thumb the-post-thumbnail',
|
124 |
-
'alt' => esc_attr( get_the_title() ),
|
125 |
-
'title' => esc_attr( get_the_title() )
|
126 |
-
)
|
127 |
-
); ?>
|
128 |
-
</a>
|
129 |
-
|
130 |
-
<?php } elseif ( function_exists( 'get_the_image' ) ) { // Check if get-the-image plugin installed and active. ?>
|
131 |
-
|
132 |
-
<?php get_the_image( array(
|
133 |
-
'height' => $thumb_height,
|
134 |
-
'width' => $thumb_width,
|
135 |
-
'size' => 'rpwe-thumbnail',
|
136 |
-
'image_class' => $thumb_align . ' rpwe-thumb get-the-image',
|
137 |
-
'image_scan' => true,
|
138 |
-
'default_image' => $thumb_default
|
139 |
-
) ); ?>
|
140 |
-
|
141 |
-
<?php } elseif ( $thumb_default ) { // Check if the default image not empty. ?>
|
142 |
-
|
143 |
-
<?php
|
144 |
-
printf( '<a href="%1$s" rel="bookmark"><img class="%2$s rpwe-thumb rpwe-default-thumb" src="%3$s" alt="%4$s" width="%5$s" height="%6$s"></a>',
|
145 |
-
esc_url( get_permalink() ),
|
146 |
-
$thumb_align,
|
147 |
-
$thumb_default,
|
148 |
-
esc_attr( get_the_title() ),
|
149 |
-
$thumb_width,
|
150 |
-
$thumb_height
|
151 |
-
);
|
152 |
-
?>
|
153 |
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
-
|
157 |
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
|
162 |
-
|
163 |
-
<time class="rpwe-time published" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date( $date_format ) ); ?></time>
|
164 |
-
<?php } // endif ?>
|
165 |
-
|
166 |
-
<?php if ( $excerpt == true ) { // Check if the excerpt option enable. ?>
|
167 |
-
<div class="rpwe-summary">
|
168 |
-
<?php echo rpwe_excerpt( $length ); ?>
|
169 |
-
<?php if ( $readmore == true ) { echo '<a href="' . esc_url( get_permalink() ) . '" class="more-link">' . $readmore_text . '</a>'; } ?>
|
170 |
-
</div>
|
171 |
-
<?php } // endif ?>
|
172 |
|
173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
|
175 |
-
|
176 |
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
|
179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
<?php
|
|
|
182 |
|
183 |
echo $after_widget;
|
184 |
|
185 |
}
|
186 |
|
187 |
/**
|
188 |
-
*
|
|
|
|
|
189 |
*/
|
190 |
function update( $new_instance, $old_instance ) {
|
191 |
|
@@ -208,7 +226,6 @@ class rpwe_widget extends WP_Widget {
|
|
208 |
$instance['tag'] = $new_instance['tag'];
|
209 |
$instance['post_type'] = $new_instance['post_type'];
|
210 |
$instance['date'] = $new_instance['date'];
|
211 |
-
$instance['date_format'] = strip_tags( $new_instance['date_format'] );
|
212 |
$instance['readmore'] = $new_instance['readmore'];
|
213 |
$instance['readmore_text'] = strip_tags( $new_instance['readmore_text'] );
|
214 |
$instance['styles_default'] = $new_instance['styles_default'];
|
@@ -219,7 +236,9 @@ class rpwe_widget extends WP_Widget {
|
|
219 |
}
|
220 |
|
221 |
/**
|
222 |
-
*
|
|
|
|
|
223 |
*/
|
224 |
function form( $instance ) {
|
225 |
|
@@ -246,7 +265,6 @@ class rpwe_widget extends WP_Widget {
|
|
246 |
'tag' => '',
|
247 |
'post_type' => '',
|
248 |
'date' => true,
|
249 |
-
'date_format' => 'F j, Y',
|
250 |
'readmore' => false,
|
251 |
'readmore_text' => __( 'Read More »', 'rpwe' ),
|
252 |
'styles_default' => true,
|
@@ -272,7 +290,6 @@ class rpwe_widget extends WP_Widget {
|
|
272 |
$tag = $instance['tag'];
|
273 |
$post_type = $instance['post_type'];
|
274 |
$date = $instance['date'];
|
275 |
-
$date_format = strip_tags( $instance['date_format'] );
|
276 |
$readmore = $instance['readmore'];
|
277 |
$readmore_text = strip_tags( $instance['readmore_text'] );
|
278 |
$styles_default = $instance['styles_default'];
|
@@ -417,11 +434,6 @@ class rpwe_widget extends WP_Widget {
|
|
417 |
<label class="input-checkbox" for="<?php echo esc_attr( $this->get_field_id( 'date' ) ); ?>"><?php _e( 'Display Date', 'rpwe' ); ?></label>
|
418 |
<input id="<?php echo esc_attr( $this->get_field_id( 'date' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'date' ) ); ?>" type="checkbox" value="1" <?php checked( '1', $date ); ?> />
|
419 |
</p>
|
420 |
-
<p>
|
421 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'date_format' ) ); ?>"><?php _e( 'Date Format:', 'rpwe' ); ?></label>
|
422 |
-
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'date_format' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'date_format' ) ); ?>" type="text" value="<?php echo $date_format; ?>"/>
|
423 |
-
<small><?php _e( '<a href="http://codex.wordpress.org/Formatting_Date_and_Time" target="_blank">Date reference</a>', 'rpwe' ) ?></small>
|
424 |
-
</p>
|
425 |
|
426 |
</div>
|
427 |
|
@@ -432,27 +444,19 @@ class rpwe_widget extends WP_Widget {
|
|
432 |
|
433 |
}
|
434 |
|
435 |
-
/**
|
436 |
-
* Register the widget.
|
437 |
-
*
|
438 |
-
* @since 0.1
|
439 |
-
* @link http://codex.wordpress.org/Function_Reference/register_widget
|
440 |
-
*/
|
441 |
-
function rpwe_register_widget() {
|
442 |
-
register_widget( 'rpwe_widget' );
|
443 |
-
}
|
444 |
-
add_action( 'widgets_init', 'rpwe_register_widget' );
|
445 |
-
|
446 |
/**
|
447 |
* Print a custom excerpt.
|
448 |
-
* Code revision in version 0.9, uses wp_trim_words function
|
449 |
*
|
|
|
450 |
* @since 0.1
|
451 |
* @version 0.9
|
|
|
|
|
452 |
* @link http://codex.wordpress.org/Function_Reference/wp_trim_words
|
453 |
*/
|
454 |
function rpwe_excerpt( $length ) {
|
455 |
-
$content =
|
456 |
$excerpt = wp_trim_words( $content, $length );
|
457 |
|
458 |
return $excerpt;
|
@@ -461,7 +465,8 @@ function rpwe_excerpt( $length ) {
|
|
461 |
/**
|
462 |
* Custom Styles.
|
463 |
*
|
464 |
-
* @since
|
|
|
465 |
*/
|
466 |
function rpwe_custom_styles() {
|
467 |
?>
|
@@ -469,5 +474,4 @@ function rpwe_custom_styles() {
|
|
469 |
.rpwe-block ul{list-style:none!important;margin-left:0!important;padding-left:0!important;}.rpwe-block li{border-bottom:1px solid #eee;margin-bottom:10px;padding-bottom:10px;list-style-type: none;}.rpwe-block a{display:inline!important;text-decoration:none;}.rpwe-block h3{background:none!important;clear:none;margin-bottom:0!important;margin-top:0!important;font-weight:400;font-size:12px!important;line-height:1.5em;}.rpwe-thumb{border:1px solid #EEE!important;box-shadow:none!important;margin:2px 10px 2px 0;padding:3px!important;}.rpwe-summary{font-size:12px;}.rpwe-time{color:#bbb;font-size:11px;}.rpwe-alignleft{display:inline;float:left;}.rpwe-alignright{display:inline;float:right;}.rpwe-alignnone{display:block;float:none;}.rpwe-clearfix:before,.rpwe-clearfix:after{content:"";display:table !important;}.rpwe-clearfix:after{clear:both;}.rpwe-clearfix{zoom:1;}
|
470 |
</style>
|
471 |
<?php
|
472 |
-
}
|
473 |
-
?>
|
3 |
* The custom recent posts widget.
|
4 |
* This widget gives total control over the output to the user.
|
5 |
*
|
6 |
+
* @package Recent_Posts_Widget_Extended
|
7 |
+
* @since 0.1
|
8 |
+
* @author Satrya
|
9 |
+
* @copyright Copyright (c) 2014, Satrya
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
12 |
+
class Recent_Posts_Widget_Extended extends WP_Widget {
|
13 |
|
14 |
/**
|
15 |
+
* Sets up the widgets.
|
16 |
+
*
|
17 |
+
* @since 0.1
|
18 |
*/
|
19 |
function __construct() {
|
20 |
|
21 |
+
/* Set up the widget options. */
|
22 |
+
$widget_options = array(
|
23 |
'classname' => 'rpwe_widget recent-posts-extended',
|
24 |
'description' => __( 'An advanced widget that gives you total control over the output of your site’s most recent Posts.', 'rpwe' )
|
25 |
);
|
26 |
|
27 |
+
$control_options = array(
|
28 |
+
'width' => 800,
|
29 |
+
'height' => 350
|
|
|
30 |
);
|
31 |
|
32 |
+
/* Create the widget. */
|
33 |
+
$this->WP_Widget(
|
34 |
+
'rpwe_widget', // $this->id_base
|
35 |
+
__( 'Recent Posts Extended', 'rpwe' ), // $this->name
|
36 |
+
$widget_options, // $this->widget_options
|
37 |
+
$control_options // $this->control_options
|
38 |
+
);
|
39 |
|
40 |
}
|
41 |
|
42 |
/**
|
43 |
+
* Outputs the widget based on the arguments input through the widget controls.
|
44 |
+
*
|
45 |
+
* @since 0.1
|
46 |
*/
|
47 |
function widget( $args, $instance ) {
|
48 |
extract( $args, EXTR_SKIP );
|
65 |
$tag = $instance['tag'];
|
66 |
$post_type = $instance['post_type'];
|
67 |
$date = $instance['date'];
|
|
|
68 |
$readmore = $instance['readmore'];
|
69 |
$readmore_text = strip_tags( $instance['readmore_text'] );
|
70 |
$styles_default = $instance['styles_default'];
|
92 |
|
93 |
global $post;
|
94 |
|
95 |
+
/* Set up the query arguments. */
|
96 |
+
$args = array(
|
97 |
+
'posts_per_page' => $limit,
|
98 |
+
'category__in' => $cat,
|
99 |
+
'tag__in' => $tag,
|
100 |
+
'post_type' => $post_type,
|
101 |
+
'offset' => $offset,
|
102 |
+
'order' => $order,
|
103 |
+
'orderby' => $orderby,
|
104 |
+
/* Set it to false to allow WPML modifying the query. */
|
105 |
+
'suppress_filters' => false
|
106 |
+
);
|
107 |
+
|
108 |
+
/* Allow developer to filter the query. */
|
109 |
+
$default_args = apply_filters( 'rpwe_default_query_arguments', $args );
|
110 |
+
|
111 |
+
/**
|
112 |
+
* The main Query
|
113 |
+
*
|
114 |
+
* @link http://codex.wordpress.org/Function_Reference/get_posts
|
115 |
+
*/
|
116 |
+
$rpwewidget = get_posts( $default_args );
|
117 |
|
118 |
+
/* Check if posts exist. */
|
119 |
+
if ( $rpwewidget ) {
|
120 |
?>
|
121 |
|
122 |
+
<div <?php echo( ! empty( $cssID ) ? 'id="' . $cssID . '"' : '' ); ?> class="rpwe-block">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
+
<ul class="rpwe-ul">
|
125 |
+
|
126 |
+
<?php foreach ( $rpwewidget as $post ) : setup_postdata( $post ); ?>
|
127 |
+
|
128 |
+
<li class="rpwe-clearfix">
|
129 |
+
|
130 |
+
<?php if ( $thumb == true ) { // Check if the thumbnail option enable. ?>
|
131 |
|
132 |
+
<?php if ( has_post_thumbnail() ) { // Check If post has post thumbnail. ?>
|
133 |
|
134 |
+
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'rpwe' ), the_title_attribute('echo=0' ) ); ?>" rel="bookmark">
|
135 |
+
<?php the_post_thumbnail(
|
136 |
+
array( $thumb_height, $thumb_width, true ),
|
137 |
+
array(
|
138 |
+
'class' => $thumb_align . ' rpwe-thumb the-post-thumbnail',
|
139 |
+
'alt' => esc_attr( get_the_title() ),
|
140 |
+
'title' => esc_attr( get_the_title() )
|
141 |
+
)
|
142 |
+
); ?>
|
143 |
+
</a>
|
144 |
|
145 |
+
<?php } elseif ( function_exists( 'get_the_image' ) ) { // Check if get-the-image plugin installed and active. ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
+
<?php get_the_image( array(
|
148 |
+
'height' => $thumb_height,
|
149 |
+
'width' => $thumb_width,
|
150 |
+
'size' => 'rpwe-thumbnail',
|
151 |
+
'image_class' => $thumb_align . ' rpwe-thumb get-the-image',
|
152 |
+
'image_scan' => true,
|
153 |
+
'default_image' => $thumb_default
|
154 |
+
) ); ?>
|
155 |
|
156 |
+
<?php } elseif ( $thumb_default ) { // Check if the default image not empty. ?>
|
157 |
|
158 |
+
<?php
|
159 |
+
printf( '<a href="%1$s" rel="bookmark"><img class="%2$s rpwe-thumb rpwe-default-thumb" src="%3$s" alt="%4$s" width="%5$s" height="%6$s"></a>',
|
160 |
+
esc_url( get_permalink() ),
|
161 |
+
$thumb_align,
|
162 |
+
$thumb_default,
|
163 |
+
esc_attr( get_the_title() ),
|
164 |
+
$thumb_width,
|
165 |
+
$thumb_height
|
166 |
+
);
|
167 |
+
?>
|
168 |
|
169 |
+
<?php } // endif ?>
|
170 |
+
|
171 |
+
<?php } // endif ?>
|
172 |
+
|
173 |
+
<h3 class="rpwe-title">
|
174 |
+
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'rpwe' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
|
175 |
+
</h3>
|
176 |
+
|
177 |
+
<?php if ( $date == true ) { // Check if the date option enable. ?>
|
178 |
+
<time class="rpwe-time published" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo get_the_date(); ?></time>
|
179 |
+
<?php } // endif ?>
|
180 |
+
|
181 |
+
<?php if ( $excerpt == true ) { // Check if the excerpt option enable. ?>
|
182 |
+
<div class="rpwe-summary">
|
183 |
+
<?php echo rpwe_excerpt( $length ); ?>
|
184 |
+
<?php if ( $readmore == true ) { echo '<a href="' . esc_url( get_permalink() ) . '" class="more-link">' . $readmore_text . '</a>'; } ?>
|
185 |
+
</div>
|
186 |
+
<?php } // endif ?>
|
187 |
+
|
188 |
+
</li>
|
189 |
+
|
190 |
+
<?php endforeach; wp_reset_postdata(); ?>
|
191 |
+
|
192 |
+
</ul>
|
193 |
+
|
194 |
+
</div><!-- .rpwe-block - http://wordpress.org/plugins/recent-posts-widget-extended/ -->
|
195 |
|
196 |
<?php
|
197 |
+
} /* End check. */
|
198 |
|
199 |
echo $after_widget;
|
200 |
|
201 |
}
|
202 |
|
203 |
/**
|
204 |
+
* Updates the widget control options for the particular instance of the widget.
|
205 |
+
*
|
206 |
+
* @since 0.1
|
207 |
*/
|
208 |
function update( $new_instance, $old_instance ) {
|
209 |
|
226 |
$instance['tag'] = $new_instance['tag'];
|
227 |
$instance['post_type'] = $new_instance['post_type'];
|
228 |
$instance['date'] = $new_instance['date'];
|
|
|
229 |
$instance['readmore'] = $new_instance['readmore'];
|
230 |
$instance['readmore_text'] = strip_tags( $new_instance['readmore_text'] );
|
231 |
$instance['styles_default'] = $new_instance['styles_default'];
|
236 |
}
|
237 |
|
238 |
/**
|
239 |
+
* Displays the widget control options in the Widgets admin screen.
|
240 |
+
*
|
241 |
+
* @since 0.1
|
242 |
*/
|
243 |
function form( $instance ) {
|
244 |
|
265 |
'tag' => '',
|
266 |
'post_type' => '',
|
267 |
'date' => true,
|
|
|
268 |
'readmore' => false,
|
269 |
'readmore_text' => __( 'Read More »', 'rpwe' ),
|
270 |
'styles_default' => true,
|
290 |
$tag = $instance['tag'];
|
291 |
$post_type = $instance['post_type'];
|
292 |
$date = $instance['date'];
|
|
|
293 |
$readmore = $instance['readmore'];
|
294 |
$readmore_text = strip_tags( $instance['readmore_text'] );
|
295 |
$styles_default = $instance['styles_default'];
|
434 |
<label class="input-checkbox" for="<?php echo esc_attr( $this->get_field_id( 'date' ) ); ?>"><?php _e( 'Display Date', 'rpwe' ); ?></label>
|
435 |
<input id="<?php echo esc_attr( $this->get_field_id( 'date' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'date' ) ); ?>" type="checkbox" value="1" <?php checked( '1', $date ); ?> />
|
436 |
</p>
|
|
|
|
|
|
|
|
|
|
|
437 |
|
438 |
</div>
|
439 |
|
444 |
|
445 |
}
|
446 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
/**
|
448 |
* Print a custom excerpt.
|
449 |
+
* Code revision in version 0.9, uses wp_trim_words function.
|
450 |
*
|
451 |
+
* @param integer $length
|
452 |
* @since 0.1
|
453 |
* @version 0.9
|
454 |
+
* @access public
|
455 |
+
* @return string
|
456 |
* @link http://codex.wordpress.org/Function_Reference/wp_trim_words
|
457 |
*/
|
458 |
function rpwe_excerpt( $length ) {
|
459 |
+
$content = get_the_content();
|
460 |
$excerpt = wp_trim_words( $content, $length );
|
461 |
|
462 |
return $excerpt;
|
465 |
/**
|
466 |
* Custom Styles.
|
467 |
*
|
468 |
+
* @since 0.8
|
469 |
+
* @access public
|
470 |
*/
|
471 |
function rpwe_custom_styles() {
|
472 |
?>
|
474 |
.rpwe-block ul{list-style:none!important;margin-left:0!important;padding-left:0!important;}.rpwe-block li{border-bottom:1px solid #eee;margin-bottom:10px;padding-bottom:10px;list-style-type: none;}.rpwe-block a{display:inline!important;text-decoration:none;}.rpwe-block h3{background:none!important;clear:none;margin-bottom:0!important;margin-top:0!important;font-weight:400;font-size:12px!important;line-height:1.5em;}.rpwe-thumb{border:1px solid #EEE!important;box-shadow:none!important;margin:2px 10px 2px 0;padding:3px!important;}.rpwe-summary{font-size:12px;}.rpwe-time{color:#bbb;font-size:11px;}.rpwe-alignleft{display:inline;float:left;}.rpwe-alignright{display:inline;float:right;}.rpwe-alignnone{display:block;float:none;}.rpwe-clearfix:before,.rpwe-clearfix:after{content:"";display:table !important;}.rpwe-clearfix:after{clear:both;}.rpwe-clearfix{zoom:1;}
|
475 |
</style>
|
476 |
<?php
|
477 |
+
}
|
|
languages/rpwe.mo
CHANGED
Binary file
|
languages/rpwe.po
CHANGED
@@ -1,187 +1,177 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Recent Posts Widget Extended 0.6\n"
|
4 |
-
"POT-Creation-Date: 2014-
|
5 |
-
"PO-Revision-Date: 2014-
|
6 |
"Last-Translator: Satrya <satrya@satrya.me>\n"
|
7 |
-
"Language-Team: Satrya <satrya@
|
8 |
"Language: en\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.6.
|
13 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr__\n"
|
14 |
"X-Poedit-Basepath: .\n"
|
15 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"X-Poedit-SearchPath-0: ..\n"
|
18 |
|
19 |
-
#: ../includes/widget-recent-posts-extended.php:
|
20 |
msgid ""
|
21 |
"An advanced widget that gives you total control over the output of your "
|
22 |
"site’s most recent Posts."
|
23 |
msgstr ""
|
24 |
|
25 |
-
#: ../includes/widget-recent-posts-extended.php:
|
26 |
msgid "Recent Posts Extended"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: ../includes/widget-recent-posts-extended.php:
|
30 |
-
#: ../includes/widget-recent-posts-extended.php:
|
31 |
#, php-format
|
32 |
msgid "Permalink to %s"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: ../includes/widget-recent-posts-extended.php:
|
36 |
msgid "Read More »"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: ../includes/widget-recent-posts-extended.php:
|
40 |
msgid "Title:"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: ../includes/widget-recent-posts-extended.php:
|
44 |
msgid "Title URL:"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: ../includes/widget-recent-posts-extended.php:
|
48 |
msgid "CSS ID:"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: ../includes/widget-recent-posts-extended.php:
|
52 |
msgid "Use Default Styles"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: ../includes/widget-recent-posts-extended.php:
|
56 |
msgid "CSS:"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: ../includes/widget-recent-posts-extended.php:
|
60 |
msgid "If you turn off the default styles, please create your own style."
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: ../includes/widget-recent-posts-extended.php:
|
64 |
msgid "Limit:"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: ../includes/widget-recent-posts-extended.php:
|
68 |
msgid "Offset (the number of posts to skip):"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: ../includes/widget-recent-posts-extended.php:
|
72 |
msgid "Order:"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: ../includes/widget-recent-posts-extended.php:
|
76 |
msgid "DESC"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: ../includes/widget-recent-posts-extended.php:
|
80 |
msgid "ASC"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: ../includes/widget-recent-posts-extended.php:
|
84 |
msgid "Orderby:"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: ../includes/widget-recent-posts-extended.php:
|
88 |
msgid "ID"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: ../includes/widget-recent-posts-extended.php:
|
92 |
msgid "Author"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: ../includes/widget-recent-posts-extended.php:
|
96 |
msgid "Title"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: ../includes/widget-recent-posts-extended.php:
|
100 |
msgid "Date"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: ../includes/widget-recent-posts-extended.php:
|
104 |
msgid "Modified"
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: ../includes/widget-recent-posts-extended.php:
|
108 |
msgid "Random"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: ../includes/widget-recent-posts-extended.php:
|
112 |
msgid "Comment Count"
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: ../includes/widget-recent-posts-extended.php:
|
116 |
msgid "Menu Order"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: ../includes/widget-recent-posts-extended.php:
|
120 |
msgid "Limit to Category: "
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: ../includes/widget-recent-posts-extended.php:
|
124 |
msgid "Limit to Tag: "
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: ../includes/widget-recent-posts-extended.php:
|
128 |
msgid "Choose the Post Type: "
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: ../includes/widget-recent-posts-extended.php:
|
132 |
msgid "Display Thumbnail"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: ../includes/widget-recent-posts-extended.php:
|
136 |
msgid "Thumbnail (height, width, align):"
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: ../includes/widget-recent-posts-extended.php:
|
140 |
msgid "Left"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: ../includes/widget-recent-posts-extended.php:
|
144 |
msgid "Right"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: ../includes/widget-recent-posts-extended.php:
|
148 |
msgid "Center"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: ../includes/widget-recent-posts-extended.php:
|
152 |
msgid "Default Thumbnail:"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: ../includes/widget-recent-posts-extended.php:
|
156 |
msgid "Leave it blank to disable."
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: ../includes/widget-recent-posts-extended.php:
|
160 |
msgid "Display Excerpt"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: ../includes/widget-recent-posts-extended.php:
|
164 |
msgid "Excerpt Length:"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: ../includes/widget-recent-posts-extended.php:
|
168 |
msgid "Display Readmore"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: ../includes/widget-recent-posts-extended.php:
|
172 |
msgid "Readmore Text:"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: ../includes/widget-recent-posts-extended.php:
|
176 |
msgid "Display Date"
|
177 |
msgstr ""
|
178 |
-
|
179 |
-
#: ../includes/widget-recent-posts-extended.php:421
|
180 |
-
msgid "Date Format:"
|
181 |
-
msgstr ""
|
182 |
-
|
183 |
-
#: ../includes/widget-recent-posts-extended.php:423
|
184 |
-
msgid ""
|
185 |
-
"<a href=\"http://codex.wordpress.org/Formatting_Date_and_Time\" target="
|
186 |
-
"\"_blank\">Date reference</a>"
|
187 |
-
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Recent Posts Widget Extended 0.6\n"
|
4 |
+
"POT-Creation-Date: 2014-04-23 01:06+0700\n"
|
5 |
+
"PO-Revision-Date: 2014-04-23 01:06+0700\n"
|
6 |
"Last-Translator: Satrya <satrya@satrya.me>\n"
|
7 |
+
"Language-Team: Satrya <satrya@satrya.me>\n"
|
8 |
"Language: en\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.4\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;esc_attr__;esc_html__\n"
|
14 |
"X-Poedit-Basepath: .\n"
|
15 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"X-Poedit-SearchPath-0: ..\n"
|
18 |
|
19 |
+
#: ../includes/widget-recent-posts-extended.php:24
|
20 |
msgid ""
|
21 |
"An advanced widget that gives you total control over the output of your "
|
22 |
"site’s most recent Posts."
|
23 |
msgstr ""
|
24 |
|
25 |
+
#: ../includes/widget-recent-posts-extended.php:35
|
26 |
msgid "Recent Posts Extended"
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: ../includes/widget-recent-posts-extended.php:134
|
30 |
+
#: ../includes/widget-recent-posts-extended.php:174
|
31 |
#, php-format
|
32 |
msgid "Permalink to %s"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: ../includes/widget-recent-posts-extended.php:269
|
36 |
msgid "Read More »"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: ../includes/widget-recent-posts-extended.php:303
|
40 |
msgid "Title:"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: ../includes/widget-recent-posts-extended.php:307
|
44 |
msgid "Title URL:"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: ../includes/widget-recent-posts-extended.php:311
|
48 |
msgid "CSS ID:"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: ../includes/widget-recent-posts-extended.php:315
|
52 |
msgid "Use Default Styles"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: ../includes/widget-recent-posts-extended.php:319
|
56 |
msgid "CSS:"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: ../includes/widget-recent-posts-extended.php:321
|
60 |
msgid "If you turn off the default styles, please create your own style."
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: ../includes/widget-recent-posts-extended.php:329
|
64 |
msgid "Limit:"
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: ../includes/widget-recent-posts-extended.php:333
|
68 |
msgid "Offset (the number of posts to skip):"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: ../includes/widget-recent-posts-extended.php:337
|
72 |
msgid "Order:"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: ../includes/widget-recent-posts-extended.php:339
|
76 |
msgid "DESC"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: ../includes/widget-recent-posts-extended.php:340
|
80 |
msgid "ASC"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: ../includes/widget-recent-posts-extended.php:344
|
84 |
msgid "Orderby:"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: ../includes/widget-recent-posts-extended.php:346
|
88 |
msgid "ID"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: ../includes/widget-recent-posts-extended.php:347
|
92 |
msgid "Author"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: ../includes/widget-recent-posts-extended.php:348
|
96 |
msgid "Title"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: ../includes/widget-recent-posts-extended.php:349
|
100 |
msgid "Date"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: ../includes/widget-recent-posts-extended.php:350
|
104 |
msgid "Modified"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: ../includes/widget-recent-posts-extended.php:351
|
108 |
msgid "Random"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: ../includes/widget-recent-posts-extended.php:352
|
112 |
msgid "Comment Count"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: ../includes/widget-recent-posts-extended.php:353
|
116 |
msgid "Menu Order"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: ../includes/widget-recent-posts-extended.php:357
|
120 |
msgid "Limit to Category: "
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: ../includes/widget-recent-posts-extended.php:368
|
124 |
msgid "Limit to Tag: "
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: ../includes/widget-recent-posts-extended.php:380
|
128 |
msgid "Choose the Post Type: "
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: ../includes/widget-recent-posts-extended.php:396
|
132 |
msgid "Display Thumbnail"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: ../includes/widget-recent-posts-extended.php:400
|
136 |
msgid "Thumbnail (height, width, align):"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: ../includes/widget-recent-posts-extended.php:404
|
140 |
msgid "Left"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: ../includes/widget-recent-posts-extended.php:405
|
144 |
msgid "Right"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: ../includes/widget-recent-posts-extended.php:406
|
148 |
msgid "Center"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: ../includes/widget-recent-posts-extended.php:410
|
152 |
msgid "Default Thumbnail:"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: ../includes/widget-recent-posts-extended.php:412
|
156 |
msgid "Leave it blank to disable."
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: ../includes/widget-recent-posts-extended.php:418
|
160 |
msgid "Display Excerpt"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: ../includes/widget-recent-posts-extended.php:422
|
164 |
msgid "Excerpt Length:"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: ../includes/widget-recent-posts-extended.php:426
|
168 |
msgid "Display Readmore"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: ../includes/widget-recent-posts-extended.php:430
|
172 |
msgid "Readmore Text:"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: ../includes/widget-recent-posts-extended.php:434
|
176 |
msgid "Display Date"
|
177 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Plugin Name ===
|
2 |
-
Contributors: satrya, themephe, davidkryzaniak
|
3 |
-
Donate link:
|
4 |
-
Tags: recent posts, thumbnails, widget, widgets, sidebar, excerpt, category, post tag, post type, multiple widgets
|
5 |
-
Requires at least: 3.
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 0.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -12,13 +12,24 @@ Provides flexible and advanced recent posts widget. Allows you to display them w
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
This plugin will enable a custom, flexible and super advanced recent posts widget. Allows you to display a list of the most recent posts with thumbnail, excerpt and post date, also you can display it from all or specific or multiple category or tag.
|
18 |
|
19 |
= Features Include: =
|
20 |
|
21 |
-
* WordPress 3.
|
22 |
* You can set the title url.
|
23 |
* **Display by date, comment count or random.** *new*
|
24 |
* Display thumbnails, with customizable size and alignment.
|
@@ -43,104 +54,78 @@ This plugin creates custom image sizes. If you use images that were uploaded to
|
|
43 |
* [Twenty Twelve](http://wordpress.org/themes/twentytwelve)
|
44 |
* [Twenty Fourteen](http://wordpress.org/themes/twentyfourteen)
|
45 |
* [Stargazer](http://wordpress.org/themes/stargazer)
|
|
|
|
|
|
|
46 |
|
47 |
= Support =
|
48 |
|
49 |
* Go to [forum support](http://wordpress.org/support/plugin/recent-posts-widget-extended).
|
50 |
-
* [Open issue on github](https://github.com/satrya/recent-posts-widget-extended).
|
51 |
* [Rate/Review the plugin](http://wordpress.org/support/view/plugin-reviews/recent-posts-widget-extended).
|
52 |
|
53 |
= Plugin Info =
|
54 |
-
* Developed by [Satrya](http://
|
55 |
-
*
|
56 |
|
57 |
= Donations =
|
58 |
-
If you want to buy me a cup of coffee, you can do by visiting [this page](
|
59 |
|
60 |
== Installation ==
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
== Frequently Asked Questions ==
|
67 |
|
68 |
-
= How to filter the query
|
69 |
-
You can use `rpwe_default_query_arguments`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
= Thumbnail size option not working properly =
|
72 |
Yes, this is because the plugin uses `the_post_thumbnail` custom sizes and not uses `add_image_size` function, [more information](http://codex.wordpress.org/Function_Reference/the_post_thumbnail). At the moment I have no idea how to fix this issue.
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
== Screenshots ==
|
75 |
|
76 |
1. The widget settings
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
-
= 0.
|
81 |
-
*
|
82 |
-
|
83 |
-
|
84 |
-
*
|
85 |
-
*
|
86 |
-
*
|
87 |
-
*
|
88 |
-
* Set
|
89 |
-
*
|
90 |
-
*
|
91 |
-
* Change `numberposts` with `posts_per_page`
|
92 |
-
* Trim excerpt uses `wp_trim_words` function
|
93 |
-
* Update language
|
94 |
-
|
95 |
-
= 0.8 =
|
96 |
-
* PLEASE RE-SAVE THE WIDGET
|
97 |
-
* Remove caching system, it causing some issues
|
98 |
-
* Change Limit option to input text rather than selectbox
|
99 |
-
* Add `rpwe_default_query_arguments` filter to allow developer filter the query
|
100 |
-
* Fix widget title filter bug
|
101 |
-
* Add Multiple categories
|
102 |
-
* Add Multiple tags
|
103 |
-
* Add offset & order options
|
104 |
-
* Add Read more option
|
105 |
-
* Add Default thumbnail
|
106 |
-
* Add Thumbnail alignment
|
107 |
-
* Add widget title link
|
108 |
-
* Add absolute date
|
109 |
-
* Add turn on off default styles
|
110 |
-
|
111 |
-
= 0.7.1 =
|
112 |
-
* PLEASE RE-SAVE THE WIDGET
|
113 |
-
* Added setting for cache life
|
114 |
-
* Added input for CSS class (used for custom styling)
|
115 |
-
* Fix the inline issue on some themes
|
116 |
-
* Update language
|
117 |
-
|
118 |
-
= 0.7 =
|
119 |
-
* Remove `a` tag when no thumbnail
|
120 |
-
* Add custom css box
|
121 |
-
* Inheritance `font-family`
|
122 |
-
* Update language
|
123 |
-
|
124 |
-
= 0.6 =
|
125 |
-
* Update language
|
126 |
-
* Reset the loop
|
127 |
-
|
128 |
-
= 0.5 =
|
129 |
-
* Minor update
|
130 |
-
|
131 |
-
= 0.4 =
|
132 |
-
* Add date option
|
133 |
-
* Support `get_the_image` function
|
134 |
-
* Re-arrange markup
|
135 |
-
* Update language
|
136 |
-
|
137 |
-
= 0.3 =
|
138 |
-
* WordPress 3.5 compatibility
|
139 |
-
* Upload header image
|
140 |
-
* Sanitize `get_the_title` function
|
141 |
-
|
142 |
-
= 0.2 =
|
143 |
-
* Minor update
|
144 |
-
|
145 |
-
= 0.1 =
|
146 |
-
* Initial release
|
1 |
=== Plugin Name ===
|
2 |
+
Contributors: satrya, themejunkie, themephe, davidkryzaniak, akbyte
|
3 |
+
Donate link: http://satrya.me/donate/
|
4 |
+
Tags: recent posts, random posts, thumbnails, widget, widgets, sidebar, excerpt, category, post tag, post type, multiple widgets
|
5 |
+
Requires at least: 3.6
|
6 |
+
Tested up to: 3.9
|
7 |
+
Stable tag: 0.9.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
**Version 1.0.0 Coming Soon**
|
16 |
+
Version 1.0.0 is the first major update for the plugin. It will comes with more cool features such as:
|
17 |
+
|
18 |
+
* More clean code
|
19 |
+
* Shortcodes
|
20 |
+
* Fix the thumbnail size issue
|
21 |
+
* Pagination support
|
22 |
+
* Taxonomy support
|
23 |
+
* Display post author
|
24 |
+
* Display post taxonomy
|
25 |
+
* Masonry layout (*experiment*)
|
26 |
+
* And much more!
|
27 |
|
28 |
This plugin will enable a custom, flexible and super advanced recent posts widget. Allows you to display a list of the most recent posts with thumbnail, excerpt and post date, also you can display it from all or specific or multiple category or tag.
|
29 |
|
30 |
= Features Include: =
|
31 |
|
32 |
+
* WordPress 3.9 Support.
|
33 |
* You can set the title url.
|
34 |
* **Display by date, comment count or random.** *new*
|
35 |
* Display thumbnails, with customizable size and alignment.
|
54 |
* [Twenty Twelve](http://wordpress.org/themes/twentytwelve)
|
55 |
* [Twenty Fourteen](http://wordpress.org/themes/twentyfourteen)
|
56 |
* [Stargazer](http://wordpress.org/themes/stargazer)
|
57 |
+
* [Satu](http://wordpress.org/themes/satu)
|
58 |
+
* [Tiga](http://wordpress.org/themes/tiga)
|
59 |
+
* [Skyfall](http://wordpress.org/themes/skyfall)
|
60 |
|
61 |
= Support =
|
62 |
|
63 |
* Go to [forum support](http://wordpress.org/support/plugin/recent-posts-widget-extended).
|
|
|
64 |
* [Rate/Review the plugin](http://wordpress.org/support/view/plugin-reviews/recent-posts-widget-extended).
|
65 |
|
66 |
= Plugin Info =
|
67 |
+
* Developed by [Satrya](http://satrya.me/) & [Theme Junkie](http://www.theme-junkie.com/)
|
68 |
+
* Check out the [Github](https://github.com/satrya/recent-posts-widget-extended) repo to contribute.
|
69 |
|
70 |
= Donations =
|
71 |
+
If you want to buy me a cup of coffee, you can do by visiting [this page](http://satrya.me/donate/). I appreciate all donations, no matter the size.
|
72 |
|
73 |
== Installation ==
|
74 |
|
75 |
+
**Through Dashboard**
|
76 |
+
|
77 |
+
1. Log in to your WordPress admin panel and go to Plugins -> Add New
|
78 |
+
2. Type **recent posts widget extended** in the search box and click on search button.
|
79 |
+
3. Find Recent Posts Widget Extended plugin.
|
80 |
+
4. Then click on Install Now after that activate the plugin.
|
81 |
+
5. Go to the widgets page **Appearance -> Widgets**.
|
82 |
+
6. Find **Recent Posts Extended** widget.
|
83 |
+
|
84 |
+
**Installing Via FTP**
|
85 |
+
|
86 |
+
1. Download the plugin to your hardisk.
|
87 |
+
2. Unzip.
|
88 |
+
3. Upload the **recent-posts-widget-extended** folder into your plugins directory.
|
89 |
+
4. Log in to your WordPress admin panel and click the Plugins menu.
|
90 |
+
5. Then activate the plugin.
|
91 |
+
6. Go to the widgets page **Appearance -> Widgets**.
|
92 |
+
7. Find **Recent Posts Extended** widget.
|
93 |
|
94 |
== Frequently Asked Questions ==
|
95 |
|
96 |
+
= How to filter the post query? =
|
97 |
+
You can use `rpwe_default_query_arguments` to filter it.
|
98 |
+
`
|
99 |
+
add_filter( 'rpwe_default_query_arguments', 'your_custom_function' );
|
100 |
+
function your_custom_function( $args ) {
|
101 |
+
$args['posts_per_page'] = 10; // Changing the number of posts to show.
|
102 |
+
return $args;
|
103 |
+
}
|
104 |
+
`
|
105 |
|
106 |
= Thumbnail size option not working properly =
|
107 |
Yes, this is because the plugin uses `the_post_thumbnail` custom sizes and not uses `add_image_size` function, [more information](http://codex.wordpress.org/Function_Reference/the_post_thumbnail). At the moment I have no idea how to fix this issue.
|
108 |
|
109 |
+
= Ordering not working! =
|
110 |
+
Did you installed any Post or Post Type Order? Please try to deactivate it and try again the ordering. [(related question)](http://wordpress.org/support/topic/ordering-set-to-descending-not-working)
|
111 |
+
|
112 |
+
= No image options =
|
113 |
+
Your theme needs to support Post Thumbnail, please go to http://codex.wordpress.org/Post_Thumbnails to read more info and how to activate it in your theme.
|
114 |
+
|
115 |
== Screenshots ==
|
116 |
|
117 |
1. The widget settings
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 1.0.0 - Coming Soon =
|
122 |
+
* The first major update, please read the Description tab for more info.
|
123 |
+
|
124 |
+
= 0.9.1 - 4/22/2014 =
|
125 |
+
* If you use caching plugin, please flush the cache after updating
|
126 |
+
* Only load admin widget style on Widgets page
|
127 |
+
* Replaced `get_the_excerpt()` with `get_the_content()` for the post excert. Props [Akbyte](http://profiles.wordpress.org/akbyte/)
|
128 |
+
* Fix issue when no posts exist
|
129 |
+
* Set `suppress_filters` to false to support WPML
|
130 |
+
* Removed date format option. I have to removed it since some people need the date translatable, it will uses 'Date Format' on Settings > General panel.
|
131 |
+
* Update language
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rpwe.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Recent Posts Widget Extended
|
4 |
-
* Plugin URI: http://
|
5 |
* Description: Enables advanced widget that gives you total control over the output of your site’s most recent Posts.
|
6 |
-
* Version: 0.9
|
7 |
* Author: Satrya
|
8 |
-
* Author URI: http://
|
9 |
-
* Author Email: satrya@
|
10 |
*
|
11 |
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
12 |
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
@@ -18,54 +18,73 @@
|
|
18 |
* You should have received a copy of the GNU General Public License along with this program; if not, write
|
19 |
* to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
20 |
*
|
21 |
-
* @
|
22 |
-
* @
|
23 |
-
* @
|
|
|
|
|
24 |
*/
|
25 |
|
26 |
// Exit if accessed directly
|
27 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
28 |
|
29 |
-
if ( ! class_exists( 'RPW_Extended' ) ) :
|
30 |
-
|
31 |
class RPW_Extended {
|
32 |
|
33 |
/**
|
34 |
* PHP5 constructor method.
|
35 |
*
|
36 |
-
* @since
|
|
|
|
|
37 |
*/
|
38 |
public function __construct() {
|
39 |
|
|
|
40 |
add_action( 'plugins_loaded', array( &$this, 'constants' ), 1 );
|
41 |
|
|
|
42 |
add_action( 'plugins_loaded', array( &$this, 'i18n' ), 2 );
|
43 |
|
|
|
44 |
add_action( 'plugins_loaded', array( &$this, 'includes' ), 3 );
|
45 |
|
|
|
46 |
add_action( 'admin_enqueue_scripts', array( &$this, 'admin_style' ) );
|
47 |
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
/**
|
51 |
* Defines constants used by the plugin.
|
52 |
*
|
53 |
-
* @since
|
|
|
|
|
54 |
*/
|
55 |
public function constants() {
|
56 |
|
|
|
57 |
define( 'RPWE_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
58 |
|
|
|
59 |
define( 'RPWE_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
60 |
|
|
|
61 |
define( 'RPWE_INCLUDES', RPWE_DIR . trailingslashit( 'includes' ) );
|
62 |
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
/**
|
66 |
* Loads the translation files.
|
67 |
*
|
68 |
-
* @since
|
|
|
|
|
69 |
*/
|
70 |
public function i18n() {
|
71 |
load_plugin_textdomain( 'rpwe', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
@@ -74,7 +93,9 @@ class RPW_Extended {
|
|
74 |
/**
|
75 |
* Loads the initial files needed by the plugin.
|
76 |
*
|
77 |
-
* @since
|
|
|
|
|
78 |
*/
|
79 |
public function includes() {
|
80 |
require_once( RPWE_INCLUDES . 'widget-recent-posts-extended.php' );
|
@@ -83,14 +104,32 @@ class RPW_Extended {
|
|
83 |
/**
|
84 |
* Register custom style for the widget settings.
|
85 |
*
|
86 |
-
* @since
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
*/
|
88 |
-
function
|
89 |
-
|
90 |
}
|
91 |
|
92 |
}
|
93 |
|
94 |
-
new RPW_Extended;
|
95 |
-
endif;
|
96 |
-
?>
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Recent Posts Widget Extended
|
4 |
+
* Plugin URI: http://satrya.me/wordpress-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.1
|
7 |
* Author: Satrya
|
8 |
+
* Author URI: http://satrya.me/
|
9 |
+
* Author Email: satrya@satrya.me
|
10 |
*
|
11 |
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
12 |
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
18 |
* You should have received a copy of the GNU General Public License along with this program; if not, write
|
19 |
* to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
20 |
*
|
21 |
+
* @package Recent_Posts_Widget_Extended
|
22 |
+
* @since 0.1
|
23 |
+
* @author Satrya
|
24 |
+
* @copyright Copyright (c) 2014, Satrya
|
25 |
+
* @license http://www.gnu.org/licenses/gpl-2.0.html
|
26 |
*/
|
27 |
|
28 |
// Exit if accessed directly
|
29 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
30 |
|
|
|
|
|
31 |
class RPW_Extended {
|
32 |
|
33 |
/**
|
34 |
* PHP5 constructor method.
|
35 |
*
|
36 |
+
* @since 0.1
|
37 |
+
* @access public
|
38 |
+
* @return void
|
39 |
*/
|
40 |
public function __construct() {
|
41 |
|
42 |
+
/* Set the constants needed by the plugin. */
|
43 |
add_action( 'plugins_loaded', array( &$this, 'constants' ), 1 );
|
44 |
|
45 |
+
/* Internationalize the text strings used. */
|
46 |
add_action( 'plugins_loaded', array( &$this, 'i18n' ), 2 );
|
47 |
|
48 |
+
/* Load the functions files. */
|
49 |
add_action( 'plugins_loaded', array( &$this, 'includes' ), 3 );
|
50 |
|
51 |
+
/* Load the admin style. */
|
52 |
add_action( 'admin_enqueue_scripts', array( &$this, 'admin_style' ) );
|
53 |
|
54 |
+
/* Register widget. */
|
55 |
+
add_action( 'widgets_init', array( &$this, 'register_widget' ) );
|
56 |
+
|
57 |
}
|
58 |
|
59 |
/**
|
60 |
* Defines constants used by the plugin.
|
61 |
*
|
62 |
+
* @since 0.1
|
63 |
+
* @access public
|
64 |
+
* @return void
|
65 |
*/
|
66 |
public function constants() {
|
67 |
|
68 |
+
/* Set constant path to the plugin directory. */
|
69 |
define( 'RPWE_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
70 |
|
71 |
+
/* Set the constant path to the plugin directory URI. */
|
72 |
define( 'RPWE_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
73 |
|
74 |
+
/* Set the constant path to the includes directory. */
|
75 |
define( 'RPWE_INCLUDES', RPWE_DIR . trailingslashit( 'includes' ) );
|
76 |
|
77 |
+
/* Set the constant path to the assets directory. */
|
78 |
+
define( 'RPWE_ASSETS', RPWE_URI . trailingslashit( 'assets' ) );
|
79 |
+
|
80 |
}
|
81 |
|
82 |
/**
|
83 |
* Loads the translation files.
|
84 |
*
|
85 |
+
* @since 0.1
|
86 |
+
* @access public
|
87 |
+
* @return void
|
88 |
*/
|
89 |
public function i18n() {
|
90 |
load_plugin_textdomain( 'rpwe', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
93 |
/**
|
94 |
* Loads the initial files needed by the plugin.
|
95 |
*
|
96 |
+
* @since 0.1
|
97 |
+
* @access public
|
98 |
+
* @return void
|
99 |
*/
|
100 |
public function includes() {
|
101 |
require_once( RPWE_INCLUDES . 'widget-recent-posts-extended.php' );
|
104 |
/**
|
105 |
* Register custom style for the widget settings.
|
106 |
*
|
107 |
+
* @since 0.8
|
108 |
+
* @access public
|
109 |
+
* @return void
|
110 |
+
*/
|
111 |
+
public function admin_style() {
|
112 |
+
|
113 |
+
/* Check if current screen is Widgets page. */
|
114 |
+
if ( 'widgets' != get_current_screen()->base )
|
115 |
+
return;
|
116 |
+
|
117 |
+
/* Loads the widget style. */
|
118 |
+
wp_enqueue_style( 'rpwe-admin-style', trailingslashit( RPWE_ASSETS ) . 'css/rpwe-admin.css', null, null );
|
119 |
+
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Register the widget.
|
124 |
+
*
|
125 |
+
* @since 0.9.1
|
126 |
+
* @access public
|
127 |
+
* @return void
|
128 |
*/
|
129 |
+
public function register_widget() {
|
130 |
+
register_widget( 'Recent_Posts_Widget_Extended' );
|
131 |
}
|
132 |
|
133 |
}
|
134 |
|
135 |
+
new RPW_Extended;
|
|
|
|