hook_suffix = add_options_page( 'Add to Calendar Settings', 'Add to Calendar', 'manage_options', 'add-to-calendar-setting', array( $this, 'atcb_settings_create_admin_page' ) ); } public function atcb_settings_create_admin_page() { $this->options = get_option( 'atcb_global_settings' ); $locale = get_Locale(); $language = explode( '_', $locale )[0]; $supportedLanguages = ['en', 'de']; if ($language == 'en' or !in_array($language, $supportedLanguages)) { $language = ''; } else { $language .= '/'; } $configLink = 'add-to-calendar-button.com/' . $language . 'configuration'; $configProLink = 'docs.add-to-calendar-pro.com/' . $language . 'integration/wordpress'; $proLink = 'https://add-to-calendar-pro.com/' . $language; $is_pro = isset($this->options['atcb_pro_active']) && ($this->options['atcb_pro_active'] === 'true' || $this->options['atcb_pro_active'] === true) ? true : false; ?>

plugin_title ); ?>

:


 

 

Get started

', ( isset( $this->options['atcb_pro_active'] ) && ($this->options['atcb_pro_active'] === 'true' || $this->options['atcb_pro_active'] === true) ) ? 'checked' : '' ); } public function atcb_go_unstyle_callback() { printf( ' ', ( isset( $this->options['atcb_go_unstyle'] ) && ($this->options['atcb_go_unstyle'] === 'true' || $this->options['atcb_pro_active'] === true) ) ? 'checked' : '' ); echo '

(' . __("Mind that elements will not be styled, if activated! You would need to use the customCss option to style them; or (if using the PRO version) activate the \"Load Async\" option at respective styles.", 'add-to-calendar-button') . ')

'; } public function atcb_settings_header() { $screen = get_current_screen(); if ( $this->hook_suffix === $screen->id ) { $locale = get_Locale(); $language = explode( '_', $locale )[0]; $supportedLanguages = ['en', 'de']; if ($language == 'en' or !in_array($language, $supportedLanguages)) { $language = ''; } else { $language .= '/'; } $this->options = get_option( 'atcb_global_settings' ); $is_pro = isset($this->options['atcb_pro_active']) && ($this->options['atcb_pro_active'] === 'true' || $this->options['atcb_pro_active'] === true) ? true : false; $service_links = [ [ 'url' => 'https://wordpress.org/support/plugin/add-to-calendar-button/', 'title' => __( 'Support', 'add-to-calendar-button' ) . ' ↗', 'target' => '_blank', 'icon' => ' ', ], [ 'url' => 'https://wordpress.org/support/plugin/add-to-calendar-button/reviews/#new-post', 'title' => __( 'Review', 'add-to-calendar-button' ) . ' ↗', 'target' => '_blank', 'icon' => ' ', ], ]; ?>

Add to Calendar:

' . __("PRO User", 'add-to-calendar-button') . ''; } else { echo '' . __("Go PRO", 'add-to-calendar-button') . ' ↗'; } ?>
%4$s%2$s', $link['url'], $link['title'], $link['target'], $link['icon'] ); ?>
hook_suffix === $current_screen->id ) { $footer_text = '' . esc_html__( $this->plugin_title ) . ' ' . ATCB_PLUGIN_VERSION . '. Please rate the plugin ★★★★★ to keep the wheels turning. Thank you!'; } return $footer_text; } } if (is_admin()) $atcb_settings_page = new ATCBSettingsPage(); ?>