Plugin Directory

Changeset 1479786


Ignore:
Timestamp:
08/21/2016 03:08:47 AM (10 years ago)
Author:
wellhandled
Message:

Release 1.5.1

Location:
well-handled/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • well-handled/trunk/functions-handlebars.php

    r1463492 r1479786  
    236236            return '';
    237237
    238         $value = (int) $context->get($data[0]);
     238        $value = $context->get($data[0]);
     239        if(is_array($value))
     240            $value = count($value);
     241        else
     242            $value = (int) $value;
    239243        $singular = $context->get($data[1]);
    240244        $plural = $context->get($data[2]);
  • well-handled/trunk/help/template.md

    r1463492 r1479786  
    286286### Inflect
    287287
    288 To singularize or plurialize words based on count `{{#inflect count $singular $plurial}}`
     288To singularize or plurialize words based on count `{{#inflect count $singular $plurial}}`. The `count` value may be an integer or an array; if the latter the array's size will be used as the value.
    289289
    290290    {{#inflect count '%d book' '%d books'}}
  • well-handled/trunk/index.php

    r1463492 r1479786  
    44Plugin URI: https://well-handled.io
    55Description: Easy and powerful handlebar/mustache email template management for developers.
    6 Version: 1.5
     6Version: 1.5.1
    77Author: well-handled.io
    88Author URI: https://well-handled.io
  • well-handled/trunk/readme.txt

    r1463492 r1479786  
    44Tags: template, handlebar, mustache, css, email, transactional, analytics
    55Requires at least: 4.4
    6 Tested up to: 4.5.3
     6Tested up to: 4.6
    77Stable tag: trunk
    88License: GPLv2 or later
     
    6767== Changelog ==
    6868
     69= 1.5.1 =
     70* [improved] #inflect helper can now accept an array as the 'count' variable;
     71
    6972= 1.5 =
    7073* [new] Fragment support (e.g. common template parts);
     
    8790== Upgrade Notice ==
    8891
     92= 1.5.1 =
     93* [improved] #inflect helper can now accept an array as the 'count' variable;
     94
     95= 1.5 =
     96* [new] Fragment support (e.g. common template parts);
     97* [new] Added array helpers: avg, count, join, min, max, sum;
     98* [new] Added comparison helpers: ifGreater, ifLesser;
     99* [new] Added misc helpers: currency, nl2br, now, wp_bloginfo, wp_site_url;
     100* [improved] Full overhaul of Handlebar parsing;
     101* [improved] Cleaned up documentation;
     102
    89103= 1.0.2 =
    90104* Inaugural WordPress.org release!
Note: See TracChangeset for help on using the changeset viewer.