Changeset 1804034
- Timestamp:
- 01/16/2018 08:51:10 PM (7 years ago)
- Location:
- catag/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
catag/trunk/catag.php
r1732160 r1804034 2 2 /* 3 3 * Plugin Name: autometa's CATAG 4 * Description: It reproduces categories and tags and it generates a cloud mixing categories and tags of posts simply via: [cats] and [tags] and [catag].5 * Version: 1.24 * Description: It reproduces post categories and tags in posts and it generates a cloud mixing categories and tags of posts simply via: [cats] and [tags] and [catag]. 5 * Version: 2.0 6 6 * Author: JorgeAmVF 7 7 * Author URI: https://profiles.wordpress.org/jorgeamvf/ … … 26 26 */ 27 27 28 // [cats] = categories (post)29 function autometa_post_categories( $atts, $content = null){30 global $post;31 $autometascategories = get_the_category_list($separator = ' ', $post->ID);32 return '<div id = "cats" class = "autometa">' . $autometascategories . '</div>';28 // [cats] = (post) categories 29 function autometa_post_categories( $atts, $content = null ) { 30 global $post; 31 $am_cats = '<span id="cats" class="autometa">' .get_the_category_list( $separator = ' ', $post->ID ) . '</span>'; 32 return $am_cats; 33 33 } 34 add_shortcode( "cats","autometa_post_categories");34 add_shortcode( "cats", "autometa_post_categories" ); 35 35 36 // [tags] = tags (post)37 function autometa_post_tags( $atts, $content = null){38 global $post;39 $autometastags = get_the_term_list($post->ID, 'post_tag', $separator = ' ');40 return '<div id = "tags" class = "autometa">' . $autometastags . '</div>';36 // [tags] = (post) tags 37 function autometa_post_tags( $atts, $content = null ) { 38 global $post; 39 $am_tags = '<span id="tags" class="autometa">' . get_the_term_list( $post->ID, 'post_tag', $separator = ' ' ) . '</span>'; 40 return $am_tags; 41 41 } 42 add_shortcode( "tags","autometa_post_tags");42 add_shortcode( "tags", "autometa_post_tags" ); 43 43 44 // [catag] = categories & tags (post) 45 function autometa_post_taxonomy($echo = false){ 46 if (function_exists('wp_tag_cloud')) 47 return wp_tag_cloud(array('number' => 0, 'orderby' => 'count', 'order' => 'RAND', 'taxonomy' => array('post_tag', 'category'),)); 44 // [catag] = (post) categories & tags 45 function autometa_post_taxonomies( $echo = false ) { 46 if ( function_exists( 'wp_tag_cloud') ) 47 $am_catag = '<span id="catag" class="autometa">' . wp_tag_cloud( array( 48 'number' => 0, 49 'orderby' => 'count', 50 'order' => 'RAND', 51 'taxonomy' => array( 52 'post_tag', 53 'category' 54 ), 55 ) ) . '</span>'; 56 return $am_catag; 48 57 } 49 add_shortcode( "catag","autometa_post_taxonomy");58 add_shortcode( "catag", "autometa_post_taxonomies" ); 50 59 ?> -
catag/trunk/readme.txt
r1732160 r1804034 4 4 Tags: shortcode, automation, metadata, taxonomy, cloud, category, tag 5 5 Requires at least: 2.5.0 6 Tested up to: 4. 8.16 Tested up to: 4.9.1 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 categories and tags and it generates a cloud mixing categories and tags of posts simply via: [cats] and [tags] and [catag].11 It reproduces categories and tags in posts and it generates a cloud mixing categories and tags of posts simply via: `[cats]` and `[tags]` and `[catag]`. 12 12 == Description == 13 13 14 14 **autometa's CATAG** is a simple plugin that uses the following shortcodes: 15 15 16 * *[cats]* = to reproduce the categories of a post;17 * *[tags]* = to reproduce the tags of a post;18 * *[catag]*= to generate a taxonomy cloud mixing categories and tags of posts.16 * `[cats]` = to reproduce post categories; 17 * `[tags]` = to reproduce post tags; 18 * `[catag]` = to generate a taxonomy cloud mixing categories and tags of posts. 19 19 20 **autometa's CATAG** is an element of **[autometa](https://wordpress.org/plugins/autometa/)** plugin set. 21 22 == Installation == 23 24 1. Download it or install it to your plugin folder; 25 2. Activate it from the plugin tab inside your dashboard; 26 3. Write the following shortcodes in text fields of posts: *[cats]*, *[tags]*, *[catag]*. 20 **autometa's CATAG** is a standalone component of **[autometa](https://wordpress.org/plugins/autometa/)** shortcodes pack. 27 21 28 22 == Frequently Asked Questions == 29 23 30 = How does autometa's CATAG work?=24 = Installation Instructions = 31 25 32 **[autometa](https://wordpress.org/plugins/autometa/)** reproduces metadata information automatically via shorcodes in general, **autometa's CATAG** reproduces categories and tags of posts in special. 26 1. Install it from *Dashboard*/*Plugins*/*Add Plugins* or download it to your plugin folder; 27 2. Activate it from *Dashboard*/*Plugins*/*Installed Plugins*; 28 3. Write the following shortcodes in text fields: `[cats]`, `[tags]`, `[catag]`. 33 29 34 = What is needed to use autometa's CATAG?=30 = Plugin Features = 35 31 36 Just write one or more of the following shortcodes inside a text field of a post and between brackets as usual: *[cats]* and/or *[tags]* and/or *[catag]*.32 **[autometa](https://wordpress.org/plugins/autometa/)** reproduces metadata information automatically via shorcodes in general, **autometa's CATAG** reproduces post taxonomy-related data in special. 37 33 38 = Where should autometa's CATAG be placed?=34 = How To = 39 35 40 *[cats]* and *[tags]* must be written only inside a text field of a post since it might crash the page if the referred shortcodes are written inside pages, portfolios or products whether the plugin is active once there is no correspondent taxonomy to be reproduced in those environments; otherwise, as *[catag]* reproduces categories and tags from all posts, it can be easily placed inside pages, posts, portfolios or products at ease.36 Just write one or more of the following shortcodes inside a text field and between brackets as usual: `[urlug]` and/or `[urlink]` and/or `[urlinked]`. 41 37 42 = Which functions are used by autometa's CATAG?=38 = CSS Style Selectors = 43 39 44 These: [`add_shortcode()`](https://developer.wordpress.org/reference/functions/add_shortcode/) and [`get_the_category_list()`](https://developer.wordpress.org/reference/functions/get_the_category_list/) and [`get_the_term_list()`](https://developer.wordpress.org/reference/functions/get_the_term_list/) and [`wp_tag_cloud()`](https://developer.wordpress.org/reference/functions/wp_tag_cloud/). 40 * `#cats` = `[cats]` ID; 41 * `#tags` = `[tags]` ID; 42 * `#catag` = `[catag]` ID; 43 * `.autometa` = **autometa** class. 44 45 = PHP Functions Reference = 46 47 * [`add_shortcode()`](https://developer.wordpress.org/reference/functions/add_shortcode/) 48 * [`get_the_category_list()`](https://developer.wordpress.org/reference/functions/get_the_category_list/) 49 * [`get_the_term_list()`](https://developer.wordpress.org/reference/functions/get_the_term_list/) 50 * [`wp_tag_cloud()`](https://developer.wordpress.org/reference/functions/wp_tag_cloud/)
Note: See TracChangeset
for help on using the changeset viewer.