?Ũ?Ũ@Ũ@Ũ@Ũ@Ũ @Ũ @Ũ0@Ũ0@Ũ@@Ũ@@ŨP@ŨP@Ũ`@Ũ`@Ũp@Ũp@Ũ@Ũ@Ũ@Ũ@Ũ@Ũ@Ũ@Ũ@Ũ@Ũ@Ũ@Ũ@Ũ@Ũ@Ũ@Ũ@ŨAŨAŨAŨAŨ AŨ AŨ0AŨ0AŨ@AŨ@AŨPAŨPAŨ`AŨ`AŨpAŨpAŨAŨAŨAŨAŨAŨAŨAŨAŨAŨAŨAŨAŨAŨAŨAŨAŨBŨBŨBŨBŨ BŨ BŨ0BŨ0BŨ@BŨ@BŨPBŨPBŨ`BŨ`BŨpBŨpBŨBŨBŨBŨBŨBŨBŨBŨBŨBŨBŨBŨBŨBŨBŨBŨBŨCŨCŨCŨCŨ CŨ CŨ0CŨ0CŨ@CŨ@CŨPCŨPCŨ`CŨ`CŨpCŨpCŨCŨCŨCŨCŨCŨCŨCŨCŨCŨCŨCŨCŨCŨCŨCŨCŨDŨDŨ;Ũ򤡨򤡨^ H 8mŨ @=VP=VЖ=V=V=V=V =V=V=V=V =V=Vl*l4l.У=V=VP=V@!=V0=V`!=V=V=VТ=V=V=Vp=VP=VFŨ"FŨXŨ7ŨŨ"9Ũ XŨ8ŨŨFŨFŨ9Ũڋvi+=VB n }Ƣ'jFjFjn JŨ+J$BH|c@=V+̆7L+7Lx =V " ŨpŨŨ娔y h- x- ЮŨoŨŨhŨ  娔8hŨ0Ũ8 o( ooo ooؘŨo+S5=V +1- 瑨󓨔pPз`ᑨğ0ğPq !1x at 8.5.0-28)GA$3a1  GA$3p11130GA*GA$annobin gcc 8.5.0 20210514GA$plugin name: gcc-annobinGA$running gcc 8.5.0 20210514GA*GA*GA! GA*FORTIFYGA+GLIBCXX_ASSERTIONS GA*GOW*GA*cf_protectionGA+omit_frame_pointerGA+stack_clashGA!stack_realign GA*FORTIFY0GA+GLIBCXX_ASSERTIONS8\h(   0  h    p<h- x- - - / 0 0 0`0 p%"1P=pJp- UpWj0 x-  h- 0 J0 *%+4P=JG0 Xb- ox0 0 - <0 0 0 & # ?S?JJo 6P/ZzG_-" L0 *";#dlopen_doitdlclose_doitdlsym_doitdlvsym_doitdlinfo_doitdlmopen_doitinit_arrayderegister_tm_clones__do_global_dtors_auxcompleted.7303__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entry__FRAME_END____dlfcn_argv__dladdr1__dlopen_check_edata__dladdr_fini__dlvsym__dlinfo__dlclose__GI__dlfcn_hook__dlerror__dso_handle__dlopen__dlsym_end__bss_start_DYNAMIC__dlmopen__GNU_EH_FRAME_HDR__TMC_END____dlfcn_argc_GLOBAL_OFFSET_TABLE__dlerror_run_init__asprintf@@GLIBC_2.2.5free@@GLIBC_2.2.5_ITM_deregisterTMCloneTablestrcpy@@GLIBC_2.2.5__stack_chk_fail@@GLIBC_2.4__dcgettext@@GLIBC_2.2.5GLIBC_2.3.4__gmon_start___rtld_global_ro@@GLIBC_PRIVATE_dl_signal_error@@GLIBC_PRIVATE__libc_dlerror_result@@GLIBC_PRIVATEdlopen@@GLIBC_2.2FD A(D0d (D ABBF n(D ABBL -FFD A(D0a (D ABBA u(D ABB` 0-NBB A(A0u (A BBBH A (C BBBF D(A BBBEHH!-IDF r AAI D FAE PFAIH !-zaX(!H.GDMI D(B0IQ F F<!l.PBA D(G0^(F ABBI".4Ar$4".9AED lAA,\"/BAD R CBB L"/FBB B(A0A8Dpj 8D0A(B BBBG "3Eq Z V Z #d4H#p4^BBE B(A0C8GPA 8D0A(B BBBD `#68t#6#68\#6FBA A(D0f (D ABBC f (D ABBA t (G DBBE #7$7h,$7IBD A(D0U(A ABBAH0P (A ABBB D (C ABBD $7&$7$77H d D F$8H$8}FBB B(A0A8DP 8A0A(B BBBK H%L9\%X9 GNU樔樔XC訔稔訔稔R訔稔訔稔訔稔Z訔訔稔訔稔稔訔訔訔i訔稔^訔e訔3訔稔稔稔訔稔K訔稔訔稔訔稔訔;訔稔稔訔訔訔稔訔稔Ď稔稔ǎ稔ʎ稔u訔͎稔Ў稔訔 稔ӎ稔֎稔َ稔܎稔ߎ稔稔稔稔稔稔稔稔稔稔稔稔稔稔 稔 稔稔稔稔稔稔稔!稔$稔'稔*稔-稔0稔3稔6稔訔9稔<稔訔?稔B稔E稔H稔K稔N稔Q稔T稔W稔Z稔訔]稔 訔訔!訔p訔H訔`稔c稔f稔i稔l稔o稔r稔訔u稔訔x稔{稔訔 訔 訔 訔~稔訔訔:訔 訔'訔訔訔稔稔 訔稔稔稔稔稔稔稔稔稔稔稔訔稔稔稔稔稔稔稔稔稔Ï稔Ə稔ɏ稔̏稔Ϗ稔ҏ稔Տ稔؏稔ۏ稔ޏ稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔 稔稔稔稔稔稔稔 稔#稔&稔)稔,稔/稔2稔5稔8稔;稔>稔A稔D稔G稔J稔M稔稔稔P稔S稔V稔Y稔\稔_稔b稔e稔h稔k稔n稔q稔t稔w稔z稔}稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔M訔稔稔Ő稔Ȑ稔ː稔ΐ稔ѐ稔Ԑ稔א稔ڐ稔ݐ稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔 稔 稔稔稔稔稔稔稔"稔%稔(稔+稔.稔1稔4稔7稔:稔=稔訔@稔C稔F稔I稔L稔O稔R稔U稔X稔訔[稔^稔a稔d稔g稔j稔m稔p稔s稔v稔y稔|稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔đ稔Ǒ稔ʑ稔͑稔Б稔ӑ稔֑稔ّ稔ܑ稔ߑ稔稔稔稔稔稔稔稔稔稔稔稔稔稔 稔 稔稔稔$訔稔稔稔訔訔訔 稔f 訔稔!稔$稔'稔*稔-稔0稔3稔6稔9稔<稔?稔B稔E稔H稔K稔N稔Q稔T稔W稔Z稔]稔`稔c稔訔訔訔訔訔訔訔 訔訔訔訔訔$訔)訔.訔3訔8訔=訔B訔f稔i稔訔l稔訔訔o稔)訔訔r稔u稔x稔訔{稔~稔t訔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔稔訔"訔'訔,訔1訔6訔稔Y訔稔稔稔訔Ò稔ƒ稔ɒ稔̒稔訔ϒ稔Ғ稔Ւ稔ؒ稔訔訔訔ے稔@訔ޒ稔稔 訔稔稔稔+訔' 訔A 訔稔稔稔稔稔稔稔稔W 訔\ 訔a 訔f 訔k 訔p 訔u 訔稔樔`樔稔樔@樔[訔d訔訔i訔~訔訔訔訔 訔訔訔訔訔稔訔訔稔訔訔訔稔訔訔/訔?訔N訔e訔v訔訔訔訔訔訔訔訔訔訔*訔6訔L訔`訔m訔~訔訔訔訔訔訔訔訔訔訔訔訔 訔/訔=訔G訔Q訔Z訔a訔h訔q訔y訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔#訔*訔3訔稔稔:訔A訔H訔P訔W訔^訔e訔l訔s訔z訔訔稔稔訔訔訔訔訔訔訔訔訔訔訔訔訔訔*訔4訔A訔J訔R訔^訔l訔z訔訔訔W訔訔訔訔訔訔訔`訔訔訔 訔訔#訔*訔1訔8訔?訔F訔O訔\訔f訔p訔y訔訔訔訔訔訔稔訔訔訔訔訔訔 訔訔訔&訔0訔9訔B訔K訔T訔`訔i訔r訔{訔訔訔訔訔訔訔訔訔訔訔訔訔 訔訔$訔.訔:訔B訔J訔U訔^訔g訔q訔{訔訔訔訔訔訔訔訔訔訔訔訔訔 訔 訔 訔, 訔6 訔D 訔L 訔T 訔\ 訔d 訔l 訔t 訔| 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔$ 訔, 訔4 訔< 訔D 訔L 訔T 訔\ 訔d 訔l 訔t 訔| 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔# 訔0 訔: 訔H 訔U 訔c 訔o 訔v 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔& 訔5 訔D 訔S 訔e 訔w 訔 訔 訔 訔 訔 訔 訔 訔 訔 訔4 訔F 訔[ 訔r 訔 訔 訔 訔 訔 訔 訔 訔 訔訔/訔:訔E訔Q訔c訔l訔z訔訔訔訔訔訔訔訔訔訔,訔@訔P訔c訔r訔訔訔訔訔訔訔訔訔訔訔訔)訔3訔?訔M訔Z訔g訔t訔訔訔訔訔訔訔訔訔訔"訔2訔B訔X訔m訔訔訔訔訔訔訔訔訔訔)訔@訔Q訔`訔n訔|訔訔訔訔訔訔訔訔訔訔訔訔!訔+訔5訔>訔J訔X訔B訔d訔訔h訔訔K訔e訔訔s訔l訔訔訔訔r訔m訔x訔~訔訔訔訔訔訔訔訔稔訔訔訔訔訔訔訔訔訔訔6訔訔訔訔訔訔訔!訔訔訔訔稔訔訔訔訔Ў稔b訔h訔ӎ稔訔訔訔 訔訔訔訔 訔&訔*訔.訔2訔6訔;訔?訔C訔G訔K訔O訔S訔W訔[訔a訔g訔l訔r訔v訔z訔~訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔Y訔訔訔e訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔S訔訔訔訔~稔訔訔:訔>訔訔訔 訔 訔訔訔稔稔訔訔訔#訔'訔+訔/訔4訔8訔=訔A訔F訔L訔R訔W訔\訔a訔g訔m訔r訔w訔|訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔 訔訔訔訔 訔$訔)訔.訔3訔8訔=訔B訔G訔K訔P訔U訔Z訔_訔d訔i訔n訔s訔x訔}訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔 訔訔訔訔!訔&訔+訔0訔5訔:訔?訔D訔I訔N訔S訔X訔]訔b訔g訔l訔q訔v訔{訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔 訔訔 訔 訔 訔 訔訔=稔訔@稔C稔F稔I稔L稔O稔R稔U稔X稔訔訔訔訔訔訔訔訔訔訔訔 訔訔訔訔"訔(訔-訔3訔8訔>訔D訔H訔N訔S訔W訔]訔b訔h訔n訔r訔w訔}訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔 稔 訔訔訔訔"訔'訔,訔1訔6訔;訔@訔E訔K訔Q訔W訔]訔b訔j訔p訔v訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔 訔訔訔訔訔"訔'訔,訔1訔6訔;訔@訔E訔J訔R訔訔\訔l訔訔訔訔訔訔訔訔訔訔訔 訔訔,訔=訔N訔`訔o訔~訔訔訔訔訔訔訔訔訔 訔訔,訔C訔Y訔h訔x訔訔訔訔訔訔訔o稔)訔訔訔u稔x稔訔訔 訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔訔 訔訔訔 訔%訔*訔/訔4訔9訔6訔J訔V訔k訔~訔訔訔訔訔訔訔訔訔訔訔訔&訔;訔H訔d訔^訔m訔y訔訔訔訔訔訔訔訔訔訔!訔1訔H訔X訔h訔{訔訔訔訔訔訔稔Y訔訔訔訔訔Ò稔ƒ稔ɒ稔̒稔訔ϒ稔Ғ稔"訔訔訔 訔訔ے稔@訔N訔 訔 訔 訔 訔 訔 訔& 訔* 訔. 訔2 訔7 訔< 訔B 訔G 訔K 訔P 訔U 訔Z 訔_ 訔d 訔i 訔n 訔s 訔Uw x lp"x"o`娔娔X娔 ؖ樔 樔 oo6ood樔o"樔=V稔0`稔瑨 稔樔@樔樔ڋ``稔󓨔pW稔樔樔稔@樔 稔00p樔 c稔樔`=V}稔稔Y稔 稔d稔@樔 稔p樔樔 稔@樔[稔b稔P 稔p樔p樔pm@铨@樔稔樔b稔`"v稔稔P&稔 a稔樔Ɠp稔`|稔‹p!稔樔 ^稔樔 @樔0樔樔P`樔0樔P稔ۍ`a稔`樔_稔  p稔樔 0樔P樔`ᑨp稔 c稔樔稔樔`稔樔P樔pꑨZ稔p`X稔h樔g稔X@樔@樔@樔稔`kip樔f稔p樔 樔`稔樔樔p樔稔稔`8樔P 樔 稔j稔z稔樔!樔W稔~稔p樔 稔樔0 稔1`稔`稔@稔У樔p樔0򜨔<X5=Vȗ`Y稔ЗP5=V W稔D 稔L05=V0W稔H 816=V 6=V{OTg:o[PoiT:J"]\Qs|_~ZS'y.:xh IQ6ǔ^Ȏ(`V7o%cO-c)ϦRt ~*5LhE <ಷd7jD5<l6/@y;uvI.Qj  Ɣ `ۓPTLG񇩭YݏũU] 5s4{ЌrĘ05N\Jəq:O%/g=sBIYC+x!}Y%_Ч͎ڜP;s7q AtBR )/kp(֫, ?G3H)6p9wD}Rid{KǬ͎ٝxn̮ VyNK$|7_ rzs/OP7ŧ$=Y!<P{ AU& =-a Sk%}[σ"?p/hmAh#өýÙU7/cG):uq #wKۂK kPR? WiD E`$XQa0w1K9r0Ox!ߨׁW\7h0>~ɠt-UDŨl4l.l*yŨ=V;Ũ@**@*e>[= ;Z "; } $rules .= "\n"; /** * Filters the list of rewrite rules formatted for output to an .htaccess file. * * @since 1.5.0 * * @param string $rules mod_rewrite Rewrite rules formatted for .htaccess. */ $rules = apply_filters( 'mod_rewrite_rules', $rules ); /** * Filters the list of rewrite rules formatted for output to an .htaccess file. * * @since 1.5.0 * @deprecated 1.5.0 Use the {@see 'mod_rewrite_rules'} filter instead. * * @param string $rules mod_rewrite Rewrite rules formatted for .htaccess. */ return apply_filters_deprecated( 'rewrite_rules', array( $rules ), '1.5.0', 'mod_rewrite_rules' ); } /** * Retrieves IIS7 URL Rewrite formatted rewrite rules to write to web.config file. * * Does not actually write to the web.config file, but creates the rules for * the process that will. * * @since 2.8.0 * * @param bool $add_parent_tags Optional. Whether to add parent tags to the rewrite rule sets. * Default false. * @return string IIS7 URL rewrite rule sets. */ public function iis7_url_rewrite_rules( $add_parent_tags = false ) { if ( ! $this->using_permalinks() ) { return ''; } $rules = ''; if ( $add_parent_tags ) { $rules .= ' '; } $rules .= ' '; if ( $add_parent_tags ) { $rules .= ' '; } /** * Filters the list of rewrite rules formatted for output to a web.config. * * @since 2.8.0 * * @param string $rules Rewrite rules formatted for IIS web.config. */ return apply_filters( 'iis7_url_rewrite_rules', $rules ); } /** * Adds a rewrite rule that transforms a URL structure to a set of query vars. * * Any value in the $after parameter that isn't 'bottom' will result in the rule * being placed at the top of the rewrite rules. * * @since 2.1.0 * @since 4.4.0 Array support was added to the `$query` parameter. * * @param string $regex Regular expression to match request against. * @param string|array $query The corresponding query vars for this rewrite rule. * @param string $after Optional. Priority of the new rule. Accepts 'top' * or 'bottom'. Default 'bottom'. */ public function add_rule( $regex, $query, $after = 'bottom' ) { if ( is_array( $query ) ) { $external = false; $query = add_query_arg( $query, 'index.php' ); } else { $index = ! str_contains( $query, '?' ) ? strlen( $query ) : strpos( $query, '?' ); $front = substr( $query, 0, $index ); $external = $front !== $this->index; } // "external" = it doesn't correspond to index.php. if ( $external ) { $this->add_external_rule( $regex, $query ); } else { if ( 'bottom' === $after ) { $this->extra_rules = array_merge( $this->extra_rules, array( $regex => $query ) ); } else { $this->extra_rules_top = array_merge( $this->extra_rules_top, array( $regex => $query ) ); } } } /** * Adds a rewrite rule that doesn't correspond to index.php. * * @since 2.1.0 * * @param string $regex Regular expression to match request against. * @param string $query The corresponding query vars for this rewrite rule. */ public function add_external_rule( $regex, $query ) { $this->non_wp_rules[ $regex ] = $query; } /** * Adds an endpoint, like /trackback/. * * @since 2.1.0 * @since 3.9.0 $query_var parameter added. * @since 4.3.0 Added support for skipping query var registration by passing `false` to `$query_var`. * * @see add_rewrite_endpoint() for full documentation. * @global WP $wp Current WordPress environment instance. * * @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`. */ public function add_endpoint( $name, $places, $query_var = true ) { global $wp; // For backward compatibility, if null has explicitly been passed as `$query_var`, assume `true`. if ( true === $query_var || null === $query_var ) { $query_var = $name; } $this->endpoints[] = array( $places, $name, $query_var ); if ( $query_var ) { $wp->add_query_var( $query_var ); } } /** * Adds a new permalink structure. * * A permalink structure (permastruct) is an abstract definition of a set of rewrite rules; * it is an easy way of expressing a set of regular expressions that rewrite to a set of * query strings. The new permastruct is added to the WP_Rewrite::$extra_permastructs array. * * When the rewrite rules are built by WP_Rewrite::rewrite_rules(), all of these extra * permastructs are passed to WP_Rewrite::generate_rewrite_rules() which transforms them * into the regular expressions that many love to hate. * * The `$args` parameter gives you control over how WP_Rewrite::generate_rewrite_rules() * works on the new permastruct. * * @since 2.5.0 * * @param string $name Name for permalink structure. * @param string $struct Permalink structure (e.g. category/%category%) * @param array $args { * Optional. Arguments for building rewrite rules based on the permalink structure. * Default empty array. * * @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 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. * @type bool $feed Whether feed rewrite rules should be added for the structure. Default true. * @type bool $forcomments Whether the feed rules should be a query for a comments feed. Default false. * @type bool $walk_dirs Whether the 'directories' making up the structure should be walked over * and rewrite rules built for each in-turn. Default true. * @type bool $endpoints Whether endpoints should be applied to the generated rules. Default true. * } */ public function add_permastruct( $name, $struct, $args = array() ) { // Back-compat for the old parameters: $with_front and $ep_mask. if ( ! is_array( $args ) ) { $args = array( 'with_front' => $args ); } if ( func_num_args() === 4 ) { $args['ep_mask'] = func_get_arg( 3 ); } $defaults = array( 'with_front' => true, 'ep_mask' => EP_NONE, 'paged' => true, 'feed' => true, 'forcomments' => false, 'walk_dirs' => true, 'endpoints' => true, ); $args = array_intersect_key( $args, $defaults ); $args = wp_parse_args( $args, $defaults ); if ( $args['with_front'] ) { $struct = $this->front . $struct; } else { $struct = $this->root . $struct; } $args['struct'] = $struct; $this->extra_permastructs[ $name ] = $args; } /** * Removes a permalink structure. * * @since 4.5.0 * * @param string $name Name for permalink structure. */ public function remove_permastruct( $name ) { unset( $this->extra_permastructs[ $name ] ); } /** * Removes rewrite rules and then recreate rewrite rules. * * Calls WP_Rewrite::wp_rewrite_rules() after removing the 'rewrite_rules' option. * If the function named 'save_mod_rewrite_rules' exists, it will be called. * * @since 2.0.1 * * @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard). */ public function flush_rules( $hard = true ) { static $do_hard_later = null; // Prevent this action from running before everyone has registered their rewrites. if ( ! did_action( 'wp_loaded' ) ) { add_action( 'wp_loaded', array( $this, 'flush_rules' ) ); $do_hard_later = ( isset( $do_hard_later ) ) ? $do_hard_later || $hard : $hard; return; } if ( isset( $do_hard_later ) ) { $hard = $do_hard_later; unset( $do_hard_later ); } $this->refresh_rewrite_rules(); /** * Filters whether a "hard" rewrite rule flush should be performed when requested. * * A "hard" flush updates .htaccess (Apache) or web.config (IIS). * * @since 3.7.0 * * @param bool $hard Whether to flush rewrite rules "hard". Default true. */ if ( ! $hard || ! apply_filters( 'flush_rewrite_rules_hard', true ) ) { return; } if ( function_exists( 'save_mod_rewrite_rules' ) ) { save_mod_rewrite_rules(); } if ( function_exists( 'iis7_save_url_rewrite_rules' ) ) { iis7_save_url_rewrite_rules(); } } /** * Sets up the object's properties. * * The 'use_verbose_page_rules' object property will be set to true if the * permalink structure begins with one of the following: '%postname%', '%category%', * '%tag%', or '%author%'. * * @since 1.5.0 */ public function init() { $this->extra_rules = array(); $this->non_wp_rules = array(); $this->endpoints = array(); $this->permalink_structure = get_option( 'permalink_structure' ); $this->front = substr( $this->permalink_structure, 0, strpos( $this->permalink_structure, '%' ) ); $this->root = ''; if ( $this->using_index_permalinks() ) { $this->root = $this->index . '/'; } unset( $this->author_structure ); unset( $this->date_structure ); unset( $this->page_structure ); unset( $this->search_structure ); unset( $this->feed_structure ); unset( $this->comment_feed_structure ); $this->use_trailing_slashes = str_ends_with( $this->permalink_structure, '/' ); // Enable generic rules for pages if permalink structure doesn't begin with a wildcard. if ( preg_match( '/^[^%]*%(?:postname|category|tag|author)%/', $this->permalink_structure ) ) { $this->use_verbose_page_rules = true; } else { $this->use_verbose_page_rules = false; } } /** * Sets the main permalink structure for the site. * * Will update the 'permalink_structure' option, if there is a difference * between the current permalink structure and the parameter value. Calls * WP_Rewrite::init() after the option is updated. * * Fires the {@see 'permalink_structure_changed'} action once the init call has * processed passing the old and new values * * @since 1.5.0 * * @param string $permalink_structure Permalink structure. */ public function set_permalink_structure( $permalink_structure ) { if ( $this->permalink_structure !== $permalink_structure ) { $old_permalink_structure = $this->permalink_structure; update_option( 'permalink_structure', $permalink_structure ); $this->init(); /** * Fires after the permalink structure is updated. * * @since 2.8.0 * * @param string $old_permalink_structure The previous permalink structure. * @param string $permalink_structure The new permalink structure. */ do_action( 'permalink_structure_changed', $old_permalink_structure, $permalink_structure ); } } /** * Sets the category base for the category permalink. * * Will update the 'category_base' option, if there is a difference between * the current category base and the parameter value. Calls WP_Rewrite::init() * after the option is updated. * * @since 1.5.0 * * @param string $category_base Category permalink structure base. */ public function set_category_base( $category_base ) { if ( get_option( 'category_base' ) !== $category_base ) { update_option( 'category_base', $category_base ); $this->init(); } } /** * Sets the tag base for the tag permalink. * * Will update the 'tag_base' option, if there is a difference between the * current tag base and the parameter value. Calls WP_Rewrite::init() after * the option is updated. * * @since 2.3.0 * * @param string $tag_base Tag permalink structure base. */ public function set_tag_base( $tag_base ) { if ( get_option( 'tag_base' ) !== $tag_base ) { update_option( 'tag_base', $tag_base ); $this->init(); } } /** * Constructor - Calls init(), which runs setup. * * @since 1.5.0 */ public function __construct() { $this->init(); } }