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

PHP pods_view函数代码示例

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

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



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

示例1: admin

 /**
  * Show the Admin
  */
 public function admin($options, $component)
 {
     $post_types = (array) $this->post_types;
     $taxonomies = (array) $this->taxonomies;
     $method = 'migrate';
     // ajax_migrate
     pods_view(PODS_DIR . 'components/Migrate-CPTUI/ui/wizard.php', compact(array_keys(get_defined_vars())));
 }
开发者ID:centaurustech,项目名称:chipin,代码行数:11,代码来源:Migrate-CPTUI.php


示例2: admin_edit

 function admin_edit($duplicate, $obj)
 {
     global $wp_roles;
     $id = $obj->id;
     $capabilities = $this->get_capabilities();
     $role_name = $role_label = $role_capabilities = null;
     foreach ($wp_roles->role_objects as $key => $role) {
         if ($key != $id) {
             continue;
         }
         $role_name = $key;
         $role_label = $wp_roles->role_names[$key];
         $role_capabilities = $role->capabilities;
     }
     if (empty($role)) {
         return $obj->error(__('Role not found, cannot edit it.', 'pods'));
     }
     $component = $obj->x['component'];
     $method = 'edit';
     // ajax_edit
     pods_view(PODS_DIR . 'components/Roles/ui/edit.php', compact(array_keys(get_defined_vars())));
 }
开发者ID:Ingenex,项目名称:redesign,代码行数:22,代码来源:Roles.php


示例3: row

 /**
  * Output a row (label, field, and comment)
  *
  * @param string $name Field name
  * @param mixed $value Field value
  * @param string $type Field type
  * @param array $options Field options
  * @param array $pod Pod data
  * @param int $id Item ID
  *
  * @return string Row HTML
  *
  * @since 2.0
  */
 public static function row($name, $value, $type = 'text', $options = null, $pod = null, $id = null)
 {
     $options = self::options(null, $options);
     ob_start();
     pods_view(PODS_DIR . 'ui/fields/_row.php', compact(array_keys(get_defined_vars())));
     $output = ob_get_clean();
     return apply_filters('pods_form_ui_field_row', $output, $name, $value, $options, $pod, $id);
 }
开发者ID:erkmen,项目名称:wpstartersetup,代码行数:22,代码来源:PodsForm.php


示例4: pods_shortcode

/**
 * Shortcode support for use anywhere that support WP Shortcodes
 *
 * @param array $tags An associative array of shortcode properties
 * @param string $content A string that represents a template override
 *
 * @return string
 * @since 1.6.7
 */
