Version Description
- 9/06/2014 =
- Fixed: Custom css not saving (issue). Props bowoolley
Download this release
Release Info
Developer | satrya |
Plugin | Recent Posts Widget Extended |
Version | 0.9.5 |
Comparing to | |
See all releases |
Code changes from version 0.9.4 to 0.9.5
- includes/functions.php +23 -0
- includes/style.php +0 -49
- readme.txt +8 -2
- rpwe.php +1 -2
- screenshot-1.png +0 -0
includes/functions.php
CHANGED
@@ -88,6 +88,16 @@ function rpwe_get_recent_posts( $args = array() ) {
|
|
88 |
|
89 |
// Allow devs to hook in stuff before the loop.
|
90 |
do_action( 'rpwe_before_loop' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
// Get the posts query.
|
93 |
$posts = rpwe_get_posts( $args );
|
@@ -239,4 +249,17 @@ function rpwe_get_posts( $args = array() ) {
|
|
239 |
|
240 |
return $posts;
|
241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
}
|
88 |
|
89 |
// Allow devs to hook in stuff before the loop.
|
90 |
do_action( 'rpwe_before_loop' );
|
91 |
+
|
92 |
+
// Display the default style of the plugin.
|
93 |
+
if ( $args['styles_default'] == true ) {
|
94 |
+
rpwe_custom_styles();
|
95 |
+
}
|
96 |
+
|
97 |
+
// If the default style is disbale then use the custom css if it not empty.
|
98 |
+
if ( $args['styles_default'] == false && ! empty( $args['css'] ) ) {
|
99 |
+
echo '<style>' . $args['css'] . '</style>';
|
100 |
+
}
|
101 |
|
102 |
// Get the posts query.
|
103 |
$posts = rpwe_get_posts( $args );
|
249 |
|
250 |
return $posts;
|
251 |
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Custom Styles.
|
256 |
+
*
|
257 |
+
* @since 0.8
|
258 |
+
*/
|
259 |
+
function rpwe_custom_styles() {
|
260 |
+
?>
|
261 |
+
<style>
|
262 |
+
.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-aligncenter{display:block;margin-left: auto;margin-right: auto;}.rpwe-clearfix:before,.rpwe-clearfix:after{content:"";display:table !important;}.rpwe-clearfix:after{clear:both;}.rpwe-clearfix{zoom:1;}
|
263 |
+
</style>
|
264 |
+
<?php
|
265 |
}
|
includes/style.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Custom style for the plugin front-end.
|
4 |
-
*
|
5 |
-
* @package Recent_Posts_Widget_Extended
|
6 |
-
* @since 0.9.4
|
7 |
-
* @author Satrya
|
8 |
-
* @copyright Copyright (c) 2014, Satrya
|
9 |
-
* @license http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
-
*/
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Custom style.
|
14 |
-
*
|
15 |
-
* @since 0.9.4
|
16 |
-
*/
|
17 |
-
function rpwe_style( $args = array() ) {
|
18 |
-
|
19 |
-
// Merge the input arguments and the defaults.
|
20 |
-
$args = wp_parse_args( $args, rpwe_get_default_args() );
|
21 |
-
|
22 |
-
// Extract the array to allow easy use of variables.
|
23 |
-
extract( $args );
|
24 |
-
|
25 |
-
// Display the default style of the plugin.
|
26 |
-
if ( $args['styles_default'] == true ) {
|
27 |
-
rpwe_custom_styles();
|
28 |
-
}
|
29 |
-
|
30 |
-
// If the default style are disable then use the custom css.
|
31 |
-
if ( $args['styles_default'] == false && ! empty( $args['css'] ) ) {
|
32 |
-
echo '<style>' . $args['css'] . '</style>';
|
33 |
-
}
|
34 |
-
|
35 |
-
}
|
36 |
-
add_action( 'rpwe_before_loop', 'rpwe_style', 1 );
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Custom Styles.
|
40 |
-
*
|
41 |
-
* @since 0.8
|
42 |
-
*/
|
43 |
-
function rpwe_custom_styles() {
|
44 |
-
?>
|
45 |
-
<style>
|
46 |
-
.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-aligncenter{display:block;margin-left: auto;margin-right: auto;}.rpwe-clearfix:before,.rpwe-clearfix:after{content:"";display:table !important;}.rpwe-clearfix:after{clear:both;}.rpwe-clearfix{zoom:1;}
|
47 |
-
</style>
|
48 |
-
<?php
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://satrya.me/donate/
|
|
4 |
Tags: recent posts, random posts, popular posts, thumbnails, widget, widgets, sidebar, excerpt, category, post tag, taxonomy, post type, post status, shortcode, multiple widgets
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 0.9.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -186,6 +186,9 @@ First, please uncheck the **Use Default Style** option then place the css code b
|
|
186 |
}
|
187 |
`
|
188 |
|
|
|
|
|
|
|
189 |
= Available filters =
|
190 |
Default arguments
|
191 |
`
|
@@ -262,7 +265,10 @@ after=""
|
|
262 |
|
263 |
== Changelog ==
|
264 |
|
265 |
-
= 0.9.
|
|
|
|
|
|
|
266 |
* Tested for WordPress 4.0.
|
267 |
* **The code is totally rewritten, please re-save or re-install the plugin if it doesn't work properly. I'm sorry for it.**
|
268 |
* After some research, I decided to get back the `get_the_excerpt()` as the excerpt. But now you can easily to change it via filter. Please read [FAQ](http://wordpress.org/plugins/recent-posts-widget-extended/faq)
|
4 |
Tags: recent posts, random posts, popular posts, thumbnails, widget, widgets, sidebar, excerpt, category, post tag, taxonomy, post type, post status, shortcode, multiple widgets
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 0.9.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
186 |
}
|
187 |
`
|
188 |
|
189 |
+
= Why so many !important in the css code? =
|
190 |
+
I know it's not good but I have a good reason, the `!important` is to make sure the built-in style compatible with all themes. But if you don't like it, you can turn of the **Use Default Styles** and remove all custom css code int the ** Custom CSS** box then create your own style.
|
191 |
+
|
192 |
= Available filters =
|
193 |
Default arguments
|
194 |
`
|
265 |
|
266 |
== Changelog ==
|
267 |
|
268 |
+
= 0.9.5 - 9/06/2014 =
|
269 |
+
* Fixed: Custom css not saving ([issue](http://wordpress.org/support/topic/css-not-saving)). Props [bowoolley](http://www.respirando.net/)
|
270 |
+
|
271 |
+
= 0.9.4 - 9/06/2014 =
|
272 |
* Tested for WordPress 4.0.
|
273 |
* **The code is totally rewritten, please re-save or re-install the plugin if it doesn't work properly. I'm sorry for it.**
|
274 |
* After some research, I decided to get back the `get_the_excerpt()` as the excerpt. But now you can easily to change it via filter. Please read [FAQ](http://wordpress.org/plugins/recent-posts-widget-extended/faq)
|
rpwe.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.
|
7 |
* Author: Satrya
|
8 |
* Author URI: http://satrya.me/
|
9 |
* Author Email: satrya@satrya.me
|
@@ -98,7 +98,6 @@ class RPW_Extended {
|
|
98 |
public function includes() {
|
99 |
require_once( RPWE_INCLUDES . 'functions.php' );
|
100 |
require_once( RPWE_INCLUDES . 'shortcode.php' );
|
101 |
-
require_once( RPWE_INCLUDES . 'style.php' );
|
102 |
}
|
103 |
|
104 |
/**
|
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.5
|
7 |
* Author: Satrya
|
8 |
* Author URI: http://satrya.me/
|
9 |
* Author Email: satrya@satrya.me
|
98 |
public function includes() {
|
99 |
require_once( RPWE_INCLUDES . 'functions.php' );
|
100 |
require_once( RPWE_INCLUDES . 'shortcode.php' );
|
|
|
101 |
}
|
102 |
|
103 |
/**
|
screenshot-1.png
CHANGED
Binary file
|