daily notes

WordPress Cron API Understanding WP-Cron WP-Cron is WordPress’s task scheduling system used to run automated tasks such as: publishing scheduled posts checking for plugin/theme updates sending scheduled emails cleaning temporary data running background jobs Unlike a traditional Linux cron daemon, WP-Cron: runs only when a page loads does not run continuously executes missed tasks immediately on the next page load This system is often called pseudo-cron or false cron. Key characteristics: ...

March 6, 2026 · 4 min · Ashish Verma

daily notes

Concept of Roles and Capabilities WordPress provides a role-based permission system that controls what actions a user can perform on a website. Instead of granting every user full administrative access, WordPress assigns each user a role, and each role contains a set of capabilities. A capability is a specific permission such as: editing posts publishing posts installing plugins managing options deleting users A role is simply a collection of capabilities. ...

March 5, 2026 · 5 min · Ashish Verma

daily notes

WordPress AJAX in Plugin Development AJAX in WordPress allows asynchronous server communication via admin-ajax.php or the REST API without reloading the page. In plugins, this is commonly implemented using wp_ajax_{action} and wp_ajax_nopriv_{action} hooks. AJAX request flow with admin-ajax.php JavaScript sends request to admin_url( 'admin-ajax.php' ) with an action parameter. WordPress routes the request to: wp_ajax_{action} for authenticated users wp_ajax_nopriv_{action} for unauthenticated users PHP callback processes data and outputs JSON. Script exits with exit; or wp_die();. ...

March 4, 2026 · 4 min · Ashish Verma

daily notes

rest_pre_serve_request filter) to intercept the data right before it’s sent and convert the JSON object into XML or CSV. An API is an Application Programming Interface. REST, which stands for “Representational State Transfer,” is a set of concepts for modeling and accessing your application’s data as interrelated objects and collections. API is a set of code that allows one system to interact (or “interface”) with another. REST – Representational State Transfer, or REST, provides standards that web systems can use to interface with each other. ...

March 3, 2026 · 10 min · Ashish Verma

daily notes

1. WordPress HTTP API Overview WordPress provides a standardized HTTP API for communicating with remote servers. Main Functions wp_remote_get() — Perform GET request wp_remote_post() — Perform POST request wp_remote_request() — Custom HTTP methods (PUT, DELETE, PATCH) wp_remote_retrieve_body() — Extract response body wp_remote_retrieve_response_code() — Get HTTP status code wp_remote_retrieve_headers() — Get response headers Core Classes WP_Http — Main HTTP wrapper class WP_Http_Curl — cURL transport WP_Http_Streams — Streams transport WP_Http_Response — Standardized response object ...

March 2, 2026 · 3 min · Ashish Verma

daily notes

WordPress Core APIs Overview: WordPress Core APIs provide functions to extend WordPress safely. They handle heavy-lifting tasks and ensure backward compatibility for plugins and themes. Core APIs Learned: Metadata API – manage metadata for posts, users, comments, terms Shortcode API – create dynamic shortcodes Admin Menus – add menus in admin dashboard Settings & Options API – manage plugin/theme settings Advanced Core APIs: HTTP API – remote requests with caching & authentication ...

February 27, 2026 · 2 min · Ashish Verma

daily notes

WP-CLI Overview WP-CLI (WordPress Command Line Interface) lets you manage a WordPress installation directly from the terminal. Instead of using the browser-based admin dashboard, you execute commands via SSH or a local terminal. It supports: Core management (install, update, downgrade) Plugin and theme management Database operations User and role management Content import/export Custom command development WP-CLI commands follow this structure: wp <entity> <subcommand> [options] [--global-parameters] Example: wp core update Installation (Quick Method) Download and make executable: ...

February 26, 2026 · 2 min · Ashish Verma

daily notes

In the context of the WordPress REST API a route is a URI which can be mapped to different HTTP methods. The mapping of an individual HTTP method to a route is known as an endpoint. The Route is the URL path itself The Endpoint is the combination of a Route and an HTTP Method (like GET, POST, or DELETE). /wp-json/ is a route, and when that route receives a GET request then that request is handled by the endpoint which displays what is known as the index for the WordPress REST API. ...

February 25, 2026 · 4 min · Ashish Verma

daily notes

get_template_directory_uri() Retrieves template directory URI for the active theme. Returns the URL of the parent theme directory get_header($name = null, $args = array()) { } Includes the header template for a theme or if a name is specified then a specialized header will be included. For the parameter, if the file is called “header-special.php” then specify “special”. get_theme_file_uri('/assets/css/style.css') The URL to a specific file, and it checks Child theme first, Then parent theme (fallback) ...

February 24, 2026 · 15 min · Ashish Verma

daily notes

WordPress REST API The WordPress REST API allows applications to interact with a WordPress site using JSON over HTTP. It exposes WordPress data (posts, pages, users, taxonomies, custom post types) through RESTful endpoints. It powers the WordPress Block Editor and enables headless architectures, custom dashboards, mobile apps, and external integrations. What Is REST? API – A set of rules that allows systems to communicate. REST (Representational State Transfer) – A standard for structuring APIs using: ...

February 23, 2026 · 2 min · Ashish Verma