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 / empty_trash.php

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

58 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class to Empty_Trash -- 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__Empty_Trash
16 */
17 class WPBC_Listing_Actions__Empty_Trash{
18
19 const ACTION = 'empty_trash';
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_trash_color ';
36 $css_class .= 'ul_dropdown_menu_li_action_' . self::ACTION;
37
38 $el_id = 'ul_dropdown_menu_li_action_' . self::ACTION;
39
40 // Option Title.
41 $html = "<a href=\"javascript:void(0)\" class=\"" . esc_attr( $css_class ) . "\"
42 onclick=\"if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to do this ?', 'booking' ) ) . "') ) {
43 wpbc_ajx_booking_ajax_action_request( {
44 'booking_action' : '" . esc_js( self::ACTION ) . "',
45 'ui_clicked_element_id': '{$el_id}'
46 } );
47 wpbc_button_enable_loading_icon( this );
48 } \"
49 title=\"" . esc_attr( __( 'Empty Trash', 'booking' ) ) . "\"
50 >" .
51 esc_js( __( 'Empty Trash', 'booking' ) ) .
52 ' <i class="menu_icon icon-1x wpbc_icn_delete_forever"></i>' .
53 '</a>';
54
55 return $html;
56 }
57 }
58