updated plugin ActivityPub version 9.1.0
This commit is contained in:
@ -39,8 +39,9 @@ class Actor_Command extends \WP_CLI_Command {
|
||||
* @param array $assoc_args The associative arguments (unused).
|
||||
*/
|
||||
public function delete( $args, $assoc_args ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
|
||||
if ( Actors::APPLICATION_USER_ID === (int) $args[0] ) {
|
||||
\WP_CLI::error( 'You cannot delete the application actor.' );
|
||||
// Only the blog actor (0) and real users (positive IDs) can be deleted; negative IDs (e.g. the former -1 application ID) are never valid actors.
|
||||
if ( (int) $args[0] < Actors::BLOG_USER_ID ) {
|
||||
\WP_CLI::error( \sprintf( 'No deletable actor found for ID "%s".', $args[0] ) );
|
||||
}
|
||||
|
||||
\add_filter( 'activitypub_user_can_activitypub', '__return_true' );
|
||||
|
||||
Reference in New Issue
Block a user