| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/ict/wp-content/plugins/so-widgets-bundle/base/inc/fields/ |
Upload File : |
<?php
/**
* Class SiteOrigin_Widget_Field_Textarea
*/
class SiteOrigin_Widget_Field_Code extends SiteOrigin_Widget_Field_Text_Input_Base {
/**
* The number of visible rows in the textarea.
*
* @var int
*/
protected $rows;
protected function render_field( $value, $instance ) {
?>
<textarea
type="text"
name="<?php echo esc_attr( $this->element_name ); ?>"
id="<?php echo esc_attr( $this->element_id ); ?>"
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellcheck="false"
<?php if ( ! empty( $this->placeholder ) ) {
echo 'placeholder="' . esc_attr( $this->placeholder ) . '"';
} ?>
<?php $this->render_CSS_classes( $this->get_input_classes() ); ?>
rows="<?php echo ! empty( $this->rows ) ? (int) $this->rows : 4; ?>"
<?php if ( ! empty( $this->readonly ) ) {
echo 'readonly';
} ?>><?php echo esc_textarea( $value ); ?></textarea>
<?php
}
/**
* The CSS classes to be applied to the rendered text input.
*/
protected function get_input_classes() {
return array( 'widefat', 'siteorigin-widget-input', 'siteorigin-widget-code-input' );
}
public function enqueue_scripts() {
wp_enqueue_script(
'so-code-field',
plugin_dir_url( __FILE__ ) . 'js/code-field' . SOW_BUNDLE_JS_SUFFIX . '.js',
array( 'jquery' ),
SOW_BUNDLE_VERSION
);
}
public function sanitize( $value, $instance = array(), $old_value = null ) {
return $value;
}
}