'attendance_check', 'defaults' => array( 'one' => array( 'creds' => 50, 'log' => '%plural% for attendance check only one day' ), 'ten' => array( 'creds' => 100, 'log' => '%plural% for attendance check for ten day' ), 'month' => array( 'creds' => 500, 'log' => '%plural% for attendance check for one month' ) ) ), $hook_prefs, $type); } public function run() { add_action( 'pac_after_attendance_check', array( $this, 'attendance_check' ), 100, 2 ); } public function attendance_check( $user_id, $event_type ) { if ( $this->core->exclude_user( $user_id ) ) return; $this->core->add_creds( 'attendance_check', $user_id, $this->prefs[$event_type]['creds'], $this->prefs[$event_type]['log'], 0, '' ); } public function preferences() { $prefs = $this->prefs; ?>