Remove remote comments from preprocessing
This commit is contained in:
parent
e46137a970
commit
30129adac5
1 changed files with 3 additions and 0 deletions
|
@ -27,6 +27,9 @@ class Comments {
|
||||||
*/
|
*/
|
||||||
public static function preprocess_comment( $commentdata ) {
|
public static function preprocess_comment( $commentdata ) {
|
||||||
// only process replies from authorized local actors, for ap enabled post types
|
// only process replies from authorized local actors, for ap enabled post types
|
||||||
|
if ( ! isset( $commentdata['user_id'] ) ) {
|
||||||
|
return $commentdata;
|
||||||
|
}
|
||||||
$user = \get_userdata( $commentdata['user_id'] );
|
$user = \get_userdata( $commentdata['user_id'] );
|
||||||
$comment_post_type = \get_post_type( $commentdata['comment_post_ID'] );
|
$comment_post_type = \get_post_type( $commentdata['comment_post_ID'] );
|
||||||
$post_types = \get_option( 'activitypub_support_post_types', array( 'post', 'page' ) );
|
$post_types = \get_option( 'activitypub_support_post_types', array( 'post', 'page' ) );
|
||||||
|
|
Loading…
Reference in a new issue