Contents
On this page
Delete Share Set - Plugixa Easy Social Share Buttons
DELETE /plugixa-social-share/v1/sets/{id}
Delete a share set and the automatic spots it held.
An account with the plugixa_social_share_edit capability. Administrators hold it; no other role does until you grant it.
Note. Nothing checks whether posts still name the set. A shortcode, block or widget that named it draws nothing for visitors from then on (people who can edit posts see a notice instead), and its number is never given to another set. Call Share Set Usage first to see where it is used. Deleting the default set makes the next lowest number the default. The delete is permanent: there is no trash.
Request
DELETE https://your-site.example/wp-json/plugixa-social-share/v1/sets/2
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The share set’s number, the one typed in [plugixa_share id="2"] |
Responses
200 OK. The set is gone.
{
"success": true,
"data": {
"deleted": 2,
"items": [
{
"id": 1,
"name": "",
"instance": {
"networks": [
"facebook",
"x",
"linkedin",
"whatsapp",
"email",
"copy"
],
"template": "default",
"layout": "full",
"align": "start",
"counts": false,
"total": false,
"label": "",
"vertical": false,
"size": "medium",
"size_mobile": "inherit",
"count_pos": "after",
"total_pos": "after",
"more": false,
"color": "",
"ink": ""
},
"placements": {
"page": {
"content": "content_bottom",
"extra": []
}
},
"created": 1793000000,
"modified": 1794475800,
"label": "Share set 1"
}
],
"primary": 1
}
}
| Field | Type | Meaning |
|---|---|---|
data.deleted |
integer |
The number of the deleted set |
data.items |
array |
Every share set as it now stands, lowest number first |
data.primary |
integer |
The default set: the lowest number that exists, 0 when there are none |
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_social_share_not_found |
No share set with that number. It may have been deleted. |
Plus the errors every endpoint can return.
Examples
curl -s -X DELETE "https://your-site.example/wp-json/plugixa-social-share/v1/sets/2" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-social-share/v1/sets/2');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-social-share/v1/sets/2', {
method: 'DELETE',
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share