method_sanitize_flex_align()
method_sanitize_flex_align( $align )
Converts WordPress layout alignment values to CSS flex equivalents.
Description
WordPress core uses directional terms (left, right, top, bottom) for layout alignment. This function maps them to their CSS flexbox equivalents.
Parameters
$align (string) :
An alignment value from WordPress’s layout system.
Return
(string) The CSS flex alignment value.
Default Color Map
| Input | Output |
|---|---|
left | flex-start |
right | flex-end |
top | flex-start |
bottom | flex-end |
| (anything else) | (passed through unchanged) |
Source
File: lib/blocks.php
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |