Skip to content

Commit

Permalink
Move away from array_push
Browse files Browse the repository at this point in the history
  • Loading branch information
anomiex authored and jeherve committed Sep 16, 2020
1 parent c69a090 commit a4e3f9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/blocks/src/class-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public static function classes( $slug = '', $attr, $extra = array() ) {
! empty( $attr['align'] )
&& in_array( $attr['align'], array( 'left', 'center', 'right', 'wide', 'full' ), true )
) {
array_push( $classes, 'align' . $attr['align'] );
$classes[] = 'align' . $attr['align'];
}

// Add custom classes if provided in the block editor.
if ( ! empty( $attr['className'] ) ) {
array_push( $classes, $attr['className'] );
$classes[] = $attr['className'];
}

// Add any extra classes.
Expand Down

0 comments on commit a4e3f9b

Please sign in to comment.