Version Description
Download this release
Release Info
Developer | satrya |
Plugin | Recent Posts Widget Extended |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.0.1
- assets/css/rpwe-admin.css +6 -3
- assets/css/rpwe-frontend.css +2 -1
- assets/js/rpwe-siteorigin.js +30 -0
- includes/compatibility.php +36 -0
- includes/defaults.php +1 -1
- includes/form.php +2 -19
- languages/recent-posts-widget-extended.pot +2 -2
- readme.txt +17 -1
- rpwe.php +3 -2
assets/css/rpwe-admin.css
CHANGED
@@ -22,7 +22,8 @@
|
|
22 |
.widgets-holder-wrap .widget-inside.rpwe-bg,
|
23 |
.customize-control-widget_form.wide-widget-control .widget-inside.rpwe-bg,
|
24 |
.wp-block-legacy-widget__edit-form.rpwe-bg,
|
25 |
-
.wp-block-legacy-widget__edit-form.rpwe-bg .widget-inside
|
|
|
26 |
background-color: #f3f3f3;
|
27 |
}
|
28 |
|
@@ -63,7 +64,8 @@
|
|
63 |
padding-left: 0;
|
64 |
}
|
65 |
|
66 |
-
.wp-block-legacy-widget__edit-form #rpwe-tabs-nav
|
|
|
67 |
margin-top: 0;
|
68 |
}
|
69 |
|
@@ -82,7 +84,8 @@
|
|
82 |
border-radius: 0 3px 3px 3px;
|
83 |
}
|
84 |
|
85 |
-
.wp-block-legacy-widget__edit-form .rpwe-tab-content
|
|
|
86 |
margin-top: 0;
|
87 |
}
|
88 |
|
22 |
.widgets-holder-wrap .widget-inside.rpwe-bg,
|
23 |
.customize-control-widget_form.wide-widget-control .widget-inside.rpwe-bg,
|
24 |
.wp-block-legacy-widget__edit-form.rpwe-bg,
|
25 |
+
.wp-block-legacy-widget__edit-form.rpwe-bg .widget-inside,
|
26 |
+
.so-content.panel-dialog.rpwe-bg {
|
27 |
background-color: #f3f3f3;
|
28 |
}
|
29 |
|
64 |
padding-left: 0;
|
65 |
}
|
66 |
|
67 |
+
.wp-block-legacy-widget__edit-form #rpwe-tabs-nav,
|
68 |
+
.so-content #rpwe-tabs-nav {
|
69 |
margin-top: 0;
|
70 |
}
|
71 |
|
84 |
border-radius: 0 3px 3px 3px;
|
85 |
}
|
86 |
|
87 |
+
.wp-block-legacy-widget__edit-form .rpwe-tab-content,
|
88 |
+
.so-content .rpwe-tab-content {
|
89 |
margin-top: 0;
|
90 |
}
|
91 |
|
assets/css/rpwe-frontend.css
CHANGED
@@ -9,6 +9,7 @@
|
|
9 |
margin-bottom: 10px;
|
10 |
padding-bottom: 10px;
|
11 |
list-style-type: none;
|
|
|
12 |
}
|
13 |
|
14 |
.rpwe-block a {
|
@@ -66,7 +67,7 @@
|
|
66 |
|
67 |
.rpwe-clearfix:before,
|
68 |
.rpwe-clearfix:after {
|
69 |
-
content:
|
70 |
display: table !important;
|
71 |
}
|
72 |
|
9 |
margin-bottom: 10px;
|
10 |
padding-bottom: 10px;
|
11 |
list-style-type: none;
|
12 |
+
display: inline-block;
|
13 |
}
|
14 |
|
15 |
.rpwe-block a {
|
67 |
|
68 |
.rpwe-clearfix:before,
|
69 |
.rpwe-clearfix:after {
|
70 |
+
content: '';
|
71 |
display: table !important;
|
72 |
}
|
73 |
|
assets/js/rpwe-siteorigin.js
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function ($) {
|
2 |
+
function rpwe_siteorigin_custom_bg_class() {
|
3 |
+
$('.rpwe-options').closest('.so-content').addClass('rpwe-bg')
|
4 |
+
}
|
5 |
+
|
6 |
+
function rpwe_siteorigin_custom_tabs() {
|
7 |
+
// Show the first tab and hide the rest.
|
8 |
+
$('#rpwe-tabs-nav li:first-child').addClass('active')
|
9 |
+
$('.rpwe-tab-content').hide()
|
10 |
+
$('.rpwe-tab-content:first-child').show()
|
11 |
+
|
12 |
+
// Click the navigation.
|
13 |
+
$('body').on('click', '#rpwe-tabs-nav li', function (e) {
|
14 |
+
e.preventDefault()
|
15 |
+
|
16 |
+
$('#rpwe-tabs-nav li').removeClass('active')
|
17 |
+
$(this).addClass('active')
|
18 |
+
$('.rpwe-tab-content').hide()
|
19 |
+
|
20 |
+
const activeTab = $(this).find('a').attr('href')
|
21 |
+
$(`${activeTab}.rpwe-tab-content`).show()
|
22 |
+
return false
|
23 |
+
})
|
24 |
+
}
|
25 |
+
|
26 |
+
$(document).on('panelsopen', function (e) {
|
27 |
+
rpwe_siteorigin_custom_bg_class()
|
28 |
+
rpwe_siteorigin_custom_tabs()
|
29 |
+
})
|
30 |
+
})(jQuery)
|
includes/compatibility.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Compatibility with 3rd party plugins.
|
4 |
+
*
|
5 |
+
* @package Recent Posts Extended
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Tell siteorigin page builder the new widget Class name.
|
10 |
+
*/
|
11 |
+
add_filter(
|
12 |
+
'siteorigin_panels_widget_object',
|
13 |
+
function( $the_widget, $widget_class ) {
|
14 |
+
if ( 'Recent_Posts_Widget_Extended' === $widget_class ) {
|
15 |
+
global $wp_widget_factory;
|
16 |
+
if ( isset( $wp_widget_factory->widgets['RPWE_Widget'] ) ) {
|
17 |
+
$the_widget = $wp_widget_factory->widgets['RPWE_Widget'];
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
return $the_widget;
|
22 |
+
},
|
23 |
+
10,
|
24 |
+
2
|
25 |
+
);
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Enqueue custom JS for the Siteorigin page builder.
|
29 |
+
*/
|
30 |
+
add_action(
|
31 |
+
'siteorigin_panel_enqueue_admin_scripts',
|
32 |
+
function() {
|
33 |
+
wp_enqueue_script( 'rpwe-siteorigin', RPWE_ASSETS . '/js/rpwe-siteorigin.js', array( 'jquery' ), RPWE_VERSION, true );
|
34 |
+
wp_enqueue_style( 'rpwe-admin-style', RPWE_ASSETS . '/css/rpwe-admin.css', null, RPWE_VERSION );
|
35 |
+
}
|
36 |
+
);
|
includes/defaults.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
*/
|
11 |
function rpwe_get_default_args() {
|
12 |
|
13 |
-
$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";
|
14 |
|
15 |
$defaults = array(
|
16 |
'title' => esc_attr__( 'Recent Posts', 'rpwe' ),
|
10 |
*/
|
11 |
function rpwe_get_default_args() {
|
12 |
|
13 |
+
$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;\ndisplay: inline-block;\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";
|
14 |
|
15 |
$defaults = array(
|
16 |
'title' => esc_attr__( 'Recent Posts', 'rpwe' ),
|
includes/form.php
CHANGED
@@ -314,25 +314,8 @@
|
|
314 |
<label for="<?php echo esc_attr( $this->get_field_id( 'css' ) ); ?>">
|
315 |
<?php esc_attr_e( 'Custom CSS', 'recent-posts-widget-extended' ); ?>
|
316 |
</label>
|
317 |
-
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'css' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'css' ) ); ?>" style="height:180px;"
|
318 |
-
<small><?php esc_attr_e( '
|
319 |
-
<small>
|
320 |
-
<?php
|
321 |
-
printf(
|
322 |
-
'<a href="%1$s">%2$s</a>.',
|
323 |
-
esc_url(
|
324 |
-
add_query_arg(
|
325 |
-
array(
|
326 |
-
array( 'autofocus' => array( 'section' => 'custom_css' ) ),
|
327 |
-
'return' => rawurlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ),
|
328 |
-
),
|
329 |
-
admin_url( 'customize.php' )
|
330 |
-
)
|
331 |
-
),
|
332 |
-
__( 'Additional CSS panel' )
|
333 |
-
);
|
334 |
-
?>
|
335 |
-
</small>
|
336 |
</p>
|
337 |
</div>
|
338 |
|
314 |
<label for="<?php echo esc_attr( $this->get_field_id( 'css' ) ); ?>">
|
315 |
<?php esc_attr_e( 'Custom CSS', 'recent-posts-widget-extended' ); ?>
|
316 |
</label>
|
317 |
+
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'css' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'css' ) ); ?>" style="height:180px;"><?php echo esc_attr( $instance['css'] ); ?></textarea>
|
318 |
+
<small><?php esc_attr_e( 'If you turn off the default styles, you can use these css code to customize the recent posts style.', 'recent-posts-widget-extended' ); ?></small>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
</p>
|
320 |
</div>
|
321 |
|
languages/recent-posts-widget-extended.pot
CHANGED
@@ -6,7 +6,7 @@ msgstr ""
|
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
9 |
-
"POT-Creation-Date: 2022-09-
|
10 |
"X-Poedit-Basepath: ..\n"
|
11 |
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
12 |
"X-Poedit-SearchPath-0: .\n"
|
@@ -199,7 +199,7 @@ msgid "Custom CSS"
|
|
199 |
msgstr ""
|
200 |
|
201 |
#: includes/form.php:318
|
202 |
-
msgid "
|
203 |
msgstr ""
|
204 |
|
205 |
#. translators: %s: current time
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"POT-Creation-Date: 2022-09-28 14:29+0000\n"
|
10 |
"X-Poedit-Basepath: ..\n"
|
11 |
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
12 |
"X-Poedit-SearchPath-0: .\n"
|
199 |
msgstr ""
|
200 |
|
201 |
#: includes/form.php:318
|
202 |
+
msgid "If you turn off the default styles, you can use these css code to customize the recent posts style."
|
203 |
msgstr ""
|
204 |
|
205 |
#. translators: %s: current time
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: recent posts, random posts, popular posts, thumbnails, widget, widgets, si
|
|
5 |
Requires at least: 5.8
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 7.2
|
8 |
-
Stable tag: 2.0
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -248,9 +248,25 @@ rpwe_default_query_arguments
|
|
248 |
1. Classic widget
|
249 |
2. Block widget
|
250 |
3. Shortcode
|
|
|
251 |
|
252 |
== Changelog ==
|
253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
**2.0 - Major Changes**
|
255 |
*Release Date: Sept 22, 2022*
|
256 |
|
5 |
Requires at least: 5.8
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 7.2
|
8 |
+
Stable tag: 2.0.1
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
248 |
1. Classic widget
|
249 |
2. Block widget
|
250 |
3. Shortcode
|
251 |
+
4. Siteorigin page builder
|
252 |
|
253 |
== Changelog ==
|
254 |
|
255 |
+
**2.0.1**
|
256 |
+
*Release Date: Sept 28, 2022*
|
257 |
+
|
258 |
+
**Bug fixes:**
|
259 |
+
|
260 |
+
- Compatibility issue with Siteorigin Page Builder.
|
261 |
+
|
262 |
+
**Enhancements:**
|
263 |
+
|
264 |
+
- Re-enable custom CSS setting.
|
265 |
+
- Full support Siteorigin Page Builder.
|
266 |
+
- Adds `display: inline-block;` to the default style, to make sure each list align properly. Thank you [outrospective](https://wordpress.org/support/users/outrospective/)!
|
267 |
+
|
268 |
+
---
|
269 |
+
|
270 |
**2.0 - Major Changes**
|
271 |
*Release Date: Sept 22, 2022*
|
272 |
|
rpwe.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Recent Posts Widget Extended
|
4 |
* Plugin URI: https://github.com/gasatrya/recent-posts-widget-extended
|
5 |
* Description: Enables advanced widget & shortcode that gives you total control over the output of your site’s most recent Posts.
|
6 |
-
* Version: 2.0
|
7 |
* Requires at least: 5.8
|
8 |
* Requires PHP: 7.2
|
9 |
* Author: Ga Satrya
|
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
21 |
exit;
|
22 |
}
|
23 |
|
24 |
-
define( 'RPWE_VERSION', '2.0' );
|
25 |
define( 'RPWE_CLASSES', plugin_dir_path( __FILE__ ) . 'classes' );
|
26 |
define( 'RPWE_INCLUDES', plugin_dir_path( __FILE__ ) . 'includes' );
|
27 |
define( 'RPWE_ASSETS', plugin_dir_url( __FILE__ ) . 'assets' );
|
@@ -33,6 +33,7 @@ require_once RPWE_INCLUDES . '/query.php';
|
|
33 |
require_once RPWE_INCLUDES . '/functions.php';
|
34 |
require_once RPWE_INCLUDES . '/shortcode.php';
|
35 |
require_once RPWE_INCLUDES . '/helpers.php';
|
|
|
36 |
|
37 |
/**
|
38 |
* Language
|
3 |
* Plugin Name: Recent Posts Widget Extended
|
4 |
* Plugin URI: https://github.com/gasatrya/recent-posts-widget-extended
|
5 |
* Description: Enables advanced widget & shortcode that gives you total control over the output of your site’s most recent Posts.
|
6 |
+
* Version: 2.0.1
|
7 |
* Requires at least: 5.8
|
8 |
* Requires PHP: 7.2
|
9 |
* Author: Ga Satrya
|
21 |
exit;
|
22 |
}
|
23 |
|
24 |
+
define( 'RPWE_VERSION', '2.0.1' );
|
25 |
define( 'RPWE_CLASSES', plugin_dir_path( __FILE__ ) . 'classes' );
|
26 |
define( 'RPWE_INCLUDES', plugin_dir_path( __FILE__ ) . 'includes' );
|
27 |
define( 'RPWE_ASSETS', plugin_dir_url( __FILE__ ) . 'assets' );
|
33 |
require_once RPWE_INCLUDES . '/functions.php';
|
34 |
require_once RPWE_INCLUDES . '/shortcode.php';
|
35 |
require_once RPWE_INCLUDES . '/helpers.php';
|
36 |
+
require_once RPWE_INCLUDES . '/compatibility.php';
|
37 |
|
38 |
/**
|
39 |
* Language
|