Version Description
- March 03th 2018 =
- Fixed Updated widget with zero for the thumb dimensions caused a JavaScript error
Download this release
Release Info
Developer | Kometschuh |
Plugin | Category Posts Widget |
Version | 4.8.3 |
Comparing to | |
See all releases |
Code changes from version 4.8.2 to 4.8.3
- cat-posts.php +11 -4
- readme.txt +12 -1
cat-posts.php
CHANGED
@@ -12,7 +12,7 @@ Plugin Name: Category Posts Widget
|
|
12 |
Plugin URI: https://wordpress.org/plugins/category-posts/
|
13 |
Description: Adds a widget that shows the most recent posts from a single category.
|
14 |
Author: TipTopPress
|
15 |
-
Version: 4.8.
|
16 |
Author URI: http://tiptoppress.com
|
17 |
Text Domain: category-posts
|
18 |
Domain Path: /languages
|
@@ -441,8 +441,13 @@ class Widget extends \WP_Widget {
|
|
441 |
* @since 4.1
|
442 |
*/
|
443 |
public function post_thumbnail_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
|
444 |
-
|
445 |
-
|
|
|
|
|
|
|
|
|
|
|
446 |
}
|
447 |
$meta = image_get_intermediate_size( $post_thumbnail_id, $size );
|
448 |
|
@@ -1305,8 +1310,10 @@ class Widget extends \WP_Widget {
|
|
1305 |
wp_reset_postdata();
|
1306 |
|
1307 |
$use_css_cropping = isset( $this->instance['use_css_cropping'] ) && $this->instance['use_css_cropping'];
|
|
|
|
|
1308 |
|
1309 |
-
if ( $use_css_cropping ) {
|
1310 |
// enqueue relevant scripts and parameters to perform cropping
|
1311 |
// once we support only 4.5+ it can be refactored to use wp_add_inline_script.
|
1312 |
$number = $this->number;
|
12 |
Plugin URI: https://wordpress.org/plugins/category-posts/
|
13 |
Description: Adds a widget that shows the most recent posts from a single category.
|
14 |
Author: TipTopPress
|
15 |
+
Version: 4.8.3
|
16 |
Author URI: http://tiptoppress.com
|
17 |
Text Domain: category-posts
|
18 |
Domain Path: /languages
|
441 |
* @since 4.1
|
442 |
*/
|
443 |
public function post_thumbnail_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
|
444 |
+
|
445 |
+
$use_css_cropping = isset( $this->instance['use_css_cropping'] ) && $this->instance['use_css_cropping'];
|
446 |
+
$empty_dimensions = empty( $this->instance['thumb_w'] ) || empty( $this->instance['thumb_h'] );
|
447 |
+
$thumb = isset( $this->instance['template'] ) && preg_match( '/%thumb%/', $this->instance['template'] );
|
448 |
+
|
449 |
+
if ( ! ( $use_css_cropping && ! $empty_dimensions && $thumb ) ) {
|
450 |
+
return $html; // If no full dimensions defined, just do not cropping for that image
|
451 |
}
|
452 |
$meta = image_get_intermediate_size( $post_thumbnail_id, $size );
|
453 |
|
1310 |
wp_reset_postdata();
|
1311 |
|
1312 |
$use_css_cropping = isset( $this->instance['use_css_cropping'] ) && $this->instance['use_css_cropping'];
|
1313 |
+
$empty_dimensions = empty( $this->instance['thumb_w'] ) || empty( $this->instance['thumb_h'] );
|
1314 |
+
$thumb = isset( $this->instance['template'] ) && preg_match( '/%thumb%/', $this->instance['template'] );
|
1315 |
|
1316 |
+
if ( $use_css_cropping && ! $empty_dimensions && $thumb ) {
|
1317 |
// enqueue relevant scripts and parameters to perform cropping
|
1318 |
// once we support only 4.5+ it can be refactored to use wp_add_inline_script.
|
1319 |
$number = $this->number;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://mkrdip.me/donate
|
|
4 |
Tags: category, categories, posts, widget, posts widget, recent posts, category recent posts, shortcode, sidebar, excerpt, multiple widgets
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 4.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -125,6 +125,14 @@ For SVG font-icon HTML we recommend the [WordPress Dashicons](https://developer.
|
|
125 |
Please add the widget with shortcode [catposts] inside a editor widget which is placed to a SiteOrigin Page Builder row.
|
126 |
We also create a YouTube video: [How Category Posts Widget work with SiteOrigin Page Builder](http://tiptoppress.com/how-category-posts-widget-work-with-siteorigin-page-builder/)
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
= The font-size is different from that of other widgets or Theme elements? =
|
129 |
Please use the option: "Disable widget CSS".
|
130 |
|
@@ -151,6 +159,9 @@ Check also the .htaccess file, if there is an entry for an older PHP version.
|
|
151 |
== Changelog ==
|
152 |
[Read more on our blog ...](http://tiptoppress.com/category/category-posts-widget?utm_source=wordpress_org&utm_campaign=changelog_cpw&utm_medium=web)
|
153 |
|
|
|
|
|
|
|
154 |
= 4.8.2 - January 30th 2018 =
|
155 |
* Fixed Adding the widget with the customizer only the title is shown
|
156 |
* Fixed Recognize "Empty lines" > Next line is a paragraph in the Template in widget areas
|
4 |
Tags: category, categories, posts, widget, posts widget, recent posts, category recent posts, shortcode, sidebar, excerpt, multiple widgets
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 4.8.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
125 |
Please add the widget with shortcode [catposts] inside a editor widget which is placed to a SiteOrigin Page Builder row.
|
126 |
We also create a YouTube video: [How Category Posts Widget work with SiteOrigin Page Builder](http://tiptoppress.com/how-category-posts-widget-work-with-siteorigin-page-builder/)
|
127 |
|
128 |
+
= How Category Posts Widget work with Divi Builder =
|
129 |
+
You can create a new Divi widget area and put our widgets into a Divi Sidebar Module: [How to put a widget into Divi Module](https://divibooster.com/how-to-put-a-widget-into-divi-module/).
|
130 |
+
|
131 |
+
= How our widgets works with other page builder plugins like Elementor, Thrive Architect etc. =
|
132 |
+
We recommend for all other page builder plugins like Elementor or Thrive Architect to use the [WP Custom Widget Area](https://wordpress.org/plugins/wp-custom-widget-area/) plugin in additional.
|
133 |
+
|
134 |
+
Use the [WP Custom Widget Area](https://wordpress.org/plugins/wp-custom-widget-area/) plugin and create a new custom area with this plugin and place the shortcode (from the new created widget area) to a post or page. Then add our widget to the new created custom widget area the widgets admin site (Dashboard > Appearance > Widgets > … ).
|
135 |
+
|
136 |
= The font-size is different from that of other widgets or Theme elements? =
|
137 |
Please use the option: "Disable widget CSS".
|
138 |
|
159 |
== Changelog ==
|
160 |
[Read more on our blog ...](http://tiptoppress.com/category/category-posts-widget?utm_source=wordpress_org&utm_campaign=changelog_cpw&utm_medium=web)
|
161 |
|
162 |
+
= 4.8.3 - March 03th 2018 =
|
163 |
+
* Fixed Updated widget with zero for the thumb dimensions caused a JavaScript error
|
164 |
+
|
165 |
= 4.8.2 - January 30th 2018 =
|
166 |
* Fixed Adding the widget with the customizer only the title is shown
|
167 |
* Fixed Recognize "Empty lines" > Next line is a paragraph in the Template in widget areas
|