Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentynineteen/inc/template-functions.php

    r46827 r47122  
    239239function twentynineteen_nav_menu_link_attributes( $atts, $item, $args, $depth ) {
    240240
    241     // Add [aria-haspopup] and [aria-expanded] to menu items that have children
     241    // Add [aria-haspopup] and [aria-expanded] to menu items that have children.
    242242    $item_has_children = in_array( 'menu-item-has-children', $item->classes );
    243243    if ( $item_has_children ) {
     
    275275        );
    276276
    277         // replace opening <a> with <button>
     277        // Replace opening <a> with <button>.
    278278        $output = preg_replace(
    279279            '/<a\s.*?>/',
     
    283283        );
    284284
    285         // replace closing </a> with </button>
     285        // Replace closing </a> with </button>.
    286286        $output = preg_replace(
    287287            '#</a>#i',
Note: See TracChangeset for help on using the changeset viewer.