@@ 735-740 (lines=6) @@ | ||
732 | foreach ( $replace_pairs as $needle => $replace ); |
|
733 | ||
734 | // Loop through delimiters (elements) only. |
|
735 | for ( $i = 1, $c = count( $textarr ); $i < $c; $i += 2 ) { |
|
736 | if ( false !== strpos( $textarr[$i], $needle ) ) { |
|
737 | $textarr[$i] = str_replace( $needle, $replace, $textarr[$i] ); |
|
738 | $changed = true; |
|
739 | } |
|
740 | } |
|
741 | } else { |
|
742 | // Extract all $needles. |
|
743 | $needles = array_keys( $replace_pairs ); |
|
@@ 746-755 (lines=10) @@ | ||
743 | $needles = array_keys( $replace_pairs ); |
|
744 | ||
745 | // Loop through delimiters (elements) only. |
|
746 | for ( $i = 1, $c = count( $textarr ); $i < $c; $i += 2 ) { |
|
747 | foreach ( $needles as $needle ) { |
|
748 | if ( false !== strpos( $textarr[$i], $needle ) ) { |
|
749 | $textarr[$i] = strtr( $textarr[$i], $replace_pairs ); |
|
750 | $changed = true; |
|
751 | // After one strtr() break out of the foreach loop and look at next element. |
|
752 | break; |
|
753 | } |
|
754 | } |
|
755 | } |
|
756 | } |
|
757 | ||
758 | if ( $changed ) { |