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


PHP Jetpack::glob_php方法代码示例

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


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

示例1: jetpack_load_shortcodes

function jetpack_load_shortcodes()
{
    $shortcode_includes = array();
    foreach (Jetpack::glob_php(dirname(__FILE__) . '/shortcodes') as $file) {
        $shortcode_includes[] = $file;
    }
    $shortcode_includes = apply_filters('jetpack_shortcodes_to_include', $shortcode_includes);
    foreach ($shortcode_includes as $include) {
        include $include;
    }
}
开发者ID:kevinreilly,项目名称:mendelements.com,代码行数:11,代码来源:shortcodes.php

示例2: jetpack_load_widgets

/**
 * Module Name: Extra Sidebar Widgets
 * Module Description: Easily add images, Twitter updates, and your site's RSS links to your theme's sidebar.
 * Sort Order: 13
 * First Introduced: 1.2
 * Requires Connection: No
 */
function jetpack_load_widgets()
{
    $widgets_include = array();
    foreach (Jetpack::glob_php(dirname(__FILE__) . '/widgets') as $file) {
        $widgets_include[] = $file;
    }
    $widgets_include = apply_filters('jetpack_widgets_to_include', $widgets_include);
    foreach ($widgets_include as $include) {
        include $include;
    }
}
开发者ID:lcw07r,项目名称:productcampamsterdam.org,代码行数:18,代码来源:widgets.php

示例3: jetpack_load_shortcodes

function jetpack_load_shortcodes()
{
    if (version_compare(PHP_VERSION, 5, '<')) {
        $php5_only = array('videopress.php' => true);
    } else {
        $php5_only = array();
    }
    foreach (Jetpack::glob_php(dirname(__FILE__) . '/shortcodes') as $file) {
        if (isset($php5_only[basename($file)])) {
            continue;
        }
        include $file;
    }
}
开发者ID:Bencheci,项目名称:blueRavenStudiosProject,代码行数:14,代码来源:shortcodes.php

示例4: jetpack_load_shortcodes

function jetpack_load_shortcodes()
{
    global $wp_version;
    $shortcode_includes = array();
    foreach (Jetpack::glob_php(dirname(__FILE__) . '/shortcodes') as $file) {
        $shortcode_includes[] = $file;
    }
    $shortcode_includes = apply_filters('jetpack_shortcodes_to_include', $shortcode_includes);
    foreach ($shortcode_includes as $include) {
        if (version_compare($wp_version, '3.6-z', '>=') && stristr($include, 'audio.php')) {
            continue;
        }
        include $include;
    }
}
开发者ID:mostafiz93,项目名称:PrintfScanf,代码行数:15,代码来源:shortcodes.php

示例5: jetpack_load_widgets

/**
 * Module Name: Extra Sidebar Widgets
 * Module Description: Add images, Twitter streams, your site’s RSS links, and more to your sidebar.
 * Sort Order: 4
 * First Introduced: 1.2
 * Requires Connection: No
 * Auto Activate: Yes
 * Module Tags: Social, Appearance
 */
function jetpack_load_widgets()
{
    $widgets_include = array();
    foreach (Jetpack::glob_php(dirname(__FILE__) . '/widgets') as $file) {
        $widgets_include[] = $file;
    }
    /**
     * Modify which Jetpack Widgets to register.
     *
     * @since 2.2.1
     *
     * @param array $widgets_include An array of widgets to be registered.
     */
    $widgets_include = apply_filters('jetpack_widgets_to_include', $widgets_include);
    foreach ($widgets_include as $include) {
        include $include;
    }
}
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:27,代码来源:widgets.php

示例6: jetpack_load_shortcodes

