Run phpcs code formatter

This commit is contained in:
Kelly Dwan 2024-08-30 17:32:28 -04:00
parent 37b7e4451a
commit f412bc8fba
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
4 changed files with 12 additions and 12 deletions

View file

@ -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 ) {

View file

@ -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',
)
);

View file

@ -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 ],
);

View file

@ -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 );
}