From aa5f91a182d5844049e406ccc9f7525288d3b0d1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 12 Jul 2023 12:52:26 +0000 Subject: [PATCH] =?UTF-8?q?Help/About:=20Add=20a=20=E2=80=9CGet=20Involved?= =?UTF-8?q?=E2=80=9D=20tab=20to=20the=20About=20page.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This aims to make all the various ways of contributing to open-source WordPress project more discoverable, as well as make it easier to find an area that aligns with new contributor’s skills and interests. Props oglekler, jpantani, SeReedMedia, ryelle, marybaum, karmatosed, eidolonnight, mt_suzette, Shelob9, desrosj, cathibosco1, jenmylo, nacin, helen, joostdevalk, hugobaeta, TacoVerdo, swissspidy, markoheijnen, lukecavanagh, boemedia, bridgetwillard, jeffmora, davidmusnik, mehdi01, johnbillion, fierevere, tobifjellner, richtabor, meher, courane01, webcommsat, audrasjb, mukesh27, davidbaumwald, costdev, joedolson, robinwpdeveloper, estelaris, mohiuddinomran, SergeyBiryukov. See #23348. git-svn-id: https://develop.svn.wordpress.org/trunk@56220 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/about.php | 1 + src/wp-admin/contribute.php | 116 ++++++++++++++++++++++++++++++++++ src/wp-admin/credits.php | 1 + src/wp-admin/css/about.css | 24 ++++--- src/wp-admin/freedoms.php | 1 + src/wp-admin/privacy.php | 1 + src/wp-includes/admin-bar.php | 21 +++++- 7 files changed, 152 insertions(+), 13 deletions(-) create mode 100644 src/wp-admin/contribute.php diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php index 2da21ab02f..d6b4a1a4f6 100644 --- a/src/wp-admin/about.php +++ b/src/wp-admin/about.php @@ -40,6 +40,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; +
diff --git a/src/wp-admin/contribute.php b/src/wp-admin/contribute.php new file mode 100644 index 0000000000..a6d366be09 --- /dev/null +++ b/src/wp-admin/contribute.php @@ -0,0 +1,116 @@ + +
+ +
+
+

+ +

+
+ +
+ +
+
+ + + +
+
+ +
+
+

+

+ +
    +
  • +
  • +
  • +
+
+
+ +
+
+

+

+
+
+ +
+
+

+

+
    +
  • Share your knowledge in the WordPress support forums' ); ?>
  • +
  • Write or improve documentation for WordPress' ); ?>
  • +
  • Translate WordPress into your local language' ); ?>
  • +
  • Create and improve WordPress educational materials' ); ?>
  • +
  • Promote the WordPress project to your community' ); ?>
  • +
  • Take photos for or help curate the WordPress Photos Directory' ); ?>
  • +
  • Organize or participate in local WordPress Meetups and WordCamps' ); ?>
  • +
  • Lend your creative imagination to the WordPress UI design' ); ?>
  • +
  • Edit videos and add captions to WordPress.tv' ); ?>
  • +
  • Explore ways to reduce the environmental impact of millions of websites' ); ?>
  • +
+
+
+ +
+
+
+
+ +
+
+

+

+
    +
  • Find and report bugs in the WordPress core software' ); ?>
  • +
  • Test new releases and proposed features for the block editor' ); ?>
  • +
  • Write and submit patches to fix bugs or help build new features' ); ?>
  • +
  • Contribute to the code, improve the UX, and test the WordPress app' ); ?>
  • +
+

+
    +
  • +
  • +
+
+
+ +
+
+

+

+