function pods_shortcode($tags, $content = null)
{
    $defaults = array('name' => null, 'id' => null, 'slug' => null, 'select' => null, 'order' => null, 'orderby' => null, 'limit' => null, 'where' => null, 'having' => null, 'groupby' => null, 'search' => true, 'pagination' => false, 'page' => null, 'filters' => false, 'filters_label' => null, 'filters_location' => 'before', 'pagination_label' => null, 'pagination_location' => 'after', 'field' => null, 'col' => null, 'template' => null, 'pods_page' => null, 'helper' => null, 'form' => null, 'fields' => null, 'label' => null, 'thank_you' => null, 'view' => null, 'cache_mode' => 'none', 'expires' => 0, 'shortcodes' => false);
    if (!empty($tags)) {
        $tags = array_merge($defaults, $tags);
    } else {
        $tags = $defaults;
    }
    $tags = apply_filters('pods_shortcode', $tags);
    if (empty($content)) {
        $content = null;
    }
    if (0 < strlen($tags['view'])) {
        $return = pods_view($tags['view'], null, (int) $tags['expires'], $tags['cache_mode']);
        if ($tags['shortcodes']) {
            $return = do_shortcode($return);
        }
        return $return;
    }
    if (empty($tags['name'])) {
        if (in_the_loop() || is_singular()) {
            $pod = pods(get_post_type(), get_the_ID(), false);
            if (!empty($pod)) {
                $tags['name'] = get_post_type();
                $id = $tags['id'] = get_the_ID();
            }
        }
        if (empty($tags['name'])) {
            return '<p>Please provide a Pod name</p>';
        }
    }
    if (!empty($tags['col'])) {
        $tags['field'] = $tags['col'];
        unset($tags['col']);
    }
    if (!empty($tags['order'])) {
        $tags['orderby'] = $tags['order'];
        unset($tags['order']);
    }
    if (empty($content) && empty($tags['pods_page']) && empty($tags['template']) && empty($tags['field']) && empty($tags['form'])) {
        return '<p>Please provide either a template or field name</p>';
    }
    if (!isset($id)) {
        // id > slug (if both exist)
        $id = empty($tags['slug']) ? null : pods_evaluate_tags($tags['slug']);
        if (!empty($tags['id'])) {
            $id = $tags['id'];
            if (is_numeric($id)) {
                $id = absint($id);
            }
        }
    }
    if (!isset($pod)) {
        $pod = pods($tags['name'], $id);
    }
    if (empty($pod)) {
        return '<p>Pod not found</p>';
    }
    $found = 0;
    if (!empty($tags['form'])) {
        return $pod->form($tags['fields'], $tags['label'], $tags['thank_you']);
    } elseif (empty($id)) {
        $params = array();
        if (0 < strlen($tags['orderby'])) {
            $params['orderby'] = $tags['orderby'];
        }
        if (!empty($tags['limit'])) {
            $params['limit'] = $tags['limit'];
        }
        if (0 < strlen($tags['where'])) {
            $params['where'] = pods_evaluate_tags($tags['where']);
        }
        if (0 < strlen($tags['having'])) {
            $params['having'] = pods_evaluate_tags($tags['having']);
        }
        if (0 < strlen($tags['groupby'])) {
            $params['groupby'] = $tags['groupby'];
        }
        if (0 < strlen($tags['select'])) {
            $params['select'] = $tags['select'];
        }
        if (empty($tags['search'])) {
            $params['search'] = false;
        }
        if (0 < absint($tags['page'])) {
            $params['page'] = absint($tags['page']);
        }
        if (empty($tags['pagination'])) {
            $params['pagination'] = false;
        }
        if (!empty($tags['cache_mode']) && 'none' != $tags['cache_mode']) {
//.........这里部分代码省略.........
开发者ID:Ingenex,项目名称:redesign,代码行数:101,代码来源:general.php


示例5: view


//.........这里部分代码省略.........
        $obj =& $this;
        $fields = array();
        if (isset($this->fields[$this->action])) {
            $fields = $this->fields[$this->action];
        }
        if (is_object($this->pod)) {
            $object_fields = (array) pods_var_raw('object_fields', $this->pod->pod_data, array(), null, true);
            $object_field_objects = array('post_type', 'taxonomy', 'media', 'user', 'comment');
            if (empty($object_fields) && in_array($this->pod->pod_data['type'], $object_field_objects)) {
                $object_fields = $this->pod->api->get_wp_object_fields($this->pod->pod_data['type'], $this->pod->pod_data);
            }
            if (empty($fields)) {
                // Add core object fields if $fields is empty
                $fields = array_merge($object_fields, $this->pod->fields);
            }
        }
        $view_fields = $fields;
        // Temporary
        $fields = array();
        foreach ($view_fields as $k => $field) {
            $name = $k;
            $defaults = array('name' => $name, 'type' => 'text', 'options' => 'text');
            if (!is_array($field)) {
                $name = $field;
                $field = array('name' => $name);
            }
            $field = array_merge($defaults, $field);
            $field['name'] = trim($field['name']);
            $value = pods_var_raw('default', $field);
            if (empty($field['name'])) {
                $field['name'] = trim($name);
            }
            if (isset($object_fields[$field['name']])) {
                $field = array_merge($field, $object_fields[$field['name']]);
            } elseif (isset($this->pod->fields[$field['name']])) {
                $field = array_merge($this->pod->fields[$field['name']], $field);
            }
            if (pods_v('hidden', $field, false, null, true) || 'hidden' == $field['type']) {
                continue;
            } elseif (!PodsForm::permission($field['type'], $field['name'], $field['options'], $fields, $pod, $pod->id())) {
                continue;
            }
            $fields[$field['name']] = $field;
            if (empty($this->id) && null !== $value) {
                $this->pod->row_override[$field['name']] = $value;
            }
        }
        unset($view_fields);
        // Cleanup
        ?>
		<div class="wrap pods-ui">
			<div id="icon-edit-pages" class="icon32"<?php 
        if (false !== $this->icon) {
            ?>
 style="background-position:0 0;background-size:100%;background-image:url(<?php 
            echo esc_url($this->icon);
            ?>
);"<?php 
        }
        ?>
><br /></div>
			<h2>
				<?php 
        echo $this->do_template($this->header['view']);
        if (!in_array('add', $this->actions_disabled) && !in_array('add', $this->actions_hidden)) {
            $link = pods_query_arg(array('action' . $this->num => 'add', 'id' . $this->num => '', 'do' . ($this->num = '')), self::$allowed, $this->exclusion());
            if (!empty($this->action_links['add'])) {
                $link = $this->action_links['add'];
            }
            ?>
					<a href="<?php 
            echo esc_url($link);
            ?>
" class="add-new-h2"><?php 
            echo $this->heading['add'];
            ?>
</a>
				<?php 
        } elseif (!in_array('manage', $this->actions_disabled) && !in_array('manage', $this->actions_hidden)) {
            $link = pods_query_arg(array('action' . $this->num => 'manage', 'id' . $this->num => ''), self::$allowed, $this->exclusion());
            if (!empty($this->action_links['manage'])) {
                $link = $this->action_links['manage'];
            }
            ?>
					<a href="<?php 
            echo esc_url($link);
            ?>
" class="add-new-h2">&laquo; <?php 
            echo sprintf(__('Back to %s', 'pods'), $this->heading['manage']);
            ?>
</a>
				<?php 
        }
        pods_view(PODS_DIR . 'ui/admin/view.php', compact(array_keys(get_defined_vars())));
        ?>

			</h2>
		</div>
	<?php 
    }
开发者ID:dylansmithing,项目名称:leader-of-rock-wordpress,代码行数:101,代码来源:PodsUI.php


示例6: input

 /**
  * Customize output of the form field
  *
  * @param string $name
  * @param mixed $value
  * @param array $options
  * @param array $pod
  * @param int $id
  *
  * @since 2.0
  */
 public function input($name, $value = null, $options = null, $pod = null, $id = null)
 {
     $options = (array) $options;
     $form_field_type = PodsForm::$field_type;
     if (is_array($value)) {
         $value = implode("\n", $value);
     }
     $field_type = 'codemirror';
     do_action('pods_form_ui_field_code_' . $field_type, $name, $value, $options, $pod, $id);
     do_action('pods_form_ui_field_code', $field_type, $name, $value, $options, $pod, $id);
     pods_view(PODS_DIR . 'ui/fields/' . $field_type . '.php', compact(array_keys(get_defined_vars())));
 }
开发者ID:centaurustech,项目名称:chipin,代码行数:23,代码来源:code.php


示例7: input

 /**
  * Customize output of the form field
  *
  * @param string $name
  * @param mixed $value
  * @param array $options
  * @param array $pod
  * @param int $id
  *
  * @since 2.0
  */
 public function input($name, $value = null, $options = null, $pod = null, $id = null)
 {
     global $wpdb;
     $options = (array) $options;
     $form_field_type = PodsForm::$field_type;
     $options['grouped'] = 1;
     $options['table_info'] = array();
     $custom = pods_var_raw(self::$type . '_custom', $options, false);
     $custom = apply_filters('pods_form_ui_field_pick_custom_values', $custom, $name, $value, $options, $pod, $id);
     $ajax = false;
     if (('custom-simple' != pods_var(self::$type . '_object', $options) || empty($custom)) && '' != pods_var(self::$type . '_object', $options, '', null, true)) {
         $ajax = true;
     }
     if (!empty(self::$field_data) && self::$field_data['id'] == $options['id']) {
         $ajax = (bool) self::$field_data['autocomplete'];
     }
     $ajax = apply_filters('pods_form_ui_field_pick_ajax', $ajax, $name, $value, $options, $pod, $id);
     if (0 == pods_var(self::$type . '_ajax', $options, 1)) {
         $ajax = false;
     }
     if ('single' == pods_var(self::$type . '_format_type', $options, 'single')) {
         if ('dropdown' == pods_var(self::$type . '_format_single', $options, 'dropdown')) {
             $field_type = 'select';
         } elseif ('radio' == pods_var(self::$type . '_format_single', $options, 'dropdown')) {
             $field_type = 'radio';
         } elseif ('autocomplete' == pods_var(self::$type . '_format_single', $options, 'dropdown')) {
             $field_type = 'select2';
         } else {
             // Support custom integration
             do_action('pods_form_ui_field_pick_input_' . pods_var(self::$type . '_format_type', $options, 'single') . '_' . pods_var(self::$type . '_format_single', $options, 'dropdown'), $name, $value, $options, $pod, $id);
             do_action('pods_form_ui_field_pick_input', pods_var(self::$type . '_format_type', $options, 'single'), $name, $value, $options, $pod, $id);
             return;
         }
     } elseif ('multi' == pods_var(self::$type . '_format_type', $options, 'single')) {
         if (!empty($value) && !is_array($value)) {
             $value = explode(',', $value);
         }
         if ('checkbox' == pods_var(self::$type . '_format_multi', $options, 'checkbox')) {
             $field_type = 'checkbox';
         } elseif ('multiselect' == pods_var(self::$type . '_format_multi', $options, 'checkbox')) {
             $field_type = 'select';
         } elseif ('autocomplete' == pods_var(self::$type . '_format_multi', $options, 'checkbox')) {
             $field_type = 'select2';
         } else {
             // Support custom integration
             do_action('pods_form_ui_field_pick_input_' . pods_var(self::$type . '_format_type', $options, 'single') . '_' . pods_var(self::$type . '_format_multi', $options, 'checkbox'), $name, $value, $options, $pod, $id);
             do_action('pods_form_ui_field_pick_input', pods_var(self::$type . '_format_type', $options, 'single'), $name, $value, $options, $pod, $id);
             return;
         }
     } else {
         // Support custom integration
         do_action('pods_form_ui_field_pick_input', pods_var(self::$type . '_format_type', $options, 'single'), $name, $value, $options, $pod, $id);
         return;
     }
     pods_view(PODS_DIR . 'ui/fields/' . $field_type . '.php', compact(array_keys(get_defined_vars())));
 }
开发者ID:dylansmithing,项目名称:leader-of-rock-wordpress,代码行数:67,代码来源:pick.php


示例8: admin

 /**
  * Build admin area
  *
  * @param $options
  *
  * @since 2.0
  */
 public function admin($options, $component)
 {
     $method = 'import_export';
     // ajax_import
     pods_view(PODS_DIR . 'components/Migrate-Packages/ui/wizard.php', compact(array_keys(get_defined_vars())));
 }
开发者ID:dylansmithing,项目名称:leader-of-rock-wordpress,代码行数:13,代码来源:Migrate-Packages.php


示例9: app_starter_paging_nav

                        }
                        include $view;
                    } else {
                        echo $view;
                    }
                }
            }
        }
        app_starter_paging_nav();
    } else {
        get_template_part('content', 'none');
    }
} else {
    if (is_file($alt_view) && file_exists($alt_view)) {
        if (function_exists('pods_view')) {
            pods_view($alt_view, null, app_starter_cache_expires(), app_starter_cache_mode());
        } else {
            include $alt_view;
        }
    } else {
        if (is_string($alt_view)) {
            echo $alt_view;
        }
    }
}
?>

	</main><!-- #main -->
	<?php 
