PluginProbe
Shariff Wrapper / trunk
Shariff Wrapper vtrunk
4.6.22 4.6.21 4.6.20 4.6.19 trunk 1.0.0 1.9.0 1.9.9 2.4.3 3.4.2 4.0.8 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.3.0 4.4.2 4.4.3 4.4.4 4.5.0 4.5.1 4.5.2 4.5.3 4.6.0 All 42 releases
shariff / services / shariff-bitcoin.php

shariff-bitcoin.php in Shariff Wrapper trunk, at services/shariff-bitcoin.php

52 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Will be included in the shariff.php only, when Bitcoin is selected as a service.
4 *
5 * @package Shariff Wrapper
6 */
7
8 // Prevents 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 // Service URL.
16 $service_url = esc_url( plugins_url( '../', __FILE__ ) . 'bitcoin.php' );
17
18 // Bitcoin address.
19 if ( array_key_exists( 'bitcoinaddress', $atts ) ) {
20 $bitcoinaddress = esc_html( $atts['bitcoinaddress'] );
21 } else {
22 $bitcoinaddress = '';
23 }
24
25 // Build button URL.
26 $button_url = $service_url . '?bitcoinaddress=' . $bitcoinaddress;
27
28 // Colors.
29 $main_color = '#f7931a';
30 $secondary_color = '#191919';
31 $wcag_color = '#824808';
32
33 // SVG icon.
34 $svg_icon = '<svg width="32px" height="20px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 32"><path fill="' . $main_color . '" d="M20.8 11.4q0.3 3.3-2.3 4.6 2.1 0.5 3.1 1.8t0.8 3.8q-0.1 1.3-0.6 2.2t-1.2 1.6-1.7 1-2.2 0.6-2.6 0.3v4.6h-2.7v-4.5q-1.4 0-2.2 0v4.5h-2.7v-4.6q-0.3 0-1 0t-1 0h-3.6l0.6-3.3h2q0.9 0 1-0.9v-7.2h0.3q-0.1 0-0.3 0v-5.1q-0.2-1.2-1.6-1.2h-2v-2.9l3.8 0q1.1 0 1.7 0v-4.5h2.8v4.4q1.5 0 2.2 0v-4.4h2.8v4.5q1.4 0.1 2.5 0.4t2 0.8 1.5 1.4 0.7 2zM17 21.2q0-0.6-0.3-1.1t-0.7-0.8-1-0.5-1.2-0.3-1.3-0.2-1.2-0.1-1.2 0-0.8 0v6q0.1 0 0.7 0t0.9 0 0.9 0 1-0.1 1-0.2 1-0.2 0.8-0.4 0.7-0.5 0.4-0.7 0.2-0.9zM15.7 12.7q0-0.6-0.2-1t-0.5-0.7-0.9-0.5-1-0.3-1.1-0.1-1 0-1 0-0.7 0v5.5q0.1 0 0.6 0t0.8 0 0.9 0 1-0.1 0.9-0.2 0.9-0.3 0.7-0.5 0.5-0.7 0.2-0.9z"/></svg>';
35
36 // Button text label.
37 $button_text_array = array(
38 'de' => 'spenden',
39 'en' => 'donate',
40 'fr' => 'faire un don',
41 'es' => 'donar',
42 );
43
44 // Button alt label.
45 $button_title_array = array(
46 'de' => 'Spenden mit Bitcoin',
47 'en' => 'Donate with Bitcoin',
48 'fr' => 'Faire un don via Bitcoin',
49 'es' => 'Donar via Bitcoin',
50 );
51 }
52