[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/blocks/ -> social-link.php (summary)

Server-side rendering of the `core/social-link` blocks.

File Size: 315 lines (59 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 functions

  render_block_core_social_link()
  register_block_core_social_link()
  block_core_social_link_get_icon()
  block_core_social_link_get_name()
  block_core_social_link_services()
  block_core_social_link_get_color_styles()

Functions
Functions that are not part of a class:

render_block_core_social_link( $attributes, $content, $block )   X-Ref
Renders the `core/social-link` block on server.

return: string Rendered HTML of the referenced block.
param: Array    $attributes The block attributes.
param: String   $content    InnerBlocks content of the Block.
param: WP_Block $block      Block object.

register_block_core_social_link()   X-Ref
Registers the `core/social-link` blocks.


block_core_social_link_get_icon( $service )   X-Ref
Returns the SVG for social link.

return: string SVG Element for service icon.
param: string $service The service icon.

block_core_social_link_get_name( $service )   X-Ref
Returns the brand name for social link.

return: string Brand label.
param: string $service The service icon.

block_core_social_link_services( $service = '', $field = '' )   X-Ref
Returns the SVG for social link.

return: array|string
param: string $service The service slug to extract data from.
param: string $field The field ('name', 'icon', etc) to extract for a service.

block_core_social_link_get_color_styles( $context )   X-Ref
Returns CSS styles for icon and icon background colors.

return: string Inline CSS styles for link's icon and background colors.
param: array $context Block context passed to Social Link.



Generated: Fri Mar 29 01:00:02 2024 Cross-referenced by PHPXref 0.7.1