Capabilitieseasy_svg_swap_icons

easy_svg_swap_icons

The capability client mode checks: whoever has it may replace the drawing behind an existing icon, and nothing else.

Capability · Easy SVG Pro · Status: Internal · Defined in includes/client/client-mode.php

Internal: not part of the promised public surface. It may change without notice.

Usage

current_user_can( 'easy_svg_swap_icons' )

Example

add_action( 'init', function () {
	$role = get_role( 'editor' );
	if ( $role && ! $role->has_cap( 'easy_svg_swap_icons' ) ) {
		$role->add_cap( 'easy_svg_swap_icons' );
	}
} );

Description

Grant it to any role with a role manager or add_cap(). Administrators (manage_options) get it automatically through user_has_cap while client mode is on, without a role write. It only counts together with the client_mode flag and an active licence, so a role that keeps the capability after client mode is switched off gets nothing.

add_cap() writes to the stored role and outlives the plugin; remove it with remove_cap() when you uninstall.