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


PHP PodsForm::merge_attributes方法代码示例

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


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

示例1: wp_enqueue_script

<?php

wp_enqueue_script('pods-codemirror');
wp_enqueue_style('pods-codemirror');
wp_enqueue_script('pods-codemirror-loadmode');
$type = 'textarea';
$attributes = array();
$attributes['tabindex'] = 2;
$attributes = PodsForm::merge_attributes($attributes, $name, $form_field_type, $options, 'pods-ui-field-codemirror');
?>
<div class="code-toolbar"><!-- Placeholder --></div>
<textarea<?php 
PodsForm::attributes($attributes, $name, $form_field_type, $options);
?>
><?php 
echo esc_textarea($value);
?>
</textarea>
<div class="code-footer"><!-- Placeholder --></div>

<script>
    var $textarea_<?php 
echo esc_js(pods_js_name($attributes['id']));
?>
, codemirror_<?php 
echo esc_js(pods_js_name($attributes['id']));
?>
;

    jQuery( function ( $ ) {
        $textarea_<?php 
开发者ID:dylansmithing,项目名称:leader-of-rock-wordpress,代码行数:31,代码来源:codemirror.php

示例2: array

<?php

$type = 'textarea';
$attributes = array();
$attributes['tabindex'] = 2;
$attributes = PodsForm::merge_attributes($attributes, $name, $form_field_type, $options);
if (pods_var('readonly', $options, false)) {
    $attributes['readonly'] = 'READONLY';
    $attributes['class'] .= ' pods-form-ui-read-only';
}
?>
    <textarea<?php 
PodsForm::attributes($attributes, $name, $form_field_type, $options);
?>
><?php 
echo esc_textarea($value);
?>
</textarea>
<?php 
PodsForm::regex($form_field_type, $options);
开发者ID:dylansmithing,项目名称:leader-of-rock-wordpress,代码行数:20,代码来源:textarea.php

示例3: array

<?php

$settings = array();
$settings['textarea_name'] = $name;
$settings['media_buttons'] = false;
if (!(defined('PODS_DISABLE_FILE_UPLOAD') && true === PODS_DISABLE_FILE_UPLOAD) && !(defined('PODS_UPLOAD_REQUIRE_LOGIN') && is_bool(PODS_UPLOAD_REQUIRE_LOGIN) && true === PODS_UPLOAD_REQUIRE_LOGIN && !is_user_logged_in()) && !(defined('PODS_UPLOAD_REQUIRE_LOGIN') && !is_bool(PODS_UPLOAD_REQUIRE_LOGIN) && (!is_user_logged_in() || !current_user_can(PODS_UPLOAD_REQUIRE_LOGIN)))) {
    $settings['media_buttons'] = (bool) pods_var('wysiwyg_media_buttons', $options, true);
}
if (isset($options['settings'])) {
    $settings = array_merge($settings, $options['settings']);
}
$attributes = array();
$attributes = PodsForm::merge_attributes($attributes, $name, $form_field_type, $options, 'pods-ui-field-tinymce');
$class_attributes = array('class' => $attributes['class']);
?>
<div<?php 
PodsForm::attributes($class_attributes, $name, $form_field_type, $options);
?>
>
    <?php 
wp_editor($value, $attributes['id'], $settings);
?>
</div>
开发者ID:talentedunicorn,项目名称:pods,代码行数:23,代码来源:tinymce.php


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