WordPress.org

Making WordPress.org

Changeset 9416


Ignore:
Timestamp:
01/23/2020 10:10:30 PM (2 years ago)
Author:
coffee2code
Message:

Handbook plugin: Treat 'welcome' as a valid handbook post type archive landing page.

This has been the convention for some Community handbooks, and is a simpler alternative to some of the already-supported page slug variants.

Props justinahinon, coffee2code.
Fixes #4978.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/handbook.php

    r9410 r9416  
    278278            ||
    279279                'handbook' === $slug
     280            ||
     281                'welcome'  === $slug
    280282            )
    281283        &&
     
    389391                $page = get_page_by_path( 'handbook', OBJECT, $this->post_type );
    390392            }
     393            if ( ! $page ) {
     394                $page = get_page_by_path( 'welcome', OBJECT, $this->post_type );
     395            }
    391396            if ( $page ) {
    392397                $query->set( 'p', $page->ID );
Note: See TracChangeset for help on using the changeset viewer.