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


PHP PodsForm::label方法代码示例

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


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

示例1: array

            $helpers = $api->load_helpers(array('options' => array('helper_type' => 'pre_delete')));
            foreach ($helpers as $helper) {
                $pre_delete_helpers[$helper['name']] = $helper['name'];
            }
            echo PodsForm::label('pre_delete_helpers', __('Pre-Delete Helper(s)', 'pods'), __('help', 'pods'));
            echo PodsForm::field('pre_delete_helpers', pods_var_raw('pre_delete_helpers', $pod), 'pick', array('data' => $pre_delete_helpers));
            ?>
    </div>
    <div class="pods-field-option">
        <?php 
            $post_delete_helpers = array('' => '-- Select --');
            $helpers = $api->load_helpers(array('options' => array('helper_type' => 'post_delete')));
            foreach ($helpers as $helper) {
                $post_delete_helpers[$helper['name']] = $helper['name'];
            }
            echo PodsForm::label('post_delete_helpers', __('Post-Delete Helper(s)', 'pods'), __('help', 'pods'));
            echo PodsForm::field('post_delete_helpers', pods_var_raw('post_delete_helpers', $pod), 'pick', array('data' => $post_delete_helpers));
            ?>
    </div>
    <?php 
        }
    }
    ?>
</div>
<?php 
}
foreach ($tabs as $tab => $tab_label) {
    $tab = sanitize_title($tab);
    if (in_array($tab, array('manage-fields', 'labels', 'advanced', 'extra-fields')) || !isset($tab_options[$tab]) || empty($tab_options[$tab])) {
        continue;
    }
开发者ID:jeremybradbury,项目名称:wp-ninja-kit,代码行数:31,代码来源:setup-edit.php

示例2: pods_var_raw

    ?>
    <div class="pods-field pods-boolean"<?php 
    echo $indent;
    ?>
>
        <input<?php 
    PodsForm::attributes($attributes, $name, $form_field_type, $options);
    ?>
 />
        <?php 
    if (0 < strlen($label)) {
        $help = pods_var_raw('help', $options);
        if (1 == pods_var('grouped', $options, 0, null, true) || empty($help)) {
            $help = '';
        }
        echo PodsForm::label($attributes['id'], $label, $help);
    }
    ?>
    </div>
    <?php 
    if (1 == pods_var('grouped', $options, 0, null, true)) {
        ?>
        </li>
<?php 
    }
    $counter++;
}
if (1 == pods_var('grouped', $options, 0, null, true)) {
    ?>
    </ul>
</div>
开发者ID:centaurustech,项目名称:chipin,代码行数:31,代码来源:radio.php

示例3: _e

}
?>

                                    <?php 
if (!pods_tableless() && apply_filters('pods_admin_setup_add_extend_storage', false)) {
    ?>
                                        <div class="pods-depends-on pods-depends-on-extend-pod-type pods-depends-on-extend-pod-type-post-type pods-depends-on-extend-pod-type-media pods-depends-on-extend-pod-type-user pods-depends-on-extend-pod-type-comment">
                                            <p><a href="#pods-advanced" class="pods-advanced-toggle"><?php 
    _e('Advanced', 'pods');
    ?>
 +</a></p>

                                            <div class="pods-advanced">
                                                <div class="pods-field-option">
                                                    <?php 
    echo PodsForm::label('extend_storage', __('Storage Type', 'pods'), array(__('<h6>Storage Types</h6> Table based storage will operate in a way where each field you create for your content type becomes a field in a table. Meta based storage relies upon the WordPress meta storage table for all field data.', 'pods'), 'http://pods.io/docs/comparisons/compare-storage-types/'));
    $data = array('meta' => __('Meta Based (WP Default)', 'pods'), 'table' => __('Table Based', 'pods'));
    echo PodsForm::field('extend_storage', pods_var_raw('extend_storage', 'post'), 'pick', array('data' => $data));
    ?>
                                                </div>
                                            </div>
                                        </div>
                                    <?php 
}
?>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div id="pods-wizard-actions">
开发者ID:talentedunicorn,项目名称:pods,代码行数:31,代码来源:setup-add.php

