wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
rest_api_register_rewrites › WordPress Function
Da4.4.0
Deprecaton/a
› rest_api_register_rewrites ( Nessun parametro )
| Vedi: | |
| Definito a: |
|
| Codex: |
Adds REST rewrite rules.
Sorgenti
function rest_api_register_rewrites() {
global $wp_rewrite;
add_rewrite_rule( '^' . rest_get_url_prefix() . '/?$', 'index.php?rest_route=/', 'top' );
add_rewrite_rule( '^' . rest_get_url_prefix() . '/(.*)?', 'index.php?rest_route=/$matches[1]', 'top' );
add_rewrite_rule( '^' . $wp_rewrite->index . '/' . rest_get_url_prefix() . '/?$', 'index.php?rest_route=/', 'top' );
add_rewrite_rule( '^' . $wp_rewrite->index . '/' . rest_get_url_prefix() . '/(.*)?', 'index.php?rest_route=/$matches[1]', 'top' );
}