Skip to content
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

Remove local navigation block #323

Merged
merged 3 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

94 changes: 93 additions & 1 deletion source/wp-content/themes/wporg-main-2022/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
require_once __DIR__ . '/src/google-search-embed/index.php';
require_once __DIR__ . '/src/random-heading/index.php';
require_once __DIR__ . '/src/release-tables/index.php';
require_once __DIR__ . '/src/navigation/index.php';

/**
* Actions and filters.
Expand All @@ -24,6 +23,7 @@
add_filter( 'wporg_block_site_breadcrumbs', __NAMESPACE__ . '\update_site_breadcrumbs' );
add_filter( 'render_block_core/site-title', __NAMESPACE__ . '\use_parent_page_title', 10, 3 );
add_filter( 'render_block_data', __NAMESPACE__ . '\update_header_template_part_class' );
add_filter( 'wporg_block_navigation_menus', __NAMESPACE__ . '\add_site_navigation_menus' );

/**
* Enqueue scripts and styles.
Expand Down Expand Up @@ -145,6 +145,98 @@ function update_site_breadcrumbs( $breadcrumbs ) {
return array_reverse( $breadcrumbs );
}

/**
* Provide a list of local navigation menus.
*/
function add_site_navigation_menus( $menus ) {
return array(
'about-details' => array(
array(
'label' => __( 'Domains', 'wporg' ),
'url' => '/about/domains/',
),
array(
'label' => __( 'License', 'wporg' ),
'url' => '/about/license/',
),
array(
'label' => __( 'Accessibility', 'wporg' ),
'url' => '/about/accessibility/',
),
array(
'label' => __( 'Privacy Policy', 'wporg' ),
'url' => '/about/privacy/',
),
array(
'label' => __( 'Statistics', 'wporg' ),
'url' => '/about/stats/',
),
),
'about-technology' => array(
array(
'label' => __( 'Requirements', 'wporg' ),
'url' => '/about/requirements/',
),
array(
'label' => __( 'Features', 'wporg' ),
'url' => '/about/features/',
),
array(
'label' => __( 'Security', 'wporg' ),
'url' => '/about/security/',
),
array(
'label' => __( 'Roadmap', 'wporg' ),
'url' => '/about/roadmap/',
),
array(
'label' => __( 'History', 'wporg' ),
'url' => '/about/history/',
),
),
'about-people' => array(
array(
'label' => __( 'Philosophy', 'wporg' ),
'url' => '/about/philosophy/',
),
array(
'label' => __( 'Etiquette', 'wporg' ),
'url' => '/about/etiquette/',
),
array(
'label' => __( 'Swag', 'wporg' ),
'url' => 'https://mercantile.wordpress.org/',
),
array(
'label' => __( 'Logos', 'wporg' ),
'url' => '/about/logos/',
),
array(
'label' => __( 'People of WordPress', 'wporg' ),
'url' => 'https://wordpress.org/news/category/community/',
),
),
'download' => array(
array(
'label' => __( 'Releases', 'wporg' ),
'url' => '/download/releases/',
),
array(
'label' => __( 'Nightly', 'wporg' ),
'url' => '/download/beta-nightly/',
),
array(
'label' => __( 'Counter', 'wporg' ),
'url' => '/download/counter/',
),
array(
'label' => __( 'Source', 'wporg' ),
'url' => '/download/source/',
),
),
);
}

/**
* Replace the site title & link with the parent page title.
*
Expand Down

This file was deleted.

81 changes: 0 additions & 81 deletions source/wp-content/themes/wporg-main-2022/src/navigation/index.js

This file was deleted.

Loading