From f412bc8fba34546f023cf6e249eccba009dde46c Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Fri, 30 Aug 2024 17:32:28 -0400 Subject: [PATCH] Run phpcs code formatter --- themes/wporg-5ftf-2024/functions.php | 4 ++-- themes/wporg-5ftf-2024/inc/block-bindings.php | 4 ++-- themes/wporg-5ftf-2024/inc/block-config.php | 14 +++++++------- .../src/pledge-contributors/render.php | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/themes/wporg-5ftf-2024/functions.php b/themes/wporg-5ftf-2024/functions.php index c9ed1c7..b67ceb7 100644 --- a/themes/wporg-5ftf-2024/functions.php +++ b/themes/wporg-5ftf-2024/functions.php @@ -85,8 +85,8 @@ function use_archive_template( $templates ) { function add_body_class( $classes ) { global $wp; // Get the main menu using the hooked function. - $menus = Block_Config\add_site_navigation_menus( [] ); - $slug = $wp->request; + $menus = Block_Config\add_site_navigation_menus( [] ); + $slug = $wp->request; $has_page = array_filter( $menus['main'], function ( $item ) use ( $slug ) { diff --git a/themes/wporg-5ftf-2024/inc/block-bindings.php b/themes/wporg-5ftf-2024/inc/block-bindings.php index 5f728f6..43fe5cc 100644 --- a/themes/wporg-5ftf-2024/inc/block-bindings.php +++ b/themes/wporg-5ftf-2024/inc/block-bindings.php @@ -20,8 +20,8 @@ function register_block_bindings() { register_block_bindings_source( 'wporg-5ftf/pledge-meta', array( - 'label' => 'Pledge meta', - 'uses_context' => [ 'postId' ], + 'label' => 'Pledge meta', + 'uses_context' => [ 'postId' ], 'get_value_callback' => __NAMESPACE__ . '\get_meta_binding_value', ) ); diff --git a/themes/wporg-5ftf-2024/inc/block-config.php b/themes/wporg-5ftf-2024/inc/block-config.php index 0bd7995..ec42da6 100644 --- a/themes/wporg-5ftf-2024/inc/block-config.php +++ b/themes/wporg-5ftf-2024/inc/block-config.php @@ -90,15 +90,15 @@ function get_sort_options( $options ) { } return array( - 'label' => $label, - 'title' => __( 'Sort', 'wporg-5ftf' ), - 'key' => 'order', - 'action' => home_url( '/pledges/' ), - 'options' => array( - '' => __( 'Random', 'wporg-5ftf' ), + 'label' => $label, + 'title' => __( 'Sort', 'wporg-5ftf' ), + 'key' => 'order', + 'action' => home_url( '/pledges/' ), + 'options' => array( + '' => __( 'Random', 'wporg-5ftf' ), 'alphabetical' => __( 'Alphabetical', 'wporg-5ftf' ), 'contributors' => __( 'Total Contributors', 'wporg-5ftf' ), - 'hours' => __( 'Total Hours', 'wporg-5ftf' ), + 'hours' => __( 'Total Hours', 'wporg-5ftf' ), ), 'selected' => [ $sort ], ); diff --git a/themes/wporg-5ftf-2024/src/pledge-contributors/render.php b/themes/wporg-5ftf-2024/src/pledge-contributors/render.php index 7b6e7a6..df40c96 100644 --- a/themes/wporg-5ftf-2024/src/pledge-contributors/render.php +++ b/themes/wporg-5ftf-2024/src/pledge-contributors/render.php @@ -17,7 +17,7 @@ $is_truncated = isset( $attributes['className'] ) && str_contains( $attributes[' $count_more = 0; if ( $is_truncated ) { - $count_more = count( $contributors ) - TRUNCATED_MAX; + $count_more = count( $contributors ) - TRUNCATED_MAX; $contributors = array_splice( $contributors, 0, TRUNCATED_MAX ); }