Skip to content

Commit

Permalink
Merge pull request #114 from x-team/issue-108
Browse files Browse the repository at this point in the history
Change placeholder notation to use {xx} instead of %%xx%%
  • Loading branch information
frankiejarrett committed Feb 24, 2014
2 parents b27ce42 + 2ffdde7 commit fd782f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/wp-stream-notification-adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static function hints() {
* @return string
*/
public static function replace( $haystack, $log ) {
if ( preg_match_all( '#%%([^%]+)%%#', $haystack, $placeholders ) ) {
if ( preg_match_all( '#{([^}]+)}#', $haystack, $placeholders ) ) {

foreach ( $placeholders[1] as $placeholder ) {
$value = false;
Expand Down Expand Up @@ -83,7 +83,7 @@ public static function replace( $haystack, $log ) {
break;
}
if ( $value ) {
$haystack = str_replace( "%%$placeholder%%", $value, $haystack );
$haystack = str_replace( "{{$placeholder}}", $value, $haystack );
}
}
}
Expand Down

0 comments on commit fd782f9

Please sign in to comment.