Yoast\WP\SEO\Generators\Schema

Organization::fetch_social_profiles()privateYoast 1.0

Retrieve the social profiles to display in the organization schema.

{} Это метод класса: Organization{}

Хуки из метода

Возвращает

Массив. An array of social profiles.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->fetch_social_profiles();

Код Organization::fetch_social_profiles() Yoast 19.6.1

private function fetch_social_profiles() {
	$social_profiles = $this->helpers->options->get( 'other_social_urls', [] );
	$profiles        = \array_map( '\urldecode', \array_filter( $social_profiles ) );

	$facebook = $this->helpers->options->get( 'facebook_site', '' );
	if ( $facebook !== '' ) {
		$profiles[] = \urldecode( $facebook );
	}

	$twitter = $this->helpers->options->get( 'twitter_site', '' );
	if ( $twitter !== '' ) {
		$profiles[] = 'https://twitter.com/' . $twitter;
	}

	/**
	 * Filter: 'wpseo_schema_organization_social_profiles' - Allows filtering social profiles for the
	 * represented organization.
	 *
	 * @api string[] $profiles
	 */
	$profiles = \apply_filters( 'wpseo_schema_organization_social_profiles', $profiles );

	return $profiles;
}