Version Description
= 0.37 =
When using content=yes
, if the post has a more tag, the plugin will only show the content previous to the more tag and not all the content as it used before (it now supports the more tag the same way as WordPress).
= 0.34 =
* Now the plugin accepts either class or tag or both for styling elements (such as date, author, etc. to display). When just using a tag, it will sorround the element with that tag. When using just a class, it will sorround the element between span tags and the given CSS class. Check Other notes under HTML & CSS Customization for more info.
* Fixed bug on post_status
, it used to show all published posts and if user was logged in, all private ones too. Now you can specify 'private' to just display private posts, and draft, publish, draft, etc (See post_status param on the instructions for more info).
= 0.25 = * Translation support.
= 0.18 = Template system was upgraded with new options. Backwards compatible, but you can better customize the way the post contents are displayed. Check templates/default.php.
= 0.17 = Upgrade your templates: Templates system was rewritten, so your current templates will probably not work. Check out the new default.php file on /templates to see the simpler new way to work with templates.
= 0.13.2 = Thumbnail parameter 'thumbnails' changed to 'thumbnail.
= 0.7.2 = Template system has changed. Now the posts loop must be defined inside the template. Check templates/default.php for an example.
= 0.8 = Widget built for WordPress 2.8's Widget API, so you need at least WP 2.8 to use the widget.
= 0.9 = Template system has changed. Custom templates should be stored in WordPress theme folder.
Release Info
Developer | fernandobt |
Plugin | List category posts |
Version | 0.41.0 |
Comparing to | |
See all releases |
Code changes from version 0.40.1 to 0.41.0
- include/CatList.php +14 -7
- include/CatListDisplayer.php +13 -7
- include/options.php +88 -0
- list_cat_posts.php +7 -2
- readme.txt +39 -4
- templates/default.php +31 -28
@@ -48,11 +48,16 @@ class CatList{
|
|
48 |
|
49 |
//Exclude
|
50 |
if( $this->lcp_not_empty('excludeposts') ):
|
51 |
-
$
|
|
|
|
|
52 |
if (strpos($args['exclude'], 'this') !== FALSE) :
|
53 |
-
$
|
54 |
-
|
|
|
|
|
55 |
endif;
|
|
|
56 |
endif;
|
57 |
|
58 |
// Post type, status, parent params:
|
@@ -297,7 +302,7 @@ class CatList{
|
|
297 |
if($this->params['customfield_display'] != ''):
|
298 |
$lcp_customs = '';
|
299 |
|
300 |
-
//Doesn't work for many when having spaces:
|
301 |
$custom_key = trim($custom_key);
|
302 |
|
303 |
//Create array for many fields:
|
@@ -311,8 +316,10 @@ class CatList{
|
|
311 |
$my_custom_field = $custom_fields[$something];
|
312 |
if (sizeof($my_custom_field) > 0 ):
|
313 |
foreach ( $my_custom_field as $key => $value ) :
|
314 |
-
$lcp_customs .= "<div class=\"lcp-customfield\">"
|
315 |
-
|
|
|
|
|
316 |
endforeach;
|
317 |
endif;
|
318 |
endforeach;
|
@@ -363,7 +370,7 @@ class CatList{
|
|
363 |
public function get_date_to_show($single){
|
364 |
if ($this->params['date']=='yes'):
|
365 |
//by Verex, great idea!
|
366 |
-
return
|
367 |
else:
|
368 |
return null;
|
369 |
endif;
|
48 |
|
49 |
//Exclude
|
50 |
if( $this->lcp_not_empty('excludeposts') ):
|
51 |
+
$exclude = array(
|
52 |
+
'post__not_in' => explode(",", $this->params['excludeposts'])
|
53 |
+
);
|
54 |
if (strpos($args['exclude'], 'this') !== FALSE) :
|
55 |
+
$exclude = array_merge(
|
56 |
+
$exclude,
|
57 |
+
array('post__not_in' => $this->lcp_get_current_post_id())
|
58 |
+
);
|
59 |
endif;
|
60 |
+
$args = array_merge($args, $exclude);
|
61 |
endif;
|
62 |
|
63 |
// Post type, status, parent params:
|
302 |
if($this->params['customfield_display'] != ''):
|
303 |
$lcp_customs = '';
|
304 |
|
305 |
+
//Doesn't work for many custom fields when having spaces:
|
306 |
$custom_key = trim($custom_key);
|
307 |
|
308 |
//Create array for many fields:
|
316 |
$my_custom_field = $custom_fields[$something];
|
317 |
if (sizeof($my_custom_field) > 0 ):
|
318 |
foreach ( $my_custom_field as $key => $value ) :
|
319 |
+
$lcp_customs .= "<div class=\"lcp-customfield\">";
|
320 |
+
if ($this->params['customfield_display_name'] != "no")
|
321 |
+
$lcp_customs .= $something . " : ";
|
322 |
+
$lcp_customs .= $value . "</div>";
|
323 |
endforeach;
|
324 |
endif;
|
325 |
endforeach;
|
370 |
public function get_date_to_show($single){
|
371 |
if ($this->params['date']=='yes'):
|
372 |
//by Verex, great idea!
|
373 |
+
return get_the_time($this->params['dateformat'], $single);
|
374 |
else:
|
375 |
return null;
|
376 |
endif;
|
@@ -109,6 +109,11 @@ class CatListDisplayer {
|
|
109 |
$this->lcp_output .= $this->get_morelink();
|
110 |
endif;
|
111 |
|
|
|
|
|
|
|
|
|
|
|
112 |
if (!empty($this->params['pagination']) && $this->params['pagination'] == "yes"):
|
113 |
$lcp_paginator = '';
|
114 |
$pages_count = ceil (
|
@@ -118,21 +123,22 @@ class CatListDisplayer {
|
|
118 |
$lcp_paginator .= $this->lcp_page_link($i, true);
|
119 |
}
|
120 |
|
121 |
-
$
|
122 |
|
123 |
// Add "Previous" link
|
124 |
if ($this->catlist->get_page() > 1){
|
125 |
-
$
|
126 |
}
|
127 |
|
128 |
-
$
|
|
|
129 |
// Add "Next" link
|
130 |
if ($this->catlist->get_page() < $pages_count){
|
131 |
-
$
|
132 |
}
|
133 |
-
$
|
134 |
-
|
135 |
endif;
|
|
|
136 |
}
|
137 |
|
138 |
private function lcp_page_link($page, $char = nil){
|
@@ -282,7 +288,7 @@ class CatListDisplayer {
|
|
282 |
}
|
283 |
|
284 |
private function get_date($single, $tag = null, $css_class = null){
|
285 |
-
$info = $this->catlist->get_date_to_show($single);
|
286 |
return $this->assign_style($info, $tag, $css_class);
|
287 |
}
|
288 |
|
109 |
$this->lcp_output .= $this->get_morelink();
|
110 |
endif;
|
111 |
|
112 |
+
$this->lcp_output .= $this->get_pagination();
|
113 |
+
}
|
114 |
+
|
115 |
+
public function get_pagination(){
|
116 |
+
$pag_output = '';
|
117 |
if (!empty($this->params['pagination']) && $this->params['pagination'] == "yes"):
|
118 |
$lcp_paginator = '';
|
119 |
$pages_count = ceil (
|
123 |
$lcp_paginator .= $this->lcp_page_link($i, true);
|
124 |
}
|
125 |
|
126 |
+
$pag_output .= "<ul class='lcp_paginator'>";
|
127 |
|
128 |
// Add "Previous" link
|
129 |
if ($this->catlist->get_page() > 1){
|
130 |
+
$pag_output .= $this->lcp_page_link( intval($this->catlist->get_page()) - 1, "<<" );
|
131 |
}
|
132 |
|
133 |
+
$pag_output .= $lcp_paginator;
|
134 |
+
|
135 |
// Add "Next" link
|
136 |
if ($this->catlist->get_page() < $pages_count){
|
137 |
+
$pag_output .= $this->lcp_page_link( intval($this->catlist->get_page()) + 1, ">>");
|
138 |
}
|
139 |
+
$pag_output .= "</ul>";
|
|
|
140 |
endif;
|
141 |
+
return $pag_output;
|
142 |
}
|
143 |
|
144 |
private function lcp_page_link($page, $char = nil){
|
288 |
}
|
289 |
|
290 |
private function get_date($single, $tag = null, $css_class = null){
|
291 |
+
$info = " " . $this->catlist->get_date_to_show($single);
|
292 |
return $this->assign_style($info, $tag, $css_class);
|
293 |
}
|
294 |
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( is_admin() ){
|
3 |
+
add_action( 'admin_menu', 'list_category_posts_menu' );
|
4 |
+
add_action( 'admin_init', 'lcp_settings' );
|
5 |
+
}
|
6 |
+
|
7 |
+
function lcp_settings() { // whitelist options
|
8 |
+
register_setting( 'list_category_posts_group', 'numberposts' );
|
9 |
+
}
|
10 |
+
|
11 |
+
function list_category_posts_menu() {
|
12 |
+
add_options_page( 'List Category Posts Options', 'List Category Posts',
|
13 |
+
'manage_options', 'list-category-posts',
|
14 |
+
'list_category_posts_options' );
|
15 |
+
}
|
16 |
+
|
17 |
+
function list_category_posts_options() {
|
18 |
+
if ( !current_user_can( 'manage_options' ) ) {
|
19 |
+
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
|
20 |
+
}
|
21 |
+
$numberposts = get_option('numberposts');
|
22 |
+
?>
|
23 |
+
<div class="wrap">
|
24 |
+
<h2>List Category Posts</h2>
|
25 |
+
<form method="post" action="options.php">
|
26 |
+
<?php
|
27 |
+
settings_fields('list_category_posts_group');
|
28 |
+
do_settings_sections('list_category_posts_group');
|
29 |
+
?>
|
30 |
+
|
31 |
+
<table class="form-table">
|
32 |
+
<tbody>
|
33 |
+
<tr valign="top">
|
34 |
+
<th scope="row">
|
35 |
+
<label for="numberposts">
|
36 |
+
<strong><?php _e("Number of Posts", "list-category-posts"); ?> :</strong>
|
37 |
+
</label>
|
38 |
+
</th>
|
39 |
+
<td>
|
40 |
+
<input type="text" id="numberposts" name="numberposts" value="<?php echo $numberposts; ?>"/>
|
41 |
+
<small>
|
42 |
+
<ul>
|
43 |
+
<li>
|
44 |
+
<?php _e("Default number of posts (overriden using <code>numberposts</code> parameter on each shortcode)."); ?>
|
45 |
+
</li>
|
46 |
+
<li><?php _e("0 - displays the max number of posts per page");?></li>
|
47 |
+
<li><?php _e("-1 - displays ALL THE POSTS (no limit)");?></li>
|
48 |
+
</ul>
|
49 |
+
</small>
|
50 |
+
</td>
|
51 |
+
</tbody>
|
52 |
+
</table>
|
53 |
+
<?php submit_button(); ?>
|
54 |
+
</form>
|
55 |
+
<p>
|
56 |
+
<em>
|
57 |
+
<?php _e("Thanks for using List Category Posts.");?>
|
58 |
+
<?php _e("If you need help with the plugin, please visit
|
59 |
+
the <a href='http://wordpress.org/support/plugin/list-category-posts'>WordPress
|
60 |
+
support forum</a>. Make sure
|
61 |
+
you <a href='http://wordpress.org/extend/plugins/list-category-posts/other_notes/'>read
|
62 |
+
the instructions</a> to be aware of all the things you can do
|
63 |
+
with List Category Posts."); ?>
|
64 |
+
</em>
|
65 |
+
</p>
|
66 |
+
|
67 |
+
<p>
|
68 |
+
<em>
|
69 |
+
<?php _e("Please post <strong>new feature requests, Bug fixes,
|
70 |
+
enhancements</strong>
|
71 |
+
to <a href='https://github.com/picandocodigo/List-Category-Posts/issues'>GitHub
|
72 |
+
Issues</a> and check out the
|
73 |
+
the <a href='https://github.com/picandocodigo/List-Category-Posts'>GitHub
|
74 |
+
repo</a> if you want to contribute code."); ?>
|
75 |
+
</p>
|
76 |
+
<p>
|
77 |
+
<?php _e("If you've found the plugin useful, consider making
|
78 |
+
a <a href='http://picandocodigo.net/programacion/wordpress/list-category-posts-wordpress-plugin-english/'
|
79 |
+
title='Donate via PayPal' rel='nofollow'>donation via PayPal</a>
|
80 |
+
or visit my Amazon Wishlist
|
81 |
+
for <a href='http://www.amazon.com/gp/registry/wishlist/2HU1JYOF7DX5Q/ref=wl_web'
|
82 |
+
title='Amazon Wishlist' rel='nofollow'>books</a>
|
83 |
+
or <a href='http://www.amazon.com/registry/wishlist/1LVYAOJAZQOI0/ref=cm_wl_rlist_go_o'
|
84 |
+
rel='nofollow'>comic books</a> :)."); ?>
|
85 |
+
</em>
|
86 |
+
</p>
|
87 |
+
</div>
|
88 |
+
<?php } ?>
|
@@ -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 from a category into 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, and the number of posts to display. You can use [catlist] as many times as needed with different arguments. Usage: [catlist argument1=value1 argument2=value2].
|
6 |
-
Version: 0.
|
7 |
Author: Fernando Briano
|
8 |
Author URI: http://picandocodigo.net/
|
9 |
|
@@ -31,6 +31,7 @@
|
|
31 |
load_plugin_textdomain( 'list-category-posts', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
32 |
|
33 |
include 'include/ListCategoryPostsWidget.php';
|
|
|
34 |
require_once 'include/CatListDisplayer.php';
|
35 |
|
36 |
class ListCategoryPosts{
|
@@ -45,7 +46,7 @@ class ListCategoryPosts{
|
|
45 |
'name' => '',
|
46 |
'orderby' => 'date',
|
47 |
'order' => 'desc',
|
48 |
-
'numberposts' => '
|
49 |
'date' => 'no',
|
50 |
'date_tag' => '',
|
51 |
'date_class' =>'',
|
@@ -88,6 +89,7 @@ class ListCategoryPosts{
|
|
88 |
'customfield_name' => '',
|
89 |
'customfield_value' =>'',
|
90 |
'customfield_display' =>'',
|
|
|
91 |
'customfield_orderby' =>'',
|
92 |
'taxonomy' => '',
|
93 |
'categorypage' => '',
|
@@ -104,6 +106,9 @@ class ListCategoryPosts{
|
|
104 |
'pagination' => 'no',
|
105 |
'instance' => '0'
|
106 |
), $atts);
|
|
|
|
|
|
|
107 |
if( $atts['pagination'] == 'yes'){
|
108 |
lcp_pagination_css();
|
109 |
}
|
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 from a category into 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, and the number of posts to display. You can use [catlist] as many times as needed with different arguments. Usage: [catlist argument1=value1 argument2=value2].
|
6 |
+
Version: 0.41
|
7 |
Author: Fernando Briano
|
8 |
Author URI: http://picandocodigo.net/
|
9 |
|
31 |
load_plugin_textdomain( 'list-category-posts', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
32 |
|
33 |
include 'include/ListCategoryPostsWidget.php';
|
34 |
+
include 'include/options.php';
|
35 |
require_once 'include/CatListDisplayer.php';
|
36 |
|
37 |
class ListCategoryPosts{
|
46 |
'name' => '',
|
47 |
'orderby' => 'date',
|
48 |
'order' => 'desc',
|
49 |
+
'numberposts' => '',
|
50 |
'date' => 'no',
|
51 |
'date_tag' => '',
|
52 |
'date_class' =>'',
|
89 |
'customfield_name' => '',
|
90 |
'customfield_value' =>'',
|
91 |
'customfield_display' =>'',
|
92 |
+
'customfield_display_name' =>'no',
|
93 |
'customfield_orderby' =>'',
|
94 |
'taxonomy' => '',
|
95 |
'categorypage' => '',
|
106 |
'pagination' => 'no',
|
107 |
'instance' => '0'
|
108 |
), $atts);
|
109 |
+
if( $atts['numberposts'] == ''){
|
110 |
+
$atts['numberposts'] = get_option('numberposts');
|
111 |
+
}
|
112 |
if( $atts['pagination'] == 'yes'){
|
113 |
lcp_pagination_css();
|
114 |
}
|
@@ -4,7 +4,7 @@ Donate Link: http://picandocodigo.net/programacion/wordpress/list-category-posts
|
|
4 |
Tags: list, categories, posts, cms
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 3.8
|
7 |
-
Stable tag: 0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -15,9 +15,20 @@ List Category Posts allows you to list posts from a category into a post/page us
|
|
15 |
|
16 |
`[catlist name="news"]`
|
17 |
|
18 |
-
The shortcode accepts a category name or id, the order in which you
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
`[catlist id=1 numberposts=10]`
|
20 |
|
|
|
|
|
|
|
21 |
**Please read [the instructions](http://wordpress.org/extend/plugins/list-category-posts/other_notes/)** to learn what parameters are available and how to use them.
|
22 |
|
23 |
**Customization**: The different elements to display con be styled with CSS. you can define an HTML tag to wrap the element with, and a CSS class for this tag. Check [Other Notes](http://wordpress.org/extend/plugins/list-category-posts/other_notes/) for usage.
|
@@ -133,7 +144,11 @@ update the plugin.
|
|
133 |
* **ASC** - Ascending (lowest to highest).
|
134 |
* **DESC** - Descending (highest to lowest). Ex: `[catlist name=mycategory orderby=title order=asc]`
|
135 |
|
136 |
-
* **numberposts** - Number of posts to return. Set to 0 to use the max
|
|
|
|
|
|
|
|
|
137 |
|
138 |
* **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.
|
139 |
|
@@ -201,7 +216,18 @@ update the plugin.
|
|
201 |
|
202 |
* **custom fields** - To use custom fields, you must specify two values: customfield_name and customfield_value. Using this only show posts that contain a custom field with this name and value. Both parameters must be defined, or neither will work.
|
203 |
|
204 |
-
* **customfield_display** - Display custom field(s). You can specify
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
|
206 |
* **template** - File name of template from templates directory without extension. Example: For 'template.php' value is only 'template'. Default is 'default', which displays an unordered list (ul html tag) with a CSS class. This class can be passed as a parameter or by default it's: 'lcp_catlist'. You can also use the default 'div' value. This will output a div with the 'lcp_catlist' CSS class (or one you pass as parameter with the class argument). The inner items (posts) will be displayed between p tags.
|
207 |
|
@@ -352,6 +378,15 @@ Template system has changed. Custom templates should be stored in WordPress them
|
|
352 |
|
353 |
== Changelog ==
|
354 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
= 0.40.1 =
|
356 |
|
357 |
* Small fix closing quotes on content when using <!--more-->
|
4 |
Tags: list, categories, posts, cms
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 3.8
|
7 |
+
Stable tag: 0.41
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
15 |
|
16 |
`[catlist name="news"]`
|
17 |
|
18 |
+
The shortcode accepts a category name or id, the order in which you
|
19 |
+
want the posts to display, and the number of posts to display. You can
|
20 |
+
also display the post author, date, excerpt, custom field values, even
|
21 |
+
the content!
|
22 |
+
|
23 |
+
The [catlist] shortcode can be used as many times as needed with
|
24 |
+
different arguments on each post/page. You can add a lot more
|
25 |
+
parameters according to what and how you want to show your post's
|
26 |
+
list:
|
27 |
`[catlist id=1 numberposts=10]`
|
28 |
|
29 |
+
There's an options page which only has one option to set for the
|
30 |
+
plugin at the moment. But new options will be implemented on demand.
|
31 |
+
|
32 |
**Please read [the instructions](http://wordpress.org/extend/plugins/list-category-posts/other_notes/)** to learn what parameters are available and how to use them.
|
33 |
|
34 |
**Customization**: The different elements to display con be styled with CSS. you can define an HTML tag to wrap the element with, and a CSS class for this tag. Check [Other Notes](http://wordpress.org/extend/plugins/list-category-posts/other_notes/) for usage.
|
144 |
* **ASC** - Ascending (lowest to highest).
|
145 |
* **DESC** - Descending (highest to lowest). Ex: `[catlist name=mycategory orderby=title order=asc]`
|
146 |
|
147 |
+
* **numberposts** - Number of posts to return. Set to 0 to use the max
|
148 |
+
number of posts per page. Set to -1 to remove the limit.
|
149 |
+
Ex: `[catlist name=mycategory numberposts=10]`
|
150 |
+
You can set the default number of posts globally on the options
|
151 |
+
page on your Dashboard in Settings / List Category Posts.
|
152 |
|
153 |
* **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.
|
154 |
|
216 |
|
217 |
* **custom fields** - To use custom fields, you must specify two values: customfield_name and customfield_value. Using this only show posts that contain a custom field with this name and value. Both parameters must be defined, or neither will work.
|
218 |
|
219 |
+
* **customfield_display** - Display custom field(s). You can specify
|
220 |
+
many fields to show, separating them with a coma. If you want to
|
221 |
+
display just the value and not the name of the custom field, use
|
222 |
+
`customfield_display_name` and set it to no:
|
223 |
+
|
224 |
+
* **customfield_display_name** - To use with `customfield_display`.
|
225 |
+
Use it to just print the value of the Custom field and not the
|
226 |
+
name. Example:
|
227 |
+
`[catlist numberposts=-1 customfield_display="Mood"
|
228 |
+
customfield_display_name="no"]`
|
229 |
+
Will print the value of the Custom Field "Mood" but not the text
|
230 |
+
"Mood: [value]".
|
231 |
|
232 |
* **template** - File name of template from templates directory without extension. Example: For 'template.php' value is only 'template'. Default is 'default', which displays an unordered list (ul html tag) with a CSS class. This class can be passed as a parameter or by default it's: 'lcp_catlist'. You can also use the default 'div' value. This will output a div with the 'lcp_catlist' CSS class (or one you pass as parameter with the class argument). The inner items (posts) will be displayed between p tags.
|
233 |
|
378 |
|
379 |
== Changelog ==
|
380 |
|
381 |
+
= 0.41 =
|
382 |
+
* Adds options page, to set the default numberposts value globally.
|
383 |
+
* Adds `customfield_display_name` param.
|
384 |
+
* Adds pagination to custom template.
|
385 |
+
* Fixes date display.
|
386 |
+
* Adds conditions to Vagrantfile to boot faster and not repeat work.
|
387 |
+
* Fixes exclude posts, broken when migrating from get_posts to
|
388 |
+
WP_Query.
|
389 |
+
|
390 |
= 0.40.1 =
|
391 |
|
392 |
* Small fix closing quotes on content when using <!--more-->
|
@@ -51,47 +51,50 @@ $lcp_display_output .= '<ul class="lcp_catlist">';
|
|
51 |
* You can now pass an html tag as a parameter. This tag will sorround the info
|
52 |
* you want to display. You can also assign a specific CSS class to each field.
|
53 |
*/
|
54 |
-
foreach ($this->catlist->get_categories_posts() as $single)
|
55 |
-
|
56 |
-
|
57 |
|
58 |
-
|
59 |
-
|
60 |
|
61 |
-
|
62 |
-
|
63 |
|
64 |
-
|
65 |
-
|
66 |
|
67 |
-
|
68 |
-
|
69 |
|
70 |
-
|
71 |
-
|
72 |
|
73 |
-
|
74 |
-
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
|
92 |
$lcp_display_output .= '</ul>';
|
93 |
|
94 |
// If there's a "more link", show it:
|
95 |
$lcp_display_output .= $this->catlist->get_morelink();
|
96 |
|
|
|
|
|
|
|
97 |
$this->lcp_output = $lcp_display_output;
|
51 |
* You can now pass an html tag as a parameter. This tag will sorround the info
|
52 |
* you want to display. You can also assign a specific CSS class to each field.
|
53 |
*/
|
54 |
+
foreach ($this->catlist->get_categories_posts() as $single){
|
55 |
+
//Start a List Item for each post:
|
56 |
+
$lcp_display_output .= "<li>";
|
57 |
|
58 |
+
//Show the title and link to the post:
|
59 |
+
$lcp_display_output .= $this->get_post_title($single);
|
60 |
|
61 |
+
//Show comments:
|
62 |
+
$lcp_display_output .= $this->get_comments($single);
|
63 |
|
64 |
+
//Show date:
|
65 |
+
$lcp_display_output .= ' ' . $this->get_date($single);
|
66 |
|
67 |
+
//Show author
|
68 |
+
$lcp_display_output .= $this->get_author($single);
|
69 |
|
70 |
+
//Custom fields:
|
71 |
+
$lcp_display_output .= $this->get_custom_fields($this->params['customfield_display'], $single->ID);
|
72 |
|
73 |
+
//Post Thumbnail
|
74 |
+
$lcp_display_output .= $this->get_thumbnail($single);
|
75 |
|
76 |
+
/**
|
77 |
+
* Post content - Example of how to use tag and class parameters:
|
78 |
+
* This will produce:<p class="lcp_content">The content</p>
|
79 |
+
*/
|
80 |
+
$lcp_display_output .= $this->get_content($single, 'p', 'lcp_content');
|
81 |
|
82 |
+
/**
|
83 |
+
* Post content - Example of how to use tag and class parameters:
|
84 |
+
* This will produce:<div class="lcp_excerpt">The content</div>
|
85 |
+
*/
|
86 |
+
$lcp_display_output .= $this->get_excerpt($single, 'div', 'lcp_excerpt');
|
87 |
|
88 |
+
//Close li tag
|
89 |
+
$lcp_display_output .= '</li>';
|
90 |
+
}
|
91 |
|
92 |
$lcp_display_output .= '</ul>';
|
93 |
|
94 |
// If there's a "more link", show it:
|
95 |
$lcp_display_output .= $this->catlist->get_morelink();
|
96 |
|
97 |
+
//Pagination
|
98 |
+
$lcp_display_output .= $this->get_pagination();
|
99 |
+
|
100 |
$this->lcp_output = $lcp_display_output;
|