WordPress.org

Make WordPress Core

Ticket #15324: page_base.diff

File page_base.diff, 778 bytes (added by nkuttler, 8 years ago)

First patch

  • wp-includes/rewrite.php

    diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php
    index 6a91292..874e43a 100644
    a b class WP_Rewrite { 
    462462        var $feed_base = 'feed';
    463463
    464464        /**
     465         * Page permalink base ( example.com/%pagename% ).
     466         *
     467         * @since 3.1.1
     468         * @access private
     469         * @var string
     470         */
     471        var $page_base = '';
     472
     473        /**
    465474         * Comments feed request structure permalink.
    466475         *
    467476         * @since 1.5.0
    class WP_Rewrite { 
    10981107                        return false;
    10991108                }
    11001109
    1101                 $this->page_structure = $this->root . '%pagename%';
     1110                if ( $this->page_base )
     1111                        $this->page_structure = $this->root . $this->page_base . '/%pagename%';
     1112                else
     1113                        $this->page_structure = $this->root . '%pagename%';
    11021114
    11031115                return $this->page_structure;
    11041116        }