WP-CLIwp easy-svg network unshare

wp easy-svg network unshare

Stop sharing an icon set of the main site with the network. Icons already placed on the sites keep rendering. Multisite only.

WP-CLI command, Easy SVG Pro, Status: Stable

This command takes a set of the main site out of network sharing. The other sites can no longer pick its icons, but icons they already placed keep rendering: the set stays in the network copy as retired.

Usage

wp easy-svg network unshare <set-id>

When to use it

  • A client relaunched and the old brand set should not be offered any more.
  • A set was shared with all sites by mistake. To narrow it to some sites instead, run wp easy-svg network share again with --sites.

Parameters

query
set-idpositional
Required

The post id of the icon set on the main site.

Return value

stdouttext

Success: No longer shared. Icons already placed keep rendering. On a German site: Nicht mehr geteilt. Bereits eingefügte Icons werden weiter angezeigt.

exit codeint

0 when the share was removed, also when the set was not shared. 1 when the license, the free plugin's icon library or the WP-CLI feature is off, the command does not run on the main site of a multisite network, the Collections feature is off, or the id is not an icon set (Set not found.).

Examples

wp easy-svg network unshare 42 --url=https://network.example

How it works

  1. The same guard as network share.
  2. The post meta _easy_svg_pro_network is deleted from the set.
  3. The network copy is rebuilt. A set no longer shared stays in it as retired, so placed icons keep their drawing, but it is no longer offered.

Pitfalls

  • Placed icons stay. Unsharing does not remove icons from pages. Replace them on the sites if they must go.
  • No error for a set that was not shared. The command succeeds either way.