WordPress.org

Making WordPress.org

Changeset 6146


Ignore:
Timestamp:
11/17/2017 02:52:08 PM (8 months ago)
Author:
obenland
Message:

Main: Show download buttons for pages with template.

See #2861.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php

    r6100 r6146  
    5353function nav_menu_objects( $menu_items ) {
    5454    foreach ( $menu_items as $menu_item ) {
    55         if ( false !== stripos( $menu_item->url, 'txt-download' ) ) {
     55        if ( false !== stripos( $menu_item->url, 'download/' ) || 'page-templates/download.php' === get_page_template_slug( $menu_item->object_id ) ) {
    5656            $menu_item->classes = array_merge( $menu_item->classes, ['button', 'button-primary', 'download'] );
    5757            $menu_item->title   = _x( 'Download WordPress', 'Menu title', 'wporg' );
Note: See TracChangeset for help on using the changeset viewer.