/** * @copydoc ThemePlugin::isActive() */ public function isActive() { if (defined('SESSION_DISABLE_INIT')) { return true; } return parent::isActive(); }
/** * Register the plugin, if enabled; note that this plugin * runs under both Journal and Site contexts. * @param $category string * @param $path string * @return boolean */ function register($category, $path) { if (parent::register($category, $path)) { $this->addLocaleData(); return true; } return false; }
function register($category, $path) { if (parent::register($category, $path)) { //HookRegistry::register('Templates::Manager::Index::ManagementPages', array(&$this, 'callback')); HookRegistry::register('Templates::Manager::Index::TemaPortal', array(&$this, 'callback')); return true; } return false; }
function register($category, $path) { $success = parent::register($category, $path); if ($success) { $this->addLocaleData(); AppLocale::requireComponents(array(LOCALE_COMPONENT_PKP_USER)); } return $success; }
/** * Constructor */ function DefaultThemePlugin() { parent::ThemePlugin(); }
function isWooCommercePost() { if (!ThemePlugin::isActive('woocommerce/woocommerce.php')) { return false; } if (!function_exists('is_woocommerce')) { return false; } return is_woocommerce() || is_cart() || is_checkout() || is_account_page(); }
/** * @see PKPPlugin::register($category, $path) */ function register($category, $path) { HookRegistry::register('TemplateManager::display', array(&$this, 'callbackDisplay')); return parent::register($category, $path); }
/** * Constructor */ function QuestThemePlugin() { parent::ThemePlugin(); HookRegistry::register('Templates::Common::Footer::PageFooter', array($this, 'printJavascript')); }
function publicInit() { require_once ABSPATH . 'wp-admin/includes/plugin.php'; $this->prepareLibrary(); $GoogleFont = new ThemeGoogleFont(); $GoogleFont->setToStyle($this->library['style']); $this->includeLibrary(ThemeOption::getOption('responsive_mode_enable'), null, array('responsive')); $this->includeLibrary(ThemeOption::getOption('responsive_mode_enable') && is_rtl(), null, array('responsive-rtl')); $this->includeLibrary(!ThemeOption::getOption('responsive_mode_enable'), null, array('responsive-disable')); $this->includeLibrary(is_rtl(), null, array('jquery-themeOption-rtl', 'jquery-dropkick-rtl', 'widget-rtl', 'pb-component-menu-rtl')); $this->includeLibrary(ThemePlugin::isActive('timetable/timetable.php'), null, array('theme-timetable')); $this->includeLibrary(ThemePlugin::isActive('woocommerce/woocommerce.php'), null, array('theme-woocommerce')); $this->includeLibrary(ThemePlugin::isActive('woocommerce/woocommerce.php') && is_rtl(), null, array('theme-woocommerce-core-rtl')); $this->includeLibrary(ThemePlugin::isActive('woocommerce/woocommerce.php') && is_rtl(), null, array('theme-woocommerce-rtl')); $this->includeLibrary(!class_exists('TSThemeStyle'), null, array('ts-frontend')); $this->includeLibrary(!class_exists('PBPageBuilder'), null, array('pb-frontend', 'pb-frontend-main')); $this->includeLibrary(!class_exists('PBPageBuilder') && is_rtl(), null, array('pb-frontend-main-rtl')); $this->addLibrary('style', 2); $this->addLibrary('script', 2); $aPattern = array('rightClick' => '/^right_click_/', 'selection' => '/^copy_selection_/', 'fancyboxImage' => '/^fancybox_image_/', 'fancyboxVideo' => '/^fancybox_video_/', 'goToPageTop' => '/^go_to_page_top_/'); $option = ThemeOption::getOptionObject(); foreach ($aPattern as $indexPattern => $valuePattern) { foreach ($option as $index => $value) { if (preg_match($valuePattern, $index, $result)) { $nIndex = preg_replace($valuePattern, '', $index); $data[$indexPattern][$nIndex] = $value; } } } $data['config']['theme_url'] = THEME_URL; $data['config']['is_rtl'] = is_rtl() ? 1 : 0; $data['config']['woocommerce_enable'] = (int) ThemePlugin::isActive('woocommerce/woocommerce.php'); $param = array('l10n_print_after' => 'themeOption=' . json_encode($data) . ';'); wp_localize_script('public', 'themeOption', $param); }