/** * 設定画面にフィールドを表示(共通項目) * * @param int $group_key * @param int $field_key */ public function display_options($group_key, $field_key) { ?> <tr> <th><?php esc_html_e('Name', 'smart-custom-fields'); ?> <span class="<?php echo esc_attr(SCF_Config::PREFIX . 'require'); ?> ">*</span></th> <td> <input type="text" name="<?php echo esc_attr($this->get_field_name_in_setting($group_key, $field_key, 'name')); ?> " size="30" class="<?php echo esc_attr(SCF_Config::PREFIX . 'field-name'); ?> " value="<?php echo esc_attr($this->get('name')); ?> " /> </td> </tr> <tr> <th><?php esc_html_e('Label', 'smart-custom-fields'); ?> </th> <td> <input type="text" name="<?php echo esc_attr($this->get_field_name_in_setting($group_key, $field_key, 'label')); ?> " size="30" class="<?php echo esc_attr(SCF_Config::PREFIX . 'field-label'); ?> " value="<?php echo esc_attr($this->get('label')); ?> " /> </td> </tr> <?php $fields = SCF::get_form_field_instances(); foreach ($fields as $Field) { if ($Field->get_attribute('type') === $this->get_attribute('type')) { foreach ($this->options as $key => $value) { $Field->set($key, $value); } } $Field->_display_field_options($group_key, $field_key); } }