'posts', ] ); $collapsible_class = 'is-collapsible'; switch ( $args['group_type'] ) { case \Automattic\P2\Plugins\Core\Pinned_Posts\Grouped_Posts::GROUP_TYPE_PROJECT_THREADS: $heading = __( 'Project threads', 'p2020' ); break; case \Automattic\P2\Plugins\Core\Pinned_Posts\Grouped_Posts::GROUP_TYPE_PINNED: $heading = __( 'Pinned posts', 'p2020' ); break; default: $heading = __( 'Posts', 'p2020' ); $collapsible_class = 'is-collapsible-disabled'; } /** * Filters the posts group heading text. * * @param string $heading The group heading. * @param string $group_type The group type slug (e.g. 'posts', 'pinned', 'project_threads'). */ $heading = apply_filters( 'p2020_posts_group_heading', $heading, $args['group_type'] ); $open_indicator = \Automattic\P2\Plugins\Core\Pinned_Posts\Grouped_Posts::should_display_group_collapsed( $args['group_type'] ) ? '' : 'open'; $group_classes = "o2-posts-group has-{$args['group_type']} {$collapsible_class}"; $inner_wrapper_id = "o2-posts-group__inner-wrapper-{$args['group_type']}"; ?>
>