app_starter_sidebar();
?>
开发者ID:michaelbeil,项目名称:app_starter,代码行数:31,代码来源:index.php


示例10: form

 /**
  * @param bool $create
  * @param bool $duplicate
  *
  * @return bool|mixed
  */
 public function form($create = false, $duplicate = false)
 {
     if (in_array('duplicate', $this->actions_disabled)) {
         $duplicate = false;
     }
     $this->do_hook('form');
     if (isset($this->actions_custom['form']) && is_callable($this->actions_custom['form'])) {
         return call_user_func_array($this->actions_custom['form'], array(&$this));
     }
     $label = $this->label['add'];
     $id = null;
     $vars = array('action' . $this->num => $this->action_after['add'], 'do' . $this->num => 'create', 'id' . $this->num => 'X_ID_X');
     $alt_vars = $vars;
     $alt_vars['action'] = 'manage';
     unset($alt_vars['id']);
     if (false === $create) {
         if (empty($this->row)) {
             $this->get_row();
         }
         if (empty($this->row) && (!is_object($this->pod) || 'settings' != $this->pod->pod_data['type'])) {
             return $this->error(sprintf(__('<strong>Error:</strong> %s not found.', 'pods'), $this->item));
         }
         if ($this->restricted($this->action, $this->row)) {
             return $this->error(sprintf(__('<strong>Error:</strong> You do not have access to this %s.', 'pods'), $this->item));
         }
         $label = $this->label['edit'];
         $id = $this->row[$this->sql['field_id']];
         $vars = array('action' . $this->num => $this->action_after['edit'], 'do' . $this->num => 'save', 'id' . $this->num => $id);
         $alt_vars = $vars;
         $alt_vars['action'] = 'manage';
         unset($alt_vars['id']);
         if ($duplicate) {
             $label = $this->label['duplicate'];
             $id = null;
             $vars = array('action' . $this->num => $this->action_after['duplicate'], 'do' . $this->num => 'create', 'id' . $this->num => 'X_ID_X');
             $alt_vars = $vars;
             $alt_vars['action'] = 'manage';
             unset($alt_vars['id']);
         }
     }
     if (isset($this->fields[$this->action])) {
         $fields = $this->fields[$this->action];
     }
     if (is_object($this->pod)) {
         $object_fields = (array) pods_var_raw('object_fields', $this->pod->pod_data, array(), null, true);
         if (empty($object_fields) && in_array($this->pod->pod_data['type'], array('post_type', 'taxonomy', 'media', 'user', 'comment'))) {
             $object_fields = $this->pod->api->get_wp_object_fields($this->pod->pod_data['type'], $this->pod->pod_data);
         }
         if (empty($fields)) {
             // Add core object fields if $fields is empty
             $fields = array_merge($object_fields, $this->pod->fields);
         }
     }
     $form_fields = $fields;
     // Temporary
     $fields = array();
     foreach ($form_fields as $k => $field) {
         $name = $k;
         $defaults = array('name' => $name);
         if (!is_array($field)) {
             $name = $field;
             $field = array('name' => $name);
         }
         $field = array_merge($defaults, $field);
         $field['name'] = trim($field['name']);
         $value = pods_var_raw('default', $field);
         if (empty($field['name'])) {
             $field['name'] = trim($name);
         }
         if (pods_var_raw('hidden', $field, false, null, true)) {
             $field['type'] = 'hidden';
         } elseif (isset($object_fields[$field['name']])) {
             $fields[$field['name']] = array_merge($field, $object_fields[$field['name']]);
         } elseif (isset($this->pod->fields[$field['name']])) {
             $fields[$field['name']] = array_merge($this->pod->fields[$field['name']], $field);
         }
         if (empty($this->id) && null !== $value) {
             $this->pod->row_override[$field['name']] = $value;
         }
     }
     unset($form_fields);
     // Cleanup
     $fields = $this->do_hook('form_fields', $fields, $this->pod);
     $pod =& $this->pod;
     $thank_you = pods_var_update($vars, self::$allowed, $this->exclusion());
     $thank_you_alt = pods_var_update($alt_vars, self::$allowed, $this->exclusion());
     $obj =& $this;
     $singular_label = $this->item;
     $plural_label = $this->items;
     if (is_object($this->pod) && 'settings' == $this->pod->pod_data['type'] && 'settings' == $this->style) {
         pods_view(PODS_DIR . 'ui/admin/form-settings.php', compact(array_keys(get_defined_vars())));
     } else {
         pods_view(PODS_DIR . 'ui/admin/form.php', compact(array_keys(get_defined_vars())));
     }
//.........这里部分代码省略.........
开发者ID:centaurustech,项目名称:chipin,代码行数:101,代码来源:PodsUI.php


示例11: pods_query_arg

    $url = pods_query_arg(array('tab' => $tab), array('page'));
    ?>
				<a href="<?php 
    echo $url;
    ?>
" class="nav-tab<?php 
    echo $class;
    ?>
">
					<?php 
    echo $label;
    ?>
				</a>
			<?php 
}
?>
		</h2>
		<img src="<?php 
