本文整理汇总了PHP中Plugins::is_loaded方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugins::is_loaded方法的具体用法?PHP Plugins::is_loaded怎么用?PHP Plugins::is_loaded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugins
的用法示例。
在下文中一共展示了Plugins::is_loaded方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_init_theme
/**
* Execute on theme init to apply these filters to output
*/
public function action_init_theme()
{
if (!Plugins::is_loaded('HabariMarkdown')) {
// Apply Format::autop() to post content...
Format::apply('autop', 'post_content_out');
}
// Truncate content excerpt at "<!--more-->"...
Format::apply_with_hook_params('more', 'post_content_out');
// Apply Format::autop() to comment content...
Format::apply('autop', 'comment_content_out');
// Apply Format::tag_and_list() to post tags...
Format::apply('tag_and_list', 'post_tags_out');
$this->load_text_domain('demorgan');
}
示例2: action_init_theme
/**
* Execute on theme init to apply these filters to output
*/
public function action_init_theme()
{
if (!Plugins::is_loaded('HabariMarkdown')) {
// Apply Format::autop() to post content...
Format::apply('autop', 'post_content_out');
}
// Apply Format::autop() to comment content...
Format::apply('autop', 'comment_content_out');
// Apply Format::tag_and_list() to post tags...
Format::apply('tag_and_list', 'post_tags_out');
// Apply Format::nice_date() to post date...
Format::apply('nice_date', 'post_pubdate_out', 'F j, Y');
// Apply Format::nice_date() to post date...
Format::apply('nice_date', 'post_pubdate_time', 'g:i a');
// Format post date to ISO-8601...
Format::apply('nice_date', 'post_pubdate_iso', 'c');
// Apply Format::nice_date() to comment date...
Format::apply('nice_date', 'comment_date_out', 'F j, Y ‒ g:i a');
// Format comment date to ISO-8601...
Format::apply('nice_date', 'comment_date_iso', 'c');
// Truncate content excerpt at "more" or 100 characters...
Format::apply_with_hook_params('more', 'post_content_excerpt', '', 100, 1);
//Format::apply_with_hook_params( 'more', 'post_content_out', 'more', 100, 1 );
}
示例3:
?>
"><?php
echo $comment->id;
?>
</a>
<span class="commentauthor"><a href="<?php
echo $comment->url;
?>
" rel="external"><?php
if (Plugins::is_loaded('twitteravatar')) {
?>
<? echo $comment->twitter_avatar ?> <?php
}
?>
<?php
if (Plugins::is_loaded('gravatar')) {
?>
<img class="twitter_avatar" src="<? echo $comment->gravatar ?>"> <?php
}
echo $comment->name;
?>
</a></span><br/>
<small class="comment-meta"><a href="#comment-<?php
echo $comment->id;
?>
" title="<?php
_e('Time of this Comment');
?>
"><?php
echo $comment->date->out();
?>
示例4: die
<?php
// Warning: This is PHP template written as RAW.
// Do not delete these lines
if (!defined('HABARI_PATH')) {
die(_t('Please do not load this page directly.'));
}
?>
<div id="tag-list" class="vcol">
<h3>Tags</h3>
<?php
if (Plugins::is_loaded('RN Tag Cloud')) {
?>
<?php
$theme->tag_cloud();
?>
<?php
} else {
?>
<ul>
<?php
foreach ($taglist as $tag) {
?>
<li><a href="<?php
echo $tag->url;
?>
" title="<?php
echo $tag->text;
?>
" rel="tag"><?php
echo $tag->text;
示例5: htmlentities
<input type="text" id="criteria" name="criteria" value="<?php
if (isset($criteria)) {
echo htmlentities($criteria, ENT_COMPAT, 'UTF-8');
}
?>
" />
<input id="search-submit" type="submit" value="Search" />
</fieldset>
</form>
</div>
<ul id="sidebar-1" class="xoxo">
<?php
if (Plugins::is_loaded('RelatedPosts')) {
$theme->display('relatedposts.widget');
}
if (Plugins::is_loaded('RelatedTags')) {
$theme->display('relatedtags.widget');
}
?>
</ul>
<ul id="sidebar-2" class="xoxo">
<?php
$theme->display('recententries.widget');
$theme->display('feedlink.widget');
$theme->display('admin.widget');
?>
</ul>
</div>
<hr />
<!-- /sidebar.single -->
示例6: function
use_as_large_photo: function(fileindex, fileobj) {set_photo(fileindex, fileobj);}
});
$.extend(habari.media.output.image_png, {
use_as_large_photo: function(fileindex, fileobj) {set_photo(fileindex, fileobj);}
});
$.extend(habari.media.output.image_gif, {
use_as_large_photo: function(fileindex, fileobj) {set_photo(fileindex, fileobj);}
});
function set_photo(fileindex, fileobj) {
$('#pb_photo_src').val(fileobj.originalsecret).focus();
}
<?php
}
?>
<?php
if (Plugins::is_loaded('Flickr Media Silo')) {
?>
$.extend(habari.media.output.flickr, {
use_small_photo: function(fileindex, fileobj) {set_flickr_photo(fileindex, fileobj, '_m.');},
use_medium_photo: function(fileindex, fileobj) {set_flickr_photo(fileindex, fileobj, '_-.');},
use_large_photo: function(fileindex, fileobj) {set_flickr_photo(fileindex, fileobj, '_b.');},
use_original_photo: function(fileindex, fileobj) {set_flickr_photo(fileindex, fileobj, '_o.');}
});
function set_flickr_photo(fileindex, fileobj, filesize) {
if (filesize == '_o.') {
if (fileobj.originalsecret && fileobj.originalformat) {
fileobj_secret = fileobj.originalsecret;
fileobj_size = '_o.';
fileobj_format = fileobj.originalformat;
}
else {
示例7: array
<div id="sidebar">
<div id="blurb">
<?php
if (Plugins::is_loaded('colophon')) {
echo $theme->colophon;
} else {
echo '<p>' . $da_blurbtext . '</p>';
}
?>
</div>
<?php
$theme->twitter();
?>
<?php
if ($sidenotes->count()) {
?>
<div id="sidenotes">
<h3><a href="<?php
URL::out('atom_feed_tag', array('tag' => $theme->da_sidenotes_tag));
?>
" title="Side Notes Feed"><img alt="Side Notes Feed" src="<?php
echo $this->theme_url;
?>
/images/feed.png" /></a> Side Notes</h3>
<ul>
<?php
foreach ($sidenotes as $sidenote) {
?>
<li><?php
示例8: die
<?php
if (!defined('HABARI_PATH')) {
die('No direct access');
}
?>
</div>
<div id="bottom-secondary">
<div id="tags"><?php
echo Plugins::is_loaded('tagcloud') ? $theme->tag_cloud() : $theme->show_tags();
?>
</div>
</div>
<div id="footer">
<p>
<?php
_e('%1$s is powered by %2$s', array(Options::get('title'), '<a href="http://www.habariproject.org/" title="Habari">Habari ' . Version::get_habariversion() . '</a>'));
?>
-
<?php
_e('<a href="%1$s">Atom Entries</a> and <a href="%2$s">Atom Comments</a>', array(URL::get('atom_feed', array('index' => 1)), URL::get('atom_feed_comments')));
?>
</p>
</div>
<div class="clear"></div>
</div>
</div>
<?php
echo $theme->footer();
?>
</body>
示例9: _e
<li><?php
_e('Twitter');
?>
<ul id="twitter">
<?php
$theme->twitter();
?>
</ul></li>
<?php
}
?>
<?php
if (Plugins::is_loaded('Brightkite')) {
?>
<div id="brightkite">
<?php
$theme->bk_location();
?>
</div>
<?php
}
?>
<li class="user"><?php
_e('User');
?>
示例10: action_plugin_ui_configure
/**
* Plugin UI
*
* @access public
* @return void
*/
public function action_plugin_ui_configure()
{
$this->add_template('hbap_checkbox', dirname($this->get_file()) . '/lib/formcontrols/hbap_checkbox.php');
$this->add_template('hbap_text', dirname($this->get_file()) . '/lib/formcontrols/hbap_text.php');
$this->add_template('hbap_select', dirname($this->get_file()) . '/lib/formcontrols/hbap_select.php');
$options = Options::get(self::OPTNAME);
$ui = new FormUI(strtolower(__CLASS__));
$ui->append('wrapper', 'colourselector', 'formcontrol');
// First all the hidden settings
foreach ($options['colorScheme'] as $opt => $value) {
$ui->colourselector->append('hidden', "cs_" . $opt, 'null:null');
$optn = "cs_{$opt}";
if ($optn == 'cs_pagebg') {
continue;
}
$ui->colourselector->{$optn}->value = '#' . $value;
$ui->colourselector->{$optn}->id = $optn . "color";
}
if (Plugins::is_loaded('Habari Media Silo')) {
// Get a list of all the directories available in the loaded Habari Silo
$dirs = self::siloDirs();
$dirs['custom'] = _t('Custom', 'audio-player');
}
$ui->append('fieldset', 'genfs', _t('General', 'audio-player'));
$ui->genfs->append('select', 'defaultPath', 'null:null', _t('Default Audio Path', 'audio-player'));
$ui->genfs->defaultPath->template = 'hbap_select';
$ui->genfs->defaultPath->id = 'defaultPath';
$ui->genfs->defaultPath->pct = 80;
$ui->genfs->defaultPath->value = $options['defaultPath'];
$ui->genfs->defaultPath->helptext = _t('This is the default location for your audio files. When you use the [audio] syntax and don\'t provide an absolute URL for the mp3 file (the full URL including "http://") Audio Player will automatically look for the file in this location. You can set this to a folder located inside your blog folder structure or, alternatively, if you wish to store your audio files outside your blog (maybe even on a different server), choose "Custom" from the drop down and enter the absolute URL to that location.', 'audio-player');
$ui->genfs->defaultPath->options = $dirs;
$ui->genfs->append('text', 'customPath', 'null:null', _t('Custom Audio Path:', 'audio-player'), 'hbap_text');
$ui->genfs->customPath->value = $options['customPath'];
$ui->genfs->customPath->pct = 80;
$ui->genfs->customPath->id = 'customPath';
if ($options['defaultPath'] != 'custom') {
$ui->genfs->customPath->disabled = TRUE;
}
$ui->append('fieldset', 'appfs', _t('Appearance', 'audio-player'));
$ui->appfs->append('text', 'width', 'null:null', _t('Player Width', 'audio-player'), 'hbap_text');
$ui->appfs->width->value = $options['width'];
$ui->appfs->width->helptext = _t('You can enter a value in pixels (e.g. 200) or as a percentage (e.g. 100%)', 'audio-player');
$ui->appfs->append('select', 'fieldsel', 'null:null', _t('Colour Scheme Selector', 'audio-player'));
$ui->appfs->fieldsel->id = 'fieldsel';
$ui->appfs->fieldsel->template = 'hbap_select';
$ui->appfs->fieldsel->options = array('bg' => _t('Background', 'audio-player'), 'leftbg' => _t('Left Background', 'audio-player'), 'lefticon' => _t('Left Icon', 'audio-player'), 'volslider' => _t('Volume Control Slider', 'audio-player'), 'voltrack' => _t('Volume Control Track', 'audio-player'), 'rightbg' => _t('Right Background', 'audio-player'), 'rightbghover' => _t('Right Background (hover)', 'audio-player'), 'righticon' => _t('Right Icon', 'audio-player'), 'righticonhover' => _t('Right Icon (hover)', 'audio-player'), 'text' => _t('Text', 'audio-player'), 'track' => _t('Progress Bar Track', 'audio-player'), 'tracker' => _t('Progress Bar', 'audio-player'), 'loader' => _t('Loading Bar', 'audio-player'), 'border' => _t('Progress Bar Border', 'audio-player'), 'skip' => _t('Next/Previous Buttons', 'audio-player'));
$ui->appfs->fieldsel->helptext = '<input name="colorvalue" type="text" id="colorvalue" size="10" maxlength="7" />
<span id="colorsample"></span>';
// IFF we've managed to find the theme/style.css file and parse it, we'll show the "Theme Colours" selection tool
$themeColors = self::getThemeColors();
if (is_array($themeColors) && !empty($themeColors)) {
$themeColorStr = '';
foreach (self::getThemeColors() as $themeColor) {
$themeColorStr .= "<li style='background:#{$themeColor}' title='#{$themeColor}'>#{$themeColor}</li>";
}
$ui->appfs->fieldsel->helptext .= '<span id="themecolor-btn">' . _t('Theme Colours', 'audio-player') . '</span>
<div id="themecolor">
<span>' . _t('Theme Colours', 'audio-player') . '</span>
<ul>' . $themeColorStr . '</ul></div>';
}
$ui->appfs->fieldsel->helptext .= '<input type="button" class="submit" id="doresetcolors" value="' . _t('Reset Color Scheme', 'audio-player') . '">';
$ui->appfs->append('hidden', 'resetColors', 'null:null');
$ui->appfs->resetColors->id = 'resetColors';
$ui->appfs->append('wrapper', 'colour_selector_demo', 'formcontrol');
$ui->appfs->colour_selector_demo->append('static', 'demo', '
<div id="demoplayer">Audio Player</div>
<script type="text/javascript">
AudioPlayer.embed("demoplayer", {demomode:"yes"});
</script>
');
$ui->appfs->append('text', 'cs_pagebg', 'null:null', _t('Page Background', 'audio-player'), 'hbap_text');
$ui->appfs->cs_pagebg->value = '#' . $options['colorScheme']['pagebg'];
$ui->appfs->cs_pagebg->id = 'cs_pagebg';
if ($options['colorScheme']['transparentpagebg']) {
$ui->appfs->cs_pagebg->disabled = TRUE;
}
$ui->appfs->cs_pagebg->helptext = _t('In most cases, simply select "transparent" and it will match the background of your page. In some rare cases, the player will stop working in Firefox if you use the transparent option. If this happens, untick the transparent box and enter the color of your page background in the box below (in the vast majority of cases, it will be white: #FFFFFF).', 'audio-player');
$ui->appfs->append('checkbox', 'cs_transparentpagebg', 'null:null', _t('Transparent Page Background', 'audio-player'));
$ui->appfs->cs_transparentpagebg->value = $options['colorScheme']['transparentpagebg'];
$ui->appfs->append('checkbox', 'enableAnimation', 'null:null', _t('Enable Animation', 'audio-player'), 'hbap_checkbox');
$ui->appfs->enableAnimation->value = $options['enableAnimation'];
$ui->appfs->enableAnimation->helptext = _t('If you don\'t like the open/close animation, you can disable it here.', 'audio-player');
$ui->appfs->append('checkbox', 'showRemaining', 'null:null', _t('Show Remaining', 'audio-player'), 'hbap_checkbox');
$ui->appfs->showRemaining->value = $options['showRemaining'];
$ui->appfs->showRemaining->helptext = _t('This will make the time display count down rather than up.', 'audio-player');
$ui->appfs->append('checkbox', 'disableTrackInformation', 'null:null', _t('Disable Track Information', 'audio-player'), 'hbap_checkbox');
$ui->appfs->disableTrackInformation->value = $options['disableTrackInformation'];
$ui->appfs->disableTrackInformation->helptext = _t('Select this if you wish to disable track information display (the player won\'t show titles or artist names even if they are available.)', 'audio-player');
$ui->appfs->append('checkbox', 'rtlMode', 'null:null', _t('Switch to RTL Layout', 'audio-player'), 'hbap_checkbox');
$ui->appfs->rtlMode->value = $options['rtlMode'];
$ui->appfs->rtlMode->helptext = _t('Select this to switch the player layout to RTL mode (right to left) for Arabic and Hebrew language blogs.', 'audio-player');
$ui->append('fieldset', 'feedfs', _t('Feed', 'audio-player'));
$ui->feedfs->append('select', 'feedAlt', 'null:null', _t('Alternate Content', 'audio-player'));
$ui->feedfs->feedAlt->id = 'feedAlt';
//.........这里部分代码省略.........
示例11: urlencode
">
<div class="searchimg"></div>
<div><input type="text" id="f" value="" name="criteria" size="15"></div>
</form>
</div>
<h2><a href="<?php
Site::out_url('habari');
?>
/"><?php
Options::out('title');
?>
</a></h2>
<table><tr><td>
<?php
if (Plugins::is_loaded('Twitter') && $theme->twitter_in == 'header') {
?>
<p><?php
$theme->twitter();
?>
<a href="http://twitter.com/<?php
echo urlencode(Options::get('twitter:username'));
?>
">via Twitter</a></p>
<?php
} else {
?>
<?php
if (Options::out('tagline') != '') {
?>
<p><?php
示例12: if
<?php if ( !defined( 'HABARI_PATH' ) ) { die('No direct access'); } ?>
</div>
<div id="bottom-secondary">
<div id="tags"><?php echo (Plugins::is_loaded('tagcloud')) ? $theme->tag_cloud() : $theme->show_tags();?></div>
</div>
<div id="footer">
<p>
<?php printf( _t('%1$s is powered by %2$s'), Options::get('title'),' <a
href="http://www.habariproject.org/" title="Habari">Habari ' . Version::HABARI_VERSION . '</a>' ); ?> -
<a href="<?php URL::out( 'atom_feed', array( 'index' => '1' ) ); ?>"><?php _e( 'Atom Entries' ); ?></a><?php _e( ' and ' ); ?>
<a href="<?php URL::out( 'atom_feed_comments' ); ?>"><?php _e( 'Atom Comments' ); ?></a>
</p>
</div>
<div class="clear"></div>
</div>
</div>
<?php echo $theme->footer(); ?>
</body>
</html>
示例13:
<?php
if (Plugins::is_loaded('RN Monthly Archives')) {
// RN Monthly Archives Plugin required
$theme->monthly_archives($theme->rn_archives_months);
} else {
?>
Please install/activate the RN Archives Plugins. Thanx.
<?php
}
示例14: _t
<div id="fireeagle">
<?php
if (!empty($fireeagle_location)) {
?>
<h2><?php
echo _t('Location', 'fireeagle');
?>
</h2>
<?php
echo sprintf(_t('I\'m at %s.', 'fireeagle'), htmlspecialchars($fireeagle_location));
?>
<?php
if (Plugins::is_loaded('14c8414f-6cdf-11dd-b14a-001b210f913f')) {
?>
<a href="http://maps.google.com/?ll=<?php
echo $fireeagle_latitude . ',' . $fireeagle_longitude;
?>
&z=<?php
echo $zoom;
?>
&_markers=<?php
echo $fireeagle_latitude . ',' . $fireeagle_longitude;
?>
&_size=180x180&_controls=none"><?php
echo htmlspecialchars($fireeagle_location);
?>
</a>
<?php
}
?>
示例15: array
</div>
<div id="bottom-secondary">
<div id="tags"><?php
if (Plugins::is_loaded('tagcloud')) {
$theme->tag_cloud();
} else {
$theme->show_tags();
}
?>
</div>
</div>
<div id="footer">
<p>
<?php
printf(_t('%1$s is powered by %2$s'), Options::get('title'), ' <a
href="http://www.habariproject.org/" title="Habari">Habari ' . Version::HABARI_VERSION . '</a>');
?>
-
<a href="<?php
URL::out('atom_feed', array('index' => '1'));
?>
"><?php
_e('Atom Entries');
?>
</a><?php
_e(' and ');
?>
<a href="<?php
URL::out('atom_feed_comments');
?>
"><?php