WP Manifestindependent plugin directory
manifest / social / cgit-wp-socialize

Castlegate IT WP Socialize

Simple social network sharing URLs, links, and widgets

★ 0stars
v3.0.2latest · 10mo ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/castlegateit/cgit-wp-socialize/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Socialize generates sharing links for common social networks and provides icons and brand colours. It currently supports the following sites and protocols:

Network Key
Email email
Bluesky bluesky
Facebook facebook
LinkedIn linkedin
Pinterest pinterest
Pocket pocket
Reddit reddit
Twitter twitter
WhatsApp whatsapp
X x

Sharing links require a title and URL. They may also include an excerpt, where supported by the network. There are three ways of specifying the link to be shared using the Socialize class:

use Castlegate\Socialize\Socialize;

// Set the title, URL, and excerpt manually
$socialize = new Socialize();
$socialize->title = 'Example Title';
$socialize->url = 'https://www.example.com/';
$socialize->excerpt = 'Example excerpt ...';

// Set the title, URL, and excerpt based on a post ID
$socialize = new Socialize(post_id: 123);

// Set the title, URL, and excerpt based on the current post ID
$socialize = new Socialize(auto: true);

You can then specify the social networks that should appear in the output and generate the links, using the keys in the table above:

$socialize->networks = [
    'facebook',
    'linkedin',
    'twitter',
];

// Return an array of links without icons
$links = $socialize->links();

// Return an array of links with icons
$links = $socialize->links(icons: true);

Each link will be an array, with name, url, color, and (optionally) icon keys.

Utilities

You can use the Socialize class's static methods as utilities, e.g. to get the icon of a social network for use elsewhere in a theme.

$key = 'facebook';

Socialize::getNetworkName($key);     // "Facebook"
Socialize::getNetworkColor($key);    // "#1877f2"
Socialize::getNetworkIconPath($key); // (absolute path to icon file)
Socialize::getNetworkIconUrl($key);  // (icon URL)
Socialize::getNetworkIconSvg($key);  // (icon SVG safe to embed in HTML)

License

Released under the MIT License. See LICENSE for details.

Releases

1 release.

Tag
Published
v3.0.2 latest
Dec 19, 2025 10mo ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.