Yoast\WP\SEO\Actions\Configuration
First_Time_Configuration_Action::set_social_profiles()
Stores the values for the social profiles.
Метод класса: First_Time_Configuration_Action{}
Хуки из метода
Возвращает
Объект
. The response object.
Использование
$First_Time_Configuration_Action = new First_Time_Configuration_Action(); $First_Time_Configuration_Action->set_social_profiles( $params );
- $params(массив) (обязательный)
- The values to store.
Код First_Time_Configuration_Action::set_social_profiles() First Time Configuration Action::set social profiles Yoast 24.7
public function set_social_profiles( $params ) { $old_values = $this->get_old_values( \array_keys( $this->social_profiles_helper->get_organization_social_profile_fields() ) ); $failures = $this->social_profiles_helper->set_organization_social_profiles( $params ); /** * Action: 'wpseo_post_update_social_profiles' - Allows for Hiive event tracking. * * @param array $params The new values of the options. * @param array $old_values The old values of the options. * @param array $failures The options that failed to be saved. * * @internal */ \do_action( 'wpseo_ftc_post_update_social_profiles', $params, $old_values, $failures ); if ( empty( $failures ) ) { return (object) [ 'success' => true, 'status' => 200, ]; } return (object) [ 'success' => false, 'status' => 200, 'error' => 'Could not save some options in the database', 'failures' => $failures, ]; }