method_build_social_nav_items()
method_build_social_nav_items( $key = 'social_accounts' )
Generates HTML list items for configured social media links.
Description
Reads social link entries from the method_options option, cross‑references them with method_get_social_platforms(), and generates <li> elements containing linked icons and labels.
Parameters
$key (string) :
The option key within method_options to read social accounts from. Default 'social_accounts'.
Return
(string) HTML string of <li> elements, or empty string if no links are configured.
Source
File: lib/helper-functions.php
Related
- Used by the Social Nav block’s PHP render callback.
- Also passed to the editor via
methodGlobalData.socialNavItemsfor live preview. - Each entry must have a
servicekey matching a platform slug frommethod_get_social_platforms().
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |