Last active
February 18, 2016 04:18
-
-
Save GhazanfarMir/49b56123649a8e6c7b7d to your computer and use it in GitHub Desktop.
Modify api base from wp-json to anything you want in WP-API Plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// modify api base from "wp-json" to "api" | |
add_filter('json_url_prefix', 'modify_url_base' ); | |
/** | |
* Modifying Base URL from 'WP-JSON' to 'api' | |
*/ | |
function modify_url_base($prefix) { | |
return 'api'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment