| @@ -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 && ! str_contains( $content, $search ) ) { | |
| 88 | + if ( $search && false === strpos( $content, $search ) ) { | |
| 89 | 89 | return $content; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | $textarr = wp_html_split( $content ); |
| @@ -97,9 +97,9 @@ | ||
| 97 | 97 | } |
| 98 | 98 | $element = preg_replace( $pattern, $replacement, $element ); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - return implode( $textarr ); | |
| 101 | + return join( $textarr ); | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | 105 | * Runs preg_replace_callback so that replacements don't happen within open tags. |
| @@ -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 && ! str_contains( $content, $search ) ) { | |
| 116 | + if ( $search && false === strpos( $content, $search ) ) { | |
| 117 | 117 | return $content; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | $textarr = wp_html_split( $content ); |
| @@ -125,9 +125,9 @@ | ||
| 125 | 125 | } |
| 126 | 126 | $element = preg_replace_callback( $pattern, $callback, $element ); |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | - return implode( $textarr ); | |
| 129 | + return join( $textarr ); | |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | if ( ! function_exists( 'jetpack_shortcode_get_wpvideo_id' ) ) { |
| 133 | 133 | /** |
| @@ -133,10 +133,9 @@ | ||
| 133 | 133 | /** |
| 134 | 134 | * Get VideoPress ID from wpvideo shortcode attributes. |
| 135 | 135 | * |
| 136 | 136 | * @param array $atts Shortcode attributes. |
| 137 | - * | |
| 138 | - * @return string|int $id VideoPress ID. | |
| 137 | + * @return int $id VideoPress ID. | |
| 139 | 138 | */ |
| 140 | 139 | function jetpack_shortcode_get_wpvideo_id( $atts ) { |
| 141 | 140 | if ( isset( $atts[0] ) ) { |
| 142 | 141 | return $atts[0]; |