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


PHP plugins::get_merged_extensions方法代码示例

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


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

示例1: array

if (isset($_GET['incompatible_plugins'])) {
    $incompatible_plugins = array();
    foreach ($plugins->get_incompatible_plugins() as $plugin => $version) {
        if ($plugin == '~~expire~~') {
            continue;
        }
        $incompatible_plugins[] = $plugin;
    }
    echo json_encode($incompatible_plugins);
    exit;
}
// +-----------------------------------------------------------------------+
// |                     start template output                             |
// +-----------------------------------------------------------------------+
$plugins->sort_fs_plugins('name');
$merged_extensions = $plugins->get_merged_extensions();
$merged_plugins = false;
$tpl_plugins = array();
$active_plugins = 0;
foreach ($plugins->fs_plugins as $plugin_id => $fs_plugin) {
    if (isset($_SESSION['incompatible_plugins'][$plugin_id]) and $fs_plugin['version'] != $_SESSION['incompatible_plugins'][$plugin_id]) {
        // Incompatible plugins must be reinitilized
        unset($_SESSION['incompatible_plugins']);
    }
    $tpl_plugin = array('ID' => $plugin_id, 'NAME' => $fs_plugin['name'], 'VISIT_URL' => $fs_plugin['uri'], 'VERSION' => $fs_plugin['version'], 'DESC' => $fs_plugin['description'], 'AUTHOR' => $fs_plugin['author'], 'AUTHOR_URL' => @$fs_plugin['author uri'], 'U_ACTION' => sprintf($action_url, $plugin_id));
    if (isset($plugins->db_plugins_by_id[$plugin_id])) {
        $tpl_plugin['STATE'] = $plugins->db_plugins_by_id[$plugin_id]['state'];
    } else {
        $tpl_plugin['STATE'] = 'inactive';
    }
    if (isset($fs_plugin['extension']) and isset($merged_extensions[$fs_plugin['extension']])) {
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:31,代码来源:plugins_installed.php


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