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

PHP fw_render_view函数代码示例

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

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



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

示例1: _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


示例2: _render

 /**
  * Generate html
  *
  * @param string $id
  * @param array $option Option array merged with _get_defaults()
  * @param array $data {value => _get_value_from_input(), id_prefix => ..., name_prefix => ...}
  *
  * @return string HTML
  * @internal
  */
 protected function _render($id, $option, $data)
 {
     $defaults = $this->_get_defaults();
     $option['preview'] = array_merge($defaults['preview'], $option['preview']);
     $option['attr'] = array_merge($defaults['attr'], $option['attr']);
     return fw_render_view(fw_get_framework_directory('/includes/option-types/' . $this->get_type() . '/view.php'), compact('id', 'option', 'data'));
 }
开发者ID:puriwp,项目名称:Theme-Framework,代码行数:17,代码来源:class-fw-option-type-oembed.php


示例3: _render

 protected function _render($id, $option, $data)
 {
     //replace option datetime formats with moment.js compatible datetime format
     foreach ($option['datetime-pickers'] as &$datetime_picker) {
         if (isset($datetime_picker['timepicker']) && isset($datetime_picker['datepicker'])) {
             if ($datetime_picker['timepicker'] === false && $datetime_picker['datepicker']) {
                 $datetime_picker['format'] = 'Y/m/d';
                 $datetime_picker['moment-format'] = 'YYYY/MM/DD';
             } elseif ($datetime_picker['datepicker'] === false && $datetime_picker['timepicker']) {
                 $datetime_picker['format'] = 'H:i';
                 $datetime_picker['moment-format'] = 'HH:mm';
             } else {
                 $datetime_picker['format'] = 'Y/m/d H:i';
                 $datetime_picker['moment-format'] = 'YYYY/MM/DD HH:mm';
             }
         } else {
             $datetime_picker['format'] = 'Y/m/d H:i';
             $datetime_picker['moment-format'] = 'YYYY/MM/DD HH:mm';
         }
         if (!isset($datetime_picker['scrollInput'])) {
             $datetime_picker['scrollInput'] = false;
         }
     }
     return fw_render_view(dirname(__FILE__) . '/view.php', array('id' => $id, 'option' => $option, 'data' => $data));
 }
开发者ID:puriwp,项目名称:Theme-Framework,代码行数:25,代码来源:class-fw-option-type-datetime-range.php


示例4: _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'));
 }
开发者ID:northpen,项目名称:northpen,代码行数:15,代码来源:class-fw-option-type-addable-popup.php


示例5: widget

 /**
  * @param array $args
  * @param array $instance
  */
 function widget($args, $instance)
 {
     extract($args);
     $user = esc_attr($instance['user']);
     $title = esc_attr($instance['title']);
     $number = (int) esc_attr($instance['number']) > 0 ? esc_attr($instance['number']) : 5;
     $before_widget = str_replace('class="', 'class="widget_twitter_tweets ', $before_widget);
     $title = str_replace('class="', 'class="widget_twitter_tweets ', $before_title) . $title . $after_title;
     $title = $before_title . $title . $after_title;
     //		wp_enqueue_script(
     //			'fw-theme-twitter-widget',
     //			get_template_directory_uri() . '/inc/widgets/twitter/static/js/scripts.js',
     //			array( 'jquery' ),
     //			'1.0'
     //		);
     $tweets = get_site_transient('scratch_tweets_' . $user . '_' . $number);
     if (empty($tweets)) {
         /* @var $connection TwitterOAuth */
         $connection = fw_ext_social_twitter_get_connection();
         $tweets = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=" . $user . "&count=" . $number);
         set_site_transient('scratch_tweets_' . $user . '_' . $number, $tweets, 12 * HOUR_IN_SECONDS);
     }
     $view_path = dirname(__FILE__) . '/views/widget.php';
     echo fw_render_view($view_path, compact('before_widget', 'title', 'tweets', 'number', 'after_widget'));
 }
开发者ID:Umeeshh,项目名称:Scratch-Theme,代码行数:29,代码来源:class-widget-twitter.php


示例6: _filter_fw_ext_portfolio_the_content

/**
 * Replace the content of the current template with the content of portfolio view
 *
 * @param string $the_content
 *
 * @return string
 */
function _filter_fw_ext_portfolio_the_content($the_content)
{
    /**
     * @var FW_Extension_Portfolio $portfolio
     */
    $portfolio = fw()->extensions->get('portfolio');
    return fw_render_view($portfolio->locate_view_path('content'), array('the_content' => $the_content));
}
开发者ID:alireza--noori,项目名称:initial-portfolio-website-test-,代码行数:15,代码来源:hooks.php


示例7: _render

 /**
  * @internal
  */
 protected function _render($id, $option, $data)
 {
     $option = $this->prepare_options($option);
     if (!isset($option['preview']) || $option['preview'] !== false) {
         $option['attr']['data-preview'] = 'yes';
     }
     return fw_render_view(self::$extension['path'] . '/includes/option-types/' . $this->get_type() . '/views/main.php', array('id' => $id, 'option' => $option, 'data' => $data, 'settings' => self::$settings, 'extension' => self::$extension));
 }
