Plugin Directory

Changeset 1749709


Ignore:
Timestamp:
10/20/2017 07:17:47 AM (8 years ago)
Author:
pqina
Message:

add more placeholders
improve HTML bit parsing, bits can now contain bits

Location:
snippy/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • snippy/trunk/includes/placeholders.php

    r1711334 r1749709  
    3333        }
    3434
     35        // return name of the current theme
     36        if ($name === 'theme') {
     37            return \get_template();
     38        }
     39
     40        // returns uri of the themes directory
     41        if ($name === 'theme_root_uri') {
     42            return \get_theme_root_uri();
     43        }
     44
     45        // Returns the uri of the current theme
     46        if ($name === 'template_directory_uri') {
     47            return \get_template_directory_uri();
     48        }
     49
     50       
    3551        /**
    3652         * PHP
     
    5167            return toISODate(new \DateTime('tomorrow'));
    5268        }
    53 
     69       
    5470        return '';
    5571    }
  • snippy/trunk/readme.txt

    r1718695 r1749709  
    44Tags: shortcode, short code, build, create, javascript
    55Requires at least: 4.5
    6 Tested up to: 4.8.1
    7 Stable tag: 1.1.1
     6Tested up to: 4.8.2
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    9292* `{{page_relative_url}}` relative url to the current page.
    9393* `{{page_absolute_url}}` absolute url to the current page (includes the domain).
     94* `{{theme}}` current theme name.
     95* `{{theme_root_uri}}` theme directory URI.
     96* `{{template_directory_uri}}` current theme directory URI.
    9497
    9598
     
    102105
    103106== Changelog ==
     107
     108= 1.2.0 =
     109
     110* HTML bits can now contain shortcodes
     111* Add more placeholders
     112
    104113
    105114= 1.1.1 =
     
    122131== Upgrade Notice ==
    123132
    124 Fix problem where shortcode and bits tables would not show paging control
     133Improved parsing of bits, HTML bits can now contain shortcodes. Three additional default placeholders were added.
  • snippy/trunk/snippy.php

    r1718695 r1749709  
    44* Plugin URI: https://pqina.nl/snippy
    55* Description: Snippy, create your own super flexible shortcodes
    6 * Version: 1.1.1
     6* Version: 1.2.0
    77* Author: PQINA
    88* Author URI: https://pqina.nl
     
    6363
    6464    // Snippy version
    65     public static $version = '1.1.1';
     65    public static $version = '1.2.0';
    6666
    6767    private static $_instance = null;
     
    283283
    284284                // replace placeholders in html value
    285                 $html = html_entity_decode($bit_value);
     285                $html = \do_shortcode(html_entity_decode($bit_value));
    286286                $placeholders_merged = Utils::merge_placeholders_and_atts($bit, $atts);
    287287
Note: See TracChangeset for help on using the changeset viewer.