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


PHP ICE_Loader类代码示例

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


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

示例1: infinity_dashboard_cpanel_factory

/**
 * Initialize a control panel instance
 *
 * @package Infinity
 * @subpackage dashboard
 * @return ICE_Ui_Cpanel
 */
function infinity_dashboard_cpanel_factory()
{
    ICE_Loader::load('ui/cpanel');
    // new control panel instance using screens policy
    $cpanel = new ICE_Ui_Cpanel(Infinity_Screens_Policy::instance());
    return $cpanel;
}
开发者ID:shads196770,项目名称:cbox-theme,代码行数:14,代码来源:cpanel.php

示例2: load_theme_data

 /**
  * Load all themes information into local properties
  * 
  * @todo only list themes which implement the scheme
  */
 protected function load_theme_data()
 {
     ICE_Loader::load_wpadmin_lib('ms');
     ICE_Loader::load_wpadmin_lib('theme');
     // get current theme
     $ct = current_theme_info();
     // get all themes
     $this->__wp_themes__ = get_allowed_themes();
     // extract current theme
     $this->__wp_theme__ = $this->__wp_themes__[$ct->name];
 }
开发者ID:shads196770,项目名称:cbox-theme,代码行数:16,代码来源:class.php

示例3: infinity_dashboard_update_nag

/**
 * Theme update notification/nag helper
 */
function infinity_dashboard_update_nag($args)
{
    // get stylesheet name
    $stylesheet = get_stylesheet();
    // default settings
    $defaults = array('package_file' => null, 'package_id' => $stylesheet, 'theme_slug' => $stylesheet, 'theme_name' => ucfirst($stylesheet));
    // merge args and defaults
    $settings = wp_parse_args($args, $defaults);
    // load notifier class
    ICE_Loader::load('parsers/packages');
    // new packages instance
    $packages = new ICE_Packages($settings['package_file']);
    // check if update needed
    $update = $packages->theme_needs_update($settings['theme_slug'], $settings['package_id']);
    // spit out nag message if update needed
    if ($update) {
        // render markup
        ?>
		<div class="update-nag">
			There is a new version of the <?php 
        echo $settings['theme_name'];
        ?>
 theme available.
			<?php 
        if (current_user_can('update_themes')) {
            ?>
				Please <a href="<?php 
            echo $update->download;
            ?>
">download</a> it now!
			<?php 
        } else {
            ?>
				Please notify the site administrator!
			<?php 
        }
        ?>
		</div><?php 
    }
}
开发者ID:shads196770,项目名称:cbox-theme,代码行数:43,代码来源:support.php

