• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fw函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: enqueue_static

 public function enqueue_static()
 {
     wp_enqueue_style('fw-builder-' . $this->get_builder_type() . '-item-' . $this->get_type(), $this->get_uri('/static/css/styles.css'));
     wp_enqueue_script('fw-builder-' . $this->get_builder_type() . '-item-' . $this->get_type(), $this->get_uri('/static/js/scripts.js'), array('fw-events'), false, true);
     wp_localize_script('fw-builder-' . $this->get_builder_type() . '-item-' . $this->get_type(), 'fw_form_builder_item_type_' . $this->get_type(), array('l10n' => array('item_title' => __('Dropdown', 'fw'), 'label' => __('Label', 'fw'), 'toggle_required' => __('Toggle mandatory field', 'fw'), 'edit' => __('Edit', 'fw'), 'delete' => __('Delete', 'fw'), 'edit_label' => __('Edit Label', 'fw')), 'options' => $this->get_options(), 'defaults' => array('type' => $this->get_type(), 'options' => fw_get_options_values_from_input($this->get_options(), array()))));
     fw()->backend->enqueue_options_static($this->get_options());
 }
开发者ID:alireza--noori,项目名称:initial-portfolio-website-test-,代码行数:7,代码来源:class-fw-option-type-form-builder-item-select.php


示例2: _render

 /**
  * @internal
  * {@inheritdoc}
  */
 protected function _render($id, $option, $data)
 {
     $static_uri = fw()->extensions->get('page-builder')->get_uri('/includes/page-builder/static');
     $version = fw()->extensions->get('page-builder')->manifest->get_version();
     wp_enqueue_style('fw-option-type-' . $this->get_type(), $static_uri . '/css/styles.css', array(), $version);
     /*
      * there should not be (and it does not make sens to be)
      * more than one page builder per page that is integrated
      * with the default post content editor
      * integration in the sens of inserting the button to activate/deactivate
      * the builder, to replace the post content with the shortcode notation
      */
     if ($this->editor_integration_enabled && $option['editor_integration'] === true) {
         trigger_error(__('There must not be more than one page Editor integrated with the wp post editor per page', 'fw'), E_USER_ERROR);
     } elseif ($option['editor_integration'] === true) {
         $this->editor_integration_enabled = true;
         wp_enqueue_style('fw-option-type-' . $this->get_type() . '-editor-integration', $static_uri . '/css/editor_integration.css', array(), $version);
         wp_enqueue_script('fw-option-type-' . $this->get_type() . '-editor-integration', $static_uri . '/js/editor_integration.js', array('jquery', 'fw-events'), $version, true);
         $builder_templates = apply_filters('fw_ext_page_builder_templates', array());
         // remove not existing templates
         $builder_templates = array_intersect(array_keys(wp_get_theme()->get_page_templates()), $builder_templates);
         /**
          * Make sure the array is not associative array('template.php', ...)
          * instead of array(2 => 'template.php', ...)
          * because the json needs to be ['template.php', ...] instead of {2: 'template.php', ...}
          */
         $builder_templates = array_values($builder_templates);
         wp_localize_script('fw-option-type-' . $this->get_type() . '-editor-integration', 'fw_option_type_' . str_replace('-', '_', $this->get_type()) . '_editor_integration_data', array('l10n' => array('showButton' => __('Visual Page Builder', 'fw'), 'hideButton' => __('Default Editor', 'fw')), 'optionId' => $option['attr']['id'], 'renderInBuilderMode' => isset($data['value']['builder_active']) ? $data['value']['builder_active'] : apply_filters('fw_page_builder_set_as_default', false), 'builderTemplates' => $builder_templates));
     }
     return parent::_render($id, $option, $data);
 }
开发者ID:ExtPoint,项目名称:Unyson-PageBuilder-Extension,代码行数:35,代码来源:class-fw-option-type-page-builder.php


