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


PHP RWMB_Field::normalize方法代码示例

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


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

示例1: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  *
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field = wp_parse_args($field, array('prefix' => '', 'suffix' => '', 'std' => '', 'js_options' => array()));
     $field['js_options'] = wp_parse_args($field['js_options'], array('range' => 'min', 'value' => $field['std']));
     return $field;
 }
开发者ID:rilwis,项目名称:meta-box,代码行数:14,代码来源:slider.php

示例2: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  *
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field = wp_parse_args($field, array('flatten' => true, 'query_args' => array(), 'field_type' => 'select'));
     if ('checkbox_tree' === $field['field_type']) {
         $field['field_type'] = 'checkbox_list';
         $field['flatten'] = false;
     }
     switch ($field['field_type']) {
         case 'checkbox_list':
         case 'radio_list':
             $field['flatten'] = 'radio_list' === $field['field_type'] ? true : $field['flatten'];
             $field['multiple'] = 'radio_list' === $field['field_type'] ? false : true;
             $field = RWMB_Input_Field::normalize($field);
             break;
         case 'select_advanced':
             $field = RWMB_Select_Advanced_Field::normalize($field);
             $field['flatten'] = true;
             break;
         case 'select_tree':
             $field = RWMB_Select_Field::normalize($field);
             $field['multiple'] = true;
             break;
         case 'select':
         default:
             $field = RWMB_Select_Field::normalize($field);
             break;
     }
     return $field;
 }
开发者ID:ahmadawais,项目名称:meta-box,代码行数:37,代码来源:object-choice.php

示例3: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  *
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field = wp_parse_args($field, array('size' => $field['multiple'] ? 5 : 0));
     $field['field_name'] .= !$field['clone'] && $field['multiple'] ? '[]' : '';
     return $field;
 }
开发者ID:tamalsarker,项目名称:meta-box,代码行数:14,代码来源:select.php

示例4: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  *
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field = wp_parse_args($field, array('std' => array(), 'mime_type' => '', 'max_file_uploads' => 0, 'force_delete' => false));
     $field['multiple'] = true;
     return $field;
 }
开发者ID:acconway,项目名称:meta-box,代码行数:14,代码来源:media.php

示例5: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field = wp_parse_args($field, array('raw' => false, 'options' => array()));
     $field['options'] = wp_parse_args($field['options'], array('editor_class' => 'rwmb-wysiwyg', 'dfw' => true));
     // Keep the filter to be compatible with previous versions
     $field['options'] = apply_filters('rwmb_wysiwyg_settings', $field['options']);
     return $field;
 }
开发者ID:warfare-plugins,项目名称:social-warfare,代码行数:15,代码来源:wysiwyg.php

示例6: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  *
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field = wp_parse_args($field, array('datalist' => false, 'readonly' => false));
     if ($field['datalist']) {
         $field['datalist'] = wp_parse_args($field['datalist'], array('id' => $field['id'] . '_list', 'options' => array()));
     }
     return $field;
 }
开发者ID:sydneycbd,项目名称:meta-box,代码行数:16,代码来源:input.php

示例7: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  *
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field['multiple'] = true;
     $field['field_name'] = $field['id'];
     if (!$field['clone']) {
         $field['field_name'] .= '[]';
     }
     return $field;
 }
开发者ID:fkallevik,项目名称:meta-box,代码行数:17,代码来源:multiple-values.php

示例8: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  * @return array
  */
 public static function normalize($field)
 {
     $field = parent::normalize($field);
     $field = wp_parse_args($field, array('flatten' => true, 'options' => array()));
     return $field;
 }
开发者ID:warfare-plugins,项目名称:social-warfare,代码行数:12,代码来源:choice.php

示例9: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  *
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field['std'] = $field['std'] ? $field['std'] : __('Click me', 'meta-box');
     return $field;
 }
开发者ID:fkallevik,项目名称:meta-box,代码行数:13,代码来源:button.php

示例10: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  *
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field = wp_parse_args($field, array('std' => '', 'address_field' => ''));
     return $field;
 }
开发者ID:warfare-plugins,项目名称:social-warfare,代码行数:13,代码来源:map.php

示例11: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  *
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field = wp_parse_args($field, array('std' => '', 'address_field' => '', 'api_key' => 'AIzaSyC1mUh87SGFyf133tpZQJa-s96p0tgnraQ'));
     return $field;
 }
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:13,代码来源:map.php

示例12: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field['field_name'] .= $field['multiple'] ? '[]' : '';
     return $field;
 }
开发者ID:rilwis,项目名称:meta-box,代码行数:12,代码来源:image-select.php

示例13: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  *
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field = wp_parse_args($field, array('size' => 30, 'placeholder' => ''));
     return $field;
 }
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:13,代码来源:file-input.php

示例14: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  *
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field['clone'] = true;
     $field['multiple'] = false;
     return $field;
 }
开发者ID:fkallevik,项目名称:meta-box,代码行数:14,代码来源:key-value.php

示例15: normalize

 /**
  * Normalize parameters for field
  *
  * @param array $field
  * @return array
  */
 static function normalize($field)
 {
     $field = parent::normalize($field);
     $field = wp_parse_args($field, array('cols' => 60, 'rows' => 3, 'maxlength' => false, 'wrap' => false, 'readonly' => false));
     return $field;
 }
开发者ID:shahinbdboy,项目名称:meta-box,代码行数:12,代码来源:textarea.php


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