PATH:
home
/
letacommog
/
supportleta
/
wp-content
/
plugins
/
the-grid
/
includes
/
metabox
/
fields
<?php // Exit if accessed directly if (!defined('ABSPATH')) { exit; } if (!class_exists('TOMB_Checkbox_List_Field')) { class TOMB_Checkbox_List_Field extends TOMB_Fields { /** * Get field HTML * @param mixed $meta * @param array $field * @return string */ static function html($meta, $field) { if(!isset($meta) && array_key_exists('std', $field)){ $meta = $field['std']; } // be sure $meta is an array $meta = (array) $meta; $output = null; foreach ($field['options'] as $value => $label) { $output .= '<input type="checkbox" class="tomb-checkbox-list" name="'.$field['id'].'[]" id="'.$field['id'].'" value="'.$value.'" '.checked(in_array($value, $meta), 1, false).'>'; $output .= '<label >'.$label.'</label>'; $output .= '<br>'; } return $output; } /** * Normalize parameters for field * @param array $field * @return array */ static function normalize_field($field) { $field = wp_parse_args($field, array( 'options' => array() )); return $field; } /** * Check the value of the checkbox * @param mixed $new * @param mixed $old * @param int $post_id * @param array $field * @return int */ /*static function value($new, $old, $post_id, $field) { return empty($new) ? array() : $new; }*/ } }
[+]
..
[-] editor.php
[edit]
[-] select.php
[edit]
[-] section_start.php
[edit]
[-] url.php
[edit]
[-] code.php
[edit]
[-] checkbox_list.php
[edit]
[-] image.php
[edit]
[-] multiselect.php
[edit]
[-] break.php
[edit]
[-] number.php
[edit]
[-] gallery.php
[edit]
[-] image_id.php
[edit]
[-] slider.php
[edit]
[-] info_box.php
[edit]
[-] text.php
[edit]
[-] checkbox.php
[edit]
[-] color.php
[edit]
[-] section_end.php
[edit]
[-] title.php
[edit]
[-] hidden.php
[edit]
[-] upload.php
[edit]
[-] email.php
[edit]
[-] radio.php
[edit]
[-] textarea.php
[edit]
[-] custom.php
[edit]
[-] button.php
[edit]
[-] image_select.php
[edit]