You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 16, 2023. It is now read-only.
This plugin adds a widget to display a list of posts in the WordPress sidebar.
15
15
@@ -24,6 +24,8 @@ This plugin adds a widget to display a list of posts in the WordPress sidebar.
24
24
*[License](#license)
25
25
*[Credits](#credits)
26
26
*[Privacy Policy](#privacy-policy)
27
+
*[Changelog](#changelog)
28
+
*[4.15.0](#4150)
27
29
28
30
## Description
29
31
@@ -100,6 +102,23 @@ This software is released under the terms of the [GNU GPLv3](https://github.com/
100
102
101
103
I would like to say *Thank You* to all the people who helped me in making this plugin better and translated it into their respective languages.
102
104
105
+
This plugin uses the following Javascript code, released under the terms of the GNU GPLv2 or later:
106
+
107
+
* a modified version of @kometschuh's code for "Category Posts Widget" plugin, used to open and close panels in the widget admin user interface;
108
+
* a modified version of @themesfactory's code for "Duplicate Widgets" plugin, used to duplicate a widget.
109
+
110
+
Thanks to these developers for their work and for using the GNU General Public License.
111
+
103
112
## Privacy Policy
104
113
105
114
This plugin does not collect any user data.
115
+
116
+
## Changelog
117
+
118
+
### 4.15.0
119
+
120
+
* Added compatibility with Yoast SEO plugin when determining the main category of a post.
121
+
* Cleaned and beautified HTML source code.
122
+
* Updated compatibility to WordPress 5.7.
123
+
124
+
The full changelog is documented in the changelog file released along with the plugin package and is hosted on [GitHub](https://github.com/aldolat/posts-in-sidebar/blob/master/CHANGELOG.md).
@@ -1154,6 +1155,47 @@ public function form( $instance ) {
1154
1155
1155
1156
<div class="pis-container">
1156
1157
1158
+
<p class="pis-boxed pis-boxed-light-blue">
1159
+
<em>
1160
+
<strong>
1161
+
<?php
1162
+
esc_html_e( 'How this plugin chooses the main category of the post.', 'posts-in-sidebar' );
1163
+
?>
1164
+
</strong>
1165
+
<br />
1166
+
<br />
1167
+
<?php
1168
+
esc_html_e(
1169
+
'When the option "When on single posts, get posts from the current category" is activated and the post has multiple categories, Posts in Sidebar will choose the category with the lowest initial letter, just as WordPress does when we get the list of the categories of a post.', 'posts-in-sidebar'
1170
+
);
1171
+
?>
1172
+
<br />
1173
+
<br />
1174
+
<?php
1175
+
printf(
1176
+
// translators: Opening and closing "strong" HTML tag.
1177
+
esc_html__(
1178
+
'If you activate the option %1$s"Use the main category as WordPress does for permalinks"%2$s (formerly known here as "Sort categories"), Posts in Sidebar will get the category with the lowest category ID. This is the WordPress behaviour when it determines the permalink structure if the category is used in the permalink.', 'posts-in-sidebar'
1179
+
),
1180
+
'<strong>',
1181
+
'</strong>'
1182
+
);
1183
+
?>
1184
+
<br />
1185
+
<br />
1186
+
<?php
1187
+
printf(
1188
+
// translators: Opening and closing "strong" HTML tag.
1189
+
esc_html__(
1190
+
'If you use the Yoast SEO plugin and want to use the main category as defined with that plugin, activate the option %1$s"Use the main category as defined in the Yoast SEO plugin"%2$s.', 'posts-in-sidebar'
1191
+
),
1192
+
'<strong>',
1193
+
'</strong>'
1194
+
);
1195
+
?>
1196
+
</em>
1197
+
</p>
1198
+
1157
1199
<div class="pis-column-container">
1158
1200
1159
1201
<div class="pis-column">
@@ -1165,7 +1207,27 @@ public function form( $instance ) {
1165
1207
$this->get_field_id( 'get_from_same_cat' ),
1166
1208
$this->get_field_name( 'get_from_same_cat' ),
1167
1209
$instance['get_from_same_cat'],
1168
-
esc_html__( 'When activated, this function will get posts from the category of the post, ignoring other parameters like tags, date, post formats, etc. If the post has multiple categories, the plugin will use the first category in the array of categories (the category with the lowest initial letter). If you don\'t want to ignore other parameters, activate the checkbox below, at the end of this panel.', 'posts-in-sidebar' )
1210
+
esc_html__( 'When activated, this option will ignore other parameters like tags, date, post formats, etc. If you don\'t want to ignore other parameters, activate the checkbox below, at the end of this panel.', 'posts-in-sidebar' )
1211
+
);
1212
+
?>
1213
+
1214
+
<?php
1215
+
// ================= Sort categories
1216
+
pis_form_checkbox(
1217
+
esc_html__( 'Use the main category as WordPress does for permalinks', 'posts-in-sidebar' ),
1218
+
$this->get_field_id( 'sort_categories' ),
1219
+
$this->get_field_name( 'sort_categories' ),
1220
+
$instance['sort_categories']
1221
+
);
1222
+
?>
1223
+
1224
+
<?php
1225
+
// ================= Yoast main category
1226
+
pis_form_checkbox(
1227
+
esc_html__( 'Use the main category as defined in the Yoast SEO plugin', 'posts-in-sidebar' ),
1228
+
$this->get_field_id( 'yoast_main_cat' ),
1229
+
$this->get_field_name( 'yoast_main_cat' ),
1230
+
$instance['yoast_main_cat']
1169
1231
);
1170
1232
?>
1171
1233
@@ -1193,17 +1255,6 @@ public function form( $instance ) {
esc_html__( 'When activated, this function will sort the categories of the main post so that the category, where the plugin will get posts from, will match the main category of the main post, i.e. the category with the lowest ID.', 'posts-in-sidebar' )
1204
-
);
1205
-
?>
1206
-
1207
1258
</div>
1208
1259
1209
1260
<div class="pis-column">
@@ -4708,7 +4759,7 @@ public function form( $instance ) {
4708
4759
$this->get_field_name( 'custom_styles' ),
4709
4760
$instance['custom_styles'],
4710
4761
esc_html__( 'Enter here your CSS styles', 'posts-in-sidebar' ),
0 commit comments