开发者ID:puriwp,项目名称:Framework-Styling,代码行数:11,代码来源:class-fw-option-type-style.php


示例8: handle_shortcode

 protected function handle_shortcode($atts, $content, $tag)
 {
     $view_file = $this->get_path() . '/views/' . $atts['table_purpose'] . '.php';
     if (!file_exists($view_file)) {
         trigger_error(sprintf(__('No default view (views/view.php) found for shortcode: %s', 'fw'), $tag), E_USER_ERROR);
     }
     return fw_render_view($view_file, array('atts' => $atts, 'content' => $content, 'tag' => $tag));
 }
开发者ID:AdsonCicilioti,项目名称:Unyson,代码行数:8,代码来源:class-fw-shortcode-table.php


示例9: _filter_fw_ext_commercial_the_content

/**
 * Replace the content of the current template with the content of commercial view
 *
 * @param string $the_content
 *
 * @return string
 */
function _filter_fw_ext_commercial_the_content($the_content)
{
    /**
     * @var FW_Extension_Commercial $commercial
     */
    $commercial = fw()->extensions->get('commercial');
    return fw_render_view($commercial->locate_view_path('content'), array('the_content' => $the_content));
}
开发者ID:northpen,项目名称:project_11,代码行数:15,代码来源:hooks.php


示例10: _filter_fw_ext_events_the_content

/**
 * Replace the content of the current template with the content of event view
 *
 * @param string $the_content
 *
 * @return string
 */
function _filter_fw_ext_events_the_content($the_content)
{
    /**
     * @var FW_Extension_Events $events
     */
    $events = fw()->extensions->get('events');
    return fw_render_view($events->locate_view_path('content'), array('the_content' => $the_content));
}
开发者ID:Code-Divine,项目名称:Dunda-Events-Extension,代码行数:15,代码来源:hooks.php


示例11: _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-events'), fw()->manifest->get_version(), true);
     $option = $this->check_parameters($option);
     $data = $this->check_data($option, $data);
     return fw_render_view(fw_get_framework_directory('/includes/option-types/' . $this->get_type() . '/view.php'), array('id' => $id, 'option' => $option, 'data' => $data));
 }
开发者ID:outlinez,项目名称:Unyson,代码行数:11,代码来源:class-fw-option-type-background-image.php


示例12: frontend_render

 /**
  * {@inheritdoc}
  */
 public function frontend_render(array $item, $input_value)
 {
     $options = $item['options'];
     $attr = array('type' => 'text', 'name' => $item['shortcode'], 'placeholder' => $options['placeholder'], 'value' => is_null($input_value) ? '' : $input_value, 'id' => 'id-' . fw_unique_increment());
     if ($options['required']) {
         $attr['required'] = 'required';
     }
     return fw_render_view($this->locate_path('/views/view.php', dirname(__FILE__) . '/view.php'), array('item' => $item, 'attr' => $attr));
 }
开发者ID:northpen,项目名称:northpen,代码行数:12,代码来源:class-fw-option-type-form-builder-item-email.php


示例13: _render

 /**
  * @internal
  */
 protected function _render($id, $option, $data)
 {
     wp_enqueue_style('fw-option-type-' . $this->get_type() . '-if', FW_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_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'));
 }
开发者ID:AdsonCicilioti,项目名称:Unyson,代码行数:12,代码来源:class-fw-option-type-icon.php


示例14: _render

 /**
  * @internal
  */
 protected function _render($id, $option, $data)
 {
     $option['properties']['type'] = 'single';
     $option['properties']['from'] = isset($data['value']) ? $data['value'] : $option['value'];
     if (isset($option['properties']['values']) && is_array($option['properties']['values'])) {
         $option['properties']['from'] = array_search($option['properties']['from'], $option['properties']['values']);
     }
     $option['attr']['data-fw-irs-options'] = json_encode($this->default_properties($option['properties']));
     return fw_render_view(fw_get_framework_directory('/includes/option-types/' . $this->get_type() . '/view.php'), array('id' => $id, 'option' => $option, 'data' => $data, 'value' => $data['value']));
 }
开发者ID:ExtPoint,项目名称:Unyson,代码行数:13,代码来源:class-fw-option-type-slider.php


示例15: _render

 /**
  * @internal
  */
 protected function _render($id, $option, $data)
 {
     $option['value'] = (string) $data['value'];
     unset($option['attr']['value']);
     // be sure to remove value from attributes
     $option['attr'] = array_merge(array('rows' => '6'), $option['attr']);
     $table_shortcode = fw()->extensions->get('shortcodes')->get_shortcode('table');
     $view_path = $table_shortcode->get_declared_path() . '/includes/fw-option-type-textarea-cell/views/view.php';
     return fw_render_view($view_path, compact('id', 'option', 'data'));
 }
开发者ID:northpen,项目名称:northpen,代码行数:13,代码来源:class-fw-option-type-textarea-cell.php


示例16: _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-selectize'), 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', 'underscore', 'fw', 'fw-selectize'), fw()->manifest->get_version());
     if (!self::$googleFontsPrinted) {
         wp_localize_script('fw-option-' . $this->get_type(), 'googleFonts', self::$fonts['google']);
         self::$googleFontsPrinted = true;
     }
     return fw_render_view(fw_get_framework_directory('/includes/option-types/' . $this->get_type() . '/view.php'), array('id' => $id, 'option' => $option, 'data' => $data, 'fonts' => self::$fonts));
 }
