| 1 |
<?php |
| 2 |
/** |
| 3 |
* Class to Print -- 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__Bulk_Print |
| 16 |
*/ |
| 17 |
class WPBC_Listing_Actions__Bulk_Print{ |
| 18 |
|
| 19 |
const ACTION = 'bulk_print'; |
| 20 |
|
| 21 |
/** |
| 22 |
* Get Action Button |
| 23 |
* |
| 24 |
* @return false|string |
| 25 |
*/ |
| 26 |
public static function get_option() { |
| 27 |
|
| 28 |
$css_class = 'ul_dropdown_menu_li_action '; |
| 29 |
$css_class .= 'ul_dropdown_menu_li_action_' . self::ACTION; |
| 30 |
|
| 31 |
// Option Title. |
| 32 |
$html = "<a href=\"javascript:void(0)\" class=\"" . esc_attr( $css_class ) . "\" |
| 33 |
onclick=\"wpbc_print_dialog__show();\" |
| 34 |
title=\"" . esc_attr( __( 'Print bookings', 'booking' ) ) . "\" |
| 35 |
>" . |
| 36 |
esc_js( __( 'Print', 'booking' ) ) . |
| 37 |
' <i class="menu_icon icon-1x wpbc_icn_print"></i>'. |
| 38 |
'</a>'; |
| 39 |
|
| 40 |
return $html; |
| 41 |
|
| 42 |
} |
| 43 |
} |
| 44 |
|