Skip to content

Developer docs ​

Extend Link Manager Pro with WP-CLI, hooks and the REST API, and see where it stores its data.

The developer docs cover the four ways to extend Link Manager Pro and the data it keeps. Each area has its own pages with exact names, defaults and examples.

You can also use them as a site owner. When a developer sends you a snippet, find its hook, route or command here and read the plain sentence at the top of its entry.

The four areas ​

WP-CLI ​

Run the plugin from a shell, a script or a cron job. Every command with its options and defaults is in one reference.

  • WP-CLI for developers: scripting rules, every command with its options, backup export and restore, prefix moves and database commands.
  • WP-CLI commands: the task guide for the everyday commands.

Hooks ​

Run your own code when something happens in the plugin, or change what it does. Actions let you react; filters let you change a value.

REST API ​

Read and change short links and other data over HTTP. The base URL is https://example.com/wp-json/link-manager-pro/v1.

  • REST API overview: authentication, permissions, request and response format.
  • Short links endpoints: list, create, update and delete short links, with curl examples.
  • All endpoints: every route, each linked to its full entry with parameters and response fields.

Database ​

See where settings, links, clicks and options live, and what the backup file holds.

Before you start ​

The plugin needs WordPress 6.0 or later and PHP 8.0 or later. Both come from the plugin header.

Put your custom code in your own small plugin or a must-use plugin. An update replaces the plugin's files, so changes made inside the plugin folder are lost.

Settings that switch something on or off are stored as the strings yes and no, not as true and false. Compare against 'yes' in your code.

Read settings through the plugin, not by SQL: the settings are stored as JSON rows that the plugin reads and decodes for you. LinkManagerPro\Services\Settings::get() takes a group.key name and an optional default.

php
if ( class_exists( 'LinkManagerPro\Services\Settings' ) ) {
	$days = (int) \LinkManagerPro\Services\Settings::get( 'tracking.click_retention_days', 0 );
}

Call it after the plugins have loaded, for example from a callback on init.

Quick reference ​

ItemValue
REST namespacelink-manager-pro/v1
WP-CLI commandwp link-manager-pro
Hook prefixlink_manager_pro_ (two filters use link_manager_pro/)
Table prefix{$wpdb->prefix}link_manager_pro_
Text domainlink-manager-pro
Capability manage_link_manager_proA stored capability. Activation adds it to the administrator and editor roles, and deactivation removes it. The access rule setting can use it for people who aren't administrators.
Capability link_manager_pro_accessA virtual capability, worked out on each request and never stored. Administrators always have it. Others have it when they hold the capability the access rule names.
RequirementsWordPress 6.0 or later, PHP 8.0 or later

The access rule is on the screen described in Access for editors.