# redirection/2.4.5/actions/error.php

Redirection, version 2.4.5. 27 lines.

- Page: https://pluginprobe.com/plugins/redirection/2.4.5/code/actions/error.php
- Raw: https://pluginprobe.com/plugins/redirection/2.4.5/raw/actions/error.php
- Modified: 2016-06-15T09:38:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/redirection/2.4.5/code/actions/error.php#L10-L20`.

```php
<?php

class Error_Action extends Red_Action {
	function can_change_code() {
		return true;
	}

	function can_perform_action() {
		return false;
	}

	function action_codes() {
		return array(
			404 => get_status_header_desc( 404 ),
			410 => get_status_header_desc( 410 ),
		);
	}

	function process_after( $code, $target ) {
		global $wp_query;
		$wp_query->is_404 = true;

		// Page comments plugin interferes with this
		remove_filter( 'template_redirect', 'paged_comments_alter_source', 12 );
	}
}

```
