Changeset 56709 for trunk/src/wp-includes/block-supports/position.php
- Timestamp:
- 09/26/2023 01:45:23 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/block-supports/position.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/position.php
r56382 r56709 52 52 53 53 $global_settings = wp_get_global_settings(); 54 $theme_has_sticky_support = _wp_array_get( $global_settings, array( 'position', 'sticky' ), false );55 $theme_has_fixed_support = _wp_array_get( $global_settings, array( 'position', 'fixed' ), false );54 $theme_has_sticky_support = isset( $global_settings['position']['sticky'] ) ? $global_settings['position']['sticky'] : false; 55 $theme_has_fixed_support = isset( $global_settings['position']['fixed'] ) ? $global_settings['position']['fixed'] : false; 56 56 57 57 // Only allow output for position types that the theme supports. … … 64 64 } 65 65 66 $style_attribute = _wp_array_get( $block, array( 'attrs', 'style' ), null );66 $style_attribute = isset( $block['attrs']['style'] ) ? $block['attrs']['style'] : null; 67 67 $class_name = wp_unique_id( 'wp-container-' ); 68 68 $selector = ".$class_name"; 69 69 $position_styles = array(); 70 $position_type = _wp_array_get( $style_attribute, array( 'position', 'type' ), '' );70 $position_type = isset( $style_attribute['position']['type'] ) ? $style_attribute['position']['type'] : ''; 71 71 $wrapper_classes = array(); 72 72 … … 79 79 80 80 foreach ( $sides as $side ) { 81 $side_value = _wp_array_get( $style_attribute, array( 'position', $side ) );81 $side_value = isset( $style_attribute['position'][ $side ] ) ? $style_attribute['position'][ $side ] : null; 82 82 if ( null !== $side_value ) { 83 83 /*
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)