| @@ -17,10 +17,10 @@ | ||
| 17 | 17 | * @return string REST URL relative to this plugin's namespace. |
| 18 | 18 | */ |
| 19 | 19 | function get_rest_url_by_path( $path = '' ) { |
| 20 | 20 | // We'll handle the leading slash. |
| 21 | - $path = \ltrim( $path, '/' ); | |
| 22 | - $namespaced_path = \sprintf( '/%s/%s', ACTIVITYPUB_REST_NAMESPACE, $path ); | |
| 21 | + $path = ltrim( $path, '/' ); | |
| 22 | + $namespaced_path = sprintf( '/%s/%s', ACTIVITYPUB_REST_NAMESPACE, $path ); | |
| 23 | 23 | return \get_rest_url( null, $namespaced_path ); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
| @@ -89,9 +89,9 @@ | ||
| 89 | 89 | * Early filter to allow plugins to set the upload base URL. |
| 90 | 90 | * |
| 91 | 91 | * @param string|false $maybe_upload_dir The upload base URL or false if not set. |
| 92 | 92 | */ |
| 93 | - $maybe_upload_dir = \apply_filters( 'pre_activitypub_get_upload_baseurl', false ); | |
| 93 | + $maybe_upload_dir = apply_filters( 'pre_activitypub_get_upload_baseurl', false ); | |
| 94 | 94 | if ( false !== $maybe_upload_dir ) { |
| 95 | 95 | return $maybe_upload_dir; |
| 96 | 96 | } |
| 97 | 97 | |
| @@ -101,9 +101,9 @@ | ||
| 101 | 101 | * Filters the upload base URL. |
| 102 | 102 | * |
| 103 | 103 | * @param string $upload_dir The upload base URL. Default \wp_get_upload_dir()['baseurl'] |
| 104 | 104 | */ |
| 105 | - return \apply_filters( 'activitypub_get_upload_baseurl', $upload_dir['baseurl'] ); | |
| 105 | + return apply_filters( 'activitypub_get_upload_baseurl', $upload_dir['baseurl'] ); | |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | 109 | * Get the authority (scheme + host) from a URL. |
| @@ -112,9 +112,9 @@ | ||
| 112 | 112 | * |
| 113 | 113 | * @return string|false The authority, or false on failure. |
| 114 | 114 | */ |
| 115 | 115 | function get_url_authority( $url ) { |
| 116 | - $parsed = \wp_parse_url( $url ); | |
| 116 | + $parsed = wp_parse_url( $url ); | |
| 117 | 117 | |
| 118 | 118 | if ( ! $parsed || empty( $parsed['scheme'] ) || empty( $parsed['host'] ) ) { |
| 119 | 119 | return false; |
| 120 | 120 | } |
| @@ -155,9 +155,9 @@ | ||
| 155 | 155 | \strpos( $name, '@' ) === 0 |
| 156 | 156 | ) { |
| 157 | 157 | // Expected: user@example.com or acct:user@example (WebFinger). |
| 158 | 158 | $name = \ltrim( $name, '@' ); |
| 159 | - if ( \str_starts_with( $name, 'acct:' ) ) { | |
| 159 | + if ( str_starts_with( $name, 'acct:' ) ) { | |
| 160 | 160 | $name = \substr( $name, 5 ); |
| 161 | 161 | } |
| 162 | 162 | $parts = \explode( '@', $name ); |
| 163 | 163 | $name = $parts[0]; |