开发者ID:outlinez,项目名称:Unyson,代码行数:13,代码来源:class-fw-option-type-typography.php


示例17: widget

 public function widget($args, $instance)
 {
     extract($args);
     $number = (int) $instance['number'] > 0 ? esc_attr($instance['number']) : 5;
     $recent_posts = $this->fw_get_posts_with_info(array('sort' => 'post_date', 'items' => $number));
     $popular_posts = $this->fw_get_posts_with_info(array('sort' => 'comment_count', 'items' => $number));
     $this->_theme_action_add_static();
     $filepath = dirname(__FILE__) . '/views/widget.php';
     $data = array('before_widget' => str_replace('class="', 'class="wrap-tabs ', $before_widget), 'after_widget' => $after_widget, 'recent_posts' => $recent_posts, 'popular_posts' => $popular_posts);
     echo fw_render_view($filepath, $data);
 }
开发者ID:AdsonCicilioti,项目名称:Unyson,代码行数:11,代码来源:class-fw-widget-blog-tabs.php


示例18: frontend_render

 /**
  * {@inheritdoc}
  */
 public function frontend_render(array $item, $input_value)
 {
     $keys = fw_ext('forms')->get_db_settings_option('recaptcha-keys');
     if (empty($keys)) {
         return '';
     }
     wp_register_script('g-recaptcha', 'https://www.google.com/recaptcha/api.js?onload=fw_forms_builder_item_recaptcha_init&render=explicit&hl=' . get_locale(), array('jquery'), null, true);
     wp_enqueue_script('frontend-recaptcha', $this->get_uri('/static/js/frontend-recaptcha.js'), array('g-recaptcha'), fw_ext('forms')->manifest->get_version(), true);
     wp_localize_script('frontend-recaptcha', 'form_builder_item_recaptcha', array('site_key' => $keys['site-key']));
     return fw_render_view($this->locate_path('/views/view.php', dirname(__FILE__) . '/view.php'), array('item' => $item, 'label' => isset($input_value['label']) ? $input_value['label'] : __('Security Code', 'fw'), 'attr' => array('class' => 'form-builder-item-recaptcha')));
 }
开发者ID:HilderH,项目名称:emprendamos,代码行数:14,代码来源:class-fw-option-type-form-builder-item-recaptcha.php


示例19: widget

 function widget($args, $instance)
 {
     extract($args);
     $flickr_id = esc_attr($instance['flickr_id']);
     $title = esc_attr($instance['title']);
     $number = (int) esc_attr($instance['number']) > 0 ? esc_attr($instance['number']) : 9;
     wp_enqueue_script('fw-theme-flickr-widget', FW_PT_THEME_URI . '/widgets/flickr/static/js/scripts.js', array('jquery'), fw()->theme->manifest->get_version());
     $filepath = dirname(__FILE__) . '/views/widget.php';
     $data = array('number' => $number, 'flickr_id' => $flickr_id, 'before_widget' => str_replace('class="', 'class="widget_flickr_image_gallery ', $before_widget), 'after_widget' => $after_widget, 'title' => str_replace('class="', 'class="widget_flickr_image_gallery ', $before_title) . $title . $after_title);
     echo fw_render_view($filepath, $data);
 }
开发者ID:AdsonCicilioti,项目名称:Unyson,代码行数:11,代码来源:class-fw-widget-flickr.php


示例20: _render

 protected function _render($atts, $content = null, $tag = '')
 {
     if (!isset($atts['table']) || !isset($atts['table']['header_options']) || !isset($atts['table']['header_options']['table_purpose'])) {
         return '';
     }
     $view_file = $this->locate_path('/views/' . $atts['table']['header_options']['table_purpose'] . '.php');
     if (!$view_file) {
         $view_file = $this->get_declared_path('/views/tabular.php');
     }
     $this->enqueue_static();
     return fw_render_view($view_file, array('atts' => $atts, 'content' => $content, 'tag' => $tag));
 }
开发者ID:northpen,项目名称:northpen,代码行数:12,代码来源:class-fw-shortcode-table.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP fw_unique_increment函数代码示例发布时间:2022-05-15
下一篇:
PHP fw_rand_md5函数代码示例发布时间: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