Skip to content

Commit

Permalink
Fix phpcs issue
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Oct 24, 2022
1 parent 16fe289 commit 42b4dab
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,21 @@ function gutenberg_register_layout_support( $block_type ) {
/**
* Generates the CSS for position support from the layout object.
*
* @param string $selector CSS selector.
* @param array $layout Layout object. The one that is passed has already checked
* the existence of default block layout.
* @param string $selector CSS selector.
* @param array $layout Layout object. The one that is passed has already checked
* the existence of default block layout.
* @return string CSS styles on success. Else, empty string.
*/
function gutenberg_get_layout_position_style( $selector, $layout ) {
$position_styles = array();

$position_type = _wp_array_get( $layout, array( 'position', 'type' ), '' );
$position_side = _wp_array_get( $layout, array( 'position', 'side' ), '' );

$offset_value = '0';

if (
in_array( $position_type, array( 'fixed', 'sticky' ), true ) &&
in_array( $position_side, array( 'top', 'right', 'bottom', 'left'), true )
in_array( $position_side, array( 'top', 'right', 'bottom', 'left' ), true )
) {
/*
* For fixed or sticky top positions,
Expand Down

0 comments on commit 42b4dab

Please sign in to comment.