Making WordPress.org

Ticket #4007: 4007.patch

File 4007.patch, 13.4 KB (added by Clorith, 4 years ago)
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-forums-homepage.php

    diff --git a/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-forums-homepage.php b/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-forums-homepage.php
    a b  
    11<?php do_action( 'bbp_template_before_forums_loop' ); ?>
    22
    3 <div id="forums-list-<?php bbp_forum_id(); ?>" class="bbp-forums three-up">
     3<table id="forums-list-<?php bbp_forum_id(); ?>" class="bbp-forums">
     4        <thead>
     5                <tr>
     6                        <th><?php _e( 'Forum', 'wporg-forums' ); ?></th>
     7                        <th><?php _e( 'Topics', 'wporg-forums' ); ?></th>
     8                </tr>
     9        </thead>
    410
    5 
     11        <tbody>
    612                <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
    713
    814                        <?php bbp_get_template_part( 'loop', 'single-forum-homepage' ); ?>
    915
    1016                <?php endwhile; ?>
     17        </tbody>
    1118
     19</table><!-- .forums-directory -->
    1220
    13 </div><!-- .forums-directory -->
    14 
    15 <div class="themes-plugins">
    16        
    17         <h3><?php _e( 'Themes and Plugins', 'wporg-forums' ); ?></h3>
    18         <p><?php
    19                 /* translators: 1: Theme Directory URL, 2: Appearance icon, 3: Plugin Directory URL, 4: Plugins icon */
    20                 printf( __( 'Looking for help with a specific <a href="%1$s">%2$s theme</a> or <a href="%3$s">%4$s plugin</a>? Head to the theme or plugin\'s page and find the "View support forum" link to visit the theme or plugin\'s individual forum.', 'wporg-forums' ),
    21                         esc_url( __( 'https://wordpress.org/themes/', 'wporg-forums' ) ),
    22                         '<span class="dashicons dashicons-admin-appearance"></span>',
    23                         esc_url( __( 'https://wordpress.org/plugins/', 'wporg-forums' ) ),
    24                         '<span class="dashicons dashicons-admin-plugins"></span>'
    25                 );
    26         ?></p>
    27 
    28 </div>
    29 
    3021<?php do_action( 'bbp_template_after_forums_loop' ); ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-forum-homepage.php

    diff --git a/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-forum-homepage.php b/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-forum-homepage.php
    a b  
    1 <div id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class( bbp_get_forum_id(), array( '' ) ); ?>>
     1<tr id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class( bbp_get_forum_id(), array( '' ) ); ?>>
    22
    3         <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>"><h3><?php bbp_forum_title(); ?></h3></a>
     3        <td class="topic-details">
     4                <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>"><?php bbp_forum_title(); ?></a>
    45
    5         <p><?php bbp_forum_content(); ?></p>
     6                <p><?php bbp_forum_content(); ?></p>
    67
    7         <p>
    88                <?php $subforums = bbp_forum_get_subforums( bbp_get_forum_id() ); ?>
    99
    1010                <?php if ( $subforums ) : ?>
     
    1414                        <?php endforeach; ?>
    1515
    1616                <?php endif; ?>
    17 
    18                 <?php if ( ! bbp_is_forum_category() ) : ?>
     17        </td>
    1918
    20                         <a href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>" class="viewmore"><?php _e( 'View forum', 'wporg-forums' ); ?></a>
    21 
    22                 <?php endif; ?>
    23         </p>
    24 
    25 </div><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->
     19        <td class="topic-count">
     20                <?php bbp_forum_topic_count(); ?>
     21        </td>
     22</tr><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->
  • new file sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sass/site/_forum-welcome.scss

    diff --git a/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sass/site/_forum-welcome.scss b/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sass/site/_forum-welcome.scss
    new file mode 100644
    - +  
     1#forum-welcome {
     2        display: grid;
     3        grid-template-columns: 100%;
     4        justify-content: space-between;
     5        width: 100%;
     6        font-size: 14px;
     7
     8        @media (min-width: $ms-breakpoint) {
     9                grid-template-columns: 45% 50%;
     10        }
     11
     12        > section {
     13                padding-top: 0;
     14                width: 100%;
     15        }
     16
     17        .info-box {
     18
     19                h2 {
     20                        display: inline-block;
     21                        font-size: 1.5rem;
     22                        margin-bottom: 0;
     23                        margin-top: 0;
     24                }
     25
     26                .title {
     27                        display: flex;
     28                        align-items: center;
     29
     30                        .dashicons {
     31                                font-size: 30px;
     32                                height: 30px;
     33                                margin-right: 10px;
     34                                width: 30px;
     35                        }
     36                }
     37        }
     38
     39        #bbpress-forums {
     40                font-size: inherit;
     41        }
     42
     43        #viewdiv {
     44                text-align: center;
     45        }
     46
     47        .bbp-forums {
     48
     49                tr {
     50                        th,
     51                        td {
     52                                padding: 5px 10px;
     53                        }
     54                }
     55
     56                thead {
     57                        th {
     58                                background-color: $color__wp-blue;
     59                                color: #fff;
     60                        }
     61                }
     62
     63                tbody {
     64                        td {
     65                                border-bottom: 1px solid $color__base-gray;
     66                        }
     67
     68                        .topic-details {
     69                                padding-top: 1em;
     70                        }
     71
     72                        .topic-count {
     73                                text-align: right;
     74                        }
     75                }
     76        }
     77}
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sass/style.scss

    diff --git a/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sass/style.scss b/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sass/style.scss
    a b  
    8787# bbPress Specific
    8888--------------------------------------------------------------*/
    8989@import "site/bbpress";
     90@import "site/forum-welcome";
    9091
    9192/*--------------------------------------------------------------
    9293# HelpHub Specific
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/template-parts/bbpress-front.php

    diff --git a/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/template-parts/bbpress-front.php b/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/template-parts/bbpress-front.php
    a b  
    1313
    1414<?php do_action( 'bbp_template_notices' ); ?>
    1515
    16 <section class="three-up" id="forum-welcome">
    17         <div>
    18                 <div class="info-box">
     16<div id="forum-welcome">
     17        <section>
     18                <?php
     19                get_sidebar( 'forum-welcome-sidebar' );
     20                if ( ! is_active_sidebar( 'forum-welcome-sidebar' ) ) :
     21                ?>
     22
     23                        <div class="info-box">
     24                                <div class="title">
    1925                                        <span class="dashicons
    2026                                        <?php
    2127                                        /* translators: dashicon class name for 'Welcome to Support' section. Do not translate into your own language. */
    2228                                        esc_attr_e( 'dashicons-sos', 'wporg-forums' );
    2329                                        ?>
    2430                                        "></span>
    25                         <h3><?php _e( 'Welcome to Support', 'wporg-forums' ); ?></h3>
    26                         <p><?php _e( 'Our community-based Support Forums are a great place to learn, share, and troubleshoot.', 'wporg-forums' ); ?></p>
    27                         <p><?php _e( '<a href="https://wordpress.org/support/welcome/">Get started</a>', 'wporg-forums' ); ?></p>
    28                 </div>
    29         </div>
    30         <div>
    31                 <div class="info-box">
     31
     32                                        <h2><?php _e( 'Welcome to Support', 'wporg-forums' ); ?></h2>
     33                                </div>
     34                                <div class="description">
     35                                        <p><?php _e( 'Our community-based Support Forums are a great place to learn, share, and troubleshoot.', 'wporg-forums' ); ?></p>
     36                                        <p><?php _e( '<a href="https://wordpress.org/support/welcome/">Get started</a>', 'wporg-forums' ); ?></p>
     37                                </div>
     38                        </div>
     39
     40
     41                        <div class="info-box">
     42                                <div class="title">
    3243                                        <span class="dashicons
    3344                                        <?php
    3445                                        /* translators: dashicon class name for 'Documentation' section. Do not translate into your own language. */
    3546                                        esc_attr_e( 'dashicons-portfolio', 'wporg-forums' );
    3647                                        ?>
    3748                                        "></span>
    38                         <h3><?php _e( 'Documentation', 'wporg-forums' ); ?></h3>
    39                         <p><?php _e( 'Your first stop where you\'ll find information on everything from installing to creating plugins.', 'wporg-forums' ); ?></p>
    40                         <p><?php _e( '<a href="https://wordpress.org/support/">Explore documentation</a>', 'wporg-forums' ); ?></p>
    41                 </div>
    42         </div>
    43         <div>
    44                 <div class="info-box">
     49
     50                                        <h2><?php _e( 'Documentation', 'wporg-forums' ); ?></h2>
     51                                </div>
     52                                <div class="description">
     53                                        <p><?php _e( 'Your first stop where you\'ll find information on everything from installing to creating plugins.', 'wporg-forums' ); ?></p>
     54                                        <p><?php _e( '<a href="https://wordpress.org/support/">Explore documentation</a>', 'wporg-forums' ); ?></p>
     55                                </div>
     56                        </div>
     57
     58                        <div class="info-box">
     59                                <div class="title">
    4560                                        <span class="dashicons
    4661                                        <?php
    4762                                        /* translators: dashicon class name for 'Get Involved' section. Do not translate into your own language. */
    4863                                        esc_attr_e( 'dashicons-hammer', 'wporg-forums' );
    4964                                        ?>
    5065                                        "></span>
    51                         <h3><?php _e( 'Get Involved', 'wporg-forums' ); ?></h3>
    52                         <p><?php _e( 'The Support Handbook is great for tips, tricks, and advice regarding giving the best support possible.', 'wporg-forums' ); ?></p>
    53                         <p><?php _e( '<a href="https://make.wordpress.org/support/handbook/">Explore the Handbook</a>', 'wporg-forums' ); ?></p>
    54                 </div>
    55         </div>
    56 </section>
     66
     67                                        <h2><?php _e( 'Get Involved', 'wporg-forums' ); ?></h2>
     68                                </div>
     69                                <div class="description">
     70                                        <p><?php _e( 'The Support Handbook is great for tips, tricks, and advice regarding giving the best support possible.', 'wporg-forums' ); ?></p>
     71                                        <p><?php _e( '<a href="https://make.wordpress.org/support/handbook/">Explore the Handbook</a>', 'wporg-forums' ); ?></p>
     72                                </div>
     73                        </div>
     74                <?php endif; ?>
     75        </section>
    5776
    58 <hr />
    59 
    60 <section>
    61         <?php bbp_get_template_part( 'content', 'archive-forum' ); ?>
     77        <section>
     78                <?php bbp_get_template_part( 'content', 'archive-forum' ); ?>
    6279
    63         <div id="viewdiv">
    64                 <ul id="views">
    65                         <?php wporg_support_get_views(); ?>
    66                 </ul>
    67         </div><!-- #viewdiv -->
    68 </section>
     80                <div id="viewdiv">
     81                        <ul id="views">
     82                                <?php wporg_support_get_views(); ?>
     83                        </ul>
     84                </div><!-- #viewdiv -->
     85        </section>
     86</div>
     87
    6988
    7089<?php do_action( 'bbp_after_main_content' ); ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/footer.php

    diff --git a/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/footer.php b/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/footer.php
    a b  
    99        </div><!-- #content -->
    1010</div><!-- #page -->
    1111
    12 <?php require WPORGPATH . 'footer.php';
     12<?php wporg_get_global_footer();
     13
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php

    diff --git a/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php b/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php
    a b  
    6868                'before_widget' => '<div id="%1$s" class="widget %2$s">',
    6969                'after_widget'  => '</div>',
    7070        ) );
     71        register_sidebar( array(
     72                'name'          => __( 'Forum Welcome', 'wporg-forums' ),
     73                'id'            => 'forum-welcome-sidebar',
     74                'description'   => __( 'Customize the forum welcome section', 'wporg-forums' ),
     75                'before_widget' => '<div id="%1$s" class="widget info-box %2$s">',
     76                'after_widget'  => '</div>',
     77        ) );
    7178}
    7279add_action( 'widgets_init', 'wporg_support_register_widget_areas' );
    7380
  • new file sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sidebar-forum-welcome-sidebar.php

    diff --git a/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sidebar-forum-welcome-sidebar.php b/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sidebar-forum-welcome-sidebar.php
    new file mode 100644
    - +  
     1<?php
     2if ( is_active_sidebar( 'forum-welcome-sidebar' ) ) {
     3        dynamic_sidebar( 'forum-welcome-sidebar' );
     4}