[wp-trac] [WordPress Trac] #23348: Add a "Contribute" tab to the about page
WordPress Trac
noreply at wordpress.org
Thu Apr 20 13:51:54 UTC 2023
#23348: Add a "Contribute" tab to the about page
--------------------------------------+---------------------------------
Reporter: mt_suzette | Owner: oglekler
Type: enhancement | Status: assigned
Priority: normal | Milestone: 6.3
Component: Help/About | Version: 3.5
Severity: normal | Resolution:
Keywords: needs-patch needs-design | Focuses: ui, administration
--------------------------------------+---------------------------------
Comment (by davidmusnik):
Hello people,
I have been investigating this issue during the contributing day organized
by WPFR in Paris on April 20th, 2023. ''For the record, this is the first
time the person writing this comment is participating to such an event''.
Adding a contribute option should involve several modifications :
**1- wp-admin/about.php**
This first modification creates a new element in an array as well as a new
file which might be named « contribute.php », in line with the other
options such as «about», «credits», «freedoms» and «privacy». More
precisely:
{{{#!php
<?php
<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 nav-tab-active" aria-
current="page"><?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"><?php _e( 'Contribute' );
?></a>
</nav>
}}}
In addition to this change, all other PHP files which display the
secondary menu, say « about.php », « credits.php », « freedoms.php » and «
privacy.php » should also be modified to include this new contribute entry
in that very secondary menu.
**1.1- wp-admin/contribute.php**
This new file, heavyly country dependant, requires further design in line
with the other {«about», «credits», «freedoms» and «privacy»} internal
pages already in place.
**2- wp-includes/admin-bar.php**
This modification involves the creation of a new node in an existing one
as listed below. Obviously, the href element of the code should be
localized according to the country under considération.
{{{#!php
<?php
$wp_admin_bar->add_node(
array(
'parent' => 'wp-logo-external',
'id' => 'Contribute',
'title' => __( 'Contribute' ),
'href' => __( 'https://wordpress.org/support/article
/contributing-to-wordpress/' ),
)
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23348#comment:55>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list