वर्णन
Creates functions to assist in displaying a list of the most recent comments. Provides more configurability than the widget that comes with WordPress.
Configuration
You may pass parameters when calling the function to configure some of the options. Parameters are accepted only in the query-string-style.
list_most_recent_comments()
In addition to the parameters that get_comments() and get_most_recent_comments()
(see below) accept, this function accepts the following parameters:
excerpt_words
— The number of words from the comment to displayexcerpt_chars
— Or alternately the number of characters from the comment to displaycomment_format
— Allows you to pick from two predefined display formats:
- Comment Author on Post Title
- Comment Author: This is the comment excerpt
Example:
<?php list_most_recent_comments( 'excerpt_words=5' ); ?>
get_most_recent_comments()
A more powerful version of get_comments(). It accepts the same parameters as well as the following ones:
passworded_posts
— Boolean to control showing comments on passworded posts or not. Defaults tofalse
.showpings
— Boolean to control showing pings and trackbacks or not. Defaults tofalse
.post_types
— Array of post types to include comments from. Defaults to posts and pages:array( 'post', 'page' )
post_statuses
— Array of post statuses to include comments from. Defaults to published posts and static pages:array( 'publish', 'static' )
Arguments should likely be passed as an array instead of a string.
Example:
<?php
list_most_recent_comments( array(
'showpings' => true,
'post_types' => array( 'post', 'page', 'foobar' ),
) );
?>
स्थापना
- Visit Plugins -> Add New in your WordPress administration area and search for the name of this plugin.
- Activate the plugin.
- Add
<?php list_most_recent_comments(); ?>
to your theme.
समीक्षा
ह्या प्लगइनसाठी कोणतेही समीक्षण नाही.
योगदानकर्ते आणि विकसक
“Recent Comments” हे मुक्त स्रोत सॉफ्टवेअर आहे. पुढील लोक या प्लगइनच्या निर्मितीत योगदान केले आहे.
योगदानकर्तेभाषांतर करा “Recent Comments” तुमच्या भाषेत.
विकासातील आग्रह?
कोड ब्राउझ करा, SVN संग्रहालय तपासा, किंवा विकास लॉग च्या RSS द्वारे सदस्यता घ्या.
बदलांची यादी
Version 2.0.0
- Recoded from scratch to make use of
get_comments()
instead of a direct database query. - Additional parameters added.
Version 1.0.0
- Original release