Changeset 1804074
- Timestamp:
- 01/16/2018 10:30:11 PM (7 years ago)
- Location:
- woodo/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
woodo/trunk/readme.txt
r1701025 r1804074 4 4 Tags: shortcode, automation, metadata, taxonomy, cloud, category, tag, woocommerce 5 5 Requires at least: 2.5.0 6 Tested up to: 4. 86 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 products simply via: [woocats] and [wootags] and [woodo].11 It reproduces product categories and tags in products and it generates a cloud mixing categories and tags of products simply via: `[woocats]` and `[wootags]` and `[woodo]`. 12 12 == Description == 13 13 14 <strong>autometa's WOODO</strong>is a simple plugin that uses the following shortcodes:14 **autometa's WOODO** is a simple plugin that uses the following shortcodes: 15 15 16 * `[woocats]` = to reproduce the categories of a product;17 * `[wootags]` = to reproduce the tags of a product;18 * `[woodo]` = to generate a taxonomy cloud mixing categories and tags of products.16 * `[woocats]` = to reproduce product categories; 17 * `[wootags]` = to reproduce product tags; 18 * `[woodo]` = to generate a product taxonomies cloud. 19 19 20 <strong>autometa's WOODO</strong> 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: `[woocats]`, `[wootags]`, `[woodo]`. 20 **autometa's WOODO** 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 WOODO work?=24 = Installation Instructions = 31 25 32 [autometa](https://wordpress.org/plugins/autometa/) reproduces metadata information automatically via shorcodes in general, <strong>autometa's WOODO</strong> reproduces categories and tags of products 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: `[woocats]`, `[wootags]`, `[woodo]`. 33 29 34 = What is needed to use autometa's WOODO? = 30 = Plugin Features = 31 32 [autometa](https://wordpress.org/plugins/autometa/) reproduces metadata information automatically via shorcodes in general, **autometa's WOODO** reproduces product taxonomy-related data in special 33 34 = How To = 35 35 36 36 Just write one or more of the following shortcodes inside a text field and between brackets as usual: `[woocats]` and/or `[wootags]` and/or `[woodo]`. 37 37 38 = Which functions are used by autometa's WOODO?=38 = CSS Style Selectors = 39 39 40 These: [add_shortcode](https://codex.wordpress.org/Function_Reference/add_shortcode) and [get_the_term_list](https://codex.wordpress.org/Function_Reference/get_the_term_list) and [wp_tag_cloud](https://codex.wordpress.org/Function_Reference/wp_tag_cloud). 40 * `#pfcats` = `[pfcats]` ID; 41 * `#pfatts` = `[pfatts]` ID; 42 * `#folio` = `[folio]` 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_term_list()`](https://developer.wordpress.org/reference/functions/get_the_term_list/) 49 * [`wp_tag_cloud()`](https://developer.wordpress.org/reference/functions/wp_tag_cloud/) -
woodo/trunk/woodo.php
r1505568 r1804074 2 2 /* 3 3 * Plugin Name: autometa's WOODO 4 * Description: It reproduces categories and tags and it generates a cloud mixing categories and tags of products simply via: [woocats] and [wootags] and [woodo].5 * Version: 1.14 * Description: It reproduces product categories and tags in products and it generates a cloud mixing categories and tags of products simply via: [woocats] and [wootags] and [woodo]. 5 * Version: 2.0 6 6 * Author: JorgeAmVF 7 7 * Author URI: https://profiles.wordpress.org/jorgeamvf/ … … 26 26 */ 27 27 28 // [woocats] = categories29 function woo_pub_categories( $atts, $content = null ) {30 global $post;31 $woopubcategories = get_the_term_list( $post->ID, 'product_cat', $separator = ' ' );32 return '<div id="woocats" class="autometa">' . $woopubcategories . '</div>';28 // [woocats] = (product) categories 29 function autometa_product_categories( $atts, $content = null ) { 30 global $post; 31 $am_woocats = '<span id="woocats" class="autometa">' . get_the_term_list( $post->ID, 'product_cat', $separator = ' ' ) . '</span>'; 32 return $am_woocats; 33 33 } 34 add_shortcode( "woocats", " woo_pub_categories" );34 add_shortcode( "woocats", "autometa_product_categories" ); 35 35 36 // [wootags] = tags37 function woo_pub_tags( $atts, $content = null ) {38 global $post;39 $woopubtags = get_the_term_list( $post->ID, 'product_tag', $separator = ' ' );40 return '<div id="wootags" class="autometa">' . $woopubtags . '</div>';36 // [wootags] = (product) tags 37 function autometa_product_tags( $atts, $content = null ) { 38 global $post; 39 $am_wootags = '<span id="woocats" class="autometa">' . get_the_term_list( $post->ID, 'product_tag', $separator = ' ' ) . '</span>'; 40 return $am_wootags; 41 41 } 42 add_shortcode( "wootags", " woo_pub_tags" );42 add_shortcode( "wootags", "autometa_product_tags" ); 43 43 44 // [woodo] = categories & tags 45 function woodoing ( $echo = false ) { 46 if (function_exists('wp_tag_cloud')) 47 return wp_tag_cloud( array( 'number' => 0, 'orderby' => 'count', 'order' => 'RAND', 'taxonomy' => array( 'product_tag', 'product_cat' ), ) ); 44 // [woodo] = (product) categories & tags 45 function autometa_product_taxonomies( $echo = false ) { 46 if ( function_exists( 'wp_tag_cloud' ) ) 47 $am_woodoo = '<span id="woodo" class="autometa">' . wp_tag_cloud( array( 48 'number' => 0, 49 'orderby' => 'count', 50 'order' => 'RAND', 51 'taxonomy' => array( 52 'product_tag', 53 'product_cat' 54 ), 55 ) ); 56 return $am_woodo. '</span>'; 48 57 } 49 add_shortcode( "woodo", "woodoing");58 add_shortcode( "woodo", "autometa_product_taxonomies" ); 50 59 ?>
Note: See TracChangeset
for help on using the changeset viewer.