echo PODS_URL;
?>
ui/images/pods-logo-notext-rgb-transparent.png" class="pods-leaf-watermark-right" />

		<?php 
$tab = pods_v('tab', 'get', $default);
$tab = sanitize_title($tab);
$data = compact(array('keys', 'public_local', 'private_local', 'public_remote', 'private_remote', 'deploy_active', 'key_gen_submit', 'key_gen_header', 'form_fields'));
echo pods_view(PODS_DEPLOY_DIR . 'ui/' . $tab . '.php', $data);
?>
	</form>
</div>
开发者ID:pods-framework,项目名称:pods-deploy,代码行数:30,代码来源:main.php


示例12: main_page

 /**
  * Include Main Page view
  *
  * @return string
  */
 public function main_page()
 {
     return pods_view($this->template_path() . 'main-page.php');
 }
开发者ID:pods-framework,项目名称:frontier-admin,代码行数:9,代码来源:page.php


示例13: input

 /**
  * Customize output of the form field
  *
  * @param string $name
  * @param mixed $value
  * @param array $options
  * @param array $pod
  * @param int $id
  *
  * @since 2.0
  */
 public function input($name, $value = null, $options = null, $pod = null, $id = null)
 {
     $options = (array) $options;
     $form_field_type = PodsForm::$field_type;
     if (is_array($value)) {
         $value = !empty($value);
     }
     $field_type = 'checkbox';
     if ('radio' == pods_var(self::$type . '_format_type', $options)) {
         $field_type = 'radio';
     } elseif ('dropdown' == pods_var(self::$type . '_format_type', $options)) {
         $field_type = 'select';
     }
     pods_view(PODS_DIR . 'ui/fields/' . $field_type . '.php', compact(array_keys(get_defined_vars())));
 }
