- Updates codes based on Taut's comments

This commit is contained in:
Vlad
2016-04-15 11:36:57 -04:00
parent 599661e028
commit af4d29ebe6
4 changed files with 7 additions and 7 deletions

View File

@@ -4,7 +4,6 @@ namespace MailPoet\Newsletter\Shortcodes;
class Shortcodes {
public $newsletter;
public $subscriber;
static $shortcodes_regex = '/\[(?:\w+):.*?\]/ism';
function __construct(
$newsletter = false,
@@ -15,7 +14,7 @@ class Shortcodes {
}
function extract($text) {
preg_match_all(self::$shortcodes_regex, $text, $shortcodes);
preg_match_all('/\[(?:\w+):.*?\]/ism', $text, $shortcodes);
return array_unique($shortcodes[0]);
}