From a4e3f9bc13513b11c17cb82552a54c3069ded12a Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 15 Sep 2020 16:21:52 +0200 Subject: [PATCH] Move away from array_push See https://github.com/Automattic/jetpack/pull/17126#discussion_r488058806 --- packages/blocks/src/class-blocks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/blocks/src/class-blocks.php b/packages/blocks/src/class-blocks.php index bbd9ea6edb234..bd1834c246239 100644 --- a/packages/blocks/src/class-blocks.php +++ b/packages/blocks/src/class-blocks.php @@ -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.