本文整理汇总了PHP中ICE_Loader::load方法的典型用法代码示例。如果您正苦于以下问题:PHP ICE_Loader::load方法的具体用法?PHP ICE_Loader::load怎么用?PHP ICE_Loader::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICE_Loader
的用法示例。
在下文中一共展示了ICE_Loader::load方法的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;
}
示例2: 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
}
}
示例3:
<?php
/**
* ICE API: option extensions, UI 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('components/options/component');
/**
* UI Slider option
*
* This option is a wrapper for the jQuery UI slider widget
*
* @link http://jqueryui.com/demos/slider/
* @package ICE-extensions
* @subpackage options
*/
class ICE_Ext_Option_Ui_Slider extends ICE_Option
{
/**
* @var boolean|string|integer
*/
protected $animate;
/**
* @var string
示例4: get_file_contents
/**
*/
protected function get_file_contents($filename)
{
// run parent to get content
$content = parent::get_file_contents($filename);
// get content?
if ($content) {
// new file info instance
$fi = new ICE_File($filename);
// save last filename
$this->last_dirname = $fi->getPath();
// handle any pre-processing
switch ($fi->getExtension()) {
// its a LESS CSS file
case 'less':
// load less parser
ICE_Loader::load('parsers/less');
// parse it
$content = ICE_Less::parse($content, $fi->getPath());
// done with less
break;
}
// replace all CSS url() values
return preg_replace_callback('/url\\s*\\([\'\\"\\s]*([^\'\\"\\s]*)[\'\\"\\s]*\\)/', array($this, 'fix_url_path'), $content);
}
}
示例5:
<?php
ICE_Loader::load('utils/webfont');
?>
<div id="typography-ff"></div>
<script type="text/javascript">
(function($){
var options = {};
// add application options
options.jsonUrl = '<?php
print ICE_Webfont::instance(0)->url;
?>
';
options.slantText = '<?php
_e('Slant', infinity_text_domain);
?>
';
options.serviceText = '<?php
_e('Service', infinity_text_domain);
?>
';
options.variantText = '<?php
_e('Thickness', infinity_text_domain);
?>
';
options.subsetText = '<?php
_e('Script', infinity_text_domain);
?>
';
options.match =
示例6: infinity_scheme_init
<?php
/**
* Infinity Theme: scheme initilization 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-api
* @since 1.0
*/
ICE_Loader::load('schemes');
/**
* Initialize and load the scheme for the active theme
*
* @package Infinity-api
* @return boolean
*/
function infinity_scheme_init()
{
// initialize the scheme
ICE_Scheme::instance()->set_config_file(INFINITY_SLUG)->set_config_dir(INFINITY_ENGINE_DIR . '/config')->set_docs_dir(INFINITY_ENGINE_DIR . '/documents')->set_exts_dir(INFINITY_ENGINE_DIR . '/extensions')->init(INFINITY_NAME);
// initialize policies (the order is important here)
Infinity_Sections_Policy::instance();
Infinity_Options_Policy::instance();
Infinity_Features_Policy::instance();
Infinity_Screens_Policy::instance();
Infinity_Widgets_Policy::instance();
Infinity_Shortcodes_Policy::instance();
return true;
示例7: instance
<?php
/**
* Infinity Theme: shortcodes classes 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-api
* @subpackage shortcodes
* @since 1.0
*/
ICE_Loader::load('components/shortcodes');
/**
* Infinity Theme: shortcodes policy
*
* @package Infinity-api
* @subpackage shortcodes
*/
class Infinity_Shortcodes_Policy extends ICE_Shortcode_Policy
{
/**
* @return ICE_Shortcode_Policy
*/
public static function instance()
{
self::$calling_class = __CLASS__;
return parent::instance();
}
/**
示例8: 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;
}
示例9:
<?php
/**
* ICE API: file system helper 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_cache');
/**
* Make the File System Easy
*
* @package ICE
* @subpackage utils
* @uses ICE_Files_Exception
*/
final class ICE_Files extends ICE_Base
{
/**
* File cache instance
*
* @var ICE_File_Cache
*/
private static $fcache;
/**
* Cached doc root
示例10: 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');
示例11:
<?php
/**
* ICE API: UI control panel 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 ui
* @since 1.0
*/
ICE_Loader::load('dom/script');
/**
* Make cool control panels easy
*
* @package ICE
* @subpackage ui
*/
final class ICE_Ui_Cpanel extends ICE_Base
{
/**
* The screens policy instance
*
* @var ICE_Screen_Policy
*/
private $policy;
/**
* The CSS id of the control panel (also used as a prefix)
*
示例12: position
<?php
/**
* ICE API: base positionable 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 ui
* @since 1.0
*/
ICE_Loader::load('ui/position');
/**
* Make positioning implementation easy
*
* @package ICE
* @subpackage ui
*/
interface ICE_Positionable
{
/**
* Set/Return the position
*
* @param ICE_Position $position
* @return ICE_Position
*/
public function position(ICE_Position $position = null);
}
示例13:
<?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
{
}
示例14:
<?php
/**
* ICE API: options option 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 options
* @since 1.0
*/
ICE_Loader::load('base/component', 'utils/docs', 'schemes');
/**
* Make an option easy
*
* @package ICE-components
* @subpackage options
*/
abstract class ICE_Option extends ICE_Component
{
/**
* The string on which to split field option key => values
*/
const FIELD_OPTION_DELIM = '=';
/**
* If true, a POST value will override the real option value
*
* @var boolean
*/
示例15:
<?php
/**
* ICE API: base asset abstract 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 dom
* @since 1.0
*/
ICE_Loader::load('base/exportable', 'base/recursable');
/**
* Make assets for components easy
*
* @package ICE
* @subpackage dom
* @property-read string $name
*/
abstract class ICE_Asset extends ICE_Base implements ICE_Exportable, ICE_Recursable
{
/**
* @var ICE_Component
*/
private $component;
/**
* Stack of sections
*
* @var ICE_Map