本文整理汇总了PHP中Themes::getCurrentTheme方法的典型用法代码示例。如果您正苦于以下问题:PHP Themes::getCurrentTheme方法的具体用法?PHP Themes::getCurrentTheme怎么用?PHP Themes::getCurrentTheme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Themes
的用法示例。
在下文中一共展示了Themes::getCurrentTheme方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sysReady
public static function sysReady()
{
if (Themes::getCurrentTheme()->hasInterface()) {
if (Themes::getCurrentTheme()->hasInterfaceName()) {
$name = Themes::getCurrentTheme()->getInterfaceName();
}
Admin::registerPage('theme-settings', $name ? $name : __('admin', 'theme-settings'), 'ThemeInterface::displayInterface', 2);
}
}
示例2: create
public static function create($name, $initContents)
{
$p = self::$plugin;
queue_css($p->pluginPublicDir() . 'elrte/css/smoothness/jquery-ui-1.8.13.custom.css');
queue_css($p->pluginPublicDir() . 'elrte/css/elrte.min.css');
queue_css($p->pluginPublicDir() . 'elfinder/css/elfinder.min.css');
queue_css($p->pluginPublicDir() . 'elfinder/css/theme.css');
queue_js($p->pluginPublicDir() . 'elrte/js/jquery-ui-1.8.13.custom.min.js');
queue_js($p->pluginPublicDir() . 'elrte/js/elrte.full.js');
queue_js($p->pluginPublicDir() . 'elfinder/js/elfinder.full.js');
queue_js($p->pluginPublicDir() . 'elrte/js/i18n/elrte.en.js');
return sprintf(<<<EOT
<script type="text/javascript" charset="utf-8">
\t\$(function() {
\t\tvar opts = {
\t\t\tlang : 'en', // set your language
\t\t\tstyleWithCSS : false,
\t\t\theight : 400,
\t\t\ttoolbar : 'maxi',
\t\t\tcssfiles : ['%s'],
\t\t\tfmOpen : function(callback) {
\t\t\t\t\$('<div />').dialogelfinder({
\t\t\t\t\turl : '%selfinder/php/connector.php',
\t\t\t\t\tlang : 'en',
\t\t\t\t\tcommandsOptions : {
\t\t\t\t\t\tgetfile : {
\t\t\t\t\t\t\tonlyURL : true, // disable to return detail info
\t\t\t\t\t\t\tmultiple : false, // disable to return multiple files info
\t\t\t\t\t\t\tfolders : false, // disable to return folders info
\t\t\t\t\t\t\toncomplete : 'destroy' // action after callback (""/"close"/"destroy")
\t\t\t\t\t\t}
\t\t\t\t\t},
\t\t\t\t\tgetFileCallback : function (obj) {
\t\t\t\t\t\tcallback(obj.baseUrl + obj.path.substr(obj.path.replace('\\\\', '/').indexOf('/')+1));
\t\t\t\t\t}
\t\t\t\t})
\t\t\t}
\t\t};
\t\t// create editor
\t\t\$('#%s').elrte(opts);
\t\t// or this way
\t\t// var editor = new elRTE(document.getElementById('our-element'), opts);
\t});
</script>
<textarea id="%s">%s</textarea>
EOT
, Themes::getCurrentTheme()->getPublicPath() . "editor.css", $p->pluginPublicDir(), $name, $name, $initContents);
}