Input JSON schema. * @since 1.2.0 */ protected function remove_input_schema(): array { return [ 'type' => 'object', 'properties' => $this->common_properties(), 'required' => [ 'id', 'path' ], ]; } /** * Remove introduces no new block, so it runs no allowed-block policy check. * * @return bool Always false. * @since 1.2.0 */ protected function enforces_policy(): bool { return false; } /** * Apply the removal to the tree. * * @param BlockTreeEditor $editor Tree editor. * @param array $tree Parsed block tree. * @param array $args Ability input. * @return array|WP_Error New tree, or an error. * @since 1.2.0 */ protected function apply( BlockTreeEditor $editor, array $tree, array $args ): array|WP_Error { return $editor->remove( $tree, $this->read_path( $args ), $this->read_expect( $args ) ); } }