Yoast\WP\SEO\Actions
Settings_Introduction_Action::set_show()
Sets the show value.
Метод класса: Settings_Introduction_Action{}
Хуков нет.
Возвращает
true|false
. Whether the update was successful.
Использование
$Settings_Introduction_Action = new Settings_Introduction_Action(); $Settings_Introduction_Action->set_show( $value );
- $value(true|false) (обязательный)
- The value.
Код Settings_Introduction_Action::set_show() Settings Introduction Action::set show Yoast 20.4
public function set_show( $value ) { $user_id = $this->user_helper->get_current_user_id(); $values = $this->get_values_for_user( $user_id ); // Check if there is anything to update. if ( $values['show'] === $value ) { return true; } $values['show'] = $value; return $this->user_helper->update_meta( $user_id, self::USER_META_KEY, $values ) !== false; }