Abilitieseasy-svg-pro/update-features

easy-svg-pro/update-features

Switch features on or off.

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

Usage

wp_get_ability( 'easy-svg-pro/update-features' )->execute( array $input ): array|WP_Error

Example

<?php
$ability = wp_get_ability( 'easy-svg-pro/update-features' );
if ( $ability ) {
	$result = $ability->execute( array(
		'sets' => true,
	) );
}

Description

Switches Pro features on or off. Send only the switches to change, as key and true or false; every other switch keeps its value.

Older keys such as editor, collections, sources, presets or fontawesome are still accepted and are mapped to their new key (sets, templates) before the request is sent. bulk is not a switch of its own and always reads on; it is accepted so that what get-features returns can be sent back.

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 is on, which it is out of the box. Permission: the user needs manage_options, and every call asks the route's own check again.

Writes to the site. Calling it twice with the same input has the same effect as once.

Parameters

body
tagsboolean

Optional. Whether the tags feature is on. A flag that is absent keeps its stored value.

body
setsboolean

Optional. Whether the sets feature is on. A flag that is absent keeps its stored value.

body
cliboolean

Optional. Whether the cli feature is on. A flag that is absent keeps its stored value.

body
abilitiesboolean

Optional. Whether the abilities feature is on. A flag that is absent keeps its stored value.

body
icon_field_acfboolean

Optional. Whether the icon_field_acf feature is on. A flag that is absent keeps its stored value.

body
icon_field_lazyblocksboolean

Optional. Whether the icon_field_lazyblocks feature is on. A flag that is absent keeps its stored value.

body
icon_field_blocksboolean

Optional. Whether the icon_field_blocks feature is on. A flag that is absent keeps its stored value.

body
elementorboolean

Optional. Whether the elementor feature is on. A flag that is absent keeps its stored value.

body
metaboxboolean

Optional. Whether the metabox feature is on. A flag that is absent keeps its stored value.

body
wpbakeryboolean

Optional. Whether the wpbakery feature is on. A flag that is absent keeps its stored value.

body
imprezaboolean

Optional. Whether the impreza feature is on. A flag that is absent keeps its stored value.

body
avadaboolean

Optional. Whether the avada feature is on. A flag that is absent keeps its stored value.

body
generateblocksboolean

Optional. Whether the generateblocks feature is on. A flag that is absent keeps its stored value.

body
quick_insertboolean

Optional. Whether the quick_insert feature is on. A flag that is absent keeps its stored value.

body
blocksboolean

Optional. Whether the blocks feature is on. A flag that is absent keeps its stored value.

body
twigboolean

Optional. Whether the twig feature is on. A flag that is absent keeps its stored value.

body
templatesboolean

Optional. Whether the templates feature is on. A flag that is absent keeps its stored value.

body
icon_fieldboolean

Optional. icon_field is an older key, still accepted: it sets icon_field_acf, icon_field_lazyblocks. Prefer icon_field_acf, icon_field_lazyblocks.

body
collectionsboolean

Optional. collections is an older key, still accepted: it sets sets. Prefer sets.

body
editorboolean

Optional. editor is an older key, still accepted: it sets sets. Prefer sets.

body
sourcesboolean

Optional. sources is an older key, still accepted: it sets sets. Prefer sets.

body
presetsboolean

Optional. presets is an older key, still accepted: it sets templates. Prefer templates.

body
fontawesomeboolean

Optional. fontawesome is an older key, still accepted: it sets templates. Prefer templates.

body
bulkboolean

Optional. Not a switch of its own, always on. Accepted so a round trip from get-features validates.

Return value

returnarray|WP_Error

What the matching Icons panel screen receives for the same action. An array on success, a WP_Error with the route's code and status on failure.