| 1 |
<?php |
| 2 |
/** |
| 3 |
* Will be included in the shariff.php only, when Mix 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 |
// Service URL. |
| 16 |
$service_url = esc_url( 'https://mix.com/add' ); |
| 17 |
|
| 18 |
// Build the button URL. |
| 19 |
$button_url = $service_url . '?url=' . $share_url; |
| 20 |
|
| 21 |
// Set the Colors (Hexadecimal including the #). |
| 22 |
$main_color = '#ff8226'; |
| 23 |
$secondary_color = '#FFB27A'; |
| 24 |
$wcag_color = '#8F3C00'; |
| 25 |
|
| 26 |
// SVG icon. |
| 27 |
$svg_icon = '<svg width="32px" height="20px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="' . $main_color . '" d="M0 64v348.9c0 56.2 88 58.1 88 0V174.3c7.9-52.9 88-50.4 88 6.5v175.3c0 57.9 96 58 96 0V240c5.3-54.7 88-52.5 88 4.3v23.8c0 59.9 88 56.6 88 0V64H0z"/></svg>'; |
| 28 |
|
| 29 |
// Backend available? |
| 30 |
$backend_available = 0; |
| 31 |
|
| 32 |
// Button alt label. |
| 33 |
$button_title_array = array( |
| 34 |
'bg' => 'Сподели във Mix', |
| 35 |
'cs' => 'Sdílet na Mix', |
| 36 |
'da' => 'Del på Mix', |
| 37 |
'de' => 'Bei Mix teilen', |
| 38 |
'en' => 'Share on Mix', |
| 39 |
'es' => 'Compartir en Mix', |
| 40 |
'fi' => 'Jaa Mixissa', |
| 41 |
'fr' => 'Envoyer par Mix', |
| 42 |
'hr' => 'Podijelite na Mix', |
| 43 |
'hu' => 'Megosztás Mix', |
| 44 |
'it' => 'Condividi su Mix', |
| 45 |
'nl' => 'Delen op Mix', |
| 46 |
'no' => 'Del på Mix', |
| 47 |
'pl' => 'Udostępnij na Mix', |
| 48 |
'pt' => 'Compartilhar no Mix', |
| 49 |
'ro' => 'Partajează pe Mix', |
| 50 |
'ru' => 'Поделиться на Mix', |
| 51 |
'sk' => 'Zdieľať na Mix', |
| 52 |
'sl' => 'Deli na Mix', |
| 53 |
'sr' => 'Podeli na Mix', |
| 54 |
'sv' => 'Dela på Mix', |
| 55 |
); |
| 56 |
} |
| 57 |
|