Yoast\WP\SEO\Plans\User_Interface
Plans_Page_Integration::get_script_data
Creates the script data.
Метод класса: Plans_Page_Integration{}
Хуков нет.
Возвращает
Массив<Строку,Массив<Строку,. string|bool|array<string, string>>> The script data.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_script_data(): array;
Код Plans_Page_Integration::get_script_data() Plans Page Integration::get script data Yoast 27.7
private function get_script_data(): array {
return [
'addOns' => $this->add_ons_collector->to_array(),
'linkParams' => $this->short_link_helper->get_query_params(),
'preferences' => [
'isRtl' => \is_rtl(),
],
'currentPromotions' => $this->promotion_manager->get_current_promotions(),
'duplicatePost' => $this->duplicate_post_manager->get_params(),
'userCan' => [
'installPlugin' => \current_user_can( 'install_plugins' ),
'activatePlugin' => \current_user_can( 'activate_plugins' ),
],
];
}