-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contribute Tab for the About page #4431
Changes from all commits
248d6f0
5987723
2e707e7
191745a
f6cf6b4
50c73a4
e985ad6
50707c9
ad76e15
38d56c9
b4bf72d
d2a279d
30e027c
37048f6
d9c4b8a
a7c34b4
3e06255
a0afe64
d7b31c1
a15cb0b
a3e8a05
8ae8080
9184af4
ba3dde1
9ce5bb7
8b7f28c
b662f8d
8d1158a
c014c30
0f5f0f6
6667001
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
<?php | ||
/** | ||
* Contribute administration panel. | ||
* | ||
* @package WordPress | ||
* @subpackage Administration | ||
*/ | ||
|
||
/** WordPress Administration Bootstrap */ | ||
require_once __DIR__ . '/admin.php'; | ||
|
||
// Used in the HTML title tag. | ||
$title = __( 'Get Involved' ); | ||
|
||
list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); | ||
audrasjb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
require_once ABSPATH . 'wp-admin/admin-header.php'; | ||
?> | ||
<div class="wrap about__container"> | ||
|
||
<div class="about__header"> | ||
<div class="about__header-title"> | ||
<h1> | ||
<?php _e( 'Get Involved' ); ?> | ||
</h1> | ||
</div> | ||
|
||
<div class="about__header-text"> | ||
<?php _e( 'Be the future of WordPress' ); ?> | ||
</div> | ||
</div> | ||
|
||
<nav class="about__header-navigation nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>"> | ||
<a href="about.php" class="nav-tab"><?php _e( 'What’s New' ); ?></a> | ||
<a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a> | ||
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a> | ||
<a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a> | ||
<a href="contribute.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Get Involved' ); ?></a> | ||
</nav> | ||
|
||
<div class="about__section has-2-columns is-wider-right"> | ||
<div class="column about__image"> | ||
<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="" /> | ||
</div> | ||
<div class="column is-vertically-aligned-center"> | ||
<p><?php _e( 'Do you use WordPress for work, for personal projects, or even just for fun? You can help shape the long-term success of the open source project that powers millions of websites around the world.' ); ?></p> | ||
<p><?php _e( 'Join the WordPress contributor community and connect with others who are passionate about maintaining a free and open web.' ); ?></p> | ||
|
||
<ul> | ||
<li><?php _e( 'Be part of a global open source community' ); ?></li> | ||
<li><?php _e( 'Apply your skills or learn some new ones' ); ?></li> | ||
<li><?php _e( 'Grow your network and make new friends' ); ?></li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="about__section"> | ||
<div class="column"> | ||
<h2><?php _e( 'Find your team' ); ?></h2> | ||
<p><?php _e( 'Finding the area that aligns with your skills and interests is the first step toward meaningful contribution. With more than 20 Make WordPress teams working on different parts of the open-source WordPress project, there’s a place for everyone, no matter what your skill set is.' ); ?></p> | ||
</div> | ||
</div> | ||
|
||
<div class="about__section has-2-columns is-wider-left"> | ||
<div class="column is-vertically-aligned-center"> | ||
<h3><?php _e( 'No-Code Contribution' ); ?></h3> | ||
<p><?php _e( 'WordPress may thrive on technical contributions, but you don’t have to code to contribute. Here are some of the ways you can make an impact without writing a single line of code:' ); ?></p> | ||
<ul> | ||
<li><?php _e( '<strong>Share</strong> your knowledge in the WordPress support forums' ); ?></li> | ||
<li><?php _e( '<strong>Write</strong> or improve documentation for WordPress' ); ?></li> | ||
<li><?php _e( '<strong>Translate</strong> WordPress into your local language' ); ?></li> | ||
<li><?php _e( '<strong>Create</strong> and improve WordPress educational materials' ); ?></li> | ||
<li><?php _e( '<strong>Promote</strong> the WordPress project to your community' ); ?></li> | ||
<li><?php _e( '<strong>Take</strong> photos for or help curate the WordPress Photos Directory' ); ?></li> | ||
<li><?php _e( '<strong>Organize</strong> or participate in local WordPress Meetups and WordCamps' ); ?></li> | ||
<li><?php _e( '<strong>Lend</strong> your creative imagination to the WordPress UI design' ); ?></li> | ||
<li><?php _e( '<strong>Edit</strong> videos and add captions to WordPress.tv' ); ?></li> | ||
<li><?php _e( '<strong>Explore</strong> ways to reduce the environmental impact of millions of websites' ); ?></li> | ||
</ul> | ||
</div> | ||
<div class="column"> | ||
<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="" /> | ||
</div> | ||
</div> | ||
<div class="about__section has-2-columns is-wider-right"> | ||
<div class="column"> | ||
<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="" /> | ||
</div> | ||
<div class="column is-vertically-aligned-center"> | ||
<h3><?php _e( 'Code-based Contribution' ); ?></h3> | ||
<p><?php _e( 'If you do code, or want to learn how, you can contribute technically in numerous ways:' ); ?></p> | ||
<ul> | ||
<li><?php _e( '<strong>Find</strong> and report bugs in the WordPress core software' ); ?></li> | ||
<li><?php _e( '<strong>Test</strong> new releases and proposed features for the block editor' ); ?></li> | ||
<li><?php _e( '<strong>Write</strong> and submit patches to fix bugs or help build new features' ); ?></li> | ||
<li><?php _e( '<strong>Contribute</strong> to the code, improve the UX, and test the WordPress app' ); ?></li> | ||
</ul> | ||
<p><?php _e( 'WordPress embraces new technologies, while being committed to backward compatibility. The WordPress project uses the following languages and libraries:' ); ?></p> | ||
<ul> | ||
<li><?php _e( 'Core and Block Editor: HTML, CSS, PHP, SQL, JavaScript, and React' ); ?></li> | ||
<li><?php _e( 'WordPress app: Kotlin, Java, Swift, Objective-C, Vue, Python, and TypeScript' ); ?></li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="about__section is-feature has-subtle-background-color"> | ||
<div class="column"> | ||
<h2><?php _e( 'Help Make WordPress Better' ); ?></h2> | ||
<p><?php _e( 'Whether you speak at a local meetup, provide your perspective on a feature proposal, or submit a bug report, your contributions will make a difference.' ); ?></p> | ||
<p class="aligncenter"><a href="https://make.wordpress.org/contribute/" target="_blank"><?php _e( 'Find your team →' ); ?></a></p> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
<?php | ||
require_once ABSPATH . 'wp-admin/admin-footer.php'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like we have some tests that could be copied and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @SergeyBiryukov just following up on this bit, should we add these tests to ensure the link only shows when appropriate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would be great, yes 🙂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Follow-up: r56227. |
||
} | ||
|
||
$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( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like this is used in all the places that it could be. There are calls to
_e( 'Get Involved' )
on lines 24 and 38 rather thanecho $title;
. Should this be used on these lines too?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That appears to be consistent with the other files, e.g.
privacy.php
. I think$title
here is literally only meant for the<title>
tag, so this seems fine as is to me 🙂There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @SergeyBiryukov