[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/block-supports/ -> typography.php (summary)

Typography block support flag.

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

Defines 3 functions

  wp_register_typography_support()
  wp_apply_typography_support()
  wp_typography_get_css_variable_inline_style()

Functions
Functions that are not part of a class:

wp_register_typography_support( $block_type )   X-Ref
Registers the style and typography block attributes for block types that support it.

param: WP_Block_Type $block_type Block Type.
since: 5.6.0

wp_apply_typography_support( $block_type, $block_attributes )   X-Ref
Adds CSS classes and inline styles for typography features such as font sizes
to the incoming attributes array. This will be applied to the block markup in
the front-end.

return: array Typography CSS classes and inline styles.
param: WP_Block_Type $block_type       Block type.
param: array         $block_attributes Block attributes.
since: 5.6.0

wp_typography_get_css_variable_inline_style( $attributes, $feature, $css_property )   X-Ref
Generates an inline style for a typography feature e.g. text decoration,
text transform, and font style.

return: string CSS inline style.
param: array  $attributes   Block's attributes.
param: string $feature      Key for the feature within the typography styles.
param: string $css_property Slug for the CSS property the inline style sets.
since: 5.8.0



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1