Advanced google translate Support Author: ycxmz100 Advanced Google Translate is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version. Advanced Google Translate is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Advanced Google Translate. */ /* credit: js/css/image/icon/text/code in this project is forked from GTranslate by edo888(https://gtranslate.io/?xyz=998) GTranslate: Plugin URI: https://gtranslate.io/?xyz=998 Description: Makes your website multilingual and available to the world using Google Translate. For support visit GTranslate Support. Author: Translate AI Multilingual Solutions Author URI: https://gtranslate.io Text Domain: gtranslate Copyright 2010 - 2020 Edvard Ananyan (email : edo888@gmail.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ class agt_ui { /** * @var array $buttons * @var array $settings */ public $buttons; public $settings; public $btns_order; public $cpts; public $showoncpt; /** * Dump everything for this class here * * @since 1.0 */ public function __construct() { // Pull stored data $this->buttons = get_option( 'ssb_buttons' ); $this->settings = get_option( 'agt_settings' ); $this->showoncpt = get_option( 'ssb_showoncpt' ); // Buttons Sorting $this->btns_order = explode( '&', str_replace( 'sort=', '', $this->buttons['btns_order'] ) ); } /** * Admin Page UI * * @since 1.0 */ public function admin_page() { ?>

button_builder(); // General settings $this->general_settings(); ?>
Check All | Uncheck All
  • settings['flag_af'] ) && $this->settings['flag_af'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_sq'] ) && $this->settings['flag_sq'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_am'] ) && $this->settings['flag_am'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ar'] ) && (!isset( $this->settings['xxx']))) || $this->settings['flag_ar'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_hy'] ) && $this->settings['flag_hy'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_az'] ) && $this->settings['flag_az'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_eu'] ) && $this->settings['flag_eu'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_be'] ) && $this->settings['flag_be'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_bn'] ) && $this->settings['flag_bn'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_bs'] ) && $this->settings['flag_bs'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_bg'] ) && $this->settings['flag_bg'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ca'] ) && $this->settings['flag_ca'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ceb'] ) && $this->settings['flag_ceb'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ny'] ) && $this->settings['flag_ny'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_zh-CN'] ) && (!isset( $this->settings['xxx']))) || $this->settings['flag_zh-CN'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_zh-TW'] ) && $this->settings['flag_zh-TW'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_co'] ) && $this->settings['flag_co'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_hr'] ) && $this->settings['flag_hr'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_cs'] ) && $this->settings['flag_cs'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_da'] ) && $this->settings['flag_da'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_nl'] ) && (!isset( $this->settings['xxx']))) || $this->settings['flag_nl'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_en'] ) && (!isset( $this->settings['xxx']))) || $this->settings['flag_en'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_eo'] ) && $this->settings['flag_eo'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_et'] ) && $this->settings['flag_et'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_tl'] ) && $this->settings['flag_tl'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_fi'] ) && $this->settings['flag_fi'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_fr'] ) && (!isset( $this->settings['xxx']))) || $this->settings['flag_fr'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_fy'] ) && $this->settings['flag_fy'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_gl'] ) && $this->settings['flag_gl'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ka'] ) && $this->settings['flag_ka'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_de'] ) && (!isset( $this->settings['xxx']))) || $this->settings['flag_de'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_el'] ) && $this->settings['flag_el'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_gu'] ) && $this->settings['flag_gu'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ht'] ) && $this->settings['flag_ht'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ha'] ) && $this->settings['flag_ha'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_haw'] ) && $this->settings['flag_haw'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_iw'] ) && $this->settings['flag_iw'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_hi'] ) && $this->settings['flag_hi'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_hmn'] ) && $this->settings['flag_hmn'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_hu'] ) && $this->settings['flag_hu'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_is'] ) && $this->settings['flag_is'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ig'] ) && $this->settings['flag_ig'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_id'] ) && $this->settings['flag_id'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ga'] ) && $this->settings['flag_ga'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_it'] ) && (!isset( $this->settings['xxx']))) || $this->settings['flag_it'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ja'] ) && (!isset( $this->settings['xxx']))) || $this->settings['flag_ja'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_jw'] ) && $this->settings['flag_jw'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_kn'] ) && $this->settings['flag_kn'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_kk'] ) && $this->settings['flag_kk'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_km'] ) && $this->settings['flag_km'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ko'] ) && $this->settings['flag_ko'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ku'] ) && $this->settings['flag_ku'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ky'] ) && $this->settings['flag_ky'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_lo'] ) && $this->settings['flag_lo'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_la'] ) && $this->settings['flag_la'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_lv'] ) && $this->settings['flag_lv'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_lt'] ) && $this->settings['flag_lt'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_lb'] ) && $this->settings['flag_lb'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_mk'] ) && $this->settings['flag_mk'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_mg'] ) && $this->settings['flag_mg'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ms'] ) && $this->settings['flag_ms'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ml'] ) && $this->settings['flag_ml'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_mt'] ) && $this->settings['flag_mt'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_mi'] ) && $this->settings['flag_mi'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_mr'] ) && $this->settings['flag_mr'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_mn'] ) && $this->settings['flag_mn'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_my'] ) && $this->settings['flag_my'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ne'] ) && $this->settings['flag_ne'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_no'] ) && $this->settings['flag_no'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ps'] ) && $this->settings['flag_ps'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_fa'] ) && $this->settings['flag_fa'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_pl'] ) && $this->settings['flag_pl'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_pt'] ) && (!isset( $this->settings['xxx']))) || $this->settings['flag_pt'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_pa'] ) && $this->settings['flag_pa'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ro'] ) && $this->settings['flag_ro'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ru'] ) && (!isset( $this->settings['xxx']))) || $this->settings['flag_ru'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_sm'] ) && $this->settings['flag_sm'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_gd'] ) && $this->settings['flag_gd'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_sr'] ) && $this->settings['flag_sr'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_st'] ) && $this->settings['flag_st'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_sn'] ) && $this->settings['flag_sn'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_sd'] ) && $this->settings['flag_sd'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_si'] ) && $this->settings['flag_si'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_sk'] ) && $this->settings['flag_sk'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_sl'] ) && $this->settings['flag_sl'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_so'] ) && $this->settings['flag_so'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_es'] ) && (!isset( $this->settings['xxx']))) || $this->settings['flag_es'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_su'] ) && $this->settings['flag_su'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_sw'] ) && $this->settings['flag_sw'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_sv'] ) && $this->settings['flag_sv'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_tg'] ) && $this->settings['flag_tg'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ta'] ) && $this->settings['flag_ta'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_te'] ) && $this->settings['flag_te'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_th'] ) && $this->settings['flag_th'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_tr'] ) && $this->settings['flag_tr'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_uk'] ) && $this->settings['flag_uk'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_ur'] ) && $this->settings['flag_ur'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_uz'] ) && $this->settings['flag_uz'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_vi'] ) && $this->settings['flag_vi'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_cy'] ) && $this->settings['flag_cy'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_xh'] ) && $this->settings['flag_xh'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_yi'] ) && $this->settings['flag_yi'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_yo'] ) && $this->settings['flag_yo'] == 1 ) ? ' checked="checked"' : ''; ?>>
  • settings['flag_zu'] ) && $this->settings['flag_zu'] == 1 ) ? ' checked="checked"' : ''; ?>>
px
px
px
px
px

cpts = get_post_types( array( '_builtin' => false ), 'objects' ); if ( $this->cpts ): foreach ( $this->cpts as $cpt ): ?>

settings['show_on_pages']) && $this->settings['show_on_pages'] && get_post_type() == 'page' && ! is_front_page() ) || ( isset($this->settings['show_on_posts']) && $this->settings['show_on_posts'] && ( get_post_type() == 'post' ) ) || ( isset($this->settings['show_on_frontpage']) && $this->settings['show_on_frontpage'] && is_front_page() ) || (!empty($this->showoncpt) && in_array( get_post_type(), $this->showoncpt ) ) || (!isset( $this->settings['xxx'])) ) { // Buttons exists if ( !isset($this->settings['simple_mode']) ) { // ?>