PluginProbe
Booking Calendar / 11.3
Booking Calendar v11.3
11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 All 204 releases
booking / includes / page-bookings / listing_actions / set_read_all.php

set_read_all.php in Booking Calendar 11.3, at includes/page-bookings/listing_actions/set_read_all.php

57 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class to Read All -- Option for "Bulk Actions - Dropdown Menu"
4 *
5 * @package Support functions.
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit, if accessed directly.
10 }
11
12 // JavaScript: in ../includes/print/_src/bookings_print.js -> function wpbc_print_dialog__show() { ... } .
13
14 /**
15 * Class WPBC_Listing_Actions__Set_Read_All
16 */
17 class WPBC_Listing_Actions__Set_Read_All{
18
19 const ACTION = 'set_booking_as_read';
20
21 /**
22 * Get Action Button
23 *
24 * @return false|string
25 */
26 public static function get_option() {
27
28 // In some versions: if ( ! class_exists( 'wpdev_bk_personal' ) ) { return false; } .
29
30 if ( ! wpbc_is_user_can( self::ACTION, wpbc_get_current_user_id() ) ) {
31 return false;
32 }
33
34 $css_class = 'ul_dropdown_menu_li_action ';
35 $css_class .= 'ul_dropdown_menu_li_action_' . self::ACTION;
36
37 $el_id = 'ul_dropdown_menu_li_action_' . self::ACTION;
38
39 // Option Title.
40 $html = "<a href=\"javascript:void(0)\" class=\"" . esc_attr( $css_class ) . "\"
41 onclick=\"wpbc_ajx_booking_ajax_action_request( {
42 'booking_action' : '" . esc_js( self::ACTION ) . "',
43 'booking_id' : '-1',
44 'reason_of_action' : '',
45 'ui_clicked_element_id': '{$el_id}'
46 } );
47 wpbc_button_enable_loading_icon( this ); \"
48 title=\"" . esc_attr( __( 'Mark as read all bookings', 'booking' ) ) . "\"
49 >" .
50 esc_js( __( 'Mark all as read', 'booking' ) ) .
51 ' <i class="menu_icon icon-1x wpbc-bi-0-circle-fill"></i>' .
52 '</a>';
53
54 return $html;
55 }
56 }
57