The permission_callback parameter in register_rest_route allows you to define custom permission checks for your WordPress REST API endpoints. I’ve listed down 10 sample use-cases: 1. Open Access Allowing anyone to access the endpoint, effectively making it public. 2. Authenticated Users Only Only allowing authenticated users to access the endpoint. 3. Admin Users Only Restricting access Continue reading “10 sample use-cases of permission_callback in register_rest_route WordPress Plugin”
Category Archives: Wordpress
Usage of wp_add_inline_style and wp_add_inline_script in WordPress
Installing Bitnami WordPress Nginx into Apple m1
WARNING: The requested image’s platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Installing PHP Extension in WP ENV
WordPress current URL Cheat Sheet
How to use internal css in WordPress
One of the way to load CSS in your WordPress plugin. You no need to worry about caching while developing your code and no need to separate one more file.
How To Get Parent Category Name In WordPress
It is not difficult to get the name using the build in function from WordPress. You may use this for build your own plugin or list out the related post using the category data from the parent category. Here is the PHP Code that can display out the name of the parent category.
How to Solve WordPress asked for FTP credentials
I know it is very annoying when you are going to install a PLUGIN in WordPress. I like the way, one click and install for PLUGINS and THEMES in WordPress. Here is the way that I’m using: Edit your wp-config.php and add the line into it.
How to disable AutoSave in WordPress ?
Sometimes we do not need the auto save function in the editor in WordPress, it will increase your database or slow down you editing experience while you are in slow internet connection. Here is the solution to disable it, if you need to re-enable it just comment them away.
