Plugin Directory

Changeset 1803981


Ignore:
Timestamp:
01/16/2018 07:06:28 PM (7 years ago)
Author:
JorgeAmVF
Message:

better-formed readme.txt file provided and CSS selectors added to urlug.php

Location:
urlug/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • urlug/trunk/readme.txt

    r1701024 r1803981  
    44Tags: shortcode, automation, metadata, slug, permalink
    55Requires at least: 3.0.0
    6 Tested up to: 4.8
     6Tested up to: 4.9.1
    77Stable Tag: trunk
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 It reproduces the slug and the permalink of pages or posts simply via: [urlug] and [urlink].
     11It reproduces slugs, permalinks and links in posts, portfolios or products simply via: `[urlug]` and `[urlink]` and `[urlinked]`.
    1212== Description ==
    1313
    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:
    1515
    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.
    1819
    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.
    2621
    2722== Frequently Asked Questions ==
    2823
    29 = How does autometa's URLUG work? =
     24= Installation Instructions =
    3025
    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.
     261. Install it from *Dashboard*/*Plugins*/*Add Plugins* or download it to your plugin folder;
     272. Activate it from *Dashboard*/*Plugins*/*Installed Plugins*;
     283. Write the following shortcodes in text fields: `[urlug]`, `[urlink]`, `[urlinked]`.
    3229
    33 = What is needed to use autometa's URLUG? =
     30= Plugin Features =
    3431
    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.
    3633
    37 = Which functions are used by autometa's URLUG? =
     34= How To =
    3835
    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/).
     36Just 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  
    22/*
    33* 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.1
     4* Description: It reproduces slugs, permalinks and links of pages, posts, portfolios or products simply via: [urlug] and [urlink].
     5* Version: 2.0
    66* Author: JorgeAmVF
    77* Author URI: https://profiles.wordpress.org/jorgeamvf/
     
    2626*/
    2727
    28 // [urlug] = slug
    29 function pub_url(){
    30 $urlslug= get_permalink();
    31  return $urlslug;
     28// [urlug] = URL slug
     29function autometa_url_slug() {
     30    $am_urlug = '<span id="urlug" class="autometa">' . get_permalink() . '</span>';
     31        return $am_urlug;
    3232}
    33 add_shortcode("urlug", "pub_url");
     33add_shortcode( "urlug", "autometa_url_slug" );
    3434
    35 // [urlink] = permalink
    36 function pub_urlink(){
    37 $urlink= get_post_permalink();
    38  return $urlink;
     35// [urlink] = URL permalink
     36function autometa_url_permalink() {
     37    $am_urlink = '<span id="urlink" class="autometa">' . get_post_permalink() . '</span>';
     38        return $am_urlink;
    3939}
    40 add_shortcode("urlink", "pub_urlink");
     40add_shortcode( "urlink", "autometa_url_permalink" );
     41
     42// [urlinked] = URL link
     43function autometa_url_link() {
     44    $am_urlinked = '<span id="urlinked" class="autometa"><a href="' . get_permalink() . '">' . get_permalink() . '</a></span>';
     45        return $am_urlinked;
     46}
     47add_shortcode( "urlinked", "autometa_url_link" );
    4148?>
Note: See TracChangeset for help on using the changeset viewer.