| | |
| | | ob_start(); |
| | | ?> |
| | | <div class="item-select"> |
| | | <input type="checkbox" class="select-item"> |
| | | <label class="select-item-label"> |
| | | <input type="checkbox" class="select-item" name="select-item" id="item"> |
| | | <label class="select-item-label" for="item"> |
| | | <span class="screen-reader-text">Select this <?= $this->singular ?></span> |
| | | </label> |
| | | </div> |
| | |
| | | <?php |
| | | if (in_array('edit', $this->caps)) { |
| | | echo $makeThisDetailed ? '<details><summary class="row btw">See Value</summary>' : ''; |
| | | if (in_array($config['type'], ['selector', 'taxonomy', 'post'])) { |
| | | $config['autocomplete'] = true; |
| | | } |
| | | |
| | | echo $this->meta->render('form', $name, $config); |
| | | echo $makeThisDetailed ? '</details>' : ''; |
| | | } else { |
| | |
| | | ?> |
| | | <td class="field show-<?= esc_attr($name) ?>" data-field="<?= esc_attr($name) ?>" data-field-type="<?=$config['type']?>"<?=(in_array($name, $this->stuck)) ? ' data-stuck':''?>> |
| | | <?= $makeThisDetailed ? '<details><summary class="row btw">See Value</summary>' : '' ?> |
| | | <?php |
| | | if (in_array($config['type'], ['selector', 'taxonomy', 'post'])) { |
| | | $config['autocomplete'] = true; |
| | | } |
| | | ?> |
| | | <?php $this->meta->render('form', $name, $config); ?> |
| | | <?= $makeThisDetailed ? '</details>' : '' ?> |
| | | </td> |
| | |
| | | protected function renderStatusRadios(): string { |
| | | ob_start(); |
| | | ?> |
| | | <div class="radio-options status-options row"> |
| | | <div class="radio-options status-options row" data-field="post_status" data-field-type="radio"> |
| | | <?php foreach ($this->statuses as $status): |
| | | if ($status === 'all') continue; |
| | | if (!in_array($status, $this->allowedStatuses)) continue; |
| | | if (!array_key_exists($status, $this->allowedStatuses)) continue; |
| | | $config = $this->allowedStatuses[$status]; |
| | | ?> |
| | | |
| | |
| | | <span class="screen-reader-text"><?= esc_html($config['label']) ?></span> |
| | | </label> |
| | | <?php endforeach; ?> |
| | | <span class="validation-message" hidden role="alert"></span> |
| | | </div> |
| | | <?php |
| | | return ob_get_clean(); |
| | |
| | | <input type="hidden" name="form-id" value="<?=uniqid('new-')?>" /> |
| | | <input type="hidden" name="content" value="<?=$this->dataType?>" /> |
| | | <div class="fields"> |
| | | <div class="field-group radio-options row"> |
| | | <div class="field-group radio-options row" data-field="post_status" data-field-type="radio"> |
| | | <span>Status:</span> |
| | | <?php |
| | | $this->getApplicableStatuses('edit'); |