Client mode
Let a client or editor replace the drawing behind an existing icon, and nothing else, with one capability and the Swap icons screen in Easy SVG Pro.
You hand a finished site to a client, and a month later they want a different phone icon. With client mode they can swap it themselves, without being able to delete icons, rename them or touch any settings. This guide shows how to set it up and what the client sees.
What a client can and cannot do
| Can | Cannot |
|---|---|
| Replace the drawing of an icon that already exists in an icon set | Add new icons |
| Rename or delete icons | |
| Change the free icon library | |
| Open settings, the SVG cleaner or the license screen |
The icon's name and address never change. Every template, block and custom field that uses it keeps working and shows the new drawing right away.
Before you start
- Your Pro license is active and you are an administrator.
- The icons the client should be able to swap are in an icon set. Client mode works on sets, not on the free library or on folders.
- You have a way to give the client's user account a capability: a role editor plugin, or a few lines of code.
Set it up
Switch client mode on
Go to Icons → Features and turn on Client mode in the group In the editor. Reload the page. A new tab Swap icons appears.
Give the client the capability
A capability is a single permission in WordPress. Client mode uses one called easy_svg_swap_icons. Give it to the client's role or user, for example with a role editor plugin such as "User Role Editor" or "Members": edit the role, tick easy_svg_swap_icons and save.
Administrators have it automatically while client mode is on.
Check as the client
Log in as the client (or use a user switching plugin). The Icons menu now shows only Swap icons.
Prefer code? Give the capability to the Editor role
Put this in a small custom plugin or your theme's functions.php:
add_action( 'init', function () {
$role = get_role( 'editor' );
if ( $role && ! $role->has_cap( 'easy_svg_swap_icons' ) ) {
$role->add_cap( 'easy_svg_swap_icons' );
}
} );
Capabilities are stored in the database, so the has_cap() check makes sure the role is only written once.
What the client does
Open Swap icons
Go to Icons → Swap icons. Every icon set is listed with its icons, each with its name and address.
Pick the icon
Click Replace next to the icon to change.
Choose the new drawing
Pick an .svg file from the computer. The file is cleaned like any upload.
Done
A message says the icon has a new drawing and that its name and address stay. The website shows the new icon at once.
Good to know
- Undo is possible. With Icon history on, an administrator can bring back the earlier drawing.
- The client needs an SVG file. Tell them to export icons from their design tool as SVG, in a simple single color if possible.
- Switching client mode off removes the Swap icons tab for everybody. The capability stays on the role, but has no effect.
Common questions
Related guides
Developers: the capability is described in easy_svg_swap_icons.