[ Index ]

MailPress 7.1

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

title

Body

[close]

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

   1  <?php
   2  abstract class MP_WP_Privacy_
   3  {
   4  	function __construct( $name )
   5      {
   6          $this->name = $name;
   7  
   8          add_filter( "wp_privacy_personal_data_{$this->type}s",  array( $this, 'register' ), $this->priority );
   9      }
  10  
  11  	function register( $registry )
  12      {
  13          $registry[get_class( $this )] = array( $this->type . '_friendly_name' => $this->name, 'callback' => array( $this, $this->type ), );
  14          return $registry;
  15      }
  16  
  17  	function get_user( $email )
  18      {
  19          $email = trim( $email );
  20  
  21          if ( !MailPress::is_email( $email ) ) return false;
  22  
  23          $mp_user = MP_User::get( MP_User::get_id_by_email( $email ) );
  24  
  25          if ( isset( $mp_user->id ) ) $this->mp_user_id = $mp_user->id;
  26  
  27          return ( $mp_user ) ? $mp_user : false;
  28      }
  29  }
  30  
  31  
  32  


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