示例3: enqueue_static

 public function enqueue_static()
 {
     wp_enqueue_style('fw-builder-' . $this->get_builder_type() . '-item-' . $this->get_type(), $this->get_uri('/static/css/styles.css'));
     wp_enqueue_script('fw-builder-' . $this->get_builder_type() . '-item-' . $this->get_type(), $this->get_uri('/static/js/scripts.js'), array('fw-events'), false, true);
     wp_localize_script('fw-builder-' . $this->get_builder_type() . '-item-' . $this->get_type(), 'fw_form_builder_item_type_' . $this->get_type(), array('options' => $this->get_options(), 'l10n' => array('item_title' => __('Recaptcha', 'fw'), 'label' => __('Label', 'fw'), 'edit_label' => __('Edit Label', 'fw'), 'edit' => __('Edit', 'fw'), 'delete' => __('Delete', 'fw'), 'site_key' => __('Set site key', 'fw'), 'secret_key' => __('Set secret key', 'fw')), 'defaults' => array('type' => $this->get_type(), 'options' => fw_get_options_values_from_input($this->get_options(), array()))));
     fw()->backend->enqueue_options_static($this->get_options());
 }
开发者ID:HilderH,项目名称:emprendamos,代码行数:7,代码来源:class-fw-option-type-form-builder-item-recaptcha.php


示例4: __construct

 public function __construct()
 {
     $user_config = fw()->extensions->get('sidebars')->get_config();
     $this->config['sidebar_positions'] = fw_akg('sidebar_positions', $user_config, array());
     $this->config['dynamic_sidebar_args'] = fw_akg('dynamic_sidebar_args', $user_config, array());
     $this->config = array_merge($this->config, $this->get_config_defaults());
 }
开发者ID:halkibsi,项目名称:Unyson,代码行数:7,代码来源:class-fw-extension-sidebars-config.php


示例5: _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);
 }
开发者ID:HilderH,项目名称:emprendamos,代码行数:11,代码来源:class-fw-option-type-switch.php


示例6: _enqueue_static

 /**
  * @internal
  * {@inheritdoc}
  */
 protected function _enqueue_static($id, $option, $data)
 {
     wp_enqueue_script('fw-option-type-' . $this->get_type(), $this->js_uri . '/scripts.js', array('jquery', 'fw-events', 'editor', 'fw'), fw()->manifest->get_version(), true);
     wp_enqueue_style('editor-buttons-css', includes_url("/css/editor.min.css"), array(), fw()->manifest->get_version());
     wp_enqueue_style('dashicons-css', includes_url("css/dashicons.min.css"), array(), fw()->manifest->get_version());
     wp_enqueue_style('fw-option-type-' . $this->get_type(), $this->css_uri . '/styles.css', array(), fw()->manifest->get_version());
 }
开发者ID:floq-design,项目名称:Unyson,代码行数:11,代码来源:class-fw-option-type-wp-editor.php


示例7: _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'), 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/' . $this->get_type() . '.js'), array('underscore', 'fw-events', 'jquery-ui-sortable', 'fw'), fw()->manifest->get_version(), true);
     fw()->backend->enqueue_options_static($option['popup-options']);
     return true;
 }
开发者ID:northpen,项目名称:northpen,代码行数:11,代码来源:class-fw-option-type-addable-popup.php


示例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_EXTENSIONS_DIR . $rel_path . '/shortcodes';
         if (file_exists($fw_path)) {
             self::load_from_shortcodes_folder(array('path' => $fw_path, 'uri' => FW_EXTENSIONS_URI . $rel_path . '/shortcodes'));
         }
         // parent theme framework-customizations
         $parent_fws_path = FW_PT_EXTENSIONS_DIR . $rel_path . '/shortcodes';
         if (file_exists($parent_fws_path)) {
             self::load_from_shortcodes_folder(array('path' => $parent_fws_path, 'uri' => FW_PT_EXTENSIONS_URI . $rel_path . '/shortcodes'));
         }
         // child theme framework-customizations
         if (FW_CT) {
             $child_fws_path = FW_CT_EXTENSIONS_DIR . $rel_path . '/shortcodes';
             if (file_exists($child_fws_path)) {
                 self::load_from_shortcodes_folder(array('path' => $child_fws_path, 'uri' => FW_CT_EXTENSIONS_URI . $rel_path . '/shortcodes'));
             }
         }
         if (!empty($children)) {
             self::load_from_extensions_recursive($children);
         }
     }
 }
开发者ID:AdsonCicilioti,项目名称:Unyson,代码行数:32,代码来源:class-fw-shortcodes-loader.php


示例9: fw_ext_portfolio_get_sort_classes

