| @@ -59,12 +59,12 @@ | ||
| 59 | 59 | * |
| 60 | 60 | * @return string The final string. |
| 61 | 61 | */ |
| 62 | 62 | public static function replace_with_links( $result ) { |
| 63 | - if ( 'www.' === \substr( $result[0], 0, 4 ) ) { | |
| 63 | + if ( 'www.' === substr( $result[0], 0, 4 ) ) { | |
| 64 | 64 | $result[0] = 'https://' . $result[0]; |
| 65 | 65 | } |
| 66 | - $parsed_url = \wp_parse_url( \html_entity_decode( $result[0] ) ); | |
| 66 | + $parsed_url = \wp_parse_url( html_entity_decode( $result[0] ) ); | |
| 67 | 67 | if ( ! $parsed_url || empty( $parsed_url['host'] ) ) { |
| 68 | 68 | return $result[0]; |
| 69 | 69 | } |
| 70 | 70 | |
| @@ -83,10 +83,10 @@ | ||
| 83 | 83 | $invisible_prefix .= '@'; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | $text_url = $parsed_url['host']; |
| 87 | - if ( 'www.' === \substr( $text_url, 0, 4 ) ) { | |
| 88 | - $text_url = \substr( $text_url, 4 ); | |
| 87 | + if ( 'www.' === substr( $text_url, 0, 4 ) ) { | |
| 88 | + $text_url = substr( $text_url, 4 ); | |
| 89 | 89 | $invisible_prefix .= 'www.'; |
| 90 | 90 | } |
| 91 | 91 | if ( ! empty( $parsed_url['port'] ) ) { |
| 92 | 92 | $text_url .= ':' . $parsed_url['port']; |
| @@ -113,17 +113,17 @@ | ||
| 113 | 113 | * Filters the rel attribute for ActivityPub links. |
| 114 | 114 | * |
| 115 | 115 | * @param string $rel The rel attribute string. Default 'nofollow noopener noreferrer'. |
| 116 | 116 | */ |
| 117 | - $rel = \apply_filters( 'activitypub_link_rel', 'nofollow noopener noreferrer' ); | |
| 117 | + $rel = apply_filters( 'activitypub_link_rel', 'nofollow noopener noreferrer' ); | |
| 118 | 118 | |
| 119 | 119 | return \sprintf( |
| 120 | 120 | '<a href="%s" target="_blank" rel="%s" translate="no"><span class="invisible">%s</span><span class="%s">%s</span><span class="invisible">%s</span></a>', |
| 121 | - \esc_url( $result[0] ), | |
| 121 | + esc_url( $result[0] ), | |
| 122 | 122 | $rel, |
| 123 | - \esc_html( $invisible_prefix ), | |
| 123 | + esc_html( $invisible_prefix ), | |
| 124 | 124 | $display_class, |
| 125 | - \esc_html( $display ), | |
| 126 | - \esc_html( $invisible_suffix ) | |
| 125 | + esc_html( $display ), | |
| 126 | + esc_html( $invisible_suffix ) | |
| 127 | 127 | ); |
| 128 | 128 | } |
| 129 | 129 | } |