+
+
+ +
+ +
diff --git a/src/wp-admin/css/about.css b/src/wp-admin/css/about.css index 733bddc4e6..89e7b82924 100644 --- a/src/wp-admin/css/about.css +++ b/src/wp-admin/css/about.css @@ -1,7 +1,7 @@ /*------------------------------------------------------------------------------ 22.0 - About Pages - 1.0 Global: About, Credits, Freedoms, Privacy + 1.0 Global: About, Credits, Freedoms, Privacy, Get Involved 1.1 Layout 1.2 Typography & Elements 1.3 Header @@ -42,20 +42,22 @@ } /*------------------------------------------------------------------------------ - 1.0 - Global: About, Credits, Freedoms, Privacy + 1.0 - Global: About, Credits, Freedoms, Privacy, Get Involved ------------------------------------------------------------------------------*/ .about-php, .credits-php, .freedoms-php, -.privacy-php { +.privacy-php, +.contribute-php { background: #fff; } .about-php #wpcontent, .credits-php #wpcontent, .freedoms-php #wpcontent, -.privacy-php #wpcontent { +.privacy-php #wpcontent, +.contribute-php #wpcontent { background: #fff; padding: 0 24px; } @@ -64,7 +66,8 @@ .about-php.auto-fold #wpcontent, .credits-php.auto-fold #wpcontent, .freedoms-php.auto-fold #wpcontent, - .privacy-php.auto-fold #wpcontent { + .privacy-php.auto-fold #wpcontent, + .contribute-php.auto-fold #wpcontent { padding-left: 24px; } } @@ -574,8 +577,9 @@ } .credits-php .about__header-title h1, +.freedoms-php .about__header-title h1, .privacy-php .about__header-title h1, -.freedoms-php .about__header-title h1 { +.contribute-php .about__header-title h1 { /* Fluid font size scales on browser size 960px - 1200px. */ font-size: clamp(3rem, 10vw - 3rem, 4.5rem); } @@ -646,8 +650,9 @@ } .credits-php .about__header-title h1, + .freedoms-php .about__header-title h1, .privacy-php .about__header-title h1, - .freedoms-php .about__header-title h1 { + .contribute-php .about__header-title h1 { /* Fluid font size scales on browser size 600px - 960px. */ font-size: clamp(3rem, 6.67vw - 0.5rem, 4.5rem); } @@ -684,13 +689,12 @@ .about__header { min-height: auto; } -} -@media screen and (max-width: 480px) { .about__header, .credits-php .about__header, + .freedoms-php .about__header, .privacy-php .about__header, - .freedoms-php .about__header { + .contribute-php .about__header { background-image: none; } diff --git a/src/wp-admin/freedoms.php b/src/wp-admin/freedoms.php index 2d742958e1..8b9f55b845 100644 --- a/src/wp-admin/freedoms.php +++ b/src/wp-admin/freedoms.php @@ -41,6 +41,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; +
diff --git a/src/wp-admin/privacy.php b/src/wp-admin/privacy.php index 8e979be695..3203b953fe 100644 --- a/src/wp-admin/privacy.php +++ b/src/wp-admin/privacy.php @@ -35,6 +35,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; +
diff --git a/src/wp-includes/admin-bar.php b/src/wp-includes/admin-bar.php index 4ab5302fd9..a35051ac8b 100644 --- a/src/wp-includes/admin-bar.php +++ b/src/wp-includes/admin-bar.php @@ -122,11 +122,14 @@ function wp_admin_bar_render() { */ function wp_admin_bar_wp_menu( $wp_admin_bar ) { if ( current_user_can( 'read' ) ) { - $about_url = self_admin_url( 'about.php' ); + $about_url = self_admin_url( 'about.php' ); + $contribute_url = self_admin_url( 'contribute.php' ); } elseif ( is_multisite() ) { - $about_url = get_dashboard_url( get_current_user_id(), 'about.php' ); + $about_url = get_dashboard_url( get_current_user_id(), 'about.php' ); + $contribute_url = get_dashboard_url( get_current_user_id(), 'contribute.php' ); } else { - $about_url = false; + $about_url = false; + $contribute_url = false; } $wp_logo_menu_args = array( @@ -159,6 +162,18 @@ function wp_admin_bar_wp_menu( $wp_admin_bar ) { ); } + if ( $contribute_url ) { + // Add contribute link. + $wp_admin_bar->add_node( + array( + 'parent' => 'wp-logo', + 'id' => 'contribute', + 'title' => __( 'Get Involved' ), + 'href' => $contribute_url, + ) + ); + } + // Add WordPress.org link. $wp_admin_bar->add_node( array(