@@ -85,9 +85,9 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | if ( ! empty( $field ) ) { |
| 87 | 87 | |
| 88 | - $comment_fields['comment'] = '<div id="preview-wrapper"></div>' . $comment_fields['comment']; |
|
| 88 | + $comment_fields[ 'comment' ] = '<div id="preview-wrapper"></div>' . $comment_fields[ 'comment' ]; |
|
| 89 | 89 | |
| 90 | - $comment_fields['comment'] .= $field; |
|
| 90 | + $comment_fields[ 'comment' ] .= $field; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | return $comment_fields; |
@@ -158,8 +158,8 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | $response = array(); |
| 160 | 160 | |
| 161 | - if ( ! empty( $request['author'] ) ) { |
|
| 162 | - $response['author'] = esc_html( $request['author'] ); |
|
| 161 | + if ( ! empty( $request[ 'author' ] ) ) { |
|
| 162 | + $response[ 'author' ] = esc_html( $request[ 'author' ] ); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | $user_id = ( ( is_user_logged_in() ) ? get_current_user_id() : 0 ); |
@@ -170,25 +170,25 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | if ( $user ) { |
| 172 | 172 | |
| 173 | - $response['author'] = $user->data->display_name; |
|
| 173 | + $response[ 'author' ] = $user->data->display_name; |
|
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - $response['gravatar'] = get_avatar_url( $user_id, array( 'size' => 50 ) ); |
|
| 177 | + $response[ 'gravatar' ] = get_avatar_url( $user_id, array( 'size' => 50 ) ); |
|
| 178 | 178 | |
| 179 | - $response['date'] = current_time( get_option( 'date_format' ) . ' \a\t ' . get_option( 'time_format' ) ); |
|
| 179 | + $response[ 'date' ] = current_time( get_option( 'date_format' ) . ' \a\t ' . get_option( 'time_format' ) ); |
|
| 180 | 180 | |
| 181 | - if ( ! empty( $request['comment'] ) && isset( $request['format'] ) ) { |
|
| 182 | - if ( 'text' === $request['format'] ) { |
|
| 183 | - $comment = wp_kses_data( $request['comment'] ); |
|
| 181 | + if ( ! empty( $request[ 'comment' ] ) && isset( $request[ 'format' ] ) ) { |
|
| 182 | + if ( 'text' === $request[ 'format' ] ) { |
|
| 183 | + $comment = wp_kses_data( $request[ 'comment' ] ); |
|
| 184 | 184 | } else { |
| 185 | - $comment = apply_filters( 'pre_comment_content', $request['comment'] ); |
|
| 185 | + $comment = apply_filters( 'pre_comment_content', $request[ 'comment' ] ); |
|
| 186 | 186 | } |
| 187 | 187 | } else { |
| 188 | 188 | $comment = ''; |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | - $response['comment'] = $comment; |
|
| 191 | + $response[ 'comment' ] = $comment; |
|
| 192 | 192 | |
| 193 | 193 | return $response; |
| 194 | 194 | } |