Abilitieseasy-svg-pro/list-share-links

easy-svg-pro/list-share-links

List the share links.

Ability, Easy SVG Pro, defined in includes/abilities/manage.php

Usage

wp_get_ability( 'easy-svg-pro/list-share-links' )->execute( array $input ): array|WP_Error

Example

<?php
$ability = wp_get_ability( 'easy-svg-pro/list-share-links' );
if ( $ability ) {
	$result = $ability->execute( array() );
}

Description

Lists the live share links of this site: which collection, and when each expires. Never the link itself.

Runs through the plugin's own REST handler, so its permission check, argument schema and handler do the work. The ability adds no write path of its own.

Registered while the AI agents (MCP) switch and the Share links feature are on. Permission: the user needs manage_options and an active license, and every call asks the route's own check again.

Read only: it changes nothing.

Parameters

None. Call it with an empty array.

Return value

returnarray|WP_Error

An array on success, a WP_Error with the route's code and status on failure. links holds one row per live link with id (12 hex characters), collection, created and expires (Unix timestamps), sorted by expiry. hours lists the lifetimes a new link may get: 1, 24 and 168. Expired links are left out. The secret part of a link is never in the answer: this site keeps only its hash.