mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-18 17:33:43 +03:00
Run phpcs code formatter
This commit is contained in:
parent
37b7e4451a
commit
f412bc8fba
|
@ -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 ) {
|
||||
|
|
|
@ -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',
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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 ],
|
||||
);
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue