# darkify/1.5.5/src/Admin/Framework/fields/textarea/textarea.php

Darkify – Dark Mode &amp; Night Mode for Website &amp; Admin (Dark Theme Included), version 1.5.5. 57 lines.

- Page: https://pluginprobe.com/plugins/darkify/1.5.5/code/src/Admin/Framework/fields/textarea/textarea.php
- Raw: https://pluginprobe.com/plugins/darkify/1.5.5/raw/src/Admin/Framework/fields/textarea/textarea.php
- Modified: 2026-06-24T05:50:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/darkify/1.5.5/code/src/Admin/Framework/fields/textarea/textarea.php#L10-L20`.

```php
<?php

use ThemeAtelier\Darkify\Admin\Framework\Classes\Darkify;

 if ( ! defined( 'ABSPATH' ) ) {
	die; } // Cannot access directly.
/**
 *
 * Field: textarea
 *
 * @since 1.0.0
 * @version 1.0.0
 */
if ( ! class_exists( 'DarkifyField_textarea' ) ) {
	class DarkifyField_textarea extends DarkifyFields {

		public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
			parent::__construct( $field, $value, $unique, $where, $parent );
		}

		public function render() {

			echo wp_kses_post( $this->field_before() );
			echo esc_html( $this->shortcoder() );
			echo '<textarea name="' . esc_attr( $this->field_name() ) . '"' . wp_kses_post( $this->field_attributes() ) . '>' . wp_kses_post($this->value) . '</textarea>';
			echo wp_kses_post( $this->field_after() );
		}

		public function shortcoder() {

			if ( ! empty( $this->field['shortcoder'] ) ) {

				$shortcodes = ( is_array( $this->field['shortcoder'] ) ) ? $this->field['shortcoder'] : array_filter( (array) $this->field['shortcoder'] );
				$instances  = ( ! empty( Darkify::$shortcode_instances ) ) ? Darkify::$shortcode_instances : array();

				if ( ! empty( $shortcodes ) && ! empty( $instances ) ) {

					foreach ( $shortcodes as $shortcode ) {

						foreach ( $instances as $instance ) {

							if ( $instance['modal_id'] === $shortcode ) {

								$id    = $instance['modal_id'];
								$title = $instance['button_title'];

								echo '<a href="#" class="button button-primary darkify-shortcode-button" data-modal-id="' . esc_attr( $id ) . '">' . esc_html( $title ) . '</a>';

							}
						}
					}
				}
			}
		}
	}
}

```
