本文整理汇总了PHP中fw_get_framework_directory_uri函数的典型用法代码示例。如果您正苦于以下问题:PHP fw_get_framework_directory_uri函数的具体用法?PHP fw_get_framework_directory_uri怎么用?PHP fw_get_framework_directory_uri使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fw_get_framework_directory_uri函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _enqueue_static
/**
* @internal
* {@inheritdoc}
*/
protected function _enqueue_static($id, $option, $data)
{
wp_enqueue_style('fw-option-' . $this->get_type() . 'ion-range-slider', fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/libs/ion-range-slider/ion.rangeSlider.css'), '2.0.3');
wp_enqueue_script('fw-option-' . $this->get_type() . 'ion-range-slider', fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/libs/ion-range-slider/ion.rangeSlider.min.js'), array('jquery', 'fw-moment'), '2.0.3');
wp_enqueue_style('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/css/styles.css'), fw()->manifest->get_version());
wp_enqueue_script('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/js/scripts.js'), array('jquery', 'fw-events', 'underscore', 'fw-option-' . $this->get_type() . 'ion-range-slider'), fw()->manifest->get_version());
}
示例2: _enqueue_static
/**
* @internal
* {@inheritdoc}
*/
protected function _enqueue_static($id, $option, $data)
{
wp_enqueue_style('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/css/styles.css'), array('fw-selectize'), fw()->manifest->get_version());
fw()->backend->option_type('color-picker')->enqueue_static();
wp_enqueue_script('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/js/scripts.js'), array('jquery', 'underscore', 'fw', 'fw-selectize'), fw()->manifest->get_version());
wp_localize_script('fw-option-' . $this->get_type(), 'fw_typography_fonts', $this->get_fonts());
}
示例3: _render
/**
* @internal
*/
protected function _render($id, $option, $data)
{
wp_enqueue_style('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/css/styles.css'), array(), fw()->manifest->get_version());
wp_enqueue_script('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/js/scripts.js'), array('jquery'), fw()->manifest->get_version());
$output = fw_render_view(fw_get_framework_directory('/includes/option-types/' . $this->get_type() . '/view.php'), array('id' => $id, 'option' => $option, 'data' => $data));
return $output;
}
示例4: _enqueue_static
protected function _enqueue_static($id, $option, $values, $data)
{
$uri = fw_get_framework_directory_uri('/includes/container-types/popup');
wp_enqueue_script('fw-container-type-' . $this->get_type(), $uri . '/scripts.js', array('jquery', 'fw-events', 'fw'), fw()->manifest->get_version());
wp_enqueue_style('fw');
wp_enqueue_style('fw-container-type-' . $this->get_type(), $uri . '/styles.css', array(), fw()->manifest->get_version());
}
示例5: _enqueue_static
/**
* @internal
* {@inheritdoc}
*/
protected function _enqueue_static($id, $option, $data)
{
wp_enqueue_style('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/css/styles.css'), array(), fw()->manifest->get_version());
wp_enqueue_script('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/js/scripts.js'), array('fw-events', 'jquery-ui-sortable'), fw()->manifest->get_version(), true);
fw()->backend->enqueue_options_static($option['box-options']);
return true;
}
示例6: _init
/**
* @internal
*/
protected function _init()
{
$this->views_path = dirname(__FILE__) . '/views/';
$static_uri = fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/');
$this->js_uri = $static_uri . 'js/';
$this->css_uri = $static_uri . 'css/';
}
示例7: _enqueue_static
/**
* @internal
* {@inheritdoc}
*/
protected function _enqueue_static($id, $option, $data)
{
wp_enqueue_style('fw-option-' . $this->get_type() . '-adaptive-switch', fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/adaptive-switch/styles.css'), array(), fw()->manifest->get_version());
wp_enqueue_script('fw-option-' . $this->get_type() . '-adaptive-switch', fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/adaptive-switch/jquery.adaptive-switch.js'), array('jquery'), fw()->manifest->get_version(), true);
wp_enqueue_style('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/css/styles.css'), array('fw-option-' . $this->get_type() . '-adaptive-switch'), fw()->manifest->get_version());
wp_enqueue_script('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/js/scripts.js'), array('fw-events', 'fw-option-' . $this->get_type() . '-adaptive-switch'), fw()->manifest->get_version(), true);
}
示例8: load_from_extensions_recursive
private static function load_from_extensions_recursive($extensions)
{
/*
* Loop each extension
* if it has a shortcodes folder load the shortcodes from it
* if an extension has subextensions then recursion
*/
foreach ($extensions as $ext_name => $children) {
$extension = fw()->extensions->get($ext_name);
$rel_path = $extension->get_rel_path();
// framework
$fw_path = fw_get_framework_directory('/extensions' . $rel_path . '/shortcodes');
if (file_exists($fw_path)) {
self::load_from_shortcodes_folder(array('path' => $fw_path, 'uri' => fw_get_framework_directory_uri('/extensions' . $rel_path . '/shortcodes')));
}
// parent theme framework-customizations
$parent_fws_path = fw_get_template_customizations_directory('/extensions' . $rel_path . '/shortcodes');
if (file_exists($parent_fws_path)) {
self::load_from_shortcodes_folder(array('path' => $parent_fws_path, 'uri' => fw_get_template_customizations_directory_uri('/extensions' . $rel_path . '/shortcodes')));
}
// child theme framework-customizations
if (is_child_theme()) {
$child_fws_path = fw_get_stylesheet_customizations_directory('/extensions' . $rel_path . '/shortcodes');
if (file_exists($child_fws_path)) {
self::load_from_shortcodes_folder(array('path' => $child_fws_path, 'uri' => fw_get_stylesheet_customizations_directory_uri('/extensions' . $rel_path . '/shortcodes')));
}
}
if (!empty($children)) {
self::load_from_extensions_recursive($children);
}
}
}
示例9: _render
/**
* Generate option's html from option array
* @param string $id
* @param array $option
* @param array $data
* @return string HTML
* @internal
*/
protected function _render($id, $option, $data)
{
unset($option['attr']['name'], $option['attr']['value']);
$option['attr']['data-for-js'] = json_encode(array('title' => empty($option['popup-title']) ? $option['label'] : $option['popup-title'], 'options' => $this->transform_options($option['popup-options']), 'template' => $option['template'], 'size' => $option['size'], 'limit' => $option['limit']));
$sortable_image = fw_get_framework_directory_uri('/static/img/sort-vertically.png');
return fw_render_view(fw_get_framework_directory('/includes/option-types/' . $this->get_type() . '/views/view.php'), compact('id', 'option', 'data', 'sortable_image'));
}
示例10: _enqueue_static
/**
* @internal
* {@inheritdoc}
*/
protected function _enqueue_static($id, $option, $data)
{
$uri = fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type());
wp_enqueue_style('fw-option-type-' . $this->get_type(), $uri . '/static/css/multi-picker.css', array(), fw()->manifest->get_version());
wp_enqueue_script('fw-option-type-' . $this->get_type(), $uri . '/static/js/multi-picker.js', array('jquery', 'fw-events'), fw()->manifest->get_version(), true);
fw()->backend->enqueue_options_static($this->prepare_option($id, $option));
return true;
}
示例11: _render
/**
* @internal
*/
protected function _render($id, $option, $data)
{
// this js contains custom changes
wp_enqueue_script('fw-option-' . $this->get_type() . '-image-picker', fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/js/image-picker/image-picker.js'), array(), fw()->manifest->get_version(), true);
wp_enqueue_style('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/css/styles.css'), array('qtip'), fw()->manifest->get_version());
wp_enqueue_script('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/js/scripts.js'), array('fw-events', 'qtip'), fw()->manifest->get_version(), true);
$wrapper_attr = array('id' => $option['attr']['id'], 'class' => $option['attr']['class']);
foreach ($wrapper_attr as $attr_name => $attr_val) {
unset($option['attr'][$attr_name]);
}
$option['value'] = (string) $data['value'];
unset($option['attr']['multiple']);
/**
* pre loads images on page load
*
* fixes glitch with preview:
* * hover first time - show wrong because image not loaded and has no height/width and cannot detect correctly popup position
* * hover second time - show correctly
*/
$pre_load_images_html = '';
$html = '';
$html .= '<select ' . fw_attr_to_html($option['attr']) . '>';
if (!empty($option['blank']) and $option['blank'] === true) {
$html .= '<option value=""></option>';
}
foreach ($option['choices'] as $key => $choice) {
$attr = array('value' => $key);
if ($option['value'] == $key) {
$attr['selected'] = 'selected';
}
if (is_string($choice)) {
// is 'http://.../small.png'
$choice = array('small' => array('src' => $choice));
}
if (is_string($choice['small'])) {
// is 'http://.../small.png'
$choice['small'] = array('src' => $choice['small']);
}
$attr['data-small-img-attr'] = json_encode($choice['small']);
// required by image-picker plugin
$attr['data-img-src'] = $choice['small']['src'];
if (!empty($choice['large'])) {
if (is_string($choice['large'])) {
// is 'http://.../large.png'
$choice['large'] = array('src' => $choice['large']);
}
$attr['data-large-img-attr'] = json_encode($choice['large']);
$pre_load_images_html .= fw_html_tag('img', array('src' => $choice['large']['src']));
}
if (!empty($choice['data'])) {
// used in js events
$attr['data-extra-data'] = json_encode($choice['data']);
}
$html .= fw_html_tag('option', $attr, fw_htmlspecialchars(isset($choice['label']) ? $choice['label'] : ''));
}
$html .= '</select>';
return fw_html_tag('div', $wrapper_attr, $html . '<div class="pre-loaded-images"><br/><br/>' . $pre_load_images_html . '</div>');
}
示例12: _render
/**
* @internal
*/
protected function _render($id, $option, $data)
{
wp_enqueue_style('fw-option-type-' . $this->get_type() . '-if', fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/css/styles.css'), array('fw-font-awesome'), fw()->manifest->get_version());
wp_enqueue_script('fw-option-type-' . $this->get_type() . '-dialog', fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/js/scripts.js'), array('jquery', 'fw-events'), fw()->manifest->get_version());
$option['value'] = (string) $data['value'];
unset($option['attr']['value']);
// be sure to remove value from attributes
return fw_render_view(dirname(__FILE__) . '/view.php', compact('id', 'option', 'data'));
}
示例13: _enqueue_static
protected function _enqueue_static($id, $option, $data)
{
$this->packs_loader->enqueue_admin_css();
$static_URI = fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/');
wp_enqueue_style('fw-selectize');
wp_enqueue_script('fw-option-type-' . $this->get_type() . '-backend-previews', $static_URI . 'js/render-icon-previews.js', array('jquery', 'fw', 'fw-events', 'fw-selectize'), fw()->manifest->get_version());
wp_enqueue_script('fw-option-type-' . $this->get_type() . '-backend-picker', $static_URI . 'js/icon-picker.js', array('fw-option-type-' . $this->get_type() . '-backend-previews'), fw()->manifest->get_version());
wp_enqueue_style('fw-option-type-' . $this->get_type() . '-backend-picker', $static_URI . 'css/picker.css', array(), fw()->manifest->get_version());
wp_localize_script('fw-option-type-' . $this->get_type() . '-backend-previews', 'fw_icon_v2_data', array('edit_icon_label' => __('Edit Icon', 'fw'), 'add_icon_label' => __('Add Icon', 'fw'), 'icon_fonts_label' => __('Icon Fonts', 'fw'), 'custom_upload_label' => __('Custom Upload', 'fw'), 'favorites_label' => __('Favorites', 'fw'), 'search_label' => __('Search Icon', 'fw'), 'select_pack_label' => __('Select Pack', 'fw'), 'all_packs_label' => __('All Packs', 'fw'), 'favorites_empty_label' => __('<h4>You have no favorite icons yet.</h4> To add icons here, simply click on the star (<i class="fw-icon-v2-info dashicons dashicons-star-filled"></i>) button that\'s on top of each icon.', 'fw'), 'icons' => $this->packs_loader->get_packs()));
}
示例14: _render
/**
* @internal
*/
protected function _render($id, $option, $data)
{
$css_path = fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/css/');
$js_path = fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/js/');
wp_enqueue_style('fw-option-type' . $this->get_type(), $css_path . 'multi-picker.css', array(), fw()->manifest->get_version());
wp_enqueue_script('fw-option-type' . $this->get_type(), $js_path . 'multi-picker.js', array('jquery', 'fw-events'), fw()->manifest->get_version(), true);
$options_array = $this->prepare_option($id, $option);
unset($option['attr']['name'], $option['attr']['value']);
return '<div ' . fw_attr_to_html($option['attr']) . '>' . fw()->backend->render_options($options_array, $data['value'], array('id_prefix' => $data['id_prefix'] . $id . '-', 'name_prefix' => $data['name_prefix'] . '[' . $id . ']')) . '</div>';
}
示例15: _enqueue_static
/**
* @internal
* {@inheritdoc}
*/
protected function _enqueue_static($id, $option, $data)
{
static $enqueue = true;
if ($enqueue) {
wp_enqueue_style('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/css/styles.css'), array(), fw()->manifest->get_version());
$enqueue = false;
}
fw()->backend->enqueue_options_static($option['inner-options']);
return true;
}