当前位置: 首页>>代码示例>>PHP>>正文


PHP Plugins::enabledPlugins方法代码示例

本文整理汇总了PHP中Plugins::enabledPlugins方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugins::enabledPlugins方法的具体用法?PHP Plugins::enabledPlugins怎么用?PHP Plugins::enabledPlugins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plugins的用法示例。


在下文中一共展示了Plugins::enabledPlugins方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: adminHead

function adminHead()
{
    $plugins = Plugins::enabledPlugins();
    $html = '';
    foreach ($plugins as $plugin) {
        if (method_exists($plugin, 'adminHead')) {
            $html .= $plugin::adminHead();
        }
    }
    echo $html;
}
开发者ID:ringmaster,项目名称:CandyCMS,代码行数:11,代码来源:functions.php

示例2: pluginSettings

 public static function pluginSettings()
 {
     $plugins = Plugins::enabledPlugins();
     $html = '';
     foreach ($plugins as $plugin) {
         if (method_exists($plugin, 'adminSettings')) {
             $html .= "<fieldset>";
             $html .= $plugin::adminSettings();
             $html .= "</fieldset>";
         }
     }
     echo $html;
 }
开发者ID:ringmaster,项目名称:CandyCMS,代码行数:13,代码来源:Settings.php

示例3: getField

function getField($field)
{
    global $Candy;
    $page = isset($_GET['page']) ? $_GET['page'] : $Candy['options']->getOption('homepage');
    $id = $Candy['pages']->getInfo('page_id', $page);
    $dbh = new CandyDB();
    $sth = $dbh->prepare("SELECT field_value FROM " . DB_PREFIX . "fields WHERE field_name='{$field}' AND post_id={$id}");
    $sth->execute();
    $content = $sth->fetchColumn();
    $plugins = Plugins::enabledPlugins();
    foreach ($plugins as $plugin) {
        if (method_exists($plugin, 'addShorttag')) {
            $replace = $plugin::addShorttag();
            foreach ($replace as $key => $value) {
                $content = str_replace($key, $value, $content);
            }
        }
    }
    return $content;
}
开发者ID:ringmaster,项目名称:CandyCMS,代码行数:20,代码来源:functions.php

示例4: error_reporting

* @package CandyCMS
* @version 0.7.4
* @since 0.1
* @copyright Copyright 2012 (C) Cocoon Design Ltd. - All Rights Reserved
* 
* Admin bootstrap
*/
#ini_set('display_errors', 1);
error_reporting(E_ALL);
define('CANDYVERSION', '0.7.4');
require_once '../core/config.php';
# Fire up the autoloader I'm going back to 1977!
function __autoload($class_name)
{
    if (file_exists("classes/{$class_name}.php")) {
        include 'classes/' . $class_name . '.php';
    } else {
        include CMS_PATH . 'core/classes/' . $class_name . '.php';
    }
}
$Candy = array();
$Candy['options'] = new Options();
# Include our admin functions file
include_once 'functions.php';
# Load all of our enabled plugins and include the files
$plugins = Plugins::enabledPlugins();
if (is_array($plugins)) {
    foreach ($plugins as $plugin) {
        include_once PLUGIN_PATH . $plugin . '/' . $plugin . '.php';
    }
}
开发者ID:ringmaster,项目名称:CandyCMS,代码行数:31,代码来源:bootstrap.php

示例5: foreach

<div id="container">

<?php 
if (isset($_POST['save'])) {
    ?>
<p class="message success">Plugins Saved</p>
<?php 
    Plugins::savePlugins($_POST['enabled']);
}
?>

<form action="dashboard.php?page=plugins" method="post">
<?php 
$plugins = Plugins::listPlugins();
$enabled = Plugins::enabledPlugins();
if ($plugins != false) {
    echo '<ul class="list">';
    foreach ($plugins as $plugin) {
        echo '<li>';
        echo '<p class="plugin-ttl">', $plugin['plugin'], '</p>', $plugin['description'], '<br /><span>Author: <a href="' . $plugin['authorURI'] . '" target="_blank">', $plugin['author'], '</a></span>';
        $check = in_array($plugin['dir'], $enabled) ? '<input type="checkbox" value="' . $plugin['dir'] . '" name="enabled[]" checked="checked" class="right" />' : '<input type="checkbox" value="' . $plugin['dir'] . '" name="enabled[]" class="right" />';
        echo $check;
        echo '</li>';
    }
    echo '</ul>';
    echo '<input type="submit" class="button" value="Save" name="save" />';
}
?>
</form>
</div>
开发者ID:ringmaster,项目名称:CandyCMS,代码行数:30,代码来源:plugins.php


注:本文中的Plugins::enabledPlugins方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。