/
home
/
desid573
/
verdenaturopathy.com.au
/
site3
/
wp-content
/
plugins
/
meta-box
/
inc
/
fields
/
/home/desid573/verdenaturopathy.com.au/site3/wp-content/plugins/meta-box/inc/fields
mkdir
upload
Name
Size
Mode
Actions
autocomplete.php
3146
0644
edit
dl
rm
background.php
5605
0644
edit
dl
rm
button-group.php
1965
0644
edit
dl
rm
button.php
1346
0644
edit
dl
rm
checkbox-list.php
501
0644
edit
dl
rm
checkbox.php
1405
0644
edit
dl
rm
choice.php
1885
0644
edit
dl
rm
color.php
2607
0644
edit
dl
rm
custom-html.php
638
0644
edit
dl
rm
date.php
735
0644
edit
dl
rm
datetime.php
8834
0644
edit
dl
rm
divider.php
893
0644
edit
dl
rm
fieldset-text.php
3318
0644
edit
dl
rm
file-input.php
1637
0644
edit
dl
rm
file-upload.php
1165
0644
edit
dl
rm
file.php
15916
0644
edit
dl
rm
heading.php
959
0644
edit
dl
rm
image-advanced.php
2533
0644
edit
dl
rm
image-select.php
2415
0644
edit
dl
rm
image-upload.php
1021
0644
edit
dl
rm
image.php
4814
0644
edit
dl
rm
input-list.php
2690
0644
edit
dl
rm
input.php
3139
0644
edit
dl
rm
key-value.php
3748
0644
edit
dl
rm
map.php
6714
0644
edit
dl
rm
media.php
7140
0644
edit
dl
rm
multiple-values.php
1396
0644
edit
dl
rm
number.php
971
0644
edit
dl
rm
object-choice.php
4174
0644
edit
dl
rm
oembed.php
4114
0644
edit
dl
rm
osm.php
5182
0644
edit
dl
rm
password.php
564
0644
edit
dl
rm
post.php
5737
0644
edit
dl
rm
radio.php
405
0644
edit
dl
rm
range.php
1529
0644
edit
dl
rm
select-advanced.php
2396
0644
edit
dl
rm
select-tree.php
1536
0644
edit
dl
rm
select.php
2585
0644
edit
dl
rm
sidebar.php
1533
0644
edit
dl
rm
single-image.php
1830
0644
edit
dl
rm
slider.php
2091
0644
edit
dl
rm
switch.php
2390
0644
edit
dl
rm
taxonomy-advanced.php
3031
0644
edit
dl
rm
taxonomy.php
10111
0644
edit
dl
rm
text-list.php
3463
0644
edit
dl
rm
text.php
1019
0644
edit
dl
rm
textarea.php
1891
0644
edit
dl
rm
time.php
721
0644
edit
dl
rm
user.php
4684
0644
edit
dl
rm
video.php
4142
0644
edit
dl
rm
wysiwyg.php
2417
0644
edit
dl
rm
Edit:
/home/desid573/verdenaturopathy.com.au/site3/wp-content/plugins/meta-box/inc/fields/text-list.php
(3463B)
<?php /** * The text list field which allows users to enter multiple texts. * * @package Meta Box */ /** * Text list field class. */ class RWMB_Text_List_Field extends RWMB_Multiple_Values_Field { /** * Enqueue scripts and styles. */ public static function admin_enqueue_scripts() { wp_enqueue_style( 'rwmb-text-list', RWMB_CSS_URL . 'text-list.css', '', RWMB_VER ); } /** * Get field HTML. * * @param mixed $meta Meta value. * @param array $field Field parameters. * * @return string */ public static function html( $meta, $field ) { if ( empty( $field['options'] ) ) { return ''; } $html = array(); $input = '<label><span class="rwmb-text-list-label">%s</span> <input %s></label>'; $attributes = self::get_attributes( $field, $meta ); $attributes['type'] = 'text'; $count = 0; foreach ( $field['options'] as $placeholder => $label ) { $attributes['value'] = isset( $meta[ $count ] ) ? esc_attr( $meta[ $count ] ) : ''; $attributes['placeholder'] = $placeholder; $html[] = sprintf( $input, $label, self::render_attributes( $attributes ) ); $count ++; } return implode( ' ', $html ); } /** * Normalize parameters for field. * * @param array $field Field parameters. * * @return array */ public static function normalize( $field ) { $field = parent::normalize( $field ); if ( ! $field['clone'] ) { $field['class'] .= ' rwmb-text_list-non-cloneable'; } return $field; } /** * Set value of meta before saving into database. * Do not save if all inputs has no value. * * @param mixed $new The submitted meta value. * @param mixed $old The existing meta value. * @param int $post_id The post ID. * @param array $field The field parameters. * * @return mixed */ public static function value( $new, $old, $post_id, $field ) { $filtered = array_filter( $new ); return count( $filtered ) ? $new : array(); } /** * Format value for the helper functions. * * @param array $field Field parameters. * @param string|array $value The field meta value. * @param array $args Additional arguments. Rarely used. See specific fields for details. * @param int|null $post_id Post ID. null for current post. Optional. * * @return string */ public static function format_value( $field, $value, $args, $post_id ) { $output = '<table><thead><tr>'; foreach ( $field['options'] as $label ) { $output .= "<th>$label</th>"; } $output .= '</tr></thead><tbody>'; if ( ! $field['clone'] ) { $output .= self::format_single_value( $field, $value, $args, $post_id ); } else { foreach ( $value as $subvalue ) { $output .= self::format_single_value( $field, $subvalue, $args, $post_id ); } } $output .= '</tbody></table>'; return $output; } /** * Format a single value for the helper functions. Sub-fields should overwrite this method if necessary. * * @param array $field Field parameters. * @param array $value The value. * @param array $args Additional arguments. Rarely used. See specific fields for details. * @param int|null $post_id Post ID. null for current post. Optional. * * @return string */ public static function format_single_value( $field, $value, $args, $post_id ) { $output = '<tr>'; foreach ( $value as $subvalue ) { $output .= "<td>$subvalue</td>"; } $output .= '</tr>'; return $output; } }
Save
cmd:
run