| @@ -52,9 +52,9 @@ | ||
| 52 | 52 | ), |
| 53 | 53 | 'intent' => array( |
| 54 | 54 | 'description' => 'The intent of the interaction, e.g., follow, reply, import.', |
| 55 | 55 | 'type' => 'string', |
| 56 | - 'enum' => \array_map( 'Activitypub\camel_to_snake_case', Activity::TYPES ), | |
| 56 | + 'enum' => array_map( 'Activitypub\camel_to_snake_case', Activity::TYPES ), | |
| 57 | 57 | ), |
| 58 | 58 | ), |
| 59 | 59 | ), |
| 60 | 60 | ) |
| @@ -69,9 +69,9 @@ | ||
| 69 | 69 | * @return string Sanitized URI. |
| 70 | 70 | */ |
| 71 | 71 | public function sanitize_uri( $uri ) { |
| 72 | 72 | // Remove "acct:" prefix if present. |
| 73 | - if ( \str_starts_with( $uri, 'acct:' ) ) { | |
| 73 | + if ( str_starts_with( $uri, 'acct:' ) ) { | |
| 74 | 74 | $uri = \substr( $uri, 5 ); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | // Remove "@" prefix if present. |
| @@ -76,9 +76,9 @@ | ||
| 76 | 76 | |
| 77 | 77 | // Remove "@" prefix if present. |
| 78 | 78 | $uri = \ltrim( $uri, '@' ); |
| 79 | 79 | |
| 80 | - if ( \is_email( $uri ) ) { | |
| 80 | + if ( is_email( $uri ) ) { | |
| 81 | 81 | return \sanitize_text_field( $uri ); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | return \sanitize_url( $uri ); |
| @@ -99,9 +99,9 @@ | ||
| 99 | 99 | |
| 100 | 100 | if ( \is_wp_error( $object ) || ! isset( $object['type'] ) ) { |
| 101 | 101 | // Use wp_die as this can be called from the front-end. See https://github.com/Automattic/wordpress-activitypub/pull/1149/files#r1915297109. |
| 102 | 102 | \wp_die( |
| 103 | - \esc_html__( 'The URL is not supported!', 'activitypub' ), | |
| 103 | + esc_html__( 'The URL is not supported!', 'activitypub' ), | |
| 104 | 104 | '', |
| 105 | 105 | array( |
| 106 | 106 | 'response' => 400, |
| 107 | 107 | 'back_link' => true, |
| @@ -109,9 +109,9 @@ | ||
| 109 | 109 | ); |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | if ( ! empty( $object['id'] ) ) { |
| 113 | - $uri = \esc_url_raw( $object['id'] ); | |
| 113 | + $uri = \esc_url( $object['id'] ); | |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | // Prepare URL parameter. |
| 117 | 117 | $url_param = \rawurlencode( $uri ); |
| @@ -190,9 +190,9 @@ | ||
| 190 | 190 | // Check if hook is implemented. |
| 191 | 191 | if ( ! $redirect_url ) { |
| 192 | 192 | // Use wp_die as this can be called from the front-end. See https://github.com/Automattic/wordpress-activitypub/pull/1149/files#r1915297109. |
| 193 | 193 | \wp_die( |
| 194 | - \esc_html__( 'This Interaction type is not supported yet!', 'activitypub' ), | |
| 194 | + esc_html__( 'This Interaction type is not supported yet!', 'activitypub' ), | |
| 195 | 195 | '', |
| 196 | 196 | array( |
| 197 | 197 | 'response' => 400, |
| 198 | 198 | 'back_link' => true, |