当前位置: 首页>>代码示例>>PHP>>正文


PHP fw_render_view函数代码示例

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


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


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