/**
 * @param WP_Post[] $items
 * @param array $categories
 * @param string $prefix
 *
 * @return array
 */
function fw_ext_portfolio_get_sort_classes(array $items, array $categories, $prefix = 'category_')
{
    $ext_portfolio_settings = fw()->extensions->get('portfolio')->get_settings();
    $taxonomy = $ext_portfolio_settings['taxonomy_name'];
    $classes = array();
    $categories_classes = array();
    foreach ($items as $key => $item) {
        $class_name = '';
        $terms = wp_get_post_terms($item->ID, $taxonomy);
        foreach ($terms as $term) {
            foreach ($categories as $category) {
                if ($term->term_id == $category->term_id) {
                    $class_name .= $prefix . $category->term_id . ' ';
                    $categories_classes[$term->term_id] = true;
                } else {
                    if (in_array($term->term_id, $category->children, true)) {
                        $class_name .= $prefix . $category->term_id . ' ';
                        $categories_classes[$term->term_id] = true;
                    }
                }
                $classes[$item->ID] = $class_name;
            }
        }
    }
    return $classes;
}
开发者ID:northpen,项目名称:northpen,代码行数:33,代码来源:helpers.php


示例10: _render

 /**
  * @internal
  */
 protected function _render($id, $option, $data)
 {
     $data['value'] = fw_ext('mailer')->get_db_settings_option();
     $wrapper_attr = $option['attr'];
     unset($wrapper_attr['name'], $wrapper_attr['value']);
     return '<div ' . fw_attr_to_html($wrapper_attr) . '>' . fw()->backend->option_type('multi')->render($id, array('inner-options' => $this->get_inner_options()), $data) . '</div>';
 }
开发者ID:chrisuehlein,项目名称:couponsite,代码行数:10,代码来源:class-fw-option-type-mailer.php


示例11: woffice_pre_set_transient_update_theme

function woffice_pre_set_transient_update_theme($transient)
{
    /*We first check if it's the purchase code has been entered */
    $status = get_option('woffice_license');
    if ($status == "checked") {
        if (empty($transient->checked)) {
            return $transient;
        }
        $theme_version = fw()->theme->manifest->get('version');
        $theme_slug = fw()->theme->manifest->get('id');
        $request_string = array('body' => array('action' => 'check_updated', 'version' => $theme_version));
        /* We use our API */
        $raw_response = wp_remote_post('http://alka-web.com/woffice-updater/theme-updater.php', $request_string);
        /* We check */
        $response = null;
        if (!is_wp_error($raw_response) && $raw_response['response']['code'] == 200) {
            $response = unserialize($raw_response['body']);
        }
        if (!empty($response)) {
            // Feed the update data into WP updater
            $transient->response[$theme_slug] = $response;
        }
        return $transient;
    }
}
开发者ID:2Fwebd,项目名称:woffice-updater,代码行数:25,代码来源:hooks.php


示例12: load_extension_shortcodes

 /**
  * @param FW_Extension $extension
  */
 private static function load_extension_shortcodes($extension)
 {
     $ext_name = $extension->get_name();
     if (version_compare(fw()->manifest->get_version(), '2.2', '<')) {
         $ext_rel_path = $extension->get_rel_path();
         if ($extension->get_declared_source() === 'framework') {
             self::load_folder_shortcodes($ext_name, array('path' => $extension->get_declared_path('/shortcodes'), 'uri' => $extension->get_declared_URI('/shortcodes')), array('paths' => array(fw_get_stylesheet_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes'), fw_get_template_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes')), 'uris' => array(fw_get_stylesheet_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes'), fw_get_template_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes'))));
             self::load_folder_shortcodes($ext_name, array('path' => fw_get_template_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes'), 'uri' => fw_get_template_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes')), array('paths' => array(fw_get_stylesheet_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes')), 'uris' => array(fw_get_stylesheet_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes'))));
             self::load_folder_shortcodes($ext_name, array('path' => fw_get_stylesheet_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes'), 'uri' => fw_get_stylesheet_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes')));
         } elseif ($extension->get_declared_source() === 'parent') {
             self::load_folder_shortcodes($ext_name, array('path' => $extension->get_declared_path('/shortcodes'), 'uri' => $extension->get_declared_URI('/shortcodes')), array('paths' => array(fw_get_stylesheet_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes')), 'uris' => array(fw_get_stylesheet_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes'))));
             self::load_folder_shortcodes($ext_name, array('path' => fw_get_stylesheet_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes'), 'uri' => fw_get_stylesheet_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes')));
         } else {
             self::load_folder_shortcodes($ext_name, array('path' => $extension->get_declared_path('/shortcodes'), 'uri' => $extension->get_declared_URI('/shortcodes')));
         }
     } else {
         $customizations_locations = array('paths' => array(), 'uris' => array());
         foreach ($extension->get_customizations_locations() as $path => $uri) {
             $customizations_locations['paths'][] = $path . '/shortcodes';
             $customizations_locations['uris'][] = $uri . '/shortcodes';
         }
         $path = $extension->get_path('/shortcodes');
         $uri = $extension->get_uri('/shortcodes');
         do {
             if (empty($customizations_locations['paths'])) {
                 $customizations_locations = array();
             }
             self::load_folder_shortcodes($ext_name, array('path' => $path, 'uri' => $uri), $customizations_locations);
             if ($customizations_locations) {
                 $path = array_pop($customizations_locations['paths']);
                 $uri = array_pop($customizations_locations['uris']);
             }
         } while ($customizations_locations);
     }
 }
