[ Index ]

MailPress 7.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/class/options/form/field_types/textarea/ -> textarea.php (source)

   1  <?php
   2  class MP_Form_field_type_textarea extends MP_form_field_type_
   3  {
   4      var $file            = __FILE__;
   5  
   6      var $id            = 'textarea';
   7      var $field_not_input     = true;
   8  
   9      var $category         = 'html';
  10      var $order         = 20;
  11  
  12  	function submitted( $field )
  13      {
  14          $this->field = $field;
  15  
  16          $value    = sanitize_textarea_field( $this->get_value() );
  17          $value    = trim( $value );
  18  
  19          $required     = ( isset( $this->field->settings['controls']['required'] ) && $this->field->settings['controls']['required'] );
  20          $empty     = empty( $value );
  21  
  22          if ( $required && $empty )
  23          {
  24              $this->field->submitted['on_error'] = 1;
  25              return $this->field;
  26          }
  27          $this->field->submitted['value'] = $value;
  28          $this->field->submitted['text']  = apply_filters( 'the_content', stripslashes( $value ) );
  29          return $this->field;
  30      }
  31  
  32  	function attributes_filter( $no_reset )
  33      {
  34          $this->field->settings['attributes']['tag_content'] = base64_decode( $this->field->settings['attributes']['tag_content'] );
  35  
  36          if ( !$no_reset ) return;
  37  
  38          $value = stripslashes( $this->get_value() );
  39          $this->field->settings['attributes']['tag_content'] = trim( $value );
  40          $this->attributes_filter_css();
  41      }
  42  }
  43  new MP_Form_field_type_textarea( __( 'Multi-line Input', 'MailPress' ) );


Generated: Mon Mar 11 18:33:33 2019 Cross-referenced by PHPXref 0.7.1