Changeset 1804181
- Timestamp:
- 01/17/2018 02:52:31 AM (7 years ago)
- Location:
- ments/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ments/trunk/ments.php
r1731420 r1804181 2 2 /* 3 3 * Plugin Name: autometa's MENTS 4 * Description: It reproduces a comment list on pages or posts or portfolios or products simply via: [ments].5 * Version: 1.04 * Description: It reproduces comment lists in pages, posts, portfolios or products simply via: [ments] and [recents]. 5 * Version: 2.0 6 6 * Author: JorgeAmVF 7 7 * Author URI: https://profiles.wordpress.org/jorgeamvf/ … … 26 26 */ 27 27 28 // [ments] = comment lists 29 function autometa_ments($args, $comments){ 30 $comments = get_comments(array('order' => 'ASC', 'status' => 'approve')); 31 wp_list_comments(array('walker' => new autometa_ments_Walker_Comment(), 'echo' => 1, 'per_page' => 0, 'type' => 'comment'), $comments); 32 return wp_list_comments(); 28 // [ments] = comment list 29 function autometa_comment_list( $args, $comments ) { 30 $comments = get_comments( array( 31 'order' => 'ASC', 32 'status' => 'approve' 33 ) ); 34 $am_ments = '<span id="ments" class="autometa">' . wp_list_comments( array( 35 'walker' => new autometa_ments_Walker_Comment(), 36 'echo' => 1, 37 'per_page' => 0, 38 'type' => 'comment' 39 ), 40 $comments 41 ) . '</span>'; 42 return wp_list_comments(); 33 43 } 34 add_shortcode("ments","autometa_ments"); 44 add_shortcode( "ments", "autometa_comment_list" ); 45 46 // [recents] = recent list 47 function autometa_recent_list( $args, $comments ) { 48 $comments = get_comments( array( 49 'order' => 'DESC', 50 'status' => 'approve' 51 ) ); 52 $am_recents = '<span id="recents" class="autometa">' . wp_list_comments( array( 53 'walker' => new autometa_ments_Walker_Comment(), 54 'echo' => 1, 55 'per_page' => 3, 56 'reverse_top_level' => 0, 57 'type' => 'comment'), 58 $comments 59 ) . '</span>' ; 60 return $am_recents; 61 } 62 add_shortcode( "recents", "autometa_recent_list" ); 35 63 36 64 /** -
ments/trunk/readme.txt
r1732373 r1804181 2 2 Contributors: JorgeAmVF 3 3 Donate link: https://quaestio.org/ 4 Tags: shortcode, automation, metadata, taxonomy, cloud, category, tag4 Tags: shortcode, automation, comment, comment list, list, recent comments, recent 5 5 Requires at least: 2.8.0 6 Tested up to: 4. 8.16 Tested up to: 4.9.2 7 7 Stable Tag: trunk 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 11 It reproduces a list with all comments on pages, posts, portfolios and products simply via: [cats] and [tags] and [catag].11 It reproduces comment lists in pages, posts, portfolios or products simply via: `[ments]` and `[recents]`. 12 12 == Description == 13 13 14 14 **autometa's MENTS** is a simple plugin that uses the following shortcodes: 15 15 16 * *[ments]* = to reproduce a comment list mixing all comments from pages, posts, portfolios and products. 16 * `[ments]` = to reproduce all comments; 17 * `[recents]` = to reproduce recents comments. 17 18 18 **autometa's MENTS** is a n element of **[autometa](https://wordpress.org/plugins/autometa/)** plugin set.19 **autometa's MENTS** is a standalone component of **[autometa](https://wordpress.org/plugins/autometa/)** shortcodes pack. 19 20 20 21 == Installation == 21 22 22 1. Download it or installit to your plugin folder;23 2. Activate it from the plugin tab inside your dashboard;24 3. Write the following shortcode in text fields: **[ments]**.23 1. Install it from *Dashboard*/*Plugins*/*Add Plugins* or download it to your plugin folder; 24 2. Activate it from *Dashboard*/*Plugins*/*Installed Plugins*; 25 3. Write the following shortcodes in text fields: `[ments]`, `[recents]`. 25 26 26 27 == Frequently Asked Questions == 27 28 28 = How does autometa's MENTS work?=29 = Plugin Features = 29 30 30 **[autometa](https://wordpress.org/plugins/autometa/)** reproduces metadata information automatically via shorcodes in general, **autometa's MENTS** reproduces a comments listin special.31 **[autometa](https://wordpress.org/plugins/autometa/)** reproduces metadata information automatically via shorcodes in general, **autometa's MENTS** generates comment lists in special. 31 32 32 = What is needed to use autometa's MENTS?=33 = How To = 33 34 34 Just write the following shortcodes inside a text field and between brackets as usual: *[ments]*.35 Just write one or more of the following shortcodes inside a text field and between brackets as usual: `[ments]` and/or `[recents]`. 35 36 36 = Which functions are used by autometa's MENTS?=37 = CSS Style Selectors = 37 38 38 These: [`add_shortcode()`](https://codex.wordpress.org/Function_Reference/add_shortcode) and [`get_comments()`](https://codex.wordpress.org/Function_Reference/get_comments) and [`wp_list_comments()`](https://codex.wordpress.org/Function_Reference/wp_list_comments) and [`Walker`](https://codex.wordpress.org/Class_Reference/Walker) and [`get_comment_author_link()`](https://developer.wordpress.org/reference/functions/get_comment_author_link/) and [`get_comment_link()`](https://developer.wordpress.org/reference/functions/get_comment_link/) and [`get_the_title()`](https://developer.wordpress.org/reference/functions/get_the_title/). 39 * `#ments` = `[ments]` ID; 40 * `#recents` = `[recents]` ID; 41 * `.autometa` = **autometa** class. 42 43 = PHP Functions Reference = 44 45 * [`add_shortcode()`](https://developer.wordpress.org/reference/functions/add_shortcode/) 46 * [`get_comment_author_link()`](https://developer.wordpress.org/reference/functions/get_comment_author_link/) 47 * [`get_comment_link()`](https://developer.wordpress.org/reference/functions/get_comment_link/) 48 * [`get_comments()`](https://developer.wordpress.org/reference/functions/get_comments/) 49 * [`get_the_title()`](https://developer.wordpress.org/reference/functions/get_the_title/) 50 * [`Walker`](https://developer.wordpress.org/reference/classes/walker/) 51 * [`wp_list_comments()`](https://developer.wordpress.org/reference/functions/wp_list_comments/)
Note: See TracChangeset
for help on using the changeset viewer.