[ Index ]

MailPress 7.2

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

title

Body

[close]

/mp-includes/class/options/privacy/erasers/ -> _mailpress.php (source)

   1  <?php /* mailpress */
   2  
   3  class MP_WP_Privacy_eraser_mailpress extends MP_WP_privacy_eraser_
   4  {
   5      var $priority = 49;
   6  
   7  	function eraser( $email, $page = 1 )
   8      {
   9          global $wpdb;
  10  
  11          $mp_user = $this->get_user( $email );
  12          if ( !$mp_user ) return $this->erase;
  13  
  14          /*  */
  15  
  16          $deleted = ( $this->delete( $mp_user ) );
  17                  $this->erase['items_removed']  = ($deleted) ? 1 : 0;
  18          $this->erase['items_retained'] = ($deleted) ? 0 : 1;
  19  
  20          if ( $this->erase['items_removed']  ) $this->erase['messages'][] = sprintf( __( 'MailPress - Subscriber (%1$s) erased from the database.',   'MailPress' ), $email );
  21          if ( $this->erase['items_retained'] ) $this->erase['messages'][] = sprintf( __( 'MailPress - A problem occured while trying to erase subscriber (%1$s) from the database (%2$s)', 'MailPress' ), $email, $wpdb->$last_error );
  22  
  23          return $this->erase;
  24      }
  25  
  26  	function delete( $mp_user )
  27      {
  28          return MP_User::delete( $mp_user->id );
  29      }
  30  }
  31  new MP_WP_Privacy_eraser_mailpress( __( 'Subscriber Eraser', 'MailPress' ) );


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1