| @@ -84,9 +84,9 @@ | ||
| 84 | 84 | * |
| 85 | 85 | * @return string $content Replaced post content. |
| 86 | 86 | */ |
| 87 | 87 | function jetpack_preg_replace_outside_tags( $pattern, $replacement, $content, $search = null ) { |
| 88 | - if ( $search && false === strpos( $content, $search ) ) { | |
| 88 | + if ( $search && ! str_contains( $content, $search ) ) { | |
| 89 | 89 | return $content; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | $textarr = wp_html_split( $content ); |
| @@ -112,9 +112,9 @@ | ||
| 112 | 112 | * |
| 113 | 113 | * @return string $content Replaced post content. |
| 114 | 114 | */ |
| 115 | 115 | function jetpack_preg_replace_callback_outside_tags( $pattern, $callback, $content, $search = null ) { |
| 116 | - if ( $search && false === strpos( $content, $search ) ) { | |
| 116 | + if ( $search && ! str_contains( $content, $search ) ) { | |
| 117 | 117 | return $content; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | $textarr = wp_html_split( $content ); |