function jetpack_load_shortcodes()
{
    global $wp_version;
    $shortcode_includes = array();
    foreach (Jetpack::glob_php(dirname(__FILE__) . '/shortcodes') as $file) {
        $shortcode_includes[] = $file;
    }
    /**
     * This filter allows other plugins to override which shortcodes Jetpack loads.
     *
     * @module shortcodes
     *
     * @since 2.2.1
     *
     * @param array $shortcode_includes An array of which shortcodes to include.
     */
    $shortcode_includes = apply_filters('jetpack_shortcodes_to_include', $shortcode_includes);
    foreach ($shortcode_includes as $include) {
        include $include;
    }
}
开发者ID:spielhoelle,项目名称:amnesty,代码行数:21,代码来源:shortcodes.php

示例7: jetpack_load_shortcodes

function jetpack_load_shortcodes()
{
    global $wp_version;
    $shortcode_includes = array();
    foreach (Jetpack::glob_php(dirname(__FILE__) . '/shortcodes') as $file) {
        $shortcode_includes[] = $file;
    }
    /**
     * This filter allows other plugins to override which shortcodes Jetpack loads.
     *
     * @since 2.2.1
     *
     * @param array $shortcode_includes An array of which shortcodes to include.
     */
    $shortcode_includes = apply_filters('jetpack_shortcodes_to_include', $shortcode_includes);
    foreach ($shortcode_includes as $include) {
        if (version_compare($wp_version, '3.6-z', '>=') && stristr($include, 'audio.php')) {
            continue;
        }
        include $include;
    }
}
开发者ID:annbransom,项目名称:techishowl_prod_backup,代码行数:22,代码来源:shortcodes.php

示例8: jetpack_load_shortcodes

function jetpack_load_shortcodes()
{
    $shortcode_includes = array();
    foreach (Jetpack::glob_php(dirname(__FILE__) . '/shortcodes') as $file) {
        $filename = substr(basename($file), 0, -4);
        $shortcode_includes[$filename] = $file;
    }
    /**
     * This filter allows other plugins to override which shortcodes Jetpack loads.
     *
     * @module shortcodes
     *
     * @since 2.2.1
     * @since 4.2.0 Added filename without extension as array key.
     *
     * @param array $shortcode_includes An array of which shortcodes to include.
     */
    $shortcode_includes = apply_filters('jetpack_shortcodes_to_include', $shortcode_includes);
    foreach ($shortcode_includes as $include) {
        include $include;
    }
}
开发者ID:kanei,项目名称:vantuch.cz,代码行数:22,代码来源:shortcodes.php

示例9: get_available_modules

 /**
  * List available Jetpack modules. Simply lists .php files in /modules/.
  * Make sure to tuck away module "library" files in a sub-directory.
  */
 public static function get_available_modules($min_version = false, $max_version = false)
 {
     static $modules = null;
     if (!isset($modules)) {
         $files = Jetpack::glob_php(JETPACK__PLUGIN_DIR . 'modules');
         $modules = array();
         foreach ($files as $file) {
             if (!($headers = Jetpack::get_module($file))) {
                 continue;
             }
             $modules[Jetpack::get_module_slug($file)] = $headers['introduced'];
         }
     }
     $modules = apply_filters('jetpack_get_available_modules', $modules, $min_version, $max_version);
     if (!$min_version && !$max_version) {
         return array_keys($modules);
     }
     $r = array();
     foreach ($modules as $slug => $introduced) {
         if ($min_version && version_compare($min_version, $introduced, '>=')) {
             continue;
         }
         if ($max_version && version_compare($max_version, $introduced, '<')) {
             continue;
         }
         $r[] = $slug;
     }
     return $r;
 }
开发者ID:lokenxo,项目名称:familygenerator,代码行数:33,代码来源:class.jetpack.php

