[ Index ]

MailPress 7.1

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

title

Body

[close]

/mp-includes/class/ -> MP_Form_field_types.class.php (source)

   1  <?php
   2  class MP_Form_field_types extends MP_options_
   3  {
   4      var $path = 'form/field_types';
   5      var $deep = true;
   6  
   7  	public static function get_all()
   8      {
   9          $x = apply_filters( 'MailPress_form_field_types_register', array() );
  10          uasort( $x, array( 'self', 'sort_field_types' ) );
  11          return $x;
  12      }
  13  
  14  	public static function sort_field_types( $a, $b ) 
  15      {
  16          return ( $a['order'] > $b['order'] ? 1 : ( ( $a['order'] < $b['order'] ) ? -1 : 0 ) );
  17      }
  18  
  19  	public static function settings_help( $content, $id, $field )
  20      {
  21          return apply_filters( "MailPress_form_field_type_{$id}_settings_help", $content, $field ); 
  22      }
  23  
  24  	public static function settings_form( $id, $field )
  25      {
  26          do_action( "MailPress_form_field_type_{$id}_settings_form", $field ); 
  27      }
  28  
  29  	public static function get_id( $field )
  30      {
  31          return apply_filters( "MailPress_form_field_type_{$field->type}_get_id", $field );
  32      }
  33  
  34  	public static function get_name( $field )
  35      {
  36          return apply_filters( "MailPress_form_field_type_{$field->type}_get_name", $field );
  37      }
  38  
  39  	public static function get_tag( $field )
  40      {
  41          $post_ = filter_input_array( INPUT_POST );
  42  
  43          $no_reset = ( isset( $post_[MailPress_form::prefix][$field->form_id] ) );
  44          return apply_filters( "MailPress_form_field_type_{$field->type}_get_tag", $field, $no_reset );
  45      }
  46  
  47  	public static function submitted( $field )
  48      {
  49          return apply_filters( "MailPress_form_field_type_{$field->type}_submitted", $field );
  50      }
  51  
  52  // have file loading ?
  53  	public static function have_file( $have_file, $id )
  54      {
  55          return apply_filters( "MailPress_form_field_type_{$id}_have_file", $have_file );
  56      }
  57  }


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