本文整理汇总了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
示例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);
示例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>