-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtextarea.php
More file actions
37 lines (30 loc) · 1.25 KB
/
Copy pathtextarea.php
File metadata and controls
37 lines (30 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
// Prevent direct call
if ( ! defined('ABSPATH') ) {
die('Not allowed!');
}
global $spbc; ?>
<?php if ($data['title_first']) { ?>
<label for="spbc_setting_<?php echo $data['name']; ?>" class="spbc_settings-field_title spbc_settings-field_title--<?php echo $data['type']; ?>"><?php echo $data['title']; ?></label>
<?php if (isset($data['long_description'])) { ?>
<i setting="<?php echo $data['name']; ?>" class="spbc_long_description__show spbc-icon-help-circled"></i>
<?php } ?>
<br>
<?php } ?>
<?php
echo '<textarea'
. ' id="spbc_setting_' . $data['name'] . '"'
. ' name="spbc_settings[' . $data['name'] . ']" '
. ($data['required'] ? ' required="required"' : '')
. ($data['parent'] && ! $spbc->settings[ $data['parent'] ] ? ' disabled="disabled"' : '')
. ' class="spbc_setting__textarea"'
. ' >'
. ($data['value'] ?: '')
. '</textarea>';
?>
<?php if (! $data['title_first']) { ?>
<label for="spbc_setting_<?php echo $data['name']; ?>" class="spbc_setting-field_title--<?php echo $data['type']; ?>"><?php echo $data['title']; ?></label>
<?php } ?>
<?php if (isset($data['description'])) { ?>
<div class="spbc_settings_description"><?php echo $data['description']; ?></div>
<?php } ?>