← All changes
|
includes/admin/email_notifications/wppm_get_notifications.php
+21
-21
6.0.2
→
6.0.6
View file →
| @@ -1,22 +1,22 @@ | ||
| 1 | -<?php | |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - exit; | |
| 4 | -} | |
| 5 | - | |
| 6 | -global $wpdb; | |
| 7 | - | |
| 8 | -$user_id = get_current_user_id(); | |
| 9 | -$table = $wpdb->prefix . 'wppm_notifications'; | |
| 10 | - | |
| 11 | -$results = $wpdb->get_results( | |
| 12 | - $wpdb->prepare( | |
| 13 | - "SELECT * FROM $table | |
| 14 | - WHERE user_id = %d | |
| 15 | - AND is_read = 0 | |
| 16 | - ORDER BY created_at DESC", | |
| 17 | - $user_id | |
| 18 | - ), | |
| 19 | - ARRAY_A | |
| 20 | -); | |
| 21 | - | |
| 1 | +<?php | |
| 2 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | + exit; | |
| 4 | +} | |
| 5 | + | |
| 6 | +global $wpdb; | |
| 7 | + | |
| 8 | +$user_id = get_current_user_id(); | |
| 9 | +$table = $wpdb->prefix . 'wppm_notifications'; | |
| 10 | + | |
| 11 | +$results = $wpdb->get_results( | |
| 12 | + $wpdb->prepare( | |
| 13 | + "SELECT * FROM $table | |
| 14 | + WHERE user_id = %d | |
| 15 | + AND is_read = 0 | |
| 16 | + ORDER BY created_at DESC", | |
| 17 | + $user_id | |
| 18 | + ), | |
| 19 | + ARRAY_A | |
| 20 | +); | |
| 21 | + | |
| 22 | 22 | wp_send_json($results); |