Making WordPress.org


Ignore:
Timestamp:
04/04/2024 11:13:50 PM (3 years ago)
Author:
adamwood
Message:

wporg-support-2024: Update sidebar layout

Move tags up and styles as pills
Style topics as cards
Sidebar width and font changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support-2024/functions.php

    r13435 r13455  
    457457
    458458/**
    459  * Display an ordered list of bbPress views
     459 * Display a list of bbPress views for landing pages.
    460460 */
    461461function wporg_support_get_views() {
    … …  
    475475
    476476                $output .= sprintf( '<a class="wp-block-wporg-link-wrapper is-layout-flow wp-block-wporg-link-wrapper-is-layout-flow" href="%s"><h3 class="wp-block-heading has-inter-font-family has-normal-font-size">%s</h3></a>',
     477                        esc_url( bbp_get_view_url( $view ) ),
     478                        bbp_get_view_title( $view )
     479                );
     480        }
     481
     482        return $output;
     483}
     484
     485/**
     486 * Display a list of bbPress views for the sidebar.
     487 */
     488function wporg_support_get_sidebar_topics() {
     489        $output = '';
     490
     491        foreach ( bbp_get_views() as $view => $args ) {
     492                if ( in_array( $view, wporg_support_get_compat_views() ) ) {
     493                        continue;
     494                }
     495
     496                $output .= sprintf( '<a class="bbp-view-title wp-block-wporg-link-wrapper is-layout-flow wp-block-wporg-link-wrapper-is-layout-flow" href="%s"><h5 class="wp-block-heading has-inter-font-family has-small-font-size" style="font-weight:700;margin-bottom:0">%s</h5></a>',
    477497                        esc_url( bbp_get_view_url( $view ) ),
    478498                        bbp_get_view_title( $view )
Note: See TracChangeset for help on using the changeset viewer.