*/ protected function input_properties(): array { return array( 'files' => array( 'type' => 'boolean', 'default' => true, 'description' => __( 'Include the files (uploads, themes, plugins).', 'acrossai-abilities-manager' ), ), 'database' => array( 'type' => 'boolean', 'default' => true, 'description' => __( 'Include the database.', 'acrossai-abilities-manager' ), ), 'send_to_remote' => array( 'type' => 'boolean', 'default' => false, 'description' => __( 'Also upload to the configured remote storage, where one is set up.', 'acrossai-abilities-manager' ), ), 'label' => array( 'type' => 'string', 'maxLength' => 200, 'description' => __( 'Optional note stored with the backup, e.g. why it was taken.', 'acrossai-abilities-manager' ), ), ); } /** * @since 0.0.35 * @return array */ protected function required_input(): array { return array(); } /** * @since 0.0.35 * @return array */ protected function output_properties(): array { return array( 'job_id' => array( 'type' => 'string' ), 'started' => array( 'type' => 'boolean' ), 'includes' => array( 'type' => 'object', 'additionalProperties' => true ), 'note' => array( 'type' => 'string' ), ); } /** * @since 0.0.35 * @return array */ protected function annotations(): array { return array( 'readonly' => false, 'destructive' => false, 'idempotent' => false, ); } /** * @since 0.0.35 * @param array $input Input. * @return array|WP_Error */ protected function run( array $input ) { return Archive_Repository::start_backup( $input ); } }