• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP filter_get_globally_enabled函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中filter_get_globally_enabled函数的典型用法代码示例。如果您正苦于以下问题:PHP filter_get_globally_enabled函数的具体用法?PHP filter_get_globally_enabled怎么用?PHP filter_get_globally_enabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: getLatexStatus

 private function getLatexStatus()
 {
     global $CFG;
     $filters = filter_get_globally_enabled();
     // Since Moodle 2.5 key is 'tex' not 'filter/tex'
     $status = $CFG->version >= 2013051400 ? array_key_exists('tex', $filters) : array_key_exists('filter/tex', $filters);
     return $status;
 }
开发者ID:mads233,项目名称:moodle-filter_wiris,代码行数:8,代码来源:MoodleConfigurationUpdater.php


示例2: filter_is_enabled

/**
 * @param string $filtername The filter name, for example 'tex'.
 * @return boolean is this filter allowed to be used on this site. That is, the
 *      admin has set the global 'active' setting to On, or Off, but available.
 */
function filter_is_enabled($filtername)
{
    if (strpos($filtername, 'filter/') === 0) {
        //debugging("Old filtername '$filtername' parameter used in filter_is_enabled()", DEBUG_DEVELOPER);
        $filtername = substr($filtername, 7);
    } else {
        if (strpos($filtername, '/') !== false) {
            throw new coding_exception("Invalid filter name '{$filtername}' used in filter_is_enabled()");
        }
    }
    return array_key_exists($filtername, filter_get_globally_enabled());
}
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:17,代码来源:filterlib.php


示例3: admin_settingpage

 // "filtersettings" settingpage
 $temp = new admin_settingpage('commonfiltersettings', get_string('commonfiltersettings', 'admin'));
 if ($ADMIN->fulltree) {
     $cachetimes = array(604800 => get_string('numdays', '', 7), 86400 => get_string('numdays', '', 1), 43200 => get_string('numhours', '', 12), 10800 => get_string('numhours', '', 3), 7200 => get_string('numhours', '', 2), 3600 => get_string('numhours', '', 1), 2700 => get_string('numminutes', '', 45), 1800 => get_string('numminutes', '', 30), 900 => get_string('numminutes', '', 15), 600 => get_string('numminutes', '', 10), 540 => get_string('numminutes', '', 9), 480 => get_string('numminutes', '', 8), 420 => get_string('numminutes', '', 7), 360 => get_string('numminutes', '', 6), 300 => get_string('numminutes', '', 5), 240 => get_string('numminutes', '', 4), 180 => get_string('numminutes', '', 3), 120 => get_string('numminutes', '', 2), 60 => get_string('numminutes', '', 1), 30 => get_string('numseconds', '', 30), 0 => get_string('no'));
     $items = array();
     $items[] = new admin_setting_configselect('cachetext', get_string('cachetext', 'admin'), get_string('configcachetext', 'admin'), 60, $cachetimes);
     $items[] = new admin_setting_configselect('filteruploadedfiles', get_string('filteruploadedfiles', 'admin'), get_string('configfilteruploadedfiles', 'admin'), 0, array('0' => get_string('none'), '1' => get_string('allfiles'), '2' => get_string('htmlfilesonly')));
     $items[] = new admin_setting_configcheckbox('filtermatchoneperpage', get_string('filtermatchoneperpage', 'admin'), get_string('configfiltermatchoneperpage', 'admin'), 0);
     $items[] = new admin_setting_configcheckbox('filtermatchonepertext', get_string('filtermatchonepertext', 'admin'), get_string('configfiltermatchonepertext', 'admin'), 0);
     foreach ($items as $item) {
         $item->set_updatedcallback('reset_text_filters_cache');
         $temp->add($item);
     }
 }
 $ADMIN->add('filtersettings', $temp);
 $activefilters = filter_get_globally_enabled();
 $filternames = filter_get_all_installed();
 foreach ($filternames as $filterpath => $strfiltername) {
     if (file_exists("{$CFG->dirroot}/{$filterpath}/filtersettings.php")) {
         $settings = new admin_settingpage('filtersetting' . str_replace('/', '', $filterpath), $strfiltername, 'moodle/site:config', !isset($activefilters[$filterpath]));
         if ($ADMIN->fulltree) {
             include "{$CFG->dirroot}/{$filterpath}/filtersettings.php";
         }
         $ADMIN->add('filtersettings', $settings);
     }
 }
 $catname = get_string('portfolios', 'portfolio');
 $manage = get_string('manageportfolios', 'portfolio');
 $url = "{$CFG->wwwroot}/{$CFG->admin}/portfolio.php";
 $ADMIN->add('modules', new admin_category('portfoliosettings', $catname, empty($CFG->enableportfolios)));
 // jump through hoops to do what we want
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:31,代码来源:plugins.php


