* Adding an endpoint creates extra rewrite rules for each of the matching
* places specified by the provided bitmask. For example:
*
- * <code>
- * add_rewrite_endpoint( 'json', EP_PERMALINK | EP_PAGES );
- * </code>
+ * add_rewrite_endpoint( 'json', EP_PERMALINK | EP_PAGES );
*
* will add a new rewrite rule ending with "json(/(.*))?/?$" for every permastruct
* that describes a permalink (post) or page. This is rewritten to "json=$match"
* where $match is the part of the URL matched by the endpoint regex (e.g. "foo" in
- * "<permalink>/json/foo/").
+ * "[permalink]/json/foo/").
*
* A new query var with the same name as the endpoint will also be created.
*
* When specifying $places ensure that you are using the EP_* constants (or a
* combination of them using the bitwise OR operator) as their values are not
- * guaranteed to remain static (especially EP_ALL).
+ * guaranteed to remain static (especially `EP_ALL`).
*
- * Be sure to flush the rewrite rules - flush_rewrite_rules() - when your plugin gets
+ * Be sure to flush the rewrite rules - {@see flush_rewrite_rules()} - when your plugin gets
* activated and deactivated.
*
* @since 2.1.0
if ( preg_match("#^$match#", $request_match, $matches) ) {
if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) {
- // this is a verbose page match, lets check to be sure about it
+ // This is a verbose page match, let's check to be sure about it.
if ( ! get_page_by_path( $matches[ $varmatch[1] ] ) )
continue;
}
* Now it tells {@link WP::parse_request()} to check if a URL matching the
* page permastruct is actually a page before accepting it.
*
- * @link http://core.trac.wordpress.org/ticket/16687
+ * @link https://core.trac.wordpress.org/ticket/16687
* @see WP_Rewrite::init()
* @since 2.5.0
* @access public
* @since 1.5.0
* @access public
*
- * @return bool|string False on no permalink structure. Date permalink structure.
+ * @return string|false False on no permalink structure. Date permalink structure.
*/
public function get_date_permastruct() {
if ( isset($this->date_structure) )
* @since 1.5.0
* @access public
*
- * @return bool|string False on failure. Year structure on success.
+ * @return false|string False on failure. Year structure on success.
*/
public function get_year_permastruct() {
$structure = $this->get_date_permastruct();
* @since 1.5.0
* @access public
*
- * @return bool|string False on failure. Year/Month structure on success.
+ * @return false|string False on failure. Year/Month structure on success.
*/
public function get_month_permastruct() {
$structure = $this->get_date_permastruct();
* @since 1.5.0
* @access public
*
- * @return bool|string False on failure. Year/Month/Day structure on success.
+ * @return string|false False on failure. Year/Month/Day structure on success.
*/
public function get_day_permastruct() {
return $this->get_date_permastruct();
* @since 1.5.0
* @access public
*
- * @return string|bool False if not found. Permalink structure string.
+ * @return string|false False if not found. Permalink structure string.
*/
public function get_author_permastruct() {
if ( isset($this->author_structure) )
* @since 1.5.0
* @access public
*
- * @return string|bool False if not found. Permalink structure string.
+ * @return string|false False if not found. Permalink structure string.
*/
public function get_search_permastruct() {
if ( isset($this->search_structure) )
* @since 1.5.0
* @access public
*
- * @return string|bool False if not found. Permalink structure string.
+ * @return string|false False if not found. Permalink structure string.
*/
public function get_page_permastruct() {
if ( isset($this->page_structure) )
* @since 1.5.0
* @access public
*
- * @return string|bool False if not found. Permalink structure string.
+ * @return string|false False if not found. Permalink structure string.
*/
public function get_feed_permastruct() {
if ( isset($this->feed_structure) )
/**
* Filter rewrite rules used for individual permastructs.
*
- * The dynamic portion of the hook name, $permastructname, refers
+ * The dynamic portion of the hook name, `$permastructname`, refers
* to the name of the registered permastruct, e.g. 'post_tag' (tags),
* 'category' (categories), etc.
*