<?php
/**
 * WP-CLI command reference for the Redirections module.
 *
 * @package BlaminhorEssentials
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

return array(
	array(
		'name'        => 'wp blaminhor redirections get',
		'description' => __( 'Show the current Redirections module settings.', 'blaminhor-essentials' ),
		'example'     => 'wp blaminhor redirections get',
	),
	array(
		'name'        => 'wp blaminhor redirections set',
		'description' => __( 'Update Redirections module settings.', 'blaminhor-essentials' ),
		'example'     => 'wp blaminhor redirections set --auto-redirect-on-slug-change=true',
	),
	array(
		'name'        => 'wp blaminhor redirections add',
		'description' => __( 'Add a new 301 redirection.', 'blaminhor-essentials' ),
		'example'     => 'wp blaminhor redirections add --source=/old-page --target=/new-page',
	),
	array(
		'name'        => 'wp blaminhor redirections list',
		'description' => __( 'List existing redirections.', 'blaminhor-essentials' ),
		'example'     => 'wp blaminhor redirections list --search=/blog --format=json',
	),
	array(
		'name'        => 'wp blaminhor redirections delete',
		'description' => __( 'Delete a redirection by ID.', 'blaminhor-essentials' ),
		'example'     => 'wp blaminhor redirections delete 42 --yes',
	),
	array(
		'name'        => 'wp blaminhor redirections export',
		'description' => __( 'Dump every redirection as CSV or JSON on STDOUT.', 'blaminhor-essentials' ),
		'example'     => 'wp blaminhor redirections export > redirects.csv',
	),
	array(
		'name'        => 'wp blaminhor redirections find-orphans',
		'description' => __( 'Report redirections whose target URL currently returns a 4xx or 5xx.', 'blaminhor-essentials' ),
		'example'     => 'wp blaminhor redirections find-orphans --limit=50',
	),
	array(
		'name'        => 'wp blaminhor redirections find-circular',
		'description' => __( 'Detect redirection chains that loop back to their source.', 'blaminhor-essentials' ),
		'example'     => 'wp blaminhor redirections find-circular',
	),
);
