Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
builders
/
File Content:
indexable-author-builder.php
<?php namespace Yoast\WP\SEO\Builders; use Yoast\WP\SEO\Helpers\Author_Archive_Helper; use Yoast\WP\SEO\Models\Indexable; /** * Author Builder for the indexables. * * Formats the author meta to indexable format. */ class Indexable_Author_Builder { use Indexable_Social_Image_Trait; /** * The author archive helper. * * @var Author_Archive_Helper */ private $author_archive; /** * Indexable_Author_Builder constructor. * * @param Author_Archive_Helper $author_archive The author archive helper. */ public function __construct( Author_Archive_Helper $author_archive ) { $this->author_archive = $author_archive; } /** * Formats the data. * * @param int $user_id The user to retrieve the indexable for. * @param Indexable $indexable The indexable to format. * * @return Indexable The extended indexable. */ public function build( $user_id, Indexable $indexable ) { $meta_data = $this->get_meta_data( $user_id ); $indexable->object_id = $user_id; $indexable->object_type = 'user'; $indexable->permalink = \get_author_posts_url( $user_id ); $indexable->title = $meta_data['wpseo_title']; $indexable->description = $meta_data['wpseo_metadesc']; $indexable->is_cornerstone = false; $indexable->is_robots_noindex = ( $meta_data['wpseo_noindex_author'] === 'on' ); $indexable->is_robots_nofollow = null; $indexable->is_robots_noarchive = null; $indexable->is_robots_noimageindex = null; $indexable->is_robots_nosnippet = null; $indexable->is_public = ( $indexable->is_robots_noindex ) ? false : null; $indexable->has_public_posts = $this->author_archive->author_has_public_posts( $user_id ); $indexable->blog_id = \get_current_blog_id(); $this->reset_social_images( $indexable ); $this->handle_social_images( $indexable ); return $indexable; } /** * Retrieves the meta data for this indexable. * * @param int $user_id The user to retrieve the meta data for. * * @return array List of meta entries. */ protected function get_meta_data( $user_id ) { $keys = [ 'wpseo_title', 'wpseo_metadesc', 'wpseo_noindex_author', ]; $output = []; foreach ( $keys as $key ) { $output[ $key ] = $this->get_author_meta( $user_id, $key ); } return $output; } /** * Retrieves the author meta. * * @param int $user_id The user to retrieve the indexable for. * @param string $key The meta entry to retrieve. * * @return string|null The value of the meta field. */ protected function get_author_meta( $user_id, $key ) { $value = \get_the_author_meta( $key, $user_id ); if ( \is_string( $value ) && $value === '' ) { return null; } return $value; } /** * Finds an alternative image for the social image. * * @param Indexable $indexable The indexable. * * @return array|bool False when not found, array with data when found. */ protected function find_alternative_image( Indexable $indexable ) { $gravatar_image = \get_avatar_url( $indexable->object_id, [ 'size' => 500, 'scheme' => 'https', ] ); if ( $gravatar_image ) { return [ 'image' => $gravatar_image, 'source' => 'gravatar-image', ]; } return false; } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
.DS_Store
10234 bytes
0644
20200616130143_ReplacePermalinkHashIndex.php
2293 bytes
0644
AjaxController-20260704221224.php
2162 bytes
0644
AjaxController.php
2162 bytes
0644
DownloadConfController.php
945 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream.php
4209 bytes
0644
article-modified-time-presenter.php
609 bytes
0644
class-admin-utils-20260622095013.php
2147 bytes
0644
class-metabox-formatter.php
12602 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-taxonomy-columns.php
7324 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class.web.services-20260704233826.php
7748 bytes
0644
class.web.services.php
7748 bytes
0644
define.php
4567 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin-20260706080701.php
3331 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeDropbox.class.php
41782 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260624113005.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
environment-helper.php
596 bytes
0644
estimated-reading-time.php
1111 bytes
0644
exceptions-20260707093653.php
708 bytes
0644
exceptions.php
708 bytes
0644
get-request-conditional.php
466 bytes
0644
image-helper.php
10231 bytes
0644
inc.data.php
5121 bytes
0644
inc.validator.php
5401 bytes
0644
index.php
0 bytes
0644
indexable-author-builder.php
3338 bytes
0644
indexable-date-archive-builder.php
1203 bytes
0644
indexable-hierarchy-builder.php
11018 bytes
0644
indexable-home-page-builder.php
2391 bytes
0644
indexable-post-type-archive-builder.php
2379 bytes
0644
indexable-social-image-trait.php
4827 bytes
0644
indexable-system-page-builder.php
1708 bytes
0644
indexable-term-builder.php
5519 bytes
0644
interface-sitemap-cache-data.php
1208 bytes
0644
loco.php
5626 bytes
0644
loco.xml
657 bytes
0644
manager.php
14659 bytes
0644
module.php
1297 bytes
0644
primary-category.php
1998 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
uninstall.php
4401 bytes
0644
wordpress-seo-es_ES.json
25583 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wordpress-seojs-bs_BA.json
13790 bytes
0644
wordpress-seojs-gl_ES.json
20143 bytes
0644
wordpress-seojs-ja.json
21424 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
N4ST4R_ID | Naxtarrr