开发者ID:centaurustech,项目名称:chipin,代码行数:26,代码来源:boolean.php


示例14: ob_start

<?php

/**
 * pods_view() has built-in output buffering.
 */
/** WITHOUT pods_view */
// Get file.php content
ob_start();
get_template_part('file');
$content = ob_get_clean();
// Apply a filter
$content = apply_filters('filter_name', $content);
// Do shortcodes
$content = do_shortcode($content);
// Replace a custom tag like {MY_TAG} with something dynamic, great for things specific to the current user or other cases
$content = str_replace('{MY_TAG}', 'Cool content', $content);
// Output the content
echo $content;
/** WITH pods_view */
// Get file.php and cache it
$content = pods_view('file.php', null, HOUR_IN_SECONDS, 'cache', true);
// Apply a filter
$content = apply_filters('filter_name', $content);
// Do shortcodes
$content = do_shortcode($content);
// Replace a custom tag like {MY_TAG} with something dynamic, great for things specific to the current user or other cases
$content = str_replace('{MY_TAG}', 'Cool content', $content);
// Output the content
echo $content;
开发者ID:logoscreative,项目名称:pods-code-library,代码行数:29,代码来源:instead-of-ob.php


示例15: input

 /**
  * Customize output of the form field
  *
  * @param string $name
  * @param mixed $value
  * @param array $options
  * @param array $pod
  * @param int $id
  *
  * @since 2.0
  */
 public function input($name, $value = null, $options = null, $pod = null, $id = null)
 {
     $options = (array) $options;
     $form_field_type = PodsForm::$field_type;
     if (is_array($value)) {
         $value = implode("\n", $value);
     }
     if (isset($options['name']) && false === PodsForm::permission(self::$type, $options['name'], $options, null, $pod, $id)) {
         if (pods_var('read_only', $options, false)) {
             $options['readonly'] = true;
             $field_type = 'textarea';
         } else {
             return;
         }
     } elseif (!pods_has_permissions($options) && pods_var('read_only', $options, false)) {
         $options['readonly'] = true;
         $field_type = 'textarea';
     } elseif ('tinymce' == pods_var(self::$type . '_editor', $options)) {
         $field_type = 'tinymce';
     } elseif ('cleditor' == pods_var(self::$type . '_editor', $options)) {
         $field_type = 'cleditor';
     } else {
         // Support custom WYSIWYG integration
         do_action('pods_form_ui_field_wysiwyg_' . pods_var(self::$type . '_editor', $options), $name, $value, $options, $pod, $id);
         do_action('pods_form_ui_field_wysiwyg', pods_var(self::$type . '_editor', $options), $name, $value, $options, $pod, $id);
         return;
     }
     pods_view(PODS_DIR . 'ui/fields/' . $field_type . '.php', compact(array_keys(get_defined_vars())));
 }
