wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_get_state_text_clip_escape › WordPress Function
Seit7.2.0
Veraltetn/v
› wp_get_state_text_clip_escape ( $state_style, $base_clip )
| Parameter: (2) |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Returns the declarations that unclip a text clip when a state sets a different clip.
Mirror ofgetStateTextClipEscapeCSS in packages/block-editor/src/hooks/style.jsx.Quellcode
function wp_get_state_text_clip_escape( array $state_style, string $base_clip ): array {
$state_clip = $state_style['background']['backgroundClip'] ?? '';
if ( ! in_array( $state_clip, WP_Style_Engine::VALID_BACKGROUND_CLIP_VALUES, true ) ) {
$state_clip = '';
}
if ( empty( $state_clip ) || 'text' === $state_clip || 'text' !== $base_clip || wp_state_paints_own_background( $state_style ) ) {
return array();
}
return array( 'background-image' => 'unset' );
}