block_core_social_link_get_color_styles()
Returns CSS styles for icon and icon background colors.
Хуков нет.
Возвращает
Строку
. Inline CSS styles for link's icon and background colors.
Использование
block_core_social_link_get_color_styles( $context );
- $context(массив) (обязательный)
- Block context passed to Social Link.
Код block_core_social_link_get_color_styles() block core social link get color styles WP 6.1.1
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 ); }