Changeset 1803981
- Timestamp:
- 01/16/2018 07:06:28 PM (7 years ago)
- Location:
- urlug/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
urlug/trunk/readme.txt
r1701024 r1803981 4 4 Tags: shortcode, automation, metadata, slug, permalink 5 5 Requires at least: 3.0.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 the slug and the permalink of pages or posts simply via: [urlug] and [urlink].11 It reproduces slugs, permalinks and links in posts, portfolios or products simply via: `[urlug]` and `[urlink]` and `[urlinked]`. 12 12 == Description == 13 13 14 <strong>autometa's URLUG</strong>is a simple plugin that uses the following shortcodes:14 **autometa's URLUG** is a simple plugin that uses the following shortcodes: 15 15 16 * `[urlug]` = to reproduce the publication slug; 17 * `[urlink]` = to reproduce the publication permalink. 16 * `[urlug]` = to reproduce the URL slug; 17 * `[urlink]` = to reproduce the URL permalink; 18 * `[urlinked]` = to reproduce the URL link. 18 19 19 <strong>autometa's URLUG</strong> is an element of [autometa](https://wordpress.org/plugins/autometa/) plugin set. 20 21 == Installation == 22 23 1. Download it or install it to your plugin folder; 24 2. Activate it from the plugin tab inside your dashboard; 25 3. Write the following shortcodes in text fields: `[urlug]`, `[urlink]`. 20 **autometa's URLUG** is a standalone component of **[autometa](https://wordpress.org/plugins/autometa/)** plugin set. 26 21 27 22 == Frequently Asked Questions == 28 23 29 = How does autometa's URLUG work?=24 = Installation Instructions = 30 25 31 [autometa](https://wordpress.org/plugins/autometa/) reproduces metadata information automatically via shorcodes in general, <strong>autometa's URLUG</strong> reproduces the URL 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: `[urlug]`, `[urlink]`, `[urlinked]`. 32 29 33 = What is needed to use autometa's URLUG?=30 = Plugin Features = 34 31 35 Just write one or more of the following shortcodes inside a text field and between brackets as usual: `[urlug]` and/or `[urlink]`.32 **[autometa](https://wordpress.org/plugins/autometa/)** reproduces metadata information automatically via shorcodes in general, **autometa's URLUG** reproduces URL-related data in special. 36 33 37 = Which functions are used by autometa's URLUG?=34 = How To = 38 35 39 These: [add_shortcode](https://codex.wordpress.org/Function_Reference/add_shortcode) and [get_permalink](https://developer.wordpress.org/reference/functions/get_permalink/) and [get_post_permalink](https://developer.wordpress.org/reference/functions/get_post_permalink/). 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]`. 37 38 = CSS Style Selectors = 39 40 * `#urlug` = `[urlug]` ID; 41 * `#urlink` = `[urlink]` ID; 42 * `#urlinked` = `[urlinked]` ID; 43 * `.autometa` = **autometa** class. 44 45 = PHP Functions Reference = 46 47 * [add_shortcode](https://developer.wordpress.org/reference/functions/add_shortcode/) 48 * [get_permalink](https://developer.wordpress.org/reference/functions/get_permalink/) 49 * [get_post_permalink](https://developer.wordpress.org/reference/functions/get_post_permalink/) -
urlug/trunk/urlug.php
r1505568 r1803981 2 2 /* 3 3 * Plugin Name: autometa's URLUG 4 * Description: It reproduces the slug and the permalink of pages or posts simply via: [urlug] and [urlink].5 * Version: 1.14 * Description: It reproduces slugs, permalinks and links of pages, posts, portfolios or products simply via: [urlug] and [urlink]. 5 * Version: 2.0 6 6 * Author: JorgeAmVF 7 7 * Author URI: https://profiles.wordpress.org/jorgeamvf/ … … 26 26 */ 27 27 28 // [urlug] = slug29 function pub_url(){30 $urlslug= get_permalink();31 return $urlslug;28 // [urlug] = URL slug 29 function autometa_url_slug() { 30 $am_urlug = '<span id="urlug" class="autometa">' . get_permalink() . '</span>'; 31 return $am_urlug; 32 32 } 33 add_shortcode( "urlug", "pub_url");33 add_shortcode( "urlug", "autometa_url_slug" ); 34 34 35 // [urlink] = permalink36 function pub_urlink(){37 $urlink= get_post_permalink();38 return $urlink;35 // [urlink] = URL permalink 36 function autometa_url_permalink() { 37 $am_urlink = '<span id="urlink" class="autometa">' . get_post_permalink() . '</span>'; 38 return $am_urlink; 39 39 } 40 add_shortcode("urlink", "pub_urlink"); 40 add_shortcode( "urlink", "autometa_url_permalink" ); 41 42 // [urlinked] = URL link 43 function autometa_url_link() { 44 $am_urlinked = '<span id="urlinked" class="autometa"><a href="' . get_permalink() . '">' . get_permalink() . '</a></span>'; 45 return $am_urlinked; 46 } 47 add_shortcode( "urlinked", "autometa_url_link" ); 41 48 ?>
Note: See TracChangeset
for help on using the changeset viewer.