示例4: meta_comment

    /**
     * @param $comment
     * @param $metabox
     */
    public function meta_comment($comment, $metabox)
    {
        wp_enqueue_style('pods-form');
        $hidden_fields = array();
        ?>
    <table class="form-table editcomment pods-metabox">
        <?php 
        $id = null;
        if (is_object($comment)) {
            $id = $comment->comment_ID;
        }
        $pod = pods($metabox['args']['group']['pod']['name'], $id, true);
        foreach ($metabox['args']['group']['fields'] as $field) {
            if (false === PodsForm::permission($field['type'], $field['name'], $field, $metabox['args']['group']['fields'], $pod, $id)) {
                if (pods_var('hidden', $field['options'], false, null, true)) {
                    $field['type'] = 'hidden';
                } else {
                    continue;
                }
            } elseif (!pods_has_permissions($field['options']) && pods_var('hidden', $field['options'], false, null, true)) {
                $field['type'] = 'hidden';
            }
            $value = '';
            if (!empty($pod)) {
                $value = $pod->field(array('name' => $field['name'], 'in_form' => true));
            }
            if ('hidden' == $field['type']) {
                $hidden_fields[] = array('field' => $field, 'value' => $value);
            } else {
                ?>
            <tr class="form-field pods-field <?php 
                echo 'pods-form-ui-row-type-' . $field['type'] . ' pods-form-ui-row-name-' . Podsform::clean($field['name'], true);
                ?>
">
                <th scope="row" valign="top"><?php 
                echo PodsForm::label('pods_meta_' . $field['name'], $field['label'], $field['help'], $field);
                ?>
</th>
                <td>
                    <?php 
                echo PodsForm::field('pods_meta_' . $field['name'], $value, $field['type'], $field, $pod, $id);
                ?>
                    <?php 
                echo PodsForm::comment('pods_meta_' . $field['name'], $field['description'], $field);
                ?>
                </td>
            </tr>
        <?php 
            }
        }
        ?>
    </table>
<?php 
        foreach ($hidden_fields as $hidden_field) {
            $field = $hidden_field['field'];
            echo PodsForm::field('pods_meta_' . $field['name'], $hidden_field['value'], 'hidden');
        }
    }
开发者ID:centaurustech,项目名称:chipin,代码行数:62,代码来源:PodsMeta.php

示例5: foreach

                            </h3>

                            <div class="inside">
                                <table class="form-table pods-metabox">
                                    <?php 
    foreach ($fields as $field) {
        if ('hidden' == $field['type']) {
            continue;
        }
        ?>
                                        <tr class="form-field pods-field <?php 
        echo 'pods-form-ui-row-type-' . $field['type'] . ' pods-form-ui-row-name-' . PodsForm::clean($field['name'], true);
        ?>
">
                                            <th scope="row" valign="top"><?php 
        echo PodsForm::label('pods_field_' . $field['name'], $field['label'], $field['help'], $field);
        ?>
</th>
                                            <td>
                                                <?php 
        echo PodsForm::field('pods_field_' . $field['name'], $pod->field(array('name' => $field['name'], 'in_form' => true)), $field['type'], $field, $pod, $pod->id());
        ?>
                                                <?php 
        echo PodsForm::comment('pods_field_' . $field['name'], $field['description'], $field);
        ?>
                                            </td>
                                        </tr>
                                    <?php 
    }
    ?>
                                </table>
开发者ID:Ingenex,项目名称:redesign,代码行数:31,代码来源:form.php

示例6: pods_var_raw

            echo $depends;
            ?>
