updated plugin ActivityPub
version 0.10.1
This commit is contained in:
@ -11,7 +11,7 @@ class Debug {
|
||||
* Initialize the class, registering WordPress hooks
|
||||
*/
|
||||
public static function init() {
|
||||
if ( WP_DEBUG_LOG ) {
|
||||
if ( WP_DEBUG && WP_DEBUG_LOG ) {
|
||||
\add_action( 'activitypub_safe_remote_post_response', array( '\Activitypub\Debug', 'log_remote_post_responses' ), 10, 4 );
|
||||
}
|
||||
}
|
||||
|
@ -301,9 +301,7 @@ function get_blacklist() {
|
||||
|
||||
// if no values have been set, revert to the defaults
|
||||
if ( ! $blacklist || ! $blacklist_hosts || ! \is_array( $blacklist_hosts ) ) {
|
||||
$blacklist_hosts = array(
|
||||
'gab.com',
|
||||
);
|
||||
$blacklist_hosts = array();
|
||||
}
|
||||
|
||||
// clean out any blank values
|
||||
|
@ -136,7 +136,7 @@ class Inbox {
|
||||
|
||||
$params['actor'] = array(
|
||||
'required' => true,
|
||||
'type' => array( 'object', 'string' ),
|
||||
//'type' => array( 'object', 'string' ),
|
||||
'validate_callback' => function( $param, $request, $key ) {
|
||||
if ( ! \is_string( $param ) ) {
|
||||
$param = $param['id'];
|
||||
@ -153,8 +153,8 @@ class Inbox {
|
||||
|
||||
$params['type'] = array(
|
||||
'required' => true,
|
||||
'type' => 'enum',
|
||||
'enum' => array( 'Create' ),
|
||||
//'type' => 'enum',
|
||||
//'enum' => array( 'Create' ),
|
||||
'sanitize_callback' => function( $param, $request, $key ) {
|
||||
return \strtolower( $param );
|
||||
},
|
||||
@ -162,7 +162,7 @@ class Inbox {
|
||||
|
||||
$params['object'] = array(
|
||||
'required' => true,
|
||||
'type' => 'object',
|
||||
//'type' => 'object',
|
||||
);
|
||||
|
||||
return $params;
|
||||
|
Reference in New Issue
Block a user