开发者ID:dylansmithing,项目名称:leader-of-rock-wordpress,代码行数:40,代码来源:wysiwyg.php


示例16: _e

		<h2>
			<?php 
_e('Deploy To Remote Site', 'pods-deploy');
?>
		</h2>
		<div class="keys-and-url stuffbox">
			<?php 
$form = Pods_Form();
$fields[] = $form::field('_wpnonce', wp_create_nonce('pods-deploy'), 'hidden');
foreach ($form_fields as $name => $field) {
    $fields[] = '<li>';
    $fields[] = $form::label($name, pods_v('label', $field, ''), pods_v('help', $field, ''));
    $fields[] = $form::field($name, pods_v('value', $field), pods_v('type', $field, 'text'), pods_v('options', $field));
    $fields[] = '</li>';
}
echo sprintf('<ul>%1s</ul>', implode($fields));
?>
		</div>
		<div class="clearfix"></div>
		<?php 
pods_view(PODS_DEPLOY_DIR . 'ui/pods-wizard.php');
?>



		<p class="submit">
			<input type="submit" class="button button-primary" name="pods-deploy-submit" value="Deploy">
		</p>
	</form>
</div>
开发者ID:pods-framework,项目名称:pods-deploy,代码行数:30,代码来源:deploy.php


示例17: input

 /**
  * Customize output of the form field
  *
  * @param string $name
  * @param mixed $value
  * @param array $options
  * @param array $pod
  * @param int $id
  *
  * @since 2.0
  */
 public function input($name, $value = null, $options = null, $pod = null, $id = null)
 {
     $options = (array) $options;
     $form_field_type = PodsForm::$field_type;
     if (is_array($value)) {
         $value = implode(' ', $value);
     }
     pods_view(PODS_DIR . 'ui/fields/email.php', compact(array_keys(get_defined_vars())));
 }
