) { \array_splice( $pages, 0, 0, [ [ self::PAGE, '', \__( 'General', 'wordpress-seo' ), 'wpseo_manage_options', self::PAGE, [ $this, 'display_page' ], ], ] ); return $pages; } /** * Displays the page. * * @return void */ public function display_page() { echo '
'; } /** * Enqueues the assets. * * @return void */ public function enqueue_assets() { // Remove the emoji script as it is incompatible with both React and any contenteditable fields. \remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); \wp_enqueue_media(); $this->asset_manager->enqueue_script( 'general-page' ); $this->asset_manager->enqueue_style( 'general-page' ); if ( $this->promotion_manager->is( 'black-friday-2024-promotion' ) ) { $this->asset_manager->enqueue_style( 'black-friday-banner' ); } $this->asset_manager->localize_script( 'general-page', 'wpseoScriptData', $this->get_script_data() ); } /** * Creates the script data. * * @return array The script data. */ private function get_script_data() { return [ 'preferences' => [ 'isPremium' => $this->product_helper->is_premium(), 'isRtl' => \is_rtl(), 'pluginUrl' => \plugins_url( '', \WPSEO_FILE ), 'upsellSettings' => [ 'actionId' => 'load-nfd-ctb', 'premiumCtbId' => 'f6a84663-465f-4cb5-8ba5-f7a6d72224b2', ], ], 'adminUrl' => \admin_url( 'admin.php' ), 'linkParams' => $this->shortlink_helper->get_query_params(), 'userEditUrl' => \add_query_arg( 'user_id', '{user_id}', \admin_url( 'user-edit.php' ) ), 'alerts' => $this->notification_helper->get_alerts(), 'currentPromotions' => $this->promotion_manager->get_current_promotions(), 'dismissedAlerts' => $this->alert_dismissal_action->all_dismissed(), 'dashboard' => $this->dashboard_configuration->get_configuration(), ]; } } 'elementor-pro' ); $config['content']['send_button_section']['has_link'] = true; $config['style']['send_button_section']['has_platform_colors'] = false; $config['style']['send_button_section']['has_icon_color'] = false; $config['style']['send_button_section']['has_background_color'] = true; $config['style']['send_button_section']['has_text_color'] = true; $config['style']['send_button_section']['typography_selector'] = '{{WRAPPER}} .e-contact-buttons__cta-button'; return $config; } public function get_name(): string { return 'contact-buttons-var-3'; } public function get_title(): string { return esc_html__( 'Info Button Box', 'elementor-pro' ); } protected function add_content_tab(): void { $this->add_chat_button_section(); $this->add_top_bar_section(); $this->add_contact_section(); $this->add_send_button_section(); } protected function add_style_tab(): void { $this->add_style_chat_button_section(); $this->add_style_top_bar_section(); $this->add_style_info_links_section(); $this->add_style_send_button_section(); $this->add_style_chat_box_section(); } public function render(): void { $render_strategy = new Contact_Buttons_Var_3_Render( $this ); $render_strategy->render(); } }