*/ protected function input_properties(): array { return array(); } /** * @since 0.0.44 * @return array */ protected function output_properties(): array { return array( 'backups' => array( 'type' => 'array' ), 'count' => array( 'type' => 'integer' ), ); } /** * @since 0.0.44 * @return array */ protected function required_input(): array { return array(); } /** * @since 0.0.44 * @return array{readonly: bool, destructive: bool, idempotent: bool} */ protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ); } /** * @since 0.0.44 * @param array $input Input. * @return array|WP_Error */ protected function run( array $input ) { $backups = Status_Repository::backups(); return array( 'backups' => $backups, 'count' => count( $backups ), 'message' => array() === $backups ? __( 'There are no All in One SEO settings backups on this site. Take one with aioseo/create-backup before any bulk settings change.', 'acrossai-abilities-manager' ) : sprintf( /* translators: %d: number of backups */ _n( '%d settings backup.', '%d settings backups.', count( $backups ), 'acrossai-abilities-manager' ), count( $backups ) ), ); } }