ds for persons. * * @deprecated 22.6 * @codeCoverageIgnore * * @param array $contactmethods Currently set contactmethods. * * @return array */ public function add_mastodon_to_user_contactmethods( $contactmethods ) { \_deprecated_function( __METHOD__, 'Yoast SEO 22.6' ); // Bail out early if something's wrong with the contact methods, let's not add any more confusion there. if ( ! \is_array( $contactmethods ) ) { return $contactmethods; } $contactmethods['mastodon'] = \__( 'Mastodon profile URL', 'wordpress-seo-premium' ); return $contactmethods; } /** * Checks if the Mastodon field is filled in. * * @param bool $state The current state of the integration. * * @return bool */ public function check_mastodon_active( $state ) { switch ( $this->options_helper->get( 'company_or_person', false ) ) { case 'company': $social_profiles = $this->social_profiles_helper->get_organization_social_profiles(); if ( ! empty( $social_profiles['mastodon_url'] ) ) { return true; } break; case 'person': $company_or_person_id = $this->options_helper->get( 'company_or_person_user_id', 0 ); $social_profiles = $this->social_profiles_helper->get_person_social_profiles( $company_or_person_id ); if ( ! empty( $social_profiles['mastodon'] ) ) { return true; } break; } return $state; } } Archives des Outils scolaires et bureautiques - Page 15 sur 15 - Amzi Group