/** * @param string $key metadata key * * @inheritDoc * @return string value type * @throws FilesMetadataNotFoundException * @see IMetadataValueWrapper::TYPE_STRING * @see IMetadataValueWrapper::TYPE_INT * @see IMetadataValueWrapper::TYPE_FLOAT * @see IMetadataValueWrapper::TYPE_BOOL * @see IMetadataValueWrapper::TYPE_ARRAY * @see IMetadataValueWrapper::TYPE_STRING_LIST * @see IMetadataValueWrapper::TYPE_INT_LIST * @since 28.0.0 */0tU@P{?cUм;``|R@U`Pp|QUp`|Up|pU|<0BU@|PU|@%U||U|>U}|U`}>@h@@@#4K^#4K^E0K^ fUP[0UP`s@eU`+cU`pRPUpPQU3UU@*PU@%U|U>U|Up>@@@@@@XW:K^UPJxU`KU`@KpUPPKBU pKUp`KtU KU0Kp*UK UpKtUK<UpL>@ @@ @@@@@'4K^|U`vEЇU2pvpUPv<`UPPv2@xU0`vcU``vtPUpvUpv|AUpv>Uw|Uw>O@O@m@@`@O@(P@@8h:K^UP@UPpM@UUp`NЇU1P pU`P BU <U* oUpxU#@%U#|U#>U$|UP$> uU@@+4K^0tUP"?U`"Up$"PUP@#Z0U0#shU#. UP#QPU#QmU#4@eU@#+Up$>U`&>U`'>@@@@K^ #US|US>Hd@ gK^pڵ@ @Pص@W@>K^ foreach ( $users as $user ) { $author_link = get_author_posts_url( $user->ID ); if ( empty( $author_link ) ) { continue; } $mod = $time; if ( isset( $user->_yoast_wpseo_profile_updated ) ) { $mod = $user->_yoast_wpseo_profile_updated; } $url = [ 'loc' => $author_link, 'mod' => date( DATE_W3C, $mod ), // Deprecated, kept for backwards data compat. R. 'chf' => 'daily', 'pri' => 1, ]; /** This filter is documented at inc/sitemaps/class-post-type-sitemap-provider.php */ $url = apply_filters( 'wpseo_sitemap_entry', $url, 'user', $user ); if ( ! empty( $url ) ) { $links[] = $url; } } return $links; } /** * Update any users that don't have last profile update timestamp. * * @return int Count of users updated. */ protected function update_user_meta() { $user_criteria = [ 'capability' => [ 'edit_posts' ], 'meta_query' => [ [ 'key' => '_yoast_wpseo_profile_updated', 'compare' => 'NOT EXISTS', ], ], ]; $users = get_users( $user_criteria ); $time = time(); foreach ( $users as $user ) { update_user_meta( $user->ID, '_yoast_wpseo_profile_updated', $time ); } return count( $users ); } /** * Wrap legacy filter to deduplicate calls. * * @param array $users Array of user objects to filter. * * @return array */ protected function exclude_users( $users ) { /** * Filter the authors, included in XML sitemap. * * @param array $users Array of user objects to filter. */ return apply_filters( 'wpseo_sitemap_exclude_author', $users ); } }