WordPress Version: 4.3
/**
* WordPress Rewrite API
*
* @package WordPress
* @subpackage Rewrite
*/
/**
* Add a straight rewrite rule.
*
* @since 2.1.0
*
* @global WP_Rewrite $wp_rewrite
*
* @param string $regex Regular Expression to match request against.
* @param string $redirect Page to redirect to.
* @param string $after Optional, default is 'bottom'. Where to add rule, can also be 'top'.
*/
function add_rewrite_rule($regex, $redirect, $after = 'bottom')
{
global $wp_rewrite;
$wp_rewrite->add_rule($regex, $redirect, $after);
}