mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 11:44:33 +00:00
Coding Standards: Replace alias PHP functions with the canonical names.
Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning. This replaces all uses of the following: * `join()` with `implode()` * `sizeof()` with `count()` * `is_writeable()` with `is_writable()` * `doubleval()` with a `(float)` cast In part, this is a follow-up to #47746. Props jrf. See #50767. git-svn-id: https://develop.svn.wordpress.org/trunk@49193 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -274,7 +274,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
|
||||
// If they're too different, don't include any <ins> or <del>'s.
|
||||
if ( preg_match_all( '!(<ins>.*?</ins>|<del>.*?</del>)!', $diff, $diff_matches ) ) {
|
||||
// Length of all text between <ins> or <del>.
|
||||
$stripped_matches = strlen( strip_tags( join( ' ', $diff_matches[0] ) ) );
|
||||
$stripped_matches = strlen( strip_tags( implode( ' ', $diff_matches[0] ) ) );
|
||||
// Since we count length of text between <ins> or <del> (instead of picking just one),
|
||||
// we double the length of chars not in those tags.
|
||||
$stripped_diff = strlen( strip_tags( $diff ) ) * 2 - $stripped_matches;
|
||||
|
||||
Reference in New Issue
Block a user