public function getTemplateOptionsTab() { $tplOptsData = array('background' => array('title' => 'Background', 'content' => $this->getTemplateBgOptionsHtml()), 'logo' => array('title' => 'Logo', 'content' => $this->getTemplateLogoOptionsHtml()), 'message' => array('title' => 'Message', 'content' => $this->getTemplateMsgOptionsHtml())); $tplOptsData = dispatcherCsp::applyFilters('adminTemplateOptions', $tplOptsData); $this->assign('tplOptsData', $tplOptsData); return parent::getContent('templateOptionsTab'); }
public function initMenu() { $mainSlug = dispatcherCsp::applyFilters('adminMenuMainSlug', $this->_mainSlug); $mainMenuPageOptions = array('page_title' => langCsp::_('Ready! Coming Soon'), 'menu_title' => langCsp::_('Ready! Coming Soon'), 'capability' => 'manage_options', 'menu_slug' => $mainSlug, 'function' => array(frameCsp::_()->getModule('options')->getView(), 'getAdminPage')); $mainMenuPageOptions = dispatcherCsp::applyFilters('adminMenuMainOption', $mainMenuPageOptions); add_menu_page($mainMenuPageOptions['page_title'], $mainMenuPageOptions['menu_title'], $mainMenuPageOptions['capability'], $mainMenuPageOptions['menu_slug'], $mainMenuPageOptions['function']); }
public function init() { $isAdminPlugPage = frameCsp::_()->isAdminPlugPage(); $isPluginsPage = utilsCsp::isPluginsPage(); if (is_admin()) { if ($isAdminPlugPage || $isPluginsPage) { frameCsp::_()->addScript('jquery'); frameCsp::_()->addScript('jquery-ui-tabs', '', array('jquery')); frameCsp::_()->addScript('jquery-ui-dialog', '', array('jquery')); frameCsp::_()->addScript('jquery-ui-button', '', array('jquery')); frameCsp::_()->addScript('farbtastic'); frameCsp::_()->addScript('commonCsp', CSP_JS_PATH . 'common.js'); frameCsp::_()->addScript('coreCsp', CSP_JS_PATH . 'core.js'); frameCsp::_()->addScript('adminOptionsCsp', CSP_JS_PATH . 'admin.options.js'); frameCsp::_()->addScript('ajaxupload', CSP_JS_PATH . 'ajaxupload.js'); frameCsp::_()->addScript('postbox', get_bloginfo('wpurl') . '/wp-admin/js/postbox.js'); add_thickbox(); $ajaxurl = admin_url('admin-ajax.php'); if (frameCsp::_()->getModule('options')->get('ssl_on_ajax')) { $ajaxurl = uriCsp::makeHttps($ajaxurl); } $jsData = array('siteUrl' => CSP_SITE_URL, 'imgPath' => CSP_IMG_PATH, 'cssPath' => CSP_CSS_PATH, 'loader' => CSP_LOADER_IMG, 'close' => CSP_IMG_PATH . 'cross.gif', 'ajaxurl' => $ajaxurl, 'animationSpeed' => frameCsp::_()->getModule('options')->get('js_animation_speed'), 'siteLang' => langCsp::getData(), 'options' => frameCsp::_()->getModule('options')->getAllowedPublicOptions(), 'CSP_CODE' => CSP_CODE, 'ball_loader' => CSP_IMG_PATH . 'ajax-loader-ball.gif', 'ok_icon' => CSP_IMG_PATH . 'ok-icon.png'); $jsData['allCheckRegPlugs'] = modInstallerCsp::getCheckRegPlugs(); $jsData = dispatcherCsp::applyFilters('jsInitVariables', $jsData); frameCsp::_()->addJSVar('coreCsp', 'CSP_DATA', $jsData); $this->_styles = array('styleCsp' => array('path' => CSP_CSS_PATH . 'style.css'), 'adminStylesCsp' => array('path' => CSP_CSS_PATH . 'adminStyles.css'), 'jquery-tabs' => array('path' => CSP_CSS_PATH . 'jquery-tabs.css'), 'jquery-buttons' => array('path' => CSP_CSS_PATH . 'jquery-buttons.css'), 'wp-jquery-ui-dialog' => array(), 'farbtastic' => array(), 'jquery-dialog' => array('path' => CSP_CSS_PATH . 'jquery-dialog.css')); $defaultPlugTheme = frameCsp::_()->getModule('options')->get('default_theme'); foreach ($this->_styles as $s => $sInfo) { if (isset($sInfo['for'])) { if ($sInfo['for'] == 'frontend' && is_admin() || $sInfo['for'] == 'admin' && !is_admin()) { continue; } } $canBeSubstituted = true; if (isset($sInfo['substituteFor'])) { switch ($sInfo['substituteFor']) { case 'frontend': $canBeSubstituted = !is_admin(); break; case 'admin': $canBeSubstituted = is_admin(); break; } } if ($canBeSubstituted && file_exists(CSP_TEMPLATES_DIR . $defaultPlugTheme . DS . $s . '.css')) { frameCsp::_()->addStyle($s, CSP_TEMPLATES_PATH . $defaultPlugTheme . '/' . $s . '.css'); } elseif ($canBeSubstituted && file_exists(utilsCsp::getCurrentWPThemeDir() . 'csp' . DS . $s . '.css')) { frameCsp::_()->addStyle($s, utilsCsp::getCurrentWPThemePath() . '/toe/' . $s . '.css'); } elseif (!empty($sInfo['path'])) { frameCsp::_()->addStyle($s, $sInfo['path']); } else { frameCsp::_()->addStyle($s); } } } } parent::init(); }
public function getComingSoonPageHtml() { $this->_beforeShow(); $this->assign('msgTitle', frameCsp::_()->getModule('options')->get('msg_title')); $this->assign('msgTitleColor', frameCsp::_()->getModule('options')->get('msg_title_color')); $this->assign('msgTitleFont', frameCsp::_()->getModule('options')->get('msg_title_font')); $msgTitleStyle = array(); if (!empty($this->msgTitleColor)) { $msgTitleStyle['color'] = $this->msgTitleColor; } if (!empty($this->msgTitleFont)) { $msgTitleStyle['font-family'] = $this->msgTitleFont; $this->_styles[] = 'http://fonts.googleapis.com/css?family=' . $this->msgTitleFont . '&subset=latin,cyrillic-ext'; } $this->assign('msgTitleStyle', utilsCsp::arrToCss($msgTitleStyle)); $this->assign('msgText', frameCsp::_()->getModule('options')->get('msg_text')); $this->assign('msgTextColor', frameCsp::_()->getModule('options')->get('msg_text_color')); $this->assign('msgTextFont', frameCsp::_()->getModule('options')->get('msg_text_font')); $msgTextStyle = array(); if (!empty($this->msgTextColor)) { $msgTextStyle['color'] = $this->msgTextColor; } if (!empty($this->msgTextFont)) { $msgTextStyle['font-family'] = $this->msgTextFont; if ($this->msgTitleFont != $this->msgTextFont) { $this->_styles[] = 'http://fonts.googleapis.com/css?family=' . $this->msgTextFont . '&subset=latin,cyrillic-ext'; } } $this->assign('msgTextStyle', utilsCsp::arrToCss($msgTextStyle)); if ($this->_useSubscribeForm && frameCsp::_()->getModule('options')->get('sub_enable')) { $this->_scripts[] = frameCsp::_()->getModule('subscribe')->getModPath() . 'js/frontend.subscribe.js'; $this->assign('subscribeForm', frameCsp::_()->getModule('subscribe')->getController()->getView()->getUserForm()); } $this->assign('countDownTimerHtml', dispatcherCsp::applyFilters('countDownTimerHtml', '')); $this->assign('progressBarHtml', dispatcherCsp::applyFilters('progressBarHtml', '')); $this->assign('contactFormHtml', dispatcherCsp::applyFilters('contactFormHtml', '')); $this->assign('googleMapsHtml', dispatcherCsp::applyFilters('googleMapsHtml', '')); if ($this->_useSocIcons) { $this->assign('socIcons', frameCsp::_()->getModule('social_icons')->getController()->getView()->getFrontendContent()); } if (file_exists($this->getModule()->getModDir() . 'css/style.css')) { $this->_styles[] = $this->getModule()->getModPath() . 'css/style.css'; } $this->assign('logoPath', $this->getModule()->getLogoImgPath()); $this->assign('bgCssAttrs', dispatcherCsp::applyFilters('tplBgCssAttrs', $this->getModule()->getBgCssAttrs())); $this->assign('styles', dispatcherCsp::applyFilters('tplStyles', $this->_styles)); $this->assign('scripts', dispatcherCsp::applyFilters('tplScripts', $this->_scripts)); $this->assign('initJsVars', dispatcherCsp::applyFilters('tplInitJsVars', $this->initJsVars())); $this->assign('messages', frameCsp::_()->getRes()->getMessages()); $this->assign('errors', frameCsp::_()->getRes()->getErrors()); return parent::getContent($this->getCode() . 'CSPHtml'); }
public function getList() { return dispatcherCsp::applyFilters('metaTagsList', array('meta_title' => array('label' => 'Title', 'optsTplEngine' => array($this->getController()->getView(), 'getTitleOpts')), 'meta_desc' => array('label' => 'Description', 'optsTplEngine' => array($this->getController()->getView(), 'getDescOpts')), 'meta_keywords' => array('label' => 'Keywords', 'optsTplEngine' => array($this->getController()->getView(), 'getKeywordsOpts')), 'google_analitics' => array('label' => 'Google Analitics Code', 'optsTplEngine' => array($this->getController()->getView(), 'getGoogleAnaliticsOpts')), 'favico' => array('label' => 'Favico for site', 'optsTplEngine' => array($this->getController()->getView(), 'getFavicoOpts')))); }
public function getList() { return dispatcherCsp::applyFilters('socIconsList', array('facebook' => array('label' => 'Facebook', 'engine' => array($this->getController()->getView(), 'getFbButtons'), 'optsTplEngine' => array($this->getController()->getView(), 'getFbOpts')), 'twitter' => array('label' => 'Twitter', 'engine' => array($this->getController()->getView(), 'getTwButtons'), 'optsTplEngine' => array($this->getController()->getView(), 'getTwOpts')), 'gplus' => array('label' => 'Google+', 'engine' => array($this->getController()->getView(), 'getGpButtons'), 'optsTplEngine' => array($this->getController()->getView(), 'getGpOpts')), 'youtube' => array('label' => 'YouTube', 'engine' => array($this->getController()->getView(), 'getYtButtons'), 'optsTplEngine' => array($this->getController()->getView(), 'getYtOpts')), 'instagram' => array('label' => 'Instagram', 'engine' => array($this->getController()->getView(), 'getImButtons'), 'optsTplEngine' => array($this->getController()->getView(), 'getImOpts')))); }
/** * Check addtional access - if there are other conditions, that can allow user to see site - it will replace it's value to true. * By default it will return false, * @return boolean **/ public function checkAdditionalAccess() { return dispatcherCsp::applyFilters('canAccessSite', false); }