WP Manifestindependent plugin directory
manifest / social / social-links-block-extended

Social Links Block Extended

Extends the Social Link Gutenberg block with additional social networks (ex: Substack, Linktree...)

by Raphael Sanchez · github.com/raphaelsanchez/social-links-block-extended · website

★ 1stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/raphaelsanchez/social-links-block-extended/archive/refs/heads/main.zip

Extends the core Social Link block with additional social networks (Substack, Linktree).

Requirements

  • WordPress 6.9+ (filter block_core_social_link_get_services added in 6.9)
  • PHP 8.0+

For development (build, lint): Node.js 18+ and npm

Development

npm install
npm run build

Editor setup

For VS Code / Cursor, install the recommended extensions when prompted (or from .vscode/extensions.json):

  • ESLint – JavaScript linting
  • Prettier – Code formatting
  • Stylelint – CSS/SCSS linting
  • EditorConfig – Consistent editor settings

The workspace will then apply the same rules as npm run lint:js and npm run lint:css.

Script Description
npm run build Compile assets for production
npm run start Watch mode for development
npm run format Format code (Prettier)
npm run lint:js Lint JavaScript
npm run lint:css Lint CSS/SCSS
npm run lint:pkg-json Lint package.json
npm run check-engines Verify Node/npm versions
npm run plugin-zip Create a zip for distribution

Adding a new service

To add a new social network, you need to update two files. The slug must match in both places.

1. Register the service (PHP)

Edit includes/services.php and add your service to the social_links_block_extended_get_services() array:

'myservice' => [
    'name' => _x( 'My Service', 'social link block variation name', 'social-links-block-extended' ),
    'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false"><path d="..."/></svg>',
],

Requirements for the icon:

  • SVG markup, 24×24 viewBox
  • fill="currentColor" so the icon inherits the brand color
  • aria-hidden="true" and focusable="false"

Avoid slugs already used by WordPress core (e.g. facebook, instagram, twitter).

2. Add brand colors (SCSS)

Edit src/style.scss and add your service to the $social-links-block-extended-services map:

$social-links-block-extended-services: (
    "linktree": (
        #44e664,
        #fff,
    ),
    "substack": (
        #fa6817,
        #fff,
    ),
    "myservice": (
        #hexcolor,
        #fff,
    ),
    // (brand-color, text-color-on-brand)
);
  • First value: brand color (background for default style, icon color for logos-only)
  • Second value: text color on the brand background (use #fff for dark brands, #333 for light)

Run npm run build to compile the styles.

Releases

1 release.

Tag
Published
1.0.0 latest
Feb 12, 2026 7mo ago

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