">
                <?php 
        }
    }
    if (!is_array($field_option['group'])) {
        $value = pods_var_raw($field_name, $settings, $field_option['default']);
        ?>
                    <tr valign="top" class="pods-field-option" id="pods-setting-<?php 
        echo $field_name;
        ?>
">
                        <th>
                            <?php 
        echo PodsForm::label('pods_setting_' . $field_name, $field_option['label'], $field_option['help'], $field_option);
        ?>
                        </th>
                        <td>
                            <?php 
        echo PodsForm::field('pods_setting_' . $field_name, $value, $field_option['type'], $field_option);
        ?>
                        </td>
                    </tr>
                <?php 
    } else {
        ?>
                    <tr valign="top" class="pods-field-option-group" id="pods-setting-<?php 
        echo $field_name;
        ?>
">
开发者ID:satokora,项目名称:IT354Project,代码行数:31,代码来源:components-admin.php

示例7: do_action

     * @params array $field The current field.
     * @params array $fields All fields of the form.
     * @params object $pod The current Pod object.
     * @params array $params The form's parameters.
     *
     * @since 2.3.19
     */
    do_action('pods_form_pre_field', $field, $fields, $pod, $params);
    ?>
					<li class="pods-field <?php 
    echo 'pods-form-ui-row-type-' . $field['type'] . ' pods-form-ui-row-name-' . PodsForm::clean($field['name'], true);
    ?>
">
						<div class="pods-field-label">
							<?php 
    echo PodsForm::label($field_prefix . $field['name'], $field['label'], $field['help'], $field);
    ?>
						</div>

						<div class="pods-field-input">
							<?php 
    echo PodsForm::field($field_prefix . $field['name'], $pod->field(array('name' => $field['name'], 'in_form' => true)), $field['type'], $field, $pod, $pod->id());
    ?>

							<?php 
    echo PodsForm::comment($field_prefix . $field['name'], null, $field);
    ?>
						</div>
					</li>
				<?php 
    /**
开发者ID:satokora,项目名称:IT354Project,代码行数:31,代码来源:form.php

示例8: __

?>
                                </div>
                                <div class="pods-field-option pods-depends-on pods-depends-on-field-data-pick-object pods-depends-on-field-data-pick-object-table">
                                    <?php 
echo PodsForm::label('field_data[' . $pods_i . '][pick_table]', __('Related Table', 'pods'), __('help', 'pods'));
?>
                                    <?php 
echo PodsForm::field('field_data[' . $pods_i . '][pick_table]', pods_var_raw('pick_table', $field, ''), 'pick', array('required' => true, 'data' => pods_var_raw('pick_table', $field_settings)));
?>
                                </div>
                                <div class="pods-field-option pods-depends-on pods-depends-on-field-data-pick-object pods-depends-on-field-data-pick-object-<?php 
echo esc_attr(str_replace('_', '-', implode(' pods-depends-on-field-data-pick-object-', $bidirectional_objects)));
?>
" data-dependency-trigger="pods_sister_field">
                                    <?php 
echo PodsForm::label('field_data[' . $pods_i . '][sister_id]', __('Bi-directional Field', 'pods'), __('Bi-directional fields will update their related field for any item you select. This feature is only available for two relationships between two Pods.<br /><br />For example, when you update a Parent pod item to relate to a Child item, when you go to edit that Child item you will see the Parent pod item selected.', 'pods'));
?>

                                    <div class="pods-sister-field">
                                        <?php 
echo PodsForm::field('field_data[' . $pods_i . '][sister_id]', pods_var_raw('sister_id', $field, ''), 'text');
?>
                                    </div>
                                </div>
                            </div>
                            <div class="pods-field-option-group">
                                <p class="pods-field-option-group-label">
                                    <?php 
_e('Options', 'pods');
?>
                                </p>
开发者ID:talentedunicorn,项目名称:pods,代码行数:31,代码来源:setup-edit-field-fluid.php

示例9: pods_var_raw

">
                                                    <?php 
    echo PodsForm::field('capabilities[' . $capability . ']', pods_var_raw('capabilities[' . $capability . ']', 'post', $checked), 'boolean', array('boolean_yes_label' => $capability));
    ?>
                                                </li>
                                                <?php 
}
?>
                                        </ul>
                                    </div>
                                </div>

                                <div class="pods-field-option-group">
                                    <p class="pods-field-option-group-label">
                                        <?php 
echo PodsForm::label('custom_capabilities[0]', __('Custom Capabilities', 'pods'), __('These capabilities will automatically be created and assigned to this role', 'pods'));
?>
                                    </p>

                                    <div class="pods-pick-values pods-pick-checkbox">
                                        <ul id="custom-capabilities">
                                            <li class="pods-repeater hidden">
                                                <?php 
echo PodsForm::field('custom_capabilities[--1]', '', 'text');
?>
                                            </li>
                                            <li>
                                                <?php 
echo PodsForm::field('custom_capabilities[0]', '', 'text');
?>
                                            </li>
开发者ID:centaurustech,项目名称:chipin,代码行数:31,代码来源:add.php

示例10:

<?php

echo PodsForm::label($name, $options);
?>

<?php 
echo PodsForm::field($name, $value, $type, $options, $pod, $id);
?>

<?php 
echo PodsForm::comment($name, null, $options);
开发者ID:dylansmithing,项目名称:leader-of-rock-wordpress,代码行数:11,代码来源:_row.php


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