wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
wp_normalize_remote_block_pattern is private and should not be used in themes or plugins directly.
wp_normalize_remote_block_pattern › WordPress Function
Da6.2.0
Deprecaton/a
› wp_normalize_remote_block_pattern ( $pattern )
| Accedi: |
|
| Parametri: |
|
| Ritorna: |
|
| Definito a: |
|
| Codex: |
Normalize the pattern properties to camelCase.
The API's format is snake_case,register_block_pattern() expects camelCase.Funzioni correlate: _load_remote_block_patterns, unregister_block_pattern, register_block_pattern, wp_normalize_site_data, wp_normalize_path
Sorgenti
function wp_normalize_remote_block_pattern( $pattern ) {
if ( isset( $pattern['block_types'] ) ) {
$pattern['blockTypes'] = $pattern['block_types'];
unset( $pattern['block_types'] );
}
if ( isset( $pattern['viewport_width'] ) ) {
$pattern['viewportWidth'] = $pattern['viewport_width'];
unset( $pattern['viewport_width'] );
}
return (array) $pattern;
}