block_core_social_link_get_color_styles() – Returns CSS styles for icon and icon background colors.

You appear to be a bot. Output may be restricted

Description

Returns CSS styles for icon and icon background colors.

Usage

$string = block_core_social_link_get_color_styles( $context );

Parameters

$context
( array ) required – Block context passed to Social Link.

Returns

string Inline CSS styles for link's icon and background colors.

Source

File name: wordpress/wp-includes/blocks/social-link.php
Lines:

1 to 13 of 13
function block_core_social_link_get_color_styles( $context ) {
  $styles = array();

  if ( array_key_exists( 'iconColorValue', $context ) ) {
    $styles[] = 'color: ' . $context['iconColorValue'] . '; ';
  }

  if ( array_key_exists( 'iconBackgroundColorValue', $context ) ) {
    $styles[] = 'background-color: ' . $context['iconBackgroundColorValue'] . '; ';
  }

  return implode( '', $styles );
}
 

 View on GitHub View on Trac