PluginProbe
Social Share Buttons / 1.2
Social Share Buttons v1.2
trunk 0.9 1.0 1.1 1.1.1 1.1.2 1.10 1.11 1.12 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.3 1.30 1.4 1.5 1.6 1.7 1.8 1.9
share-button / classes / class-presets.php

class-presets.php in Social Share Buttons 1.2, at classes/class-presets.php

76 lines 6.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace MBSocial;
3 defined('ABSPATH') or die('No direct access permitted');
4
5
6 class Presets
7 {
8
9 protected $presets = array();
10
11
12 public function __construct()
13 {
14 $this->presets = apply_filters('mbsocial/presets/', $this->setPresets());
15 $this->presets_labels = apply_filters('mbsocail/presets/labels', $this->setPresetsLabels() );
16 }
17
18 public function setPresets()
19 {
20 $presets = array(
21 'round' => '
22 {"style":{"mbs-style":"round","mbs-width":"55","mbs-height":"55"},"layout":{"margin_left":"0","margin_right":"0","margin_top":"0","margin_bottom":"0","orientation":"auto","font":"","font_label_size":"12","font_label_style":"normal","font_label_weight":"normal","font_icon_size":"20","font_icon_style":"normal","font_icon_weight":"normal","use_background":"1","color":"#fff","color_hover":"#fff","button_spacing":"10","ignore_container":0},"effect":{"effect_type":"transform","scale":"120"},"count":{"font_count_size":"16"}}',
23 'round_flip' => '{"style":{"mbs-style":"round","mbs-width":"55","mbs-height":"55"},"layout":{"margin_left":"0","margin_right":"0","margin_top":"0","margin_bottom":"0","orientation":"auto","font":"","font_label_size":"12","font_label_style":"normal","font_label_weight":"normal","font_icon_size":"20","font_icon_style":"normal","font_icon_weight":"normal","use_background":"1","color":"#fff","color_hover":"#fff","button_spacing":"5","ignore_container":0},"effect":{"effect_type":"flip"},"count":{"font_count_size":"16"}}',
24 'square' => '
25 {"style":{"mbs-style":"square","mbs-width":"45","mbs-height":"45"},"layout":{"margin_left":"0","margin_right":"0","margin_top":"0","margin_bottom":"0","orientation":"auto","font":"","font_label_size":"13","font_label_style":"normal","font_label_weight":"normal","font_icon_size":"20","font_icon_style":"normal","font_icon_weight":"normal","use_background":"1","color":"#ffffff","color_hover":"#fff","button_spacing":"5","ignore_container":0},"effect":{"effect_type":"none"}}',
26 'square_hover' => '
27 {"style":{"mbs-style":"square","mbs-width":"55","mbs-height":"55"},"layout":{"margin_left":"0","margin_right":"0","margin_top":"0","margin_bottom":"0","orientation":"auto","font":"","font_label_size":"13","font_label_style":"normal","font_label_weight":"normal","font_icon_size":"20","font_icon_style":"normal","font_icon_weight":"normal","use_background":"1","color":"#ffffff","color_hover":"#fff","button_spacing":"5","ignore_container":0},"effect":{"effect_type":"hover"},"count":{"font_count_size":"16"}}',
28 'square_drop' => '
29 {"style":{"mbs-style":"square","mbs-width":"55","mbs-height":"55"},"layout":{"margin_left":"0","margin_right":"0","margin_top":"0","margin_bottom":"0","orientation":"auto","font":"","font_label_size":"9","font_label_style":"normal","font_label_weight":"normal","font_label_upper":"uppercase","font_icon_size":"20","font_icon_style":"normal","font_icon_weight":"normal","use_background":"1","color":"#ffffff","color_hover":"#fff","button_spacing":"5","ignore_container":0},"effect":{"effect_type":"drop"},"count":{"font_count_size":"14"}}',
30
31 'square_lift' => '
32 {"style":{"mbs-style":"square","mbs-width":"55","mbs-height":"55"},"layout":{"margin_left":"0","margin_right":"0","margin_top":"0","margin_bottom":"0","orientation":"auto","font":"","font_label_size":"10","font_label_style":"normal","font_label_weight":"bold","font_label_upper":"uppercase","font_icon_size":"20","font_icon_style":"normal","font_icon_weight":"normal","use_background":"1","color":"#ffffff","color_hover":"#fff","button_spacing":"5","ignore_container":0},"effect":{"effect_type":"lift"},"count":{"font_count_size":"12"}}
33 ',
34 'square_shift' => '{"style":{"mbs-style":"square","mbs-width":"55","mbs-height":"55"},"layout":{"margin_left":"0","margin_right":"0","margin_top":"0","margin_bottom":"0","orientation":"auto","font":"","font_label_size":"10","font_label_style":"normal","font_label_weight":"normal","font_label_upper":"uppercase","font_icon_size":"24","font_icon_style":"normal","font_icon_weight":"normal","use_background":"1","color":"#ffffff","color_hover":"#fff","button_spacing":"5","ignore_container":0},"effect":{"effect_type":"shift"},"count":{"font_count_size":"10"}}',
35
36 'square_flip' => '
37 {"style":{"mbs-style":"square","mbs-width":"40","mbs-height":"40"},"layout":{"margin_left":"0","margin_right":"0","margin_top":"0","margin_bottom":"0","orientation":"auto","font":"","font_label_size":"12","font_label_style":"normal","font_label_weight":"normal","font_label_upper":"none","font_icon_size":"20","font_icon_style":"normal","font_icon_weight":"normal","use_background":"1","color":"#ffffff","color_hover":"#fff","button_spacing":"5","ignore_container":0},"effect":{"effect_type":"flip"},"count":{"font_count_size":"12"}}',
38
39 'rectangle_flip' => '{"style":{"mbs-style":"square","mbs-width":"90","mbs-height":"35"},"layout":{"margin_left":"5","margin_right":"0","margin_top":"0","margin_bottom":"0","orientation":"auto","font":"","font_label_size":"13","font_label_style":"normal","font_label_weight":"bold","font_label_upper":"uppercase","font_icon_size":"20","font_icon_style":"normal","font_icon_weight":"bold","use_background":"1","background_color":"#000","background_color_hover":"#000","color":"#ffffff","color_hover":"#fff","button_spacing":"5","ignore_container":0},"effect":{"effect_type":"flip","scale":"120"},"count":{"font_count_size":"15"}}',
40
41 'stretch' => '{"style":{"mbs-style":"square","mbs-width":"55","mbs-height":"55"},"layout":{"margin_left":"0","margin_right":"0","margin_top":"36","margin_bottom":"0","orientation":"auto","font":"","font_label_size":"13","font_label_style":"normal","font_label_weight":"normal","font_label_upper":"uppercase","font_icon_size":"20","font_icon_style":"normal","font_icon_weight":"normal","use_background":"1","background_color":"#666666","background_color_hover":"#31f41f","color":"#ffffff","color_hover":"#fff","button_spacing":"5","ignore_container":0},"effect":{"effect_type":"stretch","scale":"120"},"count":{"font_count_size":"13"}}',
42 );
43
44 return $presets;
45
46 }
47
48 public function setPresetsLabels()
49 {
50 $labels = array(
51 'round' => __("Simple Round with Hover", 'mbsocial'),
52 'round_flip' => __('Round Buttons with Flip effect', 'mbsocial'),
53 'square' => __('Square small without effect', 'mbsocial'),
54 'square_hover' => __("Square with Hover Effect", 'mbsocial'),
55 'square_drop' => __('Square with drop effect', 'mbsocial'),
56 'square_lift' => __('Square with lift effect', 'mbsocial'),
57 'square_shift' => __('Square with shift effect', 'mbsocial'),
58 'square_flip' => __('Square small with flip effect', 'mbsocial'),
59 'rectangle_flip' => __('Rectangle with flip effect', 'mbsocial'),
60 'stretch' => __('Stretch buttons', 'mbsocial'),
61 );
62
63 return $labels;
64 }
65
66 public function get()
67 {
68 return $this->presets;
69 }
70
71 public function getLabels()
72 {
73 return $this->presets_labels;
74 }
75 }
76