List category posts - Version 0.74.2

Version Description

  • Add pagination function for templates.
Download this release

Release Info

Developer fernandobt
Plugin Icon 128x128 List category posts
Version 0.74.2
Comparing to
See all releases

Code changes from version 0.74.1 to 0.74.2

include/lcp-catlistdisplayer.php CHANGED
@@ -294,10 +294,14 @@ class CatListDisplayer {
294
  return $this->content_getter('excerpt', $single, $tag, $css_class);
295
  }
296
 
297
- /*
298
- * These used to be separate functions, now starting to get the code
299
- * in the same function for less repetition.
300
- */
 
 
 
 
301
  private function content_getter($type, $post, $tag = null, $css_class = null) {
302
  $info = '';
303
  switch( $type ){
294
  return $this->content_getter('excerpt', $single, $tag, $css_class);
295
  }
296
 
297
+ private function get_pagination(){
298
+ $this->catlist->get_pagination();
299
+ }
300
+
301
+ /*
302
+ * These used to be separate functions, now starting to get the code
303
+ * in the same function for less repetition.
304
+ */
305
  private function content_getter($type, $post, $tag = null, $css_class = null) {
306
  $info = '';
307
  switch( $type ){
list-category-posts.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: List category posts
4
  Plugin URI: https://github.com/picandocodigo/List-Category-Posts
5
  Description: List Category Posts allows you to list posts by category in a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, the number of posts to display and many more parameters. You can use [catlist] as many times as needed with different arguments. Usage: [catlist argument1=value1 argument2=value2].
6
- Version: 0.74.1
7
  Author: Fernando Briano
8
  Author URI: http://fernandobriano.com
9
 
3
  Plugin Name: List category posts
4
  Plugin URI: https://github.com/picandocodigo/List-Category-Posts
5
  Description: List Category Posts allows you to list posts by category in a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, the number of posts to display and many more parameters. You can use [catlist] as many times as needed with different arguments. Usage: [catlist argument1=value1 argument2=value2].
6
+ Version: 0.74.2
7
  Author: Fernando Briano
8
  Author URI: http://fernandobriano.com
9
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: list, categories, posts, cms
5
  Requires at least: 3.3
6
  Tested up to: 4.9
7
  Requires PHP: 5.2.4
8
- Stable tag: 0.74.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -110,20 +110,20 @@ When using List Category Posts whithout a category id, name or slug, it will pos
110
 
111
  * **monthnum** and **year** - List posts from a certain year or month. You can use these together or independently. Example: `[catlist year=2015]` will list posts from the year 2015. `[catlist monthnum=8]` will list posts published in August of every year. `[catlist year=2012 monthnum=12]` will list posts from December 2012.
112
 
113
- * **date ranges** - You can also use date ranges for listing posts. For example "list every post after March 14th, 2005". The parameters are: ```after, after_year, after_month, after_day, before, before_year, before_month, before_day```. These parameters are used to specify data_query arguments (see: [the codex](https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters)).
114
 
115
- If you want to list all the posts before a given date, say `Jun 17th, 2007` you can use these two options:
116
- `[catlist before_year=2007 before_month=06 before_day=17]`
117
- Or you can use the `before` parameter with a [strtotime()-compatible string](http://php.net/manual/en/datetime.formats.date.php):
118
- `[catlist before='2007/06/17']`
119
 
120
- The same works for posts after a given date, you can use:
121
- `[catlist after_year=2007 after_month=06 after_day=17]`
122
- Or just `after` with a [strtotime()-compatible string](http://php.net/manual/en/datetime.formats.date.php):
123
- `[catlist after='2007/06/17']`
124
 
125
- `after` takes priority over `after_year`, `after_month`, and `after_day`.
126
- `before` takes priority over `before_year`, `before_month`, and `before_day`.
127
 
128
  * **search** - List posts that match a search term. `[catlist search="The Cake is a lie"]`
129
 
@@ -272,11 +272,11 @@ https://github.com/picandocodigo/List-Category-Posts/wiki/Pagination
272
  Ex: `[catlist numberposts=-1
273
  post_suffix="Hello World"]` will create something like:
274
 
275
- ```<ul class="lcp_catlist" id=lcp_instance_0>
276
- <li>
277
- <a href="http://127.0.0.1:8080/wordpress/?p=42" title="WordPress">
278
- WordPress
279
- </a> Hello World </li>```
280
 
281
  * **display_id** - Set it to yes to show the Post's ID next to the post title: `[catlist id=3 display_id=yes]`
282
 
@@ -440,6 +440,10 @@ Template system has changed. Custom templates should be stored in WordPress them
440
 
441
  == Changelog ==
442
 
 
 
 
 
443
  = 0.74.1 =
444
 
445
  * Possibly fixed a bug where the code for the Paginator class would show up in some blogs. Apparently some PHP ini accept "<?" as a valid way of starting a php file, others don't.
5
  Requires at least: 3.3
6
  Tested up to: 4.9
7
  Requires PHP: 5.2.4
8
+ Stable tag: 0.74.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
110
 
111
  * **monthnum** and **year** - List posts from a certain year or month. You can use these together or independently. Example: `[catlist year=2015]` will list posts from the year 2015. `[catlist monthnum=8]` will list posts published in August of every year. `[catlist year=2012 monthnum=12]` will list posts from December 2012.
112
 
113
+ * **date ranges** - You can also use date ranges for listing posts. For example "list every post after March 14th, 2005". The parameters are: ```after, after_year, after_month, after_day, before, before_year, before_month, before_day```. These parameters are used to specify data_query arguments (see: [the codex](https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters)).
114
 
115
+ If you want to list all the posts before a given date, say `Jun 17th, 2007` you can use these two options:
116
+ `[catlist before_year=2007 before_month=06 before_day=17]`
117
+ Or you can use the `before` parameter with a [strtotime()-compatible string](http://php.net/manual/en/datetime.formats.date.php):
118
+ `[catlist before='2007/06/17']`
119
 
120
+ The same works for posts after a given date, you can use:
121
+ `[catlist after_year=2007 after_month=06 after_day=17]`
122
+ Or just `after` with a [strtotime()-compatible string](http://php.net/manual/en/datetime.formats.date.php):
123
+ `[catlist after='2007/06/17']`
124
 
125
+ `after` takes priority over `after_year`, `after_month`, and `after_day`.
126
+ `before` takes priority over `before_year`, `before_month`, and `before_day`.
127
 
128
  * **search** - List posts that match a search term. `[catlist search="The Cake is a lie"]`
129
 
272
  Ex: `[catlist numberposts=-1
273
  post_suffix="Hello World"]` will create something like:
274
 
275
+ `<ul class="lcp_catlist" id=lcp_instance_0>`
276
+ ` <li>`
277
+ ` <a href="http://127.0.0.1:8080/wordpress/?p=42" title="WordPress">`
278
+ ` WordPress`
279
+ ` </a> Hello World </li>`
280
 
281
  * **display_id** - Set it to yes to show the Post's ID next to the post title: `[catlist id=3 display_id=yes]`
282
 
440
 
441
  == Changelog ==
442
 
443
+ = 0.74.2 =
444
+
445
+ * Add pagination function for templates.
446
+
447
  = 0.74.1 =
448
 
449
  * Possibly fixed a bug where the code for the Paginator class would show up in some blogs. Apparently some PHP ini accept "<?" as a valid way of starting a php file, others don't.