Plugin Directory

Changeset 1844956


Ignore:
Timestamp:
03/22/2018 12:03:01 PM (8 years ago)
Author:
pqina
Message:

fix regex not matching placeholders correctly when they're on the same line

Location:
snippy/trunk
Files:
3 edited

Legend:

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

    r1711334 r1844956  
    3434        foreach ($placeholders as $placeholder) {
    3535            $replacement = !empty($placeholder['value']) ? $placeholder['value'] : Placeholders::get_placeholder_value($placeholder['name']);
    36             $html = preg_replace('/{{'. $placeholder['name'] .'(?::.+){0,1}}}/i', $replacement, $html);
     36            $html = preg_replace('/{{'. $placeholder['name'] .'(?::.+?){0,1}}}/i', $replacement, $html);
    3737        }
    3838        return $html;
  • snippy/trunk/readme.txt

    r1749709 r1844956  
    44Tags: shortcode, short code, build, create, javascript
    55Requires at least: 4.5
    6 Tested up to: 4.8.2
    7 Stable tag: 1.2.0
     6Tested up to: 4.9.4
     7Stable tag: 1.2.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • snippy/trunk/snippy.php

    r1749709 r1844956  
    11<?php
    2 /**
    3 * Plugin Name: Snippy
    4 * Plugin URI: https://pqina.nl/snippy
    5 * Description: Snippy, create your own super flexible shortcodes
    6 * Version: 1.2.0
    7 * Author: PQINA
    8 * Author URI: https://pqina.nl
    9 * License: GPL2
    10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    11 * Text Domain: snippy
    12 
    13 {Plugin Name} is free software: you can redistribute it and/or modify
     2/*
     3Plugin Name: Snippy
     4Plugin URI: https://pqina.nl/snippy
     5Description: Snippy, create your own super flexible shortcodes
     6Version: 1.2.1
     7Author: PQINA
     8Author URI: https://pqina.nl
     9License: GPL2
     10License URI: https://www.gnu.org/licenses/gpl-2.0.html
     11Text Domain: snippy
     12
     13Copyright 2009-2018 PQINA
     14
     15Snippy is free software: you can redistribute it and/or modify
    1416it under the terms of the GNU General Public License as published by
    1517the Free Software Foundation, either version 2 of the License, or
    1618any later version.
    1719
    18 {Plugin Name} is distributed in the hope that it will be useful,
     20Snippy is distributed in the hope that it will be useful,
    1921but WITHOUT ANY WARRANTY; without even the implied warranty of
    2022MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     
    2224
    2325You should have received a copy of the GNU General Public License
    24 along with {Plugin Name}. If not, see {URI to Plugin License}.
    25  */
     26along with Snippy. If not, see {URI to Plugin License}.
     27*/
    2628
    2729namespace snippy;
Note: See TracChangeset for help on using the changeset viewer.