| 1 |
<?php |
| 2 |
/** |
| 3 |
* Will be included in the shariff.php only, when Printer is requested as a service. |
| 4 |
* |
| 5 |
* @package Shariff Wrapper |
| 6 |
*/ |
| 7 |
|
| 8 |
// Prevent direct calls. |
| 9 |
if ( ! class_exists( 'WP' ) ) { die(); } |
| 10 |
// and again the same because the WP Plugin Check does not understand what the line above does ;-) |
| 11 |
if ( ! defined( 'ABSPATH' ) ) exit; |
| 12 |
|
| 13 |
// Check if we need the frontend or the backend part. |
| 14 |
if ( isset( $frontend ) && 1 === $frontend ) { |
| 15 |
|
| 16 |
// Build button URL. |
| 17 |
$button_url = 'javascript:window.print()'; |
| 18 |
|
| 19 |
// Colors. |
| 20 |
$main_color = '#999'; |
| 21 |
$secondary_color = '#a8a8a8'; |
| 22 |
$wcag_color = '#595959'; |
| 23 |
|
| 24 |
// SVG icon. |
| 25 |
$svg_icon = '<svg width="32px" height="20px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 32"><path fill="' . $main_color . '" d="M6.8 27.4h16v-4.6h-16v4.6zM6.8 16h16v-6.8h-2.8q-0.7 0-1.2-0.5t-0.5-1.2v-2.8h-11.4v11.4zM27.4 17.2q0-0.5-0.3-0.8t-0.8-0.4-0.8 0.4-0.3 0.8 0.3 0.8 0.8 0.3 0.8-0.3 0.3-0.8zM29.7 17.2v7.4q0 0.2-0.2 0.4t-0.4 0.2h-4v2.8q0 0.7-0.5 1.2t-1.2 0.5h-17.2q-0.7 0-1.2-0.5t-0.5-1.2v-2.8h-4q-0.2 0-0.4-0.2t-0.2-0.4v-7.4q0-1.4 1-2.4t2.4-1h1.2v-9.7q0-0.7 0.5-1.2t1.2-0.5h12q0.7 0 1.6 0.4t1.3 0.8l2.7 2.7q0.5 0.5 0.9 1.4t0.4 1.6v4.6h1.1q1.4 0 2.4 1t1 2.4z"/></svg>'; |
| 26 |
|
| 27 |
// Same window? |
| 28 |
$same_window = 1; |
| 29 |
|
| 30 |
// Button text label. |
| 31 |
$button_text_array = array( |
| 32 |
'cs' => 'tlačit', |
| 33 |
'de' => 'drucken', |
| 34 |
'en' => 'print', |
| 35 |
'fr' => 'imprimer', |
| 36 |
'es' => 'imprimir', |
| 37 |
'it' => 'imprimere', |
| 38 |
'da' => 'dat trykke', |
| 39 |
'nl' => 'drukken', |
| 40 |
); |
| 41 |
|
| 42 |
// Button alt label. |
| 43 |
$button_title_array = array( |
| 44 |
'de' => 'drucken', |
| 45 |
'cs' => 'tlačit', |
| 46 |
'en' => 'print', |
| 47 |
'fr' => 'imprimer', |
| 48 |
'es' => 'imprimir', |
| 49 |
'it' => 'imprimere', |
| 50 |
'da' => 'dat trykke', |
| 51 |
'nl' => 'drukken', |
| 52 |
); |
| 53 |
} |
| 54 |
|