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


PHP SiteOrigin_Widget::so_get_field_name方法代码示例

本文整理汇总了PHP中SiteOrigin_Widget::so_get_field_name方法的典型用法代码示例。如果您正苦于以下问题:PHP SiteOrigin_Widget::so_get_field_name方法的具体用法?PHP SiteOrigin_Widget::so_get_field_name怎么用?PHP SiteOrigin_Widget::so_get_field_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SiteOrigin_Widget的用法示例。


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

示例1: render_after_field

    protected function render_after_field($value, $instance)
    {
        if (!empty($this->fallback)) {
            $fallback_name = $this->get_fallback_field_name($this->base_name);
            $fallback_url = !empty($instance[$fallback_name]) ? $instance[$fallback_name] : '';
            ?>
			<input type="text" value="<?php 
            echo esc_url($fallback_url);
            ?>
"
			       placeholder="<?php 
            esc_attr_e('External URL', 'siteorigin-widgets');
            ?>
"
			       name="<?php 
            echo esc_attr($this->for_widget->so_get_field_name($this->base_name . '_fallback', $this->parent_repeater));
            ?>
"
			       class="media-fallback-external siteorigin-widget-input" />
			<div class="clear"></div>
			<?php 
        } else {
            ?>
			<div class="clear"></div>
			<?php 
        }
        //Still want the default description, if there is one.
        parent::render_after_field($value, $instance);
    }
开发者ID:MichaelEniolade,项目名称:MechrisPlanetWebsite,代码行数:29,代码来源:media.class.php

示例2: create_field

 public function create_field($field_name, $field_options, SiteOrigin_Widget $for_widget, $for_repeater = array(), $is_template = false)
 {
     $element_id = $for_widget->so_get_field_id($field_name, $for_repeater, $is_template);
     $element_name = $for_widget->so_get_field_name($field_name, $for_repeater);
     $field_class = $this->get_field_class_name($field_options['type']);
     if ($this->is_container_type($field_options['type'])) {
         return new $field_class($field_name, $element_id, $element_name, $field_options, $for_widget, $for_repeater);
     } else {
         return new $field_class($field_name, $element_id, $element_name, $field_options);
     }
 }
开发者ID:MichaelEniolade,项目名称:MechrisPlanetWebsite,代码行数:11,代码来源:factory.class.php

示例3: create_field

 public function create_field($field_name, $field_options, SiteOrigin_Widget $for_widget, $for_repeater = array(), $is_template = false)
 {
     $element_id = $for_widget->so_get_field_id($field_name, $for_repeater, $is_template);
     $element_name = $for_widget->so_get_field_name($field_name, $for_repeater);
     if (empty($field_options['type'])) {
         $field_options['type'] = 'text';
         $field_options['label'] = __('This field does not have a type. Please specify a type for it to be rendered correctly.', 'so-widgets-bundle');
     }
     $field_class = $this->get_field_class_name($field_options['type']);
     // If we still don't have a class use the 'SiteOrigin_Widget_Field_Error' class to indicate this to the user.
     if (!class_exists($field_class)) {
         return new SiteOrigin_Widget_Field_Error('', '', '', array('type' => 'error', 'message' => 'The class \'' . $field_class . '\' could not be found. Please make sure you specified the correct field type and that the class exists.'));
     }
     return new $field_class($field_name, $element_id, $element_name, $field_options, $for_widget, $for_repeater);
 }
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:15,代码来源:factory.class.php

示例4: create_field

 public function create_field($field_name, $field_options, SiteOrigin_Widget $for_widget, $for_repeater = array(), $is_template = false)
 {
     $element_id = $for_widget->so_get_field_id($field_name, $for_repeater, $is_template);
     $element_name = $for_widget->so_get_field_name($field_name, $for_repeater);
     if (empty($field_options['type'])) {
         $field_options['type'] = 'text';
         $field_options['label'] = __('This field does not have a type. Please specify a type for it to be rendered correctly.', 'siteorigin-widgets');
     }
     $field_class = $this->get_field_class_name($field_options['type']);
     if ($this->is_container_type($field_options['type'])) {
         return new $field_class($field_name, $element_id, $element_name, $field_options, $for_widget, $for_repeater);
     } else {
         return new $field_class($field_name, $element_id, $element_name, $field_options);
     }
 }
开发者ID:ninefinecode,项目名称:ninefinecode,代码行数:15,代码来源:factory.class.php


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