PluginProbe
Bookit — Booking & Appointment Calendar / trunk
Bookit — Booking & Appointment Calendar vtrunk
2.6.0.4 2.6.0.3 2.6.0.2 2.6.0.1 2.6.0 trunk 1.2 1.2.2 1.2.3 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 All 61 releases
bookit / includes / classes / Nonces.php

Nonces.php in Bookit — Booking & Appointment Calendar trunk, at includes/classes/Nonces.php

75 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Bookit\Classes;
4
5 class Nonces {
6
7 /**
8 * Frontend Nonces
9 *
10 * @return array
11 */
12 public static function get_frontend_nonces() {
13 $list = array(
14 'bookit_book_appointment',
15 'bookit_month_appointments',
16 'bookit_day_appointments',
17 'bookit_admin_day_appointments',
18 'bookit_admin_month_appointments',
19 'bookit_appointment_status',
20 'bookit_is_free_appointment',
21 'bookit_get_wp_user_by_email',
22 'bookit_validate_wp_user_if_exist',
23 );
24
25 $nonces = array();
26
27 foreach ( $list as $slug ) {
28 $nonces[ $slug ] = wp_create_nonce( $slug );
29 }
30
31 return $nonces;
32 }
33
34 /**
35 * Admin Nonces
36 *
37 * @return array
38 */
39 public static function get_admin_nonces() {
40 $list = array(
41 'bookit_save_item',
42 'bookit_delete_item',
43 'bookit_add_appointment',
44 'bookit_edit_appointment',
45 'bookit_day_appointments',
46 'bookit_admin_day_appointments',
47 'bookit_get_appointment',
48 'bookit_get_appointments',
49 'bookit_get_calendar_appointments',
50 'bookit_get_appointment_form_data',
51 'bookit_appointment_status',
52 'bookit_save_category',
53 'bookit_delete_category',
54 'bookit_get_customers',
55 'bookit_save_settings',
56 'bookit_export',
57 'bookit_import',
58 'bookit_load_icon',
59 'bookit_get_category_assosiated_total_data',
60 'bookit_get_customer_assosiated_total_data',
61 'bookit_get_service_assosiated_total_data',
62 'bookit_get_staff_assosiated_total_data',
63 'bookit_add_feedback',
64 );
65
66 $nonces = array();
67
68 foreach ( $list as $slug ) {
69 $nonces[ $slug ] = wp_create_nonce( $slug );
70 }
71
72 return $nonces;
73 }
74 }
75