[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Duotone block support flag. Parts of this source were derived and modified from TinyColor, released under the MIT license.
File Size: | 586 lines (16 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
wp_tinycolor_bound01( $n, $max ) X-Ref |
Takes input from [0, n] and returns it as [0, 1]. Direct port of TinyColor's function, lightly simplified to maintain consistency with TinyColor. return: float Value in the range [0, 1]. param: mixed $n Number of unknown type. param: int $max Upper value of the range to bound to. since: 5.8.0 |
_wp_tinycolor_bound_alpha( $n ) X-Ref |
Direct port of tinycolor's boundAlpha function to maintain consistency with how tinycolor works. return: float Value in the range [0,1]. param: mixed $n Number of unknown type. since: 5.9.0 |
wp_tinycolor_rgb_to_rgb( $rgb_color ) X-Ref |
Rounds and converts values of an RGB object. Direct port of TinyColor's function, lightly simplified to maintain consistency with TinyColor. return: array Rounded and converted RGB object. param: array $rgb_color RGB object. since: 5.8.0 |
wp_tinycolor_hue_to_rgb( $p, $q, $t ) X-Ref |
Helper function for hsl to rgb conversion. Direct port of TinyColor's function, lightly simplified to maintain consistency with TinyColor. return: float R, G, or B component. param: float $p first component. param: float $q second component. param: float $t third component. since: 5.8.0 |
wp_tinycolor_hsl_to_rgb( $hsl_color ) X-Ref |
Converts an HSL object to an RGB object with converted and rounded values. Direct port of TinyColor's function, lightly simplified to maintain consistency with TinyColor. return: array Rounded and converted RGB object. param: array $hsl_color HSL object. since: 5.8.0 |
wp_tinycolor_string_to_rgb( $color_str ) X-Ref |
Parses hex, hsl, and rgb CSS strings using the same regex as TinyColor v1.4.2 used in the JavaScript. Only colors output from react-color are implemented. Direct port of TinyColor's function, lightly simplified to maintain consistency with TinyColor. return: array RGB object. param: string $color_str CSS color string. since: 5.8.0 since: 5.9.0 Added alpha processing. |
wp_get_duotone_filter_id( $preset ) X-Ref |
Returns the prefixed id for the duotone filter for use as a CSS id. return: string Duotone filter CSS id. param: array $preset Duotone preset value as seen in theme.json. since: 5.9.1 |
wp_get_duotone_filter_property( $preset ) X-Ref |
Returns the CSS filter property url to reference the rendered SVG. return: string Duotone CSS filter property url value. param: array $preset Duotone preset value as seen in theme.json. since: 5.9.0 |
wp_get_duotone_filter_svg( $preset ) X-Ref |
Returns the duotone filter SVG string for the preset. return: string Duotone SVG filter. param: array $preset Duotone preset value as seen in theme.json. since: 5.9.1 |
wp_register_duotone_support( $block_type ) X-Ref |
Registers the style and colors block attributes for block types that support it. param: WP_Block_Type $block_type Block Type. since: 5.8.0 |
wp_render_duotone_support( $block_content, $block ) X-Ref |
Render out the duotone stylesheet and SVG. return: string Filtered block content. param: string $block_content Rendered block content. param: array $block Block object. since: 5.8.0 |
Generated: Thu Nov 21 01:00:03 2024 | Cross-referenced by PHPXref 0.7.1 |