/** * @param array $aWidgetArguments * @param array $aWidgetInstance */ public function widget($aWidgetArguments, $aWidgetInstance) { $oCon = self::$oFeatureOptions->getController(); $oRender = self::$oFeatureOptions->loadRenderer($oCon->getPath_Templates() . 'php'); $aData = array('strings' => array('plugin_name' => $oCon->getHumanName()), 'hrefs' => array('img_src' => $oCon->getPluginUrl_Image('pluginlogo_32x32.png'))); $sContents = $oRender->setRenderVars($aData)->setTemplate('snippets' . ICWP_DS . 'plugin_badge_widget')->setTemplateEnginePhp()->render(); $this->standardRender($aWidgetArguments, _wpsf__('Site Secured'), $sContents); }
protected function doExecuteProcessor() { if (!apply_filters($this->doPluginPrefix('visitor_is_whitelisted'), false)) { parent::doExecuteProcessor(); } }
/** */ protected function updateHandler() { parent::updateHandler(); if (version_compare($this->getVersion(), '4.1.0', '<')) { $this->setOpt('recreate_database_table', true); } }
protected function updateHandler() { parent::updateHandler(); if ($this->getVersion() == '0.0') { return; } // we need to update the meta keys for notices. if (is_admin() && version_compare($this->getVersion(), '4.10.4', '<=')) { $aOldMetaMap = array('plugin_translation_notice' => 'translate-plugin', 'php53_version_warning' => 'php53-version-warning', 'plugin_mailing_list_signup' => 'plugin-mailing-list-signup'); $oWpAdminNotices = $this->loadAdminNoticesProcessor(); $oWpUsers = $this->loadWpUsersProcessor(); foreach ($aOldMetaMap as $sOldMeta => $sNewId) { if ($oWpUsers->getUserMeta($this->prefixOptionKey($sOldMeta)) == 'Y') { $oWpAdminNotices->setAdminNoticeAsDismissed(array('id' => $sNewId)); } $oWpUsers->deleteUserMeta($this->prefixOptionKey($sOldMeta)); } } }
/** * this feature doesn't need to consider IP whitelists - it has no security implications. */ protected function doExecuteProcessor() { parent::doExecuteProcessor(); }
protected function updateHandler() { parent::updateHandler(); if ($this->getVersion() == '0.0') { return; } if (version_compare($this->getVersion(), '3.0.0', '<')) { $aAllOptions = apply_filters($this->doPluginPrefix('aggregate_all_plugin_options'), array()); $this->setOpt('enable_admin_access_restriction', $aAllOptions['enable_admin_access_restriction']); $this->setOpt('admin_access_key', $aAllOptions['admin_access_key']); $this->setOpt('admin_access_timeout', $aAllOptions['admin_access_timeout']); } }
/** * Hooked to the plugin's main plugin_shutdown action */ public function action_doFeatureShutdown() { if (!$this->getIsPluginDeleting()) { $this->moveIpsFromLegacyWhiteList(); $this->addFilterIpsToWhiteList(); $this->ensureFeatureEnabled(); } parent::action_doFeatureShutdown(); //save }