开发者ID:northpen,项目名称:northpen,代码行数:38,代码来源:class-fw-shortcodes-loader.php


示例13: _filter_fw_ext_commercial_template_include

/**
 * Check if the there are defined views for the commercial templates, otherwise are used theme templates
 *
 * @param string $template
 *
 * @return string
 */
function _filter_fw_ext_commercial_template_include($template)
{
    /**
     * @var FW_Extension_Commercial $Commercial
     */
    $commercial = fw()->extensions->get('commercial');
    if (is_singular($commercial->get_post_type_name())) {
        if (preg_match('/single-' . '.*\\.php/i', basename($template)) === 1) {
            return $template;
        }
        if ($commercial->locate_view_path('single')) {
            return $commercial->locate_view_path('single');
        } else {
            add_filter('the_content', '_filter_fw_ext_commercial_the_content');
        }
    } else {
        if (is_tax($commercial->get_taxonomy_name()) && $commercial->locate_view_path('taxonomy')) {
            if (preg_match('/taxonomy-' . '.*\\.php/i', basename($template)) === 1) {
                return $template;
            }
            return $commercial->locate_view_path('taxonomy');
        } else {
            if (is_post_type_archive($commercial->get_post_type_name()) && $commercial->locate_view_path('archive')) {
                if (preg_match('/archive-' . '.*\\.php/i', basename($template)) === 1) {
                    return $template;
                }
                return $commercial->locate_view_path('archive');
            }
        }
    }
    return $template;
}
开发者ID:northpen,项目名称:project_11,代码行数:39,代码来源:hooks.php


示例14: _render

 /**
  * @internal
  */
 protected function _render($id, $option, $data)
 {
     wp_enqueue_style('fw-option-' . $this->get_type(), FW_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_URI . '/includes/option-types/' . $this->get_type() . '/static/js/scripts.js', array('jquery'), fw()->manifest->get_version());
     $output = fw_render_view(FW_DIR . '/includes/option-types/' . $this->get_type() . '/view.php', array('id' => $id, 'option' => $option, 'data' => $data));
     return $output;
 }
开发者ID:AdsonCicilioti,项目名称:Unyson,代码行数:10,代码来源:class-fw-option-type-gradient.php


示例15: fw_ext_events_render_map

 function fw_ext_events_render_map($post_id = 0)
 {
     if (0 === $post_id && null === ($post_id = get_the_ID())) {
         return null;
     }
     $fw_ext_events = fw()->extensions->get('events');
     if (empty($fw_ext_events)) {
         return null;
     }
     $post = get_post($post_id);
     if ($post->post_type !== $fw_ext_events->get_post_type_name()) {
         return null;
     }
     $shortcode_ext = fw()->extensions->get('shortcodes');
     if (empty($shortcode_ext)) {
         return null;
     }
     $shortcode_map = $shortcode_ext->get_shortcode('map');
     if (empty($shortcode_map)) {
         return null;
     }
     $options = fw_get_db_post_option($post->ID, $fw_ext_events->get_event_option_id());
     if (empty($options['event_location']['location']) or empty($options['event_location']['coordinates']['lat']) or empty($options['event_location']['coordinates']['lng'])) {
         return null;
     }
     return $shortcode_map->render_custom(array(array('title' => $post->post_title, 'url' => get_permalink($post->ID), 'description' => $options['event_location']['location'], 'thumb' => array('attachment_id' => get_post_thumbnail_id($post->ID)), 'location' => array('coordinates' => array('lat' => $options['event_location']['coordinates']['lat'], 'lng' => $options['event_location']['coordinates']['lng'])))), array('map_height' => false, 'map_type' => false));
 }
