þÙnÔþÙnÔ(}ÚnÔhÚnÔpÚnÔ)#}ÚnÔ*þÙnÔ*þÙnÔ*+}ÚnÔ>þÙnÔ>þÙnÔ+3}ÚnÔUþÙnÔUþÙnÔ,;}ÚnÔkþÙnÔkþÙnÔ-C}ÚnÔ‚þÙnÔ‚þÙnÔ.K}ÚnÔ˜þÙnÔ˜þÙnÔ/S}ÚnÔ©þÙnÔ©þÙnÔ0[}ÚnÔ¿þÙnÔ¿þÙnÔ1c}ÚnÔÙþÙnÔÙþÙnÔ2k}ÚnÔôþÙnÔôþÙnÔ3s}ÚnÔ ÿÙnÔ ÿÙnÔ4{}ÚnÔ ÿÙnÔ ÿÙnÔ5ƒ}ÚnÔ4ÿÙnÔ4ÿÙnÔ6‹}ÚnÔJÿÙnÔJÿÙnÔ7“}ÚnÔ`ÿÙnÔ`ÿÙnÔ8›}ÚnÔuÿÙnÔuÿÙnÔ9£}ÚnÔ€ÿÙnÔ€ÿÙnÔ:«}ÚnÔ‹ÿÙnÔ‹ÿÙnÔ; ³}ÚnÔŸÿÙnÔŸÿÙnÔ< ¼}ÚnÔ¸ÿÙnÔ¸ÿÙnÔ= Å}ÚnÔÖÿÙnÔÖÿÙnÔ> Î}ÚnÔóÿÙnÔóÿÙnÔ? ×}ÚnÔÚnÔÚnÔ@ à}ÚnÔ#ÚnÔ#ÚnÔA é}ÚnÔ8ÚnÔ8ÚnÔB ò}ÚnÔKÚnÔKÚnÔCû}ÚnÔXÚnÔXÚnÔD~ÚnÔkÚnÔkÚnÔE ~ÚnÔƒÚnÔƒÚnÔF~ÚnÔ‘ÚnÔ‘ÚnÔG~ÚnÔ£ÚnÔ£ÚnÔH#~ÚnÔ¹ÚnÔ¹ÚnÔI+~ÚnÔÎÚnÔÎÚnÔJ3~ÚnÔàÚnÔàÚnÔK;~ÚnÔõÚnÔõÚnÔLC~ÚnÔÚnÔÚnÔMK~ÚnÔÚnÔÚnÔNS~ÚnÔ3ÚnÔ3ÚnÔO[~ÚnÔGÚnÔGÚnÔPc~ÚnÔ[ÚnÔ[ÚnÔQk~ÚnÔpÚnÔpÚnÔRs~ÚnÔÚnÔÚnÔS{~ÚnÔÚnÔÚnÔTƒ~ÚnÔ¢ÚnÔ¢ÚnÔU‹~ÚnÔ±ÚnÔ±ÚnÔV“~ÚnÔÅÚnÔÅÚnÔW›~ÚnÔÙÚnÔÙÚnÔX£~ÚnÔîÚnÔîÚnÔY«~ÚnÔÚnÔÚnÔZ³~ÚnÔ!ÚnÔ!ÚnÔ[»~ÚnÔ4ÚnÔ4ÚnÔ\Ã~ÚnÔGÚnÔGÚnÔ]Ë~ÚnÔ[ÚnÔ[ÚnÔ_Ó~ÚnÔiÚnÔiÚnÔ`Û~ÚnÔ…ÚnÔ…ÚnÔaã~ÚnÔŸÚnÔŸÚnÔbë~ÚnÔ¹ÚnÔ¹ÚnÔcó~ÚnÔÏÚnÔÏÚnÔdû~ÚnÔçÚnÔçÚnÔeÚnÔôÚnÔôÚnÔf ÚnÔÚnÔÚnÔgÚnÔÚnÔÚnÔhÚnÔ"ÚnÔ"ÚnÔi#ÚnÔ1ÚnÔ1ÚnÔj+ÚnÔDÚnÔTÚnÔk3ÚnÔeÚnÔmÚnÔl;ÚnÔuÚnÔ‡ÚnÔm CÚnÔ ÚnÔ›ÚnÔn LÚnÔ¦ÚnÔ¬ÚnÔo UÚnÔ¸ÚnÔÌÚnÔp ^ÚnÔæÚnÔîÚnÔq gÚnÔüÚnÔ ÚnÔr pÚnÔÚnÔ-ÚnÔs yÚnÔBÚnÔQÚnÔt ‚ÚnÔ (ÛnÔ (ÛnÔu ‹ÚnÔô¯ÙnÔô¯ÙnÔv ”ÚnÔfÚnÔpÚnÔw ÚnÔU¯ÙnÔU¯ÙnÔx¦ÚnÔ{ÚnÔ{ÚnÔyªÚnÔˆÚnÔ—ÚnÔz¯ÚnÔ—ÚnÔa8ÛnÔ{±ÚnÔ›ÚnÔŸÚnÔ|²ÚnÔ£ÚnÔ¨ÚnÔ}´ÚnÔÛnÔ­ÚnÔ~·ÚnÔ·ÚnÔ¼ÚnÔ»ÚnÔÇÚnÔÔÚnÔ€¿ÚnÔÛnÔáÚnÔÃÚnÔéÚnÔòÚnÔ‚ÇÚnÔûÚnÔÚnÔƒËÚnÔ ÚnÔ ÚnÔ„ÏÚnÔÚnÔÚnÔ…ÓÚnÔ&ÚnÔ/ÚnÔ† ØÚnÔU3ÚnÔ8ÚnÔ‡ áÚnÔHÚnÔ’ ÚnÔˆ ëÚnÔæÛnÔæÛnÔ‰OÚnÔhÚnÔŠõÚnÔÚnÔÚnÔ‹øÚnÔ‹ÚnÔ“ÚnÔŒ üÚnÔ¨ÚnÔ¨ÚnÔ€ÚnÔ´ÚnÔÆÚnÔa = new WPSEO_Sitemap_Cache_Data(); $sitemap_data->set_sitemap( $sitemap ); $sitemap_data->set_status( $status ); return set_transient( $transient_key, $sitemap_data, DAY_IN_SECONDS ); } /** * Delete cache transients for index and specific type. * * Always deletes the main index sitemaps cache, as that's always invalidated by any other change. * * @since 1.5.4 * @since 3.2 Changed from function wpseo_invalidate_sitemap_cache() to method in this class. * * @param string $type Sitemap type to invalidate. * * @return void */ public static function invalidate( $type ) { self::clear( [ $type ] ); } /** * Helper to invalidate in hooks where type is passed as second argument. * * @since 3.2 * * @param int $unused Unused term ID value. * @param string $type Taxonomy to invalidate. * * @return void */ public static function invalidate_helper( $unused, $type ) { if ( WPSEO_Options::get( 'noindex-' . $type ) === false || WPSEO_Options::get( 'noindex-tax-' . $type ) === false ) { self::invalidate( $type ); } } /** * Invalidate sitemap cache for authors. * * @param int $user_id User ID. * * @return bool True if the sitemap was properly invalidated. False otherwise. */ public static function invalidate_author( $user_id ) { $user = get_user_by( 'id', $user_id ); if ( $user === false ) { return false; } if ( current_action() === 'user_register' ) { update_user_meta( $user_id, '_yoast_wpseo_profile_updated', time() ); } if ( empty( $user->roles ) || in_array( 'subscriber', $user->roles, true ) ) { return false; } self::invalidate( 'author' ); return true; } /** * Invalidate sitemap cache for the post type of a post. * * Don't invalidate for revisions. * * @since 1.5.4 * @since 3.2 Changed from function wpseo_invalidate_sitemap_cache_on_save_post() to method in this class. * * @param int $post_id Post ID to invalidate type for. * * @return void */ public static function invalidate_post( $post_id ) { if ( wp_is_post_revision( $post_id ) ) { return; } self::invalidate( get_post_type( $post_id ) ); } /** * Delete cache transients for given sitemaps types or all by default. * * @since 1.8.0 * @since 3.2 Moved from WPSEO_Utils to this class. * * @param array $types Set of sitemap types to delete cache transients for. * * @return void */ public static function clear( $types = [] ) { if ( ! self::$is_enabled ) { return; } // No types provided, clear all. if ( empty( $types ) ) { self::$clear_all = true; return; } // Always invalidate the index sitemap as well. if ( ! in_array( WPSEO_Sitemaps::SITEMAP_INDEX_TYPE, $types, true ) ) { array_unshift( $types, WPSEO_Sitemaps::SITEMAP_INDEX_TYPE ); } foreach ( $types as $type ) { if ( ! in_array( $type, self::$clear_types, true ) ) { self::$clear_types[] = $type; } } } /** * Invalidate storage for cache types queued to clear. */ public static function clear_queued() { if ( self::$clear_all ) { WPSEO_Sitemaps_Cache_Validator::invalidate_storage(); self::$clear_all = false; self::$clear_types = []; return; } foreach ( self::$clear_types as $type ) { WPSEO_Sitemaps_Cache_Validator::invalidate_storage( $type ); } self::$clear_types = []; } /** * Adds a hook that when given option is updated, the cache is cleared. * * @since 3.2 * * @param string $option Option name. * @param string $type Sitemap type. */ public static function register_clear_on_option_update( $option, $type = '' ) { self::$cache_clear[ $option ] = $type; } /** * Clears the transient cache when a given option is updated, if that option has been registered before. * * @since 3.2 * * @param string $option The option name that's being updated. * * @return void */ public static function clear_on_option_update( $option ) { if ( array_key_exists( $option, self::$cache_clear ) ) { if ( empty( self::$cache_clear[ $option ] ) ) { // Clear all caches. self::clear(); } else { // Clear specific provided type(s). $types = (array) self::$cache_clear[ $option ]; self::clear( $types ); } } } }