示例4: parse

 /**
  * Parse and return formatted contents of page file
  *
  * @return string Valid HTML markup
  */
 public function parse()
 {
     // grab entire contents of file
     $contents = file_get_contents($this->page_file);
     // call pre parse filter if exists
     if ($this->pre_parse_callback) {
         $contents = call_user_func($this->pre_parse_callback, $contents);
     }
     // parse content based on markup format
     switch ($this->page_markup) {
         // HTML
         case self::MARKUP_HTML:
             break;
             // Markdown
         // Markdown
         case self::MARKUP_MARKDOWN:
         case self::MARKUP_MARKDOWN_LONG:
             ICE_Loader::load('parsers/markdown');
             $contents = ICE_Markdown::parse($contents);
             break;
             // Textile
         // Textile
         case self::MARKUP_TEXTILE:
         case self::MARKUP_TEXTILE_LONG:
             ICE_Loader::load('parsers/textile');
             $contents = ICE_Textile::parse($contents);
             break;
             // Invalid
         // Invalid
         default:
             throw new Exception(sprintf('The markup format "%s" is not valid', $this->page_markup));
     }
     // call post parse filter if exists
     if ($this->post_parse_callback) {
         $contents = call_user_func($this->post_parse_callback, $contents);
     }
     return $contents;
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:43,代码来源:docs.php

示例5: init

<?php

/**
 * Infinity Theme: option extensions, CSS overlay image class file
 *
 * @author Marshall Sorenson <marshall@presscrew.com>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Marshall Sorenson
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package Infinity-extensions
 * @subpackage options
 * @since 1.0
 */
ICE_Loader::load_ext('options/ui/overlay-picker');
/**
 * CSS overlay image
 *
 * @package Infinity-extensions
 * @subpackage options
 */
class ICE_Ext_Option_Css_Overlay_Image extends ICE_Ext_Option_Ui_Overlay_Picker
{
    /**
     */
    protected function init()
    {
        // run parent
        parent::init();
        // init directives
        $this->title = __('Overlay Image', infinity_text_domain);
        $this->description = __('Select a texture to use as the background overlay', infinity_text_domain);
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:31,代码来源:class.php

示例6: load_field_options

<?php

/**
 * ICE API: option extensions, enable/disable radio class file
 *
 * @author Marshall Sorenson <marshall@presscrew.com>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Marshall Sorenson
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package ICE-extensions
 * @subpackage options
 * @since 1.0
 */
ICE_Loader::load_ext('options/radio');
/**
 * Enable/Disable radio option
 *
 * @package ICE-extensions
 * @subpackage options
 */
class ICE_Ext_Option_Toggle_Enable_Disable extends ICE_Ext_Option_Radio implements ICE_Option_Auto_Field
{
    /**
     */
    public function load_field_options()
    {
        return array(true => __('Enable', infinity_text_domain), false => __('Disable', infinity_text_domain));
    }
}
开发者ID:shads196770,项目名称:cbox-theme,代码行数:29,代码来源:class.php

示例7: define

 */
if (!defined('INFINITY_ERROR_REPORTING')) {
    define('INFINITY_ERROR_REPORTING', INFINITY_ERROR_HANDLING);
}
/**
 * ICE error reporting
 */
if (!defined('ICE_ERROR_REPORTING')) {
    define('ICE_ERROR_REPORTING', INFINITY_ERROR_REPORTING);
}
/**
 * Load the ICE lib loader
 */
require_once INFINITY_ICE_PATH . '/loader.php';
// initialize ICE
ICE_Loader::init(INFINITY_ICE_URL);
// setup translation
load_theme_textdomain(INFINITY_TEXT_DOMAIN, WP_LANG_DIR . '/' . INFINITY_SLUG);
// initialize enqueuer and configure actions
if (is_admin()) {
    ICE_Enqueue::instance()->styles_on_action('load-appearance_page_' . INFINITY_ADMIN_PAGE)->scripts_on_action('load-appearance_page_' . INFINITY_ADMIN_PAGE);
} else {
    ICE_Enqueue::instance()->styles_on_action('wp_enqueue_scripts')->scripts_on_action('wp_enqueue_scripts');
}
// load Infinity API
require_once INFINITY_API_PATH . '/scheme.php';
require_once INFINITY_API_PATH . '/sections.php';
require_once INFINITY_API_PATH . '/options.php';
require_once INFINITY_API_PATH . '/features.php';
require_once INFINITY_API_PATH . '/widgets.php';
require_once INFINITY_API_PATH . '/screens.php';
开发者ID:nathan929,项目名称:infinity,代码行数:31,代码来源:infinity.php

示例8: init_scripts

<?php

/**
 * ICE API: options registry
 *
 * @author Marshall Sorenson <marshall@presscrew.com>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Marshall Sorenson
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package ICE-components
 * @subpackage options
 * @since 1.0
 */
ICE_Loader::load('base/registry', 'components/options/factory', 'utils/ajax');
/**
 * Make keeping track of options easy
 *
 * @package ICE-components
 * @subpackage options
 */
abstract class ICE_Option_Registry extends ICE_Registry
{
    /**
     * Enqueue required scripts
     */
    public function init_scripts()
    {
        // call parent
        parent::init_scripts();
        // jQuery UI is always needed
        wp_enqueue_script('jquery-ui-accordion');
开发者ID:nathan929,项目名称:infinity,代码行数:31,代码来源:registry.php

示例9: init

<?php

/**
 * ICE API: option extensions, WP blog description class file
 *
 * @author Marshall Sorenson <marshall@presscrew.com>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Marshall Sorenson
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package ICE-extensions
 * @subpackage options
 * @since 1.0
 */
ICE_Loader::load_ext('options/text');
/**
 * WP blog description option
 *
 * @package ICE-extensions
 * @subpackage options
 */
class ICE_Ext_Option_Wp_Blogdescription extends ICE_Ext_Option_Text
{
    /**
     */
    protected function init()
    {
        // run parent
        parent::init();
        // init directives
        $this->title = __('Tagline');
        $this->description = __('In a few words, explain what this site is about.');
开发者ID:shads196770,项目名称:cbox-theme,代码行数:31,代码来源:class.php

示例10: init

<?php

/**
 * ICE API: option extensions, CSS pixels slider class file
 *
 * @author Marshall Sorenson <marshall@presscrew.com>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Marshall Sorenson
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package ICE-extensions
 * @subpackage options
 * @since 1.0
 */
ICE_Loader::load_ext('options/ui/slider');
/**
 * CSS Pixels Slider
 *
 * This option is an extension of the slider for selecting pixels
 *
 * @package ICE-extensions
 * @subpackage options
 */
class ICE_Ext_Option_Css_Length_Px extends ICE_Ext_Option_Ui_Slider
{
    protected function init()
    {
        parent::init();
        // initialize directives
        $this->description = 'Select the number of pixels by moving the slider';
        $this->max = 5;
        $this->min = 0;
开发者ID:nathan929,项目名称:infinity,代码行数:31,代码来源:class.php

示例11: load_field_options

<?php

/**
 * ICE API: option extensions, tag class file
 *
 * @author Marshall Sorenson <marshall@presscrew.com>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Marshall Sorenson
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package ICE-extensions
 * @subpackage options
 * @since 1.0
 */
ICE_Loader::load_ext('options/select');
/**
 * Tag option
 *
 * @package ICE-extensions
 * @subpackage options
 */
class ICE_Ext_Option_Tag extends ICE_Ext_Option_Select implements ICE_Option_Auto_Field
{
    /**
     */
    public function load_field_options()
    {
        $args = array('hide_empty' => false);
        // get all tags
        $tags = get_tags($args);
        // field options
        $options = array();
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:31,代码来源:class.php

示例12:

<?php

/**
 * ICE API: sections factory class file
 *
 * @author Marshall Sorenson <marshall@presscrew.com>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Marshall Sorenson
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package ICE-components
 * @subpackage sections
 * @since 1.0
 */
ICE_Loader::load('base/factory');
/**
 * Make creating section objects easy
 *
 * @package ICE-components
 * @subpackage sections
 */
class ICE_Section_Factory extends ICE_Factory
{
}
开发者ID:shads196770,项目名称:cbox-theme,代码行数:23,代码来源:factory.php

示例13:

<?php

/**
 * ICE API: file system file cache class file
 *
 * @author Marshall Sorenson <marshall@presscrew.com>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Marshall Sorenson
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package ICE
 * @subpackage utils
 * @since 1.0
 */
ICE_Loader::load('utils/file');
/**
 * A basic file cache
 *
 * @package ICE
 * @subpackage utils
 */
final class ICE_File_Cache extends ICE_Map
{
    /**
     * The last filename that was hashed
     *
     * @var string
     */
    private $last_hash_file;
    /**
     * MD5 hash of last file
     *
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:31,代码来源:file_cache.php

示例14:

<?php

/**
 * ICE API: base registry
 *
 * @author Marshall Sorenson <marshall@presscrew.com>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Marshall Sorenson
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package ICE
 * @subpackage base
 * @since 1.0
 */
ICE_Loader::load('base/componentable', 'base/visitable', 'init/configuration', 'utils/export');
/**
 * Make keeping track of concrete components
 *
 * @package ICE
 * @subpackage base
 */
abstract class ICE_Registry extends ICE_Componentable implements ICE_Visitable
{
    /**
     * Sub option delimeter
     */
    const SUB_OPTION_DELIM = '.';
    /**
     * Sub option glue
     */
    const SUB_OPTION_GLUE = '_';
    /**
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:31,代码来源:registry.php

示例15:

<?php

/**
 * ICE API: widgets registry
 *
 * @author Marshall Sorenson <marshall@presscrew.com>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Marshall Sorenson
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package ICE-components
 * @subpackage widgets
 * @since 1.0
 */
ICE_Loader::load('base/registry', 'components/widgets/factory');
/**
 * Make keeping track of widgets easy
 *
 * @package ICE-components
 * @subpackage widgets
 */
abstract class ICE_Widget_Registry extends ICE_Registry
{
}
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:23,代码来源:registry.php


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