Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
creating plugin => Apiki-Favorites\apiki-favorites.php
added this plugin For Authentication: JWT Authentication for WP-API
added this code to wp-config.php:
...
define('JWT_AUTH_SECRET_KEY', '7Yqq05YKIlMxscXbgYh2kFNN_zs8GgTH1wuX-rfBDRT9o_RiajB5WfIAFH_Wwl5onQ6lXVylt23H_K-M6uKNYQ');
define('JWT_AUTH_CORS_ENABLE', true);
before this line:
/* That's all, stop editing! Happy publishing. */
Apiki-Favorites plug-in APIs:
adds favorite POST => http://localhost/wordpress/wp-json/apiki/v2/favorites?post_id=1
removes favorite DELETE => http://localhost/wordpress/wp-json/apiki/v2/favorites?post_id=1
gets all favorites GET => http://localhost/wordpress/wp-json/apiki/v2/favorites