function accepts($mode) { if ($mode == substr(get_class($this), 7)) { return true; } return parent::accepts($mode); }
public function accepts($mode) { if ($this->getConf('use_cstyle_nest') && $mode == $this->pluginMode) { return true; } return parent::accepts($mode); }
/** * for backward compatability * @see inc/DokuWiki_Plugin#getInfo() */ function getInfo() { if (method_exists(parent, 'getInfo')) { $info = parent::getInfo(); } return is_array($info) ? $info : confToHash(dirname(__FILE__) . '/../plugin.info.txt'); }
/** * Specify modes allowed in the imgcaption/tabcaption * Using getAllowedTypes() includes too much modes. * * @param string $mode Parser mode * @return bool true if $mode is accepted */ public function accepts($mode) { $allowedsinglemodes = array('media', 'internallink', 'externallink', 'linebreak', 'emaillink', 'windowssharelink', 'filelink', 'plugin_graphviz', 'plugin_ditaa'); if (in_array($mode, $allowedsinglemodes)) { return true; } return parent::accepts($mode); }
/** * Retrieves localized string. * * @param string $name name of localized string * @return mixed retrieved localized string */ public function getLang($name) { if ($this->integrator instanceof DokuWiki_Syntax_Plugin) { return $this->integrator->getLang($name); } // fix for accessing strings in media.php if (!is_array($this->integrator)) { $lang = array(); @(include dirname(__FILE__) . '/lang/en/lang.php'); if ($GLOBALS['conf']['lang'] != 'en') { @(include dirname(__FILE__) . '/lang/' . $GLOBALS['conf']['lang'] . '/lang.php'); } $this->integrator = $lang; } return $this->integrator[$name]; }