示例10: get_available_modules

 /**
  * List available Jetpack modules. Simply lists .php files in /modules/.
  * Make sure to tuck away module "library" files in a sub-directory.
  */
 public static function get_available_modules($min_version = false, $max_version = false)
 {
     static $modules = null;
     if (!isset($modules)) {
         $available_modules_option = Jetpack_Options::get_option('available_modules', array());
         // Use the cache if we're on the front-end and it's available...
         if (!is_admin() && !empty($available_modules_option[JETPACK__VERSION])) {
             $modules = $available_modules_option[JETPACK__VERSION];
         } else {
             $files = Jetpack::glob_php(JETPACK__PLUGIN_DIR . 'modules');
             $modules = array();
             foreach ($files as $file) {
                 if (!($headers = Jetpack::get_module($file))) {
                     continue;
                 }
                 $modules[Jetpack::get_module_slug($file)] = $headers['introduced'];
             }
             Jetpack_Options::update_option('available_modules', array(JETPACK__VERSION => $modules));
         }
     }
     /**
      * Filters the array of modules available to be activated.
      *
      * @since 2.4.0
      *
      * @param array $modules Array of available modules.
      * @param string $min_version Minimum version number required to use modules.
      * @param string $max_version Maximum version number required to use modules.
      */
     $mods = apply_filters('jetpack_get_available_modules', $modules, $min_version, $max_version);
     if (!$min_version && !$max_version) {
         return array_keys($mods);
     }
     $r = array();
     foreach ($mods as $slug => $introduced) {
         if ($min_version && version_compare($min_version, $introduced, '>=')) {
             continue;
         }
         if ($max_version && version_compare($max_version, $introduced, '<')) {
             continue;
         }
         $r[] = $slug;
     }
     return $r;
 }
开发者ID:jordankoschei,项目名称:jordankoschei-dot-com,代码行数:49,代码来源:class.jetpack.php

示例11: get_available_modules

 /**
  * List available Jetpack modules. Simply lists .php files in /modules/.
  * Make sure to tuck away module "library" files in a sub-directory.
  */
 function get_available_modules($min_version = false, $max_version = false)
 {
     static $modules = null;
     if (!isset($modules)) {
         $files = Jetpack::glob_php(dirname(__FILE__) . '/modules');
         $modules = array();
         foreach ($files as $file) {
             if (!($headers = Jetpack::get_module($file))) {
                 continue;
             }
             $modules[Jetpack::get_module_slug($file)] = $headers['introduced'];
         }
     }
     if (!$min_version && !$max_version) {
         return array_keys($modules);
     }
     $r = array();
     foreach ($modules as $slug => $introduced) {
         if ($min_version && version_compare($min_version, $introduced, '>=')) {
             continue;
         }
         if ($max_version && version_compare($max_version, $introduced, '<')) {
             continue;
         }
         $r[] = $slug;
     }
     return $r;
 }
开发者ID:Bencheci,项目名称:blueRavenStudiosProject,代码行数:32,代码来源:jetpack.php

示例12: jetpack_load_widgets

/**
 * Module Name: Extra Sidebar Widgets
 * Module Description: Easily add images, Twitter updates, and your site's RSS links to your theme's sidebar.
 * Sort Order: 9
 * First Introduced: 1.2
 */
function jetpack_load_widgets()
{
    foreach (Jetpack::glob_php(dirname(__FILE__) . '/widgets') as $file) {
        include $file;
    }
}
开发者ID:JeffreyBue,项目名称:jb,代码行数:12,代码来源:widgets.php

示例13: jetpack_load_shortcodes

function jetpack_load_shortcodes()
{
    foreach (Jetpack::glob_php(dirname(__FILE__) . '/shortcodes') as $file) {
        include $file;
    }
}
开发者ID:sajidsan,项目名称:sajidsan.github.io,代码行数:6,代码来源:shortcodes.php

示例14: get_available_modules

 /**
  * List available Jetpack modules. Simply lists .php files in /modules/.
  * Make sure to tuck away module "library" files in a sub-directory.
  */
 function get_available_modules()
 {
     static $modules = null;
     if (isset($modules)) {
         return $modules;
     }
     $files = Jetpack::glob_php(dirname(__FILE__) . '/modules');
     foreach ($files as $file) {
         if ($headers = Jetpack::get_module($file)) {
             $modules[] = Jetpack::get_module_slug($file);
         }
     }
     return $modules;
 }
开发者ID:sajidsan,项目名称:sajidsan.github.io,代码行数:18,代码来源:jetpack.php


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