开发者ID:northpen,项目名称:project_11,代码行数:27,代码来源:helpers.php


示例16: _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());
 }
开发者ID:ExtPoint,项目名称:Unyson,代码行数:11,代码来源:class-fw-option-type-range-slider.php


示例17: _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());
 }
开发者ID:puriwp,项目名称:Theme-Framework,代码行数:11,代码来源:class-fw-option-type-typography.php


示例18: 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);
         }
     }
 }
开发者ID:outlinez,项目名称:Unyson,代码行数:32,代码来源:class-fw-shortcodes-loader.php


示例19: get_builder_data

 private function get_builder_data()
 {
     if (empty($this->builder_data)) {
         $shortcodes = fw()->extensions->get('shortcodes')->get_shortcodes();
         foreach ($shortcodes as $tag => $shortcode) {
             $config = $shortcode->get_config('page_builder');
             if ($config) {
                 // check if the shortcode type is valid
                 $config = array_merge(array('type' => $this->type), $config);
                 if ($config['type'] !== $this->get_type()) {
                     continue;
                 }
                 if (!isset($config['tab'])) {
                     trigger_error(sprintf(__("No Page Builder tab specified for shortcode: %s", 'fw'), $tag), E_USER_WARNING);
                 }
                 $item_data = array_merge(array('tab' => '~', 'title' => $tag, 'description' => '', 'localize' => array('edit' => __('Edit', 'fw'), 'remove' => __('Remove', 'fw'), 'duplicate' => __('Duplicate', 'fw')), 'icon' => null, 'title_template' => null), $config);
                 if (!isset($item_data['icon']) && ($icon = $shortcode->locate_URI('/static/img/page_builder.png'))) {
                     $item_data['icon'] = $icon;
                 }
                 // if the shortcode has options we store them and then they are passed to the modal
                 $options = $shortcode->get_options();
                 if ($options) {
                     $item_data['options'] = $this->transform_options($options);
                     fw()->backend->enqueue_options_static($options);
                 }
                 $this->builder_data[$tag] = $item_data;
             }
         }
     }
     return $this->builder_data;
 }
开发者ID:ExtPoint,项目名称:Unyson-PageBuilder-Extension,代码行数:31,代码来源:class-page-builder-simple-item.php


示例20: _action_init_framework

 function _action_init_framework()
 {
     remove_action('after_setup_theme', '_action_init_framework');
     $fw_dir = dirname(__FILE__);
     include $fw_dir . '/bootstrap-helpers.php';
     require $fw_dir . '/core/Fw.php';
     fw();
     /**
      * Load helpers
      */
     foreach (array('meta', 'class-fw-access-key', 'class-fw-dumper', 'general', 'class-fw-wp-filesystem', 'class-fw-cache', 'class-fw-form', 'class-fw-request', 'class-fw-session', 'class-fw-wp-option', 'class-fw-wp-meta', 'database', 'class-fw-flash-messages', 'class-fw-resize', 'class-fw-wp-list-table') as $file) {
         require $fw_dir . '/helpers/' . $file . '.php';
     }
     /**
      * Load includes
      */
     foreach (array('hooks') as $file) {
         require $fw_dir . '/includes/' . $file . '.php';
     }
     $components = array('theme', 'extensions', 'backend');
     foreach ($components as $component) {
         fw()->{$component}->_init();
     }
     foreach ($components as $component) {
         fw()->{$component}->_after_components_init();
     }
     /**
      * The framework is loaded
      */
     do_action('fw_init');
 }
开发者ID:HilderH,项目名称:emprendamos,代码行数:31,代码来源:bootstrap.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fw_akg函数代码示例发布时间:2022-05-15
下一篇:
PHP fusion_get_settings函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap