--- a/wp/wp-includes/class-wp-rewrite.php Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/class-wp-rewrite.php Wed Sep 21 18:19:35 2022 +0200
@@ -45,7 +45,7 @@
* @since 1.5.0
* @var string
*/
- var $author_base = 'author';
+ public $author_base = 'author';
/**
* Permalink structure for author archives.
@@ -53,7 +53,7 @@
* @since 1.5.0
* @var string
*/
- var $author_structure;
+ public $author_structure;
/**
* Permalink structure for date archives.
@@ -61,7 +61,7 @@
* @since 1.5.0
* @var string
*/
- var $date_structure;
+ public $date_structure;
/**
* Permalink structure for pages.
@@ -69,7 +69,7 @@
* @since 1.5.0
* @var string
*/
- var $page_structure;
+ public $page_structure;
/**
* Base of the search permalink structure (example.com/$search_base/query).
@@ -77,7 +77,7 @@
* @since 1.5.0
* @var string
*/
- var $search_base = 'search';
+ public $search_base = 'search';
/**
* Permalink structure for searches.
@@ -85,7 +85,7 @@
* @since 1.5.0
* @var string
*/
- var $search_structure;
+ public $search_structure;
/**
* Comments permalink base.
@@ -93,7 +93,7 @@
* @since 1.5.0
* @var string
*/
- var $comments_base = 'comments';
+ public $comments_base = 'comments';
/**
* Pagination permalink base.
@@ -109,7 +109,7 @@
* @since 4.2.0
* @var string
*/
- var $comments_pagination_base = 'comment-page';
+ public $comments_pagination_base = 'comment-page';
/**
* Feed permalink base.
@@ -117,7 +117,7 @@
* @since 1.5.0
* @var string
*/
- var $feed_base = 'feed';
+ public $feed_base = 'feed';
/**
* Comments feed permalink structure.
@@ -125,7 +125,7 @@
* @since 1.5.0
* @var string
*/
- var $comment_feed_structure;
+ public $comment_feed_structure;
/**
* Feed request permalink structure.
@@ -133,7 +133,7 @@
* @since 1.5.0
* @var string
*/
- var $feed_structure;
+ public $feed_structure;
/**
* The static portion of the post permalink structure.
@@ -178,7 +178,7 @@
* @since 1.5.0
* @var string
*/
- var $matches = '';
+ public $matches = '';
/**
* Rewrite rules to match against the request to find the redirect or query.
@@ -186,7 +186,7 @@
* @since 1.5.0
* @var array
*/
- var $rules;
+ public $rules;
/**
* Additional rules added external to the rewrite class.
@@ -196,7 +196,7 @@
* @since 2.1.0
* @var array
*/
- var $extra_rules = array();
+ public $extra_rules = array();
/**
* Additional rules that belong at the beginning to match first.
@@ -206,7 +206,7 @@
* @since 2.3.0
* @var array
*/
- var $extra_rules_top = array();
+ public $extra_rules_top = array();
/**
* Rules that don't redirect to WordPress' index.php.
@@ -217,7 +217,7 @@
* @since 2.1.0
* @var array
*/
- var $non_wp_rules = array();
+ public $non_wp_rules = array();
/**
* Extra permalink structures, e.g. categories, added by add_permastruct().
@@ -225,7 +225,7 @@
* @since 2.1.0
* @var array
*/
- var $extra_permastructs = array();
+ public $extra_permastructs = array();
/**
* Endpoints (like /trackback/) added by add_rewrite_endpoint().
@@ -233,7 +233,7 @@
* @since 2.1.0
* @var array
*/
- var $endpoints;
+ public $endpoints;
/**
* Whether to write every mod_rewrite rule for WordPress into the .htaccess file.
@@ -277,7 +277,7 @@
* @since 1.5.0
* @var array
*/
- var $rewritecode = array(
+ public $rewritecode = array(
'%year%',
'%monthnum%',
'%day%',
@@ -298,7 +298,7 @@
* @since 1.5.0
* @var array
*/
- var $rewritereplace = array(
+ public $rewritereplace = array(
'([0-9]{4})',
'([0-9]{1,2})',
'([0-9]{1,2})',
@@ -318,7 +318,7 @@
* @since 1.5.0
* @var array
*/
- var $queryreplace = array(
+ public $queryreplace = array(
'year=',
'monthnum=',
'day=',
@@ -840,9 +840,23 @@
*
* @param string $permalink_structure The permalink structure.
* @param int $ep_mask Optional. Endpoint mask defining what endpoints are added to the structure.
- * Accepts `EP_NONE`, `EP_PERMALINK`, `EP_ATTACHMENT`, `EP_DATE`, `EP_YEAR`,
- * `EP_MONTH`, `EP_DAY`, `EP_ROOT`, `EP_COMMENTS`, `EP_SEARCH`, `EP_CATEGORIES`,
- * `EP_TAGS`, `EP_AUTHORS`, `EP_PAGES`, `EP_ALL_ARCHIVES`, and `EP_ALL`.
+ * Accepts a mask of:
+ * - `EP_ALL`
+ * - `EP_NONE`
+ * - `EP_ALL_ARCHIVES`
+ * - `EP_ATTACHMENT`
+ * - `EP_AUTHORS`
+ * - `EP_CATEGORIES`
+ * - `EP_COMMENTS`
+ * - `EP_DATE`
+ * - `EP_DAY`
+ * - `EP_MONTH`
+ * - `EP_PAGES`
+ * - `EP_PERMALINK`
+ * - `EP_ROOT`
+ * - `EP_SEARCH`
+ * - `EP_TAGS`
+ * - `EP_YEAR`
* Default `EP_NONE`.
* @param bool $paged Optional. Whether archive pagination rules should be added for the structure.
* Default true.
@@ -1509,6 +1523,7 @@
$rules = "<IfModule mod_rewrite.c>\n";
$rules .= "RewriteEngine On\n";
+ $rules .= "RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n";
$rules .= "RewriteBase $home_root\n";
// Prevent -f checks on index.php.
@@ -1681,6 +1696,23 @@
*
* @param string $name Name of the endpoint.
* @param int $places Endpoint mask describing the places the endpoint should be added.
+ * Accepts a mask of:
+ * - `EP_ALL`
+ * - `EP_NONE`
+ * - `EP_ALL_ARCHIVES`
+ * - `EP_ATTACHMENT`
+ * - `EP_AUTHORS`
+ * - `EP_CATEGORIES`
+ * - `EP_COMMENTS`
+ * - `EP_DATE`
+ * - `EP_DAY`
+ * - `EP_MONTH`
+ * - `EP_PAGES`
+ * - `EP_PERMALINK`
+ * - `EP_ROOT`
+ * - `EP_SEARCH`
+ * - `EP_TAGS`
+ * - `EP_YEAR`
* @param string|bool $query_var Optional. Name of the corresponding query variable. Pass `false` to
* skip registering a query_var for this endpoint. Defaults to the
* value of `$name`.
@@ -1724,9 +1756,23 @@
* @type bool $with_front Whether the structure should be prepended with `WP_Rewrite::$front`.
* Default true.
* @type int $ep_mask The endpoint mask defining which endpoints are added to the structure.
- * Accepts `EP_NONE`, `EP_PERMALINK`, `EP_ATTACHMENT`, `EP_DATE`, `EP_YEAR`,
- * `EP_MONTH`, `EP_DAY`, `EP_ROOT`, `EP_COMMENTS`, `EP_SEARCH`, `EP_CATEGORIES`,
- * `EP_TAGS`, `EP_AUTHORS`, `EP_PAGES`, `EP_ALL_ARCHIVES`, and `EP_ALL`.
+ * Accepts a mask of:
+ * - `EP_ALL`
+ * - `EP_NONE`
+ * - `EP_ALL_ARCHIVES`
+ * - `EP_ATTACHMENT`
+ * - `EP_AUTHORS`
+ * - `EP_CATEGORIES`
+ * - `EP_COMMENTS`
+ * - `EP_DATE`
+ * - `EP_DAY`
+ * - `EP_MONTH`
+ * - `EP_PAGES`
+ * - `EP_PERMALINK`
+ * - `EP_ROOT`
+ * - `EP_SEARCH`
+ * - `EP_TAGS`
+ * - `EP_YEAR`
* Default `EP_NONE`.
* @type bool $paged Whether archive pagination rules should be added for the structure.
* Default true.