开发者ID:centaurustech,项目名称:chipin,代码行数:20,代码来源:email.php


示例18: input

 /**
  * Customize output of the form field
  *
  * @param string $name
  * @param mixed $value
  * @param array $options
  * @param array $pod
  * @param int $id
  *
  * @since 2.0
  */
 public function input($name, $value = null, $options = null, $pod = null, $id = null)
 {
     $options = (array) $options;
     $form_field_type = PodsForm::$field_type;
     if (is_array($value)) {
         $value = implode('', $value);
     }
     if ('slider' == pods_var(self::$type . '_format_type', $options, 'number')) {
         $field_type = 'slider';
     } else {
         $field_type = 'number';
     }
     pods_view(PODS_DIR . 'ui/fields/' . $field_type . '.php', compact(array_keys(get_defined_vars())));
 }
开发者ID:centaurustech,项目名称:chipin,代码行数:25,代码来源:number.php


示例19: input

 /**
  * Customize output of the form field
  *
  * @param string $name
  * @param mixed $value
  * @param array $options
  * @param array $pod
  * @param int $id
  *
  * @since 2.0
  */
 public function input($name, $value = null, $options = null, $pod = null, $id = null)
 {
     $options = (array) $options;
     $form_field_type = PodsForm::$field_type;
     if (is_array($value)) {
         $value = implode(' ', $value);
     }
     // Farbtastic for below 3.5
     if (pods_version_check('wp', '3.5', '>')) {
         pods_view(PODS_DIR . 'ui/fields/farbtastic.php', compact(array_keys(get_defined_vars())));
     } else {
         pods_view(PODS_DIR . 'ui/fields/color.php', compact(array_keys(get_defined_vars())));
     }
 }
开发者ID:centaurustech,项目名称:chipin,代码行数:25,代码来源:color.php


示例20: include_view

 /**
  * Include main UI view and add scope data into it.
  *
  * @since 0.4.0
  *
  * @return bool|string
  */
 function include_view()
 {
     $keys = Pods_Deploy_Auth::get_keys(true);
     $public_remote = pods_v_sanitized('public', $keys, '');
     $private_remote = pods_v_sanitized('private', $keys, '');
     $deploy_active = Pods_Deploy_Auth::deploy_active();
     wp_enqueue_style('pods-wizard');
     if ($deploy_active) {
         $key_gen_submit = __('Disable Deployments', 'pods-deploy');
         $key_gen_header = __('Click to revoke keys and prevent deployments to this site.', 'pods-deploy');
     } else {
         $key_gen_submit = __('Allow Deployments', 'pods-deploy');
         $key_gen_header = __('Click to generate new keys and allow deployments to this site', 'pods-deploy');
     }
     $form_fields = $this->form_fields();
     $data = compact(array('keys', 'public_local', 'private_local', 'public_remote', 'private_remote', 'deploy_active', 'key_gen_submit', 'key_gen_header', 'form_fields'));
     return pods_view(PODS_DEPLOY_DIR . 'ui/main.php', $data);
 }
开发者ID:pods-framework,项目名称:pods-deploy,代码行数:25,代码来源:class-pods-deploy-ui.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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