Make WordPress Core

Ticket #23348: 23348.3.diff

File 23348.3.diff, 9.6 KB (added by oglekler, 22 months ago)
  • src/wp-admin/about.php

    diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php
    index b52873425d..19c4a5d47f 100644
    a b require_once ABSPATH . 'wp-admin/admin-header.php'; 
    4040                        <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
    4141                        <a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
    4242                        <a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
     43                        <a href="contribute.php" class="nav-tab"><?php _e( 'Contribute' ); ?></a>
    4344                </nav>
    4445
    4546                <div class="about__section">
  • new file src/wp-admin/contribute.php

    diff --git a/src/wp-admin/contribute.php b/src/wp-admin/contribute.php
    new file mode 100644
    index 0000000000..b2e72c4167
    - +  
     1<?php
     2/**
     3 * Contribute administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
     10require_once __DIR__ . '/admin.php';
     11
     12// Used in the HTML title tag.
     13$title = __( 'Contribute' );
     14
     15list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
     16
     17require_once ABSPATH . 'wp-admin/admin-header.php';
     18?>
     19<div class="wrap about__container">
     20
     21        <div class="about__header">
     22                <div class="about__header-title">
     23                        <h1>
     24                                <?php _e( 'Contribute' ); ?>
     25                        </h1>
     26                </div>
     27
     28                <div class="about__header-text">
     29                        <?php _e( 'Take part in WordPress development' ); ?>
     30                </div>
     31        </div>
     32
     33        <nav class="about__header-navigation nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
     34                <a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
     35                <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
     36                <a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
     37                <a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
     38                <a href="contribute.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Contribute' ); ?></a>
     39        </nav>
     40
     41        <div class="about__section has-2-columns is-wider-right">
     42                <div class="column about__image">
     43                        <img src="data:image/svg+xml,%3Csvg width='436' height='436' viewbox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='%231d35b4' /%3E%3C/svg%3E" alt="" />
     44                </div>
     45                <div class="column is-vertically-aligned-center">
     46                        <p><?php _e( 'You can contribute to WordPress development bringing your ideas, collaborating on subjects close to your heart and trying many different roles and possibilities, learning continuously and meeting people who share passion to WordPress' ); ?></p>
     47
     48                        <p>
     49                                <?php
     50                                printf(
     51                                        /* translators: %s: Number of Make teams */
     52                                        __( 'The Make WordPress has more than %s teams you can join, which have working groups and separate projects.' ),
     53                                        20
     54                                );
     55                                ?>
     56                        </p>
     57                </div>
     58        </div>
     59
     60        <div class="about__section">
     61                <div class="column">
     62                        <h2 class="is-smaller-heading"><?php _e( 'Hot to find the team you will enjoy?' ); ?></h2>
     63                        <p><?php _e( 'What you like most or have a particular knowledge in can be a starting point, but you can take time to look around and explore possibilities before stepping in to contribute. Either way you can learn a lot.' ); ?></p>
     64                </div>
     65        </div>
     66
     67        <div class="about__section has-2-columns">
     68                <div class="column is-vertically-aligned-center">
     69                        <ul>
     70                                <li><?php _e( 'Pic a team' ); ?></li>
     71                                <li><?php _e( 'Follow its news to see how you can participate' ); ?></li>
     72                                <li><?php _e( "Attend team's meetings" ); ?></li>
     73                                <li><?php _e( 'Ask for Good First issue to solve' ); ?></li>
     74                        </ul>
     75                </div>
     76                <div class="column">
     77                        <img src="data:image/svg+xml,%3Csvg width='436' height='218' viewbox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='%231d35b4' /%3E%3C/svg%3E" alt="" />
     78                </div>
     79
     80                <div class="column">
     81                        <img src="data:image/svg+xml,%3Csvg width='436' height='300' viewbox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='%231d35b4' /%3E%3C/svg%3E" alt="" />
     82                </div>
     83                <div class="column is-vertically-aligned-center">
     84                        <h3 class="is-smaller-heading"><?php _e( 'Non-technical areas' ); ?></h3>
     85                        <ul>
     86                                <li><a href="<?php _e( '#' ); ?>"><?php _e( 'Translate strings for WordPress and related sites' ); ?></a></li>
     87                                <li><a href="<?php _e( '#' ); ?>"><?php _e( 'Submit photography for Photo Directory' ); ?></a></li>
     88                                <li><a href="<?php _e( '#' ); ?>"><?php _e( 'Help someone on the Support forum' ); ?></a></li>
     89                                <li><a href="<?php _e( '#' ); ?>"><?php _e( 'Translate WordPress News articles into your native language' ); ?></a></li>
     90                                <li><?php _e( 'Test WordPress before releases, checking how new features and fixes works' ); ?></li>
     91                        </ul>
     92                </div>
     93
     94                <div class="column is-vertically-aligned-center">
     95                        <h3 class="is-smaller-heading"><?php _e( 'Technical areas' ); ?></h3>
     96                        <ul>
     97                                <li><?php _e( 'Pick your favourite language or library: PHP, JavaScript, Kotlin, Java, Swift, Objective-C, Vue, Python, TypeScript' ); ?></li>
     98                                <li><?php _e( 'Choose what you want to do: testing, creating patches, working on documentation' ); ?></li>
     99                        </ul>
     100                </div>
     101                <div class="column">
     102                        <img src="data:image/svg+xml,%3Csvg width='436' height='218' viewbox='0 0 100 50' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='%231d35b4' /%3E%3C/svg%3E" alt="" />
     103                </div>
     104
     105        </div>
     106
     107        <div class="about__section">
     108                <div class="column aligncenter">
     109                        <p><a href="<?php _e( '#' ); ?>"><?php _e( 'Orientation tool' ); ?></a></p>
     110                </div>
     111        </div>
     112
     113</div>
     114<?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>
  • src/wp-admin/credits.php

    diff --git a/src/wp-admin/credits.php b/src/wp-admin/credits.php
    index 39cb9ede26..21e2d968d2 100644
    a b $credits = wp_credits(); 
    4444                <a href="credits.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Credits' ); ?></a>
    4545                <a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
    4646                <a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
     47                <a href="contribute.php" class="nav-tab"><?php _e( 'Contribute' ); ?></a>
    4748        </nav>
    4849
    4950        <div class="about__section has-1-column has-gutters">
  • src/wp-admin/css/about.css

    diff --git a/src/wp-admin/css/about.css b/src/wp-admin/css/about.css
    index 733bddc4e6..3b8e1d3323 100644
    a b  
    4848.about-php,
    4949.credits-php,
    5050.freedoms-php,
     51.contribute-php,
    5152.privacy-php {
    5253        background: #fff;
    5354}
     
    5556.about-php #wpcontent,
    5657.credits-php #wpcontent,
    5758.freedoms-php #wpcontent,
     59.contribute-php #wpcontent,
    5860.privacy-php #wpcontent {
    5961        background: #fff;
    6062        padding: 0 24px;
     
    6466        .about-php.auto-fold #wpcontent,
    6567        .credits-php.auto-fold #wpcontent,
    6668        .freedoms-php.auto-fold #wpcontent,
     69        .contribute-php.auto-fold #wpcontent,
    6770        .privacy-php.auto-fold #wpcontent {
    6871                padding-left: 24px;
    6972        }
     
    575578
    576579.credits-php .about__header-title h1,
    577580.privacy-php .about__header-title h1,
     581.contribute-php .about__header-title h1,
    578582.freedoms-php .about__header-title h1 {
    579583        /* Fluid font size scales on browser size 960px - 1200px. */
    580584        font-size: clamp(3rem, 10vw - 3rem, 4.5rem);
     
    647651
    648652        .credits-php .about__header-title h1,
    649653        .privacy-php .about__header-title h1,
     654        .contribute-php .about__header-title h1,
    650655        .freedoms-php .about__header-title h1 {
    651656                /* Fluid font size scales on browser size 600px - 960px. */
    652657                font-size: clamp(3rem, 6.67vw - 0.5rem, 4.5rem);
     
    684689        .about__header {
    685690                min-height: auto;
    686691        }
    687 }
    688692
    689 @media screen and (max-width: 480px) {
    690693        .about__header,
    691694        .credits-php .about__header,
    692695        .privacy-php .about__header,
     696        .contribute-php .about__header,
    693697        .freedoms-php .about__header {
    694698                background-image: none;
    695699        }
  • src/wp-admin/freedoms.php

    diff --git a/src/wp-admin/freedoms.php b/src/wp-admin/freedoms.php
    index 2d742958e1..2ee50ae0ba 100644
    a b require_once ABSPATH . 'wp-admin/admin-header.php'; 
    4141                <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
    4242                <a href="freedoms.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Freedoms' ); ?></a>
    4343                <a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
     44                <a href="contribute.php" class="nav-tab"><?php _e( 'Contribute' ); ?></a>
    4445        </nav>
    4546
    4647        <div class="about__section is-feature">
  • src/wp-includes/admin-bar.php

    diff --git a/src/wp-includes/admin-bar.php b/src/wp-includes/admin-bar.php
    index 4792822d59..42077b724a 100644
    a b function wp_admin_bar_render() { 
    122122 */
    123123function wp_admin_bar_wp_menu( $wp_admin_bar ) {
    124124        if ( current_user_can( 'read' ) ) {
    125                 $about_url = self_admin_url( 'about.php' );
     125                $about_url      = self_admin_url( 'about.php' );
     126                $contribute_url = self_admin_url( 'contribute.php' );
    126127        } elseif ( is_multisite() ) {
    127                 $about_url = get_dashboard_url( get_current_user_id(), 'about.php' );
     128                $about_url      = get_dashboard_url( get_current_user_id(), 'about.php' );
     129                $contribute_url = get_dashboard_url( get_current_user_id(), 'contribute.php' );
    128130        } else {
    129                 $about_url = false;
     131                $about_url      = false;
     132                $contribute_url = false;
    130133        }
    131134
    132135        $wp_logo_menu_args = array(
    function wp_admin_bar_wp_menu( $wp_admin_bar ) { 
    198201                        'href'   => __( 'https://wordpress.org/support/forum/requests-and-feedback' ),
    199202                )
    200203        );
     204
     205        if ( $contribute_url ) {
     206                // Add contribute link.
     207                $wp_admin_bar->add_node(
     208                        array(
     209                                'parent' => 'wp-logo-external',
     210                                'id'     => 'contribute',
     211                                'title'  => __( 'Contribute' ),
     212                                'href'   => $contribute_url,
     213                        )
     214                );
     215        }
    201216}
    202217
    203218/**