` element. */ return \apply_filters( 'wpseo_mastodon_link', $output ); } return ''; } /** * Returns the URL to be presented in the tag. * * @return string The URL to be presented in the tag. */ public function get() { switch ( $this->helpers->options->get( 'company_or_person', false ) ) { case 'company': $social_profiles = $this->helpers->social_profiles->get_organization_social_profiles(); break; case 'person': $company_or_person_id = $this->helpers->options->get( 'company_or_person_user_id', 0 ); $social_profiles = $this->helpers->social_profiles->get_person_social_profiles( $company_or_person_id ); break; default: $social_profiles = []; } // Person case. if ( ! empty( $social_profiles['mastodon'] ) ) { return $social_profiles['mastodon']; } // Organization case. if ( ! empty( $social_profiles['mastodon_url'] ) ) { return $social_profiles['mastodon_url']; } return ''; } }