Permalink
Browse files

Fix - wordwrapモディファイア

  • Loading branch information...
yama committed Jul 14, 2016
1 parent 18d6614 commit 20c146ef2fa54c1c5a7d02932d5b859d5fc26f5e
Showing with 3 additions and 2 deletions.
  1. +3 −2 manager/includes/extenders/ex_modifiers.php
@@ -14,6 +14,7 @@ class MODIFIERS {
var $phxkey;
var $value;
var $opt;
var $wrapat;
function __construct()
{
@@ -413,8 +414,8 @@ function getValueFromPreset($phxkey, $value, $cmd, $opt)
return $this->strpos($value,$opt);
case 'wordwrap':
// default: 70
$wrapat = intval($opt) ? intval($opt) : 70;
return preg_replace_callback("~(\b\w+\b)~",function($m){return wordwrap($m[1],$wrapat,' ',1);},$value);
$this->wrapat = intval($opt) ? intval($opt) : 70;
return preg_replace_callback("~(\b\w+\b)~",function($m){return wordwrap($m[1],$this->wrapat,' ',1);},$value);
case 'wrap_text':
$width = preg_match('/^[1-9][0-9]*$/',$opt) ? $opt : 70;
if($modx->config['manager_language']==='japanese-utf8')

0 comments on commit 20c146e

Please sign in to comment.