Plugin Directory

Changeset 957035


Ignore:
Timestamp:
07/30/2014 12:28:40 AM (12 years ago)
Author:
properwp
Message:

Version 0.3 with 2 new shortcodes

Location:
proper-shortcodes/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • proper-shortcodes/trunk/README.md

    r687825 r957035  
    1 proper-shortcodes
    2 =================
     1# PROPER Shortcodes
    32
    4 Git repo for the PROPER Shortcodes WordPress plugin
     3Git repo for the PROPER Shortcodes WordPress plugin.
     4
     5[WordPress repo plugin here](https://wordpress.org/plugins/proper-shortcodes/)
  • proper-shortcodes/trunk/proper-shortcodes.php

    r696052 r957035  
    33/*
    44Plugin Name: PROPER Shortcodes
    5 Plugin URI: http://theprTRUEweb.com
    6 Description: A collection of shortcodes that has proven useful
    7 Version: 0.2
     5Plugin URI: http://theproperweb.com/product/proper-shortcodes/
     6Description: A collection of shortcodes that have proven useful
     7Version: 0.3
    88Author: PROPER Web Development
    99Author URI: http://theproperweb.com
     
    1818
    1919/* Display base url of WordPress installation
    20  * @return: Returns WP function site_url()
     20 * @return: Returns WP function site_url() or home_url()
    2121 */
    2222function proper_shortcode_site_url() {
    2323    return site_url();
    2424}
     25add_shortcode('site_url', 'proper_shortcode_site_url');
    2526add_shortcode('p_site_url', 'proper_shortcode_site_url');
     27
     28function proper_shortcode_home_url() {
     29    return home_url();
     30}
     31
     32add_shortcode( 'p_home_url', 'proper_shortcode_home_url' );
     33add_shortcode( 'home_url', 'proper_shortcode_home_url' );
    2634
    2735
     
    335343
    336344add_shortcode( 'p_sitemap', 'proper_shortcode_sitemap' );
     345
     346/**
     347 * Outputs a simple <hr> tag with styles, if desired
     348 *
     349 */
     350
     351function proper_shortcode_hr( $atts ) {
     352
     353    $style = ! empty( $atts['style'] ) ? ' style="' . esc_attr( $atts['style'] ) . '"' : '';
     354    return '<hr' . $style . '>';
     355}
     356
     357add_shortcode( 'hr', 'proper_shortcode_hr' );
  • proper-shortcodes/trunk/readme.txt

    r696062 r957035  
    33Tags: shortcodes
    44Requires at least: 3.0
    5 Tested up to: 3.5.1
    6 Stable tag: 0.2
     5Tested up to: 4.0
     6Stable tag: 0.3
    77License: GPLv2 or later
    88
     
    1818
    1919**[p_site_url]**
     20**[site_url]**
     21**[p_home_url]**
     22**[home_url]**
    2023
    21 Displays the site url. Useful for adding links to pages on the site without hard-coding in the domain.
     24Displays the site URL or home URL. Useful for adding links to pages on the site without hard-coding in the domain.
    2225
    2326**[p_tagline]**
     
    9093" and "attachment"
    9194
     95**[hr]**
     96
     97Outputs an <hr> tag with styles, if desired
     98
     99- "style" is straight CSS that's added to an inline attribute
     100
    92101== Screenshots ==
    93102
     
    107116== Changelog ==
    108117
     118= 0.3 =
     119* Added [home_url]
     120* Added [hr]
     121
    109122= 0.2 =
    110 * Added [p_post_archive] and [p_sitemap]
     123* Added [p_post_archive]
     124* Added [p_sitemap]
    111125
    112126= 0.1 =
Note: See TracChangeset for help on using the changeset viewer.