本文整理汇总了PHP中Resources::embed方法的典型用法代码示例。如果您正苦于以下问题:PHP Resources::embed方法的具体用法?PHP Resources::embed怎么用?PHP Resources::embed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resources
的用法示例。
在下文中一共展示了Resources::embed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pathinfo
$lang_file = './js/jquery_ui/i18n/jquery.ui.datepicker-' . cot::$usr['lang'] . '.js';
}
Resources::$rc_link_func($lang_file, 'js', 60);
}
}
if ($uidt_cfg['enable_timepicker']) {
$timepicker_path = pathinfo($uidt_cfg['timepicker_js'], PATHINFO_DIRNAME);
Resources::addFile($uidt_cfg['timepicker_css'], 'css', 70);
Resources::$rc_link_func($uidt_cfg['timepicker_js'], 'js', 70);
if ($usr['lang'] != 'en') {
$lang_file = $timepicker_path . "/i18n/jquery-ui-timepicker-{$usr['lang']}.js";
Resources::$rc_link_func($lang_file, 'js', 70);
}
if ($uidt_cfg['support_touch']) {
Resources::$rc_link_func($timepicker_path . "/jquery-ui-sliderAccess.js", 'js', 70);
}
} else {
$ui_off_code = 'var ui_time_off = true;';
}
if (!$uidt_cfg['enable_datepicker']) {
$ui_off_code .= 'var ui_date_off = true;';
}
Resources::$rc_link_func(cot::$cfg['plugins_dir'] . "/{$plug_name}/js/{$plug_name}.js", 'js', 70);
if ($admintools) {
Resources::$rc_link_func(cot::$cfg['plugins_dir'] . "/{$plug_name}/js/{$plug_name}.tools.js", 'js', 70);
}
if ($ui_off_code) {
Resources::embed($plug_name, $ui_off_code);
}
}
}
示例2: cot_rc_embed
/**
* A shortcut for plain output of an embedded stylesheet/javascript in the header of the page
*
* @global array $out Output snippets
* @param string $code Stylesheet or javascript code
* @param bool $prepend Prepend this file before other head outputs
* @param string $type Resource type: 'js' or 'css'
*
* @deprecated Will be removed in v.1.0. Resources::embed() instead
*/
function cot_rc_embed($code, $prepend = false, $type = 'js')
{
$order = 60;
if ($prepend) {
$order = 40;
}
Resources::embed($code, $type, $order);
}