示例4: filter_is_enabled

/**
 * @param string $filter The filter name, for example 'filter/tex' or 'mod/glossary'.
 * @return boolean is this filter allowed to be used on this site. That is, the
 *      admin has set the global 'active' setting to On, or Off, but available.
 */
function filter_is_enabled($filter)
{
    return array_key_exists($filter, filter_get_globally_enabled());
}
开发者ID:raymondAntonio,项目名称:moodle,代码行数:9,代码来源:filterlib.php


示例5: report_security_check_mediafilterswf

/**
 * Verifies sloppy swf embedding - this should have been removed long ago!!
 * @param bool $detailed
 * @return object result
 */
function report_security_check_mediafilterswf($detailed = false)
{
    global $CFG;
    $result = new stdClass();
    $result->issue = 'report_security_check_mediafilterswf';
    $result->name = get_string('check_mediafilterswf_name', 'report_security');
    $result->info = null;
    $result->details = null;
    $result->status = null;
    $result->link = "<a href=\"{$CFG->wwwroot}/{$CFG->admin}/settings.php?section=filtersettingfiltermediaplugin\">" . get_string('filtersettings', 'admin') . '</a>';
    $activefilters = filter_get_globally_enabled();
    if (array_search('mediaplugin', $activefilters) !== false and !empty($CFG->filter_mediaplugin_enable_swf)) {
        $result->status = REPORT_SECURITY_CRITICAL;
        $result->info = get_string('check_mediafilterswf_error', 'report_security');
    } else {
        $result->status = REPORT_SECURITY_OK;
        $result->info = get_string('check_mediafilterswf_ok', 'report_security');
    }
    if ($detailed) {
        $result->details = get_string('check_mediafilterswf_details', 'report_security');
    }
    return $result;
}
开发者ID:eamador,项目名称:moodle-course-custom-fields,代码行数:28,代码来源:locallib.php


示例6: report_security_check_mediafilterswf

/**
 * Verifies sloppy swf embedding - this should have been removed long ago!!
 * @param bool $detailed
 * @return object result
 */
function report_security_check_mediafilterswf($detailed=false) {
    global $CFG;

    $result = new stdClass();
    $result->issue   = 'report_security_check_mediafilterswf';
    $result->name    = get_string('check_mediafilterswf_name', 'report_security');
    $result->info    = null;
    $result->details = null;
    $result->status  = null;
    $result->link    = "<a href=\"$CFG->wwwroot/$CFG->admin/settings.php?section=managemediaplayers\">" .
        get_string('managemediaplayers', 'media') . '</a>';

    $activefilters = filter_get_globally_enabled();

    $enabledmediaplayers = \core\plugininfo\media::get_enabled_plugins();
    if (array_search('mediaplugin', $activefilters) !== false and array_key_exists('swf', $enabledmediaplayers)) {
        $result->status = REPORT_SECURITY_CRITICAL;
        $result->info   = get_string('check_mediafilterswf_error', 'report_security');
    } else {
        $result->status = REPORT_SECURITY_OK;
        $result->info   = get_string('check_mediafilterswf_ok', 'report_security');
    }

    if ($detailed) {
        $result->details = get_string('check_mediafilterswf_details', 'report_security');
    }

    return $result;
}
开发者ID:rezaies,项目名称:moodle,代码行数:34,代码来源:locallib.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP filter_get_name函数代码示例发布时间:2022-05-15
下一篇:
PHP filter_get_global_states函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap