Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | Easy Modal |
Version | 2 |
Comparing to | |
See all releases |
Code changes from version 1.3.0.3 to 2
- addons/gravityforms.php +42 -0
- assets/images/admin/box-shot-developer.jpg +0 -0
- assets/images/admin/box-shot-pro.jpg +0 -0
- assets/images/admin/box-shot.jpg +0 -0
- assets/images/admin/dashboard-icon.png +0 -0
- assets/images/admin/easy-modal-icon.png +0 -0
- assets/images/admin/get-started-arrow.png +0 -0
- assets/images/admin/icon-info-21x21.png +0 -0
- assets/images/admin/sidebar-documentation.jpg +0 -0
- assets/images/admin/sidebar-forum-support.png +0 -0
- assets/images/admin/sidebar-logo.png +0 -0
- assets/images/admin/sidebar-priority-support.png +0 -0
- assets/images/admin/sidebar-pro-support.png +0 -0
- assets/scripts/easy-modal-admin.js +384 -0
- assets/scripts/easy-modal-site.js +738 -0
- assets/scripts/jquery.transit.min.js +1 -0
- assets/styles/easy-modal-admin.css +342 -0
- assets/styles/easy-modal-site.css +77 -0
- classes/admin.php +143 -0
- classes/admin/editor.php +31 -0
- classes/admin/menu.php +84 -0
- classes/admin/notice.php +35 -0
- classes/admin/postmeta.php +42 -0
- classes/controller.php +32 -0
- classes/controller/admin/addons.php +32 -0
- classes/controller/admin/help.php +18 -0
- classes/controller/admin/modals.php +193 -0
- classes/controller/admin/settings.php +50 -0
- classes/controller/admin/theme.php +106 -0
- classes/license.php +125 -0
- classes/migrate.php +572 -0
- classes/modals.php +61 -0
- classes/model.php +173 -0
- classes/model/modal.php +105 -0
- classes/model/modal/meta.php +15 -0
- classes/model/theme.php +106 -0
- classes/model/theme/meta.php +18 -0
- classes/site.php +27 -0
- classes/view.php +16 -0
- classes/view/admin/addons.php +122 -0
- classes/view/admin/help.php +33 -0
- classes/view/admin/modal/form.php +75 -0
- classes/view/admin/modal/index.php +260 -0
- classes/view/admin/settings/form.php +53 -0
- classes/view/admin/theme/form.php +157 -0
- classes/view/modal.php +82 -0
- easy-modal.php +168 -1031
- inc/classes/gravityforms.php +0 -23
- inc/classes/shortcodes.php +0 -56
- inc/classes/updater_skin.php +0 -55
- inc/css/easy-modal-admin.css +0 -174
- inc/css/easy-modal-admin.min.css +0 -1
- inc/css/easy-modal.css +0 -98
- inc/css/easy-modal.min.css +0 -1
- inc/functions.php +0 -16
- inc/images/admin/affiliate.jpg +0 -0
- inc/images/admin/affiliate.png +0 -0
- inc/images/admin/bonus.png +0 -0
- inc/images/admin/color_selector.png +0 -0
- inc/images/admin/colorpicker_background.png +0 -0
- inc/images/admin/colorpicker_hex.png +0 -0
- inc/images/admin/colorpicker_hsb_b.png +0 -0
- inc/images/admin/colorpicker_hsb_h.png +0 -0
- inc/images/admin/colorpicker_hsb_s.png +0 -0
- inc/images/admin/colorpicker_indic.gif +0 -0
- inc/images/admin/colorpicker_overlay.png +0 -0
- inc/images/admin/colorpicker_rgb_b.png +0 -0
- inc/images/admin/colorpicker_rgb_g.png +0 -0
- inc/images/admin/colorpicker_rgb_r.png +0 -0
- inc/images/admin/colorpicker_select.gif +0 -0
- inc/images/admin/colorpicker_submit.png +0 -0
- inc/images/admin/dashboard-icon.png +0 -0
- inc/images/admin/easy-modal-icon.png +0 -0
- inc/images/admin/switch.gif +0 -0
- inc/images/admin/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- inc/images/admin/ui-bg_flat_55_fbec88_40x100.png +0 -0
- inc/images/admin/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- inc/images/admin/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- inc/images/admin/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- inc/images/admin/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- inc/images/admin/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- inc/images/admin/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- inc/images/admin/ui-icons_217bc0_256x240.png +0 -0
- inc/images/admin/ui-icons_2e83ff_256x240.png +0 -0
- inc/images/admin/ui-icons_469bdd_256x240.png +0 -0
- inc/images/admin/ui-icons_6da8d5_256x240.png +0 -0
- inc/images/admin/ui-icons_cd0a0a_256x240.png +0 -0
- inc/images/admin/ui-icons_d8e7f3_256x240.png +0 -0
- inc/images/admin/ui-icons_f9bd01_256x240.png +0 -0
- inc/images/loader.gif +0 -0
- inc/js/colorpicker.js +0 -484
- inc/js/colorpicker.min.js +0 -1
- inc/js/easy-modal-admin.js +0 -326
- inc/js/easy-modal-admin.min.js +0 -1
- inc/js/easy-modal.js +0 -871
- inc/js/easy-modal.min.js +0 -871
- inc/js/jquery.animate-colors-min.js +0 -10
- inc/js/jquery.cookie.js +0 -79
- inc/models/modal.php +0 -150
- inc/views/admin_footer.php +0 -32
- inc/views/help.php +0 -40
- inc/views/metaboxes.php +0 -13
- inc/views/modal.php +0 -7
- inc/views/modal_delete.php +0 -22
- inc/views/modal_list.php +0 -48
- inc/views/modal_settings.php +0 -254
- inc/views/settings.php +0 -61
- inc/views/sidebar.php +0 -47
- inc/views/theme_settings.php +0 -375
- includes/admin/addon-pro-tab.php +39 -0
- includes/admin/content.php +14 -0
- includes/admin/footer.php +23 -0
- includes/admin/functions.php +43 -0
- includes/admin/help-general-tab.php +28 -0
- includes/admin/modal-form-close-tab.php +44 -0
- includes/admin/modal-form-display-tab.php +238 -0
- includes/admin/modal-form-example-tab.php +32 -0
- includes/admin/modal-form-general-tab.php +95 -0
- includes/admin/options.php +243 -0
- includes/admin/postmeta.php +38 -0
- includes/admin/settings-form-general-tab.php +54 -0
- includes/admin/sidebar.php +48 -0
- includes/admin/theme-form-close-tab.php +359 -0
- includes/admin/theme-form-container-tab.php +186 -0
- includes/admin/theme-form-content-tab.php +61 -0
- includes/admin/theme-form-general-tab.php +41 -0
- includes/admin/theme-form-overlay-tab.php +47 -0
- includes/admin/theme-form-title-tab.php +126 -0
- includes/deprecated.php +33 -0
- includes/functions.php +93 -0
- includes/shortcodes.php +76 -0
- includes/updates/css/puc-debug-bar.css +19 -0
- includes/updates/debug-bar-panel.php +129 -0
- includes/updates/debug-bar-plugin.php +102 -0
- includes/updates/js/debug-bar.js +52 -0
- includes/updates/plugin-update-checker.php +1061 -0
- init.php +95 -0
- languages/easy-modal-en_US.mo +0 -0
- languages/easy-modal-en_US.po +892 -0
- languages/easy-modal-pt.mo +0 -0
- languages/easy-modal-pt.po +892 -0
- languages/easy-modal-ru_RU.mo +0 -0
- languages/easy-modal-ru_RU.po +893 -0
- readme.txt +96 -34
- screenshot-1.jpg +0 -0
- screenshot-2.jpg +0 -0
addons/gravityforms.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class EModal_GForms {
|
3 |
+
public function __construct()
|
4 |
+
{
|
5 |
+
add_action('emodal_preload_modal', array($this,'preload_modals'));
|
6 |
+
add_action('emodal_preload_modal', array($this,'check_shortcodes'));
|
7 |
+
}
|
8 |
+
public function preload_modals($modal)
|
9 |
+
{
|
10 |
+
if(function_exists('gravity_form_enqueue_scripts'))
|
11 |
+
{
|
12 |
+
$regex = "/\[gravityform.*id=[\'\"]?([0-9]*)[\'\"]?.*/";
|
13 |
+
preg_match_all($regex, $modal->content, $matches);
|
14 |
+
foreach($matches[1] as $form_id)
|
15 |
+
{
|
16 |
+
add_filter("gform_confirmation_anchor_{$form_id}", create_function("","return false;"));
|
17 |
+
gravity_form_enqueue_scripts($form_id, true);
|
18 |
+
}
|
19 |
+
}
|
20 |
+
return $modal;
|
21 |
+
}
|
22 |
+
public function check_shortcodes($modal)
|
23 |
+
{
|
24 |
+
global $wp_query;
|
25 |
+
if(!empty($wp_query->post->ID) && $post_id = $wp_query->post->ID)
|
26 |
+
{
|
27 |
+
if(function_exists('gravity_form_enqueue_scripts'))
|
28 |
+
{
|
29 |
+
$regex = "/\[gravityform.*id=[\'\"]?([0-9]*)[\'\"]?.*/";
|
30 |
+
preg_match_all($regex, $wp_query->post->post_content, $matches);
|
31 |
+
foreach($matches[1] as $form_id)
|
32 |
+
{
|
33 |
+
add_filter("gform_confirmation_anchor_{$form_id}", create_function("","return false;"));
|
34 |
+
//gravity_form_enqueue_scripts($form_id, true);
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
38 |
+
return $modal;
|
39 |
+
}
|
40 |
+
|
41 |
+
}
|
42 |
+
$Emodal_GForms = new EModal_GForms;
|
assets/images/admin/box-shot-developer.jpg
ADDED
Binary file
|
assets/images/admin/box-shot-pro.jpg
ADDED
Binary file
|
assets/images/admin/box-shot.jpg
ADDED
Binary file
|
assets/images/admin/dashboard-icon.png
ADDED
Binary file
|
assets/images/admin/easy-modal-icon.png
ADDED
Binary file
|
assets/images/admin/get-started-arrow.png
ADDED
Binary file
|
assets/images/admin/icon-info-21x21.png
ADDED
Binary file
|
assets/images/admin/sidebar-documentation.jpg
ADDED
Binary file
|
assets/images/admin/sidebar-forum-support.png
ADDED
Binary file
|
assets/images/admin/sidebar-logo.png
ADDED
Binary file
|
assets/images/admin/sidebar-priority-support.png
ADDED
Binary file
|
assets/images/admin/sidebar-pro-support.png
ADDED
Binary file
|
assets/scripts/easy-modal-admin.js
ADDED
@@ -0,0 +1,384 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
var EModalAdmin = {
|
3 |
+
init: function () {
|
4 |
+
EModalAdmin.initialize_tabs();
|
5 |
+
if (jQuery('#emodal-modal-editor').length) {
|
6 |
+
EModalAdmin.initialize_modal_page();
|
7 |
+
}
|
8 |
+
if (jQuery('#emodal-theme-editor').length) {
|
9 |
+
EModalAdmin.initialize_theme_page();
|
10 |
+
}
|
11 |
+
EModalAdmin.initialize_color_pickers();
|
12 |
+
EModalAdmin.initialize_range_sliders();
|
13 |
+
|
14 |
+
jQuery(document).keydown(function (e) {
|
15 |
+
if ((e.which === '115' || e.which === '83') && (e.ctrlKey || e.metaKey)) {
|
16 |
+
e.preventDefault();
|
17 |
+
jQuery('#emodal-theme-editor, #emodal-modal-editor').submit();
|
18 |
+
return false;
|
19 |
+
}
|
20 |
+
return true;
|
21 |
+
});
|
22 |
+
|
23 |
+
},
|
24 |
+
initialize_color_pickers: function () {
|
25 |
+
var self = this;
|
26 |
+
jQuery('.color-picker').wpColorPicker({
|
27 |
+
clear: function (event, ui) {
|
28 |
+
self.debounce(setTimeout(function () {
|
29 |
+
var theme = self.serialize_form('#emodal-theme-editor').theme;
|
30 |
+
self.retheme_modal(theme.meta);
|
31 |
+
}, 5), 10000);
|
32 |
+
var $input = jQuery(event.currentTarget).prev();
|
33 |
+
if ($input.hasClass('background-color')) {
|
34 |
+
$input.parents('table').find('.background-opacity').hide();
|
35 |
+
}
|
36 |
+
}
|
37 |
+
});
|
38 |
+
|
39 |
+
},
|
40 |
+
initialize_range_sliders: function () {
|
41 |
+
jQuery('input[type="range"]').on('input', function () {
|
42 |
+
jQuery(this).next('.range-value').find('.value').text(jQuery(this).val());
|
43 |
+
});
|
44 |
+
var input = document.createElement('input'),
|
45 |
+
$input,
|
46 |
+
$slider;
|
47 |
+
input.setAttribute('type', 'range');
|
48 |
+
if (input.type === 'text') {
|
49 |
+
jQuery('input[type=range]').each(function (index, input) {
|
50 |
+
$input = jQuery(input);
|
51 |
+
$slider = jQuery('<div />').slider({
|
52 |
+
min: parseInt($input.attr('min'), 10) || 0,
|
53 |
+
max: parseInt($input.attr('max'), 10) || 100,
|
54 |
+
value: parseInt($input.attr('value'), 10) || 0,
|
55 |
+
step: parseInt($input.attr('step'), 10) || 1,
|
56 |
+
slide: function (event, ui) {
|
57 |
+
jQuery(this).prev('input').val(ui.value);
|
58 |
+
}
|
59 |
+
});
|
60 |
+
$input.after($slider).hide();
|
61 |
+
});
|
62 |
+
}
|
63 |
+
},
|
64 |
+
initialize_tabs: function () {
|
65 |
+
//var active_tab = window.location.hash.replace('#top#','');
|
66 |
+
var active_tab = window.location.hash;
|
67 |
+
if (active_tab === '') {
|
68 |
+
active_tab = '#' + jQuery('.emodal-tab-content').eq(0).attr('id');
|
69 |
+
}
|
70 |
+
|
71 |
+
jQuery('.emodal-tab-content').hide();
|
72 |
+
jQuery(active_tab).show();
|
73 |
+
jQuery(active_tab + '-tab').addClass('nav-tab-active');
|
74 |
+
jQuery(window).scrollTop(0);
|
75 |
+
|
76 |
+
|
77 |
+
jQuery('#emodal-tabs .nav-tab').click(function (e) {
|
78 |
+
e.preventDefault();
|
79 |
+
|
80 |
+
jQuery('.emodal-tab-content').hide();
|
81 |
+
jQuery('.emodal-tab').removeClass('nav-tab-active');
|
82 |
+
|
83 |
+
var id = jQuery(this).attr('href');
|
84 |
+
jQuery(id).show();
|
85 |
+
jQuery(this).addClass('nav-tab-active');
|
86 |
+
|
87 |
+
if (history.pushState) {
|
88 |
+
history.pushState(null, null, id);
|
89 |
+
} else {
|
90 |
+
location.hash = id;
|
91 |
+
jQuery(window).scrollTop(0);
|
92 |
+
}
|
93 |
+
});
|
94 |
+
},
|
95 |
+
initialize_modal_page: function () {
|
96 |
+
var update_size = function () {
|
97 |
+
if (jQuery("#size").val() !== 'custom') {
|
98 |
+
jQuery('.custom-size-only').hide();
|
99 |
+
} else {
|
100 |
+
jQuery('.custom-size-only').show();
|
101 |
+
}
|
102 |
+
if (jQuery('#custom_height_auto').is(':checked')) {
|
103 |
+
jQuery('.custom-size-height-only').hide();
|
104 |
+
} else {
|
105 |
+
jQuery('.custom-size-height-only').show();
|
106 |
+
}
|
107 |
+
},
|
108 |
+
update_animation = function () {
|
109 |
+
jQuery('.animation-speed, .animation-origin').hide();
|
110 |
+
if (jQuery("#animation_type").val() === 'fade') {
|
111 |
+
jQuery('.animation-speed').show();
|
112 |
+
} else if (jQuery("#animation_type").val() === 'none') {
|
113 |
+
|
114 |
+
} else {
|
115 |
+
jQuery('.animation-speed, .animation-origin').show();
|
116 |
+
}
|
117 |
+
|
118 |
+
},
|
119 |
+
update_location = function () {
|
120 |
+
var $this = jQuery('#display_location'),
|
121 |
+
table = $this.parents('table'),
|
122 |
+
val = $this.val();
|
123 |
+
jQuery('tr.top, tr.right, tr.left, tr.bottom', table).hide();
|
124 |
+
if (val.indexOf("top") >= 0) {
|
125 |
+
jQuery('tr.top').show();
|
126 |
+
}
|
127 |
+
if (val.indexOf("left") >= 0) {
|
128 |
+
jQuery('tr.left').show();
|
129 |
+
}
|
130 |
+
if (val.indexOf("bottom") >= 0) {
|
131 |
+
jQuery('tr.bottom').show();
|
132 |
+
}
|
133 |
+
if (val.indexOf("right") >= 0) {
|
134 |
+
jQuery('tr.right').show();
|
135 |
+
}
|
136 |
+
};
|
137 |
+
jQuery("#size").on('change', function () {
|
138 |
+
update_size();
|
139 |
+
});
|
140 |
+
jQuery('#custom_height_auto').on('click', function () {
|
141 |
+
update_size();
|
142 |
+
});
|
143 |
+
jQuery("#animation_type").on('change', function () {
|
144 |
+
update_animation();
|
145 |
+
});
|
146 |
+
jQuery("#animation_speed").on('input', function () {
|
147 |
+
jQuery(this).next('.range-value').text(jQuery(this).val() + 'ms');
|
148 |
+
});
|
149 |
+
jQuery('#display_location').on('change', function () {
|
150 |
+
update_location();
|
151 |
+
});
|
152 |
+
update_size();
|
153 |
+
update_animation();
|
154 |
+
update_location();
|
155 |
+
},
|
156 |
+
theme_page_listeners: function () {
|
157 |
+
var self = this;
|
158 |
+
jQuery('select, input:not(.color-picker)').on('change input focusout', function () {
|
159 |
+
self.update_theme();
|
160 |
+
});
|
161 |
+
jQuery('select.border-style').on('change', function () {
|
162 |
+
var $this = jQuery(this);
|
163 |
+
if ($this.val() === 'none') {
|
164 |
+
$this.parents('table').find('.border-options').hide();
|
165 |
+
} else {
|
166 |
+
$this.parents('table').find('.border-options').show();
|
167 |
+
}
|
168 |
+
});
|
169 |
+
jQuery('#close_location').on('change', function () {
|
170 |
+
var $this = jQuery(this),
|
171 |
+
table = $this.parents('table');
|
172 |
+
jQuery('tr.topleft, tr.topright, tr.bottomleft, tr.bottomright', table).hide();
|
173 |
+
jQuery('tr.' + $this.val(), table).show();
|
174 |
+
});
|
175 |
+
jQuery('.color-picker').on('irischange', function (event, ui) {
|
176 |
+
self.debounce(setTimeout(function () {
|
177 |
+
var theme = self.serialize_form('#emodal-theme-editor').theme;
|
178 |
+
self.retheme_modal(theme.meta);
|
179 |
+
}, 5), 10000);
|
180 |
+
var $input = jQuery(event.currentTarget);
|
181 |
+
if ($input.hasClass('background-color')) {
|
182 |
+
$input.parents('table').find('.background-opacity').show();
|
183 |
+
}
|
184 |
+
});
|
185 |
+
|
186 |
+
},
|
187 |
+
update_theme: function () {
|
188 |
+
var theme = this.serialize_form('#emodal-theme-editor').theme;
|
189 |
+
this.retheme_modal(theme.meta);
|
190 |
+
},
|
191 |
+
theme_preview_scroll: function () {
|
192 |
+
var $preview = jQuery('#emodal-theme-editor .empreview'),
|
193 |
+
startscroll = $preview.offset().top - 50;
|
194 |
+
jQuery(window).on('scroll', function () {
|
195 |
+
if (jQuery(window).scrollTop() >= startscroll) {
|
196 |
+
$preview.css({
|
197 |
+
left: $preview.offset().left,
|
198 |
+
width: $preview.width(),
|
199 |
+
height: $preview.height(),
|
200 |
+
position: 'fixed',
|
201 |
+
top: 50
|
202 |
+
});
|
203 |
+
} else {
|
204 |
+
$preview.removeAttr('style');
|
205 |
+
}
|
206 |
+
});
|
207 |
+
},
|
208 |
+
initialize_theme_page: function () {
|
209 |
+
var self = this,
|
210 |
+
table = jQuery('#close_location').parents('table');
|
211 |
+
self.update_theme();
|
212 |
+
self.theme_page_listeners();
|
213 |
+
self.theme_preview_scroll();
|
214 |
+
|
215 |
+
jQuery('select.border-style').each(function () {
|
216 |
+
var $this = jQuery(this);
|
217 |
+
if ($this.val() === 'none') {
|
218 |
+
$this.parents('table').find('.border-options').hide();
|
219 |
+
} else {
|
220 |
+
$this.parents('table').find('.border-options').show();
|
221 |
+
}
|
222 |
+
});
|
223 |
+
|
224 |
+
jQuery('.color-picker.background-color').each(function () {
|
225 |
+
var $this = jQuery(this);
|
226 |
+
if ($this.val() === '') {
|
227 |
+
$this.parents('table').find('.background-opacity').hide();
|
228 |
+
} else {
|
229 |
+
$this.parents('table').find('.background-opacity').show();
|
230 |
+
}
|
231 |
+
});
|
232 |
+
|
233 |
+
jQuery('tr.topleft, tr.topright, tr.bottomleft, tr.bottomright', table).hide();
|
234 |
+
switch (jQuery('#close_location').val()) {
|
235 |
+
case "topleft":
|
236 |
+
jQuery('tr.topleft', table).show();
|
237 |
+
break;
|
238 |
+
case "topright":
|
239 |
+
jQuery('tr.topright', table).show();
|
240 |
+
break;
|
241 |
+
case "bottomleft":
|
242 |
+
jQuery('tr.bottomleft', table).show();
|
243 |
+
break;
|
244 |
+
case "bottomright":
|
245 |
+
jQuery('tr.bottomright', table).show();
|
246 |
+
break;
|
247 |
+
}
|
248 |
+
|
249 |
+
},
|
250 |
+
retheme_modal: function (theme) {
|
251 |
+
var $overlay = jQuery('.empreview .example-modal-overlay'),
|
252 |
+
$container = jQuery('.empreview .example-modal'),
|
253 |
+
$title = jQuery('.title', $container),
|
254 |
+
$content = jQuery('.content', $container),
|
255 |
+
$close = jQuery('.close-modal', $container),
|
256 |
+
container_inset = theme.container.boxshadow.inset === 'yes' ? 'inset ' : '',
|
257 |
+
close_inset = theme.close.boxshadow.inset === 'yes' ? 'inset ' : '';
|
258 |
+
|
259 |
+
$overlay.removeAttr('style').css({
|
260 |
+
backgroundColor: this.convert_hex(theme.overlay.background.color, theme.overlay.background.opacity)
|
261 |
+
});
|
262 |
+
$container.removeAttr('style').css({
|
263 |
+
padding: theme.container.padding + 'px',
|
264 |
+
backgroundColor: this.convert_hex(theme.container.background.color, theme.container.background.opacity),
|
265 |
+
borderStyle: theme.container.border.style,
|
266 |
+
borderColor: theme.container.border.color,
|
267 |
+
borderWidth: theme.container.border.width + 'px',
|
268 |
+
borderRadius: theme.container.border.radius + 'px',
|
269 |
+
boxShadow: container_inset + theme.container.boxshadow.horizontal + 'px ' + theme.container.boxshadow.vertical + 'px ' + theme.container.boxshadow.blur + 'px ' + theme.container.boxshadow.spread + 'px ' + this.convert_hex(theme.container.boxshadow.color, theme.container.boxshadow.opacity)
|
270 |
+
});
|
271 |
+
$title.removeAttr('style').css({
|
272 |
+
color: theme.title.font.color,
|
273 |
+
fontSize: theme.title.font.size + 'px',
|
274 |
+
fontFamily: theme.title.font.family,
|
275 |
+
textAlign: theme.title.text.align,
|
276 |
+
textShadow: theme.title.textshadow.horizontal + 'px ' + theme.title.textshadow.vertical + 'px ' + theme.title.textshadow.blur + 'px ' + this.convert_hex(theme.title.textshadow.color, theme.title.textshadow.opacity)
|
277 |
+
});
|
278 |
+
$content.removeAttr('style').css({
|
279 |
+
color: theme.content.font.color,
|
280 |
+
//fontSize: theme.content.font.size+'px',
|
281 |
+
fontFamily: theme.content.font.family
|
282 |
+
});
|
283 |
+
$close.html(theme.close.text).removeAttr('style').css({
|
284 |
+
padding: theme.close.padding + 'px',
|
285 |
+
backgroundColor: this.convert_hex(theme.close.background.color, theme.close.background.opacity),
|
286 |
+
color: theme.close.font.color,
|
287 |
+
fontSize: theme.close.font.size + 'px',
|
288 |
+
fontFamily: theme.close.font.family,
|
289 |
+
borderStyle: theme.close.border.style,
|
290 |
+
borderColor: theme.close.border.color,
|
291 |
+
borderWidth: theme.close.border.width + 'px',
|
292 |
+
borderRadius: theme.close.border.radius + 'px',
|
293 |
+
boxShadow: close_inset + theme.close.boxshadow.horizontal + 'px ' + theme.close.boxshadow.vertical + 'px ' + theme.close.boxshadow.blur + 'px ' + theme.close.boxshadow.spread + 'px ' + this.convert_hex(theme.close.boxshadow.color, theme.close.boxshadow.opacity),
|
294 |
+
textShadow: theme.close.textshadow.horizontal + 'px ' + theme.close.textshadow.vertical + 'px ' + theme.close.textshadow.blur + 'px ' + this.convert_hex(theme.close.textshadow.color, theme.close.textshadow.opacity)
|
295 |
+
});
|
296 |
+
switch (theme.close.location) {
|
297 |
+
case "topleft":
|
298 |
+
$close.css({
|
299 |
+
top: theme.close.position.top + 'px',
|
300 |
+
left: theme.close.position.left + 'px'
|
301 |
+
});
|
302 |
+
break;
|
303 |
+
case "topright":
|
304 |
+
$close.css({
|
305 |
+
top: theme.close.position.top + 'px',
|
306 |
+
right: theme.close.position.right + 'px'
|
307 |
+
});
|
308 |
+
break;
|
309 |
+
case "bottomleft":
|
310 |
+
$close.css({
|
311 |
+
bottom: theme.close.position.bottom + 'px',
|
312 |
+
left: theme.close.position.left + 'px'
|
313 |
+
});
|
314 |
+
break;
|
315 |
+
case "bottomright":
|
316 |
+
$close.css({
|
317 |
+
bottom: theme.close.position.bottom + 'px',
|
318 |
+
right: theme.close.position.right + 'px'
|
319 |
+
});
|
320 |
+
break;
|
321 |
+
}
|
322 |
+
jQuery(document).trigger('emodal-admin-retheme', [theme]);
|
323 |
+
},
|
324 |
+
serialize_form: function ($form) {
|
325 |
+
var serialized = {};
|
326 |
+
jQuery("[name]", $form).each(function () {
|
327 |
+
var name = jQuery(this).attr('name'),
|
328 |
+
value = jQuery(this).val(),
|
329 |
+
nameBits = name.split('['),
|
330 |
+
previousRef = serialized,
|
331 |
+
i = 0,
|
332 |
+
l = nameBits.length,
|
333 |
+
nameBit;
|
334 |
+
for (i; i < l; i += 1) {
|
335 |
+
nameBit = nameBits[i].replace(']', '');
|
336 |
+
if (!previousRef[nameBit]) {
|
337 |
+
previousRef[nameBit] = {};
|
338 |
+
}
|
339 |
+
if (i !== nameBits.length - 1) {
|
340 |
+
previousRef = previousRef[nameBit];
|
341 |
+
} else if (i === nameBits.length - 1) {
|
342 |
+
previousRef[nameBit] = value;
|
343 |
+
}
|
344 |
+
}
|
345 |
+
});
|
346 |
+
return serialized;
|
347 |
+
},
|
348 |
+
convert_hex: function (hex, opacity) {
|
349 |
+
hex = hex.replace('#', '');
|
350 |
+
var r = parseInt(hex.substring(0, 2), 16),
|
351 |
+
g = parseInt(hex.substring(2, 4), 16),
|
352 |
+
b = parseInt(hex.substring(4, 6), 16),
|
353 |
+
result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
|
354 |
+
return result;
|
355 |
+
},
|
356 |
+
// taken from underscore.js _.debounce method
|
357 |
+
debounce: function (func, wait, immediate) {
|
358 |
+
var timeout, result;
|
359 |
+
return function () {
|
360 |
+
var context = this,
|
361 |
+
args = arguments,
|
362 |
+
later,
|
363 |
+
callNow;
|
364 |
+
|
365 |
+
later = function () {
|
366 |
+
timeout = null;
|
367 |
+
if (!immediate) {
|
368 |
+
result = func.apply(context, args);
|
369 |
+
}
|
370 |
+
};
|
371 |
+
|
372 |
+
callNow = immediate && !timeout;
|
373 |
+
clearTimeout(timeout);
|
374 |
+
timeout = setTimeout(later, wait);
|
375 |
+
if (callNow) {
|
376 |
+
result = func.apply(context, args);
|
377 |
+
}
|
378 |
+
return result;
|
379 |
+
};
|
380 |
+
}
|
381 |
+
};
|
382 |
+
jQuery(document).ready(function () {
|
383 |
+
EModalAdmin.init();
|
384 |
+
});
|
assets/scripts/easy-modal-site.js
ADDED
@@ -0,0 +1,738 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function (jQuery) {
|
2 |
+
if (!jQuery.isFunction(jQuery.fn.on)) {
|
3 |
+
jQuery.fn.on = function(types, sel, fn) {
|
4 |
+
return this.delegate(sel, types, fn);
|
5 |
+
};
|
6 |
+
jQuery.fn.off = function(types, sel, fn) {
|
7 |
+
return this.undelegate(sel, types, fn);
|
8 |
+
};
|
9 |
+
}
|
10 |
+
|
11 |
+
if (!jQuery.support.transition)
|
12 |
+
jQuery.fn.transition = jQuery.fn.animate;
|
13 |
+
|
14 |
+
jQuery.fn.emodal = function (method) {
|
15 |
+
// Method calling logic
|
16 |
+
if (jQuery.fn.emodal.methods[method]) {
|
17 |
+
return jQuery.fn.emodal.methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
18 |
+
} else if (typeof method === 'object' || !method) {
|
19 |
+
return jQuery.fn.emodal.methods.init.apply(this, arguments);
|
20 |
+
} else {
|
21 |
+
jQuery.error('Method ' + method + ' does not exist on jQuery.fn.emodal');
|
22 |
+
}
|
23 |
+
};
|
24 |
+
jQuery.fn.emodal.methods = {
|
25 |
+
init: function (options) {
|
26 |
+
return this.each(function () {
|
27 |
+
var $this = jQuery(this);
|
28 |
+
var settings = jQuery.extend(true, {}, jQuery.fn.emodal.defaults, $this.data('emodal'), options);
|
29 |
+
|
30 |
+
if (!$this.parent().is('body'))
|
31 |
+
$this.appendTo('body');
|
32 |
+
|
33 |
+
if (!jQuery('#' + settings.overlay.attr.id).length)
|
34 |
+
jQuery('<div>').attr(settings.overlay.attr).appendTo('body');
|
35 |
+
|
36 |
+
jQuery(window).on('resize', function () {
|
37 |
+
if ($this.hasClass('active'))
|
38 |
+
jQuery.fn.emodal.utilies.debounce(setTimeout(function () {
|
39 |
+
$this.emodal('reposition');
|
40 |
+
}, 25), 500, false);
|
41 |
+
});
|
42 |
+
|
43 |
+
$this
|
44 |
+
.data('emodal', settings)
|
45 |
+
.on('emodalBeforeOpen.setup_close', function () {
|
46 |
+
$this.emodal('setup_close');
|
47 |
+
})
|
48 |
+
.on('emodalBeforeOpen.retheme', function () {
|
49 |
+
$this.emodal('retheme');
|
50 |
+
})
|
51 |
+
.on('emodalBeforeOpen.reposition', function () {
|
52 |
+
$this.emodal('reposition');
|
53 |
+
})
|
54 |
+
.trigger('emodalInit');
|
55 |
+
return this;
|
56 |
+
});
|
57 |
+
},
|
58 |
+
setup_close: function () {
|
59 |
+
var $this = jQuery(this);
|
60 |
+
var settings = $this.data('emodal');
|
61 |
+
var $overlay = jQuery('#' + settings.overlay.attr.id);
|
62 |
+
var $close = jQuery('.' + settings.close.attr.class, $this);
|
63 |
+
$close
|
64 |
+
.off('click.emodal')
|
65 |
+
.on("click.emodal", function (e) {
|
66 |
+
e.preventDefault();
|
67 |
+
e.stopPropagation();
|
68 |
+
$this.emodal('close');
|
69 |
+
|
70 |
+
});
|
71 |
+
if (settings.meta.close.esc_press)
|
72 |
+
jQuery(window)
|
73 |
+
.off('keyup.emodal')
|
74 |
+
.on('keyup.emodal', function (e) {
|
75 |
+
if (e.keyCode == 27)
|
76 |
+
$this.emodal('close');
|
77 |
+
});
|
78 |
+
|
79 |
+
if (settings.meta.close.overlay_click)
|
80 |
+
$overlay
|
81 |
+
.off('click.emodal')
|
82 |
+
.on('click.emodal', function (e) {
|
83 |
+
e.preventDefault();
|
84 |
+
e.stopPropagation();
|
85 |
+
$this.emodal('close');
|
86 |
+
});
|
87 |
+
|
88 |
+
$this
|
89 |
+
.on('emodalAfterClose', function () {
|
90 |
+
jQuery(window).off('keyup.emodal');
|
91 |
+
$overlay.off('click.emodal');
|
92 |
+
$close.off('click.emodal');
|
93 |
+
})
|
94 |
+
.trigger('emodalSetupClose');
|
95 |
+
},
|
96 |
+
open: function () {
|
97 |
+
var $this = jQuery(this);
|
98 |
+
$this
|
99 |
+
.emodal('close_all')
|
100 |
+
.trigger('emodalBeforeOpen');
|
101 |
+
var settings = $this.data('emodal');
|
102 |
+
$this
|
103 |
+
|
104 |
+
.css({
|
105 |
+
visibility: "visible"
|
106 |
+
})
|
107 |
+
.hide()
|
108 |
+
.addClass(settings.container.active_class)
|
109 |
+
.emodal('animate', settings.meta.display.animation.type)
|
110 |
+
.trigger('emodalAfterOpen');
|
111 |
+
return this;
|
112 |
+
},
|
113 |
+
close: function () {
|
114 |
+
return this.each(function () {
|
115 |
+
var $this = jQuery(this);
|
116 |
+
var settings = $this.data('emodal');
|
117 |
+
$this
|
118 |
+
.trigger('emodalBeforeClose')
|
119 |
+
.removeClass('active')
|
120 |
+
.fadeOut(settings.close.close_speed, function () {
|
121 |
+
$this.trigger('emodalAfterClose');
|
122 |
+
});
|
123 |
+
return this;
|
124 |
+
});
|
125 |
+
},
|
126 |
+
close_all: function () {
|
127 |
+
var settings = jQuery(this).data('emodal');
|
128 |
+
jQuery('.' + settings.container.attr.class).removeClass('active').hide(0);
|
129 |
+
return this;
|
130 |
+
},
|
131 |
+
reposition: function (callback) {
|
132 |
+
var $this = jQuery(this);
|
133 |
+
$this.trigger('emodalBeforeReposition');
|
134 |
+
var settings = $this.data('emodal');
|
135 |
+
var location = settings.meta.display.location;
|
136 |
+
var position = settings.meta.display.position;
|
137 |
+
|
138 |
+
var reposition = {
|
139 |
+
my: "",
|
140 |
+
at: ""
|
141 |
+
};
|
142 |
+
|
143 |
+
if (location.indexOf('left') >= 0) reposition = {
|
144 |
+
my: reposition.my + " left" + (position.left !== 0 ? "+" + position.left : ""),
|
145 |
+
at: reposition.at + " left"
|
146 |
+
};
|
147 |
+
if (location.indexOf('right') >= 0) reposition = {
|
148 |
+
my: reposition.my + " right" + (position.right !== 0 ? "-" + position.right : ""),
|
149 |
+
at: reposition.at + " right"
|
150 |
+
};
|
151 |
+
|
152 |
+
if (location.indexOf('center') >= 0)
|
153 |
+
if (location == 'center') reposition = {
|
154 |
+
my: "center",
|
155 |
+
at: "center"
|
156 |
+
};
|
157 |
+
else reposition = {
|
158 |
+
my: reposition.my + " center",
|
159 |
+
at: reposition.at + " center"
|
160 |
+
};
|
161 |
+
|
162 |
+
if (location.indexOf('top') >= 0) reposition = {
|
163 |
+
my: reposition.my + " top" + (position.top !== 0 ? "+" + position.top : ""),
|
164 |
+
at: reposition.at + " top"
|
165 |
+
};
|
166 |
+
if (location.indexOf('bottom') >= 0) reposition = {
|
167 |
+
my: reposition.my + " bottom" + (position.bottom !== 0 ? "-" + position.bottom : ""),
|
168 |
+
at: reposition.at + " bottom"
|
169 |
+
};
|
170 |
+
|
171 |
+
|
172 |
+
reposition.my = jQuery.trim(reposition.my);
|
173 |
+
reposition.at = jQuery.trim(reposition.at);
|
174 |
+
reposition.of = window;
|
175 |
+
reposition.collision = 'fit';
|
176 |
+
reposition.using = typeof (callback) == "function" ? callback : jQuery.fn.emodal.callbacks.reposition_using;
|
177 |
+
var opacity = false;
|
178 |
+
if ($this.is(':hidden')) {
|
179 |
+
opacity = $this.css("opacity");
|
180 |
+
$this.css({
|
181 |
+
opacity: 0
|
182 |
+
}).show();
|
183 |
+
}
|
184 |
+
|
185 |
+
if (position.fixed)
|
186 |
+
$this.addClass('fixed');
|
187 |
+
else
|
188 |
+
$this.removeClass('fixed');
|
189 |
+
|
190 |
+
if (settings.meta.display.size == 'custom') {
|
191 |
+
$this.css({
|
192 |
+
width: settings.meta.display.custom_width + settings.meta.display.custom_width_unit,
|
193 |
+
height: settings.meta.display.custom_height_auto ? 'auto' : settings.meta.display.custom_height + settings.meta.display.custom_height_unit
|
194 |
+
});
|
195 |
+
}
|
196 |
+
|
197 |
+
$this
|
198 |
+
.addClass('custom-position')
|
199 |
+
.position(reposition)
|
200 |
+
.trigger('emodalAfterReposition');
|
201 |
+
|
202 |
+
if (opacity) {
|
203 |
+
$this.css({
|
204 |
+
opacity: opacity
|
205 |
+
}).hide();
|
206 |
+
}
|
207 |
+
return this;
|
208 |
+
},
|
209 |
+
retheme: function (theme) {
|
210 |
+
var $this = jQuery(this);
|
211 |
+
$this.trigger('emodalBeforeRetheme');
|
212 |
+
var settings = $this.data('emodal'),
|
213 |
+
$overlay = jQuery('#' + settings.overlay.attr.id),
|
214 |
+
$container = $this,
|
215 |
+
$title = jQuery('> .' + settings.title.attr.class, $container),
|
216 |
+
$content = jQuery('> .' + settings.content.attr.class, $container),
|
217 |
+
$close = jQuery('> .' + settings.close.attr.class, $container);
|
218 |
+
|
219 |
+
if (theme === undefined) {
|
220 |
+
theme = jQuery.fn.emodal.themes[settings.theme_id];
|
221 |
+
if (theme === undefined) {
|
222 |
+
theme = jQuery.fn.emodal.themes[1];
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
$overlay.removeAttr('style').css({
|
227 |
+
backgroundColor: convert_hex(theme.overlay.background.color, theme.overlay.background.opacity)
|
228 |
+
});
|
229 |
+
var container_inset = theme.container.boxshadow.inset == 'yes' ? 'inset ' : '';
|
230 |
+
$container.css({
|
231 |
+
padding: theme.container.padding + 'px',
|
232 |
+
backgroundColor: convert_hex(theme.container.background.color, theme.container.background.opacity),
|
233 |
+
borderStyle: theme.container.border.style,
|
234 |
+
borderColor: theme.container.border.color,
|
235 |
+
borderWidth: theme.container.border.width + 'px',
|
236 |
+
borderRadius: theme.container.border.radius + 'px',
|
237 |
+
boxShadow: container_inset + theme.container.boxshadow.horizontal + 'px ' + theme.container.boxshadow.vertical + 'px ' + theme.container.boxshadow.blur + 'px ' + theme.container.boxshadow.spread + 'px ' + convert_hex(theme.container.boxshadow.color, theme.container.boxshadow.opacity)
|
238 |
+
});
|
239 |
+
$title.css({
|
240 |
+
color: theme.title.font.color,
|
241 |
+
fontSize: theme.title.font.size + 'px',
|
242 |
+
fontFamily: theme.title.font.family,
|
243 |
+
textAlign: theme.title.text.align,
|
244 |
+
textShadow: theme.title.textshadow.horizontal + 'px ' + theme.title.textshadow.vertical + 'px ' + theme.title.textshadow.blur + 'px ' + convert_hex(theme.title.textshadow.color, theme.title.textshadow.opacity)
|
245 |
+
});
|
246 |
+
$content.css({
|
247 |
+
color: theme.content.font.color,
|
248 |
+
//fontSize: theme.content.font.size+'px',
|
249 |
+
fontFamily: theme.content.font.family
|
250 |
+
});
|
251 |
+
$('p, label', $content).css({
|
252 |
+
color: theme.content.font.color,
|
253 |
+
//fontSize: theme.content.font.size+'px',
|
254 |
+
fontFamily: theme.content.font.family
|
255 |
+
});
|
256 |
+
var close_inset = theme.close.boxshadow.inset == 'yes' ? 'inset ' : '';
|
257 |
+
$close.html(theme.close.text).css({
|
258 |
+
padding: theme.close.padding + 'px',
|
259 |
+
backgroundColor: convert_hex(theme.close.background.color, theme.close.background.opacity),
|
260 |
+
color: theme.close.font.color,
|
261 |
+
fontSize: theme.close.font.size + 'px',
|
262 |
+
fontFamily: theme.close.font.family,
|
263 |
+
borderStyle: theme.close.border.style,
|
264 |
+
borderColor: theme.close.border.color,
|
265 |
+
borderWidth: theme.close.border.width + 'px',
|
266 |
+
borderRadius: theme.close.border.radius + 'px',
|
267 |
+
boxShadow: close_inset + theme.close.boxshadow.horizontal + 'px ' + theme.close.boxshadow.vertical + 'px ' + theme.close.boxshadow.blur + 'px ' + theme.close.boxshadow.spread + 'px ' + convert_hex(theme.close.boxshadow.color, theme.close.boxshadow.opacity),
|
268 |
+
textShadow: theme.close.textshadow.horizontal + 'px ' + theme.close.textshadow.vertical + 'px ' + theme.close.textshadow.blur + 'px ' + convert_hex(theme.close.textshadow.color, theme.close.textshadow.opacity)
|
269 |
+
});
|
270 |
+
switch (theme.close.location) {
|
271 |
+
case "topleft":
|
272 |
+
$close.css({
|
273 |
+
top: theme.close.position.top + 'px',
|
274 |
+
left: theme.close.position.left + 'px'
|
275 |
+
});
|
276 |
+
break;
|
277 |
+
case "topright":
|
278 |
+
$close.css({
|
279 |
+
top: theme.close.position.top + 'px',
|
280 |
+
right: theme.close.position.right + 'px'
|
281 |
+
});
|
282 |
+
break;
|
283 |
+
case "bottomleft":
|
284 |
+
$close.css({
|
285 |
+
bottom: theme.close.position.bottom + 'px',
|
286 |
+
left: theme.close.position.left + 'px'
|
287 |
+
});
|
288 |
+
break;
|
289 |
+
case "bottomright":
|
290 |
+
$close.css({
|
291 |
+
bottom: theme.close.position.bottom + 'px',
|
292 |
+
right: theme.close.position.right + 'px'
|
293 |
+
});
|
294 |
+
break;
|
295 |
+
}
|
296 |
+
$this.trigger('emodalAfterRetheme', [theme]);
|
297 |
+
return this;
|
298 |
+
},
|
299 |
+
animate_overlay: function (style, duration, callback) {
|
300 |
+
// Method calling logic
|
301 |
+
var $this = jQuery(this);
|
302 |
+
var settings = $this.data('emodal');
|
303 |
+
if(settings.meta.display.overlay_disabled)
|
304 |
+
{
|
305 |
+
callback();
|
306 |
+
}
|
307 |
+
else
|
308 |
+
{
|
309 |
+
if (jQuery.fn.emodal.overlay_animations[style])
|
310 |
+
return jQuery.fn.emodal.overlay_animations[style].apply(this, Array.prototype.slice.call(arguments, 1));
|
311 |
+
else
|
312 |
+
jQuery.error('Animation style ' + jQuery.fn.emodal.overlay_animations + ' does not exist.');
|
313 |
+
}
|
314 |
+
return this;
|
315 |
+
},
|
316 |
+
animate: function (style) {
|
317 |
+
// Method calling logic
|
318 |
+
if (jQuery.fn.emodal.animations[style])
|
319 |
+
return jQuery.fn.emodal.animations[style].apply(this, Array.prototype.slice.call(arguments, 1));
|
320 |
+
else
|
321 |
+
jQuery.error('Animation style ' + jQuery.fn.emodal.animations + ' does not exist.');
|
322 |
+
return this;
|
323 |
+
}
|
324 |
+
};
|
325 |
+
|
326 |
+
jQuery.fn.emodal.callbacks = {
|
327 |
+
reposition_using: function (position) {
|
328 |
+
jQuery(this).css(position);
|
329 |
+
}
|
330 |
+
};
|
331 |
+
|
332 |
+
jQuery.fn.emodal.utilies = {
|
333 |
+
debounce: function (func, wait, immediate) {
|
334 |
+
var timeout, result;
|
335 |
+
return function () {
|
336 |
+
var context = this,
|
337 |
+
args = arguments,
|
338 |
+
later,
|
339 |
+
callNow;
|
340 |
+
|
341 |
+
later = function () {
|
342 |
+
timeout = null;
|
343 |
+
if (!immediate) {
|
344 |
+
result = func.apply(context, args);
|
345 |
+
}
|
346 |
+
};
|
347 |
+
|
348 |
+
callNow = immediate && !timeout;
|
349 |
+
clearTimeout(timeout);
|
350 |
+
timeout = setTimeout(later, wait);
|
351 |
+
if (callNow) {
|
352 |
+
result = func.apply(context, args);
|
353 |
+
}
|
354 |
+
return result;
|
355 |
+
};
|
356 |
+
}
|
357 |
+
};
|
358 |
+
|
359 |
+
jQuery.fn.emodal.defaults = {
|
360 |
+
stackable: false,
|
361 |
+
container: {
|
362 |
+
active_class: 'active',
|
363 |
+
attr: {
|
364 |
+
class: "emodal"
|
365 |
+
}
|
366 |
+
},
|
367 |
+
title: {
|
368 |
+
attr: {
|
369 |
+
class: "emodal-title"
|
370 |
+
}
|
371 |
+
},
|
372 |
+
content: {
|
373 |
+
attr: {
|
374 |
+
class: "emodal-content"
|
375 |
+
}
|
376 |
+
},
|
377 |
+
close: {
|
378 |
+
close_speed: 0,
|
379 |
+
attr: {
|
380 |
+
class: "emodal-close"
|
381 |
+
}
|
382 |
+
},
|
383 |
+
overlay: {
|
384 |
+
attr: {
|
385 |
+
id: "emodal-overlay",
|
386 |
+
class: "emodal-overlay"
|
387 |
+
}
|
388 |
+
}
|
389 |
+
};
|
390 |
+
|
391 |
+
jQuery.fn.emodal.themes = emodal_themes;
|
392 |
+
|
393 |
+
jQuery.fn.emodal.overlay_animations = {
|
394 |
+
none: function (duration, callback) {
|
395 |
+
var $this = jQuery(this);
|
396 |
+
var settings = $this.data('emodal');
|
397 |
+
jQuery('#' + settings.overlay.attr.id).show(duration, callback);
|
398 |
+
},
|
399 |
+
fade: function (duration, callback) {
|
400 |
+
var $this = jQuery(this);
|
401 |
+
var settings = $this.data('emodal');
|
402 |
+
jQuery('#' + settings.overlay.attr.id).fadeIn(duration, callback);
|
403 |
+
},
|
404 |
+
slide: function (duration, callback) {
|
405 |
+
var $this = jQuery(this);
|
406 |
+
var settings = $this.data('emodal');
|
407 |
+
jQuery('#' + settings.overlay.attr.id).slideDown(duration, callback);
|
408 |
+
}
|
409 |
+
};
|
410 |
+
|
411 |
+
jQuery.fn.emodal.animations = {
|
412 |
+
none: function () {
|
413 |
+
var $this = jQuery(this);
|
414 |
+
var settings = $this.data('emodal');
|
415 |
+
$this.emodal('animate_overlay', 'none', 0, function(){
|
416 |
+
$this.show();
|
417 |
+
});
|
418 |
+
return this;
|
419 |
+
},
|
420 |
+
slide: function () {
|
421 |
+
var $this = jQuery(this).show(0).css({
|
422 |
+
opacity: 0
|
423 |
+
});
|
424 |
+
var settings = $this.data('emodal');
|
425 |
+
var speed = settings.meta.display.animation.speed;
|
426 |
+
var origin = settings.meta.display.animation.origin;
|
427 |
+
var start = {
|
428 |
+
my: "",
|
429 |
+
at: ""
|
430 |
+
};
|
431 |
+
switch (origin) {
|
432 |
+
case 'top':
|
433 |
+
start = {
|
434 |
+
my: "left+" + $this.offset().left + " bottom",
|
435 |
+
at: "left top"
|
436 |
+
};
|
437 |
+
break;
|
438 |
+
case 'bottom':
|
439 |
+
start = {
|
440 |
+
my: "left+" + $this.offset().left + " top",
|
441 |
+
at: "left bottom"
|
442 |
+
};
|
443 |
+
break;
|
444 |
+
case 'left':
|
445 |
+
start = {
|
446 |
+
my: "right top+" + $this.offset().top,
|
447 |
+
at: "left top"
|
448 |
+
};
|
449 |
+
break;
|
450 |
+
case 'right':
|
451 |
+
start = {
|
452 |
+
my: "left top+" + $this.offset().top,
|
453 |
+
at: "right top"
|
454 |
+
};
|
455 |
+
break;
|
456 |
+
default:
|
457 |
+
if (origin.indexOf('left') >= 0) start = {
|
458 |
+
my: start.my + " right",
|
459 |
+
at: start.at + " left"
|
460 |
+
};
|
461 |
+
if (origin.indexOf('right') >= 0) start = {
|
462 |
+
my: start.my + " left",
|
463 |
+
at: start.at + " right"
|
464 |
+
};
|
465 |
+
if (origin.indexOf('center') >= 0) start = {
|
466 |
+
my: start.my + " center",
|
467 |
+
at: start.at + " center"
|
468 |
+
};
|
469 |
+
if (origin.indexOf('top') >= 0) start = {
|
470 |
+
my: start.my + " bottom",
|
471 |
+
at: start.at + " top"
|
472 |
+
};
|
473 |
+
if (origin.indexOf('bottom') >= 0) start = {
|
474 |
+
my: start.my + " top",
|
475 |
+
at: start.at + " bottom"
|
476 |
+
};
|
477 |
+
start.my = jQuery.trim(start.my);
|
478 |
+
start.at = jQuery.trim(start.at);
|
479 |
+
break;
|
480 |
+
}
|
481 |
+
start.of = window;
|
482 |
+
start.collision = 'none';
|
483 |
+
jQuery('html').css('overflow-x', 'hidden');
|
484 |
+
$this.position(start).css({
|
485 |
+
opacity: 1
|
486 |
+
});
|
487 |
+
|
488 |
+
$this.emodal('animate_overlay', 'fade', speed * 0.25, function () {
|
489 |
+
$this.emodal('reposition', function (position) {
|
490 |
+
position.opacity = 1;
|
491 |
+
$this.transition(position, speed * 0.75, function () {
|
492 |
+
jQuery('html').css('overflow-x', 'inherit');
|
493 |
+
});
|
494 |
+
});
|
495 |
+
});
|
496 |
+
return this;
|
497 |
+
},
|
498 |
+
fade: function () {
|
499 |
+
var $this = jQuery(this);
|
500 |
+
var settings = $this.data('emodal');
|
501 |
+
var speed = settings.meta.display.animation.speed / 2;
|
502 |
+
$this.emodal('animate_overlay', 'fade', speed, function () {
|
503 |
+
$this.fadeIn(speed);
|
504 |
+
});
|
505 |
+
return this;
|
506 |
+
},
|
507 |
+
fadeAndSlide: function () {
|
508 |
+
var $this = jQuery(this).show(0).css({
|
509 |
+
opacity: 0
|
510 |
+
});
|
511 |
+
var settings = $this.data('emodal');
|
512 |
+
var speed = settings.meta.display.animation.speed;
|
513 |
+
var origin = settings.meta.display.animation.origin;
|
514 |
+
var start = {
|
515 |
+
my: "",
|
516 |
+
at: ""
|
517 |
+
};
|
518 |
+
switch (origin) {
|
519 |
+
case 'top':
|
520 |
+
start = {
|
521 |
+
my: "left+" + $this.offset().left + " bottom",
|
522 |
+
at: "left top"
|
523 |
+
};
|
524 |
+
break;
|
525 |
+
|
526 |
+
case 'bottom':
|
527 |
+
start = {
|
528 |
+
my: "left+" + $this.offset().left + " top",
|
529 |
+
at: "left bottom"
|
530 |
+
};
|
531 |
+
break;
|
532 |
+
|
533 |
+
case 'left':
|
534 |
+
start = {
|
535 |
+
my: "right top+" + $this.offset().top,
|
536 |
+
at: "left top"
|
537 |
+
};
|
538 |
+
break;
|
539 |
+
|
540 |
+
case 'right':
|
541 |
+
start = {
|
542 |
+
my: "left top+" + $this.offset().top,
|
543 |
+
at: "right top"
|
544 |
+
};
|
545 |
+
break;
|
546 |
+
|
547 |
+
default:
|
548 |
+
if (origin.indexOf('left') >= 0) start = {
|
549 |
+
my: start.my + " right",
|
550 |
+
at: start.at + " left"
|
551 |
+
};
|
552 |
+
if (origin.indexOf('right') >= 0) start = {
|
553 |
+
my: start.my + " left",
|
554 |
+
at: start.at + " right"
|
555 |
+
};
|
556 |
+
if (origin.indexOf('center') >= 0) start = {
|
557 |
+
my: start.my + " center",
|
558 |
+
at: start.at + " center"
|
559 |
+
};
|
560 |
+
if (origin.indexOf('top') >= 0) start = {
|
561 |
+
my: start.my + " bottom",
|
562 |
+
at: start.at + " top"
|
563 |
+
};
|
564 |
+
if (origin.indexOf('bottom') >= 0) start = {
|
565 |
+
my: start.my + " top",
|
566 |
+
at: start.at + " bottom"
|
567 |
+
};
|
568 |
+
start.my = jQuery.trim(start.my);
|
569 |
+
start.at = jQuery.trim(start.at);
|
570 |
+
break;
|
571 |
+
}
|
572 |
+
start.of = window;
|
573 |
+
start.collision = 'none';
|
574 |
+
jQuery('html').css('overflow-x', 'hidden');
|
575 |
+
$this.position(start);
|
576 |
+
$this.emodal('animate_overlay', 'fade', speed * 0.25, function () {
|
577 |
+
$this.emodal('reposition', function (position) {
|
578 |
+
position.opacity = 1;
|
579 |
+
$this.transition(position, speed * 0.75, function () {
|
580 |
+
jQuery('html').css('overflow-x', 'inherit');
|
581 |
+
});
|
582 |
+
});
|
583 |
+
});
|
584 |
+
return this;
|
585 |
+
},
|
586 |
+
grow: function () {
|
587 |
+
var $this = jQuery(this);
|
588 |
+
var settings = $this.data('emodal');
|
589 |
+
var speed = settings.meta.display.animation.speed;
|
590 |
+
var origin = settings.meta.display.animation.origin;
|
591 |
+
|
592 |
+
// Set css for animation start.
|
593 |
+
$this.css({
|
594 |
+
transformOrigin: origin,
|
595 |
+
opacity: 0
|
596 |
+
}).show();
|
597 |
+
|
598 |
+
// Begin Animation with overlay fade in then grow animation.
|
599 |
+
$this.emodal('animate_overlay', 'fade', speed * 0.25, function () {
|
600 |
+
// Reposition with callback. position returns default positioning.
|
601 |
+
$this.emodal('reposition', function (position) {
|
602 |
+
position.scale = 1;
|
603 |
+
position.duration = speed * 0.75;
|
604 |
+
$this
|
605 |
+
.css({
|
606 |
+
scale: 0,
|
607 |
+
opacity: 1
|
608 |
+
})
|
609 |
+
.transition(position);
|
610 |
+
});
|
611 |
+
});
|
612 |
+
return this;
|
613 |
+
},
|
614 |
+
growAndSlide: function () {
|
615 |
+
var $this = jQuery(this).css({
|
616 |
+
opacity: 0
|
617 |
+
}).show();
|
618 |
+
var settings = $this.data('emodal');
|
619 |
+
var speed = settings.meta.display.animation.speed;
|
620 |
+
var origin = settings.meta.display.animation.origin;
|
621 |
+
var start = {
|
622 |
+
my: "",
|
623 |
+
at: ""
|
624 |
+
};
|
625 |
+
switch (origin) {
|
626 |
+
case 'top':
|
627 |
+
start = {
|
628 |
+
my: "left+" + $this.offset().left + " bottom",
|
629 |
+
at: "left top"
|
630 |
+
};
|
631 |
+
break;
|
632 |
+
case 'bottom':
|
633 |
+
start = {
|
634 |
+
my: "left+" + $this.offset().left + " top",
|
635 |
+
at: "left bottom"
|
636 |
+
};
|
637 |
+
break;
|
638 |
+
case 'left':
|
639 |
+
start = {
|
640 |
+
my: "right top+" + $this.offset().top,
|
641 |
+
at: "left top"
|
642 |
+
};
|
643 |
+
break;
|
644 |
+
case 'right':
|
645 |
+
start = {
|
646 |
+
my: "left top+" + $this.offset().top,
|
647 |
+
at: "right top"
|
648 |
+
};
|
649 |
+
break;
|
650 |
+
default:
|
651 |
+
if (origin.indexOf('left') >= 0) start = {
|
652 |
+
my: start.my + " right",
|
653 |
+
at: start.at + " left"
|
654 |
+
};
|
655 |
+
if (origin.indexOf('right') >= 0) start = {
|
656 |
+
my: start.my + " left",
|
657 |
+
at: start.at + " right"
|
658 |
+
};
|
659 |
+
if (origin.indexOf('center') >= 0) start = {
|
660 |
+
my: start.my + " center",
|
661 |
+
at: start.at + " center"
|
662 |
+
};
|
663 |
+
if (origin.indexOf('top') >= 0) start = {
|
664 |
+
my: start.my + " bottom",
|
665 |
+
at: start.at + " top"
|
666 |
+
};
|
667 |
+
if (origin.indexOf('bottom') >= 0) start = {
|
668 |
+
my: start.my + " top",
|
669 |
+
at: start.at + " bottom"
|
670 |
+
};
|
671 |
+
start.my = jQuery.trim(start.my);
|
672 |
+
start.at = jQuery.trim(start.at);
|
673 |
+
break;
|
674 |
+
}
|
675 |
+
start.of = window;
|
676 |
+
start.collision = 'none';
|
677 |
+
jQuery('html').css('overflow-x', 'hidden');
|
678 |
+
$this.position(start)
|
679 |
+
.css({
|
680 |
+
opacity: origin == 'center center' ? 0 : 1,
|
681 |
+
transformOrigin: origin
|
682 |
+
});
|
683 |
+
$this.emodal('animate_overlay', 'fade', speed * 0.25, function () {
|
684 |
+
$this.emodal('reposition', function (position) {
|
685 |
+
position.scale = 1;
|
686 |
+
position.opacity = 1;
|
687 |
+
position.duration = speed * 0.75;
|
688 |
+
$this.css({
|
689 |
+
scale: 0
|
690 |
+
})
|
691 |
+
.transition(position, function () {
|
692 |
+
jQuery('html').css('overflow-x', 'inherit');
|
693 |
+
});
|
694 |
+
});
|
695 |
+
});
|
696 |
+
return this;
|
697 |
+
}
|
698 |
+
};
|
699 |
+
|
700 |
+
var convert_hex = function (hex, opacity) {
|
701 |
+
hex = hex.replace('#', '');
|
702 |
+
r = parseInt(hex.substring(0, 2), 16);
|
703 |
+
g = parseInt(hex.substring(2, 4), 16);
|
704 |
+
b = parseInt(hex.substring(4, 6), 16);
|
705 |
+
result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
|
706 |
+
return result;
|
707 |
+
};
|
708 |
+
|
709 |
+
}(jQuery));
|
710 |
+
jQuery(document).ready(function () {
|
711 |
+
jQuery('.emodal')
|
712 |
+
.emodal()
|
713 |
+
.each(function () {
|
714 |
+
var $this = jQuery(this);
|
715 |
+
jQuery('.' + $this.attr('id')).on('click', function (e) {
|
716 |
+
e.preventDefault();
|
717 |
+
e.stopPropagation();
|
718 |
+
$this.emodal('open');
|
719 |
+
});
|
720 |
+
jQuery('.' + $this.attr('id')).css('cursor', 'pointer');
|
721 |
+
});
|
722 |
+
|
723 |
+
// Reset Videos
|
724 |
+
jQuery('.emodal')
|
725 |
+
.on('emodalBeforeClose', function (e) {
|
726 |
+
var $this = jQuery(this);
|
727 |
+
var settings = $this.data('emodal');
|
728 |
+
if (jQuery('#' + settings.overlay.attr.id).is(":visible")) {
|
729 |
+
jQuery('#' + settings.overlay.attr.id)
|
730 |
+
.fadeOut(settings.close.close_speed, function () {
|
731 |
+
var vids = jQuery('iframe', $this).filter('[src*="youtube"],[src*="vimeo"]').each(function () {
|
732 |
+
var src = jQuery(this).attr('src');
|
733 |
+
jQuery(this).attr('src', '').attr('src', src);
|
734 |
+
});
|
735 |
+
});
|
736 |
+
}
|
737 |
+
});
|
738 |
+
});
|
assets/scripts/jquery.transit.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(t,e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof exports==="object"){module.exports=e(require("jquery"))}else{e(t.jQuery)}})(this,function(t){t.transit={version:"0.9.11",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var e=document.createElement("div");var n={};function i(t){if(t in e.style)return t;var n=["Moz","Webkit","O","ms"];var i=t.charAt(0).toUpperCase()+t.substr(1);for(var r=0;r<n.length;++r){var s=n[r]+i;if(s in e.style){return s}}}function r(){e.style[n.transform]="";e.style[n.transform]="rotateY(90deg)";return e.style[n.transform]!==""}var s=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;n.transition=i("transition");n.transitionDelay=i("transitionDelay");n.transform=i("transform");n.transformOrigin=i("transformOrigin");n.filter=i("Filter");n.transform3d=r();var a={transition:"transitionend",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var o=n.transitionEnd=a[n.transition]||null;for(var u in n){if(n.hasOwnProperty(u)&&typeof t.support[u]==="undefined"){t.support[u]=n[u]}}e=null;t.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeInCubic:"cubic-bezier(.550,.055,.675,.190)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};t.cssHooks["transit:transform"]={get:function(e){return t(e).data("transform")||new f},set:function(e,i){var r=i;if(!(r instanceof f)){r=new f(r)}if(n.transform==="WebkitTransform"&&!s){e.style[n.transform]=r.toString(true)}else{e.style[n.transform]=r.toString()}t(e).data("transform",r)}};t.cssHooks.transform={set:t.cssHooks["transit:transform"].set};t.cssHooks.filter={get:function(t){return t.style[n.filter]},set:function(t,e){t.style[n.filter]=e}};if(t.fn.jquery<"1.8"){t.cssHooks.transformOrigin={get:function(t){return t.style[n.transformOrigin]},set:function(t,e){t.style[n.transformOrigin]=e}};t.cssHooks.transition={get:function(t){return t.style[n.transition]},set:function(t,e){t.style[n.transition]=e}}}p("scale");p("scaleX");p("scaleY");p("translate");p("rotate");p("rotateX");p("rotateY");p("rotate3d");p("perspective");p("skewX");p("skewY");p("x",true);p("y",true);function f(t){if(typeof t==="string"){this.parse(t)}return this}f.prototype={setFromString:function(t,e){var n=typeof e==="string"?e.split(","):e.constructor===Array?e:[e];n.unshift(t);f.prototype.set.apply(this,n)},set:function(t){var e=Array.prototype.slice.apply(arguments,[1]);if(this.setter[t]){this.setter[t].apply(this,e)}else{this[t]=e.join(",")}},get:function(t){if(this.getter[t]){return this.getter[t].apply(this)}else{return this[t]||0}},setter:{rotate:function(t){this.rotate=y(t,"deg")},rotateX:function(t){this.rotateX=y(t,"deg")},rotateY:function(t){this.rotateY=y(t,"deg")},scale:function(t,e){if(e===undefined){e=t}this.scale=t+","+e},skewX:function(t){this.skewX=y(t,"deg")},skewY:function(t){this.skewY=y(t,"deg")},perspective:function(t){this.perspective=y(t,"px")},x:function(t){this.set("translate",t,null)},y:function(t){this.set("translate",null,t)},translate:function(t,e){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(t!==null&&t!==undefined){this._translateX=y(t,"px")}if(e!==null&&e!==undefined){this._translateY=y(e,"px")}this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var t=(this.scale||"1,1").split(",");if(t[0]){t[0]=parseFloat(t[0])}if(t[1]){t[1]=parseFloat(t[1])}return t[0]===t[1]?t[0]:t},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var e=0;e<=3;++e){if(t[e]){t[e]=parseFloat(t[e])}}if(t[3]){t[3]=y(t[3],"deg")}return t}},parse:function(t){var e=this;t.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,n,i){e.setFromString(n,i)})},toString:function(t){var e=[];for(var i in this){if(this.hasOwnProperty(i)){if(!n.transform3d&&(i==="rotateX"||i==="rotateY"||i==="perspective"||i==="transformOrigin")){continue}if(i[0]!=="_"){if(t&&i==="scale"){e.push(i+"3d("+this[i]+",1)")}else if(t&&i==="translate"){e.push(i+"3d("+this[i]+",0)")}else{e.push(i+"("+this[i]+")")}}}}return e.join(" ")}};function c(t,e,n){if(e===true){t.queue(n)}else if(e){t.queue(e,n)}else{t.each(function(){n.call(this)})}}function l(e){var i=[];t.each(e,function(e){e=t.camelCase(e);e=t.transit.propertyMap[e]||t.cssProps[e]||e;e=h(e);if(n[e])e=h(n[e]);if(t.inArray(e,i)===-1){i.push(e)}});return i}function d(e,n,i,r){var s=l(e);if(t.cssEase[i]){i=t.cssEase[i]}var a=""+b(n)+" "+i;if(parseInt(r,10)>0){a+=" "+b(r)}var o=[];t.each(s,function(t,e){o.push(e+" "+a)});return o.join(", ")}t.fn.transition=t.fn.transit=function(e,i,r,s){var a=this;var u=0;var f=true;var l=jQuery.extend(true,{},e);if(typeof i==="function"){s=i;i=undefined}if(typeof i==="object"){r=i.easing;u=i.delay||0;f=typeof i.queue==="undefined"?true:i.queue;s=i.complete;i=i.duration}if(typeof r==="function"){s=r;r=undefined}if(typeof l.easing!=="undefined"){r=l.easing;delete l.easing}if(typeof l.duration!=="undefined"){i=l.duration;delete l.duration}if(typeof l.complete!=="undefined"){s=l.complete;delete l.complete}if(typeof l.queue!=="undefined"){f=l.queue;delete l.queue}if(typeof l.delay!=="undefined"){u=l.delay;delete l.delay}if(typeof i==="undefined"){i=t.fx.speeds._default}if(typeof r==="undefined"){r=t.cssEase._default}i=b(i);var p=d(l,i,r,u);var h=t.transit.enabled&&n.transition;var y=h?parseInt(i,10)+parseInt(u,10):0;if(y===0){var g=function(t){a.css(l);if(s){s.apply(a)}if(t){t()}};c(a,f,g);return a}var m={};var v=function(i){var r=false;var u=function(){if(r){a.unbind(o,u)}if(y>0){a.each(function(){this.style[n.transition]=m[this]||null})}if(typeof s==="function"){s.apply(a)}if(typeof i==="function"){i()}};if(y>0&&o&&t.transit.useTransitionEnd){r=true;a.bind(o,u)}else{window.setTimeout(u,y)}a.each(function(){if(y>0){this.style[n.transition]=p}t(this).css(e)})};var z=function(t){this.offsetWidth;v(t)};c(a,f,z);return this};function p(e,i){if(!i){t.cssNumber[e]=true}t.transit.propertyMap[e]=n.transform;t.cssHooks[e]={get:function(n){var i=t(n).css("transit:transform");return i.get(e)},set:function(n,i){var r=t(n).css("transit:transform");r.setFromString(e,i);t(n).css({"transit:transform":r})}}}function h(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function y(t,e){if(typeof t==="string"&&!t.match(/^[\-0-9\.]+$/)){return t}else{return""+t+e}}function b(e){var n=e;if(typeof n==="string"&&!n.match(/^[\-0-9\.]+/)){n=t.fx.speeds[n]||t.fx.speeds._default}return y(n,"ms")}t.transit.getTransitionValue=d;return t});
|
assets/styles/easy-modal-admin.css
ADDED
@@ -0,0 +1,342 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.bold {
|
2 |
+
font-weight:bold;
|
3 |
+
}
|
4 |
+
.title-divider th {
|
5 |
+
border-top:1px solid #ccc;
|
6 |
+
padding:0;
|
7 |
+
}
|
8 |
+
.form-table td, .form-table tr {
|
9 |
+
padding-top:10px;
|
10 |
+
}
|
11 |
+
.title-divider .title {
|
12 |
+
font-size:1.125em;
|
13 |
+
padding-left:0!important;
|
14 |
+
padding-top:20px!important;
|
15 |
+
padding-bottom:0!important;
|
16 |
+
}
|
17 |
+
|
18 |
+
#emodal-settings-editor .regular-text {
|
19 |
+
width:25em;
|
20 |
+
}
|
21 |
+
#emodal-settings-editor .description.expires strong {
|
22 |
+
color:#9e0007;
|
23 |
+
font-size:14px;
|
24 |
+
}
|
25 |
+
#emodal-settings-editor .description.domains strong {
|
26 |
+
color:#00a633;
|
27 |
+
font-size:14px;
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
.button.rounded {
|
32 |
+
box-shadow: none;
|
33 |
+
border:0;
|
34 |
+
border-radius:25px;
|
35 |
+
background:#0074a2;
|
36 |
+
color:#fff;
|
37 |
+
padding-left:18px;
|
38 |
+
padding-right:18px;
|
39 |
+
transition:transform .5s;
|
40 |
+
margin-bottom:10px;
|
41 |
+
}
|
42 |
+
.button.rounded:hover {
|
43 |
+
color:#fff;
|
44 |
+
background:#0074a2;
|
45 |
+
transform:scale(1.125);
|
46 |
+
}
|
47 |
+
.loveit-shareit {
|
48 |
+
font:400 24px/1.125 "Oswald"!important;
|
49 |
+
color:#333;
|
50 |
+
}
|
51 |
+
.loveit-shareit span {
|
52 |
+
color:#00b7cd;
|
53 |
+
}
|
54 |
+
.follow-box {
|
55 |
+
text-align: center;
|
56 |
+
padding:14px 36px;
|
57 |
+
background:#fff;
|
58 |
+
border:1px solid #e5e5e5;
|
59 |
+
}
|
60 |
+
|
61 |
+
#icon-easy-modal {
|
62 |
+
background: transparent url('../images/admin/easy-modal-icon.png') no-repeat;
|
63 |
+
}
|
64 |
+
.share-buttons {
|
65 |
+
margin:0 auto;
|
66 |
+
width:68%;
|
67 |
+
display:block;
|
68 |
+
clear:both;
|
69 |
+
}
|
70 |
+
.share-buttons li {
|
71 |
+
text-align:center;
|
72 |
+
width:32%;
|
73 |
+
display:inline-block;
|
74 |
+
float:left;
|
75 |
+
margin-right:1%;
|
76 |
+
margin-bottom:0;
|
77 |
+
}
|
78 |
+
.share-buttons li:last-child {
|
79 |
+
margin-right:0;
|
80 |
+
}
|
81 |
+
|
82 |
+
/* Modal List */
|
83 |
+
.wrap .add-new-h2, .wrap .add-new-h2:active {
|
84 |
+
color:#fff;
|
85 |
+
background:#00b7cd;
|
86 |
+
}
|
87 |
+
.add-new-get-started:before {
|
88 |
+
display:inline-block;
|
89 |
+
width:60px;
|
90 |
+
content:" ";
|
91 |
+
height:19px;
|
92 |
+
background:url(../images/admin/get-started-arrow.png) no-repeat center center transparent;
|
93 |
+
}
|
94 |
+
.add-new-get-started {
|
95 |
+
display:inline;
|
96 |
+
font-weight: 700;
|
97 |
+
font:14px/1 "Open Sans",sans-serif;
|
98 |
+
color:#00b7cd;
|
99 |
+
}
|
100 |
+
.get-started-modal-welcome h1 {
|
101 |
+
font-family: "Oswald";
|
102 |
+
font-weight: 300;
|
103 |
+
font-size:48px;
|
104 |
+
color:#e0e0e0;
|
105 |
+
}
|
106 |
+
.get-started-modal-welcome h1 .easy {
|
107 |
+
color:#00b7cd;
|
108 |
+
}
|
109 |
+
.get-started-modal-welcome h1 .modal {
|
110 |
+
color:#333;
|
111 |
+
}
|
112 |
+
.get-started-modal-welcome p {
|
113 |
+
color:#333;
|
114 |
+
font-size:18px;
|
115 |
+
}
|
116 |
+
.pro-upgrade-tip {
|
117 |
+
color:#333;
|
118 |
+
}
|
119 |
+
.pro-upgrade-tip hr {
|
120 |
+
margin-bottom:25px;
|
121 |
+
}
|
122 |
+
.pro-upgrade-tip img {
|
123 |
+
float:left;
|
124 |
+
margin-right:15px;
|
125 |
+
}
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
.tab-box {
|
130 |
+
margin-top:40px;
|
131 |
+
position:relative;
|
132 |
+
border:1px solid #ccc;
|
133 |
+
max-width:500px;
|
134 |
+
padding:20px 10px 5px;
|
135 |
+
}
|
136 |
+
.tab-box h4 {
|
137 |
+
font:13px/30px "Open Sans",sans-serif;
|
138 |
+
font-weight: bold;
|
139 |
+
position:absolute;
|
140 |
+
background:#ccc;
|
141 |
+
display:inline-block;
|
142 |
+
padding:0 10px;
|
143 |
+
top:-48px;
|
144 |
+
left:-1px;
|
145 |
+
}
|
146 |
+
.tab-box a {
|
147 |
+
font:300 18px/1.125 "Oswald";
|
148 |
+
color:#00b7cd;
|
149 |
+
}
|
150 |
+
.tab-box button {
|
151 |
+
font:300 18px/1.125 "Oswald";
|
152 |
+
color:#fff;
|
153 |
+
background:#00b7cd;
|
154 |
+
box-shadow: none;
|
155 |
+
border:0;
|
156 |
+
padding:5px 10px 7px;
|
157 |
+
cursor:pointer;
|
158 |
+
transition:transform .5s;
|
159 |
+
}
|
160 |
+
|
161 |
+
.tab-box button:hover {
|
162 |
+
transform:scale(1.125);
|
163 |
+
}
|
164 |
+
/* Sidebar */
|
165 |
+
.emodal-feature-list {
|
166 |
+
font:14px/24px "Open Sans",sans-serif;
|
167 |
+
}
|
168 |
+
|
169 |
+
.emodal-feature-list span {
|
170 |
+
font-size: 36px;
|
171 |
+
font-weight: bold;
|
172 |
+
line-height: 0;
|
173 |
+
position: relative;
|
174 |
+
top: 8px;
|
175 |
+
}
|
176 |
+
.emodal-feature-list > img {
|
177 |
+
margin-top:5px;
|
178 |
+
}
|
179 |
+
.emodal-feature-list a {
|
180 |
+
color:#1a77a3;
|
181 |
+
font-weight: bold;
|
182 |
+
text-decoration: none;
|
183 |
+
}
|
184 |
+
.emodal-feature-list a.btn {
|
185 |
+
font-size:14px;
|
186 |
+
display:inline-block;
|
187 |
+
margin-bottom:6px;
|
188 |
+
color:#fff;
|
189 |
+
background:#00b7cd;
|
190 |
+
text-transform: uppercase;
|
191 |
+
padding:8px 28px;
|
192 |
+
}
|
193 |
+
|
194 |
+
#emodal-theme-editor .tabwrapper {
|
195 |
+
display:inline-block;
|
196 |
+
width:66%;
|
197 |
+
}
|
198 |
+
#emodal-theme-editor .empreview {
|
199 |
+
width:33%;
|
200 |
+
float:right;
|
201 |
+
position:relative;
|
202 |
+
}
|
203 |
+
.example-modal, .example-modal:before, .example-modal:after {
|
204 |
+
-moz-box-sizing: border-box;
|
205 |
+
}
|
206 |
+
.empreview h2{
|
207 |
+
text-align:center;
|
208 |
+
color:#fff;
|
209 |
+
margin:0 7px;
|
210 |
+
font-size:30px;
|
211 |
+
position:relative;
|
212 |
+
}
|
213 |
+
.empreview .example-modal-overlay{
|
214 |
+
position:absolute;
|
215 |
+
display:block;
|
216 |
+
width:100%;
|
217 |
+
height:100%;
|
218 |
+
top:0;
|
219 |
+
left:0
|
220 |
+
}
|
221 |
+
.empreview .example-modal {
|
222 |
+
display:block;
|
223 |
+
position:relative;
|
224 |
+
width:75%;
|
225 |
+
margin:0 auto 75px;
|
226 |
+
font-size:16px;
|
227 |
+
position: relative;
|
228 |
+
z-index: 99;
|
229 |
+
}
|
230 |
+
.empreview .example-modal .close-modal {
|
231 |
+
text-decoration:none;
|
232 |
+
text-align:center;
|
233 |
+
line-height: 1;
|
234 |
+
position: absolute;
|
235 |
+
font-weight: bold;
|
236 |
+
cursor: pointer;
|
237 |
+
}
|
238 |
+
#poststuff .inside.close-modal {
|
239 |
+
margin:0;
|
240 |
+
}
|
241 |
+
|
242 |
+
|
243 |
+
|
244 |
+
|
245 |
+
|
246 |
+
|
247 |
+
.addons-available {
|
248 |
+
display:block;
|
249 |
+
}
|
250 |
+
.addons-available img {
|
251 |
+
width:100%;
|
252 |
+
display:block;
|
253 |
+
height:auto;
|
254 |
+
max-width: 100%;
|
255 |
+
}
|
256 |
+
.addons-available li {
|
257 |
+
box-sizing: border-box;
|
258 |
+
border: .25%px solid #ccc;
|
259 |
+
padding:10px 8px 6px;
|
260 |
+
background:#fff;
|
261 |
+
vertical-align: top;
|
262 |
+
width: 280px;
|
263 |
+
margin:0 10px 10px;
|
264 |
+
display:inline;
|
265 |
+
float:left;
|
266 |
+
}
|
267 |
+
.addons-available h3 {
|
268 |
+
text-align: center;
|
269 |
+
font:18px/1.125 "Exo"!important;
|
270 |
+
}
|
271 |
+
.addons-available .addon-upgrade {
|
272 |
+
text-align: center;
|
273 |
+
background-color: #fff5f5;
|
274 |
+
background-image: url("http://gravityforms.s3.amazonaws.com/banners/top_highlight.png");
|
275 |
+
background-position: 0 0;
|
276 |
+
background-repeat: repeat-x;
|
277 |
+
border: 1px solid #ffeaea;
|
278 |
+
border-radius: 3px;
|
279 |
+
color: #d09797;
|
280 |
+
font-weight: bold;
|
281 |
+
padding: 6px;
|
282 |
+
margin:0 10px 12px;
|
283 |
+
}
|
284 |
+
.addons-available li > .action-links {
|
285 |
+
margin:0 10px;
|
286 |
+
text-align: center;
|
287 |
+
display:block;
|
288 |
+
}
|
289 |
+
.addons-available .action-links .button {
|
290 |
+
display:inline-block;
|
291 |
+
margin-bottom: 10px;
|
292 |
+
background:#00b7cd;
|
293 |
+
color:#fff;
|
294 |
+
border-radius: 0;
|
295 |
+
border:0;
|
296 |
+
box-shadow: none;
|
297 |
+
font-weight: bold;
|
298 |
+
padding:7px 30px;
|
299 |
+
height:auto;
|
300 |
+
text-transform: uppercase;
|
301 |
+
transition:transform .5s;
|
302 |
+
}
|
303 |
+
.addons-available .action-links .button.install {
|
304 |
+
background:#00a651;
|
305 |
+
}
|
306 |
+
.addons-available .action-links .button:hover {
|
307 |
+
transform:scale(1.125);
|
308 |
+
}
|
309 |
+
|
310 |
+
|
311 |
+
.addons-available p {
|
312 |
+
margin:10px;
|
313 |
+
color:#717171;
|
314 |
+
font-size:14px;
|
315 |
+
text-align: center;
|
316 |
+
font-style: italic;
|
317 |
+
}
|
318 |
+
.addons-available a {
|
319 |
+
display:block;
|
320 |
+
text-align: center;
|
321 |
+
text-decoration: none;
|
322 |
+
}
|
323 |
+
|
324 |
+
@media only screen and (max-width: 360px){
|
325 |
+
.addons-available li {
|
326 |
+
display:block;
|
327 |
+
margin: 0 0 10px;
|
328 |
+
width:100%;
|
329 |
+
}
|
330 |
+
}
|
331 |
+
|
332 |
+
@media only screen and (min-width: 361px) and (max-width: 768px){
|
333 |
+
.addons-available li {
|
334 |
+
width:320px;
|
335 |
+
}
|
336 |
+
}
|
337 |
+
|
338 |
+
@media only screen and (min-width: 769px) and (max-width: 980px) {
|
339 |
+
.addons-available li {
|
340 |
+
width:240px;
|
341 |
+
}
|
342 |
+
}
|
assets/styles/easy-modal-site.css
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.emodal, .emodal:before, .emodal:after {
|
2 |
+
-moz-box-sizing: border-box;
|
3 |
+
}
|
4 |
+
.emodal-overlay {
|
5 |
+
position:fixed;
|
6 |
+
display:none;
|
7 |
+
width:100%;
|
8 |
+
height:100%;
|
9 |
+
top:0;
|
10 |
+
left:0;
|
11 |
+
z-index:998!important;
|
12 |
+
}
|
13 |
+
|
14 |
+
.emodal {
|
15 |
+
top:100px;
|
16 |
+
visibility: hidden;
|
17 |
+
position: absolute;
|
18 |
+
z-index: 999!important;
|
19 |
+
}
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
.emodal > .emodal-close {
|
24 |
+
text-decoration:none;
|
25 |
+
text-align:center;
|
26 |
+
line-height: 1;
|
27 |
+
position: absolute;
|
28 |
+
font-weight: bold;
|
29 |
+
cursor: pointer;
|
30 |
+
}
|
31 |
+
|
32 |
+
@media only screen and (min-width: 768px){
|
33 |
+
.emodal.responsive {
|
34 |
+
left: 50%;
|
35 |
+
margin-left: -40%;
|
36 |
+
width: 80%;
|
37 |
+
height: auto;
|
38 |
+
overflow:visible;
|
39 |
+
}
|
40 |
+
.emodal.nano {
|
41 |
+
margin-left: -10%;
|
42 |
+
width: 20%;
|
43 |
+
}
|
44 |
+
.emodal.tiny {
|
45 |
+
margin-left: -15%;
|
46 |
+
width: 30%;
|
47 |
+
}
|
48 |
+
.emodal.small {
|
49 |
+
margin-left: -20%;
|
50 |
+
width: 40%;
|
51 |
+
}
|
52 |
+
.emodal.medium {
|
53 |
+
margin-left: -30%;
|
54 |
+
width: 60%;
|
55 |
+
}
|
56 |
+
.emodal.large {
|
57 |
+
margin-left: -35%;
|
58 |
+
width: 70%;
|
59 |
+
}
|
60 |
+
.emodal.xlarge {
|
61 |
+
margin-left: -47.5%;
|
62 |
+
width: 95%;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
.emodal.fixed {
|
67 |
+
position:fixed;
|
68 |
+
}
|
69 |
+
.emodal.custom-position {
|
70 |
+
left: auto;
|
71 |
+
top: auto;
|
72 |
+
margin-left: inherit;
|
73 |
+
}
|
74 |
+
|
75 |
+
.emodal .emodal-content :last-child {
|
76 |
+
margin-bottom:0;
|
77 |
+
}
|
classes/admin.php
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Admin {
|
2 |
+
public static $Updaters = array();
|
3 |
+
public static function check_updates($slug = null)
|
4 |
+
{
|
5 |
+
if($slug !== null && !empty(self::$Updaters[$slug]))
|
6 |
+
{
|
7 |
+
self::$Updaters[$slug]->checkForUpdates();
|
8 |
+
}
|
9 |
+
elseif(!$slug)
|
10 |
+
{
|
11 |
+
foreach(self::$Updaters as $slug => $Updater)
|
12 |
+
{
|
13 |
+
$Updater->checkForUpdates();
|
14 |
+
}
|
15 |
+
}
|
16 |
+
}
|
17 |
+
public function __construct()
|
18 |
+
{
|
19 |
+
global $EModal_License, $EModal_Admin_Menu, $EModal_Admin_Editor, $EModal_Admin_Postmeta;
|
20 |
+
$EModal_Admin_Menu = new EModal_Admin_Menu;
|
21 |
+
$EModal_Admin_Editor = new EModal_Admin_Editor;
|
22 |
+
$EModal_Admin_Postmeta = new EModal_Admin_Postmeta;
|
23 |
+
$EModal_License = new EModal_License;
|
24 |
+
if(get_option('EasyModal_Version') && !emodal_get_option(EMCORE_SLUG.'_migration_approval'))
|
25 |
+
{
|
26 |
+
new EModal_Migrate_Pre_V2;
|
27 |
+
}
|
28 |
+
elseif(get_option('EasyModal_Version') && emodal_get_option(EMCORE_SLUG.'_migration_approved'))
|
29 |
+
{
|
30 |
+
EModal_Migrate_Pre_V2::delete_all();
|
31 |
+
}
|
32 |
+
add_filter('plugin_action_links', array($this, 'action_links'), 10, 2);
|
33 |
+
|
34 |
+
add_action("init", array($this, 'update_transient_plugin_slugs'));
|
35 |
+
add_filter ('pre_set_site_transient_update_plugins', array(&$this, 'transient_update_plugins'));
|
36 |
+
add_filter ('pre_set_transient_update_plugins', array(&$this, 'transient_update_plugins'));
|
37 |
+
|
38 |
+
if(is_emodal_admin_page())
|
39 |
+
{
|
40 |
+
add_action('admin_init', array($this, 'admin_init'));
|
41 |
+
add_action('admin_head', array($this, 'admin_head'));
|
42 |
+
add_action("admin_enqueue_scripts", array($this, 'styles'));
|
43 |
+
add_action("admin_enqueue_scripts", array($this, 'scripts'));
|
44 |
+
add_action('admin_print_footer_scripts', array($this,'admin_footer'),1000);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
public function transient_update_plugins($transient)
|
48 |
+
{
|
49 |
+
//emodal_debug($transient);
|
50 |
+
foreach(EModal_License::available_addons() as $addon)
|
51 |
+
{
|
52 |
+
$obj = new stdClass();
|
53 |
+
$obj->slug = $addon->slug .'.php';
|
54 |
+
$obj->new_version = $addon->version;
|
55 |
+
$obj->url = $addon->homepage;
|
56 |
+
$obj->package = !empty($addon->download_url) ? $addon->download_url : null;
|
57 |
+
$transient->checked[$addon->slug.'/'.$addon->slug.'.php'] = $addon->version;
|
58 |
+
if(version_compare($transient->checked[$addon->slug.'/'.$addon->slug.'.php'], $addon->version) == -1)
|
59 |
+
$transient->response[$addon->slug.'/'.$addon->slug.'.php'] = $obj;
|
60 |
+
}
|
61 |
+
return $transient;
|
62 |
+
}
|
63 |
+
public function update_transient_plugin_slugs()
|
64 |
+
{
|
65 |
+
$transient = get_option( '_transient_plugin_slugs' );
|
66 |
+
if($transient)
|
67 |
+
{
|
68 |
+
$save = false;
|
69 |
+
foreach(EModal_License::available_addons() as $addon)
|
70 |
+
{
|
71 |
+
if(!in_array($addon->slug.'/'.$addon->slug.'.php', $transient))
|
72 |
+
{
|
73 |
+
$transient[] = $addon->slug.'/'.$addon->slug.'.php';
|
74 |
+
$save = true;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
if($save)
|
78 |
+
{
|
79 |
+
update_option('_transient_plugin_slugs', $transient);
|
80 |
+
}
|
81 |
+
}
|
82 |
+
}
|
83 |
+
public function admin_init()
|
84 |
+
{
|
85 |
+
call_user_func( array(apply_filters('emodal_admin_current_controller', 'EModal_Controller_Admin_Modals'), 'factory') );
|
86 |
+
}
|
87 |
+
public function admin_head()
|
88 |
+
{
|
89 |
+
if(!function_exists('wp_editor'))
|
90 |
+
wp_tiny_mce();
|
91 |
+
}
|
92 |
+
public function admin_footer()
|
93 |
+
{
|
94 |
+
do_action('emodal_admin_footer');
|
95 |
+
}
|
96 |
+
public function styles()
|
97 |
+
{
|
98 |
+
wp_enqueue_style(EMCORE_SLUG.'-admin', EMCORE_URL.'/assets/styles/'.EMCORE_SLUG.'-admin.css', false, 0.1);
|
99 |
+
}
|
100 |
+
public function scripts()
|
101 |
+
{
|
102 |
+
if($_GET['page'] == emodal_admin_slug())
|
103 |
+
{
|
104 |
+
wp_enqueue_script('word-count');
|
105 |
+
wp_enqueue_script('post');
|
106 |
+
wp_enqueue_script('editor');
|
107 |
+
wp_enqueue_script('media-upload');
|
108 |
+
}
|
109 |
+
elseif($_GET['page'] == emodal_admin_slug('themes'))
|
110 |
+
{
|
111 |
+
wp_enqueue_style('wp-color-picker');
|
112 |
+
wp_enqueue_script('jquery-ui-slider');
|
113 |
+
}
|
114 |
+
wp_enqueue_script(EMCORE_SLUG.'-admin', EMCORE_URL.'/assets/scripts/'.EMCORE_SLUG.'-admin.js', array('jquery', 'wp-color-picker', 'jquery-ui-slider'/*, 'jquery-ui-core', 'jquery-ui-slider', 'jquery-colorpicker'*/));
|
115 |
+
}
|
116 |
+
public function action_links($links, $file)
|
117 |
+
{
|
118 |
+
if($file == plugin_basename(EMCORE))
|
119 |
+
{
|
120 |
+
foreach(apply_filters('emodal_action_links', array(
|
121 |
+
'settings' => '<a href="'.emodal_admin_url('settings') .'">'.__('Settings', EMCORE_SLUG).'</a>',
|
122 |
+
'gopro' => '<a href="https://easy-modal.com/pricing?utm_source=em-free&utm_medium=plugins+page&utm_campaign=go+pro" target="_blank">'.__('Go Pro', EMCORE_SLUG).'</a>',
|
123 |
+
)) as $link)
|
124 |
+
{
|
125 |
+
array_unshift( $links, $link );
|
126 |
+
}
|
127 |
+
}
|
128 |
+
return $links;
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
add_filter('emodal_admin_current_controller', 'emodal_admin_current_controller', 1);
|
133 |
+
function emodal_admin_current_controller($controller)
|
134 |
+
{
|
135 |
+
switch($_GET['page'])
|
136 |
+
{
|
137 |
+
case emodal_admin_slug('themes'): $controller = 'EModal_Controller_Admin_Theme'; break;
|
138 |
+
case emodal_admin_slug('settings'): $controller = 'EModal_Controller_Admin_Settings'; break;
|
139 |
+
case emodal_admin_slug('addons'): $controller = 'EModal_Controller_Admin_Addons'; break;
|
140 |
+
case emodal_admin_slug('help'): $controller = 'EModal_Controller_Admin_Help'; break;
|
141 |
+
}
|
142 |
+
return $controller;
|
143 |
+
}
|
classes/admin/editor.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Admin_Editor {
|
2 |
+
public function __construct()
|
3 |
+
{
|
4 |
+
// Ultimate MCE Compatibility Check
|
5 |
+
$ultmce = get_option('jwl_options_group1');
|
6 |
+
$row = isset($ultmce['jwl_styleselect_field_id']) ? intval($ultmce['jwl_styleselect_dropdown']) : 2;
|
7 |
+
add_filter("mce_buttons_$row", array($this, 'TinyMCEButtons'), 999);
|
8 |
+
add_filter('tiny_mce_before_init', array($this, 'TinyMCEInit'), 999);
|
9 |
+
}
|
10 |
+
public function TinyMCEButtons($buttons)
|
11 |
+
{
|
12 |
+
if(!in_array('styleselect', $buttons))
|
13 |
+
$buttons[] = 'styleselect';
|
14 |
+
return $buttons;
|
15 |
+
}
|
16 |
+
public function TinyMCEInit($initArray)
|
17 |
+
{
|
18 |
+
// Add Modal styles to styles dropdown
|
19 |
+
$styles = !empty($initArray['style_formats']) && is_array(json_decode($initArray['style_formats'])) ? json_decode($initArray['style_formats']) : array();
|
20 |
+
foreach(get_all_modals() as $modal)
|
21 |
+
{
|
22 |
+
$styles[] = array(
|
23 |
+
'title' => "Open Modal - {$modal->name}",
|
24 |
+
'inline' => 'span',
|
25 |
+
'classes' => "eModal-{$modal->id}"
|
26 |
+
);
|
27 |
+
}
|
28 |
+
$initArray['style_formats'] = json_encode($styles);
|
29 |
+
return $initArray;
|
30 |
+
}
|
31 |
+
}
|
classes/admin/menu.php
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Admin_Menu {
|
2 |
+
public function __construct()
|
3 |
+
{
|
4 |
+
add_action('admin_menu', array($this, 'admin_menus') );
|
5 |
+
add_filter('emodal_admin_submenu_pages', array($this, 'modals_page'), 10);
|
6 |
+
add_filter('emodal_admin_submenu_pages', array($this, 'themes_page'), 20);
|
7 |
+
add_filter('emodal_admin_submenu_pages', array($this, 'settings_page'), 80);
|
8 |
+
add_filter('emodal_admin_submenu_pages', array($this, 'addons_page'), 90);
|
9 |
+
add_filter('emodal_admin_submenu_pages', array($this, 'help_page'), 100);
|
10 |
+
}
|
11 |
+
public function admin_menus()
|
12 |
+
{
|
13 |
+
add_menu_page(
|
14 |
+
apply_filters('emodal_admin_menu_page_title', __(EMCORE_NAME, EMCORE_SLUG)), // Page Title
|
15 |
+
apply_filters('emodal_admin_menu_menu_title', __(EMCORE_NAME, EMCORE_SLUG)), // Menu Title
|
16 |
+
apply_filters('emodal_admin_menu_capability', 'edit_posts'), // Menu Capabilities
|
17 |
+
emodal_admin_slug(), // Menu Slug
|
18 |
+
apply_filters('emodal_admin_menu_function',array('EModal_Controller_Admin_Modals', 'render')), // Menu Page Function
|
19 |
+
apply_filters('emodal_admin_menu_icon_url', EMCORE_URL.'/assets/images/admin/dashboard-icon.png'), // Menu Icon
|
20 |
+
apply_filters('emodal_admin_menu_position', 1000)
|
21 |
+
);
|
22 |
+
foreach(apply_filters('emodal_admin_submenu_pages', array()) as $submenu_page)
|
23 |
+
{
|
24 |
+
extract($submenu_page);
|
25 |
+
add_submenu_page(EMCORE_SLUG ,$page_title, $menu_title, $capability, $menu_slug, $function);
|
26 |
+
}
|
27 |
+
}
|
28 |
+
public function modals_page($submenu)
|
29 |
+
{
|
30 |
+
|
31 |
+
$submenu[] = array(
|
32 |
+
'page_title' => apply_filters('emodal_admin_submenu_modals_page_title', __('Modals', EMCORE_SLUG)),
|
33 |
+
'menu_title' => apply_filters('emodal_admin_submenu_modals_menu_title', __('Modals', EMCORE_SLUG)),
|
34 |
+
'capability' => apply_filters('emodal_admin_submenu_modals_capability', 'edit_posts'),
|
35 |
+
'menu_slug' => emodal_admin_slug(),
|
36 |
+
'function' => apply_filters('emodal_admin_submenu_modals_function',array('EModal_Controller_Admin_Modals', 'render'))
|
37 |
+
);
|
38 |
+
return $submenu;
|
39 |
+
}
|
40 |
+
public function themes_page($submenu)
|
41 |
+
{
|
42 |
+
$submenu[] = array(
|
43 |
+
'page_title' => apply_filters('emodal_admin_submenu_themes_page_title', __('Theme', EMCORE_SLUG)),
|
44 |
+
'menu_title' => apply_filters('emodal_admin_submenu_themes_menu_title', __('Theme', EMCORE_SLUG)),
|
45 |
+
'capability' => apply_filters('emodal_admin_submenu_themes_capability', 'edit_themes'),
|
46 |
+
'menu_slug' => emodal_admin_slug('themes'),
|
47 |
+
'function' => apply_filters('emodal_admin_submenu_themes_function',array('EModal_Controller_Admin_Theme', 'render'))
|
48 |
+
);
|
49 |
+
return $submenu;
|
50 |
+
}
|
51 |
+
public function settings_page($submenu)
|
52 |
+
{
|
53 |
+
$submenu[] = array(
|
54 |
+
'page_title' => apply_filters('emodal_admin_submenu_settings_page_title', __('Settings', EMCORE_SLUG)),
|
55 |
+
'menu_title' => apply_filters('emodal_admin_submenu_settings_menu_title', __('Settings', EMCORE_SLUG)),
|
56 |
+
'capability' => apply_filters('emodal_admin_submenu_settings_capability', 'manage_options'),
|
57 |
+
'menu_slug' => emodal_admin_slug('settings'),
|
58 |
+
'function' => apply_filters('emodal_admin_submenu_settings_function',array('EModal_Controller_Admin_Settings', 'render'))
|
59 |
+
);
|
60 |
+
return $submenu;
|
61 |
+
}
|
62 |
+
public function addons_page($submenu)
|
63 |
+
{
|
64 |
+
$submenu[] = array(
|
65 |
+
'page_title' => apply_filters('emodal_admin_submenu_addons_page_title', __('Add Ons', EMCORE_SLUG)),
|
66 |
+
'menu_title' => apply_filters('emodal_admin_submenu_addons_menu_title', __('Add Ons', EMCORE_SLUG)),
|
67 |
+
'capability' => apply_filters('emodal_admin_submenu_addons_capability', 'manage_options'),
|
68 |
+
'menu_slug' => emodal_admin_slug('addons'),
|
69 |
+
'function' => apply_filters('emodal_admin_submenu_addons_function',array('EModal_Controller_Admin_Addons', 'render'))
|
70 |
+
);
|
71 |
+
return $submenu;
|
72 |
+
}
|
73 |
+
public function help_page($submenu)
|
74 |
+
{
|
75 |
+
$submenu[] = array(
|
76 |
+
'page_title' => apply_filters('emodal_admin_submenu_help_page_title', __('Help', EMCORE_SLUG)),
|
77 |
+
'menu_title' => apply_filters('emodal_admin_submenu_help_menu_title', __('Help', EMCORE_SLUG)),
|
78 |
+
'capability' => apply_filters('emodal_admin_submenu_help_capability', 'edit_posts'),
|
79 |
+
'menu_slug' => emodal_admin_slug('help'),
|
80 |
+
'function' => apply_filters('emodal_admin_submenu_help_function',array('EModal_Controller_Admin_Help', 'render'))
|
81 |
+
);
|
82 |
+
return $submenu;
|
83 |
+
}
|
84 |
+
}
|
classes/admin/notice.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Admin_Notice {
|
2 |
+
protected static $messages = array();
|
3 |
+
public static function factory()
|
4 |
+
{
|
5 |
+
if ( !session_id() )
|
6 |
+
session_start();
|
7 |
+
add_action('admin_notices',array('EModal_Admin_Notice','render_notices'));
|
8 |
+
}
|
9 |
+
public static function get_messages($type = NULL)
|
10 |
+
{
|
11 |
+
if(empty($_SESSION[EMCORE_SLUG.'_notices']))
|
12 |
+
return array();
|
13 |
+
$messages = $_SESSION[EMCORE_SLUG.'_notices'];
|
14 |
+
return $messages;
|
15 |
+
}
|
16 |
+
public static function render_notices()
|
17 |
+
{
|
18 |
+
foreach(static::get_messages() as $key => $message)
|
19 |
+
{
|
20 |
+
?><div class="<?php esc_html_e($message['type']);?>">
|
21 |
+
<p><?php esc_html_e($message['message']);?></p>
|
22 |
+
</div><?php
|
23 |
+
unset($_SESSION[EMCORE_SLUG.'_notices'][$key]);
|
24 |
+
}
|
25 |
+
}
|
26 |
+
public static function add($message, $type = 'updated')
|
27 |
+
{
|
28 |
+
if ( !session_id() ) session_start();
|
29 |
+
$_SESSION[EMCORE_SLUG.'_notices'][] = array(
|
30 |
+
'message' => $message,
|
31 |
+
'type' => $type
|
32 |
+
);
|
33 |
+
}
|
34 |
+
}
|
35 |
+
EModal_Admin_Notice::factory();
|
classes/admin/postmeta.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Admin_Postmeta {
|
2 |
+
public function __construct()
|
3 |
+
{
|
4 |
+
add_action('load-post.php', array($this, 'post_meta_boxes_setup'));
|
5 |
+
add_action('load-post-new.php', array($this, 'post_meta_boxes_setup'));
|
6 |
+
}
|
7 |
+
public function post_meta_boxes_setup()
|
8 |
+
{
|
9 |
+
add_action('add_meta_boxes', array($this, 'post_meta_boxes'));
|
10 |
+
add_action('save_post', array($this, 'save_easy_modal_post_modals'), 10, 2);
|
11 |
+
}
|
12 |
+
public function post_meta_box($object, $box)
|
13 |
+
{
|
14 |
+
do_action('emodal_post_meta_box', $object, $box);
|
15 |
+
}
|
16 |
+
public function save_easy_modal_post_modals( $post_id, $post )
|
17 |
+
{
|
18 |
+
/* Verify the nonce before proceeding. */
|
19 |
+
if ( empty($_POST[EMCORE_NONCE]) || !wp_verify_nonce($_POST[EMCORE_NONCE], EMCORE_NONCE) ) return $post_id;
|
20 |
+
$post_type = get_post_type_object( $post->post_type );
|
21 |
+
/* Verify user has permission */
|
22 |
+
if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) return $post_id;
|
23 |
+
//$loginmodal = !empty( $_POST['emplogin_loginmodal']) && is_array($_POST['emplogin_loginmodal']) ? $_POST['emplogin_loginmodal'] : array();
|
24 |
+
//$loginmodal = emplogin_get_post_loginmodal_settings();
|
25 |
+
$post_modals = (!empty( $_POST['emodal_post_modals']) && is_all_numeric($_POST['emodal_post_modals'])) ? $_POST['emodal_post_modals'] : array() ;
|
26 |
+
if(!empty($post_modals))
|
27 |
+
{
|
28 |
+
update_post_meta($post_id, EMCORE_SLUG.'_post_modals', $post_modals);
|
29 |
+
}
|
30 |
+
else
|
31 |
+
{
|
32 |
+
delete_post_meta($post_id, EMCORE_SLUG.'_post_modals');
|
33 |
+
}
|
34 |
+
}
|
35 |
+
public function post_meta_boxes()
|
36 |
+
{
|
37 |
+
foreach(apply_filters('emodal_post_types', array('post','page')) as $post_types)
|
38 |
+
{
|
39 |
+
add_meta_box(EMCORE_SLUG, esc_html__(EMCORE_NAME, EMCORE_SLUG), array($this, 'post_meta_box'), $post_types);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
classes/controller.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Controller {
|
2 |
+
public function __construct(){}
|
3 |
+
public function index_url(){}
|
4 |
+
public function edit_url(){}
|
5 |
+
public function add_url(){}
|
6 |
+
static $instance;
|
7 |
+
static function render(){
|
8 |
+
self::$instance->view->render();
|
9 |
+
}
|
10 |
+
public function check_id()
|
11 |
+
{
|
12 |
+
if(!empty($_GET['id']) && !$_GET['id']){
|
13 |
+
wp_redirect($this->index_url(), 302);
|
14 |
+
exit();
|
15 |
+
}
|
16 |
+
return $_GET['id'];
|
17 |
+
}
|
18 |
+
public function redirect_to_edit()
|
19 |
+
{
|
20 |
+
wp_redirect($this->edit_url(), 302);
|
21 |
+
exit();
|
22 |
+
}
|
23 |
+
public function check_post_nonce()
|
24 |
+
{
|
25 |
+
return !empty($_POST) && !empty($_POST[EMCORE_NONCE]) && wp_verify_nonce($_POST[EMCORE_NONCE], EMCORE_NONCE);
|
26 |
+
}
|
27 |
+
public function check_get_nonce()
|
28 |
+
{
|
29 |
+
return !empty($_GET) && !empty($_GET[EMCORE_NONCE]) && wp_verify_nonce($_GET[EMCORE_NONCE], EMCORE_NONCE);
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
classes/controller/admin/addons.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Controller_Admin_Addons extends EModal_Controller {
|
2 |
+
static function factory()
|
3 |
+
{
|
4 |
+
self::$instance = new EModal_Controller_Admin_Addons;
|
5 |
+
if(empty($_GET['action']))
|
6 |
+
{
|
7 |
+
self::$instance->action_browse();
|
8 |
+
}
|
9 |
+
else
|
10 |
+
{
|
11 |
+
switch($_GET['action'])
|
12 |
+
{
|
13 |
+
case 'edit': self::$instance->action_browse(); break;
|
14 |
+
}
|
15 |
+
}
|
16 |
+
}
|
17 |
+
public function index_url()
|
18 |
+
{
|
19 |
+
return emodal_admin_url('addons');
|
20 |
+
}
|
21 |
+
public function edit_url()
|
22 |
+
{
|
23 |
+
return $this->index_url();
|
24 |
+
}
|
25 |
+
public function action_browse()
|
26 |
+
{
|
27 |
+
$view = new EModal_View_Admin_Addons;
|
28 |
+
$view->set('title', __('Easy Modal Add Ons', EMCORE_SLUG));
|
29 |
+
$view->set('tabs', apply_filters('emodal_admin_addons_tabs', array()));
|
30 |
+
self::$instance->view = $view;
|
31 |
+
}
|
32 |
+
}
|
classes/controller/admin/help.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Controller_Admin_Help extends EModal_Controller {
|
2 |
+
static function factory()
|
3 |
+
{
|
4 |
+
self::$instance = new EModal_Controller_Admin_Help;
|
5 |
+
self::$instance->action_index();
|
6 |
+
}
|
7 |
+
public function index_url()
|
8 |
+
{
|
9 |
+
return emodal_admin_url('help');
|
10 |
+
}
|
11 |
+
public function action_index()
|
12 |
+
{
|
13 |
+
$view = new EModal_View_Admin_Help;
|
14 |
+
$view->set('title', __('Help', EMCORE_SLUG));
|
15 |
+
$view->set('tabs', apply_filters('emodal_admin_help_tabs', array()));
|
16 |
+
self::$instance->view = $view;
|
17 |
+
}
|
18 |
+
}
|
classes/controller/admin/modals.php
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Controller_Admin_Modals extends EModal_Controller {
|
2 |
+
static function factory()
|
3 |
+
{
|
4 |
+
self::$instance = new EModal_Controller_Admin_Modals;
|
5 |
+
if(empty($_GET['action']))
|
6 |
+
{
|
7 |
+
self::$instance->action_index();
|
8 |
+
}
|
9 |
+
else
|
10 |
+
{
|
11 |
+
switch($_GET['action'])
|
12 |
+
{
|
13 |
+
case 'new': self::$instance->action_edit(); break;
|
14 |
+
case 'edit': self::$instance->action_edit(); break;
|
15 |
+
case 'clone': self::$instance->action_clone(); break;
|
16 |
+
case 'delete': self::$instance->action_delete(); break;
|
17 |
+
case 'untrash': self::$instance->action_untrash(); break;
|
18 |
+
case 'empty_trash': self::$instance->action_trash(); break;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
}
|
22 |
+
public function index_url()
|
23 |
+
{
|
24 |
+
return emodal_admin_url();
|
25 |
+
}
|
26 |
+
public function edit_url()
|
27 |
+
{
|
28 |
+
return emodal_admin_url() .'&action=edit&id='. get_current_modal_id();
|
29 |
+
}
|
30 |
+
public function new_url()
|
31 |
+
{
|
32 |
+
return emodal_admin_url() .'&action=new';
|
33 |
+
}
|
34 |
+
public function check_id()
|
35 |
+
{
|
36 |
+
if(empty($_GET['id']) && $_GET['action'] != 'new'){
|
37 |
+
wp_redirect($this->index_url(), 302);
|
38 |
+
exit();
|
39 |
+
}
|
40 |
+
return empty($_GET['id']) ? NULL : $_GET['id'];
|
41 |
+
}
|
42 |
+
public function action_index()
|
43 |
+
{
|
44 |
+
$view = new EModal_View_Admin_Modal_Index;
|
45 |
+
$view->set('title', __('Modals', EMCORE_SLUG));
|
46 |
+
$view->set('modal_new_url', $this->new_url());
|
47 |
+
self::$instance->view = $view;
|
48 |
+
}
|
49 |
+
public function action_edit()
|
50 |
+
{
|
51 |
+
global $current_modal;
|
52 |
+
$current_modal = new EModal_Model_Modal($this->check_id());
|
53 |
+
if($this->check_post_nonce())
|
54 |
+
{
|
55 |
+
$new_values = apply_filters('emodal_modal_pre_save', $current_modal->as_array());
|
56 |
+
$current_modal->set_fields($new_values);
|
57 |
+
$current_modal->save();
|
58 |
+
if(!$current_modal->id)
|
59 |
+
do_action('emodal_modal_new', $current_modal);
|
60 |
+
do_action('emodal_modal_save', $current_modal);
|
61 |
+
EModal_Admin_Notice::add($current_modal->id ? __('Modal Updated.',EMCORE_SLUG) : __('Modal Created.',EMCORE_SLUG), 'updated');
|
62 |
+
$this->redirect_to_edit();
|
63 |
+
}
|
64 |
+
$view = new EModal_View_Admin_Modal_Form;
|
65 |
+
$view->set('title', $current_modal->id ? __('Edit Modal', EMCORE_SLUG) : __('Add New Modal', EMCORE_SLUG));
|
66 |
+
$view->set('modal_new_url', $this->new_url());
|
67 |
+
$view->set('tabs', apply_filters('emodal_admin_modal_form_tabs', array()));
|
68 |
+
self::$instance->view = $view;
|
69 |
+
}
|
70 |
+
public function action_clone()
|
71 |
+
{
|
72 |
+
if($this->check_get_nonce())
|
73 |
+
{
|
74 |
+
global $current_modal;
|
75 |
+
$current_modal = new EModal_Model_Modal($this->check_id());
|
76 |
+
$current_modal->id = NULL;
|
77 |
+
$current_modal->meta->id = NULL;
|
78 |
+
$current_modal->save();
|
79 |
+
do_action('emodal_modal_clone', $current_modal);
|
80 |
+
EModal_Admin_Notice::add(__('Modal cloned successfully',EMCORE_SLUG), 'updated');
|
81 |
+
$this->redirect_to_edit();
|
82 |
+
}
|
83 |
+
wp_redirect($this->index_url(), 302);
|
84 |
+
exit();
|
85 |
+
}
|
86 |
+
public function action_delete()
|
87 |
+
{
|
88 |
+
if($this->check_get_nonce())
|
89 |
+
{
|
90 |
+
if(!empty($_GET['id']))
|
91 |
+
{
|
92 |
+
$ids = is_array($_GET['id']) ? $_GET['id'] : array($_GET['id']);
|
93 |
+
}
|
94 |
+
elseif(!empty($_GET['ids']))
|
95 |
+
{
|
96 |
+
$ids = $_GET['ids'];
|
97 |
+
}
|
98 |
+
elseif(!empty($_GET['modal']))
|
99 |
+
{
|
100 |
+
$ids = $_GET['modal'];
|
101 |
+
}
|
102 |
+
if(empty($ids))
|
103 |
+
{
|
104 |
+
EModal_Admin_Notice::add(__('No modals selected for deletion.', EMCORE_SLUG), 'updated');
|
105 |
+
wp_redirect($this->index_url(), 302);
|
106 |
+
exit();
|
107 |
+
}
|
108 |
+
global $wpdb;
|
109 |
+
$wpdb->query("UPDATE {$wpdb->prefix}em_modals SET is_trash = 1 WHERE id IN (".implode(',', $ids).")");
|
110 |
+
do_action('emodal_modal_delete');
|
111 |
+
EModal_Admin_Notice::add(count($ids) . __(' modals moved to the trash', EMCORE_SLUG), 'updated');
|
112 |
+
}
|
113 |
+
wp_redirect($this->index_url(), 302);
|
114 |
+
exit();
|
115 |
+
}
|
116 |
+
public function action_untrash()
|
117 |
+
{
|
118 |
+
if($this->check_get_nonce())
|
119 |
+
{
|
120 |
+
if(!empty($_GET['id']))
|
121 |
+
{
|
122 |
+
$ids = is_array($_GET['id']) ? $_GET['id'] : array($_GET['id']);
|
123 |
+
}
|
124 |
+
elseif(!empty($_GET['ids']))
|
125 |
+
{
|
126 |
+
$ids = $_GET['ids'];
|
127 |
+
}
|
128 |
+
elseif(!empty($_GET['modal']))
|
129 |
+
{
|
130 |
+
$ids = $_GET['modal'];
|
131 |
+
}
|
132 |
+
if(empty($ids))
|
133 |
+
{
|
134 |
+
EModal_Admin_Notice::add(__('No modals selected for undeletion.', EMCORE_SLUG), 'updated');
|
135 |
+
wp_redirect($this->index_url(), 302);
|
136 |
+
exit();
|
137 |
+
}
|
138 |
+
global $wpdb;
|
139 |
+
$wpdb->query("UPDATE {$wpdb->prefix}em_modals SET is_trash = 0 WHERE id IN ($ids)");
|
140 |
+
EModal_Admin_Notice::add(count($ids) . __(' modal restored from trash.',EMCORE_SLUG), 'updated');
|
141 |
+
do_action('emodal_modal_untrash');
|
142 |
+
}
|
143 |
+
wp_redirect($this->index_url(), 302);
|
144 |
+
exit();
|
145 |
+
}
|
146 |
+
public function action_trash()
|
147 |
+
{
|
148 |
+
if($this->check_get_nonce())
|
149 |
+
{
|
150 |
+
global $wpdb;
|
151 |
+
$wpdb->delete( $wpdb->prefix.'em_modals', array('is_trash' => 1));
|
152 |
+
EModal_Admin_Notice::add(__('Modal trash has been permanantly removed.',EMCORE_SLUG), 'updated');
|
153 |
+
do_action('emodal_modal_trash');
|
154 |
+
}
|
155 |
+
wp_redirect($this->index_url(), 302);
|
156 |
+
exit();
|
157 |
+
}
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
|
162 |
+
add_filter('emodal_modal_pre_save', 'emodal_modal_pre_save', 1);
|
163 |
+
function emodal_modal_pre_save($new_values)
|
164 |
+
{
|
165 |
+
$new_values['name'] = sanitize_text_field( empost('modal.name') );
|
166 |
+
$new_values['theme_id'] = 1;
|
167 |
+
$new_values['title'] = sanitize_text_field( empost('modal.title') );
|
168 |
+
$new_values['content'] = balanceTags( empost('modal.content') );
|
169 |
+
$new_values['is_sitewide'] = empost('modal.load_type') == 'sitewide' ? 1 : 0;
|
170 |
+
$new_values['meta']['display']['overlay_disabled'] = empost('modal.meta.display.overlay_disabled') ? 1 : 0;
|
171 |
+
$new_values['meta']['display']['size'] = empost('modal.meta.display.size');
|
172 |
+
$new_values['meta']['display']['custom_width'] = floatval( empost('modal.meta.display.custom_width') );
|
173 |
+
$new_values['meta']['display']['custom_width_unit'] = empost('modal.meta.display.custom_width_unit');
|
174 |
+
$new_values['meta']['display']['custom_height_auto'] = empost('modal.meta.display.custom_height_auto') ? 1 : 0;
|
175 |
+
$new_values['meta']['display']['custom_height'] = floatval( empost('modal.meta.display.custom_height') );
|
176 |
+
$new_values['meta']['display']['custom_height_unit'] = empost('modal.meta.display.custom_height_unit');
|
177 |
+
$new_values['meta']['display']['location'] = empost('modal.meta.display.location');
|
178 |
+
$new_values['meta']['display']['position']['top'] = floatval( empost('modal.meta.display.position.top') );
|
179 |
+
$new_values['meta']['display']['position']['left'] = floatval( empost('modal.meta.display.position.left') );
|
180 |
+
$new_values['meta']['display']['position']['bottom'] = floatval( empost('modal.meta.display.position.bottom') );
|
181 |
+
$new_values['meta']['display']['position']['right'] = floatval( empost('modal.meta.display.position.right') );
|
182 |
+
$new_values['meta']['display']['position']['fixed'] = empost('modal.meta.display.position.fixed') ? 1 : 0;
|
183 |
+
|
184 |
+
|
185 |
+
|
186 |
+
$new_values['meta']['display']['animation']['type'] = empost('modal.meta.display.animation.type');
|
187 |
+
$new_values['meta']['display']['animation']['speed'] = empost('modal.meta.display.animation.speed');
|
188 |
+
$new_values['meta']['display']['animation']['origin'] = empost('modal.meta.display.animation.origin');
|
189 |
+
$new_values['meta']['close']['overlay_click'] = empost('modal.meta.close.overlay_click') ? 1 : 0;
|
190 |
+
$new_values['meta']['close']['esc_press'] = empost('modal.meta.close.esc_press') ? 1 : 0;
|
191 |
+
|
192 |
+
return $new_values;
|
193 |
+
}
|
classes/controller/admin/settings.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Controller_Admin_Settings extends EModal_Controller {
|
2 |
+
static function factory()
|
3 |
+
{
|
4 |
+
self::$instance = new EModal_Controller_Admin_Settings;
|
5 |
+
if(empty($_GET['action']))
|
6 |
+
{
|
7 |
+
self::$instance->action_edit();
|
8 |
+
}
|
9 |
+
else
|
10 |
+
{
|
11 |
+
switch($_GET['action'])
|
12 |
+
{
|
13 |
+
case 'edit': self::$instance->action_edit(); break;
|
14 |
+
}
|
15 |
+
}
|
16 |
+
}
|
17 |
+
public function index_url()
|
18 |
+
{
|
19 |
+
return emodal_admin_url('settings');
|
20 |
+
}
|
21 |
+
public function edit_url()
|
22 |
+
{
|
23 |
+
return $this->index_url();
|
24 |
+
}
|
25 |
+
public function action_edit()
|
26 |
+
{
|
27 |
+
if($this->check_post_nonce())
|
28 |
+
{
|
29 |
+
$EModal_License = new EModal_License;
|
30 |
+
$EModal_License->check_license(empost('license.key'));
|
31 |
+
$new_values = apply_filters('emodal_settings_pre_save', emodal_get_option('emodal_settings'));
|
32 |
+
emodal_update_option('emodal_settings', $new_values);
|
33 |
+
do_action('emodal_settings_save', $new_values);
|
34 |
+
EModal_Admin_Notice::add(__('Settings Updated.',EMCORE_SLUG), 'updated');
|
35 |
+
EModal_Admin::check_updates();
|
36 |
+
$this->redirect_to_edit();
|
37 |
+
}
|
38 |
+
$view = new EModal_View_Admin_Settings_Form;
|
39 |
+
$view->set('title', __('Easy Modal Settings', EMCORE_SLUG));
|
40 |
+
$view->set('tabs', apply_filters('emodal_admin_settings_form_tabs', array()));
|
41 |
+
self::$instance->view = $view;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
add_filter('emodal_settings_pre_save', 'emodal_settings_pre_save', 1);
|
47 |
+
function emodal_settings_pre_save($new_values)
|
48 |
+
{
|
49 |
+
return $new_values;
|
50 |
+
}
|
classes/controller/admin/theme.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Controller_Admin_Theme extends EModal_Controller {
|
2 |
+
static function factory()
|
3 |
+
{
|
4 |
+
self::$instance = new EModal_Controller_Admin_Theme;
|
5 |
+
self::$instance->action_edit();
|
6 |
+
}
|
7 |
+
public function index_url()
|
8 |
+
{
|
9 |
+
return emodal_admin_url('themes');
|
10 |
+
}
|
11 |
+
public function edit_url()
|
12 |
+
{
|
13 |
+
return $this->index_url();
|
14 |
+
}
|
15 |
+
public function check_id()
|
16 |
+
{
|
17 |
+
return 1;
|
18 |
+
}
|
19 |
+
public function action_edit()
|
20 |
+
{
|
21 |
+
global $current_theme;
|
22 |
+
$current_theme = new EModal_Model_Theme($this->check_id());
|
23 |
+
if($this->check_post_nonce())
|
24 |
+
{
|
25 |
+
$new_values = apply_filters('emodal_theme_pre_save', $current_theme->as_array());
|
26 |
+
$current_theme->set_fields($new_values);
|
27 |
+
$current_theme->save();
|
28 |
+
do_action('emodal_theme_save', $current_theme);
|
29 |
+
EModal_Admin_Notice::add(__('Theme Updated.',EMCORE_SLUG), 'updated');
|
30 |
+
$this->redirect_to_edit();
|
31 |
+
}
|
32 |
+
$view = new EModal_View_Admin_Theme_Form;
|
33 |
+
$view->set('title', __('Edit Theme', EMCORE_SLUG));
|
34 |
+
$view->set('tabs', apply_filters('emodal_admin_theme_form_tabs', array()));
|
35 |
+
self::$instance->view = $view;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
add_filter('emodal_theme_pre_save', 'emodal_theme_pre_save', 1);
|
41 |
+
function emodal_theme_pre_save($new_values)
|
42 |
+
{
|
43 |
+
$new_values['name'] = sanitize_text_field( empost('theme.name') );
|
44 |
+
|
45 |
+
$new_values['meta']['overlay']['background']['color'] = sanitize_text_field( empost('theme.meta.overlay.background.color') );
|
46 |
+
$new_values['meta']['overlay']['background']['opacity'] = floatval( empost('theme.meta.overlay.background.opacity') );
|
47 |
+
|
48 |
+
$new_values['meta']['container']['padding'] = floatval( empost('theme.meta.container.padding') );
|
49 |
+
$new_values['meta']['container']['background']['color'] = sanitize_text_field( empost('theme.meta.container.background.color') );
|
50 |
+
$new_values['meta']['container']['background']['opacity'] = floatval( empost('theme.meta.container.background.opacity') );
|
51 |
+
$new_values['meta']['container']['border']['style'] = empost('theme.meta.container.border.style');
|
52 |
+
$new_values['meta']['container']['border']['color'] = sanitize_text_field( empost('theme.meta.container.border.color') );
|
53 |
+
$new_values['meta']['container']['border']['width'] = floatval( empost('theme.meta.container.border.width') );
|
54 |
+
$new_values['meta']['container']['border']['radius'] = floatval( empost('theme.meta.container.border.radius') );
|
55 |
+
$new_values['meta']['container']['boxshadow']['inset'] = empost('theme.meta.container.boxshadow.inset');
|
56 |
+
$new_values['meta']['container']['boxshadow']['horizontal'] = floatval( empost('theme.meta.container.boxshadow.horizontal') );
|
57 |
+
$new_values['meta']['container']['boxshadow']['vertical'] = floatval( empost('theme.meta.container.boxshadow.vertical') );
|
58 |
+
$new_values['meta']['container']['boxshadow']['blur'] = floatval( empost('theme.meta.container.boxshadow.blur') );
|
59 |
+
$new_values['meta']['container']['boxshadow']['spread'] = floatval( empost('theme.meta.container.boxshadow.spread') );
|
60 |
+
$new_values['meta']['container']['boxshadow']['color'] = sanitize_text_field( empost('theme.meta.container.boxshadow.color') );
|
61 |
+
$new_values['meta']['container']['boxshadow']['opacity'] = floatval( empost('theme.meta.container.boxshadow.opacity') );
|
62 |
+
|
63 |
+
$new_values['meta']['title']['font']['color'] = sanitize_text_field( empost('theme.meta.title.font.color') );
|
64 |
+
$new_values['meta']['title']['font']['size'] = floatval( empost('theme.meta.title.font.size') );
|
65 |
+
$new_values['meta']['title']['font']['family'] = empost('theme.meta.title.font.family');
|
66 |
+
$new_values['meta']['title']['text']['align'] = empost('theme.meta.title.text.align');
|
67 |
+
$new_values['meta']['title']['textshadow']['horizontal'] = floatval( empost('theme.meta.title.textshadow.horizontal') );
|
68 |
+
$new_values['meta']['title']['textshadow']['vertical'] = floatval( empost('theme.meta.title.textshadow.vertical') );
|
69 |
+
$new_values['meta']['title']['textshadow']['blur'] = floatval( empost('theme.meta.title.textshadow.blur') );
|
70 |
+
$new_values['meta']['title']['textshadow']['color'] = sanitize_text_field( empost('theme.meta.title.textshadow.color') );
|
71 |
+
$new_values['meta']['title']['textshadow']['opacity'] = floatval( empost('theme.meta.title.textshadow.opacity') );
|
72 |
+
|
73 |
+
$new_values['meta']['content']['font']['color'] = sanitize_text_field( empost('theme.meta.content.font.color') );
|
74 |
+
$new_values['meta']['content']['font']['family'] = empost('theme.meta.content.font.family');
|
75 |
+
|
76 |
+
$new_values['meta']['close']['text'] = sanitize_text_field( empost('theme.meta.close.text') );
|
77 |
+
$new_values['meta']['close']['location'] = empost('theme.meta.close.location');
|
78 |
+
$new_values['meta']['close']['position']['top'] = empost('theme.meta.close.position.top');
|
79 |
+
$new_values['meta']['close']['position']['left'] = empost('theme.meta.close.position.left');
|
80 |
+
$new_values['meta']['close']['position']['bottom'] = empost('theme.meta.close.position.bottom');
|
81 |
+
$new_values['meta']['close']['position']['right'] = empost('theme.meta.close.position.right');
|
82 |
+
$new_values['meta']['close']['padding'] = floatval( empost('theme.meta.close.padding') );
|
83 |
+
$new_values['meta']['close']['background']['color'] = sanitize_text_field( empost('theme.meta.close.background.color') );
|
84 |
+
$new_values['meta']['close']['background']['opacity'] = floatval( empost('theme.meta.close.background.opacity') );
|
85 |
+
$new_values['meta']['close']['font']['color'] = sanitize_text_field( empost('theme.meta.close.font.color') );
|
86 |
+
$new_values['meta']['close']['font']['size'] = floatval( empost('theme.meta.close.font.size') );
|
87 |
+
$new_values['meta']['close']['font']['family'] = empost('theme.meta.close.font.family');
|
88 |
+
$new_values['meta']['close']['border']['style'] = empost('theme.meta.close.border.style');
|
89 |
+
$new_values['meta']['close']['border']['color'] = sanitize_text_field( empost('theme.meta.close.border.color') );
|
90 |
+
$new_values['meta']['close']['border']['width'] = floatval( empost('theme.meta.close.border.width') );
|
91 |
+
$new_values['meta']['close']['border']['radius'] = floatval( empost('theme.meta.close.border.radius') );
|
92 |
+
$new_values['meta']['close']['boxshadow']['inset'] = empost('theme.meta.close.boxshadow.inset');
|
93 |
+
$new_values['meta']['close']['boxshadow']['horizontal'] = floatval( empost('theme.meta.close.boxshadow.horizontal') );
|
94 |
+
$new_values['meta']['close']['boxshadow']['vertical'] = floatval( empost('theme.meta.close.boxshadow.vertical') );
|
95 |
+
$new_values['meta']['close']['boxshadow']['blur'] = floatval( empost('theme.meta.close.boxshadow.blur') );
|
96 |
+
$new_values['meta']['close']['boxshadow']['spread'] = floatval( empost('theme.meta.close.boxshadow.spread') );
|
97 |
+
$new_values['meta']['close']['boxshadow']['color'] = sanitize_text_field( empost('theme.meta.close.boxshadow.color') );
|
98 |
+
$new_values['meta']['close']['boxshadow']['opacity'] = floatval( empost('theme.meta.close.boxshadow.opacity') );
|
99 |
+
$new_values['meta']['close']['textshadow']['horizontal'] = floatval( empost('theme.meta.close.textshadow.horizontal') );
|
100 |
+
$new_values['meta']['close']['textshadow']['vertical'] = floatval( empost('theme.meta.close.textshadow.vertical') );
|
101 |
+
$new_values['meta']['close']['textshadow']['blur'] = floatval( empost('theme.meta.close.textshadow.blur') );
|
102 |
+
$new_values['meta']['close']['textshadow']['color'] = sanitize_text_field( empost('theme.meta.close.textshadow.color') );
|
103 |
+
$new_values['meta']['close']['textshadow']['opacity'] = floatval( empost('theme.meta.close.textshadow.opacity') );
|
104 |
+
|
105 |
+
return $new_values;
|
106 |
+
}
|
classes/license.php
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_License {
|
2 |
+
protected $product = array(
|
3 |
+
'slug' => EMCORE_SLUG,
|
4 |
+
'version' => EMCORE_VERSION,
|
5 |
+
);
|
6 |
+
protected $valid_status_codes = array(2000,2001,3002,3003);
|
7 |
+
protected $unactivated_status_codes = array(3004,3006);
|
8 |
+
|
9 |
+
public function __construct()
|
10 |
+
{
|
11 |
+
$license = emodal_get_license();
|
12 |
+
if(!get_site_transient(EMCORE_SLUG.'-license-check'))
|
13 |
+
{
|
14 |
+
$license['status'] = $this->check_license($license['key']);
|
15 |
+
set_site_transient(EMCORE_SLUG.'-license-check', $license, (365 * (60 * 60 * 24)) / 12);
|
16 |
+
emodal_update_option(EMCORE_SLUG.'-license', $license);
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
public static function available_addons()
|
21 |
+
{
|
22 |
+
if(!$addons = get_transient(EMCORE_SLUG.'-addon-list'))
|
23 |
+
{
|
24 |
+
global $EModal_License;
|
25 |
+
$addons = $EModal_License->api_request('addon_list');
|
26 |
+
set_transient(EMCORE_SLUG.'-addon-list', $addons, 12 * HOUR_IN_SECONDS);
|
27 |
+
}
|
28 |
+
return $addons;
|
29 |
+
}
|
30 |
+
public function check_license($new_license = false, $force_check = false)
|
31 |
+
{
|
32 |
+
$license = emodal_get_license();
|
33 |
+
if($new_license == '')
|
34 |
+
{
|
35 |
+
emodal_delete_option( EMCORE_SLUG.'-license' );
|
36 |
+
delete_site_transient( EMCORE_SLUG.'-license-check');
|
37 |
+
delete_transient(EMCORE_SLUG.'-addon-list');
|
38 |
+
return;
|
39 |
+
}
|
40 |
+
if($new_license && $new_license != $license['key'] && SHA1($new_license) != $license['key'])
|
41 |
+
{
|
42 |
+
$license = array(
|
43 |
+
'valid' => false,
|
44 |
+
'key' => $new_license != '' ? SHA1($new_license) : '',
|
45 |
+
'status' => array(
|
46 |
+
'code' => NULL,
|
47 |
+
'message' => NULL,
|
48 |
+
'expires' => NULL,
|
49 |
+
'domains' => NULL
|
50 |
+
)
|
51 |
+
);
|
52 |
+
if($new_license != '')
|
53 |
+
{
|
54 |
+
$force_check = true;
|
55 |
+
}
|
56 |
+
emodal_update_option(EMCORE_SLUG.'-license', $license);
|
57 |
+
}
|
58 |
+
if($force_check || ($license['valid'] && !get_site_transient( EMCORE_SLUG.'-license-check' )))
|
59 |
+
{
|
60 |
+
$status = $this->api_request('license_check');
|
61 |
+
if(is_array($status) && in_array($status['code'], $this->unactivated_status_codes))
|
62 |
+
{
|
63 |
+
$status = $this->api_request('activate_domain');
|
64 |
+
//$this->api_request('license_check');
|
65 |
+
}
|
66 |
+
if(is_array($status) && in_array($status['code'], $this->valid_status_codes))
|
67 |
+
{
|
68 |
+
$license['valid'] = true;
|
69 |
+
}
|
70 |
+
else if($status instanceof WP_Error)
|
71 |
+
{
|
72 |
+
$status = array(
|
73 |
+
'code' => 0000,
|
74 |
+
'message' => $status->error
|
75 |
+
);
|
76 |
+
}
|
77 |
+
$license['status'] = $status;
|
78 |
+
emodal_update_option(EMCORE_SLUG.'-license', $license);
|
79 |
+
set_site_transient( EMCORE_SLUG.'-license-check', true, (365 * (60 * 60 * 24)) / 12 );
|
80 |
+
delete_transient(EMCORE_SLUG.'-addon-list');
|
81 |
+
}
|
82 |
+
return $license;
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
+
|
87 |
+
public function prepare_request($action, $args = array())
|
88 |
+
{
|
89 |
+
global $wp_version;
|
90 |
+
return array(
|
91 |
+
'action' => $action,
|
92 |
+
'slug' => $this->product['slug'],
|
93 |
+
'installed_version' => $this->product['version'],
|
94 |
+
'license_key' => emodal_get_license('key'),
|
95 |
+
'host' => array(
|
96 |
+
'domain' => get_bloginfo('url'),
|
97 |
+
'wp_version'=> $wp_version
|
98 |
+
),
|
99 |
+
'args' => $args,
|
100 |
+
);
|
101 |
+
}
|
102 |
+
public function api_request($action, $args = array())
|
103 |
+
{
|
104 |
+
$apiQuery = add_query_arg(
|
105 |
+
$this->prepare_request($action, $args),
|
106 |
+
//network_admin_url('update.php')
|
107 |
+
EMCORE_API_URL
|
108 |
+
);
|
109 |
+
$request = wp_remote_get($apiQuery);
|
110 |
+
if (is_wp_error($request))
|
111 |
+
{
|
112 |
+
$response = new WP_Error('plugins_api_failed', __('An Unexpected HTTP Error occurred during the API request.'), $request->get_error_message());
|
113 |
+
}
|
114 |
+
else
|
115 |
+
{
|
116 |
+
$response = (array) json_decode($request['body']);
|
117 |
+
if ($response === false)
|
118 |
+
{
|
119 |
+
$response = new WP_Error('plugins_api_failed', __('An unknown error occurred'), $request['body']);
|
120 |
+
}
|
121 |
+
}
|
122 |
+
return $response;
|
123 |
+
}
|
124 |
+
|
125 |
+
}
|
classes/migrate.php
ADDED
@@ -0,0 +1,572 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class EModal_Migrate_Pre_V1 {
|
3 |
+
function __construct()
|
4 |
+
{
|
5 |
+
register_activation_hook(__FILE__, array(&$this, '_migrate'));
|
6 |
+
|
7 |
+
}
|
8 |
+
protected function _migrate_EM()
|
9 |
+
{
|
10 |
+
global $wp;
|
11 |
+
$o_modal_list = get_option('EasyModal');
|
12 |
+
if(!is_array($o_modal_list))
|
13 |
+
{
|
14 |
+
$o_modal_list = unserialize($o_modal_list);
|
15 |
+
}
|
16 |
+
foreach($o_modal_list as $id)
|
17 |
+
{
|
18 |
+
$Modal = get_option('EasyModal_'.$id);
|
19 |
+
if(!is_array($Modal))
|
20 |
+
{
|
21 |
+
$Modal = unserialize($Modal);
|
22 |
+
}
|
23 |
+
$Modal['name'] = $Modal['title'];
|
24 |
+
$this->updateModalSettings('new',$Modal, false, true);
|
25 |
+
//delete_option('EasyModal_'.$id);
|
26 |
+
}
|
27 |
+
//delete_option('eM_version');
|
28 |
+
//delete_option('EasyModal');
|
29 |
+
}
|
30 |
+
protected function _migrate_EM_Lite()
|
31 |
+
{
|
32 |
+
global $wp;
|
33 |
+
$o_modal_list = get_option('EasyModalLite_ModalList');
|
34 |
+
if(!is_array($o_modal_list))
|
35 |
+
{
|
36 |
+
$o_modal_list = unserialize($o_modal_list);
|
37 |
+
}
|
38 |
+
foreach($o_modal_list as $id => $title)
|
39 |
+
{
|
40 |
+
$Modal = get_option('EasyModalLite_Modal-'.$id);
|
41 |
+
if(!is_array($Modal))
|
42 |
+
{
|
43 |
+
$Modal = unserialize($Modal);
|
44 |
+
}
|
45 |
+
$Modal['name'] = !empty($Modal['title']) ? $Modal['title'] : 'change_me';
|
46 |
+
$this->updateModalSettings($id, $Modal, false, true);
|
47 |
+
//delete_option('EasyModalLite_Modal-'.$id);
|
48 |
+
}
|
49 |
+
$Theme = get_option('EasyModalLite_Theme-1');
|
50 |
+
if(!is_array($Theme))
|
51 |
+
{
|
52 |
+
$Theme = unserialize($Theme);
|
53 |
+
}
|
54 |
+
$this->updateThemeSettings(1,$Theme,false,true);
|
55 |
+
//delete_option('EasyModalLite_Theme-1');
|
56 |
+
$o_settings = get_option('EasyModalLite_Settings');
|
57 |
+
if(!is_array($o_settings))
|
58 |
+
{
|
59 |
+
$o_settings = unserialize($o_settings);
|
60 |
+
if(!is_array($o_settings))
|
61 |
+
{
|
62 |
+
$o_settings = array();
|
63 |
+
}
|
64 |
+
}
|
65 |
+
unset($o_settings['license']);
|
66 |
+
$this->updateSettings($o_settings,true);
|
67 |
+
//delete_option('EasyModalLite_Settings');
|
68 |
+
//delete_option('EasyModalLite_Version');
|
69 |
+
//delete_option('EasyModalLite_ModalList');
|
70 |
+
//delete_option('EasyModalLite_ThemeList');
|
71 |
+
}
|
72 |
+
protected function _migrate_EM_Pro()
|
73 |
+
{
|
74 |
+
global $wp;
|
75 |
+
$o_theme_list = get_option('EasyModalPro_ModalList');
|
76 |
+
if(!is_array($o_theme_list))
|
77 |
+
{
|
78 |
+
$o_theme_list = unserialize($o_theme_list);
|
79 |
+
}
|
80 |
+
foreach($o_theme_list as $id => $name)
|
81 |
+
{
|
82 |
+
$Theme = get_option('EasyModalPro_Theme-'.$id);
|
83 |
+
if(!is_array($Theme))
|
84 |
+
{
|
85 |
+
$Theme = unserialize($Theme);
|
86 |
+
}
|
87 |
+
$theme = $this->updateThemeSettings('new',$Theme,false,true);
|
88 |
+
//delete_option('EasyModalPro_Theme-'.$id);
|
89 |
+
$themes[$id] = $theme['theme_id'];
|
90 |
+
}
|
91 |
+
//delete_option('EasyModalPro_ThemeList');
|
92 |
+
$themes = $this->getThemeList();
|
93 |
+
$o_modal_list = get_option('EasyModalPro_ModalList');
|
94 |
+
if(!is_array($o_modal_list))
|
95 |
+
{
|
96 |
+
$o_modal_list = unserialize($o_modal_list);
|
97 |
+
}
|
98 |
+
foreach($o_modal_list as $id => $title)
|
99 |
+
{
|
100 |
+
$Modal = get_option('EasyModalPro_Modal-'.$id);
|
101 |
+
if(!is_array($Modal))
|
102 |
+
{
|
103 |
+
$Modal = unserialize($Modal);
|
104 |
+
}
|
105 |
+
$Modal['theme'] = isset($themes[$id]) ? $theme[$id] : 1;
|
106 |
+
$Modal['name'] = !empty($Modal['title']) ? $Modal['title'] : 'change_me';
|
107 |
+
$this->updateModalSettings($id, $Modal, false, true);
|
108 |
+
//delete_option('EasyModalPro_Modal-'.$id);
|
109 |
+
}
|
110 |
+
//delete_option('EasyModalPro_ModalList');
|
111 |
+
$o_settings = get_option('EasyModalPro_Settings');
|
112 |
+
if(!is_array($o_settings))
|
113 |
+
{
|
114 |
+
$o_settings = unserialize($o_settings);
|
115 |
+
if(!is_array($o_settings))
|
116 |
+
{
|
117 |
+
$o_settings = array();
|
118 |
+
}
|
119 |
+
}
|
120 |
+
$license = get_option('EasyModalPro_License');
|
121 |
+
$this->process_license($license);
|
122 |
+
unset($o_settings['license']);
|
123 |
+
$this->updateSettings($o_settings,true);
|
124 |
+
//delete_option('EasyModalPro_License');
|
125 |
+
//delete_option('EasyModalPro_Settings');
|
126 |
+
//delete_option('EasyModalPro_Version');
|
127 |
+
}
|
128 |
+
}
|
129 |
+
class EModal_Migrate_Pre_V2 {
|
130 |
+
public function __construct()
|
131 |
+
{
|
132 |
+
if(get_option('EasyModal_Version'))
|
133 |
+
{
|
134 |
+
$themes = self::get_themes();
|
135 |
+
$theme_check = array();
|
136 |
+
foreach($themes as $theme)
|
137 |
+
{
|
138 |
+
$new_theme = new EModal_Model_Theme;
|
139 |
+
$new_theme->set_fields(array(
|
140 |
+
'id' => $theme['id'],
|
141 |
+
'name' => $theme['name'],
|
142 |
+
'is_system' => $theme['id'] == 1 ? 1 : 0,
|
143 |
+
'meta' => array(
|
144 |
+
'overlay' => array(
|
145 |
+
'background' => array(
|
146 |
+
'color' => $theme['overlayColor'],
|
147 |
+
'opacity' => $theme['overlayOpacity'],
|
148 |
+
)
|
149 |
+
),
|
150 |
+
'container' => array(
|
151 |
+
'padding' => $theme['containerPadding'],
|
152 |
+
'background' => array(
|
153 |
+
'color' => $theme['containerBgColor'],
|
154 |
+
),
|
155 |
+
'border' => array(
|
156 |
+
'style' => $theme['containerBorderStyle'],
|
157 |
+
'color' => $theme['containerBorderColor'],
|
158 |
+
'width' => $theme['containerBorderWidth'],
|
159 |
+
'radius' => $theme['containerBorderRadius'],
|
160 |
+
),
|
161 |
+
),
|
162 |
+
'title' => array(
|
163 |
+
'font' => array(
|
164 |
+
'color' => $theme['contentTitleFontColor'],
|
165 |
+
'size' => $theme['contentTitleFontSize'],
|
166 |
+
'family' => $theme['contentTitleFontFamily'],
|
167 |
+
),
|
168 |
+
),
|
169 |
+
'content' => array(
|
170 |
+
'font' => array(
|
171 |
+
'color' => $theme['contentFontColor'],
|
172 |
+
),
|
173 |
+
),
|
174 |
+
'close' => array(
|
175 |
+
'padding' => ($theme['closeSize'] - $theme['closeFontSize']) / 2,
|
176 |
+
'text' => $theme['closeText'],
|
177 |
+
'location' => $theme['closePosition'],
|
178 |
+
'background' => array(
|
179 |
+
'color' => $theme['closeBgColor'],
|
180 |
+
),
|
181 |
+
'border' => array(
|
182 |
+
'radius' => $theme['closeBorderRadius'],
|
183 |
+
),
|
184 |
+
'font' => array(
|
185 |
+
'color' => $theme['closeFontColor'],
|
186 |
+
'size' => $theme['closeFontSize'],
|
187 |
+
),
|
188 |
+
|
189 |
+
),
|
190 |
+
),
|
191 |
+
));
|
192 |
+
$new_theme->save();
|
193 |
+
$theme_check[] = $new_theme->id;
|
194 |
+
}
|
195 |
+
|
196 |
+
$modals = self::get_modals();
|
197 |
+
foreach($modals as $modal)
|
198 |
+
{
|
199 |
+
$new_modal = new EModal_Model_Modal;
|
200 |
+
$new_modal->set_fields(array(
|
201 |
+
'id' => is_int(intval($modal['id'])) ? $modal['id'] : NULL,
|
202 |
+
'theme_id' => in_array($modal['theme'], $theme_check) ? $modal['theme'] : 1,
|
203 |
+
'name' => $modal['name'],
|
204 |
+
'title' => $modal['title'],
|
205 |
+
'content' => $modal['content'],
|
206 |
+
'is_sitewide' => $modal['sitewide'] ? 1 : 0,
|
207 |
+
'content' => $modal['content'],
|
208 |
+
'is_system' => in_array($modal['id'], array('Login','Register','Forgot')) ? 1 : 0,
|
209 |
+
'meta' => array(
|
210 |
+
'display' => array(
|
211 |
+
'size' => $modal['size'] == '' ? 'normal' : $modal['size'],
|
212 |
+
'custom_width' => $modal['userWidth'],
|
213 |
+
'custom_width_unit' => $modal['userWidthUnit'],
|
214 |
+
'custom_height' => $modal['userHeight'],
|
215 |
+
'custom_height_unit' => $modal['userHeightUnit'],
|
216 |
+
'animation' => array(
|
217 |
+
'type' => $modal['animation'],
|
218 |
+
'speed' => $modal['duration'],
|
219 |
+
'origin' => $modal['direction'],
|
220 |
+
),
|
221 |
+
),
|
222 |
+
'close' => array(
|
223 |
+
'overlay_click' => $modal['overlayClose'] ? 1 : 0,
|
224 |
+
'esc_press' => $modal['overlayEscClose'] ? 1 : 0,
|
225 |
+
'disabled' => !empty($modal['closeDisabled']) && $modal['closeDisabled'] ? 1 : 0,
|
226 |
+
)
|
227 |
+
),
|
228 |
+
));
|
229 |
+
$new_modal->save();
|
230 |
+
if($modal['id'] == 'Login')
|
231 |
+
{
|
232 |
+
$login_modal = $new_modal->id;
|
233 |
+
}
|
234 |
+
elseif($modal['id'] == 'Register')
|
235 |
+
{
|
236 |
+
$register_modal = $new_modal->id;
|
237 |
+
}
|
238 |
+
elseif($modal['id'] == 'Forgot')
|
239 |
+
{
|
240 |
+
$forgot_modal = $new_modal->id;
|
241 |
+
}
|
242 |
+
}
|
243 |
+
|
244 |
+
$license = self::get_license();
|
245 |
+
if(!empty($license))
|
246 |
+
{
|
247 |
+
$EModal_License = new EModal_License;
|
248 |
+
$EModal_License->check_license($license, true);
|
249 |
+
EModal_Admin::check_updates();
|
250 |
+
}
|
251 |
+
|
252 |
+
$settings = self::get_settings();
|
253 |
+
if(array_key_exists('autoOpen_id', $settings))
|
254 |
+
{
|
255 |
+
$autoopen = array(
|
256 |
+
'modal_id' => intval( $settings['autoOpen_id'] ),
|
257 |
+
'type' => 'page-load',
|
258 |
+
'pageload' => array(
|
259 |
+
'delay' => intval($settings['autoOpen_delay'])
|
260 |
+
),
|
261 |
+
'cookie' => array(
|
262 |
+
'time' => is_float( $settings['autoOpen_timer'] ) || is_int( $settings['autoOpen_timer'] ) ? $settings['autoOpen_timer'] .' days' : $settings['autoOpen_timer']
|
263 |
+
)
|
264 |
+
);
|
265 |
+
emodal_update_option('easy-modal-pro_autoopen', $autoopen);
|
266 |
+
|
267 |
+
$autoexit = array(
|
268 |
+
'modal_id' => intval( $settings['autoExit_id'] ),
|
269 |
+
'cookie' => array(
|
270 |
+
'time' => is_float( $settings['autoExit_timer'] ) || is_int( $settings['autoExit_timer'] ) ? $settings['autoExit_timer'] .' days' : $settings['autoExit_timer']
|
271 |
+
)
|
272 |
+
);
|
273 |
+
emodal_update_option('easy-modal-pro-exit-modals_autoexit', $autoexit);
|
274 |
+
}
|
275 |
+
|
276 |
+
if($settings['login_modal_enabled'])
|
277 |
+
{
|
278 |
+
if(!empty($login_modal))
|
279 |
+
{
|
280 |
+
$new_login_modal->set_fields(array(
|
281 |
+
'name' => 'Login Modal',
|
282 |
+
'meta' => array(
|
283 |
+
'size' => 'small'
|
284 |
+
)
|
285 |
+
));
|
286 |
+
$new_login_modal->save();
|
287 |
+
$login_modal = $new_login_modal->id;
|
288 |
+
}
|
289 |
+
if(!empty($register_modal))
|
290 |
+
{
|
291 |
+
$new_registration_modal->set_fields(array(
|
292 |
+
'name' => 'Registration Modal',
|
293 |
+
'meta' => array(
|
294 |
+
'size' => 'small'
|
295 |
+
)
|
296 |
+
));
|
297 |
+
$new_registration_modal->save();
|
298 |
+
$register_modal = $new_registration_modal->id;
|
299 |
+
}
|
300 |
+
if(!empty($forgot_modal))
|
301 |
+
{
|
302 |
+
$new_forgot_modal->set_fields(array(
|
303 |
+
'name' => 'Forgot Password Modal',
|
304 |
+
'meta' => array(
|
305 |
+
'size' => 'small'
|
306 |
+
)
|
307 |
+
));
|
308 |
+
$new_forgot_modal->save();
|
309 |
+
$forgot_modal = $new_forgot_modal->id;
|
310 |
+
}
|
311 |
+
|
312 |
+
|
313 |
+
$loginmodal = array(
|
314 |
+
'enabled' => $settings['login_modal_enabled'] ? 1 : 0,
|
315 |
+
'force_login' => $settings['force_user_login'] ? 1 : 0,
|
316 |
+
'login' => array(
|
317 |
+
'modal_id' => $login_modal,
|
318 |
+
),
|
319 |
+
'registration' => array(
|
320 |
+
'modal_id' => $register_modal,
|
321 |
+
'enable_password' => $settings['registration_modal']['enable_password'] ? 1 : 0,
|
322 |
+
'autologin' => $settings['registration_modal']['autologin'] ? 1 : 0,
|
323 |
+
),
|
324 |
+
'forgot' => array(
|
325 |
+
'modal_id' => $forgot_modal,
|
326 |
+
),
|
327 |
+
);
|
328 |
+
emodal_update_option('easy-modal-pro-login-modals_loginmodal', $loginmodal);
|
329 |
+
}
|
330 |
+
|
331 |
+
}
|
332 |
+
global $wpdb;
|
333 |
+
$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = 'easy-modal_post_modals' WHERE meta_key = 'easy_modal_post_modals'");
|
334 |
+
$post_meta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE meta_key LIKE 'easy_modal_post_%' ORDER BY post_id ASC");
|
335 |
+
$new_post_meta = array();
|
336 |
+
$delete_post_meta = array();
|
337 |
+
foreach($post_meta as $meta)
|
338 |
+
{
|
339 |
+
if(empty($new_post_meta[$meta->post_id]))
|
340 |
+
{
|
341 |
+
$new_post_meta[$meta->post_id] = array(
|
342 |
+
'autoopen' => array(
|
343 |
+
'modal_id' => NULL,
|
344 |
+
'type' => 'page-load',
|
345 |
+
'pageload' => array(
|
346 |
+
'delay' => NULL
|
347 |
+
),
|
348 |
+
'cookie' => array(
|
349 |
+
'time' => NULL,
|
350 |
+
'path' => ''
|
351 |
+
),
|
352 |
+
'scroll' => array(
|
353 |
+
'distance' => NULL
|
354 |
+
)
|
355 |
+
),
|
356 |
+
'autoexit' => array(
|
357 |
+
'modal_id' => NULL,
|
358 |
+
'cookie' => array(
|
359 |
+
'time' => NULL,
|
360 |
+
'path' => ''
|
361 |
+
)
|
362 |
+
),
|
363 |
+
'loginmodal' => array(
|
364 |
+
'force_login' => 0
|
365 |
+
),
|
366 |
+
);
|
367 |
+
}
|
368 |
+
switch($meta->meta_key)
|
369 |
+
{
|
370 |
+
case "easy_modal_post_autoExit_id": $new_post_meta[$meta->post_id]['autoexit']['modal_id'] = intval($meta->meta_value);
|
371 |
+
break;
|
372 |
+
case "easy_modal_post_autoExit_timer": $new_post_meta[$meta->post_id]['autoexit']['cookie']['time'] = is_float( $meta->meta_value ) || is_int( $meta->meta_value ) ? $meta->meta_value .' days' : $meta->meta_value;
|
373 |
+
break;
|
374 |
+
case "easy_modal_post_autoOpen_id": $new_post_meta[$meta->post_id]['autoopen']['modal_id'] = intval($meta->meta_value);
|
375 |
+
break;
|
376 |
+
case "easy_modal_post_autoOpen_timer": $new_post_meta[$meta->post_id]['autoopen']['cookie']['time'] = is_float( $meta->meta_value ) || is_int( $meta->meta_value ) ? $meta->meta_value .' days' : $meta->meta_value;
|
377 |
+
break;
|
378 |
+
case "easy_modal_post_autoOpen_delay": $new_post_meta[$meta->post_id]['autoopen']['pageload']['delay'] = intval($meta->meta_value);
|
379 |
+
break;
|
380 |
+
case "easy_modal_post_force_user_login": $new_post_meta[$meta->post_id]['autoopen']['modal_id'] = $meta->meta_value == 'true' ? 1 : 0;
|
381 |
+
break;
|
382 |
+
}
|
383 |
+
if($meta->meta_key != 'easy-modal_post_modals')
|
384 |
+
{
|
385 |
+
$delete_post_meta[] = $meta->meta_id;
|
386 |
+
}
|
387 |
+
}
|
388 |
+
foreach($new_post_meta as $post_id => $meta)
|
389 |
+
{
|
390 |
+
update_post_meta($post_id, 'easy-modal-pro_autoopen', $meta['autoopen']);
|
391 |
+
update_post_meta($post_id, 'easy-modal-pro-exit-modals_autoexit', $meta['autoexit']);
|
392 |
+
update_post_meta($post_id, 'easy-modal-pro-login-modals_loginmodal', $meta['loginmodal']);
|
393 |
+
}
|
394 |
+
emodal_update_option(EMCORE_SLUG.'_migration_approval', true);
|
395 |
+
}
|
396 |
+
|
397 |
+
|
398 |
+
public static function defaultSettings()
|
399 |
+
{
|
400 |
+
return array(
|
401 |
+
'autoOpen_id' => NULL,
|
402 |
+
'autoOpen_delay' => 500,
|
403 |
+
'autoOpen_timer' => "",
|
404 |
+
'autoExit_id' => NULL,
|
405 |
+
'autoExit_timer' => "",
|
406 |
+
'login_modal_enabled' => false,
|
407 |
+
'force_user_login' => false,
|
408 |
+
'registration_modal' => array(
|
409 |
+
'enable_password' => false,
|
410 |
+
'autologin' => false
|
411 |
+
)
|
412 |
+
);
|
413 |
+
}
|
414 |
+
public static function defaultThemeSettings()
|
415 |
+
{
|
416 |
+
return array(
|
417 |
+
'name' => 'change_me',
|
418 |
+
|
419 |
+
'overlayColor' => '#220E10',
|
420 |
+
'overlayOpacity' => '85',
|
421 |
+
|
422 |
+
'containerBgColor' => '#F7F5E7',
|
423 |
+
'containerPadding' => '10',
|
424 |
+
'containerBorderColor' => '#F0532B',
|
425 |
+
'containerBorderStyle' => 'solid',
|
426 |
+
'containerBorderWidth' => '1',
|
427 |
+
'containerBorderRadius' => '8',
|
428 |
+
'closeLocation' => 'inside',
|
429 |
+
'closeBgColor' => '#000000',
|
430 |
+
'closeFontColor' => '#F0532B',
|
431 |
+
'closeFontSize' => '15',
|
432 |
+
'closeBorderRadius' => '10',
|
433 |
+
'closeSize' => '20',
|
434 |
+
'closeText' => '×',
|
435 |
+
'closePosition' => 'topright',
|
436 |
+
|
437 |
+
'contentTitleFontColor' => '#F0532B',
|
438 |
+
'contentTitleFontSize' => '32',
|
439 |
+
'contentTitleFontFamily' => 'Tahoma',
|
440 |
+
'contentFontColor' => '#F0532B'
|
441 |
+
);
|
442 |
+
}
|
443 |
+
public static function defaultModalSettings()
|
444 |
+
{
|
445 |
+
return array(
|
446 |
+
'id' => '',
|
447 |
+
'name' => 'change_me',
|
448 |
+
'sitewide' => false,
|
449 |
+
'title' => '',
|
450 |
+
'content' => '',
|
451 |
+
|
452 |
+
'theme' => 1,
|
453 |
+
|
454 |
+
'size' => 'normal',
|
455 |
+
'userHeight' => 0,
|
456 |
+
'userHeightUnit' => 0,
|
457 |
+
'userWidth' => 0,
|
458 |
+
'userWidthUnit' => 0,
|
459 |
+
|
460 |
+
'animation' => 'fade',
|
461 |
+
'direction' => 'bottom',
|
462 |
+
'duration' => 350,
|
463 |
+
'overlayClose' => false,
|
464 |
+
'overlayEscClose' => false,
|
465 |
+
'closeDisabled' => false
|
466 |
+
);
|
467 |
+
}
|
468 |
+
public static function get_themes()
|
469 |
+
{
|
470 |
+
$themes = array();
|
471 |
+
$theme_list = get_option('EasyModal_ThemeList', array());
|
472 |
+
foreach($theme_list as $theme_id => $name)
|
473 |
+
{
|
474 |
+
$theme = self::get_theme($theme_id);
|
475 |
+
if($theme)
|
476 |
+
{
|
477 |
+
$themes[] = $theme;
|
478 |
+
}
|
479 |
+
}
|
480 |
+
return $themes;
|
481 |
+
}
|
482 |
+
public static function get_theme($theme_id)
|
483 |
+
{
|
484 |
+
if($theme = get_option('EasyModal_Theme-'.$theme_id))
|
485 |
+
{
|
486 |
+
return self::merge_existing(self::defaultThemeSettings(), $theme);
|
487 |
+
}
|
488 |
+
return false;
|
489 |
+
}
|
490 |
+
|
491 |
+
|
492 |
+
|
493 |
+
public static function get_modals()
|
494 |
+
{
|
495 |
+
$modals = array();
|
496 |
+
$modal_list = get_option('EasyModal_ModalList', array());
|
497 |
+
foreach($modal_list as $modal_id => $name)
|
498 |
+
{
|
499 |
+
$modal = self::get_modal($modal_id);
|
500 |
+
if($modal)
|
501 |
+
{
|
502 |
+
$modals[] = $modal;
|
503 |
+
}
|
504 |
+
}
|
505 |
+
if(self::get_settings('login_modal_enabled'))
|
506 |
+
{
|
507 |
+
$login = self::get_modal('Login');
|
508 |
+
$modals[] = $login;
|
509 |
+
|
510 |
+
$register = self::get_modal('Register');
|
511 |
+
$modals[] = $register;
|
512 |
+
|
513 |
+
$forgot = self::get_modal('Forgot');
|
514 |
+
$modals[] = $forgot;
|
515 |
+
}
|
516 |
+
return $modals;
|
517 |
+
}
|
518 |
+
public static function get_modal($modal_id)
|
519 |
+
{
|
520 |
+
if($modal = get_option('EasyModal_Modal-'.$modal_id))
|
521 |
+
{
|
522 |
+
return self::merge_existing(self::defaultModalSettings(), $modal);
|
523 |
+
}
|
524 |
+
return false;
|
525 |
+
}
|
526 |
+
public static function get_settings($key = NULL)
|
527 |
+
{
|
528 |
+
$settings = get_option('EasyModal_Settings');
|
529 |
+
return $key ? !empty($settings[$key]) ? $settings[$key] : false : self::merge_existing(self::defaultSettings(), $settings);
|
530 |
+
}
|
531 |
+
public static function get_license()
|
532 |
+
{
|
533 |
+
return get_option('EasyModal_License');
|
534 |
+
}
|
535 |
+
|
536 |
+
public static function delete_all()
|
537 |
+
{
|
538 |
+
foreach(self::get_themes() as $theme)
|
539 |
+
{
|
540 |
+
delete_option('EasyModal_Theme-'.$theme['id']);
|
541 |
+
}
|
542 |
+
delete_option('EasyModal_ThemeList');
|
543 |
+
|
544 |
+
foreach(self::get_modals() as $modal)
|
545 |
+
{
|
546 |
+
delete_option('EasyModal_Modal-'.$modal['id']);
|
547 |
+
}
|
548 |
+
delete_option('EasyModal_ModalList');
|
549 |
+
|
550 |
+
delete_option('EasyModal_Settings');
|
551 |
+
|
552 |
+
delete_option('EasyModal_License');
|
553 |
+
delete_option('EasyModal_License_Status');
|
554 |
+
delete_option('EasyModal_License_LastChecked');
|
555 |
+
delete_option('EasyModal_Version');
|
556 |
+
|
557 |
+
emodal_delete_option(EMCORE_SLUG.'_migration_approval');
|
558 |
+
emodal_delete_option(EMCORE_SLUG.'_migration_approved');
|
559 |
+
}
|
560 |
+
|
561 |
+
public static function merge_existing($array1, $array2)
|
562 |
+
{
|
563 |
+
if(!is_array($array1) || !is_array($array2))
|
564 |
+
return false;
|
565 |
+
|
566 |
+
foreach($array2 as $key => $val)
|
567 |
+
{
|
568 |
+
$array1[$key] = $val;
|
569 |
+
}
|
570 |
+
return $array1;
|
571 |
+
}
|
572 |
+
}
|
classes/modals.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class EModal_Modals {
|
3 |
+
public static $preloaded = false;
|
4 |
+
public static $enqueued_modals = array();
|
5 |
+
public static $loaded_modals = array();
|
6 |
+
public static function factory()
|
7 |
+
{
|
8 |
+
|
9 |
+
global $wp_query;
|
10 |
+
if(!empty($wp_query->post->ID) && $post_id = $wp_query->post->ID)
|
11 |
+
{
|
12 |
+
$post_modals = get_post_meta($post_id, EMCORE_SLUG.'_post_modals', true);
|
13 |
+
if(is_array($post_modals))
|
14 |
+
foreach($post_modals as $modal)
|
15 |
+
self::enqueue_modal($modal);
|
16 |
+
}
|
17 |
+
self::preload_modals();
|
18 |
+
}
|
19 |
+
public static function enqueue_modal($id)
|
20 |
+
{
|
21 |
+
if(is_int(intval($id))) self::$enqueued_modals[] = intval($id);
|
22 |
+
}
|
23 |
+
public static function get_enqueued_modals()
|
24 |
+
{
|
25 |
+
return apply_filters('emodal_get_enqueued_modal_list', self::$enqueued_modals);
|
26 |
+
}
|
27 |
+
public static function preload_modals()
|
28 |
+
{
|
29 |
+
$ids = implode(',', self::get_enqueued_modals());
|
30 |
+
foreach(get_all_modals("is_active = 1 AND is_trash = 0 AND (is_sitewide = 1". (!empty($ids) ? " OR id IN ($ids)" : "") .")" ) as $modal)
|
31 |
+
{
|
32 |
+
self::$loaded_modals[$modal->id] = apply_filters('emodal_load_modal_settings', $modal->as_array());
|
33 |
+
do_action('emodal_preload_modal', $modal);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
public static function load_modals()
|
37 |
+
{
|
38 |
+
foreach(self::get_enqueued_modals() as $id)
|
39 |
+
{
|
40 |
+
if(!array_key_exists($id, self::$loaded_modals))
|
41 |
+
{
|
42 |
+
foreach(get_all_modals("is_active = 1 AND is_trash = 0 AND id IN ($ids)") as $modal)
|
43 |
+
{
|
44 |
+
self::$loaded_modals[$modal->id] = apply_filters('emodal_load_modal_settings', $modal->as_array());
|
45 |
+
do_action('emodal_preload_modal', $modal);
|
46 |
+
do_action('emodal_load_modal', $modal);
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
50 |
+
}
|
51 |
+
public static function print_modals()
|
52 |
+
{
|
53 |
+
self::load_modals();
|
54 |
+
foreach(apply_filters('emodal_print_modals', self::$loaded_modals) as $id => $modal)
|
55 |
+
{
|
56 |
+
$view = new EModal_View_Modal;
|
57 |
+
$view->set('modal',$modal);
|
58 |
+
$view->render();
|
59 |
+
}
|
60 |
+
}
|
61 |
+
}
|
classes/model.php
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Model {
|
2 |
+
protected $_table_name = '';
|
3 |
+
protected $_pk = 'id';
|
4 |
+
protected $_data = array();
|
5 |
+
protected $_default_fields = array();
|
6 |
+
protected $_state = NULL;
|
7 |
+
public function __construct($id = NULL, $limit = 1)
|
8 |
+
{
|
9 |
+
global $wpdb;
|
10 |
+
$table_name = $wpdb->prefix . $this->_table_name;
|
11 |
+
$class_name = strtolower(get_called_class());
|
12 |
+
|
13 |
+
$this->_data = apply_filters("{$class_name}_fields", $this->_default_fields);
|
14 |
+
|
15 |
+
if($id && is_numeric($id))
|
16 |
+
{
|
17 |
+
$row = $wpdb->get_row("SELECT * FROM $table_name WHERE $this->_pk = $id LIMIT 1", ARRAY_A);
|
18 |
+
if($row[$this->_pk])
|
19 |
+
{
|
20 |
+
$this->process_load($row);
|
21 |
+
}
|
22 |
+
}
|
23 |
+
else
|
24 |
+
{
|
25 |
+
$this->set_fields(apply_filters("{$class_name}_defaults", array()));
|
26 |
+
}
|
27 |
+
return $this;
|
28 |
+
}
|
29 |
+
public function load($query = NULL)
|
30 |
+
{
|
31 |
+
global $wpdb;
|
32 |
+
$table_name = $wpdb->prefix . $this->_table_name;
|
33 |
+
$class_name = strtolower(get_called_class());
|
34 |
+
if(!$query)
|
35 |
+
{
|
36 |
+
$query = "SELECT * FROM $table_name";
|
37 |
+
}
|
38 |
+
$rows = $wpdb->get_results($query, ARRAY_A);
|
39 |
+
if(!empty($rows))
|
40 |
+
{
|
41 |
+
$results = array();
|
42 |
+
foreach($rows as $row)
|
43 |
+
{
|
44 |
+
$model = new $class_name;
|
45 |
+
$model->process_load($row);
|
46 |
+
$results[] = $model;
|
47 |
+
}
|
48 |
+
return $results;
|
49 |
+
}
|
50 |
+
return array();
|
51 |
+
}
|
52 |
+
public function save()
|
53 |
+
{
|
54 |
+
global $wpdb;
|
55 |
+
$table_name = $wpdb->prefix . $this->_table_name;
|
56 |
+
if($this->id)
|
57 |
+
{
|
58 |
+
if(!$wpdb->update( $table_name, $this->serialized_values(), array($this->_pk => $this->{$this->_pk})))
|
59 |
+
{
|
60 |
+
$wpdb->insert( $table_name, $this->serialized_values());
|
61 |
+
$this->id = $wpdb->insert_id;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
else
|
65 |
+
{
|
66 |
+
$wpdb->insert( $table_name, $this->serialized_values());
|
67 |
+
$this->id = $wpdb->insert_id;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
public function delete()
|
71 |
+
{
|
72 |
+
global $wpdb;
|
73 |
+
$table_name = $wpdb->prefix . $this->_table_name;
|
74 |
+
return $wpdb->delete( $table_name, array($this->_pk => $this->{$this->_pk}));
|
75 |
+
}
|
76 |
+
|
77 |
+
public function as_array()
|
78 |
+
{
|
79 |
+
$values = $this->_data;
|
80 |
+
foreach($values as $key => $value)
|
81 |
+
{
|
82 |
+
$values[$key] = $this->$key;
|
83 |
+
}
|
84 |
+
return $values;
|
85 |
+
}
|
86 |
+
public function process_load($data)
|
87 |
+
{
|
88 |
+
foreach($data as $key => $val)
|
89 |
+
{
|
90 |
+
if(array_key_exists($key, $this->_data))
|
91 |
+
{
|
92 |
+
$this->$key = maybe_unserialize($val);
|
93 |
+
}
|
94 |
+
}
|
95 |
+
}
|
96 |
+
public function serialized_values()
|
97 |
+
{
|
98 |
+
$values = $this->_data;
|
99 |
+
|
100 |
+
foreach($values as $key => $value)
|
101 |
+
{
|
102 |
+
if($key != 'id')
|
103 |
+
$values[$key] = maybe_serialize($this->$key);
|
104 |
+
}
|
105 |
+
return $values;
|
106 |
+
}
|
107 |
+
public function __get($key)
|
108 |
+
{
|
109 |
+
if(array_key_exists($key, $this->_data))
|
110 |
+
{
|
111 |
+
return $this->_data[$key];
|
112 |
+
}
|
113 |
+
elseif($key == 'id')
|
114 |
+
{
|
115 |
+
if(array_key_exists($this->_pk, $this->_data))
|
116 |
+
{
|
117 |
+
return $this->_data[$this->_pk];
|
118 |
+
}
|
119 |
+
}
|
120 |
+
}
|
121 |
+
public function __set($key, $value)
|
122 |
+
{
|
123 |
+
if(array_key_exists($key, $this->_data))
|
124 |
+
{
|
125 |
+
$this->_data[$key] = $value;
|
126 |
+
return;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
public function __isset($name)
|
130 |
+
{
|
131 |
+
return isset($this->_data[$name]);
|
132 |
+
}
|
133 |
+
|
134 |
+
public function fields()
|
135 |
+
{
|
136 |
+
return array_keys($this->_data);
|
137 |
+
}
|
138 |
+
public function set_fields(array $data)
|
139 |
+
{
|
140 |
+
foreach($data as $key => $val)
|
141 |
+
{
|
142 |
+
if(array_key_exists($key, $this->_data))
|
143 |
+
{
|
144 |
+
if(is_array($this->$key) && is_array($val))
|
145 |
+
{
|
146 |
+
$this->$key = array_replace_recursive($this->$key, $val);
|
147 |
+
}
|
148 |
+
else
|
149 |
+
{
|
150 |
+
$this->$key = $val;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
// Array Access Interface
|
157 |
+
public function offsetExists($key)
|
158 |
+
{
|
159 |
+
return array_key_exists($key, $this->as_array());
|
160 |
+
}
|
161 |
+
public function offsetSet($key, $value)
|
162 |
+
{
|
163 |
+
$this->__set($key, $value);
|
164 |
+
}
|
165 |
+
public function offsetGet($key)
|
166 |
+
{
|
167 |
+
return $this->$key;
|
168 |
+
}
|
169 |
+
public function offsetUnset($key)
|
170 |
+
{
|
171 |
+
$this->_data[$key] = NULL;
|
172 |
+
}
|
173 |
+
}
|
classes/model/modal.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Model_Modal extends EModal_Model {
|
2 |
+
protected $_table_name = 'em_modals';
|
3 |
+
protected $meta;
|
4 |
+
protected $_default_fields = array(
|
5 |
+
'id' => NULL,
|
6 |
+
'theme_id' => 1,
|
7 |
+
'name' => '',
|
8 |
+
'title' => '',
|
9 |
+
'content' => '',
|
10 |
+
'created' => '0000-00-00 00:00:00',
|
11 |
+
'modified' => '0000-00-00 00:00:00',
|
12 |
+
'is_sitewide' => 0,
|
13 |
+
'is_system' => 0,
|
14 |
+
'is_active' => 1,
|
15 |
+
'is_trash' => 0
|
16 |
+
);
|
17 |
+
public function __construct($id = NULL)
|
18 |
+
{
|
19 |
+
parent::__construct($id);
|
20 |
+
$this->load_meta();
|
21 |
+
return $this;
|
22 |
+
}
|
23 |
+
public function __get($key)
|
24 |
+
{
|
25 |
+
if($key == 'meta')
|
26 |
+
return $this->meta;
|
27 |
+
else
|
28 |
+
return parent::__get($key);
|
29 |
+
}
|
30 |
+
public function save()
|
31 |
+
{
|
32 |
+
if(!$this->id)
|
33 |
+
$this->created = date('Y-m-d H:i:s');
|
34 |
+
$this->modified = date('Y-m-d H:i:s');
|
35 |
+
parent::save();
|
36 |
+
$this->meta->modal_id = $this->id;
|
37 |
+
$this->meta->save();
|
38 |
+
}
|
39 |
+
public function load_meta()
|
40 |
+
{
|
41 |
+
if(empty($this->meta))
|
42 |
+
$this->meta = new EModal_Model_Modal_Meta($this->id);
|
43 |
+
return $this->meta;
|
44 |
+
}
|
45 |
+
public function as_array()
|
46 |
+
{
|
47 |
+
$array = parent::as_array();
|
48 |
+
$array['meta'] = $this->meta->as_array();
|
49 |
+
return $array;
|
50 |
+
}
|
51 |
+
public function set_fields(array $data)
|
52 |
+
{
|
53 |
+
if(!empty($data['meta']))
|
54 |
+
$this->meta->set_fields($data['meta']);
|
55 |
+
parent::set_fields($data);
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
if(!function_exists("get_all_modals")){
|
60 |
+
function get_all_modals($where = "is_active = 1"){
|
61 |
+
global $wpdb;
|
62 |
+
$modals = array();
|
63 |
+
$modal_ids = array();
|
64 |
+
$EModal_Model_Modal = new EModal_Model_Modal;
|
65 |
+
$EModal_Model_Modal_Meta = new EModal_Model_Modal_Meta;
|
66 |
+
foreach($EModal_Model_Modal->load("SELECT * FROM {$wpdb->prefix}em_modals". ($where ? " WHERE ".$where : '')) as $modal)
|
67 |
+
{
|
68 |
+
$modals[$modal->id] = $modal;
|
69 |
+
$modal_ids[] = $modal->id;
|
70 |
+
}
|
71 |
+
foreach($EModal_Model_Modal_Meta->load("SELECT * FROM {$wpdb->prefix}em_modal_metas WHERE modal_id IN (".implode(',', $modal_ids).")") as $meta)
|
72 |
+
{
|
73 |
+
$modals[$meta->modal_id]->meta->process_load($meta->as_array());
|
74 |
+
}
|
75 |
+
return $modals;
|
76 |
+
}}
|
77 |
+
|
78 |
+
if(!function_exists("get_current_modal")){
|
79 |
+
function get_current_modal($key = NULL){
|
80 |
+
global $current_modal;
|
81 |
+
if(!$key)
|
82 |
+
return $current_modal;
|
83 |
+
else {
|
84 |
+
$values = $current_modal->as_array();
|
85 |
+
return emresolve($values, $key, false);
|
86 |
+
}
|
87 |
+
}}
|
88 |
+
|
89 |
+
if(!function_exists("get_current_modal_id")){
|
90 |
+
function get_current_modal_id(){
|
91 |
+
global $current_modal;
|
92 |
+
return $current_modal ? $current_modal->id : NULL;
|
93 |
+
}}
|
94 |
+
|
95 |
+
if(!function_exists("count_all_modals")){
|
96 |
+
function count_all_modals(){
|
97 |
+
global $wpdb;
|
98 |
+
return (int) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}em_modals WHERE is_trash = 0" );
|
99 |
+
}}
|
100 |
+
|
101 |
+
if(!function_exists("count_deleted_modals")){
|
102 |
+
function count_deleted_modals(){
|
103 |
+
global $wpdb;
|
104 |
+
return (int) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}em_modals WHERE is_trash = 1" );
|
105 |
+
}}
|
classes/model/modal/meta.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Model_Modal_Meta extends EModal_Model {
|
2 |
+
protected $_table_name = 'em_modal_metas';
|
3 |
+
protected $_pk = 'modal_id';
|
4 |
+
protected $_default_fields = array(
|
5 |
+
'id' => NULL,
|
6 |
+
'modal_id' => NULL,
|
7 |
+
'display' => array(),
|
8 |
+
'close' => array(),
|
9 |
+
);
|
10 |
+
public function __construct($id = NULL)
|
11 |
+
{
|
12 |
+
$this->_default_fields['modal_id'] = $id;
|
13 |
+
return parent::__construct($id);
|
14 |
+
}
|
15 |
+
}
|
classes/model/theme.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Model_Theme extends EModal_Model {
|
2 |
+
protected $_table_name = 'em_themes';
|
3 |
+
protected $meta;
|
4 |
+
protected $_default_fields = array(
|
5 |
+
'id' => NULL,
|
6 |
+
'name' => 'Default',
|
7 |
+
'created' => '0000-00-00 00:00:00',
|
8 |
+
'modified' => '0000-00-00 00:00:00',
|
9 |
+
'is_system' => 0,
|
10 |
+
'is_active' => 1,
|
11 |
+
'is_trash' => 0
|
12 |
+
);
|
13 |
+
public function __construct($id = NULL)
|
14 |
+
{
|
15 |
+
parent::__construct($id);
|
16 |
+
$this->load_meta();
|
17 |
+
return $this;
|
18 |
+
}
|
19 |
+
public function __get($key)
|
20 |
+
{
|
21 |
+
if($key == 'meta')
|
22 |
+
return $this->meta;
|
23 |
+
else
|
24 |
+
return parent::__get($key);
|
25 |
+
}
|
26 |
+
public function save()
|
27 |
+
{
|
28 |
+
if(!$this->id)
|
29 |
+
$this->created = date('Y-m-d H:i:s');
|
30 |
+
$this->modified = date('Y-m-d H:i:s');
|
31 |
+
parent::save();
|
32 |
+
$this->meta->theme_id = $this->id;
|
33 |
+
$this->meta->save();
|
34 |
+
}
|
35 |
+
public function load_meta()
|
36 |
+
{
|
37 |
+
if(empty($this->meta))
|
38 |
+
$this->meta = new EModal_Model_Theme_Meta($this->id);
|
39 |
+
return $this->meta;
|
40 |
+
}
|
41 |
+
public function as_array()
|
42 |
+
{
|
43 |
+
$array = parent::as_array();
|
44 |
+
$array['meta'] = $this->meta->as_array();
|
45 |
+
return $array;
|
46 |
+
}
|
47 |
+
public function set_fields(array $data)
|
48 |
+
{
|
49 |
+
if(!empty($data['meta']))
|
50 |
+
{
|
51 |
+
$this->meta->set_fields($data['meta']);
|
52 |
+
unset($data['meta']);
|
53 |
+
}
|
54 |
+
parent::set_fields($data);
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
if(!function_exists("get_all_modal_themes")){
|
59 |
+
function get_all_modal_themes($where = "is_active = 1"){
|
60 |
+
global $wpdb;
|
61 |
+
|
62 |
+
$themes = array();
|
63 |
+
$theme_ids = array();
|
64 |
+
$EModal_Model_Theme = new EModal_Model_Theme;
|
65 |
+
$EModal_Model_Theme_Meta = new EModal_Model_Theme_Meta;
|
66 |
+
foreach($EModal_Model_Theme->load("SELECT * FROM {$wpdb->prefix}em_themes". ($where ? " WHERE ".$where : '')) as $theme)
|
67 |
+
{
|
68 |
+
$themes[$theme->id] = $theme;
|
69 |
+
$theme_ids[] = $theme->id;
|
70 |
+
}
|
71 |
+
foreach($EModal_Model_Theme_Meta->load("SELECT * FROM {$wpdb->prefix}em_theme_metas WHERE theme_id IN (".implode(',', $theme_ids).")") as $meta)
|
72 |
+
{
|
73 |
+
$themes[$meta->theme_id]->meta->process_load($meta->as_array());
|
74 |
+
}
|
75 |
+
return $themes;
|
76 |
+
}}
|
77 |
+
|
78 |
+
if(!function_exists("get_current_modal_theme")){
|
79 |
+
function get_current_modal_theme($key = NULL){
|
80 |
+
global $current_theme;
|
81 |
+
if(!$key)
|
82 |
+
return $current_theme;
|
83 |
+
else {
|
84 |
+
$values = $current_theme->as_array();
|
85 |
+
return emresolve($values, $key, false);
|
86 |
+
}
|
87 |
+
}}
|
88 |
+
|
89 |
+
if(!function_exists("get_current_modal_theme_id")){
|
90 |
+
function get_current_modal_theme_id(){
|
91 |
+
global $current_theme;
|
92 |
+
return $current_theme->id;
|
93 |
+
}}
|
94 |
+
|
95 |
+
|
96 |
+
if(!function_exists("count_all_modal_themes")){
|
97 |
+
function count_all_modal_themes(){
|
98 |
+
global $wpdb;
|
99 |
+
return (int) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}em_themes WHERE is_trash = 0" );
|
100 |
+
}}
|
101 |
+
|
102 |
+
if(!function_exists("count_deleted_modal_themes")){
|
103 |
+
function count_deleted_modal_themes(){
|
104 |
+
global $wpdb;
|
105 |
+
return (int) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}em_themes WHERE is_trash = 1" );
|
106 |
+
}}
|
classes/model/theme/meta.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_Model_Theme_Meta extends EModal_Model {
|
2 |
+
protected $_table_name = 'em_theme_metas';
|
3 |
+
protected $_pk = 'theme_id';
|
4 |
+
protected $_default_fields = array(
|
5 |
+
'id' => NULL,
|
6 |
+
'theme_id' => NULL,
|
7 |
+
'overlay' => array(),
|
8 |
+
'container' => array(),
|
9 |
+
'close' => array(),
|
10 |
+
'title' => array(),
|
11 |
+
'content' => array(),
|
12 |
+
);
|
13 |
+
public function __construct($id = NULL)
|
14 |
+
{
|
15 |
+
$this->_default_fields['theme_id'] = $id;
|
16 |
+
return parent::__construct($id);
|
17 |
+
}
|
18 |
+
}
|
classes/site.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class EModal_Site {
|
3 |
+
public function __construct()
|
4 |
+
{
|
5 |
+
add_action('wp_head', array('EModal_Modals', 'factory'), 1000);
|
6 |
+
add_action('wp_footer', array('EModal_Modals', 'print_modals'), 1);
|
7 |
+
add_action('wp_enqueue_scripts', array($this, 'styles'), 0);
|
8 |
+
add_action('wp_enqueue_scripts', array($this, 'scripts'), 0);
|
9 |
+
}
|
10 |
+
public function styles()
|
11 |
+
{
|
12 |
+
wp_enqueue_style(EMCORE_SLUG.'-site', EMCORE_URL.'/assets/styles/'.EMCORE_SLUG.'-site.css', false, 0.1);
|
13 |
+
}
|
14 |
+
public function scripts()
|
15 |
+
{
|
16 |
+
wp_register_script( 'jquery-transit', EMCORE_URL.'/assets/scripts/jquery.transit.min.js', array('jquery'), '0.9.11', true );
|
17 |
+
wp_enqueue_script(EMCORE_SLUG.'-site', EMCORE_URL.'/assets/scripts/'.EMCORE_SLUG.'-site.js', array('jquery', 'jquery-ui-position', 'jquery-transit'), '2', true);
|
18 |
+
$themes = array();
|
19 |
+
foreach(get_all_modal_themes() as $theme)
|
20 |
+
{
|
21 |
+
$meta = $theme->as_array();
|
22 |
+
$themes[$theme->id] = $meta['meta'];
|
23 |
+
//unset($themes[$theme->id]['id'], $themes[$theme->id]['theme_id']);
|
24 |
+
}
|
25 |
+
wp_localize_script(EMCORE_SLUG.'-site', 'emodal_themes', array('l10n_print_after' => 'emodal_themes = ' . json_encode($themes) . ';'));
|
26 |
+
}
|
27 |
+
}
|
classes/view.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_View {
|
2 |
+
protected $file;
|
3 |
+
protected $values = array();
|
4 |
+
public function set($key, $value) {
|
5 |
+
$this->values[$key] = $value;
|
6 |
+
}
|
7 |
+
public function output(){}
|
8 |
+
public function render()
|
9 |
+
{
|
10 |
+
$this->pre_render();
|
11 |
+
$this->output();
|
12 |
+
$this->post_render();
|
13 |
+
}
|
14 |
+
public function pre_render(){}
|
15 |
+
public function post_render(){}
|
16 |
+
}
|
classes/view/admin/addons.php
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_View_Admin_Addons extends EModal_View {
|
2 |
+
public function output()
|
3 |
+
{
|
4 |
+
extract($this->values);?>
|
5 |
+
<div class="wrap">
|
6 |
+
<h2><?php esc_html_e(__($title, EMCORE_SLUG) );?></h2>
|
7 |
+
<div id="poststuff">
|
8 |
+
<div id="post-body" class="metabox-holder columns-2">
|
9 |
+
<div id="post-body-content"><?php
|
10 |
+
$addons = EModal_License::available_addons();?>
|
11 |
+
<ul class="addons-available">
|
12 |
+
<?php
|
13 |
+
$plugins = get_plugins();
|
14 |
+
$installed_plugins = array();
|
15 |
+
foreach($plugins as $key => $plugin){
|
16 |
+
$is_active = is_plugin_active($key);
|
17 |
+
$installed_plugin = array(
|
18 |
+
'is_active' => $is_active
|
19 |
+
);
|
20 |
+
$installerUrl = add_query_arg(
|
21 |
+
array(
|
22 |
+
'action' => 'activate',
|
23 |
+
'plugin' => $key,
|
24 |
+
'em' => 1
|
25 |
+
),
|
26 |
+
network_admin_url('plugins.php')
|
27 |
+
//admin_url('update.php')
|
28 |
+
);
|
29 |
+
$installed_plugin["activation_url"] = $is_active ? "" : wp_nonce_url($installerUrl, 'activate-plugin_' . $key);
|
30 |
+
|
31 |
+
|
32 |
+
$installerUrl = add_query_arg(
|
33 |
+
array(
|
34 |
+
'action' => 'deactivate',
|
35 |
+
'plugin' => $key,
|
36 |
+
'em' => 1
|
37 |
+
),
|
38 |
+
network_admin_url('plugins.php')
|
39 |
+
//admin_url('update.php')
|
40 |
+
);
|
41 |
+
$installed_plugin["deactivation_url"] = !$is_active ? "" : wp_nonce_url($installerUrl, 'deactivate-plugin_' . $key);
|
42 |
+
$installed_plugins[$key] = $installed_plugin;
|
43 |
+
}
|
44 |
+
|
45 |
+
foreach($addons as $addon) :?>
|
46 |
+
<li class="available-addon-inner">
|
47 |
+
<h3><?php esc_html_e($addon->name)?></h3>
|
48 |
+
<img class="addon-thumbnail" src="<?php esc_attr_e($addon->image_url)?>">
|
49 |
+
<p><?php esc_html_e($addon->addon_description)?></p>
|
50 |
+
<hr/><?php
|
51 |
+
if(!empty($addon->download_url) && !isset($installed_plugins[$addon->slug.'/'.$addon->slug.'.php']))
|
52 |
+
{
|
53 |
+
$installerUrl = add_query_arg(
|
54 |
+
array(
|
55 |
+
'action' => 'install-plugin',
|
56 |
+
'plugin' => $addon->slug,
|
57 |
+
'em' => 1
|
58 |
+
),
|
59 |
+
network_admin_url('update.php')
|
60 |
+
//admin_url('update.php')
|
61 |
+
);
|
62 |
+
$installerUrl = wp_nonce_url($installerUrl, 'install-plugin_' . $addon->slug)?>
|
63 |
+
<span class="action-links"><?php
|
64 |
+
printf(
|
65 |
+
'<a class="button install" href="%s">%s</a>',
|
66 |
+
esc_attr($installerUrl),
|
67 |
+
__('Install', EMCORE_SLUG)
|
68 |
+
);?>
|
69 |
+
</span><?php
|
70 |
+
}
|
71 |
+
elseif(isset($installed_plugins[$addon->slug.'/'.$addon->slug.'.php']['is_active']))
|
72 |
+
{?>
|
73 |
+
<span class="action-links"><?php
|
74 |
+
if(!$installed_plugins[$addon->slug.'/'.$addon->slug.'.php']['is_active'])
|
75 |
+
{
|
76 |
+
printf(
|
77 |
+
'<a class="button install" href="%s">%s</a>',
|
78 |
+
esc_attr($installed_plugins[$addon->slug.'/'.$addon->slug.'.php']["activation_url"]),
|
79 |
+
__('Activate', EMCORE_SLUG)
|
80 |
+
);
|
81 |
+
|
82 |
+
}
|
83 |
+
else
|
84 |
+
{
|
85 |
+
printf(
|
86 |
+
'<a class="button install" href="%s">%s</a>',
|
87 |
+
esc_attr($installed_plugins[$addon->slug.'/'.$addon->slug.'.php']["deactivation_url"]),
|
88 |
+
__('Deactivate', EMCORE_SLUG)
|
89 |
+
);
|
90 |
+
}?>
|
91 |
+
</span><?php
|
92 |
+
}
|
93 |
+
else
|
94 |
+
{
|
95 |
+
?><div class="addon-upgrade"><span class="action-links"><?php
|
96 |
+
if($addon->required_license == 'developer')
|
97 |
+
{
|
98 |
+
_e('This add on requires a Pro Developer License.', EMCORE_SLUG);
|
99 |
+
}
|
100 |
+
else
|
101 |
+
{
|
102 |
+
_e('This add on requires a Pro License.', EMCORE_SLUG);
|
103 |
+
}
|
104 |
+
?></span></div>
|
105 |
+
<span class="action-links"><a class="button" target="_blank" href="https://easy-modal.com/pricing"><?php _e('Upgrade', EMCORE_SLUG);?></a></span><?php
|
106 |
+
}?>
|
107 |
+
<a href="<?php echo esc_url($addon->homepage);?>" target="_blank"><?php _e('View the entire Add On Specs', EMCORE_SLUG);?></a>
|
108 |
+
</li>
|
109 |
+
<?php endforeach;?>
|
110 |
+
</ul>
|
111 |
+
</div>
|
112 |
+
<div id="postbox-container-1" class="postbox-container">
|
113 |
+
<div class="meta-box-sortables ui-sortable" id="side-sortables">
|
114 |
+
<?php do_action('emodal_admin_sidebar');?>
|
115 |
+
</div>
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
<br class="clear"/>
|
119 |
+
</div>
|
120 |
+
</div><?php
|
121 |
+
}
|
122 |
+
}
|
classes/view/admin/help.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_View_Admin_Help extends EModal_View {
|
2 |
+
public function output()
|
3 |
+
{
|
4 |
+
extract($this->values);?>
|
5 |
+
<div class="wrap">
|
6 |
+
<h2><?php esc_html_e(__($title, EMCORE_SLUG) );?></h2>
|
7 |
+
<h2 id="emodal-tabs" class="nav-tab-wrapper">
|
8 |
+
<?php foreach($tabs as $tab){ ?>
|
9 |
+
<a href="#<?php echo $tab['id']?>" id="<?php echo $tab['id']?>-tab" class="nav-tab emodal-tab"><?php echo $tab['label'];?></a>
|
10 |
+
<?php } ?>
|
11 |
+
</h2>
|
12 |
+
<div id="poststuff">
|
13 |
+
<div id="post-body" class="metabox-holder columns-2">
|
14 |
+
<div id="post-body-content">
|
15 |
+
<div class="tabwrapper">
|
16 |
+
<?php foreach($tabs as $tab){ ?>
|
17 |
+
<div id="<?php echo $tab['id']?>" class="emodal-tab-content">
|
18 |
+
<?php do_action('emodal_admin_help_tab_'.$tab['id'])?>
|
19 |
+
</div>
|
20 |
+
<?php } ?>
|
21 |
+
</div>
|
22 |
+
</div>
|
23 |
+
<div id="postbox-container-1" class="postbox-container">
|
24 |
+
<div class="meta-box-sortables ui-sortable" id="side-sortables">
|
25 |
+
<?php do_action('emodal_admin_sidebar');?>
|
26 |
+
</div>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
<br class="clear"/>
|
30 |
+
</div>
|
31 |
+
</div><?php
|
32 |
+
}
|
33 |
+
}
|
classes/view/admin/modal/form.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_View_Admin_Modal_Form extends EModal_View {
|
2 |
+
public function output()
|
3 |
+
{
|
4 |
+
extract($this->values)
|
5 |
+
?><div class="wrap">
|
6 |
+
<h2><?php
|
7 |
+
esc_html_e($title );
|
8 |
+
if(!empty($modal_new_url))
|
9 |
+
echo ' <a href="' . esc_url( $modal_new_url ) . '" class="add-new-h2">' . __('Add New', EMCORE_SLUG) . '</a>';
|
10 |
+
?></h2>
|
11 |
+
<h2 id="emodal-tabs" class="nav-tab-wrapper">
|
12 |
+
<?php foreach($tabs as $tab){ ?>
|
13 |
+
<a href="#<?php echo $tab['id']?>" id="<?php echo $tab['id']?>-tab" class="nav-tab emodal-tab"><?php echo $tab['label'];?></a>
|
14 |
+
<?php } ?>
|
15 |
+
</h2>
|
16 |
+
<form id="emodal-modal-editor" method="post" action="">
|
17 |
+
<?php do_action('emodal_form_nonce');?>
|
18 |
+
<?php wp_nonce_field( EMCORE_NONCE, EMCORE_NONCE);?>
|
19 |
+
<div id="poststuff">
|
20 |
+
<div id="post-body" class="metabox-holder columns-2">
|
21 |
+
<div id="post-body-content">
|
22 |
+
<div class="tabwrapper">
|
23 |
+
<?php foreach($tabs as $tab){ ?>
|
24 |
+
<div id="<?php echo $tab['id']?>" class="emodal-tab-content">
|
25 |
+
<?php do_action('emodal_admin_modal_form_tab_'.$tab['id'])?>
|
26 |
+
</div>
|
27 |
+
<?php } ?>
|
28 |
+
</div>
|
29 |
+
</div>
|
30 |
+
<div id="postbox-container-1" class="postbox-container">
|
31 |
+
<div class="meta-box-sortables ui-sortable" id="side-sortables">
|
32 |
+
<div class="postbox " id="submitdiv">
|
33 |
+
<div title="Click to toggle" class="handlediv"><br></div>
|
34 |
+
<h3 class="hndle"><span><?php _e('Publish', EMCORE_SLUG);?></span></h3>
|
35 |
+
<div class="inside">
|
36 |
+
<div id="submitpost" class="submitbox">
|
37 |
+
<div id="minor-publishing">
|
38 |
+
<div id="minor-publishing-actions">
|
39 |
+
<div id="save-action">
|
40 |
+
<a id="save-post" href="<?php echo esc_url( emodal_admin_url() .'&action=clone&id='. get_current_modal_id() .'&'. EMCORE_NONCE .'='. wp_create_nonce(EMCORE_NONCE) )?>" class="button"><?php _e('Clone', EMCORE_SLUG);?></a>
|
41 |
+
<span class="spinner"></span>
|
42 |
+
</div>
|
43 |
+
<div id="preview-action">
|
44 |
+
<a id="post-preview" href="#" class="preview button"><?php _e('Preview', EMCORE_SLUG);?></a>
|
45 |
+
<input type="hidden" value="" id="wp-preview" name="wp-preview">
|
46 |
+
</div>
|
47 |
+
<div class="clear"></div>
|
48 |
+
</div><!-- #minor-publishing-actions -->
|
49 |
+
</div>
|
50 |
+
<br/>
|
51 |
+
<div id="major-publishing-actions" class="submitbox">
|
52 |
+
<div id="delete-action">
|
53 |
+
<a href="<?php echo esc_url( emodal_admin_url() .'&action=delete&id[]='. get_current_modal_id() .'&'. EMCORE_NONCE .'='. wp_create_nonce(EMCORE_NONCE) )?>" class="submitdelete deletion"><?php _e('Move to Trash', EMCORE_SLUG);?></a>
|
54 |
+
</div>
|
55 |
+
|
56 |
+
<div id="publishing-action">
|
57 |
+
<span class="spinner"></span>
|
58 |
+
<input type="submit" accesskey="p" value="<?php _e('Publish', EMCORE_SLUG);?>" class="button button-primary button-large" id="publish" name="publish">
|
59 |
+
</div>
|
60 |
+
<div class="clear"></div>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
<div class="clear"></div>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<?php do_action('emodal_admin_sidebar');?>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
</div>
|
70 |
+
<br class="clear"/>
|
71 |
+
</div>
|
72 |
+
</form>
|
73 |
+
</div><?php
|
74 |
+
}
|
75 |
+
}
|
classes/view/admin/modal/index.php
ADDED
@@ -0,0 +1,260 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_View_Admin_Modal_Index extends EModal_View {
|
2 |
+
public function output()
|
3 |
+
{
|
4 |
+
extract($this->values);?>
|
5 |
+
<div class="wrap">
|
6 |
+
<h2><?php
|
7 |
+
esc_html_e($title );
|
8 |
+
if(!empty($modal_new_url))
|
9 |
+
echo ' <a href="' . esc_url( $modal_new_url ) . '" class="add-new-h2">' . __('Add New', EMCORE_SLUG) . '</a>';
|
10 |
+
if(!count_all_modals())
|
11 |
+
echo ' <div class="add-new-get-started">Add a new modal to get started!</div>';
|
12 |
+
?></h2>
|
13 |
+
<div id="poststuff">
|
14 |
+
<div id="post-body" class="metabox-holder columns-2">
|
15 |
+
<div id="post-body-content">
|
16 |
+
<?php if(count_all_modals() || count_deleted_modals())
|
17 |
+
{?>
|
18 |
+
<ul class="subsubsub">
|
19 |
+
<li class="all">
|
20 |
+
<a <?php echo empty($_GET['status']) || $_GET['status'] == 'all' ? 'class="current" ' : '';?>href="<?php echo esc_url( emodal_admin_url() .'&status=all');?>">
|
21 |
+
All <span class="count">(<?php esc_html_e(count_all_modals());?>)</span>
|
22 |
+
</a>
|
23 |
+
</li>
|
24 |
+
<?php if($trash = count_deleted_modals()){?>
|
25 |
+
<li class="trash">|
|
26 |
+
<a <?php echo !empty($_GET['status']) && $_GET['status'] == 'trash' ? 'class="current" ' : '';?>href="<?php echo esc_url( emodal_admin_url() .'&status=trash');?>">
|
27 |
+
Trash <span class="count">(<?php esc_html_e($trash);?>)</span>
|
28 |
+
</a>
|
29 |
+
</li>
|
30 |
+
<?php }?>
|
31 |
+
</ul>
|
32 |
+
<form id="modals-filter" method="get" action="">
|
33 |
+
<?php wp_nonce_field( EMCORE_NONCE, EMCORE_NONCE, true, true );?>
|
34 |
+
<input type="hidden" name="page" value="<?php echo EMCORE_SLUG;?>"/>
|
35 |
+
<?php
|
36 |
+
$table = new EModal_Modal_List_Table();
|
37 |
+
$table->prepare_items();
|
38 |
+
$table->display();
|
39 |
+
?>
|
40 |
+
</form><?php
|
41 |
+
}
|
42 |
+
else
|
43 |
+
{?>
|
44 |
+
<div class="get-started-modal-welcome">
|
45 |
+
<h1>Welcome to <span class="easy">Easy</span><span class="modal">Modal</span></h1>
|
46 |
+
<p>Thank you for installing EasyModal! We hope you enjoy our plug-in! We strive for perfection, but we can’t do it without you! Give us your feedback (<a href="mailto:feedback@easymodal.com">feedback@easymodal.com</a>) and leave us a review at: <a target="_blank" href="http://www.wordpress.org/plugins/easymodal">http://www.wordpress.org/plugins/easymodal</a>
|
47 |
+
</div><?php
|
48 |
+
}?>
|
49 |
+
|
50 |
+
|
51 |
+
</div>
|
52 |
+
<div id="postbox-container-1" class="postbox-container">
|
53 |
+
<?php do_action('emodal_admin_sidebar');?>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
<br class="clear"/>
|
57 |
+
</div>
|
58 |
+
</div><?php
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
//Our class extends the WP_List_Table class, so we need to make sure that it's there
|
63 |
+
if(!class_exists('WP_List_Table')){
|
64 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
65 |
+
}
|
66 |
+
class EModal_Modal_List_Table extends WP_List_Table {
|
67 |
+
function __construct()
|
68 |
+
{
|
69 |
+
parent::__construct(array(
|
70 |
+
'singular'=> 'modal', //Singular label
|
71 |
+
'plural' => 'modals', //plural label, also this well be one of the table css class
|
72 |
+
'ajax' => false //We won't support Ajax for this table
|
73 |
+
));
|
74 |
+
}
|
75 |
+
function prepare_items()
|
76 |
+
{
|
77 |
+
global $wpdb, $_wp_column_headers;
|
78 |
+
|
79 |
+
$table_name = $wpdb->prefix.'em_modals';
|
80 |
+
$screen = get_current_screen();
|
81 |
+
|
82 |
+
/* -- Preparing your query -- */
|
83 |
+
$status = !empty($_GET['status']) ? $_GET['status'] : '';
|
84 |
+
switch($status)
|
85 |
+
{
|
86 |
+
case "trash": $where = "WHERE `is_trash` = 1"; break;
|
87 |
+
default: $where = "WHERE `is_trash` != 1"; break;
|
88 |
+
}
|
89 |
+
|
90 |
+
$query = "SELECT * FROM $table_name $where";
|
91 |
+
/* -- Ordering parameters -- */
|
92 |
+
//Parameters that are going to be used to order the result
|
93 |
+
$orderby = !empty($_GET["orderby"]) ? mysql_real_escape_string($_GET["orderby"]) : 'ASC';
|
94 |
+
$order = !empty($_GET["order"]) ? mysql_real_escape_string($_GET["order"]) : '';
|
95 |
+
if(!empty($orderby) & !empty($order))
|
96 |
+
{
|
97 |
+
$query.=' ORDER BY '.$orderby.' '.$order;
|
98 |
+
}
|
99 |
+
|
100 |
+
/* -- Pagination parameters -- */
|
101 |
+
//Number of elements in your table?
|
102 |
+
$totalitems = $wpdb->query($query); //return the total number of affected rows
|
103 |
+
//How many to display per page?
|
104 |
+
$perpage = 5;
|
105 |
+
//Which page is this?
|
106 |
+
$paged = !empty($_GET["paged"]) ? mysql_real_escape_string($_GET["paged"]) : '';
|
107 |
+
//Page Number
|
108 |
+
if(empty($paged) || !is_numeric($paged) || $paged<=0 )
|
109 |
+
{
|
110 |
+
$paged=1;
|
111 |
+
}
|
112 |
+
//How many pages do we have in total?
|
113 |
+
$totalpages = ceil($totalitems/$perpage);
|
114 |
+
//adjust the query to take pagination into account
|
115 |
+
if(!empty($paged) && !empty($perpage))
|
116 |
+
{
|
117 |
+
$offset=($paged-1)*$perpage;
|
118 |
+
$query.=' LIMIT '.(int)$offset.','.(int)$perpage;
|
119 |
+
}
|
120 |
+
|
121 |
+
|
122 |
+
/* -- Register the pagination -- */
|
123 |
+
$this->set_pagination_args( array(
|
124 |
+
"total_items" => $totalitems,
|
125 |
+
"total_pages" => $totalpages,
|
126 |
+
"per_page" => $perpage,
|
127 |
+
) );
|
128 |
+
//The pagination links are automatically built according to those parameters
|
129 |
+
|
130 |
+
/* -- Register the Columns -- */
|
131 |
+
$columns = $this->get_columns();
|
132 |
+
$hidden = array();
|
133 |
+
$sortable = $this->get_sortable_columns();
|
134 |
+
$this->_column_headers = array($columns, $hidden, $sortable);
|
135 |
+
|
136 |
+
/* -- Fetch the items -- */
|
137 |
+
$this->items = $wpdb->get_results($query);
|
138 |
+
}
|
139 |
+
function get_columns()
|
140 |
+
{
|
141 |
+
return apply_filters('emodal_admin_modal_table_columns', array(
|
142 |
+
'cb' => '<input type="checkbox" />',
|
143 |
+
'name' => __('Name'),
|
144 |
+
'class' => __('Class'),
|
145 |
+
'load' => __('Load Method'),
|
146 |
+
));
|
147 |
+
}
|
148 |
+
function get_sortable_columns()
|
149 |
+
{
|
150 |
+
return apply_filters('emodal_admin_modal_table_sortable_columns', array(
|
151 |
+
'name'=> 'name',
|
152 |
+
'class'=> 'class',
|
153 |
+
'load'=> 'load',
|
154 |
+
));
|
155 |
+
}
|
156 |
+
|
157 |
+
function display_tablenav( $which ) {
|
158 |
+
//if ( 'top' == $which )
|
159 |
+
?>
|
160 |
+
<div class="tablenav <?php echo esc_attr( $which ); ?>">
|
161 |
+
|
162 |
+
<div class="alignleft actions bulkactions">
|
163 |
+
<?php $this->bulk_actions(); ?>
|
164 |
+
</div>
|
165 |
+
<?php
|
166 |
+
$this->extra_tablenav( $which );
|
167 |
+
$this->pagination( $which );
|
168 |
+
?>
|
169 |
+
|
170 |
+
<br class="clear" />
|
171 |
+
</div>
|
172 |
+
<?php
|
173 |
+
}
|
174 |
+
|
175 |
+
function get_bulk_actions() {
|
176 |
+
$actions = array('delete' => __('Delete', EMCORE_SLUG));
|
177 |
+
if(!empty($_GET['status']) && $_GET['status'] == 'trash')
|
178 |
+
$actions['untrash'] = __( 'Restore' );
|
179 |
+
if(count_deleted_modals())
|
180 |
+
$actions['empty_trash'] = __('Empty Trash', EMCORE_SLUG);
|
181 |
+
return $actions;
|
182 |
+
}
|
183 |
+
|
184 |
+
function column_cb($item)
|
185 |
+
{
|
186 |
+
return sprintf(
|
187 |
+
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
188 |
+
$this->_args['singular'],
|
189 |
+
$item->id);
|
190 |
+
}
|
191 |
+
function column_class($item)
|
192 |
+
{
|
193 |
+
return '<code>eModal-'.stripslashes($item->id).'</code>';
|
194 |
+
}
|
195 |
+
function column_name($item)
|
196 |
+
{
|
197 |
+
$view_link = esc_url( emodal_admin_url() .'&action=view&id='. $item->id);
|
198 |
+
$edit_link = esc_url( emodal_admin_url() .'&action=edit&id='. $item->id);
|
199 |
+
$delete_link = esc_url(wp_nonce_url( emodal_admin_url() .'&action=delete&id[]='. $item->id, EMCORE_NONCE, EMCORE_NONCE));
|
200 |
+
|
201 |
+
$out = '<strong><a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf( __( 'Edit “%s”', EMCORE_SLUG), $item->name)) . '">' . $item->name . '</a></strong><br />';
|
202 |
+
|
203 |
+
$actions = array();
|
204 |
+
//if ( current_user_can( $tax->cap->edit_terms ) ) {
|
205 |
+
$actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', EMCORE_SLUG) . '</a>';
|
206 |
+
//$actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __( 'Quick Edit' ) . '</a>';
|
207 |
+
//}
|
208 |
+
//if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term )
|
209 |
+
$actions['delete'] = "<a class='delete-tag' href='" . $delete_link . "'>" . __('Delete', EMCORE_SLUG) . "</a>";
|
210 |
+
//if ( $tax->public )
|
211 |
+
$actions['view'] = '<a href="' . $view_link . '">' . __('View', EMCORE_SLUG) . '</a>';
|
212 |
+
|
213 |
+
//$actions = apply_filters( 'tag_row_actions', $actions, $tag );
|
214 |
+
|
215 |
+
//$actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag );
|
216 |
+
|
217 |
+
$out .= $this->row_actions( $actions );
|
218 |
+
//$out .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">';
|
219 |
+
//$out .= '<div class="name">' . $qe_data->name . '</div>';
|
220 |
+
|
221 |
+
//$out .= '<div class="slug">' . apply_filters( 'editable_slug', $qe_data->slug ) . '</div>';
|
222 |
+
//$out .= '<div class="parent">' . $qe_data->parent . '</div></div>';
|
223 |
+
|
224 |
+
return $out;
|
225 |
+
}
|
226 |
+
function column_load($item)
|
227 |
+
{
|
228 |
+
if(!$item->is_sitewide)
|
229 |
+
{
|
230 |
+
return __('Per Page / Post');
|
231 |
+
}
|
232 |
+
elseif($item->is_sitewide)
|
233 |
+
{
|
234 |
+
return __('Sitewide');
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
function search_box( $text, $input_id ) {
|
239 |
+
if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
|
240 |
+
return;
|
241 |
+
|
242 |
+
$input_id = $input_id . '-search-input';
|
243 |
+
|
244 |
+
if ( ! empty( $_REQUEST['orderby'] ) )
|
245 |
+
echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
|
246 |
+
if ( ! empty( $_REQUEST['order'] ) )
|
247 |
+
echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
|
248 |
+
if ( ! empty( $_REQUEST['post_mime_type'] ) )
|
249 |
+
echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '" />';
|
250 |
+
if ( ! empty( $_REQUEST['detached'] ) )
|
251 |
+
echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
|
252 |
+
?>
|
253 |
+
<p class="search-box">
|
254 |
+
<label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
|
255 |
+
<input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
|
256 |
+
<?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?>
|
257 |
+
</p>
|
258 |
+
<?php
|
259 |
+
}
|
260 |
+
}
|
classes/view/admin/settings/form.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_View_Admin_Settings_Form extends EModal_View {
|
2 |
+
public function output()
|
3 |
+
{
|
4 |
+
extract($this->values)
|
5 |
+
?><div class="wrap">
|
6 |
+
<h2><?php esc_html_e($title );?></h2>
|
7 |
+
<h2 id="emodal-tabs" class="nav-tab-wrapper">
|
8 |
+
<?php foreach($tabs as $tab){ ?>
|
9 |
+
<a href="#<?php echo $tab['id']?>" id="<?php echo $tab['id']?>-tab" class="nav-tab emodal-tab"><?php echo $tab['label'];?></a>
|
10 |
+
<?php } ?>
|
11 |
+
</h2>
|
12 |
+
<form id="emodal-settings-editor" method="post" action="">
|
13 |
+
<?php do_action('emodal_form_nonce');?>
|
14 |
+
<?php wp_nonce_field( EMCORE_NONCE, EMCORE_NONCE);?>
|
15 |
+
<div id="poststuff">
|
16 |
+
<div id="post-body" class="metabox-holder columns-2">
|
17 |
+
<div id="post-body-content">
|
18 |
+
<div class="tabwrapper">
|
19 |
+
<?php foreach($tabs as $tab){ ?>
|
20 |
+
<div id="<?php echo $tab['id']?>" class="emodal-tab-content">
|
21 |
+
<?php do_action('emodal_admin_settings_form_tab_'.$tab['id'])?>
|
22 |
+
</div>
|
23 |
+
<?php } ?>
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
<div id="postbox-container-1" class="postbox-container">
|
27 |
+
<div class="meta-box-sortables ui-sortable" id="side-sortables">
|
28 |
+
<div class="postbox " id="submitdiv">
|
29 |
+
<div title="Click to toggle" class="handlediv"><br></div>
|
30 |
+
<h3 class="hndle"><span><?php _e('Save', EMCORE_SLUG);?></span></h3>
|
31 |
+
<div class="inside">
|
32 |
+
<div id="submitpost" class="submitbox">
|
33 |
+
<div id="major-publishing-actions" class="submitbox">
|
34 |
+
<div id="publishing-action">
|
35 |
+
<span class="spinner"></span>
|
36 |
+
<input type="submit" accesskey="p" value="<?php _e('Save', EMCORE_SLUG);?>" class="button button-primary button-large" id="publish" name="publish">
|
37 |
+
</div>
|
38 |
+
<div class="clear"></div>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
<div class="clear"></div>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
<?php do_action('emodal_admin_sidebar');?>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
<br class="clear"/>
|
49 |
+
</div>
|
50 |
+
</form>
|
51 |
+
</div><?php
|
52 |
+
}
|
53 |
+
}
|
classes/view/admin/theme/form.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_View_Admin_Theme_Form extends EModal_View {
|
2 |
+
public function output()
|
3 |
+
{
|
4 |
+
extract($this->values)
|
5 |
+
?><div class="wrap">
|
6 |
+
<h2><?php
|
7 |
+
esc_html_e(__($title, EMCORE_SLUG) );
|
8 |
+
if(!empty($theme_new_url))
|
9 |
+
echo ' <a href="' . esc_url( admin_url( $theme_new_url ) ) . '" class="add-new-h2">' . __('Add New', EMCORE_SLUG) . '</a>';
|
10 |
+
?></h2>
|
11 |
+
<h2 id="emodal-tabs" class="nav-tab-wrapper">
|
12 |
+
<?php foreach($tabs as $tab){ ?>
|
13 |
+
<a href="#<?php echo $tab['id']?>" id="<?php echo $tab['id']?>-tab" class="nav-tab emodal-tab"><?php echo $tab['label'];?></a>
|
14 |
+
<?php } ?>
|
15 |
+
</h2>
|
16 |
+
<form id="emodal-theme-editor" method="post" action="">
|
17 |
+
<?php do_action('emodal_form_nonce');?>
|
18 |
+
<?php wp_nonce_field(EMCORE_NONCE, EMCORE_NONCE);?>
|
19 |
+
<div id="poststuff">
|
20 |
+
<div id="post-body" class="metabox-holder columns-2">
|
21 |
+
<div id="post-body-content">
|
22 |
+
<div class="empreview">
|
23 |
+
<div id="EModal-Preview">
|
24 |
+
<div class="example-modal-overlay"></div>
|
25 |
+
<h2>
|
26 |
+
<?php _e('Theme Preview', EMCORE_SLUG)?>
|
27 |
+
</h2>
|
28 |
+
<div class="example-modal">
|
29 |
+
<div class="title"><?php _e('Title Text', EMCORE_SLUG);?></div>
|
30 |
+
<div class="content"><?php do_action('emodal_example_modal_content');?></div>
|
31 |
+
<a class="close-modal"><?php _e('×', EMCORE_SLUG);?></a>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
</div>
|
35 |
+
<div class="tabwrapper">
|
36 |
+
<?php foreach($tabs as $tab){ ?>
|
37 |
+
<div id="<?php echo $tab['id']?>" class="emodal-tab-content">
|
38 |
+
<?php do_action('emodal_admin_theme_form_tab_'.$tab['id'])?>
|
39 |
+
</div>
|
40 |
+
<?php } ?>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
<div id="postbox-container-1" class="postbox-container">
|
44 |
+
<div class="meta-box-sortables ui-sortable" id="side-sortables">
|
45 |
+
<div class="postbox " id="submitdiv">
|
46 |
+
<div title="Click to toggle" class="handlediv"><br></div>
|
47 |
+
<h3 class="hndle"><span><?php _e('Publish', EMCORE_SLUG);?></span></h3>
|
48 |
+
<div class="inside">
|
49 |
+
<div id="submitpost" class="submitbox">
|
50 |
+
<div id="minor-publishing">
|
51 |
+
<div id="minor-publishing-actions">
|
52 |
+
<?php do_action('emodal_theme_form_minor_actions');?>
|
53 |
+
<div id="preview-action">
|
54 |
+
<a id="post-preview" href="#" class="preview button"><?php _e('Preview', EMCORE_SLUG);?></a>
|
55 |
+
<input type="hidden" value="" id="wp-preview" name="wp-preview">
|
56 |
+
</div>
|
57 |
+
<div class="clear"></div>
|
58 |
+
</div><!-- #minor-publishing-actions -->
|
59 |
+
</div>
|
60 |
+
<br/>
|
61 |
+
<div id="major-publishing-actions" class="submitbox">
|
62 |
+
<div id="publishing-action">
|
63 |
+
<span class="spinner"></span>
|
64 |
+
<input type="submit" accesskey="p" value="<?php _e('Save', EMCORE_SLUG);?>" class="button button-primary button-large" id="publish" name="publish">
|
65 |
+
</div>
|
66 |
+
<div class="clear"></div>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
<div class="clear"></div>
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
<?php do_action('emodal_admin_sidebar');?>
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
<br class="clear"/>
|
77 |
+
</div>
|
78 |
+
</form>
|
79 |
+
</div><?php
|
80 |
+
}
|
81 |
+
public function output2()
|
82 |
+
{
|
83 |
+
extract($this->values);
|
84 |
+
$output = '<div class="wrap">'
|
85 |
+
.'<h2>'. esc_html( __($title, EMCORE_SLUG) ) .'</h2>'
|
86 |
+
.'<h2 id="emodal-tabs" class="nav-tab-wrapper">';
|
87 |
+
foreach($tabs as $tab)
|
88 |
+
{
|
89 |
+
$output .= '<a href="#'. $tab['id'] .'" id="'. $tab['id'] .'-tab" class="nav-tab emodal-tab">'. $tab['label'] .'</a>';
|
90 |
+
}
|
91 |
+
$output .= '</h2>'
|
92 |
+
.'<form id="emodal-theme-editor" method="post" action="">'
|
93 |
+
.wp_nonce_field(EMCORE_NONCE, EMCORE_NONCE, true, false)
|
94 |
+
.'<div id="poststuff">'
|
95 |
+
.'<div id="post-body" class="metabox-holder columns-2">'
|
96 |
+
.'<div id="post-body-content">'
|
97 |
+
.'<div class="empreview">'
|
98 |
+
.'<div id="EModal-Preview">'
|
99 |
+
.'<div class="example-modal-overlay"></div>'
|
100 |
+
.'<h2>'
|
101 |
+
.__('Theme Preview', EMCORE_SLUG)
|
102 |
+
.'</h2>'
|
103 |
+
.'<div class="example-modal">'
|
104 |
+
.'<div class="title">'. __('Title Text', EMCORE_SLUG) .'</div>'
|
105 |
+
.'<div class="content">'. apply_filters('emodal_example_modal_content', '') .'</div>'
|
106 |
+
.'<a class="close-modal">'. __('×', EMCORE_SLUG) .'</a>'
|
107 |
+
.'</div>'
|
108 |
+
.'</div>'
|
109 |
+
.'</div>'
|
110 |
+
.'<div class="tabwrapper">';
|
111 |
+
foreach($tabs as $tab)
|
112 |
+
{
|
113 |
+
$output .= '<div id="'. $tab['id'] .'" class="emodal-tab-content">'
|
114 |
+
.apply_filters('emodal_admin_theme_form_tab_'.$tab['id'], '')
|
115 |
+
.'</div>';
|
116 |
+
}
|
117 |
+
$output .= '</div>'
|
118 |
+
.'</div>'
|
119 |
+
.'<div id="postbox-container-1" class="postbox-container">'
|
120 |
+
.'<div class="meta-box-sortables ui-sortable" id="side-sortables">'
|
121 |
+
.'<div class="postbox " id="submitdiv">'
|
122 |
+
.'<div title="Click to toggle" class="handlediv"><br></div>'
|
123 |
+
.'<h3 class="hndle"><span>'. __('Publish', EMCORE_SLUG). '</span></h3>'
|
124 |
+
.'<div class="inside">'
|
125 |
+
.'<div id="submitpost" class="submitbox">'
|
126 |
+
.'<div id="minor-publishing">'
|
127 |
+
.'<div id="minor-publishing-actions">'
|
128 |
+
.'<div id="preview-action">'
|
129 |
+
.'<a id="post-preview" href="#" class="preview button">'. __('Preview', EMCORE_SLUG) .'</a>'
|
130 |
+
.'<input type="hidden" value="" id="wp-preview" name="wp-preview">'
|
131 |
+
.'</div>'
|
132 |
+
.'<div class="clear"></div>'
|
133 |
+
.'</div><!-- #minor-publishing-actions -->'
|
134 |
+
.'</div>'
|
135 |
+
.'<br/>'
|
136 |
+
.'<div id="major-publishing-actions" class="submitbox">'
|
137 |
+
.'<div id="publishing-action">'
|
138 |
+
.'<span class="spinner"></span>'
|
139 |
+
.'<input type="submit" accesskey="p" value="'. __('Save', EMCORE_SLUG) .'" class="button button-primary button-large" id="publish" name="publish">'
|
140 |
+
.'</div>'
|
141 |
+
.'<div class="clear"></div>'
|
142 |
+
.'</div>'
|
143 |
+
.'</div>'
|
144 |
+
.'<div class="clear"></div>'
|
145 |
+
.'</div>'
|
146 |
+
.'</div>'
|
147 |
+
. apply_filters('emodal_admin_sidebar', '')
|
148 |
+
.'</div>'
|
149 |
+
.'</div>'
|
150 |
+
.'</div>'
|
151 |
+
.'<br class="clear"/>'
|
152 |
+
.'</div>'
|
153 |
+
.'</form>'
|
154 |
+
.'</div>';
|
155 |
+
return $output;
|
156 |
+
}
|
157 |
+
}
|
classes/view/modal.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class EModal_View_Modal extends EModal_View {
|
2 |
+
public function output()
|
3 |
+
{
|
4 |
+
extract($this->values);
|
5 |
+
$classes = implode(' ', apply_filters('emodal_modal_class_attr', array('modal', 'emodal', 'theme-'.$modal['theme_id']), $modal));
|
6 |
+
$data = apply_filters('emodal_modal_data_attr', $modal);
|
7 |
+
$output =
|
8 |
+
'<div '
|
9 |
+
.'id="eModal-'. esc_attr($modal['id']) .'" '
|
10 |
+
.'class="'. esc_attr($classes) .'" '
|
11 |
+
.'data-emodal="'. esc_attr(json_encode($data)) .'"'
|
12 |
+
.'>';
|
13 |
+
$output .= apply_filters('emodal_modal_inner', '', $modal);
|
14 |
+
$output .= '</div>';
|
15 |
+
return $output;
|
16 |
+
}
|
17 |
+
public function render()
|
18 |
+
{
|
19 |
+
$this->pre_render();
|
20 |
+
echo $this->output();
|
21 |
+
$this->post_render();
|
22 |
+
}
|
23 |
+
}
|
24 |
+
add_filter('emodal_modal_class_attr', 'emodal_modal_class_attr', 5, 2);
|
25 |
+
function emodal_modal_class_attr($classes, $modal)
|
26 |
+
{
|
27 |
+
if(!in_array($modal['meta']['display']['size'], array('auto', 'custom')))
|
28 |
+
{
|
29 |
+
$classes[] = 'responsive';
|
30 |
+
$classes[] = $modal['meta']['display']['size'];
|
31 |
+
}
|
32 |
+
elseif($modal['meta']['display']['size'] == 'custom')
|
33 |
+
{
|
34 |
+
$classes[] = 'custom';
|
35 |
+
}
|
36 |
+
return $classes;
|
37 |
+
}
|
38 |
+
|
39 |
+
add_filter('emodal_modal_data_attr', 'emodal_modal_data_attr', 1000);
|
40 |
+
function emodal_modal_data_attr($modal)
|
41 |
+
{
|
42 |
+
unset(
|
43 |
+
$modal['name'],
|
44 |
+
$modal['title'],
|
45 |
+
$modal['content'],
|
46 |
+
$modal['is_active'],
|
47 |
+
$modal['is_sitewide'],
|
48 |
+
$modal['is_system'],
|
49 |
+
$modal['is_trash'],
|
50 |
+
$modal['created'],
|
51 |
+
$modal['modified']
|
52 |
+
);
|
53 |
+
return $modal;
|
54 |
+
}
|
55 |
+
|
56 |
+
add_filter('emodal_modal_inner', 'emodal_modal_inner_title', 5, 2);
|
57 |
+
function emodal_modal_inner_title($output, $modal)
|
58 |
+
{
|
59 |
+
$output .= apply_filters('emodal_before_modal_title', '', $modal);
|
60 |
+
if($modal['title'] != '')
|
61 |
+
$output .= '<div class="'. esc_attr( apply_filters('emodal_modal_title_class_attr', 'emodal-title', $modal) ) .'">'. esc_html( apply_filters('emodal_modal_title', $modal['title'], $modal) ) .'</div>';
|
62 |
+
$output .= apply_filters('emodal_after_modal_title', '', $modal);
|
63 |
+
return $output;
|
64 |
+
}
|
65 |
+
|
66 |
+
add_filter('emodal_modal_inner', 'emodal_modal_inner_content', 10, 2);
|
67 |
+
function emodal_modal_inner_content($output, $modal)
|
68 |
+
{
|
69 |
+
$output .= apply_filters('emodal_before_modal_content', '', $modal);
|
70 |
+
$output .= '<div class="'. esc_attr( apply_filters('emodal_modal_content_class_attr', 'emodal-content', $modal) ) .'">'. apply_filters('emodal_modal_content', $modal['content'], $modal) .'</div>';
|
71 |
+
$output .= apply_filters('emodal_after_modal_content', '', $modal);
|
72 |
+
return $output;
|
73 |
+
}
|
74 |
+
|
75 |
+
add_filter('emodal_modal_inner', 'emodal_modal_inner_close', 15, 2);
|
76 |
+
function emodal_modal_inner_close($output, $modal)
|
77 |
+
{
|
78 |
+
$output .= apply_filters('emodal_before_modal_close', '', $modal);
|
79 |
+
$output .= '<a class="'. esc_attr( apply_filters('emodal_modal_close_class_attr', 'emodal-close', $modal) ) .'">'. apply_filters('emodal_modal_close', __("×", EMCORE_SLUG), $modal) .'</a>';
|
80 |
+
$output .= apply_filters('emodal_after_modal_close', '', $modal);
|
81 |
+
return $output;
|
82 |
+
}
|
easy-modal.php
CHANGED
@@ -1,1080 +1,217 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Easy Modal
|
4 |
-
Plugin URI:
|
5 |
Description: Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos & more.
|
6 |
Author: Wizard Internet Solutions
|
7 |
-
Version:
|
8 |
Author URI: http://wizardinternetsolutions.com
|
|
|
9 |
*/
|
10 |
-
if (!defined('
|
11 |
-
|
12 |
-
if (!defined('
|
13 |
-
|
14 |
-
if (!defined('
|
15 |
-
|
16 |
-
if (!defined('
|
17 |
-
|
18 |
-
if (!defined('
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
class
|
24 |
-
protected $api_url = 'http://easy-modal.com/api';
|
25 |
-
protected $messages = array();
|
26 |
public function __construct()
|
27 |
{
|
28 |
-
|
29 |
-
{
|
30 |
-
//add_action('admin_init', array(&$this,'_migrate'),1);
|
31 |
-
add_action('admin_init', array(&$this,'_messages'),10);
|
32 |
-
|
33 |
-
add_action('admin_init', array(&$this,'process_get'),9);
|
34 |
-
|
35 |
-
if(!empty($_POST['em_settings']) && in_array($_POST['em_settings'],array('settings','modal','theme')))
|
36 |
-
{
|
37 |
-
add_action('init', array(&$this,'process_post'),9);
|
38 |
-
}
|
39 |
-
register_activation_hook(__FILE__, array(&$this, '_migrate'));
|
40 |
-
add_action('admin_menu', array(&$this, '_menus') );
|
41 |
-
if(isset($_GET['pages']) && $_GET['pages'] == 'easy-modal')
|
42 |
-
{
|
43 |
-
add_action('admin_init', array(&$this,'editor_admin_init'));
|
44 |
-
add_action('admin_head', array(&$this,'editor_admin_head'));
|
45 |
-
}
|
46 |
-
add_filter( 'plugin_action_links', array(&$this, '_actionLinks') , 10, 2 );
|
47 |
-
|
48 |
-
$row = 2;
|
49 |
-
// Ultimate MCE Compatibility Check
|
50 |
-
$ultmce = get_option('jwl_options_group1');
|
51 |
-
if(isset($ultmce['jwl_styleselect_field_id']))
|
52 |
-
{
|
53 |
-
$row = intval($ultmce['jwl_styleselect_dropdown']);
|
54 |
-
}
|
55 |
-
add_filter("mce_buttons_{$row}", array(&$this, '_TinyMCEButtons'), 999);
|
56 |
-
add_filter('tiny_mce_before_init', array(&$this, '_TinyMCEInit'),999);
|
57 |
-
|
58 |
-
|
59 |
-
add_action( 'load-post.php', array(&$this, 'post_meta_boxes_setup'));
|
60 |
-
add_action( 'load-post-new.php', array(&$this, 'post_meta_boxes_setup') );
|
61 |
-
}
|
62 |
-
else
|
63 |
-
{
|
64 |
-
add_filter( 'em_modal_content', 'wptexturize' );
|
65 |
-
add_filter( 'em_modal_content', 'convert_smilies' );
|
66 |
-
add_filter( 'em_modal_content', 'convert_chars' );
|
67 |
-
add_filter( 'em_modal_content', 'wpautop' );
|
68 |
-
add_filter( 'em_modal_content', 'shortcode_unautop' );
|
69 |
-
add_filter( 'em_modal_content', 'prepend_attachment' );
|
70 |
-
add_filter( 'em_modal_content', array(&$this,'filters'), 10, 1);
|
71 |
-
add_filter( 'em_modal_content', 'do_shortcode', 11 );
|
72 |
-
|
73 |
-
add_filter('em_preload_modals_single', array(&$this,'preload_modal_filter'),1000);
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
$this
|
|
|
79 |
|
80 |
-
//add_action( "in_plugin_update_message-".EASYMODAL_SLUG .'/'. EASYMODAL_SLUG .'.php', array(&$this,'your_update_message_cb'), 20, 2 );
|
81 |
-
// License Check & Updates
|
82 |
-
$all_options = wp_load_alloptions();
|
83 |
-
if(array_key_exists('EasyModal_License', $all_options) && array_key_exists('EasyModal_License_Status', $all_options) && $license_status = get_option('EasyModal_License_Status'))
|
84 |
-
{
|
85 |
-
if(is_array($license_status) && in_array($license_status['status'], array(2000,2001,3002,3003)))
|
86 |
-
{
|
87 |
-
add_filter('update_plugins', array(&$this,'check_updates'));
|
88 |
-
add_filter('pre_set_site_transient_update_plugins', array(&$this,'check_updates'));
|
89 |
-
add_filter('plugins_api', array(&$this,'get_plugin_info'), 10, 3);
|
90 |
-
}
|
91 |
-
}
|
92 |
-
}
|
93 |
-
public function filters($content)
|
94 |
-
{
|
95 |
-
return $content;
|
96 |
-
}
|
97 |
-
public function admin_footer()
|
98 |
-
{
|
99 |
-
require $this->load_view('admin_footer');
|
100 |
-
}
|
101 |
-
public function _messages()
|
102 |
-
{
|
103 |
-
$this->messages = $this->get_messages();
|
104 |
-
}
|
105 |
-
public function post_meta_boxes_setup()
|
106 |
-
{
|
107 |
-
add_action( 'add_meta_boxes', array(&$this, 'post_meta_boxes') );
|
108 |
-
add_action( 'save_post', array(&$this, 'save_easy_modal_post_modals'), 10, 2 );
|
109 |
-
}
|
110 |
-
public function easy_modal_post_modals( $object, $box )
|
111 |
-
{
|
112 |
-
$current_modals = get_post_meta( $object->ID, 'easy_modal_post_modals', true );
|
113 |
-
$modals = $this->getModalList();
|
114 |
-
require EASYMODAL_DIR.'/inc/views/metaboxes.php';
|
115 |
-
}
|
116 |
-
public function save_easy_modal_post_modals( $post_id, $post )
|
117 |
-
{
|
118 |
-
/* Verify the nonce before proceeding. */
|
119 |
-
if ( !isset( $_POST['safe_csrf_nonce_easy_modal'] ) || !wp_verify_nonce( $_POST['safe_csrf_nonce_easy_modal'], "safe_csrf_nonce_easy_modal" ) )
|
120 |
-
return $post_id;
|
121 |
-
$post_type = get_post_type_object( $post->post_type );
|
122 |
-
if ( !current_user_can( $post_type->cap->edit_post, $post_id ) )
|
123 |
-
return $post_id;
|
124 |
-
$post_modals = ( !empty( $_POST['easy_modal_post_modals']) && $this->all_numeric($_POST['easy_modal_post_modals']) ) ? $_POST['easy_modal_post_modals'] : array() ;
|
125 |
-
$current_post_modals = get_post_meta( $post_id, 'easy_modal_post_modals', true );
|
126 |
-
if ( $post_modals && '' == $current_post_modals )
|
127 |
-
add_post_meta( $post_id, 'easy_modal_post_modals', $post_modals, true );
|
128 |
-
elseif ( $post_modals && $post_modals != $current_post_modals )
|
129 |
-
update_post_meta( $post_id, 'easy_modal_post_modals', $post_modals );
|
130 |
-
elseif ( '' == $post_modals && $current_post_modals )
|
131 |
-
delete_post_meta( $post_id, 'easy_modal_post_modals' );
|
132 |
-
}
|
133 |
-
public function post_meta_boxes()
|
134 |
-
{
|
135 |
-
$post_types = apply_filters('em_post_types', array('post','page'));
|
136 |
-
foreach($post_types as $post_types)
|
137 |
-
{
|
138 |
-
add_meta_box('easy-modal', esc_html__( 'Easy Modal', 'easy-modal' ), array(&$this,'easy_modal_post_modals'), $post_types);
|
139 |
-
}
|
140 |
-
}
|
141 |
-
public function editor_admin_head()
|
142 |
-
{
|
143 |
-
wp_tiny_mce();
|
144 |
-
}
|
145 |
-
public function _styles_scripts()
|
146 |
-
{
|
147 |
if (is_admin())
|
148 |
-
|
149 |
-
add_action("admin_head-toplevel_page_easy-modal",array(&$this,'admin_styles'));
|
150 |
-
add_action("admin_head-toplevel_page_easy-modal",array(&$this,'admin_scripts'));
|
151 |
-
add_action("admin_head-easy-modal_page_easy-modal-themes",array(&$this,'admin_styles'));
|
152 |
-
add_action("admin_head-easy-modal_page_easy-modal-themes",array(&$this,'admin_scripts'));
|
153 |
-
add_action("admin_head-easy-modal_page_easy-modal-settings",array(&$this,'admin_styles'));
|
154 |
-
add_action("admin_head-easy-modal_page_easy-modal-settings",array(&$this,'admin_scripts'));
|
155 |
-
add_action("admin_head-easy-modal_page_easy-modal-help",array(&$this,'admin_styles'));
|
156 |
-
add_action("admin_head-easy-modal_page_easy-modal-help",array(&$this,'admin_scripts'));
|
157 |
-
}
|
158 |
-
else
|
159 |
-
{
|
160 |
-
add_action('wp_print_styles', array(&$this, 'styles') );
|
161 |
-
add_action('wp_print_scripts', array(&$this, 'scripts') );
|
162 |
-
}
|
163 |
-
}
|
164 |
-
public function _migrate()
|
165 |
-
{
|
166 |
-
$all_options = wp_load_alloptions();
|
167 |
-
if(!array_key_exists('EasyModal_Version', $all_options))
|
168 |
-
{
|
169 |
-
$this->resetOptions();
|
170 |
-
}
|
171 |
else
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
}
|
185 |
-
}
|
186 |
-
// detect EM Free
|
187 |
-
if(array_key_exists('eM_version', $all_options))
|
188 |
-
{
|
189 |
-
$this->_migrate_EM();
|
190 |
-
}
|
191 |
-
// detect EM Lite
|
192 |
-
if(array_key_exists('EasyModalLite_Version', $all_options))
|
193 |
-
{
|
194 |
-
$this->_migrate_EM_Lite();
|
195 |
-
}
|
196 |
-
// detect EM Lite
|
197 |
-
if(array_key_exists('EasyModalPro_Version', $all_options))
|
198 |
-
{
|
199 |
-
$this->_migrate_EM_Pro();
|
200 |
-
}
|
201 |
-
update_option('EasyModal_Version', EASYMODAL_VERSION);
|
202 |
-
}
|
203 |
-
protected function _migrate_EM()
|
204 |
-
{
|
205 |
-
global $wp;
|
206 |
-
$o_modal_list = get_option('EasyModal');
|
207 |
-
if(!is_array($o_modal_list))
|
208 |
-
{
|
209 |
-
$o_modal_list = unserialize($o_modal_list);
|
210 |
-
}
|
211 |
-
foreach($o_modal_list as $id)
|
212 |
-
{
|
213 |
-
$Modal = get_option('EasyModal_'.$id);
|
214 |
-
if(!is_array($Modal))
|
215 |
-
{
|
216 |
-
$Modal = unserialize($Modal);
|
217 |
-
}
|
218 |
-
$Modal['name'] = $Modal['title'];
|
219 |
-
$this->updateModalSettings('new',$Modal, false, true);
|
220 |
-
//delete_option('EasyModal_'.$id);
|
221 |
-
}
|
222 |
-
//delete_option('eM_version');
|
223 |
-
//delete_option('EasyModal');
|
224 |
-
}
|
225 |
-
protected function _migrate_EM_Lite()
|
226 |
-
{
|
227 |
-
global $wp;
|
228 |
-
$o_modal_list = get_option('EasyModalLite_ModalList');
|
229 |
-
if(!is_array($o_modal_list))
|
230 |
-
{
|
231 |
-
$o_modal_list = unserialize($o_modal_list);
|
232 |
-
}
|
233 |
-
foreach($o_modal_list as $id => $title)
|
234 |
-
{
|
235 |
-
$Modal = get_option('EasyModalLite_Modal-'.$id);
|
236 |
-
if(!is_array($Modal))
|
237 |
-
{
|
238 |
-
$Modal = unserialize($Modal);
|
239 |
-
}
|
240 |
-
$Modal['name'] = !empty($Modal['title']) ? $Modal['title'] : 'change_me';
|
241 |
-
$this->updateModalSettings($id, $Modal, false, true);
|
242 |
-
//delete_option('EasyModalLite_Modal-'.$id);
|
243 |
-
}
|
244 |
-
$Theme = get_option('EasyModalLite_Theme-1');
|
245 |
-
if(!is_array($Theme))
|
246 |
-
{
|
247 |
-
$Theme = unserialize($Theme);
|
248 |
-
}
|
249 |
-
$this->updateThemeSettings(1,$Theme,false,true);
|
250 |
-
//delete_option('EasyModalLite_Theme-1');
|
251 |
-
$o_settings = get_option('EasyModalLite_Settings');
|
252 |
-
if(!is_array($o_settings))
|
253 |
-
{
|
254 |
-
$o_settings = unserialize($o_settings);
|
255 |
-
if(!is_array($o_settings))
|
256 |
-
{
|
257 |
-
$o_settings = array();
|
258 |
-
}
|
259 |
-
}
|
260 |
-
unset($o_settings['license']);
|
261 |
-
$this->updateSettings($o_settings,true);
|
262 |
-
//delete_option('EasyModalLite_Settings');
|
263 |
-
//delete_option('EasyModalLite_Version');
|
264 |
-
//delete_option('EasyModalLite_ModalList');
|
265 |
-
//delete_option('EasyModalLite_ThemeList');
|
266 |
-
}
|
267 |
-
protected function _migrate_EM_Pro()
|
268 |
-
{
|
269 |
-
global $wp;
|
270 |
-
$o_theme_list = get_option('EasyModalPro_ModalList');
|
271 |
-
if(!is_array($o_theme_list))
|
272 |
-
{
|
273 |
-
$o_theme_list = unserialize($o_theme_list);
|
274 |
-
}
|
275 |
-
foreach($o_theme_list as $id => $name)
|
276 |
-
{
|
277 |
-
$Theme = get_option('EasyModalPro_Theme-'.$id);
|
278 |
-
if(!is_array($Theme))
|
279 |
-
{
|
280 |
-
$Theme = unserialize($Theme);
|
281 |
-
}
|
282 |
-
$theme = $this->updateThemeSettings('new',$Theme,false,true);
|
283 |
-
//delete_option('EasyModalPro_Theme-'.$id);
|
284 |
-
$themes[$id] = $theme['theme_id'];
|
285 |
-
}
|
286 |
-
//delete_option('EasyModalPro_ThemeList');
|
287 |
-
$themes = $this->getThemeList();
|
288 |
-
$o_modal_list = get_option('EasyModalPro_ModalList');
|
289 |
-
if(!is_array($o_modal_list))
|
290 |
-
{
|
291 |
-
$o_modal_list = unserialize($o_modal_list);
|
292 |
-
}
|
293 |
-
foreach($o_modal_list as $id => $title)
|
294 |
-
{
|
295 |
-
$Modal = get_option('EasyModalPro_Modal-'.$id);
|
296 |
-
if(!is_array($Modal))
|
297 |
-
{
|
298 |
-
$Modal = unserialize($Modal);
|
299 |
-
}
|
300 |
-
$Modal['theme'] = isset($themes[$id]) ? $theme[$id] : 1;
|
301 |
-
$Modal['name'] = !empty($Modal['title']) ? $Modal['title'] : 'change_me';
|
302 |
-
$this->updateModalSettings($id, $Modal, false, true);
|
303 |
-
//delete_option('EasyModalPro_Modal-'.$id);
|
304 |
-
}
|
305 |
-
//delete_option('EasyModalPro_ModalList');
|
306 |
-
$o_settings = get_option('EasyModalPro_Settings');
|
307 |
-
if(!is_array($o_settings))
|
308 |
-
{
|
309 |
-
$o_settings = unserialize($o_settings);
|
310 |
-
if(!is_array($o_settings))
|
311 |
-
{
|
312 |
-
$o_settings = array();
|
313 |
-
}
|
314 |
-
}
|
315 |
-
$license = get_option('EasyModalPro_License');
|
316 |
-
$this->process_license($license);
|
317 |
-
unset($o_settings['license']);
|
318 |
-
$this->updateSettings($o_settings,true);
|
319 |
-
//delete_option('EasyModalPro_License');
|
320 |
-
//delete_option('EasyModalPro_Settings');
|
321 |
-
//delete_option('EasyModalPro_Version');
|
322 |
-
}
|
323 |
-
public function resetOptions()
|
324 |
-
{
|
325 |
-
update_option('EasyModal_Settings', $this->defaultSettings());
|
326 |
-
foreach($this->getModalList() as $id => $name)
|
327 |
-
{
|
328 |
-
$this->deleteModal($id);
|
329 |
-
}
|
330 |
-
foreach($this->getThemeList() as $id => $name)
|
331 |
-
{
|
332 |
-
if($id != 1)
|
333 |
-
$this->deleteTheme($id);
|
334 |
-
}
|
335 |
-
$theme = $this->defaultThemeSettings();
|
336 |
-
$theme['name'] = '2013 Theme';
|
337 |
-
$this->updateThemeSettings(1, $theme);
|
338 |
-
}
|
339 |
-
public function styles()
|
340 |
-
{
|
341 |
-
wp_register_style(EASYMODAL_SLUG.'-styles',EASYMODAL_URL.'/inc/css/easy-modal.min.css',false,0.1);
|
342 |
-
wp_enqueue_style(EASYMODAL_SLUG.'-styles');
|
343 |
-
}
|
344 |
-
public function scripts()
|
345 |
-
{
|
346 |
-
wp_enqueue_script('animate-colors', EASYMODAL_URL.'/inc/js/jquery.animate-colors-min.js', array('jquery'));
|
347 |
-
wp_enqueue_script(EASYMODAL_SLUG.'-scripts', EASYMODAL_URL.'/inc/js/easy-modal.min.js', array('jquery','animate-colors'));
|
348 |
-
$data = array(
|
349 |
-
'modals' => $this->enqueue_modals(),
|
350 |
-
'themes' => $this->enqueue_themes()
|
351 |
-
);
|
352 |
-
$params = array(
|
353 |
-
'l10n_print_after' => 'easymodal = ' . json_encode($data) . ';'
|
354 |
-
);
|
355 |
-
wp_localize_script( EASYMODAL_SLUG.'-scripts', 'easymodal', $params );
|
356 |
-
}
|
357 |
-
public function admin_styles()
|
358 |
-
{
|
359 |
-
$this->styles();
|
360 |
-
wp_register_style(EASYMODAL_SLUG.'-admin-styles',EASYMODAL_URL.'/inc/css/easy-modal-admin.min.css',false,0.1);
|
361 |
-
wp_enqueue_style(EASYMODAL_SLUG.'-admin-styles');
|
362 |
-
}
|
363 |
-
public function admin_scripts()
|
364 |
-
{
|
365 |
-
wp_enqueue_script('word-count');
|
366 |
-
wp_enqueue_script('post');
|
367 |
-
wp_enqueue_script('editor');
|
368 |
-
wp_enqueue_script('media-upload');
|
369 |
-
wp_enqueue_script('jquery-ui-core');
|
370 |
-
wp_enqueue_script('jquery-ui-accordion');
|
371 |
-
wp_enqueue_script('jquery-ui-slider');
|
372 |
-
wp_enqueue_script('jquery-colorpicker', EASYMODAL_URL.'/inc/js/colorpicker.min.js', array('jquery'));
|
373 |
-
wp_enqueue_script('easy-modal-admin', EASYMODAL_URL.'/inc/js/easy-modal-admin.min.js', array('jquery', 'jquery-ui-core', 'jquery-ui-slider', 'jquery-colorpicker'));
|
374 |
-
add_action('admin_print_footer_scripts', array(&$this,'admin_footer'),1000);
|
375 |
-
}
|
376 |
-
public function _menus()
|
377 |
-
{
|
378 |
-
add_menu_page( EASYMODAL, EASYMODAL, 'edit_posts', EASYMODAL_SLUG, array(&$this, 'modal_page'),EASYMODAL_URL.'/inc/images/admin/dashboard-icon.png',1000);
|
379 |
-
add_submenu_page( EASYMODAL_SLUG, 'Modals', 'Modals', 'edit_posts', EASYMODAL_SLUG, array(&$this, 'modal_page'));
|
380 |
-
add_submenu_page( EASYMODAL_SLUG, 'Theme', 'Theme', 'edit_themes', EASYMODAL_SLUG.'-themes', array(&$this, 'theme_page'));
|
381 |
-
add_submenu_page( EASYMODAL_SLUG, 'Settings', 'Settings', 'manage_options', EASYMODAL_SLUG.'-settings', array(&$this, 'settings_page'));
|
382 |
-
add_submenu_page( EASYMODAL_SLUG, 'Help', 'Help', 'edit_posts', EASYMODAL_SLUG.'-help', array(&$this, 'help_page'));
|
383 |
-
}
|
384 |
-
public function _actionLinks( $links, $file )
|
385 |
-
{
|
386 |
-
if ( $file == plugin_basename( __FILE__ ) )
|
387 |
-
{
|
388 |
-
$posk_links = '<a href="'.get_admin_url().'admin.php?page='.EASYMODAL_SLUG.'-settings">'.__('Settings').'</a>';
|
389 |
-
array_unshift( $links, $posk_links );
|
390 |
-
$posk_links = '<a href="https://easy-modal.com/pricing-purchase?utm_source=em-lite&utm_medium=dashboard+link&utm_campaign=upgrade">'.__('Upgrade').'</a>';
|
391 |
-
array_unshift( $links, $posk_links );
|
392 |
-
}
|
393 |
-
return $links;
|
394 |
-
}
|
395 |
-
public function _TinyMCEButtons($buttons)
|
396 |
-
{
|
397 |
-
if ( ! in_array( 'styleselect', $buttons ) )
|
398 |
-
$buttons[] = 'styleselect';
|
399 |
-
return $buttons;
|
400 |
-
}
|
401 |
-
public function _TinyMCEInit($initArray)
|
402 |
-
{
|
403 |
-
// Add Modal styles to styles dropdown
|
404 |
-
$styles = !empty($initArray['style_formats']) && is_array(json_decode($initArray['style_formats'])) ? json_decode($initArray['style_formats']) : array();
|
405 |
-
foreach($this->getModalList() as $key => $modal)
|
406 |
-
{
|
407 |
-
$styles[] = array(
|
408 |
-
'title' => "Open Modal - $modal",
|
409 |
-
'inline' => 'span',
|
410 |
-
'classes' => "eModal-$key"
|
411 |
-
);
|
412 |
-
}
|
413 |
-
$initArray['style_formats'] = json_encode($styles);
|
414 |
-
return $initArray;
|
415 |
-
}
|
416 |
-
protected $_accepted_modal_ids = array('new');
|
417 |
-
protected $views = array(
|
418 |
-
'admin_footer' => '/inc/views/admin_footer.php',
|
419 |
-
'help' => '/inc/views/help.php',
|
420 |
-
'metaboxes' => '/inc/views/metaboxes.php',
|
421 |
-
'modal' => '/inc/views/modal.php',
|
422 |
-
'modal_delete' => '/inc/views/modal_delete.php',
|
423 |
-
'modal_list' => '/inc/views/modal_list.php',
|
424 |
-
'modal_settings' => '/inc/views/modal_settings.php',
|
425 |
-
'settings' => '/inc/views/settings.php',
|
426 |
-
'sidebar' => '/inc/views/sidebar.php',
|
427 |
-
'theme_settings' => '/inc/views/theme_settings.php',
|
428 |
-
);
|
429 |
-
public function load_view($view = NULL)
|
430 |
-
{
|
431 |
-
if($view) return EASYMODAL_DIR.$this->views[$view];
|
432 |
-
}
|
433 |
-
public function settings_page()
|
434 |
-
{
|
435 |
-
require $this->load_view('settings');
|
436 |
-
}
|
437 |
-
public function process_get()
|
438 |
-
{
|
439 |
-
$modal_id = isset($_GET['modal_id']) ? $_GET['modal_id'] : NULL;
|
440 |
-
if($modal_id>0 && isset($_GET['action']) && wp_verify_nonce($_GET['safe_csrf_nonce_easy_modal'], "safe_csrf_nonce_easy_modal"))
|
441 |
-
{
|
442 |
-
switch($_GET['action'])
|
443 |
-
{
|
444 |
-
case 'delete':
|
445 |
-
if(!empty($_GET['confirm']))
|
446 |
-
{
|
447 |
-
$this->deleteModal($modal_id);
|
448 |
-
wp_redirect('admin.php?page='.EASYMODAL_SLUG,302);
|
449 |
-
}
|
450 |
-
break;
|
451 |
-
case 'clone':
|
452 |
-
$settings = $this->updateModalSettings('clone', $this->getModalSettings( $modal_id ), true);
|
453 |
-
wp_redirect('admin.php?page='.EASYMODAL_SLUG.'&modal_id='.$settings['id'],302);
|
454 |
-
break;
|
455 |
-
}
|
456 |
-
}
|
457 |
}
|
|
|
458 |
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
$modal_id = isset($_GET['modal_id']) ? $_GET['modal_id'] : NULL;
|
464 |
-
if($modal_id>0 && isset($_GET['action']) && wp_verify_nonce($_GET['safe_csrf_nonce_easy_modal'], "safe_csrf_nonce_easy_modal"))
|
465 |
-
{
|
466 |
-
switch($_GET['action'])
|
467 |
-
{
|
468 |
-
case 'delete':
|
469 |
-
if(empty($_GET['confirm']))
|
470 |
-
{
|
471 |
-
require $this->load_view('modal_delete');
|
472 |
-
}
|
473 |
-
break;
|
474 |
-
}
|
475 |
-
}
|
476 |
-
elseif(in_array($modal_id, $this->_accepted_modal_ids) || $modal_id>0)
|
477 |
-
{
|
478 |
-
$settings = $this->getModalSettings($modal_id);
|
479 |
-
require $this->load_view('modal_settings');
|
480 |
-
}
|
481 |
-
else
|
482 |
{
|
483 |
-
$
|
484 |
-
|
485 |
}
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
$settings = $this->getThemeSettings(1);
|
490 |
-
require $this->load_view('theme_settings');
|
491 |
-
}
|
492 |
-
public function help_page()
|
493 |
-
{
|
494 |
-
require $this->load_view('help');
|
495 |
-
}
|
496 |
-
public function getModalList()
|
497 |
-
{
|
498 |
-
return get_option('EasyModal_ModalList',array());
|
499 |
-
}
|
500 |
-
public function getThemeList()
|
501 |
-
{
|
502 |
-
return get_option('EasyModal_ThemeList',array());
|
503 |
-
}
|
504 |
-
|
505 |
-
public function getSettings()
|
506 |
-
{
|
507 |
-
if($settings = get_option('EasyModal_Settings'))
|
508 |
-
{
|
509 |
-
return $this->merge_existing($this->defaultSettings(), $settings);
|
510 |
-
}
|
511 |
-
else
|
512 |
-
{
|
513 |
-
return $this->defaultSettings();
|
514 |
-
}
|
515 |
-
}
|
516 |
-
public function getModalSettings($modal_id)
|
517 |
-
{
|
518 |
-
if($modal = get_option('EasyModal_Modal-'.$modal_id))
|
519 |
-
{
|
520 |
-
return $this->merge_existing($this->defaultModalSettings(), $modal);
|
521 |
-
}
|
522 |
-
else
|
523 |
-
{
|
524 |
-
return $this->defaultModalSettings();
|
525 |
-
}
|
526 |
-
}
|
527 |
-
public function getThemeSettings($theme_id = 1)
|
528 |
-
{
|
529 |
-
if($theme = get_option('EasyModal_Theme-1'))
|
530 |
-
{
|
531 |
-
return $this->merge_existing($this->defaultThemeSettings(), $theme);
|
532 |
-
}
|
533 |
-
else
|
534 |
-
{
|
535 |
-
return $this->defaultThemeSettings();
|
536 |
-
}
|
537 |
-
}
|
538 |
-
public function process_license($key)
|
539 |
-
{
|
540 |
-
if(!empty($key) && $key != get_option('EasyModal_License'))
|
541 |
-
{
|
542 |
-
update_option('EasyModal_License', $key);
|
543 |
-
$license_status = $this->check_license($key);
|
544 |
-
if(is_array($license_status) && in_array($license_status['status'], array(3004,3006)))
|
545 |
-
{
|
546 |
-
$this->activate_domain();
|
547 |
-
$license_status = $this->check_license($key);
|
548 |
-
}
|
549 |
-
if(is_array($license_status) && in_array($license_status['status'], array(2000,2001,3002,3003)))
|
550 |
-
{
|
551 |
-
// Force Update Check
|
552 |
-
delete_option('_site_transient_update_plugins');
|
553 |
-
}
|
554 |
-
update_option('EasyModal_License_Status', $license_status);
|
555 |
-
update_option('EasyModal_License_LastChecked', strtotime(date("Y-m-d H:i:s")));
|
556 |
-
return 1;
|
557 |
}
|
558 |
-
elseif(empty($key))
|
559 |
-
{
|
560 |
-
delete_option('EasyModal_License');
|
561 |
-
delete_option('EasyModal_License_Status');
|
562 |
-
delete_option('EasyModal_License_LastChecked');
|
563 |
-
return 2;
|
564 |
-
}
|
565 |
-
return 0;
|
566 |
-
}
|
567 |
-
public function process_post()
|
568 |
-
{
|
569 |
-
if(wp_verify_nonce($_POST['safe_csrf_nonce_easy_modal'], "safe_csrf_nonce_easy_modal"))
|
570 |
-
{
|
571 |
-
unset($_POST['safe_csrf_nonce_easy_modal']);
|
572 |
-
$post = stripslashes_deep($_POST);
|
573 |
-
switch($post['em_settings'])
|
574 |
-
{
|
575 |
-
case 'settings': $this->updateSettings($post);
|
576 |
-
break;
|
577 |
-
case 'modal': $this->updateModalSettings(isset($_GET['modal_id']) ? $_GET['modal_id'] : NULL, $post, $_GET['modal_id'] == 'new' ? true : false);
|
578 |
-
break;
|
579 |
-
case 'theme': $this->updateThemeSettings(isset($_GET['theme_id']) ? $_GET['theme_id'] : NULL, $post, $_GET['theme_id'] == 'new' ? true : false);
|
580 |
-
break;
|
581 |
-
}
|
582 |
-
}
|
583 |
-
}
|
584 |
-
public function upgrade()
|
585 |
-
{
|
586 |
-
include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
587 |
-
include_once( ABSPATH . 'wp-admin/includes/update.php' );
|
588 |
-
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
589 |
-
include_once( ABSPATH . 'wp-admin/includes/file.php' );
|
590 |
|
591 |
-
|
592 |
-
|
593 |
-
$
|
594 |
-
|
595 |
-
}
|
596 |
-
public function updateSettings($post = NULL, $silent = false)
|
597 |
-
{
|
598 |
-
$settings = $this->getSettings();
|
599 |
-
if($post)
|
600 |
-
{
|
601 |
-
update_option('EasyModal_Settings', $settings);
|
602 |
-
$this->message('Settings Updated');
|
603 |
-
if(array_key_exists('license',$post))
|
604 |
-
{
|
605 |
-
if($this->process_license($post['license']) == 1)
|
606 |
-
{
|
607 |
-
wp_redirect('update-core.php',302);
|
608 |
-
//wp_redirect('admin.php?page='.EASYMODAL_SLUG.'-settings',302);
|
609 |
-
exit;
|
610 |
-
}
|
611 |
-
}
|
612 |
-
if(!$silent) $this->message('Settings Updated');
|
613 |
-
}
|
614 |
-
return $settings;
|
615 |
-
}
|
616 |
-
public function updateModalSettings($modal_id, $post = NULL, $redirect = false, $silent = false)
|
617 |
-
{
|
618 |
-
$modals = $this->getModalList();
|
619 |
-
if(!is_numeric($modal_id))
|
620 |
-
{
|
621 |
-
switch($modal_id)
|
622 |
-
{
|
623 |
-
case 'new':
|
624 |
-
case 'clone':
|
625 |
-
$highest = 0;
|
626 |
-
if($modal_id == 'clone') $clone = true;
|
627 |
-
foreach($modals as $id => $name)
|
628 |
-
{
|
629 |
-
if($id > $highest) $highest = $id;
|
630 |
-
}
|
631 |
-
$modal_id = $highest + 1;
|
632 |
-
break;
|
633 |
-
}
|
634 |
-
}
|
635 |
-
$settings = $this->getModalSettings($modal_id);
|
636 |
-
if($post)
|
637 |
-
{
|
638 |
-
$settings['id'] = $modal_id;
|
639 |
-
unset($post['id']);
|
640 |
-
$settings['sitewide'] = false;
|
641 |
-
$settings['overlayClose'] = false;
|
642 |
-
$settings['overlayEscClose'] = false;
|
643 |
-
foreach($post as $key => $val)
|
644 |
-
{
|
645 |
-
switch($key)
|
646 |
-
{
|
647 |
-
case 'name':
|
648 |
-
case 'title':
|
649 |
-
$settings[$key] = sanitize_text_field($val);
|
650 |
-
break;
|
651 |
-
case 'content':
|
652 |
-
$settings[$key] = balanceTags($val);
|
653 |
-
break;
|
654 |
-
case 'sitewide':
|
655 |
-
case 'overlayClose':
|
656 |
-
case 'overlayEscClose':
|
657 |
-
$settings[$key] = ($val === true || $val === 'true') ? true : false;
|
658 |
-
break;
|
659 |
-
case 'duration':
|
660 |
-
case 'userHeight':
|
661 |
-
case 'userWidth':
|
662 |
-
if(is_numeric($val))
|
663 |
-
{
|
664 |
-
$settings[$key] = intval($val);
|
665 |
-
}
|
666 |
-
break;
|
667 |
-
case 'size':
|
668 |
-
if(in_array($val,array('','tiny','small','medium','large','xlarge','custom')))
|
669 |
-
{
|
670 |
-
$settings[$key] = $val;
|
671 |
-
}
|
672 |
-
break;
|
673 |
-
case 'animation':
|
674 |
-
if(in_array($val,array('fade','fadeAndSlide','grow','growAndSlide')))
|
675 |
-
{
|
676 |
-
$settings[$key] = $val;
|
677 |
-
}
|
678 |
-
break;
|
679 |
-
case 'direction':
|
680 |
-
if(in_array($val,array('top','bottom','left','right','topleft','topright','bottomleft','bottomright','mouse')))
|
681 |
-
{
|
682 |
-
$settings[$key] = $val;
|
683 |
-
}
|
684 |
-
break;
|
685 |
-
case 'userHeightUnit':
|
686 |
-
case 'userWidthUnit':
|
687 |
-
if(in_array($val,array('px','%','em','rem')))
|
688 |
-
{
|
689 |
-
$settings[$key] = $val;
|
690 |
-
}
|
691 |
-
break;
|
692 |
-
}
|
693 |
-
}
|
694 |
-
if(!$silent) isset($clone) ? $this->message('Modal cloned successfully') : $this->message('Modal Updated Successfully');
|
695 |
-
}
|
696 |
-
$modals[$settings['id']] = $settings['name'];
|
697 |
-
update_option('EasyModal_ModalList', $modals);
|
698 |
-
update_option('EasyModal_Modal-'.$modal_id, $settings);
|
699 |
-
if($redirect) wp_redirect('admin.php?page='.EASYMODAL_SLUG.'&modal_id='.$settings['id'],302);
|
700 |
-
return $settings;
|
701 |
-
}
|
702 |
-
public function updateThemeSettings($theme_id = 1, $post = NULL, $redirect = false, $silent = false)
|
703 |
-
{
|
704 |
-
$settings = $this->getThemeSettings(1);
|
705 |
-
if($post)
|
706 |
-
{
|
707 |
-
$settings['id'] = 1;
|
708 |
-
foreach($post as $key => $val)
|
709 |
-
{
|
710 |
-
switch($key)
|
711 |
-
{
|
712 |
-
case 'name':
|
713 |
-
case 'closeText':
|
714 |
-
$settings[$key] = sanitize_text_field($val);
|
715 |
-
break;
|
716 |
-
case 'overlayOpacity':
|
717 |
-
case 'containerPadding':
|
718 |
-
case 'containerBorderWidth':
|
719 |
-
case 'containerBorderRadius':
|
720 |
-
case 'closeFontSize':
|
721 |
-
case 'closeBorderRadius':
|
722 |
-
case 'closeSize':
|
723 |
-
case 'contentTitleFontSize':
|
724 |
-
if(is_numeric($val))
|
725 |
-
{
|
726 |
-
$settings[$key] = intval($val);
|
727 |
-
}
|
728 |
-
break;
|
729 |
-
case 'overlayColor':
|
730 |
-
case 'containerBgColor':
|
731 |
-
case 'containerBorderColor':
|
732 |
-
case 'closeBgColor':
|
733 |
-
case 'closeFontColor':
|
734 |
-
case 'contentTitleFontColor':
|
735 |
-
case 'contentFontColor':
|
736 |
-
if(preg_match('/^#[a-f0-9]{6}$/i', $val))
|
737 |
-
{
|
738 |
-
$settings[$key] = $val;
|
739 |
-
}
|
740 |
-
break;
|
741 |
-
case 'containerBorderStyle':
|
742 |
-
if(in_array($val,array('none','solid','dotted','dashed','double','groove','inset','outset','ridge')))
|
743 |
-
{
|
744 |
-
$settings[$key] = $val;
|
745 |
-
}
|
746 |
-
break;
|
747 |
-
case 'closeLocation':
|
748 |
-
if(in_array($val,array('inside','outside')))
|
749 |
-
{
|
750 |
-
$settings[$key] = $val;
|
751 |
-
}
|
752 |
-
break;
|
753 |
-
case 'closePosition':
|
754 |
-
if(in_array($val,array('topright','topleft','bottomright','bottomleft')))
|
755 |
-
{
|
756 |
-
$settings[$key] = $val;
|
757 |
-
}
|
758 |
-
break;
|
759 |
-
case 'contentTitleFontFamily':
|
760 |
-
if(in_array($val,array('Sans-Serif','Tahoma','Georgia','Comic Sans MS','Arial','Lucida Grande','Times New Roman')))
|
761 |
-
{
|
762 |
-
$settings[$key] = $val;
|
763 |
-
}
|
764 |
-
break;
|
765 |
-
}
|
766 |
-
}
|
767 |
-
if(!$silent) $this->message('Theme Updated');
|
768 |
-
}
|
769 |
-
update_option('EasyModal_ThemeList', array(1 => $settings['name']));
|
770 |
-
update_option('EasyModal_Theme-1', $settings);
|
771 |
-
return $settings;
|
772 |
-
}
|
773 |
-
public function defaultSettings()
|
774 |
-
{
|
775 |
-
return array();
|
776 |
-
}
|
777 |
-
public function defaultModalSettings()
|
778 |
-
{
|
779 |
-
return array(
|
780 |
-
'id' => '',
|
781 |
-
'name' => 'change_me',
|
782 |
-
'sitewide' => false,
|
783 |
-
'title' => '',
|
784 |
-
'content' => '',
|
785 |
-
|
786 |
-
'theme' => 1,
|
787 |
-
|
788 |
-
'size' => 'normal',
|
789 |
-
'userHeight' => 0,
|
790 |
-
'userHeightUnit' => 0,
|
791 |
-
'userWidth' => 0,
|
792 |
-
'userWidthUnit' => 0,
|
793 |
-
|
794 |
-
'animation' => 'fade',
|
795 |
-
'direction' => 'bottom',
|
796 |
-
'duration' => 350,
|
797 |
-
'overlayClose' => false,
|
798 |
-
'overlayEscClose' => false,
|
799 |
-
);
|
800 |
-
}
|
801 |
-
public function defaultThemeSettings()
|
802 |
-
{
|
803 |
-
return array(
|
804 |
-
'name' => 'change_me',
|
805 |
-
|
806 |
-
'overlayColor' => '#220E10',
|
807 |
-
'overlayOpacity' => '85',
|
808 |
-
|
809 |
-
'containerBgColor' => '#F7F5E7',
|
810 |
-
'containerPadding' => '10',
|
811 |
-
'containerBorderColor' => '#F0532B',
|
812 |
-
'containerBorderStyle' => 'solid',
|
813 |
-
'containerBorderWidth' => '1',
|
814 |
-
'containerBorderRadius' => '8',
|
815 |
-
'closeLocation' => 'inside',
|
816 |
-
'closeBgColor' => '#000000',
|
817 |
-
'closeFontColor' => '#F0532B',
|
818 |
-
'closeFontSize' => '15',
|
819 |
-
'closeBorderRadius' => '10',
|
820 |
-
'closeSize' => '20',
|
821 |
-
'closeText' => '×',
|
822 |
-
'closePosition' => 'topright',
|
823 |
-
|
824 |
-
'contentTitleFontColor' => '#F0532B',
|
825 |
-
'contentTitleFontSize' => '32',
|
826 |
-
'contentTitleFontFamily' => 'Tahoma',
|
827 |
-
'contentFontColor' => '#F0532B'
|
828 |
-
);
|
829 |
-
}
|
830 |
-
|
831 |
-
public function deleteModal($modal_id)
|
832 |
-
{
|
833 |
-
$modals = get_option('EasyModal_ModalList',array());
|
834 |
-
unset($modals[$modal_id]);
|
835 |
-
update_option('EasyModal_ModalList', $modals);
|
836 |
-
delete_option('EasyModal_Modal-'.$modal_id);
|
837 |
-
$this->message('Modal deleted successfully');
|
838 |
-
}
|
839 |
-
|
840 |
-
public function loadModals()
|
841 |
-
{
|
842 |
-
if(empty($this->loadedModals))
|
843 |
-
{
|
844 |
-
$post_id = get_the_ID();
|
845 |
-
$load_modals = (!empty( $post_id ) && is_array(get_post_meta( $post_id, 'easy_modal_post_modals', true ))) ? get_post_meta( $post_id, 'easy_modal_post_modals', true ) : array();
|
846 |
-
$this->loadedModals = $load_modals;
|
847 |
-
}
|
848 |
-
return $this->loadedModals;
|
849 |
-
}
|
850 |
-
public function enqueue_modals()
|
851 |
-
{
|
852 |
-
return $this->preload_modals();
|
853 |
-
}
|
854 |
-
public function preload_modal_filter($modal)
|
855 |
-
{
|
856 |
-
$load_modals = $this->loadModals();
|
857 |
-
if($modal['sitewide'] == true)
|
858 |
-
{
|
859 |
-
return $modal;
|
860 |
-
}
|
861 |
-
elseif(in_array($modal['id'],$load_modals))
|
862 |
-
{
|
863 |
-
return $modal;
|
864 |
-
}
|
865 |
-
return false;
|
866 |
-
}
|
867 |
-
public function preload_modals()
|
868 |
-
{
|
869 |
-
if(empty($this->preloaded_modals))
|
870 |
{
|
871 |
-
|
872 |
-
foreach($this->getModalList() as $id => $name)
|
873 |
-
{
|
874 |
-
$modal = apply_filters('em_preload_modals_single', $this->getModalSettings($id));
|
875 |
-
if($modal) $modals[$id] = $modal;
|
876 |
-
}
|
877 |
-
$this->preloaded_modals = $modals;
|
878 |
}
|
879 |
-
|
|
|
|
|
|
|
|
|
880 |
}
|
881 |
-
|
|
|
882 |
{
|
883 |
-
|
884 |
-
|
|
|
885 |
{
|
886 |
-
|
887 |
}
|
888 |
}
|
889 |
-
public function
|
890 |
{
|
891 |
-
|
892 |
}
|
893 |
-
public function
|
894 |
{
|
895 |
-
|
896 |
-
|
897 |
-
$
|
898 |
-
'message' => $message,
|
899 |
-
'type' => $type
|
900 |
-
);
|
901 |
-
$_SESSION['easy_modal_messages'][] = array(
|
902 |
-
'message' => $message,
|
903 |
-
'type' => $type
|
904 |
-
);
|
905 |
-
}
|
906 |
-
public function get_messages($type = NULL)
|
907 |
-
{
|
908 |
-
if ( !session_id() )
|
909 |
-
session_start();
|
910 |
-
if (empty($_SESSION['easy_modal_messages']))
|
911 |
-
return false;
|
912 |
-
$messages = $_SESSION['easy_modal_messages'];
|
913 |
-
unset($_SESSION['easy_modal_messages']);
|
914 |
-
return $messages;
|
915 |
-
}
|
916 |
-
|
917 |
-
public function all_numeric($array)
|
918 |
-
{
|
919 |
-
if(!is_array($array))
|
920 |
-
return false;
|
921 |
-
foreach($array as $val)
|
922 |
-
{
|
923 |
-
if(!is_numeric($val))
|
924 |
-
return false;
|
925 |
-
}
|
926 |
-
return true;
|
927 |
}
|
928 |
-
public function
|
929 |
{
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
936 |
}
|
937 |
-
|
938 |
}
|
939 |
-
public function
|
940 |
{
|
941 |
-
|
942 |
-
$
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
// assuming you've got a Screenshots section
|
947 |
-
// @example == Screenshots ==
|
948 |
-
//$changelog = stristr( $changelog, '== Screenshots ==', true );
|
949 |
-
// only return for the current & later versions
|
950 |
-
// assuming you use "= v" to prepend your version numbers
|
951 |
-
// @example = v0.2.1 =
|
952 |
-
$changelog = stristr( $changelog, "= ".EASYMODAL_VERSION );
|
953 |
-
|
954 |
-
$changelog = explode( "\r\n", $changelog);
|
955 |
-
$v = false;
|
956 |
-
$output = '';
|
957 |
-
foreach($changelog as $row)
|
958 |
-
{
|
959 |
-
if(strpos($row,"=") !== false && strpos($row,"=") <= 2)
|
960 |
-
{
|
961 |
-
if($v)
|
962 |
-
{
|
963 |
-
break;
|
964 |
-
}
|
965 |
-
else $v = true;
|
966 |
-
}
|
967 |
-
if(strpos($row,"*") !== false && strpos($row,"*") <= 2)
|
968 |
-
{
|
969 |
-
$row = explode('*', $row);
|
970 |
-
$output .= "<li style='margin:0; padding:0;'>".ltrim(trim($row[1]))."</li>";
|
971 |
-
}
|
972 |
-
}
|
973 |
-
if($output != '')
|
974 |
{
|
975 |
-
|
976 |
-
echo "<p style='margin-bottom:0'>This update includes the following:</p>";
|
977 |
-
echo "<ul style='padding-left:15px;margin:0;line-height:1;list-style:disc;font-size:.85em;'>";
|
978 |
-
echo $output;
|
979 |
-
echo "</ul>";
|
980 |
-
}
|
981 |
-
return;
|
982 |
-
}
|
983 |
|
|
|
|
|
|
|
|
|
984 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
985 |
|
986 |
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
)
|
1000 |
-
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo('url')
|
1001 |
-
);
|
1002 |
-
}
|
1003 |
-
public function check_license()
|
1004 |
-
{
|
1005 |
-
return $this->api_request('license_check');
|
1006 |
-
}
|
1007 |
-
public function activate_domain()
|
1008 |
-
{
|
1009 |
-
return $this->api_request('activate_domain');
|
1010 |
-
}
|
1011 |
-
// Activated With Valid License
|
1012 |
-
public function check_updates($checked_data)
|
1013 |
-
{
|
1014 |
-
unset($checked_data->response[EASYMODAL_SLUG .'/'. EASYMODAL_SLUG .'.php']);
|
1015 |
-
if (empty($checked_data->checked))
|
1016 |
-
{
|
1017 |
-
return $checked_data;
|
1018 |
-
}
|
1019 |
-
$request_string = $this->prepare_request('basic_check');
|
1020 |
-
$request = wp_remote_post($this->api_url, $request_string);
|
1021 |
-
if (!is_wp_error($request) && ($request['response']['code'] == 200))
|
1022 |
-
{
|
1023 |
-
$response = unserialize($request['body']);
|
1024 |
|
1025 |
-
}
|
1026 |
-
if (!empty($response) && is_object($response) && strpos($response->version,'p') !== false) // Feed the update data into WP updater
|
1027 |
-
{
|
1028 |
-
$checked_data->response[EASYMODAL_SLUG .'/'. EASYMODAL_SLUG .'.php'] = $response;
|
1029 |
-
}
|
1030 |
-
return $checked_data;
|
1031 |
-
}
|
1032 |
-
public function get_plugin_info($def, $action, $args)
|
1033 |
-
{
|
1034 |
-
if (empty($args->slug) || $args->slug != EASYMODAL_SLUG)
|
1035 |
-
{
|
1036 |
-
return false;
|
1037 |
-
}
|
1038 |
-
return $this->api_request($action, $args);
|
1039 |
-
}
|
1040 |
-
public function api_request($action, $args = array())
|
1041 |
-
{
|
1042 |
-
$request_string = $this->prepare_request($action, $args);
|
1043 |
-
$request = wp_remote_post($this->api_url, $request_string);
|
1044 |
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1053 |
{
|
1054 |
-
$
|
1055 |
}
|
|
|
|
|
1056 |
}
|
1057 |
-
return $response;
|
1058 |
}
|
1059 |
}
|
1060 |
-
|
|
|
1061 |
{
|
1062 |
-
$
|
1063 |
-
|
1064 |
-
|
1065 |
-
require_once(EASYMODAL_DIR.'/easy-modal-pro.php');
|
1066 |
-
$EM = new Easy_Modal_Pro;
|
1067 |
-
}
|
1068 |
}
|
1069 |
-
|
1070 |
-
{
|
1071 |
-
$EM = new Easy_Modal;
|
1072 |
-
}
|
1073 |
-
add_action('admin_init', 'easymodal_disable_older_versions', 1 );
|
1074 |
-
function easymodal_disable_older_versions()
|
1075 |
-
{
|
1076 |
-
deactivate_plugins(array(
|
1077 |
-
ABSPATH.'wp-content/plugins/easy-modal-lite/easy-modal-lite.php',
|
1078 |
-
ABSPATH.'wp-content/plugins/easy-modal-pro/easy-modal-pro.php'
|
1079 |
-
));
|
1080 |
-
}
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Easy Modal
|
4 |
+
Plugin URI: http://easy-modal.com
|
5 |
Description: Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos & more.
|
6 |
Author: Wizard Internet Solutions
|
7 |
+
Version: 2
|
8 |
Author URI: http://wizardinternetsolutions.com
|
9 |
+
Text Domain: easy-modal
|
10 |
*/
|
11 |
+
if (!defined('EMCORE'))
|
12 |
+
define('EMCORE', __FILE__);
|
13 |
+
if (!defined('EMCORE_NAME'))
|
14 |
+
define('EMCORE_NAME', 'Easy Modal');
|
15 |
+
if (!defined('EMCORE_SLUG'))
|
16 |
+
define('EMCORE_SLUG', trim(dirname(plugin_basename(__FILE__)), '/'));
|
17 |
+
if (!defined('EMCORE_DIR'))
|
18 |
+
define('EMCORE_DIR', WP_PLUGIN_DIR . '/' . EMCORE_SLUG);
|
19 |
+
if (!defined('EMCORE_URL'))
|
20 |
+
define('EMCORE_URL', plugins_url() . '/' . EMCORE_SLUG);
|
21 |
+
if (!defined('EMCORE_NONCE'))
|
22 |
+
define('EMCORE_NONCE', EMCORE_SLUG.'_nonce' );
|
23 |
+
if (!defined('EMCORE_VERSION'))
|
24 |
+
define('EMCORE_VERSION', '2' );
|
25 |
+
if (!defined('EMCORE_DB_VERSION'))
|
26 |
+
define('EMCORE_DB_VERSION', '1' );
|
27 |
+
if (!defined('EMCORE_API_URL'))
|
28 |
+
define('EMCORE_API_URL', 'http://easy-modal.com/api/v2');
|
29 |
|
30 |
+
load_plugin_textdomain( EMCORE_SLUG, false, EMCORE_SLUG.'/languages');
|
31 |
+
|
32 |
+
class EModal {
|
|
|
|
|
33 |
public function __construct()
|
34 |
{
|
35 |
+
$this->initialize_db_tables();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
register_activation_hook( __FILE__, array($this,'activate') );
|
38 |
+
register_activation_hook( __FILE__, array($this,'install_data') );
|
39 |
+
|
40 |
+
add_action('plugins_loaded', array($this, 'activate'));
|
41 |
+
add_action('emodal_db_update', array($this,'install'), 1);
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
if (is_admin())
|
44 |
+
new EModal_Admin;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
else
|
46 |
+
new EModal_Site;
|
47 |
+
|
48 |
+
add_filter('emodal_modal_content', 'wptexturize');
|
49 |
+
add_filter('emodal_modal_content', 'convert_smilies');
|
50 |
+
add_filter('emodal_modal_content', 'convert_chars');
|
51 |
+
add_filter('emodal_modal_content', 'wpautop');
|
52 |
+
add_filter('emodal_modal_content', 'shortcode_unautop');
|
53 |
+
add_filter('emodal_modal_content', 'prepend_attachment');
|
54 |
+
add_filter('emodal_modal_content', 'do_shortcode', 11);
|
55 |
+
// add_filter("plugins_api", array($this, "get_addon_info"), 100, 3);
|
56 |
+
add_filter('plugins_api', array($this, 'inject_addons'), 10, 3);
|
57 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
+
public function inject_addons($response, $action, $args) {
|
60 |
|
61 |
+
$addon_list = EModal_License::available_addons();
|
62 |
+
$addon_slugs = array();
|
63 |
+
$addons = array();
|
64 |
+
foreach($addon_list as $addon)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
{
|
66 |
+
$addon_slugs[] = $addon->slug;
|
67 |
+
$addons[$addon->slug] = $addon;
|
68 |
}
|
69 |
+
//Does this request concern our plugin?
|
70 |
+
if ( ($action !== 'plugin_information') || empty($args->slug) || empty($_GET['em']) || !in_array($args->slug, $addon_slugs) ) {
|
71 |
+
return $response;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
$addon = $addons[$args->slug];
|
75 |
+
//This is basically a stripped-down and simplified version of what the update checker library does.
|
76 |
+
$response = new StdClass();
|
77 |
+
foreach ($addon as $key => $value)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
{
|
79 |
+
$response->$key = $value;
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
+
$response->name = $addon->name;
|
82 |
+
$response->version = $addon->version;
|
83 |
+
$response->download_link = $addon->download_url;
|
84 |
+
|
85 |
+
return $response;
|
86 |
}
|
87 |
+
|
88 |
+
public function initialize_db_tables()
|
89 |
{
|
90 |
+
global $wpdb;
|
91 |
+
$tables = apply_filters('emodal_db_tables', array('em_modals', 'em_modal_metas', 'em_themes', 'em_theme_metas'));
|
92 |
+
foreach($tables as $table)
|
93 |
{
|
94 |
+
$wpdb->{$table} = $wpdb->prefix . $table;
|
95 |
}
|
96 |
}
|
97 |
+
public function process_install($multisite_blog = false)
|
98 |
{
|
99 |
+
do_action('emodal_db_update', $multisite_blog);
|
100 |
}
|
101 |
+
public function install_data()
|
102 |
{
|
103 |
+
$theme = new EModal_Model_Theme;
|
104 |
+
$theme->set_fields(array());
|
105 |
+
$theme->save();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
+
public function activate($networkwide)
|
108 |
{
|
109 |
+
global $wpdb;
|
110 |
+
if (function_exists('is_multisite') && is_multisite()) {
|
111 |
+
// check if it is a network activation - if so, run the activation function for each blog id
|
112 |
+
if ($networkwide)
|
113 |
+
{
|
114 |
+
$old_blog = $wpdb->blogid;
|
115 |
+
// Get all blog ids
|
116 |
+
$blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
|
117 |
+
foreach ($blogids as $blog_id)
|
118 |
+
{
|
119 |
+
switch_to_blog($blog_id);
|
120 |
+
$this->process_install(true);
|
121 |
+
}
|
122 |
+
switch_to_blog($old_blog);
|
123 |
+
return;
|
124 |
+
}
|
125 |
}
|
126 |
+
$this->process_install();
|
127 |
}
|
128 |
+
public function install($multisite_blog)
|
129 |
{
|
130 |
+
global $wpdb, $blog_id, $emodal_db_update_global;
|
131 |
+
$emodal_db_update_global = false;
|
132 |
+
|
133 |
+
$current_version = emodal_get_option(EMCORE_SLUG.'_db_version');
|
134 |
+
if($current_version != EMCORE_DB_VERSION || $emodal_db_update_global)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
{
|
136 |
+
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
+
if ( ! empty($wpdb->charset) )
|
139 |
+
$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
|
140 |
+
if ( ! empty($wpdb->collate) )
|
141 |
+
$charset_collate .= " COLLATE $wpdb->collate";
|
142 |
|
143 |
+
$sql = "CREATE TABLE {$wpdb->prefix}em_themes (
|
144 |
+
id mediumint(9) unsigned NOT NULL AUTO_INCREMENT,
|
145 |
+
name varchar(150) NOT NULL DEFAULT '',
|
146 |
+
created datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
147 |
+
modified datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
148 |
+
is_system tinyint(1) NOT NULL DEFAULT '0',
|
149 |
+
is_active tinyint(1) NOT NULL DEFAULT '1',
|
150 |
+
is_trash tinyint(1) NOT NULL DEFAULT '0',
|
151 |
+
PRIMARY KEY (id)
|
152 |
+
)$charset_collate;";
|
153 |
+
dbDelta( $sql );
|
154 |
|
155 |
|
156 |
+
$sql = "CREATE TABLE {$wpdb->prefix}em_theme_metas (
|
157 |
+
id mediumint(9) unsigned NOT NULL AUTO_INCREMENT,
|
158 |
+
theme_id mediumint(9) unsigned NOT NULL,
|
159 |
+
overlay longtext,
|
160 |
+
container longtext,
|
161 |
+
close longtext,
|
162 |
+
title longtext,
|
163 |
+
content longtext,
|
164 |
+
PRIMARY KEY (id),
|
165 |
+
KEY theme_id (theme_id),
|
166 |
+
CONSTRAINT {$wpdb->prefix}em_theme_metas_ibfk_1 FOREIGN KEY (theme_id) REFERENCES {$wpdb->prefix}em_themes (id) ON DELETE CASCADE ON UPDATE CASCADE
|
167 |
+
)$charset_collate;";
|
168 |
+
dbDelta( $sql );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
+
$sql = "CREATE TABLE {$wpdb->prefix}em_modals (
|
172 |
+
id mediumint(9) unsigned NOT NULL AUTO_INCREMENT,
|
173 |
+
theme_id mediumint(9) unsigned NOT NULL DEFAULT '1',
|
174 |
+
name varchar(150) NOT NULL DEFAULT '',
|
175 |
+
title varchar(255) DEFAULT NULL,
|
176 |
+
content longtext,
|
177 |
+
created datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
178 |
+
modified datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
179 |
+
is_sitewide tinyint(1) NOT NULL DEFAULT '0',
|
180 |
+
is_system tinyint(1) NOT NULL DEFAULT '0',
|
181 |
+
is_active tinyint(1) NOT NULL DEFAULT '1',
|
182 |
+
is_trash tinyint(1) NOT NULL DEFAULT '0',
|
183 |
+
PRIMARY KEY (id),
|
184 |
+
KEY {$wpdb->prefix}em_modals_ibfk_1 (theme_id),
|
185 |
+
CONSTRAINT {$wpdb->prefix}em_modals_ibfk_1 FOREIGN KEY (theme_id) REFERENCES {$wpdb->prefix}em_themes (id) ON DELETE RESTRICT ON UPDATE CASCADE
|
186 |
+
)$charset_collate;";
|
187 |
+
dbDelta( $sql );
|
188 |
+
|
189 |
+
|
190 |
+
$sql = "CREATE TABLE {$wpdb->prefix}em_modal_metas (
|
191 |
+
id mediumint(9) unsigned NOT NULL AUTO_INCREMENT,
|
192 |
+
modal_id mediumint(9) unsigned NOT NULL,
|
193 |
+
display longtext,
|
194 |
+
close longtext,
|
195 |
+
PRIMARY KEY (id),
|
196 |
+
KEY modal_id (modal_id),
|
197 |
+
CONSTRAINT {$wpdb->prefix}em_modal_metas_ibfk_1 FOREIGN KEY (modal_id) REFERENCES {$wpdb->prefix}em_modals (id) ON DELETE CASCADE ON UPDATE CASCADE
|
198 |
+
)$charset_collate;";
|
199 |
+
dbDelta( $sql );
|
200 |
+
|
201 |
+
if(!$current_version)
|
202 |
{
|
203 |
+
$this->install_data();
|
204 |
}
|
205 |
+
emodal_update_option(EMCORE_SLUG.'_db_version', EMCORE_DB_VERSION);
|
206 |
+
$emodal_db_update_global = true;
|
207 |
}
|
|
|
208 |
}
|
209 |
}
|
210 |
+
add_action('plugins_loaded', 'emodal_initialize', 5);
|
211 |
+
function emodal_initialize()
|
212 |
{
|
213 |
+
global $EModal, $EModal_License;
|
214 |
+
require EMCORE_DIR.'/init.php';
|
215 |
+
$EModal = new EModal;
|
|
|
|
|
|
|
216 |
}
|
217 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/classes/gravityforms.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class EM_GravityForms {
|
3 |
-
public function __construct()
|
4 |
-
{
|
5 |
-
add_filter('em_preload_modals_single', array(&$this,'preload_modals'));
|
6 |
-
}
|
7 |
-
|
8 |
-
public function preload_modals($modal)
|
9 |
-
{
|
10 |
-
if(has_shortcode( $modal['content'], 'gravityform' ))
|
11 |
-
{
|
12 |
-
$regex = "/\[gravityform.*? id=[\"\']?([0-9]*)[\"\']?.*/";
|
13 |
-
preg_match_all($regex, $modal['content'],$matches);
|
14 |
-
foreach($matches[1] as $form_id)
|
15 |
-
{
|
16 |
-
add_filter("gform_confirmation_anchor_{$form_id}", create_function("","return false;"));
|
17 |
-
gravity_form_enqueue_scripts($form_id, true);
|
18 |
-
}
|
19 |
-
}
|
20 |
-
return $modal;
|
21 |
-
}
|
22 |
-
}
|
23 |
-
$EM_GravityForms = new EM_GravityForms;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/classes/shortcodes.php
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class EM_Shortcodes
|
3 |
-
{
|
4 |
-
public function __construct()
|
5 |
-
{
|
6 |
-
add_shortcode( 'modal', array(&$this, 'modal'));
|
7 |
-
}
|
8 |
-
public function modal($atts, $content = NULL)
|
9 |
-
{
|
10 |
-
extract( shortcode_atts( array(
|
11 |
-
'id' => "",
|
12 |
-
'title' => "",
|
13 |
-
'theme' => 1,
|
14 |
-
'size' => "normal",
|
15 |
-
'width' => "",
|
16 |
-
'widthUnit' => "px",
|
17 |
-
'height' => "",
|
18 |
-
'heightUnit' => "px",
|
19 |
-
'animation' => "fade",
|
20 |
-
'duration' => 350,
|
21 |
-
'direction' => "down",
|
22 |
-
'overlayClose' => false,
|
23 |
-
'overlayEscClose' => false,
|
24 |
-
'closeDisabled' => false,
|
25 |
-
), $atts ) );
|
26 |
-
$output = "<div ".
|
27 |
-
"id='eModal-" . esc_attr($id) . "' ".
|
28 |
-
"class='modal " . esc_attr($size != 'custom' ? "{$size} " : ""). "theme-{$theme}' ".
|
29 |
-
"data-Theme='{$theme}' ".
|
30 |
-
"data-size='{$size}' ".
|
31 |
-
($size == 'custom' ?
|
32 |
-
"style='width:{$width}{$widthUnit};height:{$height}{$heightUnit};margin-left:-".($width/2)."{$widthUnit}' ".
|
33 |
-
"data-userHeight='{$height}{$heightUnit}' ".
|
34 |
-
"data-userWidth='{$width}{$widthUnit}' "
|
35 |
-
: "").
|
36 |
-
"data-Animation='{$animation}' ".
|
37 |
-
"data-direction='{$direction}' ".
|
38 |
-
"data-duration='{$duration}' ".
|
39 |
-
($overlayClose ? "data-overlaylose='true' " : "") .
|
40 |
-
($overlayEscClose ? "data-escclose='true' " : "") .
|
41 |
-
($closeDisabled ? "data-closedisabled='true' " : "") .
|
42 |
-
">";
|
43 |
-
if($title != '')
|
44 |
-
{
|
45 |
-
$output .= "<div class='title'>" . esc_html($title) . "</div>";
|
46 |
-
}
|
47 |
-
$output .= apply_filters('em_modal_content', $content);
|
48 |
-
if(!$closeDisabled)
|
49 |
-
{
|
50 |
-
$output .= "<a class='close-modal'>×</a>";
|
51 |
-
}
|
52 |
-
$output .= "</div>";
|
53 |
-
return $output;
|
54 |
-
}
|
55 |
-
}
|
56 |
-
$EM_Shortcodes = new EM_Shortcodes;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/classes/updater_skin.php
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
4 |
-
|
5 |
-
class EM_Updater_Skin extends WP_Upgrader_Skin {
|
6 |
-
var $messages = array();
|
7 |
-
|
8 |
-
function __construct( $args = array() ) {
|
9 |
-
parent::__construct( $args );
|
10 |
-
}
|
11 |
-
|
12 |
-
function feedback( $data ) {
|
13 |
-
if ( is_wp_error( $data ) )
|
14 |
-
$string = $data->get_error_message();
|
15 |
-
else if ( is_array( $data ) )
|
16 |
-
return;
|
17 |
-
else
|
18 |
-
$string = $data;
|
19 |
-
|
20 |
-
if ( ! empty( $this->upgrader->strings[ $string ] ) )
|
21 |
-
$string = $this->upgrader->strings[ $string ];
|
22 |
-
|
23 |
-
if ( strpos( $string, '%' ) !== false ) {
|
24 |
-
$args = func_get_args();
|
25 |
-
$args = array_splice( $args, 1 );
|
26 |
-
if ( ! empty( $args ) )
|
27 |
-
$string = vsprintf( $string, $args );
|
28 |
-
}
|
29 |
-
|
30 |
-
$string = trim( $string );
|
31 |
-
|
32 |
-
// Only allow basic HTML in the messages
|
33 |
-
$string = wp_kses( $string, array( 'a' => array( 'href' => array() ), 'br' => array(), 'em' => array(), 'strong' => array() ) );
|
34 |
-
|
35 |
-
if ( empty( $string ) )
|
36 |
-
return;
|
37 |
-
|
38 |
-
$this->messages[] = $string;
|
39 |
-
}
|
40 |
-
|
41 |
-
function header() {
|
42 |
-
ob_start();
|
43 |
-
}
|
44 |
-
|
45 |
-
function footer() {
|
46 |
-
$output = ob_get_contents();
|
47 |
-
if ( ! empty( $output ) )
|
48 |
-
$this->feedback( $output );
|
49 |
-
ob_end_clean();
|
50 |
-
}
|
51 |
-
function bulk_header() {}
|
52 |
-
function bulk_footer() {}
|
53 |
-
function before() {}
|
54 |
-
function after() {}
|
55 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/css/easy-modal-admin.css
DELETED
@@ -1,174 +0,0 @@
|
|
1 |
-
.quicktags-toolbar input{
|
2 |
-
width:auto;
|
3 |
-
}
|
4 |
-
#icon-easy-modal {
|
5 |
-
background: transparent url('../images/admin/easy-modal-icon.png') no-repeat;
|
6 |
-
}
|
7 |
-
#poststuff h2#em-tabs { margin-bottom:0; }
|
8 |
-
.em-tab {
|
9 |
-
display: none;
|
10 |
-
}
|
11 |
-
.em-tab.active {
|
12 |
-
display: block;
|
13 |
-
padding: 0.5em 0.9em;
|
14 |
-
border: 1px solid #ddd;
|
15 |
-
background-color: #fff;
|
16 |
-
border-radius: 0 3px 3px 3px;
|
17 |
-
}
|
18 |
-
.colorSelect {
|
19 |
-
width:100px!important;
|
20 |
-
display:inline-block;
|
21 |
-
}
|
22 |
-
.color-swatch {
|
23 |
-
margin-top:1px;
|
24 |
-
margin-right:10px;
|
25 |
-
width:1.75em;
|
26 |
-
height:1.75em;
|
27 |
-
display:block;
|
28 |
-
float:left;
|
29 |
-
border-style: solid;
|
30 |
-
border-width: 1px;
|
31 |
-
border-radius: 3px;
|
32 |
-
cursor:pointer;
|
33 |
-
}
|
34 |
-
#userHeight, #userWidth, #duration{
|
35 |
-
width:100px;
|
36 |
-
}
|
37 |
-
.share-buttons {
|
38 |
-
margin:0;
|
39 |
-
width:100%;
|
40 |
-
display:block;
|
41 |
-
clear:both;
|
42 |
-
}
|
43 |
-
.share-buttons li {
|
44 |
-
text-align:center;
|
45 |
-
width:32%;
|
46 |
-
display:inline-block; float:left; margin-right:1%;
|
47 |
-
margin-bottom:0;
|
48 |
-
}
|
49 |
-
.share-buttons li:last-child {
|
50 |
-
margin-right:0;
|
51 |
-
}
|
52 |
-
ul.bullets {
|
53 |
-
padding-left:1em;
|
54 |
-
list-style:circle;
|
55 |
-
}
|
56 |
-
ul.bullets li {
|
57 |
-
margin-bottom:.125em;
|
58 |
-
}
|
59 |
-
.postbox .inside p, .postbox .inside ul { margin-top:0; }
|
60 |
-
.postbox .inside h2,
|
61 |
-
.postbox .inside h3,
|
62 |
-
.postbox .inside h4,
|
63 |
-
.postbox .inside h5,
|
64 |
-
.postbox .inside h6 { margin-bottom:0; }
|
65 |
-
.modal h2,
|
66 |
-
.modal h3,
|
67 |
-
.modal h4,
|
68 |
-
.modal h5,
|
69 |
-
.modal h6 { margin-bottom:.5em; }
|
70 |
-
.modal img.left { margin-right:.5em; }
|
71 |
-
.modal img.right { margin-left:.5em; }
|
72 |
-
.modal p { margin-top:0; }
|
73 |
-
.value-slider { margin-right:10px; min-width:75%; display:inline-block; }
|
74 |
-
.slider-value { display:inline-block; }
|
75 |
-
.nav-tab { margin-right:0; }
|
76 |
-
|
77 |
-
.empreview{width:42%;float:left;position:relative;border:1px solid #666}
|
78 |
-
.empreview h2{text-align:center;color:#fff;margin:0 7px;font-size:30px;position:relative}
|
79 |
-
#eModal-Preview .example-modal {
|
80 |
-
position:relative;
|
81 |
-
width:300px;
|
82 |
-
top:10px;
|
83 |
-
margin:auto;
|
84 |
-
font-size:16px;
|
85 |
-
position: relative;
|
86 |
-
z-index: 99;
|
87 |
-
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
88 |
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
89 |
-
}
|
90 |
-
#eModal-Preview .example-modal .close-modal {
|
91 |
-
text-decoration:none;
|
92 |
-
text-align:center;
|
93 |
-
font-size: 1.375em;
|
94 |
-
line-height: 1;
|
95 |
-
position: absolute;
|
96 |
-
top: 0.5em;
|
97 |
-
right: 0.6875em;
|
98 |
-
color: #aaa;
|
99 |
-
text-shadow: 0 -1px 1px rbga(0,0,0,.6);
|
100 |
-
font-weight: bold;
|
101 |
-
cursor: pointer;
|
102 |
-
}
|
103 |
-
#eModal-Preview .example-modal, #eModal-Preview .example-modal-overlay { display:block; }
|
104 |
-
.empreview #eModal-Preview{height:450px;width:100%;position:relative}
|
105 |
-
.example-modal-overlay{position:absolute;width:100%;height:100%;top:0;left:0}
|
106 |
-
.emthemes{display:inline-block;float:left;width:57%;margin-right:.5%}
|
107 |
-
.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/admin/colorpicker_background.png);font-family:Arial,Helvetica,sans-serif;display:none;z-index:1000}
|
108 |
-
.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}
|
109 |
-
.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/admin/colorpicker_overlay.png)}
|
110 |
-
.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/admin/colorpicker_select.gif);margin:-5px 0 0 -5px}
|
111 |
-
.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}
|
112 |
-
.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/admin/colorpicker_indic.gif) left top;left:0;margin:-4px 0 0}
|
113 |
-
.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:red}
|
114 |
-
.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:red}
|
115 |
-
.colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;height:11px;margin:0;padding:0}
|
116 |
-
.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/admin/colorpicker_hex.png) top;left:212px;top:142px}
|
117 |
-
.colorpicker_hex input{right:6px}
|
118 |
-
.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}
|
119 |
-
.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}
|
120 |
-
.colorpicker_rgb_r{background-image:url(../images/admin/colorpicker_rgb_r.png);top:52px;left:212px}
|
121 |
-
.colorpicker_rgb_g{background-image:url(../images/admin/colorpicker_rgb_g.png);top:82px;left:212px}
|
122 |
-
.colorpicker_rgb_b{background-image:url(../images/admin/colorpicker_rgb_b.png);top:112px;left:212px}
|
123 |
-
.colorpicker_hsb_h{background-image:url(../images/admin/colorpicker_hsb_h.png);top:52px;left:282px}
|
124 |
-
.colorpicker_hsb_s{background-image:url(../images/admin/colorpicker_hsb_s.png);top:82px;left:282px}
|
125 |
-
.colorpicker_hsb_b{background-image:url(../images/admin/colorpicker_hsb_b.png);top:112px;left:282px}
|
126 |
-
.colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/admin/colorpicker_submit.png) top;left:322px;top:142px;overflow:hidden}
|
127 |
-
.colorpicker_focus{background-position:center}
|
128 |
-
.colorpicker_hex.colorpicker_focus,.colorpicker_submit.colorpicker_focus,.colorpicker_slider{background-position:bottom}
|
129 |
-
/*!
|
130 |
-
* jQuery UI CSS Framework 1.8.22
|
131 |
-
*
|
132 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
133 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
134 |
-
* http://jquery.org/license
|
135 |
-
*
|
136 |
-
* http://docs.jquery.com/UI/Theming/API
|
137 |
-
*
|
138 |
-
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
139 |
-
*/
|
140 |
-
.ui-widget{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1.1em}
|
141 |
-
.ui-widget-content{border:1px solid #a6c9e2;background:#fcfdfd url(../images/admin/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;color:#222}
|
142 |
-
.ui-widget-content a{color:#222}
|
143 |
-
.ui-widget-header{border:1px solid #4297d7;background:#5c9ccc url(../images/admin/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold}
|
144 |
-
.ui-state-default,.ui-widget-content .ui-state-default{border:1px solid #c5dbec;background:#dfeffc url(../images/admin/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#2e6e9e}
|
145 |
-
.ui-corner-all{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-khtml-border-top-left-radius:5px;border-top-left-radius:5px}
|
146 |
-
.ui-corner-all{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-khtml-border-top-right-radius:5px;border-top-right-radius:5px}
|
147 |
-
.ui-corner-all{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-khtml-border-bottom-left-radius:5px;border-bottom-left-radius:5px}
|
148 |
-
.ui-corner-all{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px}
|
149 |
-
/*!
|
150 |
-
* jQuery UI Slider 1.8.22
|
151 |
-
*/
|
152 |
-
.ui-slider{position:relative;text-align:left}
|
153 |
-
.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}
|
154 |
-
.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}
|
155 |
-
.ui-slider-horizontal{height:.8em}
|
156 |
-
.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}
|
157 |
-
.ui-slider-horizontal .ui-slider-range{top:0;height:100%}
|
158 |
-
.ui-slider-horizontal .ui-slider-range-min{left:0}
|
159 |
-
.ui-slider-horizontal .ui-slider-range-max{right:0}
|
160 |
-
.ui-slider-vertical{width:.8em;height:100px}
|
161 |
-
.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}
|
162 |
-
.ui-slider-vertical .ui-slider-range{left:0;width:100%}
|
163 |
-
.ui-slider-vertical .ui-slider-range-min{bottom:0}
|
164 |
-
.ui-slider-vertical .ui-slider-range-max{top:0}
|
165 |
-
.cb-enable,.cb-disable,.cb-enable span,.cb-disable span{background:url(../images/admin/switch.gif) repeat-x;display:block;float:left}
|
166 |
-
.cb-enable span,.cb-disable span{line-height:30px;display:block;background-repeat:no-repeat;font-weight:bold}
|
167 |
-
.cb-enable span{background-position:left -90px;padding:0 10px}
|
168 |
-
.cb-disable span{background-position:right -180px;padding:0 10px}
|
169 |
-
.cb-disable.selected{background-position:0 -30px}
|
170 |
-
.cb-disable.selected span{background-position:right -210px;color:#fff}
|
171 |
-
.cb-enable.selected{background-position:0 -60px}
|
172 |
-
.cb-enable.selected span{background-position:left -150px;color:#fff}
|
173 |
-
.switch label{cursor:pointer}
|
174 |
-
.switch input{display:none}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/css/easy-modal-admin.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.quicktags-toolbar input{width:auto;}#icon-easy-modal{background:transparent url(../images/admin/easy-modal-icon.png) no-repeat}#poststuff h2#em-tabs{margin-bottom:0}.em-tab{display:none}.em-tab.active{display:block;padding:.5em .9em;border:1px solid #ddd;background-color:#fff;border-radius:0 3px 3px}.colorSelect{width:100px!important;display:inline-block}.color-swatch{margin-top:1px;margin-right:10px;width:1.75em;height:1.75em;display:block;float:left;border-style:solid;border-width:1px;border-radius:3px;cursor:pointer}#userHeight,#userWidth,#duration{width:100px}.share-buttons{margin:0;width:100%;display:block;clear:both}.share-buttons li{text-align:center;width:32%;display:inline-block;float:left;margin-right:1%;margin-bottom:0}.share-buttons li:last-child{margin-right:0}ul.bullets{padding-left:1em;list-style:circle}ul.bullets li{margin-bottom:.125em}.postbox .inside p,.postbox .inside ul{margin-top:0}.postbox .inside h2,.postbox .inside h3,.postbox .inside h4,.postbox .inside h5,.postbox .inside h6{margin-bottom:0}.modal h2,.modal h3,.modal h4,.modal h5,.modal h6{margin-bottom:.5em}.modal img.left{margin-right:.5em}.modal img.right{margin-left:.5em}.modal p{margin-top:0}.value-slider{margin-right:10px;min-width:75%;display:inline-block}.slider-value{display:inline-block}.nav-tab{margin-right:0}.empreview{width:42%;float:left;position:relative;border:1px solid #666}.empreview h2{text-align:center;color:#fff;margin:0 7px;font-size:30px;position:relative}#eModal-Preview .example-modal{position:relative;width:300px;top:10px;margin:auto;font-size:16px;position:relative;z-index:99;-webkit-box-shadow:0 0 10px rgba(0,0,0,.4);box-shadow:0 0 10px rgba(0,0,0,.4)}#eModal-Preview .example-modal .close-modal{text-decoration:none;text-align:center;font-size:1.375em;line-height:1;position:absolute;top:.5em;right:.6875em;color:#aaa;text-shadow:0 -1px 1px rbga(0,0,0,.6);font-weight:700;cursor:pointer}#eModal-Preview .example-modal,#eModal-Preview .example-modal-overlay{display:block}.empreview #eModal-Preview{height:450px;width:100%;position:relative}.example-modal-overlay{position:absolute;width:100%;height:100%;top:0;left:0}.emthemes{display:inline-block;float:left;width:57%;margin-right:.5%}.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/admin/colorpicker_background.png);font-family:Arial,Helvetica,sans-serif;display:none;z-index:1000}.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/admin/colorpicker_overlay.png)}.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/admin/colorpicker_select.gif);margin:-5px 0 0 -5px}.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/admin/colorpicker_indic.gif) left top;left:0;margin:-4px 0 0}.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:red}.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:red}.colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;height:11px;margin:0;padding:0}.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/admin/colorpicker_hex.png) top;left:212px;top:142px}.colorpicker_hex input{right:6px}.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}.colorpicker_rgb_r{background-image:url(../images/admin/colorpicker_rgb_r.png);top:52px;left:212px}.colorpicker_rgb_g{background-image:url(../images/admin/colorpicker_rgb_g.png);top:82px;left:212px}.colorpicker_rgb_b{background-image:url(../images/admin/colorpicker_rgb_b.png);top:112px;left:212px}.colorpicker_hsb_h{background-image:url(../images/admin/colorpicker_hsb_h.png);top:52px;left:282px}.colorpicker_hsb_s{background-image:url(../images/admin/colorpicker_hsb_s.png);top:82px;left:282px}.colorpicker_hsb_b{background-image:url(../images/admin/colorpicker_hsb_b.png);top:112px;left:282px}.colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/admin/colorpicker_submit.png) top;left:322px;top:142px;overflow:hidden}.colorpicker_focus{background-position:center}.colorpicker_hex.colorpicker_focus,.colorpicker_submit.colorpicker_focus,.colorpicker_slider{background-position:bottom}.ui-widget{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1.1em}.ui-widget-content{border:1px solid #a6c9e2;background:#fcfdfd url(../images/admin/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #4297d7;background:#5c9ccc url(../images/admin/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:700}.ui-state-default,.ui-widget-content .ui-state-default{border:1px solid #c5dbec;background:#dfeffc url(../images/admin/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x;font-weight:700;color:#2e6e9e}.ui-corner-all{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-khtml-border-top-left-radius:5px;border-top-left-radius:5px}.ui-corner-all{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-khtml-border-top-right-radius:5px;border-top-right-radius:5px}.ui-corner-all{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-khtml-border-bottom-left-radius:5px;border-bottom-left-radius:5px}.ui-corner-all{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.cb-enable,.cb-disable,.cb-enable span,.cb-disable span{background:url(../images/admin/switch.gif) repeat-x;display:block;float:left}.cb-enable span,.cb-disable span{line-height:30px;display:block;background-repeat:no-repeat;font-weight:700}.cb-enable span{background-position:left -90px;padding:0 10px}.cb-disable span{background-position:right -180px;padding:0 10px}.cb-disable.selected{background-position:0 -30px}.cb-disable.selected span{background-position:right -210px;color:#fff}.cb-enable.selected{background-position:0 -60px}.cb-enable.selected span{background-position:left -150px;color:#fff}.switch label{cursor:pointer}.switch input{display:none}
|
|
inc/css/easy-modal.css
DELETED
@@ -1,98 +0,0 @@
|
|
1 |
-
#modal-overlay {
|
2 |
-
position: fixed;
|
3 |
-
height: 100%;
|
4 |
-
width: 100%;
|
5 |
-
background: #000;
|
6 |
-
background: rgba(0,0,0,0.45);
|
7 |
-
z-index: 998;
|
8 |
-
display: none;
|
9 |
-
top: 0;
|
10 |
-
left: 0;
|
11 |
-
}
|
12 |
-
/*.modal, .modal:before, .modal:after, .modal * {
|
13 |
-
-moz-box-sizing: border-box;
|
14 |
-
}*/
|
15 |
-
.modal {
|
16 |
-
font-size: 16px;
|
17 |
-
display: none;
|
18 |
-
visibility: hidden;
|
19 |
-
top: 100px;
|
20 |
-
left: 50%;
|
21 |
-
margin-left: -40%;
|
22 |
-
width: 80%;
|
23 |
-
height: auto;
|
24 |
-
background-color: white;
|
25 |
-
border: solid 1px #666;
|
26 |
-
overflow:visible;
|
27 |
-
position: absolute;
|
28 |
-
z-index: 999;
|
29 |
-
padding: 1.25em;
|
30 |
-
-webkit-border-radius: 5px;
|
31 |
-
border-radius: 5px;
|
32 |
-
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
33 |
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
34 |
-
transform: scale(1, 1);
|
35 |
-
transform-origin: 0;
|
36 |
-
}
|
37 |
-
.modal .close-modal {
|
38 |
-
text-decoration: none;
|
39 |
-
text-align: center;
|
40 |
-
font-size: 1.375em;
|
41 |
-
line-height: 1;
|
42 |
-
position: absolute;
|
43 |
-
top: .5em;
|
44 |
-
right: .6875em;
|
45 |
-
color: #aaa;
|
46 |
-
text-shadow: 0 -1px 1px rbga(0, 0, 0, .6);
|
47 |
-
font-weight: bold;
|
48 |
-
cursor: pointer;
|
49 |
-
}
|
50 |
-
.modal .title {
|
51 |
-
display: block;
|
52 |
-
}
|
53 |
-
.modal-placeholder {
|
54 |
-
z-index: 100;
|
55 |
-
left: 50%;
|
56 |
-
position: absolute;
|
57 |
-
}
|
58 |
-
@media only screen and (min-width: 768px) {
|
59 |
-
.modal {
|
60 |
-
padding: 1.875em;
|
61 |
-
top: 6.25em;
|
62 |
-
}
|
63 |
-
.modal.nano {
|
64 |
-
margin-left: -10%;
|
65 |
-
width: 20%;
|
66 |
-
}
|
67 |
-
.modal.tiny {
|
68 |
-
margin-left: -15%;
|
69 |
-
width: 30%;
|
70 |
-
}
|
71 |
-
.modal.small {
|
72 |
-
margin-left: -20%;
|
73 |
-
width: 40%;
|
74 |
-
}
|
75 |
-
.modal.medium {
|
76 |
-
margin-left: -30%;
|
77 |
-
width: 60%;
|
78 |
-
}
|
79 |
-
.modal.large {
|
80 |
-
margin-left: -35%;
|
81 |
-
width: 70%;
|
82 |
-
}
|
83 |
-
.modal.xlarge {
|
84 |
-
margin-left: -47.5%;
|
85 |
-
width: 95%;
|
86 |
-
}
|
87 |
-
.modal>:first-child {
|
88 |
-
margin-top: 0;
|
89 |
-
}
|
90 |
-
.modal>:last-child {
|
91 |
-
margin-bottom: 0;
|
92 |
-
}
|
93 |
-
}
|
94 |
-
@media print {
|
95 |
-
.modal {
|
96 |
-
background: white!important;
|
97 |
-
}
|
98 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/css/easy-modal.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
#modal-overlay{position:fixed;height:100%;width:100%;background:#000;background:rgba(0,0,0,0.45);z-index:998;display:none;top:0;left:0}.modal{font-size:16px;display:none;visibility:hidden;top:100px;left:50%;margin-left:-40%;width:80%;height:auto;background-color:white;border:solid 1px #666;overflow:visible;position:absolute;z-index:999;padding:1.25em;-webkit-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 0 10px rgba(0,0,0,0.4);box-shadow:0 0 10px rgba(0,0,0,0.4);transform:scale(1,1);transform-origin:0 0}.modal .close-modal{text-decoration:none;text-align:center;font-size:1.375em;line-height:1;position:absolute;top:.5em;right:.6875em;color:#aaa;text-shadow:0 -1px 1px rbga(0,0,0,.6);font-weight:bold;cursor:pointer}.modal .title{display:block}.modal-placeholder{z-index:100;left:50%;position:absolute}@media only screen and (min-width:768px){.modal{padding:1.875em;top:6.25em}.modal.nano{margin-left:-10%;width:20%}.modal.tiny{margin-left:-15%;width:30%}.modal.small{margin-left:-20%;width:40%}.modal.medium{margin-left:-30%;width:60%}.modal.large{margin-left:-35%;width:70%}.modal.xlarge{margin-left:-47.5%;width:95%}.modal>:first-child{margin-top:0}.modal>:last-child{margin-bottom:0}}@media print{.modal{background:white !important}}
|
|
inc/functions.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if(!function_exists('modal_open'))
|
3 |
-
{
|
4 |
-
function modal_open($atts)
|
5 |
-
{
|
6 |
-
global $EM_Shortcodes;
|
7 |
-
$EM_Shortcodes
|
8 |
-
}
|
9 |
-
}
|
10 |
-
if(!function_exists('modal_close'))
|
11 |
-
{
|
12 |
-
function modal_close()
|
13 |
-
{
|
14 |
-
|
15 |
-
}
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/images/admin/affiliate.jpg
DELETED
Binary file
|
inc/images/admin/affiliate.png
DELETED
Binary file
|
inc/images/admin/bonus.png
DELETED
Binary file
|
inc/images/admin/color_selector.png
DELETED
Binary file
|
inc/images/admin/colorpicker_background.png
DELETED
Binary file
|
inc/images/admin/colorpicker_hex.png
DELETED
Binary file
|
inc/images/admin/colorpicker_hsb_b.png
DELETED
Binary file
|
inc/images/admin/colorpicker_hsb_h.png
DELETED
Binary file
|
inc/images/admin/colorpicker_hsb_s.png
DELETED
Binary file
|
inc/images/admin/colorpicker_indic.gif
DELETED
Binary file
|
inc/images/admin/colorpicker_overlay.png
DELETED
Binary file
|
inc/images/admin/colorpicker_rgb_b.png
DELETED
Binary file
|
inc/images/admin/colorpicker_rgb_g.png
DELETED
Binary file
|
inc/images/admin/colorpicker_rgb_r.png
DELETED
Binary file
|
inc/images/admin/colorpicker_select.gif
DELETED
Binary file
|
inc/images/admin/colorpicker_submit.png
DELETED
Binary file
|
inc/images/admin/dashboard-icon.png
DELETED
Binary file
|
inc/images/admin/easy-modal-icon.png
DELETED
Binary file
|
inc/images/admin/switch.gif
DELETED
Binary file
|
inc/images/admin/ui-bg_flat_0_aaaaaa_40x100.png
DELETED
Binary file
|
inc/images/admin/ui-bg_flat_55_fbec88_40x100.png
DELETED
Binary file
|
inc/images/admin/ui-bg_glass_75_d0e5f5_1x400.png
DELETED
Binary file
|
inc/images/admin/ui-bg_glass_85_dfeffc_1x400.png
DELETED
Binary file
|
inc/images/admin/ui-bg_glass_95_fef1ec_1x400.png
DELETED
Binary file
|
inc/images/admin/ui-bg_gloss-wave_55_5c9ccc_500x100.png
DELETED
Binary file
|
inc/images/admin/ui-bg_inset-hard_100_f5f8f9_1x100.png
DELETED
Binary file
|
inc/images/admin/ui-bg_inset-hard_100_fcfdfd_1x100.png
DELETED
Binary file
|
inc/images/admin/ui-icons_217bc0_256x240.png
DELETED
Binary file
|
inc/images/admin/ui-icons_2e83ff_256x240.png
DELETED
Binary file
|
inc/images/admin/ui-icons_469bdd_256x240.png
DELETED
Binary file
|
inc/images/admin/ui-icons_6da8d5_256x240.png
DELETED
Binary file
|
inc/images/admin/ui-icons_cd0a0a_256x240.png
DELETED
Binary file
|
inc/images/admin/ui-icons_d8e7f3_256x240.png
DELETED
Binary file
|
inc/images/admin/ui-icons_f9bd01_256x240.png
DELETED
Binary file
|
inc/images/loader.gif
DELETED
Binary file
|
inc/js/colorpicker.js
DELETED
@@ -1,484 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
*
|
3 |
-
* Color picker
|
4 |
-
* Author: Stefan Petre www.eyecon.ro
|
5 |
-
*
|
6 |
-
* Dual licensed under the MIT and GPL licenses
|
7 |
-
*
|
8 |
-
*/
|
9 |
-
(function ($) {
|
10 |
-
var ColorPicker = function () {
|
11 |
-
var
|
12 |
-
ids = {},
|
13 |
-
inAction,
|
14 |
-
charMin = 65,
|
15 |
-
visible,
|
16 |
-
tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
|
17 |
-
defaults = {
|
18 |
-
eventName: 'click',
|
19 |
-
onShow: function () {},
|
20 |
-
onBeforeShow: function(){},
|
21 |
-
onHide: function () {},
|
22 |
-
onChange: function () {},
|
23 |
-
onSubmit: function () {},
|
24 |
-
color: 'ff0000',
|
25 |
-
livePreview: true,
|
26 |
-
flat: false
|
27 |
-
},
|
28 |
-
fillRGBFields = function (hsb, cal) {
|
29 |
-
var rgb = HSBToRGB(hsb);
|
30 |
-
$(cal).data('colorpicker').fields
|
31 |
-
.eq(1).val(rgb.r).end()
|
32 |
-
.eq(2).val(rgb.g).end()
|
33 |
-
.eq(3).val(rgb.b).end();
|
34 |
-
},
|
35 |
-
fillHSBFields = function (hsb, cal) {
|
36 |
-
$(cal).data('colorpicker').fields
|
37 |
-
.eq(4).val(hsb.h).end()
|
38 |
-
.eq(5).val(hsb.s).end()
|
39 |
-
.eq(6).val(hsb.b).end();
|
40 |
-
},
|
41 |
-
fillHexFields = function (hsb, cal) {
|
42 |
-
$(cal).data('colorpicker').fields
|
43 |
-
.eq(0).val(HSBToHex(hsb)).end();
|
44 |
-
},
|
45 |
-
setSelector = function (hsb, cal) {
|
46 |
-
$(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
|
47 |
-
$(cal).data('colorpicker').selectorIndic.css({
|
48 |
-
left: parseInt(150 * hsb.s/100, 10),
|
49 |
-
top: parseInt(150 * (100-hsb.b)/100, 10)
|
50 |
-
});
|
51 |
-
},
|
52 |
-
setHue = function (hsb, cal) {
|
53 |
-
$(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
|
54 |
-
},
|
55 |
-
setCurrentColor = function (hsb, cal) {
|
56 |
-
$(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
57 |
-
},
|
58 |
-
setNewColor = function (hsb, cal) {
|
59 |
-
$(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
60 |
-
},
|
61 |
-
keyDown = function (ev) {
|
62 |
-
var pressedKey = ev.charCode || ev.keyCode || -1;
|
63 |
-
if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
|
64 |
-
return false;
|
65 |
-
}
|
66 |
-
var cal = $(this).parent().parent();
|
67 |
-
if (cal.data('colorpicker').livePreview === true) {
|
68 |
-
change.apply(this);
|
69 |
-
}
|
70 |
-
},
|
71 |
-
change = function (ev) {
|
72 |
-
var cal = $(this).parent().parent(), col;
|
73 |
-
if (this.parentNode.className.indexOf('_hex') > 0) {
|
74 |
-
cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
|
75 |
-
} else if (this.parentNode.className.indexOf('_hsb') > 0) {
|
76 |
-
cal.data('colorpicker').color = col = fixHSB({
|
77 |
-
h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
|
78 |
-
s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
|
79 |
-
b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
|
80 |
-
});
|
81 |
-
} else {
|
82 |
-
cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
|
83 |
-
r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
|
84 |
-
g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
|
85 |
-
b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
|
86 |
-
}));
|
87 |
-
}
|
88 |
-
if (ev) {
|
89 |
-
fillRGBFields(col, cal.get(0));
|
90 |
-
fillHexFields(col, cal.get(0));
|
91 |
-
fillHSBFields(col, cal.get(0));
|
92 |
-
}
|
93 |
-
setSelector(col, cal.get(0));
|
94 |
-
setHue(col, cal.get(0));
|
95 |
-
setNewColor(col, cal.get(0));
|
96 |
-
cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
|
97 |
-
},
|
98 |
-
blur = function (ev) {
|
99 |
-
var cal = $(this).parent().parent();
|
100 |
-
cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
101 |
-
},
|
102 |
-
focus = function () {
|
103 |
-
charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
|
104 |
-
$(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
105 |
-
$(this).parent().addClass('colorpicker_focus');
|
106 |
-
},
|
107 |
-
downIncrement = function (ev) {
|
108 |
-
var field = $(this).parent().find('input').focus();
|
109 |
-
var current = {
|
110 |
-
el: $(this).parent().addClass('colorpicker_slider'),
|
111 |
-
max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
|
112 |
-
y: ev.pageY,
|
113 |
-
field: field,
|
114 |
-
val: parseInt(field.val(), 10),
|
115 |
-
preview: $(this).parent().parent().data('colorpicker').livePreview
|
116 |
-
};
|
117 |
-
$(document).bind('mouseup', current, upIncrement);
|
118 |
-
$(document).bind('mousemove', current, moveIncrement);
|
119 |
-
},
|
120 |
-
moveIncrement = function (ev) {
|
121 |
-
ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
|
122 |
-
if (ev.data.preview) {
|
123 |
-
change.apply(ev.data.field.get(0), [true]);
|
124 |
-
}
|
125 |
-
return false;
|
126 |
-
},
|
127 |
-
upIncrement = function (ev) {
|
128 |
-
change.apply(ev.data.field.get(0), [true]);
|
129 |
-
ev.data.el.removeClass('colorpicker_slider').find('input').focus();
|
130 |
-
$(document).unbind('mouseup', upIncrement);
|
131 |
-
$(document).unbind('mousemove', moveIncrement);
|
132 |
-
return false;
|
133 |
-
},
|
134 |
-
downHue = function (ev) {
|
135 |
-
var current = {
|
136 |
-
cal: $(this).parent(),
|
137 |
-
y: $(this).offset().top
|
138 |
-
};
|
139 |
-
current.preview = current.cal.data('colorpicker').livePreview;
|
140 |
-
$(document).bind('mouseup', current, upHue);
|
141 |
-
$(document).bind('mousemove', current, moveHue);
|
142 |
-
},
|
143 |
-
moveHue = function (ev) {
|
144 |
-
change.apply(
|
145 |
-
ev.data.cal.data('colorpicker')
|
146 |
-
.fields
|
147 |
-
.eq(4)
|
148 |
-
.val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
|
149 |
-
.get(0),
|
150 |
-
[ev.data.preview]
|
151 |
-
);
|
152 |
-
return false;
|
153 |
-
},
|
154 |
-
upHue = function (ev) {
|
155 |
-
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
156 |
-
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
157 |
-
$(document).unbind('mouseup', upHue);
|
158 |
-
$(document).unbind('mousemove', moveHue);
|
159 |
-
return false;
|
160 |
-
},
|
161 |
-
downSelector = function (ev) {
|
162 |
-
var current = {
|
163 |
-
cal: $(this).parent(),
|
164 |
-
pos: $(this).offset()
|
165 |
-
};
|
166 |
-
current.preview = current.cal.data('colorpicker').livePreview;
|
167 |
-
$(document).bind('mouseup', current, upSelector);
|
168 |
-
$(document).bind('mousemove', current, moveSelector);
|
169 |
-
},
|
170 |
-
moveSelector = function (ev) {
|
171 |
-
change.apply(
|
172 |
-
ev.data.cal.data('colorpicker')
|
173 |
-
.fields
|
174 |
-
.eq(6)
|
175 |
-
.val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
|
176 |
-
.end()
|
177 |
-
.eq(5)
|
178 |
-
.val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
|
179 |
-
.get(0),
|
180 |
-
[ev.data.preview]
|
181 |
-
);
|
182 |
-
return false;
|
183 |
-
},
|
184 |
-
upSelector = function (ev) {
|
185 |
-
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
186 |
-
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
187 |
-
$(document).unbind('mouseup', upSelector);
|
188 |
-
$(document).unbind('mousemove', moveSelector);
|
189 |
-
return false;
|
190 |
-
},
|
191 |
-
enterSubmit = function (ev) {
|
192 |
-
$(this).addClass('colorpicker_focus');
|
193 |
-
},
|
194 |
-
leaveSubmit = function (ev) {
|
195 |
-
$(this).removeClass('colorpicker_focus');
|
196 |
-
},
|
197 |
-
clickSubmit = function (ev) {
|
198 |
-
var cal = $(this).parent();
|
199 |
-
var col = cal.data('colorpicker').color;
|
200 |
-
cal.data('colorpicker').origColor = col;
|
201 |
-
setCurrentColor(col, cal.get(0));
|
202 |
-
cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
|
203 |
-
},
|
204 |
-
show = function (ev) {
|
205 |
-
var cal = $('#' + $(this).data('colorpickerId'));
|
206 |
-
cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
|
207 |
-
var pos = $(this).offset();
|
208 |
-
var viewPort = getViewport();
|
209 |
-
var top = pos.top + this.offsetHeight;
|
210 |
-
var left = pos.left;
|
211 |
-
if (top + 176 > viewPort.t + viewPort.h) {
|
212 |
-
top -= this.offsetHeight + 176;
|
213 |
-
}
|
214 |
-
if (left + 356 > viewPort.l + viewPort.w) {
|
215 |
-
left -= 356;
|
216 |
-
}
|
217 |
-
cal.css({left: left + 'px', top: top + 'px'});
|
218 |
-
if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
|
219 |
-
cal.show();
|
220 |
-
}
|
221 |
-
$(document).bind('mousedown', {cal: cal}, hide);
|
222 |
-
return false;
|
223 |
-
},
|
224 |
-
hide = function (ev) {
|
225 |
-
if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
|
226 |
-
if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
|
227 |
-
ev.data.cal.hide();
|
228 |
-
}
|
229 |
-
$(document).unbind('mousedown', hide);
|
230 |
-
}
|
231 |
-
},
|
232 |
-
isChildOf = function(parentEl, el, container) {
|
233 |
-
if (parentEl == el) {
|
234 |
-
return true;
|
235 |
-
}
|
236 |
-
if (parentEl.contains) {
|
237 |
-
return parentEl.contains(el);
|
238 |
-
}
|
239 |
-
if ( parentEl.compareDocumentPosition ) {
|
240 |
-
return !!(parentEl.compareDocumentPosition(el) & 16);
|
241 |
-
}
|
242 |
-
var prEl = el.parentNode;
|
243 |
-
while(prEl && prEl != container) {
|
244 |
-
if (prEl == parentEl)
|
245 |
-
return true;
|
246 |
-
prEl = prEl.parentNode;
|
247 |
-
}
|
248 |
-
return false;
|
249 |
-
},
|
250 |
-
getViewport = function () {
|
251 |
-
var m = document.compatMode == 'CSS1Compat';
|
252 |
-
return {
|
253 |
-
l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
|
254 |
-
t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
|
255 |
-
w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
|
256 |
-
h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
|
257 |
-
};
|
258 |
-
},
|
259 |
-
fixHSB = function (hsb) {
|
260 |
-
return {
|
261 |
-
h: Math.min(360, Math.max(0, hsb.h)),
|
262 |
-
s: Math.min(100, Math.max(0, hsb.s)),
|
263 |
-
b: Math.min(100, Math.max(0, hsb.b))
|
264 |
-
};
|
265 |
-
},
|
266 |
-
fixRGB = function (rgb) {
|
267 |
-
return {
|
268 |
-
r: Math.min(255, Math.max(0, rgb.r)),
|
269 |
-
g: Math.min(255, Math.max(0, rgb.g)),
|
270 |
-
b: Math.min(255, Math.max(0, rgb.b))
|
271 |
-
};
|
272 |
-
},
|
273 |
-
fixHex = function (hex) {
|
274 |
-
var len = 6 - hex.length;
|
275 |
-
if (len > 0) {
|
276 |
-
var o = [];
|
277 |
-
for (var i=0; i<len; i++) {
|
278 |
-
o.push('0');
|
279 |
-
}
|
280 |
-
o.push(hex);
|
281 |
-
hex = o.join('');
|
282 |
-
}
|
283 |
-
return hex;
|
284 |
-
},
|
285 |
-
HexToRGB = function (hex) {
|
286 |
-
var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
|
287 |
-
return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
|
288 |
-
},
|
289 |
-
HexToHSB = function (hex) {
|
290 |
-
return RGBToHSB(HexToRGB(hex));
|
291 |
-
},
|
292 |
-
RGBToHSB = function (rgb) {
|
293 |
-
var hsb = {
|
294 |
-
h: 0,
|
295 |
-
s: 0,
|
296 |
-
b: 0
|
297 |
-
};
|
298 |
-
var min = Math.min(rgb.r, rgb.g, rgb.b);
|
299 |
-
var max = Math.max(rgb.r, rgb.g, rgb.b);
|
300 |
-
var delta = max - min;
|
301 |
-
hsb.b = max;
|
302 |
-
if (max != 0) {
|
303 |
-
|
304 |
-
}
|
305 |
-
hsb.s = max != 0 ? 255 * delta / max : 0;
|
306 |
-
if (hsb.s != 0) {
|
307 |
-
if (rgb.r == max) {
|
308 |
-
hsb.h = (rgb.g - rgb.b) / delta;
|
309 |
-
} else if (rgb.g == max) {
|
310 |
-
hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
311 |
-
} else {
|
312 |
-
hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
313 |
-
}
|
314 |
-
} else {
|
315 |
-
hsb.h = -1;
|
316 |
-
}
|
317 |
-
hsb.h *= 60;
|
318 |
-
if (hsb.h < 0) {
|
319 |
-
hsb.h += 360;
|
320 |
-
}
|
321 |
-
hsb.s *= 100/255;
|
322 |
-
hsb.b *= 100/255;
|
323 |
-
return hsb;
|
324 |
-
},
|
325 |
-
HSBToRGB = function (hsb) {
|
326 |
-
var rgb = {};
|
327 |
-
var h = Math.round(hsb.h);
|
328 |
-
var s = Math.round(hsb.s*255/100);
|
329 |
-
var v = Math.round(hsb.b*255/100);
|
330 |
-
if(s == 0) {
|
331 |
-
rgb.r = rgb.g = rgb.b = v;
|
332 |
-
} else {
|
333 |
-
var t1 = v;
|
334 |
-
var t2 = (255-s)*v/255;
|
335 |
-
var t3 = (t1-t2)*(h%60)/60;
|
336 |
-
if(h==360) h = 0;
|
337 |
-
if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
|
338 |
-
else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
|
339 |
-
else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
|
340 |
-
else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
|
341 |
-
else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
|
342 |
-
else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
|
343 |
-
else {rgb.r=0; rgb.g=0; rgb.b=0}
|
344 |
-
}
|
345 |
-
return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
|
346 |
-
},
|
347 |
-
RGBToHex = function (rgb) {
|
348 |
-
var hex = [
|
349 |
-
rgb.r.toString(16),
|
350 |
-
rgb.g.toString(16),
|
351 |
-
rgb.b.toString(16)
|
352 |
-
];
|
353 |
-
$.each(hex, function (nr, val) {
|
354 |
-
if (val.length == 1) {
|
355 |
-
hex[nr] = '0' + val;
|
356 |
-
}
|
357 |
-
});
|
358 |
-
return hex.join('');
|
359 |
-
},
|
360 |
-
HSBToHex = function (hsb) {
|
361 |
-
return RGBToHex(HSBToRGB(hsb));
|
362 |
-
},
|
363 |
-
restoreOriginal = function () {
|
364 |
-
var cal = $(this).parent();
|
365 |
-
var col = cal.data('colorpicker').origColor;
|
366 |
-
cal.data('colorpicker').color = col;
|
367 |
-
fillRGBFields(col, cal.get(0));
|
368 |
-
fillHexFields(col, cal.get(0));
|
369 |
-
fillHSBFields(col, cal.get(0));
|
370 |
-
setSelector(col, cal.get(0));
|
371 |
-
setHue(col, cal.get(0));
|
372 |
-
setNewColor(col, cal.get(0));
|
373 |
-
};
|
374 |
-
return {
|
375 |
-
init: function (opt) {
|
376 |
-
opt = $.extend({}, defaults, opt||{});
|
377 |
-
if (typeof opt.color == 'string') {
|
378 |
-
opt.color = HexToHSB(opt.color);
|
379 |
-
} else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
|
380 |
-
opt.color = RGBToHSB(opt.color);
|
381 |
-
} else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
|
382 |
-
opt.color = fixHSB(opt.color);
|
383 |
-
} else {
|
384 |
-
return this;
|
385 |
-
}
|
386 |
-
return this.each(function () {
|
387 |
-
if (!$(this).data('colorpickerId')) {
|
388 |
-
var options = $.extend({}, opt);
|
389 |
-
options.origColor = opt.color;
|
390 |
-
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
391 |
-
$(this).data('colorpickerId', id);
|
392 |
-
var cal = $(tpl).attr('id', id);
|
393 |
-
if (options.flat) {
|
394 |
-
cal.appendTo(this).show();
|
395 |
-
} else {
|
396 |
-
cal.appendTo(document.body);
|
397 |
-
}
|
398 |
-
options.fields = cal
|
399 |
-
.find('input')
|
400 |
-
.bind('keyup', keyDown)
|
401 |
-
.bind('change', change)
|
402 |
-
.bind('blur', blur)
|
403 |
-
.bind('focus', focus);
|
404 |
-
cal
|
405 |
-
.find('span').bind('mousedown', downIncrement).end()
|
406 |
-
.find('>div.colorpicker_current_color').bind('click', restoreOriginal);
|
407 |
-
options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
|
408 |
-
options.selectorIndic = options.selector.find('div div');
|
409 |
-
options.el = this;
|
410 |
-
options.hue = cal.find('div.colorpicker_hue div');
|
411 |
-
cal.find('div.colorpicker_hue').bind('mousedown', downHue);
|
412 |
-
options.newColor = cal.find('div.colorpicker_new_color');
|
413 |
-
options.currentColor = cal.find('div.colorpicker_current_color');
|
414 |
-
cal.data('colorpicker', options);
|
415 |
-
cal.find('div.colorpicker_submit')
|
416 |
-
.bind('mouseenter', enterSubmit)
|
417 |
-
.bind('mouseleave', leaveSubmit)
|
418 |
-
.bind('click', clickSubmit);
|
419 |
-
fillRGBFields(options.color, cal.get(0));
|
420 |
-
fillHSBFields(options.color, cal.get(0));
|
421 |
-
fillHexFields(options.color, cal.get(0));
|
422 |
-
setHue(options.color, cal.get(0));
|
423 |
-
setSelector(options.color, cal.get(0));
|
424 |
-
setCurrentColor(options.color, cal.get(0));
|
425 |
-
setNewColor(options.color, cal.get(0));
|
426 |
-
if (options.flat) {
|
427 |
-
cal.css({
|
428 |
-
position: 'relative',
|
429 |
-
display: 'block'
|
430 |
-
});
|
431 |
-
} else {
|
432 |
-
$(this).bind(options.eventName, show);
|
433 |
-
}
|
434 |
-
}
|
435 |
-
});
|
436 |
-
},
|
437 |
-
showPicker: function() {
|
438 |
-
return this.each( function () {
|
439 |
-
if ($(this).data('colorpickerId')) {
|
440 |
-
show.apply(this);
|
441 |
-
}
|
442 |
-
});
|
443 |
-
},
|
444 |
-
hidePicker: function() {
|
445 |
-
return this.each( function () {
|
446 |
-
if ($(this).data('colorpickerId')) {
|
447 |
-
$('#' + $(this).data('colorpickerId')).hide();
|
448 |
-
}
|
449 |
-
});
|
450 |
-
},
|
451 |
-
setColor: function(col) {
|
452 |
-
if (typeof col == 'string') {
|
453 |
-
col = HexToHSB(col);
|
454 |
-
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
|
455 |
-
col = RGBToHSB(col);
|
456 |
-
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
|
457 |
-
col = fixHSB(col);
|
458 |
-
} else {
|
459 |
-
return this;
|
460 |
-
}
|
461 |
-
return this.each(function(){
|
462 |
-
if ($(this).data('colorpickerId')) {
|
463 |
-
var cal = $('#' + $(this).data('colorpickerId'));
|
464 |
-
cal.data('colorpicker').color = col;
|
465 |
-
cal.data('colorpicker').origColor = col;
|
466 |
-
fillRGBFields(col, cal.get(0));
|
467 |
-
fillHSBFields(col, cal.get(0));
|
468 |
-
fillHexFields(col, cal.get(0));
|
469 |
-
setHue(col, cal.get(0));
|
470 |
-
setSelector(col, cal.get(0));
|
471 |
-
setCurrentColor(col, cal.get(0));
|
472 |
-
setNewColor(col, cal.get(0));
|
473 |
-
}
|
474 |
-
});
|
475 |
-
}
|
476 |
-
};
|
477 |
-
}();
|
478 |
-
$.fn.extend({
|
479 |
-
ColorPicker: ColorPicker.init,
|
480 |
-
ColorPickerHide: ColorPicker.hidePicker,
|
481 |
-
ColorPickerShow: ColorPicker.showPicker,
|
482 |
-
ColorPickerSetColor: ColorPicker.setColor
|
483 |
-
});
|
484 |
-
})(jQuery)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/colorpicker.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(e){var t=function(){var t={},n,r=65,i,s='<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',o={eventName:"click",onShow:function(){},onBeforeShow:function(){},onHide:function(){},onChange:function(){},onSubmit:function(){},color:"ff0000",livePreview:!0,flat:!1},u=function(t,n){var r=q(t);e(n).data("colorpicker").fields.eq(1).val(r.r).end().eq(2).val(r.g).end().eq(3).val(r.b).end()},a=function(t,n){e(n).data("colorpicker").fields.eq(4).val(t.h).end().eq(5).val(t.s).end().eq(6).val(t.b).end()},f=function(t,n){e(n).data("colorpicker").fields.eq(0).val(U(t)).end()},l=function(t,n){e(n).data("colorpicker").selector.css("backgroundColor","#"+U({h:t.h,s:100,b:100})),e(n).data("colorpicker").selectorIndic.css({left:parseInt(150*t.s/100,10),top:parseInt(150*(100-t.b)/100,10)})},c=function(t,n){e(n).data("colorpicker").hue.css("top",parseInt(150-150*t.h/360,10))},h=function(t,n){e(n).data("colorpicker").currentColor.css("backgroundColor","#"+U(t))},p=function(t,n){e(n).data("colorpicker").newColor.css("backgroundColor","#"+U(t))},d=function(t){var n=t.charCode||t.keyCode||-1;if(n>r&&n<=90||n==32)return!1;var i=e(this).parent().parent();i.data("colorpicker").livePreview===!0&&v.apply(this)},v=function(t){var n=e(this).parent().parent(),r;this.parentNode.className.indexOf("_hex")>0?n.data("colorpicker").color=r=F(B(this.value)):this.parentNode.className.indexOf("_hsb")>0?n.data("colorpicker").color=r=P({h:parseInt(n.data("colorpicker").fields.eq(4).val(),10),s:parseInt(n.data("colorpicker").fields.eq(5).val(),10),b:parseInt(n.data("colorpicker").fields.eq(6).val(),10)}):n.data("colorpicker").color=r=I(H({r:parseInt(n.data("colorpicker").fields.eq(1).val(),10),g:parseInt(n.data("colorpicker").fields.eq(2).val(),10),b:parseInt(n.data("colorpicker").fields.eq(3).val(),10)})),t&&(u(r,n.get(0)),f(r,n.get(0)),a(r,n.get(0))),l(r,n.get(0)),c(r,n.get(0)),p(r,n.get(0)),n.data("colorpicker").onChange.apply(n,[r,U(r),q(r)])},m=function(t){var n=e(this).parent().parent();n.data("colorpicker").fields.parent().removeClass("colorpicker_focus")},g=function(){r=this.parentNode.className.indexOf("_hex")>0?70:65,e(this).parent().parent().data("colorpicker").fields.parent().removeClass("colorpicker_focus"),e(this).parent().addClass("colorpicker_focus")},y=function(t){var n=e(this).parent().find("input").focus(),r={el:e(this).parent().addClass("colorpicker_slider"),max:this.parentNode.className.indexOf("_hsb_h")>0?360:this.parentNode.className.indexOf("_hsb")>0?100:255,y:t.pageY,field:n,val:parseInt(n.val(),10),preview:e(this).parent().parent().data("colorpicker").livePreview};e(document).bind("mouseup",r,w),e(document).bind("mousemove",r,b)},b=function(e){return e.data.field.val(Math.max(0,Math.min(e.data.max,parseInt(e.data.val+e.pageY-e.data.y,10)))),e.data.preview&&v.apply(e.data.field.get(0),[!0]),!1},w=function(t){return v.apply(t.data.field.get(0),[!0]),t.data.el.removeClass("colorpicker_slider").find("input").focus(),e(document).unbind("mouseup",w),e(document).unbind("mousemove",b),!1},E=function(t){var n={cal:e(this).parent(),y:e(this).offset().top};n.preview=n.cal.data("colorpicker").livePreview,e(document).bind("mouseup",n,x),e(document).bind("mousemove",n,S)},S=function(e){return v.apply(e.data.cal.data("colorpicker").fields.eq(4).val(parseInt(360*(150-Math.max(0,Math.min(150,e.pageY-e.data.y)))/150,10)).get(0),[e.data.preview]),!1},x=function(t){return u(t.data.cal.data("colorpicker").color,t.data.cal.get(0)),f(t.data.cal.data("colorpicker").color,t.data.cal.get(0)),e(document).unbind("mouseup",x),e(document).unbind("mousemove",S),!1},T=function(t){var n={cal:e(this).parent(),pos:e(this).offset()};n.preview=n.cal.data("colorpicker").livePreview,e(document).bind("mouseup",n,C),e(document).bind("mousemove",n,N)},N=function(e){return v.apply(e.data.cal.data("colorpicker").fields.eq(6).val(parseInt(100*(150-Math.max(0,Math.min(150,e.pageY-e.data.pos.top)))/150,10)).end().eq(5).val(parseInt(100*Math.max(0,Math.min(150,e.pageX-e.data.pos.left))/150,10)).get(0),[e.data.preview]),!1},C=function(t){return u(t.data.cal.data("colorpicker").color,t.data.cal.get(0)),f(t.data.cal.data("colorpicker").color,t.data.cal.get(0)),e(document).unbind("mouseup",C),e(document).unbind("mousemove",N),!1},k=function(t){e(this).addClass("colorpicker_focus")},L=function(t){e(this).removeClass("colorpicker_focus")},A=function(t){var n=e(this).parent(),r=n.data("colorpicker").color;n.data("colorpicker").origColor=r,h(r,n.get(0)),n.data("colorpicker").onSubmit(r,U(r),q(r),n.data("colorpicker").el)},O=function(t){var n=e("#"+e(this).data("colorpickerId"));n.data("colorpicker").onBeforeShow.apply(this,[n.get(0)]);var r=e(this).offset(),i=D(),s=r.top+this.offsetHeight,o=r.left;return s+176>i.t+i.h&&(s-=this.offsetHeight+176),o+356>i.l+i.w&&(o-=356),n.css({left:o+"px",top:s+"px"}),n.data("colorpicker").onShow.apply(this,[n.get(0)])!=0&&n.show(),e(document).bind("mousedown",{cal:n},M),!1},M=function(t){_(t.data.cal.get(0),t.target,t.data.cal.get(0))||(t.data.cal.data("colorpicker").onHide.apply(this,[t.data.cal.get(0)])!=0&&t.data.cal.hide(),e(document).unbind("mousedown",M))},_=function(e,t,n){if(e==t)return!0;if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return!!(e.compareDocumentPosition(t)&16);var r=t.parentNode;while(r&&r!=n){if(r==e)return!0;r=r.parentNode}return!1},D=function(){var e=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},P=function(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))}},H=function(e){return{r:Math.min(255,Math.max(0,e.r)),g:Math.min(255,Math.max(0,e.g)),b:Math.min(255,Math.max(0,e.b))}},B=function(e){var t=6-e.length;if(t>0){var n=[];for(var r=0;r<t;r++)n.push("0");n.push(e),e=n.join("")}return e},j=function(e){var e=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:e>>16,g:(e&65280)>>8,b:e&255}},F=function(e){return I(j(e))},I=function(e){var t={h:0,s:0,b:0},n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),i=r-n;return t.b=r,r!=0,t.s=r!=0?255*i/r:0,t.s!=0?e.r==r?t.h=(e.g-e.b)/i:e.g==r?t.h=2+(e.b-e.r)/i:t.h=4+(e.r-e.g)/i:t.h=-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t},q=function(e){var t={},n=Math.round(e.h),r=Math.round(e.s*255/100),i=Math.round(e.b*255/100);if(r==0)t.r=t.g=t.b=i;else{var s=i,o=(255-r)*i/255,u=(s-o)*(n%60)/60;n==360&&(n=0),n<60?(t.r=s,t.b=o,t.g=o+u):n<120?(t.g=s,t.b=o,t.r=s-u):n<180?(t.g=s,t.r=o,t.b=o+u):n<240?(t.b=s,t.r=o,t.g=s-u):n<300?(t.b=s,t.g=o,t.r=o+u):n<360?(t.r=s,t.g=o,t.b=s-u):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}},R=function(t){var n=[t.r.toString(16),t.g.toString(16),t.b.toString(16)];return e.each(n,function(e,t){t.length==1&&(n[e]="0"+t)}),n.join("")},U=function(e){return R(q(e))},z=function(){var t=e(this).parent(),n=t.data("colorpicker").origColor;t.data("colorpicker").color=n,u(n,t.get(0)),f(n,t.get(0)),a(n,t.get(0)),l(n,t.get(0)),c(n,t.get(0)),p(n,t.get(0))};return{init:function(t){t=e.extend({},o,t||{});if(typeof t.color=="string")t.color=F(t.color);else if(t.color.r!=undefined&&t.color.g!=undefined&&t.color.b!=undefined)t.color=I(t.color);else{if(t.color.h==undefined||t.color.s==undefined||t.color.b==undefined)return this;t.color=P(t.color)}return this.each(function(){if(!e(this).data("colorpickerId")){var n=e.extend({},t);n.origColor=t.color;var r="collorpicker_"+parseInt(Math.random()*1e3);e(this).data("colorpickerId",r);var i=e(s).attr("id",r);n.flat?i.appendTo(this).show():i.appendTo(document.body),n.fields=i.find("input").bind("keyup",d).bind("change",v).bind("blur",m).bind("focus",g),i.find("span").bind("mousedown",y).end().find(">div.colorpicker_current_color").bind("click",z),n.selector=i.find("div.colorpicker_color").bind("mousedown",T),n.selectorIndic=n.selector.find("div div"),n.el=this,n.hue=i.find("div.colorpicker_hue div"),i.find("div.colorpicker_hue").bind("mousedown",E),n.newColor=i.find("div.colorpicker_new_color"),n.currentColor=i.find("div.colorpicker_current_color"),i.data("colorpicker",n),i.find("div.colorpicker_submit").bind("mouseenter",k).bind("mouseleave",L).bind("click",A),u(n.color,i.get(0)),a(n.color,i.get(0)),f(n.color,i.get(0)),c(n.color,i.get(0)),l(n.color,i.get(0)),h(n.color,i.get(0)),p(n.color,i.get(0)),n.flat?i.css({position:"relative",display:"block"}):e(this).bind(n.eventName,O)}})},showPicker:function(){return this.each(function(){e(this).data("colorpickerId")&&O.apply(this)})},hidePicker:function(){return this.each(function(){e(this).data("colorpickerId")&&e("#"+e(this).data("colorpickerId")).hide()})},setColor:function(t){if(typeof t=="string")t=F(t);else if(t.r!=undefined&&t.g!=undefined&&t.b!=undefined)t=I(t);else{if(t.h==undefined||t.s==undefined||t.b==undefined)return this;t=P(t)}return this.each(function(){if(e(this).data("colorpickerId")){var n=e("#"+e(this).data("colorpickerId"));n.data("colorpicker").color=t,n.data("colorpicker").origColor=t,u(t,n.get(0)),a(t,n.get(0)),f(t,n.get(0)),c(t,n.get(0)),l(t,n.get(0)),h(t,n.get(0)),p(t,n.get(0))}})}}}();e.fn.extend({ColorPicker:t.init,ColorPickerHide:t.hidePicker,ColorPickerShow:t.showPicker,ColorPickerSetColor:t.setColor})})(jQuery)
|
|
inc/js/easy-modal-admin.js
DELETED
@@ -1,326 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(){
|
2 |
-
var active_tab = window.location.hash.replace('#top#','');
|
3 |
-
if ( active_tab == '' )
|
4 |
-
active_tab = jQuery('.em-tab').attr('id');
|
5 |
-
jQuery('#'+active_tab).addClass('active');
|
6 |
-
jQuery('#'+active_tab+'-tab').addClass('nav-tab-active');
|
7 |
-
|
8 |
-
jQuery('#em-tabs a').click(function() {
|
9 |
-
jQuery('#em-tabs a').removeClass('nav-tab-active');
|
10 |
-
jQuery('.em-tab').removeClass('active');
|
11 |
-
|
12 |
-
var id = jQuery(this).attr('id').replace('-tab','');
|
13 |
-
jQuery('#'+id).addClass('active');
|
14 |
-
jQuery(this).addClass('nav-tab-active');
|
15 |
-
});
|
16 |
-
/* Value Sliders */
|
17 |
-
jQuery("#overlayOpacitySlider")
|
18 |
-
.slider({value: 0,range: "min",min: 0,max: 100,step: 1,slide: function(t, n){
|
19 |
-
jQuery("#overlayOpacity").val(n.value)
|
20 |
-
jQuery("#overlayOpacityValue").text(n.value)
|
21 |
-
jQuery(".example-modal-overlay").css({
|
22 |
-
opacity: n.value / 100
|
23 |
-
})
|
24 |
-
}})
|
25 |
-
jQuery("#containerPaddingSlider")
|
26 |
-
.slider({value: 0,range: "min",min: 0,max: 40,step: 1,slide: function(t, n){
|
27 |
-
jQuery("#containerPadding").val(n.value)
|
28 |
-
jQuery("#containerPaddingValue").text(n.value)
|
29 |
-
jQuery(".example-modal").css({
|
30 |
-
padding: n.value + "px"
|
31 |
-
})
|
32 |
-
}})
|
33 |
-
jQuery("#containerBorderWidthSlider")
|
34 |
-
.slider({value: 0,range: "min",min: 0,max: 10,step: 1,slide: function(t, n){
|
35 |
-
jQuery("#containerBorderWidth").val(n.value), jQuery("#containerBorderWidthValue").text(n.value), jQuery(".example-modal").css({
|
36 |
-
borderWidth: n.value + "px"
|
37 |
-
})
|
38 |
-
}})
|
39 |
-
jQuery("#containerBorderRadiusSlider")
|
40 |
-
.slider({value: 0,range: "min",min: 0,max: 50,step: 1,slide: function(t, n){
|
41 |
-
jQuery("#containerBorderRadius").val(n.value), jQuery("#containerBorderRadiusValue").text(n.value);
|
42 |
-
var r = n.value + "px";
|
43 |
-
jQuery(".example-modal").css({
|
44 |
-
"-moz-border-radius": r,
|
45 |
-
"-webkit-border-radius": r,
|
46 |
-
"border-radius": r
|
47 |
-
})
|
48 |
-
}})
|
49 |
-
jQuery("#contentTitleFontSizeSlider")
|
50 |
-
.slider({value: 0,range: "min",min: 12,max: 48,step: 1,slide: function(t, n){
|
51 |
-
jQuery("#contentTitleFontSize").val(n.value), jQuery("#contentTitleFontSizeValue").text(n.value);
|
52 |
-
var r = n.value + "px";
|
53 |
-
jQuery(".example-modal .title").css({
|
54 |
-
fontSize: r
|
55 |
-
})
|
56 |
-
}})
|
57 |
-
jQuery("#closeBorderRadiusSlider")
|
58 |
-
.slider({value: 0,range: "min",min: 0,max: Math.round(jQuery("#closeSize").val() / 2),step: 1,slide: function(t, n){
|
59 |
-
jQuery("#closeBorderRadius").val(n.value), jQuery("#closeBorderRadiusValue").text(n.value);
|
60 |
-
var r = n.value + "px";
|
61 |
-
jQuery(".example-modal .close-modal").css({
|
62 |
-
"-moz-border-radius": r,
|
63 |
-
"-webkit-border-radius": r,
|
64 |
-
"border-radius": r
|
65 |
-
})
|
66 |
-
}})
|
67 |
-
jQuery("#closeFontSizeSlider")
|
68 |
-
.slider({value: 0,range: "min",min: 0,max: Math.round(jQuery("#closeSize").val() - 2),step: 1,slide: function(t, n){
|
69 |
-
jQuery("#closeFontSize").val(n.value), jQuery("#closeFontSizeValue").text(n.value);
|
70 |
-
var r = n.value + "px";
|
71 |
-
jQuery(".example-modal .close-modal").css({
|
72 |
-
fontSize: r
|
73 |
-
})
|
74 |
-
}})
|
75 |
-
jQuery("#closeSizeSlider")
|
76 |
-
.slider({value: 0,range: "min",min: 0,max: 40,step: 1,slide: function(t, n){
|
77 |
-
jQuery("#closeSize").val(n.value)
|
78 |
-
jQuery("#closeSizeValue").text(n.value);
|
79 |
-
var r = n.value,i = s = o = u = "auto";
|
80 |
-
switch (jQuery("[name=closePosition]").val()) {
|
81 |
-
case "topright":
|
82 |
-
i = -(r / 2) + "px", u = -(r / 2) + "px";
|
83 |
-
break;
|
84 |
-
case "topleft":
|
85 |
-
i = -(r / 2) + "px", o = -(r / 2) + "px";
|
86 |
-
break;
|
87 |
-
case "bottomright":
|
88 |
-
s = -(r / 2) + "px", u = -(r / 2) + "px";
|
89 |
-
break;
|
90 |
-
case "bottomleft":
|
91 |
-
s = -(r / 2) + "px", o = -(r / 2) + "px"
|
92 |
-
}
|
93 |
-
|
94 |
-
var a = jQuery("#closeFontSizeSlider").slider("value");
|
95 |
-
|
96 |
-
a > r - 2 && (a = r - 2)
|
97 |
-
jQuery("#closeFontSizeValue").text(a)
|
98 |
-
jQuery(".example-modal .close-modal")
|
99 |
-
.css({fontSize: a + "px"})
|
100 |
-
|
101 |
-
jQuery("#closeFontSizeSlider")
|
102 |
-
.slider("option", "max", r - 2)
|
103 |
-
.slider("option", "value", a);
|
104 |
-
|
105 |
-
var f = Math.round(r / 2),
|
106 |
-
l = jQuery("#closeBorderRadiusSlider").slider("value");
|
107 |
-
l > f && (l = f)
|
108 |
-
jQuery("#closeBorderRadiusValue").text(l)
|
109 |
-
|
110 |
-
jQuery(".example-modal .close-modal")
|
111 |
-
.css({"-webkit-border-radius": l + "px","border-radius": l + "px"})
|
112 |
-
|
113 |
-
jQuery("#closeBorderRadiusSlider")
|
114 |
-
.slider("option", "max", f)
|
115 |
-
.slider("option", "value", l)
|
116 |
-
|
117 |
-
jQuery(".example-modal .close-modal")
|
118 |
-
.css({width: r + "px",height: r + "px",lineHeight: r + "px",left: o,right: u,top: i,bottom: s})
|
119 |
-
}})
|
120 |
-
jQuery("#autoOpenDelaySlider")
|
121 |
-
.slider({value: 0,range: "min",min: 0,max: 1e4,step: 500,slide: function(t, n){
|
122 |
-
jQuery("#autoOpenDelay").val(n.value)
|
123 |
-
jQuery("#autoOpenDelayValue").text(n.value)
|
124 |
-
}})
|
125 |
-
/* Color Pickers */
|
126 |
-
|
127 |
-
|
128 |
-
jQuery(".color-swatch")
|
129 |
-
.each(function(){
|
130 |
-
var swatch = jQuery(this);
|
131 |
-
var input = swatch.prev('.colorSelect');
|
132 |
-
swatch.ColorPicker({
|
133 |
-
color: input.val(),
|
134 |
-
onShow: function(colpkr){
|
135 |
-
return jQuery(colpkr).fadeIn(500), !1
|
136 |
-
},
|
137 |
-
onHide: function(colpkr){
|
138 |
-
return jQuery(colpkr).fadeOut(500), !1
|
139 |
-
},
|
140 |
-
onChange: function(n, r, i){
|
141 |
-
swatch.css("backgroundColor", "#" + r)
|
142 |
-
input.val("#" + r);
|
143 |
-
switch (input.attr("name")) {
|
144 |
-
case "overlayColor": jQuery(".example-modal-overlay").css({backgroundColor: "#" + r});
|
145 |
-
break;
|
146 |
-
case "containerBgColor": jQuery(".example-modal").css({backgroundColor: "#" + r});
|
147 |
-
break;
|
148 |
-
case "containerBorderColor": jQuery(".example-modal").css({borderColor: "#" + r});
|
149 |
-
break;
|
150 |
-
case "contentTitleFontColor": jQuery(".example-modal .title").css({color: "#" + r});
|
151 |
-
break;
|
152 |
-
case "contentFontColor": jQuery(".example-modal").css({color: "#" + r});
|
153 |
-
break;
|
154 |
-
case "closeBgColor": jQuery(".example-modal .close-modal").css({backgroundColor: "#" + r});
|
155 |
-
break;
|
156 |
-
case "closeBorderColor": jQuery(".example-modal .close-modal").css({borderColor: "#" + r});
|
157 |
-
break;
|
158 |
-
case "closeFontColor": jQuery(".example-modal .close-modal").css({color: "#" + r})
|
159 |
-
}
|
160 |
-
}
|
161 |
-
})
|
162 |
-
})
|
163 |
-
jQuery(".colorSelect")
|
164 |
-
.on('focusout', function(){
|
165 |
-
var $this = jQuery(this);
|
166 |
-
$this.next('.color-swatch').css('backgroundColor', $this.val()).ColorPickerSetColor($this.val())
|
167 |
-
var color = $this.val();
|
168 |
-
switch ($this.attr("name")){
|
169 |
-
case "overlayColor": jQuery(".example-modal-overlay").css({backgroundColor: color});
|
170 |
-
break;
|
171 |
-
case "containerBgColor": jQuery(".example-modal").css({backgroundColor: color});
|
172 |
-
break;
|
173 |
-
case "containerBorderColor": jQuery(".example-modal").css({borderColor: color});
|
174 |
-
break;
|
175 |
-
case "contentTitleFontColor": jQuery(".example-modal .title").css({color: color});
|
176 |
-
break;
|
177 |
-
case "contentFontColor": jQuery(".example-modal").css({color: color});
|
178 |
-
break;
|
179 |
-
case "closeBgColor": jQuery(".example-modal .close-modal").css({backgroundColor: color});
|
180 |
-
break;
|
181 |
-
case "closeBorderColor": jQuery(".example-modal .close-modal").css({borderColor: color});
|
182 |
-
break;
|
183 |
-
case "closeFontColor": jQuery(".example-modal .close-modal").css({color: color})
|
184 |
-
}
|
185 |
-
})
|
186 |
-
|
187 |
-
jQuery("#autoOpenDelay")
|
188 |
-
.on("change", function(){
|
189 |
-
jQuery("#autoOpenDelaySlider").slider("option", "value", jQuery(this).val())
|
190 |
-
})
|
191 |
-
jQuery(".cb-enable")
|
192 |
-
.click(function(){
|
193 |
-
var t = jQuery(this).parents(".switch");
|
194 |
-
jQuery(".cb-disable", t).removeClass("selected")
|
195 |
-
jQuery(this).addClass("selected")
|
196 |
-
jQuery(".checkbox", t).attr("checked", !0)
|
197 |
-
})
|
198 |
-
|
199 |
-
jQuery(".cb-disable")
|
200 |
-
.click(function(){
|
201 |
-
var t = jQuery(this).parents(".switch");
|
202 |
-
jQuery(".cb-enable", t).removeClass("selected")
|
203 |
-
jQuery(this).addClass("selected")
|
204 |
-
jQuery(".checkbox", t).attr("checked", !1)
|
205 |
-
})
|
206 |
-
jQuery(".switch")
|
207 |
-
.each(function(){
|
208 |
-
var t = jQuery(this),
|
209 |
-
n = jQuery(".checkbox", t);
|
210 |
-
n.is(":checked") && (jQuery(".cb-disable", t).removeClass("selected"), jQuery(".cb-enable", t).addClass("selected"))
|
211 |
-
})
|
212 |
-
jQuery("#containerBorderStyle")
|
213 |
-
.on('change',function(){
|
214 |
-
var $this = jQuery(this)
|
215 |
-
var val = $this.val();
|
216 |
-
jQuery(".example-modal").css({borderStyle: val})
|
217 |
-
if(val == 'none')
|
218 |
-
{
|
219 |
-
jQuery('.border-only').hide()
|
220 |
-
}
|
221 |
-
else
|
222 |
-
{
|
223 |
-
jQuery('.border-only').show()
|
224 |
-
}
|
225 |
-
})
|
226 |
-
|
227 |
-
jQuery("#contentTitleFontFamily")
|
228 |
-
.change(function(){
|
229 |
-
var t = jQuery(this).val();
|
230 |
-
jQuery(".example-modal .title").css({
|
231 |
-
fontFamily: t
|
232 |
-
})
|
233 |
-
})
|
234 |
-
jQuery("#closePosition")
|
235 |
-
.change(function(){
|
236 |
-
var t = parseInt(jQuery("#closeSize").val()),
|
237 |
-
n = bottom = left = right = "auto";
|
238 |
-
switch (jQuery(this).val()) {
|
239 |
-
case "topright":
|
240 |
-
n = -(t / 2) + "px", right = -(t / 2) + "px";
|
241 |
-
break;
|
242 |
-
case "topleft":
|
243 |
-
n = -(t / 2) + "px", left = -(t / 2) + "px";
|
244 |
-
break;
|
245 |
-
case "bottomright":
|
246 |
-
bottom = -(t / 2) + "px", right = -(t / 2) + "px";
|
247 |
-
break;
|
248 |
-
case "bottomleft":
|
249 |
-
bottom = -(t / 2) + "px", left = -(t / 2) + "px"
|
250 |
-
}
|
251 |
-
jQuery(".example-modal .close-modal")
|
252 |
-
.css({left: left,right: right,top: n,bottom: bottom})
|
253 |
-
})
|
254 |
-
jQuery('#closeLocation')
|
255 |
-
.on('change',function(){
|
256 |
-
var $this = jQuery(this)
|
257 |
-
var val = $this.val();
|
258 |
-
if(val == 'inside')
|
259 |
-
{
|
260 |
-
jQuery('.outside-only').hide()
|
261 |
-
jQuery('.close-modal').removeAttr('styles');
|
262 |
-
}
|
263 |
-
else
|
264 |
-
{
|
265 |
-
jQuery('.outside-only').show()
|
266 |
-
}
|
267 |
-
})
|
268 |
-
jQuery("#size")
|
269 |
-
.on('change',function(){
|
270 |
-
var $this = jQuery(this)
|
271 |
-
var val = $this.val();
|
272 |
-
if(val != 'custom')
|
273 |
-
{
|
274 |
-
jQuery('.custom-size-only').hide()
|
275 |
-
}
|
276 |
-
else
|
277 |
-
{
|
278 |
-
jQuery('.custom-size-only').show()
|
279 |
-
}
|
280 |
-
})
|
281 |
-
jQuery("#animation")
|
282 |
-
.on('change',function(){
|
283 |
-
var $this = jQuery(this)
|
284 |
-
var val = $this.val();
|
285 |
-
if(val == 'fade' || val == 'grow')
|
286 |
-
{
|
287 |
-
jQuery('.animation-only').hide()
|
288 |
-
}
|
289 |
-
else
|
290 |
-
{
|
291 |
-
jQuery('.animation-only').show()
|
292 |
-
}
|
293 |
-
})
|
294 |
-
jQuery("#overlayOpacitySlider").slider("option", "value", jQuery("#overlayOpacity").val())
|
295 |
-
jQuery("#containerPaddingSlider").slider("option", "value", jQuery("#containerPadding").val())
|
296 |
-
jQuery("#containerBorderWidthSlider").slider("option", "value", jQuery("#containerBorderWidth").val())
|
297 |
-
jQuery("#containerBorderRadiusSlider").slider("option", "value", jQuery("#containerBorderRadius").val())
|
298 |
-
jQuery("#contentTitleFontSizeSlider").slider("option", "value", jQuery("#contentTitleFontSize").val())
|
299 |
-
jQuery("#closeBorderRadiusSlider").slider("option", "value", jQuery("#closeBorderRadius").val())
|
300 |
-
jQuery("#closeFontSizeSlider").slider("option", "value", jQuery("#closeFontSize").val())
|
301 |
-
jQuery("#closeSizeSlider").slider("option", "value", jQuery("#closeSize").val())
|
302 |
-
jQuery("#autoOpenDelaySlider").slider("option", "value", jQuery("#autoOpenDelay").val())
|
303 |
-
|
304 |
-
jQuery(document)
|
305 |
-
.on("click", '.close-modal',function(){
|
306 |
-
jQuery(this).parent('.modal').fadeOut();
|
307 |
-
jQuery('.modal-overlay').fadeOut(function(){jQuery(this).remove();})
|
308 |
-
})
|
309 |
-
.on("click", '.modal-overlay',function(){
|
310 |
-
jQuery('.modal:visible').fadeOut(function(){jQuery(this).css('visibility','hidden');});
|
311 |
-
jQuery(this).fadeOut(function(){jQuery(this).remove();})
|
312 |
-
})
|
313 |
-
.on("keyup",function(e){
|
314 |
-
if (e.keyCode == 27) {
|
315 |
-
jQuery('.modal:visible').fadeOut(function(){jQuery(this).css('visibility','hidden');});
|
316 |
-
jQuery('.modal-overlay').fadeOut(function(){jQuery(this).remove();})
|
317 |
-
}
|
318 |
-
})
|
319 |
-
|
320 |
-
jQuery(document)
|
321 |
-
.on("click", '.write-it', function(){
|
322 |
-
jQuery('<div class="modal-overlay" />').appendTo('body').fadeIn();
|
323 |
-
jQuery('#eModal-Admin-1').css('visibility','visible').fadeIn();
|
324 |
-
return false;
|
325 |
-
})
|
326 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/easy-modal-admin.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(){var e=window.location.hash.replace("#top#","");""==e&&(e=jQuery(".em-tab").attr("id")),jQuery("#"+e).addClass("active"),jQuery("#"+e+"-tab").addClass("nav-tab-active"),jQuery("#em-tabs a").click(function(){jQuery("#em-tabs a").removeClass("nav-tab-active"),jQuery(".em-tab").removeClass("active");var e=jQuery(this).attr("id").replace("-tab","");jQuery("#"+e).addClass("active"),jQuery(this).addClass("nav-tab-active")}),jQuery("#overlayOpacitySlider").slider({value:0,range:"min",min:0,max:100,step:1,slide:function(e,t){jQuery("#overlayOpacity").val(t.value),jQuery("#overlayOpacityValue").text(t.value),jQuery(".example-modal-overlay").css({opacity:t.value/100})}}),jQuery("#containerPaddingSlider").slider({value:0,range:"min",min:0,max:40,step:1,slide:function(e,t){jQuery("#containerPadding").val(t.value),jQuery("#containerPaddingValue").text(t.value),jQuery(".example-modal").css({padding:t.value+"px"})}}),jQuery("#containerBorderWidthSlider").slider({value:0,range:"min",min:0,max:10,step:1,slide:function(e,t){jQuery("#containerBorderWidth").val(t.value),jQuery("#containerBorderWidthValue").text(t.value),jQuery(".example-modal").css({borderWidth:t.value+"px"})}}),jQuery("#containerBorderRadiusSlider").slider({value:0,range:"min",min:0,max:50,step:1,slide:function(e,t){jQuery("#containerBorderRadius").val(t.value),jQuery("#containerBorderRadiusValue").text(t.value);var i=t.value+"px";jQuery(".example-modal").css({"-moz-border-radius":i,"-webkit-border-radius":i,"border-radius":i})}}),jQuery("#contentTitleFontSizeSlider").slider({value:0,range:"min",min:12,max:48,step:1,slide:function(e,t){jQuery("#contentTitleFontSize").val(t.value),jQuery("#contentTitleFontSizeValue").text(t.value);var i=t.value+"px";jQuery(".example-modal .title").css({fontSize:i})}}),jQuery("#closeBorderRadiusSlider").slider({value:0,range:"min",min:0,max:Math.round(jQuery("#closeSize").val()/2),step:1,slide:function(e,t){jQuery("#closeBorderRadius").val(t.value),jQuery("#closeBorderRadiusValue").text(t.value);var i=t.value+"px";jQuery(".example-modal .close-modal").css({"-moz-border-radius":i,"-webkit-border-radius":i,"border-radius":i})}}),jQuery("#closeFontSizeSlider").slider({value:0,range:"min",min:0,max:Math.round(jQuery("#closeSize").val()-2),step:1,slide:function(e,t){jQuery("#closeFontSize").val(t.value),jQuery("#closeFontSizeValue").text(t.value);var i=t.value+"px";jQuery(".example-modal .close-modal").css({fontSize:i})}}),jQuery("#closeSizeSlider").slider({value:0,range:"min",min:0,max:40,step:1,slide:function(e,t){jQuery("#closeSize").val(t.value),jQuery("#closeSizeValue").text(t.value);var i=t.value,n=s=o=u="auto";switch(jQuery("[name=closePosition]").val()){case"topright":n=-(i/2)+"px",u=-(i/2)+"px";break;case"topleft":n=-(i/2)+"px",o=-(i/2)+"px";break;case"bottomright":s=-(i/2)+"px",u=-(i/2)+"px";break;case"bottomleft":s=-(i/2)+"px",o=-(i/2)+"px"}var a=jQuery("#closeFontSizeSlider").slider("value");a>i-2&&(a=i-2),jQuery("#closeFontSizeValue").text(a),jQuery(".example-modal .close-modal").css({fontSize:a+"px"}),jQuery("#closeFontSizeSlider").slider("option","max",i-2).slider("option","value",a);var r=Math.round(i/2),l=jQuery("#closeBorderRadiusSlider").slider("value");l>r&&(l=r),jQuery("#closeBorderRadiusValue").text(l),jQuery(".example-modal .close-modal").css({"-webkit-border-radius":l+"px","border-radius":l+"px"}),jQuery("#closeBorderRadiusSlider").slider("option","max",r).slider("option","value",l),jQuery(".example-modal .close-modal").css({width:i+"px",height:i+"px",lineHeight:i+"px",left:o,right:u,top:n,bottom:s})}}),jQuery("#autoOpenDelaySlider").slider({value:0,range:"min",min:0,max:1e4,step:500,slide:function(e,t){jQuery("#autoOpenDelay").val(t.value),jQuery("#autoOpenDelayValue").text(t.value)}}),jQuery(".color-swatch").each(function(){var e=jQuery(this),t=e.prev(".colorSelect");e.ColorPicker({color:t.val(),onShow:function(e){return jQuery(e).fadeIn(500),!1},onHide:function(e){return jQuery(e).fadeOut(500),!1},onChange:function(i,n){switch(e.css("backgroundColor","#"+n),t.val("#"+n),t.attr("name")){case"overlayColor":jQuery(".example-modal-overlay").css({backgroundColor:"#"+n});break;case"containerBgColor":jQuery(".example-modal").css({backgroundColor:"#"+n});break;case"containerBorderColor":jQuery(".example-modal").css({borderColor:"#"+n});break;case"contentTitleFontColor":jQuery(".example-modal .title").css({color:"#"+n});break;case"contentFontColor":jQuery(".example-modal").css({color:"#"+n});break;case"closeBgColor":jQuery(".example-modal .close-modal").css({backgroundColor:"#"+n});break;case"closeBorderColor":jQuery(".example-modal .close-modal").css({borderColor:"#"+n});break;case"closeFontColor":jQuery(".example-modal .close-modal").css({color:"#"+n})}}})}),jQuery(".colorSelect").on("focusout",function(){var e=jQuery(this);e.next(".color-swatch").css("backgroundColor",e.val()).ColorPickerSetColor(e.val());var t=e.val();switch(e.attr("name")){case"overlayColor":jQuery(".example-modal-overlay").css({backgroundColor:t});break;case"containerBgColor":jQuery(".example-modal").css({backgroundColor:t});break;case"containerBorderColor":jQuery(".example-modal").css({borderColor:t});break;case"contentTitleFontColor":jQuery(".example-modal .title").css({color:t});break;case"contentFontColor":jQuery(".example-modal").css({color:t});break;case"closeBgColor":jQuery(".example-modal .close-modal").css({backgroundColor:t});break;case"closeBorderColor":jQuery(".example-modal .close-modal").css({borderColor:t});break;case"closeFontColor":jQuery(".example-modal .close-modal").css({color:t})}}),jQuery("#autoOpenDelay").on("change",function(){jQuery("#autoOpenDelaySlider").slider("option","value",jQuery(this).val())}),jQuery(".cb-enable").click(function(){var e=jQuery(this).parents(".switch");jQuery(".cb-disable",e).removeClass("selected"),jQuery(this).addClass("selected"),jQuery(".checkbox",e).attr("checked",!0)}),jQuery(".cb-disable").click(function(){var e=jQuery(this).parents(".switch");jQuery(".cb-enable",e).removeClass("selected"),jQuery(this).addClass("selected"),jQuery(".checkbox",e).attr("checked",!1)}),jQuery(".switch").each(function(){var e=jQuery(this),t=jQuery(".checkbox",e);t.is(":checked")&&(jQuery(".cb-disable",e).removeClass("selected"),jQuery(".cb-enable",e).addClass("selected"))}),jQuery("#containerBorderStyle").on("change",function(){var e=jQuery(this),t=e.val();jQuery(".example-modal").css({borderStyle:t}),"none"==t?jQuery(".border-only").hide():jQuery(".border-only").show()}),jQuery("#contentTitleFontFamily").change(function(){var e=jQuery(this).val();jQuery(".example-modal .title").css({fontFamily:e})}),jQuery("#closePosition").change(function(){var e=parseInt(jQuery("#closeSize").val()),t=bottom=left=right="auto";switch(jQuery(this).val()){case"topright":t=-(e/2)+"px",right=-(e/2)+"px";break;case"topleft":t=-(e/2)+"px",left=-(e/2)+"px";break;case"bottomright":bottom=-(e/2)+"px",right=-(e/2)+"px";break;case"bottomleft":bottom=-(e/2)+"px",left=-(e/2)+"px"}jQuery(".example-modal .close-modal").css({left:left,right:right,top:t,bottom:bottom})}),jQuery("#closeLocation").on("change",function(){var e=jQuery(this),t=e.val();"inside"==t?(jQuery(".outside-only").hide(),jQuery(".close-modal").removeAttr("styles")):jQuery(".outside-only").show()}),jQuery("#size").on("change",function(){var e=jQuery(this),t=e.val();"custom"!=t?jQuery(".custom-size-only").hide():jQuery(".custom-size-only").show()}),jQuery("#animation").on("change",function(){var e=jQuery(this),t=e.val();"fade"==t||"grow"==t?jQuery(".animation-only").hide():jQuery(".animation-only").show()}),jQuery("#overlayOpacitySlider").slider("option","value",jQuery("#overlayOpacity").val()),jQuery("#containerPaddingSlider").slider("option","value",jQuery("#containerPadding").val()),jQuery("#containerBorderWidthSlider").slider("option","value",jQuery("#containerBorderWidth").val()),jQuery("#containerBorderRadiusSlider").slider("option","value",jQuery("#containerBorderRadius").val()),jQuery("#contentTitleFontSizeSlider").slider("option","value",jQuery("#contentTitleFontSize").val()),jQuery("#closeBorderRadiusSlider").slider("option","value",jQuery("#closeBorderRadius").val()),jQuery("#closeFontSizeSlider").slider("option","value",jQuery("#closeFontSize").val()),jQuery("#closeSizeSlider").slider("option","value",jQuery("#closeSize").val()),jQuery("#autoOpenDelaySlider").slider("option","value",jQuery("#autoOpenDelay").val()),jQuery(document).on("click",".close-modal",function(){jQuery(this).parent(".modal").fadeOut(),jQuery(".modal-overlay").fadeOut(function(){jQuery(this).remove()})}).on("click",".modal-overlay",function(){jQuery(".modal:visible").fadeOut(function(){jQuery(this).css("visibility","hidden")}),jQuery(this).fadeOut(function(){jQuery(this).remove()})}).on("keyup",function(e){27==e.keyCode&&(jQuery(".modal:visible").fadeOut(function(){jQuery(this).css("visibility","hidden")}),jQuery(".modal-overlay").fadeOut(function(){jQuery(this).remove()}))}),jQuery(document).on("click",".write-it",function(){return jQuery('<div class="modal-overlay" />').appendTo("body").fadeIn(),jQuery("#eModal-Admin-1").css("visibility","visible").fadeIn(),!1})});
|
|
inc/js/easy-modal.js
DELETED
@@ -1,871 +0,0 @@
|
|
1 |
-
// Easy Modal v1.3
|
2 |
-
(function ($)
|
3 |
-
{
|
4 |
-
var currentMousePos = { x: -1, y: -1 };
|
5 |
-
var methods = {
|
6 |
-
init: function (options)
|
7 |
-
{
|
8 |
-
if(!$(this).parent().is('body'))
|
9 |
-
{
|
10 |
-
$(this).appendTo('body');
|
11 |
-
}
|
12 |
-
var opts = $.extend({}, $.fn.emodal.defaults, $(this).data(), options);
|
13 |
-
return $(this).data('emodal', opts);
|
14 |
-
},
|
15 |
-
close: function (options)
|
16 |
-
{
|
17 |
-
var options = $.extend({
|
18 |
-
speed: 'fast',
|
19 |
-
overlay: true
|
20 |
-
}, $.fn.emodal.defaults, options);
|
21 |
-
|
22 |
-
var $this = $(this);
|
23 |
-
|
24 |
-
var opts = $this.data('emodal');
|
25 |
-
$this.removeClass('active').fadeOut(options.speed,function(){
|
26 |
-
if(options.overlay)
|
27 |
-
$('#modal-overlay').fadeOut(options.speed,function(){
|
28 |
-
var vids = $('iframe',$this).filter('[src*="youtube"],[src*="vimeo"]');
|
29 |
-
if (vids.length > 0 )
|
30 |
-
{
|
31 |
-
vids.each(function(){
|
32 |
-
var src = $(this).attr('src');
|
33 |
-
$(this).attr('src', '').attr('src', src);
|
34 |
-
})
|
35 |
-
}
|
36 |
-
options.onClose();
|
37 |
-
});
|
38 |
-
})
|
39 |
-
$(window).unbind('scroll.emodal').unbind('keyup.emodal');
|
40 |
-
return this;
|
41 |
-
},
|
42 |
-
open: function()
|
43 |
-
{
|
44 |
-
var $this = $(this);
|
45 |
-
var opts = $this.data('emodal');
|
46 |
-
if(themes[opts.theme] === undefined)
|
47 |
-
{
|
48 |
-
var theme = themes[1];
|
49 |
-
}
|
50 |
-
else
|
51 |
-
{
|
52 |
-
var theme = themes[opts.theme];
|
53 |
-
}
|
54 |
-
// Check for and create Modal Overlay
|
55 |
-
if(!$('#modal-overlay').length){ $('<div id="modal-overlay">').appendTo('body'); }
|
56 |
-
|
57 |
-
// If not stackable close all other modals.
|
58 |
-
if($('.modal.active').length)
|
59 |
-
{
|
60 |
-
$('.modal.active').each(function(){$(this).emodal('close',{speed:100,overlay:false})});
|
61 |
-
}
|
62 |
-
else
|
63 |
-
{
|
64 |
-
$('#modal-overlay').css('opacity',0).show(0);
|
65 |
-
}
|
66 |
-
|
67 |
-
$this.addClass('active');
|
68 |
-
// Modal Clos Button
|
69 |
-
|
70 |
-
if(!opts.closeDisabled && $('.close-modal',$this).length)
|
71 |
-
{
|
72 |
-
$('.close-modal',$this)
|
73 |
-
.unbind('click')
|
74 |
-
.click(function(){ $this.emodal('close'); })
|
75 |
-
.themeClose(opts);
|
76 |
-
}
|
77 |
-
$('#modal-overlay')
|
78 |
-
.unbind('click')
|
79 |
-
.click(function()
|
80 |
-
{
|
81 |
-
if (opts.overlayClose == true)
|
82 |
-
{
|
83 |
-
$this.emodal('close');
|
84 |
-
}
|
85 |
-
})
|
86 |
-
.themeOverlay(opts);
|
87 |
-
|
88 |
-
if(opts.overlayClose == true)
|
89 |
-
{
|
90 |
-
$(window).bind('keyup.emodal',function(e){
|
91 |
-
if($('.modal.active').length && e.keyCode == 27)
|
92 |
-
{
|
93 |
-
$this.emodal('close');
|
94 |
-
}
|
95 |
-
});
|
96 |
-
}
|
97 |
-
$this.themeModal(opts);
|
98 |
-
$this.animation(opts.animation,opts);
|
99 |
-
return $this;
|
100 |
-
}/*,
|
101 |
-
show: function ()
|
102 |
-
{
|
103 |
-
if (opts.type === 'Image')
|
104 |
-
{
|
105 |
-
container.css(
|
106 |
-
{
|
107 |
-
maxWidth: opts.maxWidth,
|
108 |
-
maxHeight: opts.maxHeight
|
109 |
-
});
|
110 |
-
var abcs = $("a.eModal-Image")
|
111 |
-
var prevButton = $('<a>')
|
112 |
-
.attr('id',opts.prevId)
|
113 |
-
.click(function (){
|
114 |
-
var current = $('.eModal-Opened')
|
115 |
-
var prev = abcs.eq(abcs.index(current) - 1)
|
116 |
-
current.removeClass('eModal-Opened')
|
117 |
-
if (prev.length <= 0) prev = abcs.eq(abcs.length)
|
118 |
-
prev.addClass('eModal-Opened')
|
119 |
-
container
|
120 |
-
.animate({opacity: '.01'}, function (){
|
121 |
-
var img = $("<img/>")
|
122 |
-
.attr('src', prev.attr('href'))
|
123 |
-
.css({
|
124 |
-
maxWidth: '100%',
|
125 |
-
maxHeight: '100%'
|
126 |
-
})
|
127 |
-
.load(function (){
|
128 |
-
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0)
|
129 |
-
{
|
130 |
-
alert('broken image!')
|
131 |
-
}
|
132 |
-
else
|
133 |
-
{
|
134 |
-
if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
|
135 |
-
if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
|
136 |
-
content
|
137 |
-
.html(img)
|
138 |
-
.css({opacity:'.01'})
|
139 |
-
|
140 |
-
container
|
141 |
-
.emodal('center')
|
142 |
-
.animate({opacity:'.01'})
|
143 |
-
.animate({opacity:'1'})
|
144 |
-
|
145 |
-
content.animate({opacity: '1'})
|
146 |
-
}
|
147 |
-
})
|
148 |
-
})
|
149 |
-
return false
|
150 |
-
})
|
151 |
-
var nextButton = $('<a>')
|
152 |
-
.attr('id',opts.nextId)
|
153 |
-
.click(function (){
|
154 |
-
var current = $('.eModal-Opened')
|
155 |
-
|
156 |
-
var next = abcs.eq(abcs.index(current) + 1)
|
157 |
-
current.removeClass('eModal-Opened')
|
158 |
-
if (next.length == 0) next = abcs.eq(0)
|
159 |
-
next.addClass('eModal-Opened')
|
160 |
-
container
|
161 |
-
.animate({opacity: '.01'}, function (){
|
162 |
-
var img = $("<img/>")
|
163 |
-
.attr('src', next.attr('href'))
|
164 |
-
.css({
|
165 |
-
maxWidth: '100%',
|
166 |
-
maxHeight: '100%'
|
167 |
-
})
|
168 |
-
.load(function (){
|
169 |
-
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0)
|
170 |
-
{
|
171 |
-
alert('broken image!')
|
172 |
-
}
|
173 |
-
else
|
174 |
-
{
|
175 |
-
if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
|
176 |
-
if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
|
177 |
-
content
|
178 |
-
.html(img)
|
179 |
-
.css({opacity:'.01'})
|
180 |
-
|
181 |
-
container
|
182 |
-
.emodal('center')
|
183 |
-
.animate({opacity:'.01'})
|
184 |
-
.animate({opacity:'1'})
|
185 |
-
|
186 |
-
content.animate({opacity: '1'})
|
187 |
-
}
|
188 |
-
})
|
189 |
-
})
|
190 |
-
return false
|
191 |
-
})
|
192 |
-
var buttons = $('<div>')
|
193 |
-
.attr('id',opts.buttonsId)
|
194 |
-
.append(prevButton, nextButton)
|
195 |
-
.appendTo(container)
|
196 |
-
}
|
197 |
-
if (opts.type === 'Link')
|
198 |
-
{
|
199 |
-
opts.requestData.url = $(this).attr('href')
|
200 |
-
opts.requestData.iframeWidth = opts.maxWidth
|
201 |
-
opts.requestData.iframeHeight = opts.maxHeight
|
202 |
-
}
|
203 |
-
var loaded = false
|
204 |
-
if (opts.url != null){
|
205 |
-
if (opts.type === 'Image'){
|
206 |
-
var img = $("<img/>")
|
207 |
-
.attr('src', opts.url)
|
208 |
-
.css({
|
209 |
-
maxWidth: '100%',
|
210 |
-
maxHeight: '100%'
|
211 |
-
})
|
212 |
-
.load(function (){
|
213 |
-
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) alert('broken image!')
|
214 |
-
else {
|
215 |
-
if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
|
216 |
-
if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
|
217 |
-
content.append(img)
|
218 |
-
loaded = true
|
219 |
-
}
|
220 |
-
})
|
221 |
-
}
|
222 |
-
else
|
223 |
-
{
|
224 |
-
$.post(opts.url, opts.requestData, function (data){
|
225 |
-
content.prepend(data)
|
226 |
-
if($('form',content).length)
|
227 |
-
{
|
228 |
-
$orig_action = $('form',content).attr('action').split('#');
|
229 |
-
$('form',content).attr('action',"#" + $orig_action[1]).attr('action')
|
230 |
-
}
|
231 |
-
container
|
232 |
-
.show()
|
233 |
-
.css({opacity: '.01'});
|
234 |
-
if(opts.userMaxHeight > 0)
|
235 |
-
{
|
236 |
-
content.css({maxHeight: $(window).height() * (opts.userMaxHeight / 100) + 'px'});
|
237 |
-
}
|
238 |
-
else if(content.innerHeight() > opts.maxHeight && opts.type != 'Link')
|
239 |
-
{
|
240 |
-
content.css({maxHeight: (opts.maxHeight - 60) + 'px'});
|
241 |
-
}
|
242 |
-
|
243 |
-
if(opts.userHeight > 0)
|
244 |
-
{
|
245 |
-
content.css({height: opts.userHeight + 'px'});
|
246 |
-
}
|
247 |
-
|
248 |
-
if(opts.userMaxWidth > 0)
|
249 |
-
{
|
250 |
-
content.css({maxWidth: $(window).width() * (opts.userMaxWidth / 100) + 'px'});
|
251 |
-
}
|
252 |
-
|
253 |
-
if(opts.userWidth > 0)
|
254 |
-
{
|
255 |
-
content.css({width: opts.userWidth + 'px'});
|
256 |
-
}
|
257 |
-
var title = content
|
258 |
-
.find("#eModal-Title")
|
259 |
-
.css({
|
260 |
-
color: theme.contentTitleFontColor,
|
261 |
-
fontFamily: theme.contentTitleFontFamily,
|
262 |
-
fontSize: theme.contentTitleFontSize + 'px'
|
263 |
-
})
|
264 |
-
if(title) title.attr('title', title.text()).appendTo(controls)
|
265 |
-
opts.onLoad()
|
266 |
-
if(opts.cf7form == true) loadCf7()
|
267 |
-
if(opts.gravityform == true) loadGravityForms()
|
268 |
-
loaded = true
|
269 |
-
})
|
270 |
-
}
|
271 |
-
}
|
272 |
-
},*/
|
273 |
-
};
|
274 |
-
$.fn.emodal = function(method)
|
275 |
-
{
|
276 |
-
// Method calling logic
|
277 |
-
if (methods[method])
|
278 |
-
{
|
279 |
-
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
280 |
-
}
|
281 |
-
else if (typeof method === 'object' || !method)
|
282 |
-
{
|
283 |
-
return methods.init.apply(this, arguments);
|
284 |
-
}
|
285 |
-
else
|
286 |
-
{
|
287 |
-
$.error('Method ' + method + ' does not exist on jQuery.emodal');
|
288 |
-
}
|
289 |
-
};
|
290 |
-
$.fn.themeOverlay = function(opts)
|
291 |
-
{
|
292 |
-
var $this = $(this);
|
293 |
-
if(themes[opts.theme] === undefined)
|
294 |
-
{
|
295 |
-
var theme = themes[1];
|
296 |
-
}
|
297 |
-
else
|
298 |
-
{
|
299 |
-
var theme = themes[opts.theme];
|
300 |
-
}
|
301 |
-
return $this.addClass('theme-'+opts.theme).animate({
|
302 |
-
backgroundColor: theme.overlayColor,
|
303 |
-
opacity: theme.overlayOpacity / 100
|
304 |
-
},opts.duration);
|
305 |
-
};
|
306 |
-
$.fn.themeModal = function(opts)
|
307 |
-
{
|
308 |
-
var $this = $(this);
|
309 |
-
if(themes[opts.theme] === undefined)
|
310 |
-
{
|
311 |
-
var theme = themes[1];
|
312 |
-
}
|
313 |
-
else
|
314 |
-
{
|
315 |
-
var theme = themes[opts.theme];
|
316 |
-
}
|
317 |
-
if(opts.size == 'custom')
|
318 |
-
{
|
319 |
-
$this.css({
|
320 |
-
'height': opts.userHeight ? opts.userHeight + opts.userHeightUnit : $this.css('height'),
|
321 |
-
'width': opts.userWidth ? opts.userWidth + opts.userWidthUnit : $this.css('width'),
|
322 |
-
'margin-left': opts.userWidth ? -(opts.userWidth / 2) + opts.userWidthUnit : $this.css('margin-left')
|
323 |
-
});
|
324 |
-
}
|
325 |
-
$this
|
326 |
-
.addClass(opts.size)
|
327 |
-
.addClass('theme-'+opts.theme)
|
328 |
-
.css({
|
329 |
-
color: theme.contentFontColor,
|
330 |
-
backgroundColor: theme.containerBgColor,
|
331 |
-
padding: theme.containerPadding + 'px',
|
332 |
-
border: theme.containerBorderColor + ' ' + theme.containerBorderStyle + ' ' + theme.containerBorderWidth + 'px',
|
333 |
-
"-webkit-border-radius": theme.containerBorderRadius + 'px',
|
334 |
-
"border-radius": theme.containerBorderRadius + 'px'
|
335 |
-
});
|
336 |
-
$('.title', $this).css({
|
337 |
-
color: theme.contentTitleFontColor,
|
338 |
-
fontFamily: theme.contentTitleFontFamily,
|
339 |
-
fontSize: theme.contentTitleFontSize
|
340 |
-
});
|
341 |
-
return $this;
|
342 |
-
};
|
343 |
-
$.fn.themeClose = function(opts)
|
344 |
-
{
|
345 |
-
var $this = $(this);
|
346 |
-
if(themes[opts.theme] === undefined)
|
347 |
-
{
|
348 |
-
var theme = themes[1];
|
349 |
-
}
|
350 |
-
else
|
351 |
-
{
|
352 |
-
var theme = themes[opts.theme];
|
353 |
-
}
|
354 |
-
if(theme.closeLocation == 'outside')
|
355 |
-
{
|
356 |
-
var val = theme.closeSize;
|
357 |
-
var top = bottom = left = right = 'auto';
|
358 |
-
switch (theme.closePosition)
|
359 |
-
{
|
360 |
-
case 'topright':
|
361 |
-
top = -(val / 2) + 'px';
|
362 |
-
right = -(val / 2) + 'px';
|
363 |
-
break;
|
364 |
-
case 'topleft':
|
365 |
-
top = -(val / 2) + 'px';
|
366 |
-
left = -(val / 2) + 'px';
|
367 |
-
break;
|
368 |
-
case 'bottomright':
|
369 |
-
bottom = -(val / 2) + 'px';
|
370 |
-
right = -(val / 2) + 'px';
|
371 |
-
break;
|
372 |
-
case 'bottomleft':
|
373 |
-
bottom = -(val / 2) + 'px';
|
374 |
-
left = -(val / 2) + 'px';
|
375 |
-
break;
|
376 |
-
}
|
377 |
-
$this
|
378 |
-
.addClass('outside')
|
379 |
-
.css({
|
380 |
-
left: left,
|
381 |
-
right: right,
|
382 |
-
top: top,
|
383 |
-
bottom: bottom,
|
384 |
-
height: theme.closeSize + 'px',
|
385 |
-
fontSize: theme.closeFontSize + 'px',
|
386 |
-
width: theme.closeSize + 'px',
|
387 |
-
backgroundColor: theme.closeBgColor,
|
388 |
-
"-webkit-border-radius": theme.closeBorderRadius + 'px',
|
389 |
-
"border-radius": theme.closeBorderRadius + 'px',
|
390 |
-
lineHeight: theme.closeSize + 'px'
|
391 |
-
});
|
392 |
-
}
|
393 |
-
return $this.addClass('theme-'+opts.theme)
|
394 |
-
.html(theme.closeText)
|
395 |
-
.css({
|
396 |
-
color: theme.closeFontColor,
|
397 |
-
});
|
398 |
-
};
|
399 |
-
|
400 |
-
var animations = {
|
401 |
-
fade: function(options)
|
402 |
-
{
|
403 |
-
var $this = $(this).show(0).css({'opacity':0,'top':$(window).scrollTop() + 100 +'px'});
|
404 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
405 |
-
$this.animate({
|
406 |
-
opacity: 1
|
407 |
-
},parseInt(opts.duration),opts.easing,function(){
|
408 |
-
$this
|
409 |
-
.removeAttr('style')
|
410 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
411 |
-
.themeModal(opts);
|
412 |
-
});
|
413 |
-
},
|
414 |
-
fadeAndSlide: function(options)
|
415 |
-
{
|
416 |
-
var $this = $(this).show(0).css('opacity',0);
|
417 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
418 |
-
switch(opts.direction)
|
419 |
-
{
|
420 |
-
case 'mouse': $this.css({'top': currentMousePos.y + 'px','left': currentMousePos.x +'px'}); break;
|
421 |
-
case 'top': $this.css({'top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
422 |
-
case 'left': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px'}); break;
|
423 |
-
case 'bottom': $this.css({'top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
424 |
-
case 'right': $this.css({'left': $(window).innerWidth()+'px','top':$(window).scrollTop() + 100 +'px'}); break;
|
425 |
-
case 'topleft': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
426 |
-
case 'topright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
427 |
-
case 'bottomleft': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
428 |
-
case 'bottomright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
429 |
-
}
|
430 |
-
$('html').css('overflow-x','hidden');
|
431 |
-
$this.animate({
|
432 |
-
'left': '50%',
|
433 |
-
'top': $(window).scrollTop() + 100 +'px'
|
434 |
-
},{duration: opts.duration , queue:false},opts.easing);
|
435 |
-
setTimeout(function()
|
436 |
-
{
|
437 |
-
$this.animate({
|
438 |
-
'opacity': 1
|
439 |
-
},opts.duration * .75,opts.easing,function(){
|
440 |
-
$this
|
441 |
-
.removeAttr('style')
|
442 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
443 |
-
.themeModal(opts);
|
444 |
-
$('html').css('overflow-x','inherit');
|
445 |
-
});
|
446 |
-
},opts.duration * .25);
|
447 |
-
},
|
448 |
-
grow: function(options)
|
449 |
-
{
|
450 |
-
var $this = $(this).show(0);
|
451 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
452 |
-
var currently = {
|
453 |
-
width: parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 + '%',
|
454 |
-
height: parseInt($this.css('height')),
|
455 |
-
marginLeft: '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
|
456 |
-
padding: parseInt($this.css('padding-left')) / parseInt($this.css('font-size')) + 'em'
|
457 |
-
};
|
458 |
-
$('*',$this).fadeOut(0);
|
459 |
-
$this.css({
|
460 |
-
'top': (currently.height/10) * 5 + $(window).scrollTop() + 100 +'px',
|
461 |
-
'left': (currently.width/10) * 5 + ($(window).innerWidth() / 2) +'px',
|
462 |
-
'height': 0,
|
463 |
-
'width': 0,
|
464 |
-
'padding': 0,
|
465 |
-
'margin-left': 0
|
466 |
-
}).animate({
|
467 |
-
'top': $(window).scrollTop() + 100 +'px',
|
468 |
-
'left': '50%',
|
469 |
-
'padding': currently.padding,
|
470 |
-
'height': currently.height,
|
471 |
-
'width': currently.width,
|
472 |
-
'margin-left': currently.marginLeft
|
473 |
-
},opts.duration,function(){
|
474 |
-
$this
|
475 |
-
.removeAttr('style')
|
476 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
477 |
-
.themeModal(opts);
|
478 |
-
$('*',$this).fadeIn('fast');
|
479 |
-
});
|
480 |
-
},
|
481 |
-
growAndSlide: function(options)
|
482 |
-
{
|
483 |
-
var $this = $(this).show(0);
|
484 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
485 |
-
var currently = {
|
486 |
-
width: parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 + '%',
|
487 |
-
height: parseInt($this.css('height')),
|
488 |
-
marginLeft: '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
|
489 |
-
padding: parseInt($this.css('padding-left')) / parseInt($this.css('font-size')) + 'em'
|
490 |
-
};
|
491 |
-
$('html,body').css('overflow-x','hidden');
|
492 |
-
$('*',$this).fadeOut(0);
|
493 |
-
$this.css({
|
494 |
-
'opacity': 1,
|
495 |
-
'height': 0,
|
496 |
-
'width': 0,
|
497 |
-
'padding': 0,
|
498 |
-
'margin-left': 0
|
499 |
-
});
|
500 |
-
switch(opts.direction)
|
501 |
-
{
|
502 |
-
case 'mouse': $this.css({'top': currentMousePos.y + 'px','left': currentMousePos.x +'px'}); break;
|
503 |
-
case 'top': $this.css({'top': $(window).scrollTop() + $this.outerHeight(true) + 'px'}); break;
|
504 |
-
case 'left': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px'}); break;
|
505 |
-
case 'bottom': $this.css({'top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
506 |
-
case 'right': $this.css({'left': $(window).innerWidth()+'px','top':$(window).scrollTop() + 100 +'px'}); break;
|
507 |
-
case 'topleft': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
508 |
-
case 'topright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
509 |
-
case 'bottomleft': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
510 |
-
case 'bottomright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
511 |
-
}
|
512 |
-
$this.animate({
|
513 |
-
'height': currently.height,
|
514 |
-
'padding': currently.padding,
|
515 |
-
'width': currently.width,
|
516 |
-
'margin-left': currently.marginLeft
|
517 |
-
},{duration: opts.duration , queue:false},opts.easing);
|
518 |
-
setTimeout(function()
|
519 |
-
{
|
520 |
-
$this.animate({
|
521 |
-
'height': 'auto',
|
522 |
-
'top': ($(window).scrollTop() + 100) +'px',
|
523 |
-
'left': '50%'
|
524 |
-
},opts.duration * .95,opts.easing,function(){
|
525 |
-
$this
|
526 |
-
.removeAttr('style')
|
527 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
528 |
-
.themeModal(opts);
|
529 |
-
$('*',$this).fadeIn('fast');
|
530 |
-
$('html').css('overflow-x','inherit');
|
531 |
-
});
|
532 |
-
},opts.duration * .05);
|
533 |
-
}/*,
|
534 |
-
canvas: function(options)
|
535 |
-
{
|
536 |
-
var $this = $(this)
|
537 |
-
$this.css('top',$(document).height() + $this.height()).show(0);
|
538 |
-
html2canvas($this, {
|
539 |
-
onrendered: function(canvas) {
|
540 |
-
var canvas = canvas;
|
541 |
-
//$('body').append(canvas);
|
542 |
-
var x = 4,
|
543 |
-
y = 3,
|
544 |
-
random = true,
|
545 |
-
width = parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100,
|
546 |
-
height = parseInt($this.css('height')),
|
547 |
-
marginLeft = '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
|
548 |
-
$img = canvas.toDataURL(),
|
549 |
-
n_tiles = x * y, // total number of tiles
|
550 |
-
tiles = [],
|
551 |
-
$tiles = {};
|
552 |
-
|
553 |
-
for ( var i = 0; i < n_tiles; i++ ) {
|
554 |
-
tiles.push('<div class="tile"/>');
|
555 |
-
}
|
556 |
-
|
557 |
-
$tiles = $( tiles.join('') );
|
558 |
-
// Hide original image and insert tiles in DOM
|
559 |
-
$this.hide().after(
|
560 |
-
$('<div class="modal-placeholder"/>').attr('style', $this.attr('style')).css({
|
561 |
-
'opacity': 1,
|
562 |
-
'height': height,
|
563 |
-
'margin-left': '-' + (parseInt(width) / 2) + '%',
|
564 |
-
'padding': 0,
|
565 |
-
'width': parseInt(width) + '%',
|
566 |
-
'top': $(window).scrollTop() + 100
|
567 |
-
})
|
568 |
-
.show(0)
|
569 |
-
.append( $tiles )
|
570 |
-
);
|
571 |
-
// Adjust position
|
572 |
-
$tiles.each(function(){
|
573 |
-
var pos = $(this).position();
|
574 |
-
|
575 |
-
console.log($this.outerHeight() / y + 'px');
|
576 |
-
$(this).css({
|
577 |
-
'border': 0,
|
578 |
-
'backgroundPosition': -pos.left +'px ' + -pos.top + 'px',
|
579 |
-
'width': $this.outerWidth() / x + 'px',
|
580 |
-
'height': $this.outerHeight() / y + 'px',
|
581 |
-
'background-image': 'url('+ $img +')'
|
582 |
-
});
|
583 |
-
});
|
584 |
-
|
585 |
-
}
|
586 |
-
});
|
587 |
-
//$this.hide(0);
|
588 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
589 |
-
}*/
|
590 |
-
};
|
591 |
-
$.fn.animation = function(style)
|
592 |
-
{
|
593 |
-
// Method calling logic
|
594 |
-
if (animations[style])
|
595 |
-
{
|
596 |
-
return animations[style].apply(this, Array.prototype.slice.call(arguments, 1));
|
597 |
-
}
|
598 |
-
else
|
599 |
-
{
|
600 |
-
$.error('Animation style ' + animations + ' does not exist on jQuery.animation');
|
601 |
-
}
|
602 |
-
};
|
603 |
-
|
604 |
-
$.fn.animation.defaults = {
|
605 |
-
duration:350,
|
606 |
-
direction: 'top',
|
607 |
-
easing: 'swing'
|
608 |
-
};
|
609 |
-
$.fn.emodal.defaults = {
|
610 |
-
theme: 1,
|
611 |
-
onLoad: function (){},
|
612 |
-
onClose: function (){},
|
613 |
-
type: null,
|
614 |
-
userHeight: null,
|
615 |
-
userWidth: null,
|
616 |
-
animation: 'fadeAndSlide',
|
617 |
-
direction: 'bottom',
|
618 |
-
duration: 350,
|
619 |
-
overlayClose: false,
|
620 |
-
escClose: false,
|
621 |
-
closeDisabled: false
|
622 |
-
};
|
623 |
-
var modals = easymodal.modals;
|
624 |
-
var themes = easymodal.themes;
|
625 |
-
var settings = easymodal.settings;
|
626 |
-
|
627 |
-
$(document).ready(function()
|
628 |
-
{
|
629 |
-
$('.modal').each(function()
|
630 |
-
{
|
631 |
-
var $this = $(this).css({visibility:'visible'}).hide(0);
|
632 |
-
var modalId = $this.attr('id').split("-")[1];
|
633 |
-
$this.emodal(modals[modalId]);
|
634 |
-
$(document).on('click','.'+$this.attr('id'),function(e){
|
635 |
-
e.preventDefault();
|
636 |
-
e.stopPropagation();
|
637 |
-
currentMousePos.x = e.pageX;
|
638 |
-
currentMousePos.y = e.pageY;
|
639 |
-
$this.emodal('open');
|
640 |
-
});
|
641 |
-
$('.'+$this.attr('id')).css('cursor','pointer');
|
642 |
-
});
|
643 |
-
if(easymodal.force_user_login)
|
644 |
-
{
|
645 |
-
$('#eModal-Login .close-modal, #eModal-Register .close-modal, #eModal-Forgot .close-modal').hide();
|
646 |
-
$('#eModal-Register, #eModal-Forgot').append($('<a class="eModal-Login">Back to Login Form</a>').css('cursor','pointer'));
|
647 |
-
}
|
648 |
-
if(easymodal.autoOpen && !$.cookie("eModal-autoOpen-"+easymodal.autoOpen.id))
|
649 |
-
{
|
650 |
-
setTimeout(function(){
|
651 |
-
$('#eModal-'+easymodal.autoOpen.id).emodal('open');
|
652 |
-
var date = new Date();
|
653 |
-
date.setTime(date.getTime() + (easymodal.autoOpen.timer * 24 * 60 * 1000));
|
654 |
-
$.cookie("eModal-autoOpen-"+easymodal.autoOpen.id, true, { expires : date });
|
655 |
-
},easymodal.autoOpen.delay);
|
656 |
-
}
|
657 |
-
if(easymodal.autoExit && !$.cookie("eModal-autoExit-"+easymodal.autoExit.id))
|
658 |
-
{
|
659 |
-
$('body').one('mouseleave',function(){
|
660 |
-
if(easymodal.force_user_login)
|
661 |
-
{
|
662 |
-
return false;
|
663 |
-
}
|
664 |
-
$this = $('#eModal-'+easymodal.autoExit.id).emodal('open');
|
665 |
-
var date = new Date();
|
666 |
-
date.setTime(date.getTime() + (easymodal.autoExit.timer * 24 * 60 * 1000));
|
667 |
-
$.cookie("eModal-autoExit-"+easymodal.autoExit.id, true, { expires : date });
|
668 |
-
});
|
669 |
-
}
|
670 |
-
|
671 |
-
// Run our login ajax
|
672 |
-
$('#eModal-Login form').on('submit', function(e) {
|
673 |
-
$form = $(this);
|
674 |
-
// Stop the form from submitting so we can use ajax.
|
675 |
-
e.preventDefault();
|
676 |
-
// Check what form is currently being submitted so we can return the right values for the ajax request.
|
677 |
-
// Display our loading message while we check the credentials.
|
678 |
-
$form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
|
679 |
-
// Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
|
680 |
-
$.ajax({
|
681 |
-
type: 'POST',
|
682 |
-
dataType: 'json',
|
683 |
-
url: easymodal.ajaxLogin,
|
684 |
-
data: {
|
685 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
686 |
-
'username' : $('#user_login',$form).val(),
|
687 |
-
'password' : $('#user_pass',$form).val(),
|
688 |
-
'rememberme' : $('#rememberme',$form).is(':checked') ? true : false,
|
689 |
-
'login' : true,
|
690 |
-
'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
|
691 |
-
},
|
692 |
-
success: function(results) {
|
693 |
-
// Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
|
694 |
-
if(results.loggedin === true) {
|
695 |
-
$('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
|
696 |
-
setTimeout(function(){
|
697 |
-
$('#eModal-Login').emodal('close',{onClose: function(){
|
698 |
-
window.location.href = easymodal.redirecturl;
|
699 |
-
}});
|
700 |
-
|
701 |
-
},2000);
|
702 |
-
|
703 |
-
} else {
|
704 |
-
$('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
|
705 |
-
}
|
706 |
-
}
|
707 |
-
});
|
708 |
-
});
|
709 |
-
// Run our register ajax
|
710 |
-
$('#eModal-Register form').on('submit', function(e) {
|
711 |
-
$form = $(this);
|
712 |
-
// Stop the form from submitting so we can use ajax.
|
713 |
-
e.preventDefault();
|
714 |
-
// Check what form is currently being submitted so we can return the right values for the ajax request.
|
715 |
-
// Display our loading message while we check the credentials.
|
716 |
-
if(!$('p.message',$form).length)
|
717 |
-
{
|
718 |
-
$form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
|
719 |
-
}
|
720 |
-
// Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
|
721 |
-
if($('#reg_pass',$form).length)
|
722 |
-
{
|
723 |
-
if($('#reg_pass',$form).val() != $('#reg_confirm',$form).val())
|
724 |
-
{
|
725 |
-
$('p.message',$form).removeClass('notice').addClass('error').html('Passwords don\'t match.');
|
726 |
-
return;
|
727 |
-
}
|
728 |
-
}
|
729 |
-
$.ajax({
|
730 |
-
type: 'POST',
|
731 |
-
dataType: 'json',
|
732 |
-
url: easymodal.ajaxLogin,
|
733 |
-
data: {
|
734 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
735 |
-
'user_login' : $('#reg_user',$form).val(),
|
736 |
-
'user_email' : $('#reg_email',$form).val(),
|
737 |
-
'user_pass' : $('#reg_pass',$form).val(),
|
738 |
-
'register' : true,
|
739 |
-
'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
|
740 |
-
},
|
741 |
-
success: function(results) {
|
742 |
-
// Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
|
743 |
-
if(results.loggedin === true) {
|
744 |
-
$('p.message',$form).removeClass('notice').addClass('success').html(results.message);
|
745 |
-
setTimeout(function(){
|
746 |
-
$('#eModal-Login').emodal('close',{onClose: function(){
|
747 |
-
window.location.href = easymodal.redirecturl;
|
748 |
-
}});
|
749 |
-
|
750 |
-
},2000);
|
751 |
-
|
752 |
-
} else {
|
753 |
-
$('p.message',$form).removeClass('notice').addClass('error').html(results.message);
|
754 |
-
}
|
755 |
-
}
|
756 |
-
});
|
757 |
-
});
|
758 |
-
// Run our forgot password ajax
|
759 |
-
$('#eModal-Forgot form').on('submit', function(e) {
|
760 |
-
$form = $(this);
|
761 |
-
// Stop the form from submitting so we can use ajax.
|
762 |
-
e.preventDefault();
|
763 |
-
// Check what form is currently being submitted so we can return the right values for the ajax request.
|
764 |
-
// Display our loading message while we check the credentials.
|
765 |
-
$form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
|
766 |
-
// Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
|
767 |
-
$.ajax({
|
768 |
-
type: 'POST',
|
769 |
-
dataType: 'json',
|
770 |
-
url: easymodal.ajaxLogin,
|
771 |
-
data: {
|
772 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
773 |
-
'username' : $('#forgot_login',$form).val(),
|
774 |
-
'forgotten' : true,
|
775 |
-
'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
|
776 |
-
},
|
777 |
-
success: function(results) {
|
778 |
-
// Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
|
779 |
-
if(results.loggedin === true) {
|
780 |
-
$('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
|
781 |
-
setTimeout(function(){
|
782 |
-
$('#eModal-Login').emodal('close',{onClose: function(){
|
783 |
-
window.location.href = easymodal.redirecturl;
|
784 |
-
}});
|
785 |
-
|
786 |
-
},2000);
|
787 |
-
|
788 |
-
} else {
|
789 |
-
$('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
|
790 |
-
}
|
791 |
-
}
|
792 |
-
});
|
793 |
-
});
|
794 |
-
/*
|
795 |
-
} else if ( form_id === 'register' ) {
|
796 |
-
$.ajax({
|
797 |
-
type: 'GET',
|
798 |
-
dataType: 'json',
|
799 |
-
url: wpml_script.ajax,
|
800 |
-
data: {
|
801 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
802 |
-
'username' : $('#form #reg_user').val(),
|
803 |
-
'email' : $('#form #reg_email').val(),
|
804 |
-
'register' : $('#form input[name="register"]').val(),
|
805 |
-
'security' : $('#form #security').val()
|
806 |
-
},
|
807 |
-
success: function(results) {
|
808 |
-
if(results.registerd === true) {
|
809 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('success').text(results.message).show();
|
810 |
-
$('#register #form input:not(#user-submit)').val('');
|
811 |
-
} else {
|
812 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('error').text(results.message).show();
|
813 |
-
}
|
814 |
-
}
|
815 |
-
});
|
816 |
-
} else if ( form_id === 'forgotten' ) {
|
817 |
-
$.ajax({
|
818 |
-
type: 'GET',
|
819 |
-
dataType: 'json',
|
820 |
-
url: wpml_script.ajax,
|
821 |
-
data: {
|
822 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
823 |
-
'username' : $('#form #forgot_login').val(),
|
824 |
-
'forgotten' : $('#form input[name="register"]').val(),
|
825 |
-
'security' : $('#form #security').val()
|
826 |
-
},
|
827 |
-
success: function(results) {
|
828 |
-
if(results.reset === true) {
|
829 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('success').text(results.message).show();
|
830 |
-
$('#forgotten #form input:not(#user-submit)').val('');
|
831 |
-
} else {
|
832 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('error').text(results.message).show();
|
833 |
-
}
|
834 |
-
}
|
835 |
-
});
|
836 |
-
} else {
|
837 |
-
// if all else fails and we've hit here... something strange happen and notify the user.
|
838 |
-
$('.wpml-content > p.message').text('Something Please refresh your window and try again.');
|
839 |
-
}
|
840 |
-
});
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
/*
|
847 |
-
$.expr[':'].external = function (obj)
|
848 |
-
{
|
849 |
-
return !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname);
|
850 |
-
};
|
851 |
-
$('a:external').addClass('external eModal-Link').emodal(easymodal.modals['Link']);
|
852 |
-
$('a[href$=".gif"], a[href$=".jpg"], a[href$=".png"], a[href$=".bmp"]').children('img').each(function ()
|
853 |
-
{
|
854 |
-
var anch = $(this).parents('a').addClass('eModal-Image');
|
855 |
-
var url = $(anch).attr('href');
|
856 |
-
$(anch).emodal(
|
857 |
-
{
|
858 |
-
url: url,
|
859 |
-
theme: '1',
|
860 |
-
type: 'Image'
|
861 |
-
});
|
862 |
-
});
|
863 |
-
if(settings.autoOpen == 'true')
|
864 |
-
{
|
865 |
-
setTimeout(function(){
|
866 |
-
$('#emModal-'+settings.autoOpenId).emodal('open');
|
867 |
-
}, settings.autoOpenDelay);
|
868 |
-
}
|
869 |
-
*/
|
870 |
-
})
|
871 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/easy-modal.min.js
DELETED
@@ -1,871 +0,0 @@
|
|
1 |
-
// Easy Modal v1.3
|
2 |
-
(function ($)
|
3 |
-
{
|
4 |
-
var currentMousePos = { x: -1, y: -1 };
|
5 |
-
var methods = {
|
6 |
-
init: function (options)
|
7 |
-
{
|
8 |
-
if(!$(this).parent().is('body'))
|
9 |
-
{
|
10 |
-
$(this).appendTo('body');
|
11 |
-
}
|
12 |
-
var opts = $.extend({}, $.fn.emodal.defaults, $(this).data(), options);
|
13 |
-
return $(this).data('emodal', opts);
|
14 |
-
},
|
15 |
-
close: function (options)
|
16 |
-
{
|
17 |
-
var options = $.extend({
|
18 |
-
speed: 'fast',
|
19 |
-
overlay: true
|
20 |
-
}, $.fn.emodal.defaults, options);
|
21 |
-
|
22 |
-
var $this = $(this);
|
23 |
-
|
24 |
-
var opts = $this.data('emodal');
|
25 |
-
$this.removeClass('active').fadeOut(options.speed,function(){
|
26 |
-
if(options.overlay)
|
27 |
-
$('#modal-overlay').fadeOut(options.speed,function(){
|
28 |
-
var vids = $('iframe',$this).filter('[src*="youtube"],[src*="vimeo"]');
|
29 |
-
if (vids.length > 0 )
|
30 |
-
{
|
31 |
-
vids.each(function(){
|
32 |
-
var src = $(this).attr('src');
|
33 |
-
$(this).attr('src', '').attr('src', src);
|
34 |
-
})
|
35 |
-
}
|
36 |
-
options.onClose();
|
37 |
-
});
|
38 |
-
})
|
39 |
-
$(window).unbind('scroll.emodal').unbind('keyup.emodal');
|
40 |
-
return this;
|
41 |
-
},
|
42 |
-
open: function()
|
43 |
-
{
|
44 |
-
var $this = $(this);
|
45 |
-
var opts = $this.data('emodal');
|
46 |
-
if(themes[opts.theme] === undefined)
|
47 |
-
{
|
48 |
-
var theme = themes[1];
|
49 |
-
}
|
50 |
-
else
|
51 |
-
{
|
52 |
-
var theme = themes[opts.theme];
|
53 |
-
}
|
54 |
-
// Check for and create Modal Overlay
|
55 |
-
if(!$('#modal-overlay').length){ $('<div id="modal-overlay">').appendTo('body'); }
|
56 |
-
|
57 |
-
// If not stackable close all other modals.
|
58 |
-
if($('.modal.active').length)
|
59 |
-
{
|
60 |
-
$('.modal.active').each(function(){$(this).emodal('close',{speed:100,overlay:false})});
|
61 |
-
}
|
62 |
-
else
|
63 |
-
{
|
64 |
-
$('#modal-overlay').css('opacity',0).show(0);
|
65 |
-
}
|
66 |
-
|
67 |
-
$this.addClass('active');
|
68 |
-
// Modal Clos Button
|
69 |
-
|
70 |
-
if(!opts.closeDisabled && $('.close-modal',$this).length)
|
71 |
-
{
|
72 |
-
$('.close-modal',$this)
|
73 |
-
.unbind('click')
|
74 |
-
.click(function(){ $this.emodal('close'); })
|
75 |
-
.themeClose(opts);
|
76 |
-
}
|
77 |
-
$('#modal-overlay')
|
78 |
-
.unbind('click')
|
79 |
-
.click(function()
|
80 |
-
{
|
81 |
-
if (opts.overlayClose == true)
|
82 |
-
{
|
83 |
-
$this.emodal('close');
|
84 |
-
}
|
85 |
-
})
|
86 |
-
.themeOverlay(opts);
|
87 |
-
|
88 |
-
if(opts.overlayClose == true)
|
89 |
-
{
|
90 |
-
$(window).bind('keyup.emodal',function(e){
|
91 |
-
if($('.modal.active').length && e.keyCode == 27)
|
92 |
-
{
|
93 |
-
$this.emodal('close');
|
94 |
-
}
|
95 |
-
});
|
96 |
-
}
|
97 |
-
$this.themeModal(opts);
|
98 |
-
$this.animation(opts.animation,opts);
|
99 |
-
return $this;
|
100 |
-
}/*,
|
101 |
-
show: function ()
|
102 |
-
{
|
103 |
-
if (opts.type === 'Image')
|
104 |
-
{
|
105 |
-
container.css(
|
106 |
-
{
|
107 |
-
maxWidth: opts.maxWidth,
|
108 |
-
maxHeight: opts.maxHeight
|
109 |
-
});
|
110 |
-
var abcs = $("a.eModal-Image")
|
111 |
-
var prevButton = $('<a>')
|
112 |
-
.attr('id',opts.prevId)
|
113 |
-
.click(function (){
|
114 |
-
var current = $('.eModal-Opened')
|
115 |
-
var prev = abcs.eq(abcs.index(current) - 1)
|
116 |
-
current.removeClass('eModal-Opened')
|
117 |
-
if (prev.length <= 0) prev = abcs.eq(abcs.length)
|
118 |
-
prev.addClass('eModal-Opened')
|
119 |
-
container
|
120 |
-
.animate({opacity: '.01'}, function (){
|
121 |
-
var img = $("<img/>")
|
122 |
-
.attr('src', prev.attr('href'))
|
123 |
-
.css({
|
124 |
-
maxWidth: '100%',
|
125 |
-
maxHeight: '100%'
|
126 |
-
})
|
127 |
-
.load(function (){
|
128 |
-
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0)
|
129 |
-
{
|
130 |
-
alert('broken image!')
|
131 |
-
}
|
132 |
-
else
|
133 |
-
{
|
134 |
-
if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
|
135 |
-
if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
|
136 |
-
content
|
137 |
-
.html(img)
|
138 |
-
.css({opacity:'.01'})
|
139 |
-
|
140 |
-
container
|
141 |
-
.emodal('center')
|
142 |
-
.animate({opacity:'.01'})
|
143 |
-
.animate({opacity:'1'})
|
144 |
-
|
145 |
-
content.animate({opacity: '1'})
|
146 |
-
}
|
147 |
-
})
|
148 |
-
})
|
149 |
-
return false
|
150 |
-
})
|
151 |
-
var nextButton = $('<a>')
|
152 |
-
.attr('id',opts.nextId)
|
153 |
-
.click(function (){
|
154 |
-
var current = $('.eModal-Opened')
|
155 |
-
|
156 |
-
var next = abcs.eq(abcs.index(current) + 1)
|
157 |
-
current.removeClass('eModal-Opened')
|
158 |
-
if (next.length == 0) next = abcs.eq(0)
|
159 |
-
next.addClass('eModal-Opened')
|
160 |
-
container
|
161 |
-
.animate({opacity: '.01'}, function (){
|
162 |
-
var img = $("<img/>")
|
163 |
-
.attr('src', next.attr('href'))
|
164 |
-
.css({
|
165 |
-
maxWidth: '100%',
|
166 |
-
maxHeight: '100%'
|
167 |
-
})
|
168 |
-
.load(function (){
|
169 |
-
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0)
|
170 |
-
{
|
171 |
-
alert('broken image!')
|
172 |
-
}
|
173 |
-
else
|
174 |
-
{
|
175 |
-
if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
|
176 |
-
if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
|
177 |
-
content
|
178 |
-
.html(img)
|
179 |
-
.css({opacity:'.01'})
|
180 |
-
|
181 |
-
container
|
182 |
-
.emodal('center')
|
183 |
-
.animate({opacity:'.01'})
|
184 |
-
.animate({opacity:'1'})
|
185 |
-
|
186 |
-
content.animate({opacity: '1'})
|
187 |
-
}
|
188 |
-
})
|
189 |
-
})
|
190 |
-
return false
|
191 |
-
})
|
192 |
-
var buttons = $('<div>')
|
193 |
-
.attr('id',opts.buttonsId)
|
194 |
-
.append(prevButton, nextButton)
|
195 |
-
.appendTo(container)
|
196 |
-
}
|
197 |
-
if (opts.type === 'Link')
|
198 |
-
{
|
199 |
-
opts.requestData.url = $(this).attr('href')
|
200 |
-
opts.requestData.iframeWidth = opts.maxWidth
|
201 |
-
opts.requestData.iframeHeight = opts.maxHeight
|
202 |
-
}
|
203 |
-
var loaded = false
|
204 |
-
if (opts.url != null){
|
205 |
-
if (opts.type === 'Image'){
|
206 |
-
var img = $("<img/>")
|
207 |
-
.attr('src', opts.url)
|
208 |
-
.css({
|
209 |
-
maxWidth: '100%',
|
210 |
-
maxHeight: '100%'
|
211 |
-
})
|
212 |
-
.load(function (){
|
213 |
-
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) alert('broken image!')
|
214 |
-
else {
|
215 |
-
if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
|
216 |
-
if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
|
217 |
-
content.append(img)
|
218 |
-
loaded = true
|
219 |
-
}
|
220 |
-
})
|
221 |
-
}
|
222 |
-
else
|
223 |
-
{
|
224 |
-
$.post(opts.url, opts.requestData, function (data){
|
225 |
-
content.prepend(data)
|
226 |
-
if($('form',content).length)
|
227 |
-
{
|
228 |
-
$orig_action = $('form',content).attr('action').split('#');
|
229 |
-
$('form',content).attr('action',"#" + $orig_action[1]).attr('action')
|
230 |
-
}
|
231 |
-
container
|
232 |
-
.show()
|
233 |
-
.css({opacity: '.01'});
|
234 |
-
if(opts.userMaxHeight > 0)
|
235 |
-
{
|
236 |
-
content.css({maxHeight: $(window).height() * (opts.userMaxHeight / 100) + 'px'});
|
237 |
-
}
|
238 |
-
else if(content.innerHeight() > opts.maxHeight && opts.type != 'Link')
|
239 |
-
{
|
240 |
-
content.css({maxHeight: (opts.maxHeight - 60) + 'px'});
|
241 |
-
}
|
242 |
-
|
243 |
-
if(opts.userHeight > 0)
|
244 |
-
{
|
245 |
-
content.css({height: opts.userHeight + 'px'});
|
246 |
-
}
|
247 |
-
|
248 |
-
if(opts.userMaxWidth > 0)
|
249 |
-
{
|
250 |
-
content.css({maxWidth: $(window).width() * (opts.userMaxWidth / 100) + 'px'});
|
251 |
-
}
|
252 |
-
|
253 |
-
if(opts.userWidth > 0)
|
254 |
-
{
|
255 |
-
content.css({width: opts.userWidth + 'px'});
|
256 |
-
}
|
257 |
-
var title = content
|
258 |
-
.find("#eModal-Title")
|
259 |
-
.css({
|
260 |
-
color: theme.contentTitleFontColor,
|
261 |
-
fontFamily: theme.contentTitleFontFamily,
|
262 |
-
fontSize: theme.contentTitleFontSize + 'px'
|
263 |
-
})
|
264 |
-
if(title) title.attr('title', title.text()).appendTo(controls)
|
265 |
-
opts.onLoad()
|
266 |
-
if(opts.cf7form == true) loadCf7()
|
267 |
-
if(opts.gravityform == true) loadGravityForms()
|
268 |
-
loaded = true
|
269 |
-
})
|
270 |
-
}
|
271 |
-
}
|
272 |
-
},*/
|
273 |
-
};
|
274 |
-
$.fn.emodal = function(method)
|
275 |
-
{
|
276 |
-
// Method calling logic
|
277 |
-
if (methods[method])
|
278 |
-
{
|
279 |
-
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
280 |
-
}
|
281 |
-
else if (typeof method === 'object' || !method)
|
282 |
-
{
|
283 |
-
return methods.init.apply(this, arguments);
|
284 |
-
}
|
285 |
-
else
|
286 |
-
{
|
287 |
-
$.error('Method ' + method + ' does not exist on jQuery.emodal');
|
288 |
-
}
|
289 |
-
};
|
290 |
-
$.fn.themeOverlay = function(opts)
|
291 |
-
{
|
292 |
-
var $this = $(this);
|
293 |
-
if(themes[opts.theme] === undefined)
|
294 |
-
{
|
295 |
-
var theme = themes[1];
|
296 |
-
}
|
297 |
-
else
|
298 |
-
{
|
299 |
-
var theme = themes[opts.theme];
|
300 |
-
}
|
301 |
-
return $this.addClass('theme-'+opts.theme).animate({
|
302 |
-
backgroundColor: theme.overlayColor,
|
303 |
-
opacity: theme.overlayOpacity / 100
|
304 |
-
},opts.duration);
|
305 |
-
};
|
306 |
-
$.fn.themeModal = function(opts)
|
307 |
-
{
|
308 |
-
var $this = $(this);
|
309 |
-
if(themes[opts.theme] === undefined)
|
310 |
-
{
|
311 |
-
var theme = themes[1];
|
312 |
-
}
|
313 |
-
else
|
314 |
-
{
|
315 |
-
var theme = themes[opts.theme];
|
316 |
-
}
|
317 |
-
if(opts.size == 'custom')
|
318 |
-
{
|
319 |
-
$this.css({
|
320 |
-
'height': opts.userHeight ? opts.userHeight + opts.userHeightUnit : $this.css('height'),
|
321 |
-
'width': opts.userWidth ? opts.userWidth + opts.userWidthUnit : $this.css('width'),
|
322 |
-
'margin-left': opts.userWidth ? -(opts.userWidth / 2) + opts.userWidthUnit : $this.css('margin-left')
|
323 |
-
});
|
324 |
-
}
|
325 |
-
$this
|
326 |
-
.addClass(opts.size)
|
327 |
-
.addClass('theme-'+opts.theme)
|
328 |
-
.css({
|
329 |
-
color: theme.contentFontColor,
|
330 |
-
backgroundColor: theme.containerBgColor,
|
331 |
-
padding: theme.containerPadding + 'px',
|
332 |
-
border: theme.containerBorderColor + ' ' + theme.containerBorderStyle + ' ' + theme.containerBorderWidth + 'px',
|
333 |
-
"-webkit-border-radius": theme.containerBorderRadius + 'px',
|
334 |
-
"border-radius": theme.containerBorderRadius + 'px'
|
335 |
-
});
|
336 |
-
$('.title', $this).css({
|
337 |
-
color: theme.contentTitleFontColor,
|
338 |
-
fontFamily: theme.contentTitleFontFamily,
|
339 |
-
fontSize: theme.contentTitleFontSize
|
340 |
-
});
|
341 |
-
return $this;
|
342 |
-
};
|
343 |
-
$.fn.themeClose = function(opts)
|
344 |
-
{
|
345 |
-
var $this = $(this);
|
346 |
-
if(themes[opts.theme] === undefined)
|
347 |
-
{
|
348 |
-
var theme = themes[1];
|
349 |
-
}
|
350 |
-
else
|
351 |
-
{
|
352 |
-
var theme = themes[opts.theme];
|
353 |
-
}
|
354 |
-
if(theme.closeLocation == 'outside')
|
355 |
-
{
|
356 |
-
var val = theme.closeSize;
|
357 |
-
var top = bottom = left = right = 'auto';
|
358 |
-
switch (theme.closePosition)
|
359 |
-
{
|
360 |
-
case 'topright':
|
361 |
-
top = -(val / 2) + 'px';
|
362 |
-
right = -(val / 2) + 'px';
|
363 |
-
break;
|
364 |
-
case 'topleft':
|
365 |
-
top = -(val / 2) + 'px';
|
366 |
-
left = -(val / 2) + 'px';
|
367 |
-
break;
|
368 |
-
case 'bottomright':
|
369 |
-
bottom = -(val / 2) + 'px';
|
370 |
-
right = -(val / 2) + 'px';
|
371 |
-
break;
|
372 |
-
case 'bottomleft':
|
373 |
-
bottom = -(val / 2) + 'px';
|
374 |
-
left = -(val / 2) + 'px';
|
375 |
-
break;
|
376 |
-
}
|
377 |
-
$this
|
378 |
-
.addClass('outside')
|
379 |
-
.css({
|
380 |
-
left: left,
|
381 |
-
right: right,
|
382 |
-
top: top,
|
383 |
-
bottom: bottom,
|
384 |
-
height: theme.closeSize + 'px',
|
385 |
-
fontSize: theme.closeFontSize + 'px',
|
386 |
-
width: theme.closeSize + 'px',
|
387 |
-
backgroundColor: theme.closeBgColor,
|
388 |
-
"-webkit-border-radius": theme.closeBorderRadius + 'px',
|
389 |
-
"border-radius": theme.closeBorderRadius + 'px',
|
390 |
-
lineHeight: theme.closeSize + 'px'
|
391 |
-
});
|
392 |
-
}
|
393 |
-
return $this.addClass('theme-'+opts.theme)
|
394 |
-
.html(theme.closeText)
|
395 |
-
.css({
|
396 |
-
color: theme.closeFontColor,
|
397 |
-
});
|
398 |
-
};
|
399 |
-
|
400 |
-
var animations = {
|
401 |
-
fade: function(options)
|
402 |
-
{
|
403 |
-
var $this = $(this).show(0).css({'opacity':0,'top':$(window).scrollTop() + 100 +'px'});
|
404 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
405 |
-
$this.animate({
|
406 |
-
opacity: 1
|
407 |
-
},parseInt(opts.duration),opts.easing,function(){
|
408 |
-
$this
|
409 |
-
.removeAttr('style')
|
410 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
411 |
-
.themeModal(opts);
|
412 |
-
});
|
413 |
-
},
|
414 |
-
fadeAndSlide: function(options)
|
415 |
-
{
|
416 |
-
var $this = $(this).show(0).css('opacity',0);
|
417 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
418 |
-
switch(opts.direction)
|
419 |
-
{
|
420 |
-
case 'mouse': $this.css({'top': currentMousePos.y + 'px','left': currentMousePos.x +'px'}); break;
|
421 |
-
case 'top': $this.css({'top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
422 |
-
case 'left': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px'}); break;
|
423 |
-
case 'bottom': $this.css({'top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
424 |
-
case 'right': $this.css({'left': $(window).innerWidth()+'px','top':$(window).scrollTop() + 100 +'px'}); break;
|
425 |
-
case 'topleft': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
426 |
-
case 'topright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
427 |
-
case 'bottomleft': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
428 |
-
case 'bottomright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
429 |
-
}
|
430 |
-
$('html').css('overflow-x','hidden');
|
431 |
-
$this.animate({
|
432 |
-
'left': '50%',
|
433 |
-
'top': $(window).scrollTop() + 100 +'px'
|
434 |
-
},{duration: opts.duration , queue:false},opts.easing);
|
435 |
-
setTimeout(function()
|
436 |
-
{
|
437 |
-
$this.animate({
|
438 |
-
'opacity': 1
|
439 |
-
},opts.duration * .75,opts.easing,function(){
|
440 |
-
$this
|
441 |
-
.removeAttr('style')
|
442 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
443 |
-
.themeModal(opts);
|
444 |
-
$('html').css('overflow-x','inherit');
|
445 |
-
});
|
446 |
-
},opts.duration * .25);
|
447 |
-
},
|
448 |
-
grow: function(options)
|
449 |
-
{
|
450 |
-
var $this = $(this).show(0);
|
451 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
452 |
-
var currently = {
|
453 |
-
width: parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 + '%',
|
454 |
-
height: parseInt($this.css('height')),
|
455 |
-
marginLeft: '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
|
456 |
-
padding: parseInt($this.css('padding-left')) / parseInt($this.css('font-size')) + 'em'
|
457 |
-
};
|
458 |
-
$('*',$this).fadeOut(0);
|
459 |
-
$this.css({
|
460 |
-
'top': (currently.height/10) * 5 + $(window).scrollTop() + 100 +'px',
|
461 |
-
'left': (currently.width/10) * 5 + ($(window).innerWidth() / 2) +'px',
|
462 |
-
'height': 0,
|
463 |
-
'width': 0,
|
464 |
-
'padding': 0,
|
465 |
-
'margin-left': 0
|
466 |
-
}).animate({
|
467 |
-
'top': $(window).scrollTop() + 100 +'px',
|
468 |
-
'left': '50%',
|
469 |
-
'padding': currently.padding,
|
470 |
-
'height': currently.height,
|
471 |
-
'width': currently.width,
|
472 |
-
'margin-left': currently.marginLeft
|
473 |
-
},opts.duration,function(){
|
474 |
-
$this
|
475 |
-
.removeAttr('style')
|
476 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
477 |
-
.themeModal(opts);
|
478 |
-
$('*',$this).fadeIn('fast');
|
479 |
-
});
|
480 |
-
},
|
481 |
-
growAndSlide: function(options)
|
482 |
-
{
|
483 |
-
var $this = $(this).show(0);
|
484 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
485 |
-
var currently = {
|
486 |
-
width: parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 + '%',
|
487 |
-
height: parseInt($this.css('height')),
|
488 |
-
marginLeft: '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
|
489 |
-
padding: parseInt($this.css('padding-left')) / parseInt($this.css('font-size')) + 'em'
|
490 |
-
};
|
491 |
-
$('html,body').css('overflow-x','hidden');
|
492 |
-
$('*',$this).fadeOut(0);
|
493 |
-
$this.css({
|
494 |
-
'opacity': 1,
|
495 |
-
'height': 0,
|
496 |
-
'width': 0,
|
497 |
-
'padding': 0,
|
498 |
-
'margin-left': 0
|
499 |
-
});
|
500 |
-
switch(opts.direction)
|
501 |
-
{
|
502 |
-
case 'mouse': $this.css({'top': currentMousePos.y + 'px','left': currentMousePos.x +'px'}); break;
|
503 |
-
case 'top': $this.css({'top': $(window).scrollTop() + $this.outerHeight(true) + 'px'}); break;
|
504 |
-
case 'left': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px'}); break;
|
505 |
-
case 'bottom': $this.css({'top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
506 |
-
case 'right': $this.css({'left': $(window).innerWidth()+'px','top':$(window).scrollTop() + 100 +'px'}); break;
|
507 |
-
case 'topleft': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
508 |
-
case 'topright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
509 |
-
case 'bottomleft': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
510 |
-
case 'bottomright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
511 |
-
}
|
512 |
-
$this.animate({
|
513 |
-
'height': currently.height,
|
514 |
-
'padding': currently.padding,
|
515 |
-
'width': currently.width,
|
516 |
-
'margin-left': currently.marginLeft
|
517 |
-
},{duration: opts.duration , queue:false},opts.easing);
|
518 |
-
setTimeout(function()
|
519 |
-
{
|
520 |
-
$this.animate({
|
521 |
-
'height': 'auto',
|
522 |
-
'top': ($(window).scrollTop() + 100) +'px',
|
523 |
-
'left': '50%'
|
524 |
-
},opts.duration * .95,opts.easing,function(){
|
525 |
-
$this
|
526 |
-
.removeAttr('style')
|
527 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
528 |
-
.themeModal(opts);
|
529 |
-
$('*',$this).fadeIn('fast');
|
530 |
-
$('html').css('overflow-x','inherit');
|
531 |
-
});
|
532 |
-
},opts.duration * .05);
|
533 |
-
}/*,
|
534 |
-
canvas: function(options)
|
535 |
-
{
|
536 |
-
var $this = $(this)
|
537 |
-
$this.css('top',$(document).height() + $this.height()).show(0);
|
538 |
-
html2canvas($this, {
|
539 |
-
onrendered: function(canvas) {
|
540 |
-
var canvas = canvas;
|
541 |
-
//$('body').append(canvas);
|
542 |
-
var x = 4,
|
543 |
-
y = 3,
|
544 |
-
random = true,
|
545 |
-
width = parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100,
|
546 |
-
height = parseInt($this.css('height')),
|
547 |
-
marginLeft = '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
|
548 |
-
$img = canvas.toDataURL(),
|
549 |
-
n_tiles = x * y, // total number of tiles
|
550 |
-
tiles = [],
|
551 |
-
$tiles = {};
|
552 |
-
|
553 |
-
for ( var i = 0; i < n_tiles; i++ ) {
|
554 |
-
tiles.push('<div class="tile"/>');
|
555 |
-
}
|
556 |
-
|
557 |
-
$tiles = $( tiles.join('') );
|
558 |
-
// Hide original image and insert tiles in DOM
|
559 |
-
$this.hide().after(
|
560 |
-
$('<div class="modal-placeholder"/>').attr('style', $this.attr('style')).css({
|
561 |
-
'opacity': 1,
|
562 |
-
'height': height,
|
563 |
-
'margin-left': '-' + (parseInt(width) / 2) + '%',
|
564 |
-
'padding': 0,
|
565 |
-
'width': parseInt(width) + '%',
|
566 |
-
'top': $(window).scrollTop() + 100
|
567 |
-
})
|
568 |
-
.show(0)
|
569 |
-
.append( $tiles )
|
570 |
-
);
|
571 |
-
// Adjust position
|
572 |
-
$tiles.each(function(){
|
573 |
-
var pos = $(this).position();
|
574 |
-
|
575 |
-
console.log($this.outerHeight() / y + 'px');
|
576 |
-
$(this).css({
|
577 |
-
'border': 0,
|
578 |
-
'backgroundPosition': -pos.left +'px ' + -pos.top + 'px',
|
579 |
-
'width': $this.outerWidth() / x + 'px',
|
580 |
-
'height': $this.outerHeight() / y + 'px',
|
581 |
-
'background-image': 'url('+ $img +')'
|
582 |
-
});
|
583 |
-
});
|
584 |
-
|
585 |
-
}
|
586 |
-
});
|
587 |
-
//$this.hide(0);
|
588 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
589 |
-
}*/
|
590 |
-
};
|
591 |
-
$.fn.animation = function(style)
|
592 |
-
{
|
593 |
-
// Method calling logic
|
594 |
-
if (animations[style])
|
595 |
-
{
|
596 |
-
return animations[style].apply(this, Array.prototype.slice.call(arguments, 1));
|
597 |
-
}
|
598 |
-
else
|
599 |
-
{
|
600 |
-
$.error('Animation style ' + animations + ' does not exist on jQuery.animation');
|
601 |
-
}
|
602 |
-
};
|
603 |
-
|
604 |
-
$.fn.animation.defaults = {
|
605 |
-
duration:350,
|
606 |
-
direction: 'top',
|
607 |
-
easing: 'swing'
|
608 |
-
};
|
609 |
-
$.fn.emodal.defaults = {
|
610 |
-
theme: 1,
|
611 |
-
onLoad: function (){},
|
612 |
-
onClose: function (){},
|
613 |
-
type: null,
|
614 |
-
userHeight: null,
|
615 |
-
userWidth: null,
|
616 |
-
animation: 'fadeAndSlide',
|
617 |
-
direction: 'bottom',
|
618 |
-
duration: 350,
|
619 |
-
overlayClose: false,
|
620 |
-
escClose: false,
|
621 |
-
closeDisabled: false
|
622 |
-
};
|
623 |
-
var modals = easymodal.modals;
|
624 |
-
var themes = easymodal.themes;
|
625 |
-
var settings = easymodal.settings;
|
626 |
-
|
627 |
-
$(document).ready(function()
|
628 |
-
{
|
629 |
-
$('.modal').each(function()
|
630 |
-
{
|
631 |
-
var $this = $(this).css({visibility:'visible'}).hide(0);
|
632 |
-
var modalId = $this.attr('id').split("-")[1];
|
633 |
-
$this.emodal(modals[modalId]);
|
634 |
-
$(document).on('click','.'+$this.attr('id'),function(e){
|
635 |
-
e.preventDefault();
|
636 |
-
e.stopPropagation();
|
637 |
-
currentMousePos.x = e.pageX;
|
638 |
-
currentMousePos.y = e.pageY;
|
639 |
-
$this.emodal('open');
|
640 |
-
});
|
641 |
-
$('.'+$this.attr('id')).css('cursor','pointer');
|
642 |
-
});
|
643 |
-
if(easymodal.force_user_login)
|
644 |
-
{
|
645 |
-
$('#eModal-Login .close-modal, #eModal-Register .close-modal, #eModal-Forgot .close-modal').hide();
|
646 |
-
$('#eModal-Register, #eModal-Forgot').append($('<a class="eModal-Login">Back to Login Form</a>').css('cursor','pointer'));
|
647 |
-
}
|
648 |
-
if(easymodal.autoOpen && !$.cookie("eModal-autoOpen-"+easymodal.autoOpen.id))
|
649 |
-
{
|
650 |
-
setTimeout(function(){
|
651 |
-
$('#eModal-'+easymodal.autoOpen.id).emodal('open');
|
652 |
-
var date = new Date();
|
653 |
-
date.setTime(date.getTime() + (easymodal.autoOpen.timer * 24 * 60 * 1000));
|
654 |
-
$.cookie("eModal-autoOpen-"+easymodal.autoOpen.id, true, { expires : date });
|
655 |
-
},easymodal.autoOpen.delay);
|
656 |
-
}
|
657 |
-
if(easymodal.autoExit && !$.cookie("eModal-autoExit-"+easymodal.autoExit.id))
|
658 |
-
{
|
659 |
-
$('body').one('mouseleave',function(){
|
660 |
-
if(easymodal.force_user_login)
|
661 |
-
{
|
662 |
-
return false;
|
663 |
-
}
|
664 |
-
$this = $('#eModal-'+easymodal.autoExit.id).emodal('open');
|
665 |
-
var date = new Date();
|
666 |
-
date.setTime(date.getTime() + (easymodal.autoExit.timer * 24 * 60 * 1000));
|
667 |
-
$.cookie("eModal-autoExit-"+easymodal.autoExit.id, true, { expires : date });
|
668 |
-
});
|
669 |
-
}
|
670 |
-
|
671 |
-
// Run our login ajax
|
672 |
-
$('#eModal-Login form').on('submit', function(e) {
|
673 |
-
$form = $(this);
|
674 |
-
// Stop the form from submitting so we can use ajax.
|
675 |
-
e.preventDefault();
|
676 |
-
// Check what form is currently being submitted so we can return the right values for the ajax request.
|
677 |
-
// Display our loading message while we check the credentials.
|
678 |
-
$form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
|
679 |
-
// Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
|
680 |
-
$.ajax({
|
681 |
-
type: 'POST',
|
682 |
-
dataType: 'json',
|
683 |
-
url: easymodal.ajaxLogin,
|
684 |
-
data: {
|
685 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
686 |
-
'username' : $('#user_login',$form).val(),
|
687 |
-
'password' : $('#user_pass',$form).val(),
|
688 |
-
'rememberme' : $('#rememberme',$form).is(':checked') ? true : false,
|
689 |
-
'login' : true,
|
690 |
-
'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
|
691 |
-
},
|
692 |
-
success: function(results) {
|
693 |
-
// Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
|
694 |
-
if(results.loggedin === true) {
|
695 |
-
$('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
|
696 |
-
setTimeout(function(){
|
697 |
-
$('#eModal-Login').emodal('close',{onClose: function(){
|
698 |
-
window.location.href = easymodal.redirecturl;
|
699 |
-
}});
|
700 |
-
|
701 |
-
},2000);
|
702 |
-
|
703 |
-
} else {
|
704 |
-
$('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
|
705 |
-
}
|
706 |
-
}
|
707 |
-
});
|
708 |
-
});
|
709 |
-
// Run our register ajax
|
710 |
-
$('#eModal-Register form').on('submit', function(e) {
|
711 |
-
$form = $(this);
|
712 |
-
// Stop the form from submitting so we can use ajax.
|
713 |
-
e.preventDefault();
|
714 |
-
// Check what form is currently being submitted so we can return the right values for the ajax request.
|
715 |
-
// Display our loading message while we check the credentials.
|
716 |
-
if(!$('p.message',$form).length)
|
717 |
-
{
|
718 |
-
$form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
|
719 |
-
}
|
720 |
-
// Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
|
721 |
-
if($('#reg_pass',$form).length)
|
722 |
-
{
|
723 |
-
if($('#reg_pass',$form).val() != $('#reg_confirm',$form).val())
|
724 |
-
{
|
725 |
-
$('p.message',$form).removeClass('notice').addClass('error').html('Passwords don\'t match.');
|
726 |
-
return;
|
727 |
-
}
|
728 |
-
}
|
729 |
-
$.ajax({
|
730 |
-
type: 'POST',
|
731 |
-
dataType: 'json',
|
732 |
-
url: easymodal.ajaxLogin,
|
733 |
-
data: {
|
734 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
735 |
-
'user_login' : $('#reg_user',$form).val(),
|
736 |
-
'user_email' : $('#reg_email',$form).val(),
|
737 |
-
'user_pass' : $('#reg_pass',$form).val(),
|
738 |
-
'register' : true,
|
739 |
-
'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
|
740 |
-
},
|
741 |
-
success: function(results) {
|
742 |
-
// Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
|
743 |
-
if(results.loggedin === true) {
|
744 |
-
$('p.message',$form).removeClass('notice').addClass('success').html(results.message);
|
745 |
-
setTimeout(function(){
|
746 |
-
$('#eModal-Login').emodal('close',{onClose: function(){
|
747 |
-
window.location.href = easymodal.redirecturl;
|
748 |
-
}});
|
749 |
-
|
750 |
-
},2000);
|
751 |
-
|
752 |
-
} else {
|
753 |
-
$('p.message',$form).removeClass('notice').addClass('error').html(results.message);
|
754 |
-
}
|
755 |
-
}
|
756 |
-
});
|
757 |
-
});
|
758 |
-
// Run our forgot password ajax
|
759 |
-
$('#eModal-Forgot form').on('submit', function(e) {
|
760 |
-
$form = $(this);
|
761 |
-
// Stop the form from submitting so we can use ajax.
|
762 |
-
e.preventDefault();
|
763 |
-
// Check what form is currently being submitted so we can return the right values for the ajax request.
|
764 |
-
// Display our loading message while we check the credentials.
|
765 |
-
$form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
|
766 |
-
// Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
|
767 |
-
$.ajax({
|
768 |
-
type: 'POST',
|
769 |
-
dataType: 'json',
|
770 |
-
url: easymodal.ajaxLogin,
|
771 |
-
data: {
|
772 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
773 |
-
'username' : $('#forgot_login',$form).val(),
|
774 |
-
'forgotten' : true,
|
775 |
-
'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
|
776 |
-
},
|
777 |
-
success: function(results) {
|
778 |
-
// Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
|
779 |
-
if(results.loggedin === true) {
|
780 |
-
$('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
|
781 |
-
setTimeout(function(){
|
782 |
-
$('#eModal-Login').emodal('close',{onClose: function(){
|
783 |
-
window.location.href = easymodal.redirecturl;
|
784 |
-
}});
|
785 |
-
|
786 |
-
},2000);
|
787 |
-
|
788 |
-
} else {
|
789 |
-
$('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
|
790 |
-
}
|
791 |
-
}
|
792 |
-
});
|
793 |
-
});
|
794 |
-
/*
|
795 |
-
} else if ( form_id === 'register' ) {
|
796 |
-
$.ajax({
|
797 |
-
type: 'GET',
|
798 |
-
dataType: 'json',
|
799 |
-
url: wpml_script.ajax,
|
800 |
-
data: {
|
801 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
802 |
-
'username' : $('#form #reg_user').val(),
|
803 |
-
'email' : $('#form #reg_email').val(),
|
804 |
-
'register' : $('#form input[name="register"]').val(),
|
805 |
-
'security' : $('#form #security').val()
|
806 |
-
},
|
807 |
-
success: function(results) {
|
808 |
-
if(results.registerd === true) {
|
809 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('success').text(results.message).show();
|
810 |
-
$('#register #form input:not(#user-submit)').val('');
|
811 |
-
} else {
|
812 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('error').text(results.message).show();
|
813 |
-
}
|
814 |
-
}
|
815 |
-
});
|
816 |
-
} else if ( form_id === 'forgotten' ) {
|
817 |
-
$.ajax({
|
818 |
-
type: 'GET',
|
819 |
-
dataType: 'json',
|
820 |
-
url: wpml_script.ajax,
|
821 |
-
data: {
|
822 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
823 |
-
'username' : $('#form #forgot_login').val(),
|
824 |
-
'forgotten' : $('#form input[name="register"]').val(),
|
825 |
-
'security' : $('#form #security').val()
|
826 |
-
},
|
827 |
-
success: function(results) {
|
828 |
-
if(results.reset === true) {
|
829 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('success').text(results.message).show();
|
830 |
-
$('#forgotten #form input:not(#user-submit)').val('');
|
831 |
-
} else {
|
832 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('error').text(results.message).show();
|
833 |
-
}
|
834 |
-
}
|
835 |
-
});
|
836 |
-
} else {
|
837 |
-
// if all else fails and we've hit here... something strange happen and notify the user.
|
838 |
-
$('.wpml-content > p.message').text('Something Please refresh your window and try again.');
|
839 |
-
}
|
840 |
-
});
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
/*
|
847 |
-
$.expr[':'].external = function (obj)
|
848 |
-
{
|
849 |
-
return !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname);
|
850 |
-
};
|
851 |
-
$('a:external').addClass('external eModal-Link').emodal(easymodal.modals['Link']);
|
852 |
-
$('a[href$=".gif"], a[href$=".jpg"], a[href$=".png"], a[href$=".bmp"]').children('img').each(function ()
|
853 |
-
{
|
854 |
-
var anch = $(this).parents('a').addClass('eModal-Image');
|
855 |
-
var url = $(anch).attr('href');
|
856 |
-
$(anch).emodal(
|
857 |
-
{
|
858 |
-
url: url,
|
859 |
-
theme: '1',
|
860 |
-
type: 'Image'
|
861 |
-
});
|
862 |
-
});
|
863 |
-
if(settings.autoOpen == 'true')
|
864 |
-
{
|
865 |
-
setTimeout(function(){
|
866 |
-
$('#emModal-'+settings.autoOpenId).emodal('open');
|
867 |
-
}, settings.autoOpenDelay);
|
868 |
-
}
|
869 |
-
*/
|
870 |
-
})
|
871 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/jquery.animate-colors-min.js
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Color animation 20120928
|
3 |
-
http://www.bitstorm.org/jquery/color-animation/
|
4 |
-
Copyright 2011, 2012 Edwin Martin <edwin@bitstorm.org>
|
5 |
-
Released under the MIT and GPL licenses.
|
6 |
-
*/
|
7 |
-
(function(d){function m(){var b=d("script:first"),a=b.css("color"),c=false;if(/^rgba/.test(a))c=true;else try{c=a!=b.css("color","rgba(0, 0, 0, 0.5)").css("color");b.css("color",a)}catch(e){}return c}function j(b,a,c){var e="rgb"+(d.support.rgba?"a":"")+"("+parseInt(b[0]+c*(a[0]-b[0]),10)+","+parseInt(b[1]+c*(a[1]-b[1]),10)+","+parseInt(b[2]+c*(a[2]-b[2]),10);if(d.support.rgba)e+=","+(b&&a?parseFloat(b[3]+c*(a[3]-b[3])):1);e+=")";return e}function g(b){var a,c;if(a=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(b))c=
|
8 |
-
[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),1];else if(a=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(b))c=[parseInt(a[1],16)*17,parseInt(a[2],16)*17,parseInt(a[3],16)*17,1];else if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))c=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),1];else if(a=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9\.]*)\s*\)/.exec(b))c=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10),parseFloat(a[4])];return c}
|
9 |
-
d.extend(true,d,{support:{rgba:m()}});var k=["color","backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","outlineColor"];d.each(k,function(b,a){d.Tween.propHooks[a]={get:function(c){return d(c.elem).css(a)},set:function(c){var e=c.elem.style,i=g(d(c.elem).css(a)),h=g(c.end);c.run=function(f){e[a]=j(i,h,f)}}}});d.Tween.propHooks.borderColor={set:function(b){var a=b.elem.style,c=[],e=k.slice(2,6);d.each(e,function(h,f){c[f]=g(d(b.elem).css(f))});var i=g(b.end);
|
10 |
-
b.run=function(h){d.each(e,function(f,l){a[l]=j(c[l],i,h)})}}}})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/jquery.cookie.js
DELETED
@@ -1,79 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery Cookie Plugin v1.3.1
|
3 |
-
* https://github.com/carhartl/jquery-cookie
|
4 |
-
*
|
5 |
-
* Copyright 2013 Klaus Hartl
|
6 |
-
* Released under the MIT license
|
7 |
-
*/
|
8 |
-
(function (factory) {
|
9 |
-
if (typeof define === 'function' && define.amd) {
|
10 |
-
// AMD. Register as anonymous module.
|
11 |
-
define(['jquery'], factory);
|
12 |
-
} else {
|
13 |
-
// Browser globals.
|
14 |
-
factory(jQuery);
|
15 |
-
}
|
16 |
-
}(function ($) {
|
17 |
-
var pluses = /\+/g;
|
18 |
-
function raw(s) {
|
19 |
-
return s;
|
20 |
-
}
|
21 |
-
function decoded(s) {
|
22 |
-
return decodeURIComponent(s.replace(pluses, ' '));
|
23 |
-
}
|
24 |
-
function converted(s) {
|
25 |
-
if (s.indexOf('"') === 0) {
|
26 |
-
// This is a quoted cookie as according to RFC2068, unescape
|
27 |
-
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
28 |
-
}
|
29 |
-
try {
|
30 |
-
return config.json ? JSON.parse(s) : s;
|
31 |
-
} catch(er) {}
|
32 |
-
}
|
33 |
-
var config = $.cookie = function (key, value, options) {
|
34 |
-
// write
|
35 |
-
if (value !== undefined) {
|
36 |
-
options = $.extend({}, config.defaults, options);
|
37 |
-
if (typeof options.expires === 'number') {
|
38 |
-
var days = options.expires, t = options.expires = new Date();
|
39 |
-
t.setDate(t.getDate() + days);
|
40 |
-
}
|
41 |
-
value = config.json ? JSON.stringify(value) : String(value);
|
42 |
-
return (document.cookie = [
|
43 |
-
config.raw ? key : encodeURIComponent(key),
|
44 |
-
'=',
|
45 |
-
config.raw ? value : encodeURIComponent(value),
|
46 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
47 |
-
options.path ? '; path=' + options.path : '',
|
48 |
-
options.domain ? '; domain=' + options.domain : '',
|
49 |
-
options.secure ? '; secure' : ''
|
50 |
-
].join(''));
|
51 |
-
}
|
52 |
-
// read
|
53 |
-
var decode = config.raw ? raw : decoded;
|
54 |
-
var cookies = document.cookie.split('; ');
|
55 |
-
var result = key ? undefined : {};
|
56 |
-
for (var i = 0, l = cookies.length; i < l; i++) {
|
57 |
-
var parts = cookies[i].split('=');
|
58 |
-
var name = decode(parts.shift());
|
59 |
-
var cookie = decode(parts.join('='));
|
60 |
-
if (key && key === name) {
|
61 |
-
result = converted(cookie);
|
62 |
-
break;
|
63 |
-
}
|
64 |
-
if (!key) {
|
65 |
-
result[name] = converted(cookie);
|
66 |
-
}
|
67 |
-
}
|
68 |
-
return result;
|
69 |
-
};
|
70 |
-
config.defaults = {};
|
71 |
-
$.removeCookie = function (key, options) {
|
72 |
-
if ($.cookie(key) !== undefined) {
|
73 |
-
// Must not alter options, thus extending a fresh object...
|
74 |
-
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
75 |
-
return true;
|
76 |
-
}
|
77 |
-
return false;
|
78 |
-
};
|
79 |
-
}));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/models/modal.php
DELETED
@@ -1,150 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Model_EM_Modal
|
3 |
-
{
|
4 |
-
protected $_data = array(
|
5 |
-
'id' => '',
|
6 |
-
'name' => 'change_me',
|
7 |
-
'sitewide' => false,
|
8 |
-
'title' => '',
|
9 |
-
'content' => '',
|
10 |
-
|
11 |
-
'theme' => 1,
|
12 |
-
|
13 |
-
'size' => 'normal',
|
14 |
-
'userHeight' => 0,
|
15 |
-
'userHeightUnit' => 0,
|
16 |
-
'userWidth' => 0,
|
17 |
-
'userWidthUnit' => 0,
|
18 |
-
|
19 |
-
'animation' => 'fade',
|
20 |
-
'direction' => 'bottom',
|
21 |
-
'duration' => 350,
|
22 |
-
'overlayClose' => false,
|
23 |
-
'overlayEscClose' => false
|
24 |
-
);
|
25 |
-
|
26 |
-
public function get($key)
|
27 |
-
{
|
28 |
-
if(array_key_exists($key, $this->_data))
|
29 |
-
{
|
30 |
-
return $this->_data[$key];
|
31 |
-
}
|
32 |
-
else
|
33 |
-
{
|
34 |
-
return NULL;
|
35 |
-
}
|
36 |
-
}
|
37 |
-
public function set($key, $value)
|
38 |
-
{
|
39 |
-
if(array_key_exists($key, $this->_data))
|
40 |
-
{
|
41 |
-
$this->_data[$key] = stripslashes_deep($value);
|
42 |
-
}
|
43 |
-
return $this;
|
44 |
-
}
|
45 |
-
|
46 |
-
public function __construct($id)
|
47 |
-
{
|
48 |
-
$modal = get_option('EasyModal_Modal-'.$id);
|
49 |
-
if(is_array($modal))
|
50 |
-
{
|
51 |
-
$this->set_fields($modal);
|
52 |
-
}
|
53 |
-
return $this;
|
54 |
-
}
|
55 |
-
public function validate()
|
56 |
-
{
|
57 |
-
foreach($this->_data as $key => $val)
|
58 |
-
{
|
59 |
-
switch($key)
|
60 |
-
{
|
61 |
-
case 'name':
|
62 |
-
case 'title':
|
63 |
-
$this->_data[$key] = sanitize_text_field($val);
|
64 |
-
break;
|
65 |
-
case 'content':
|
66 |
-
$this->_data[$key] = balanceTags(wp_kses_post($val));
|
67 |
-
break;
|
68 |
-
case 'sitewide':
|
69 |
-
case 'overlayClose':
|
70 |
-
case 'overlayEscClose':
|
71 |
-
$this->_data[$key] = ($val === true || $val === 'true') ? true : false;
|
72 |
-
break;
|
73 |
-
case 'duration':
|
74 |
-
case 'userHeight':
|
75 |
-
case 'userWidth':
|
76 |
-
if(is_numeric($val))
|
77 |
-
{
|
78 |
-
$this->_data[$key] = intval($val);
|
79 |
-
}
|
80 |
-
break;
|
81 |
-
case 'size':
|
82 |
-
if(in_array($val,array('','tiny','small','medium','large','xlarge','custom')))
|
83 |
-
{
|
84 |
-
$this->_data[$key] = $val;
|
85 |
-
}
|
86 |
-
break;
|
87 |
-
case 'animation':
|
88 |
-
if(in_array($val,array('fade','fadeAndSlide','grow','growAndSlide')))
|
89 |
-
{
|
90 |
-
$this->_data[$key] = $val;
|
91 |
-
}
|
92 |
-
break;
|
93 |
-
case 'direction':
|
94 |
-
if(in_array($val,array('top','bottom','left','right','topleft','topright','bottomleft','bottomright','mouse')))
|
95 |
-
{
|
96 |
-
$this->_data[$key] = $val;
|
97 |
-
}
|
98 |
-
break;
|
99 |
-
case 'userHeightUnit':
|
100 |
-
case 'userWidthUnit':
|
101 |
-
if(in_array($val,array('px','%','em','rem')))
|
102 |
-
{
|
103 |
-
$this->_data[$key] = $val;
|
104 |
-
}
|
105 |
-
break;
|
106 |
-
}
|
107 |
-
}
|
108 |
-
}
|
109 |
-
|
110 |
-
public function set_fields(array $fields)
|
111 |
-
{
|
112 |
-
if(!is_array($fields))
|
113 |
-
{
|
114 |
-
return false;
|
115 |
-
}
|
116 |
-
$fields = stripslashes_deep($fields);
|
117 |
-
foreach($fields as $key => $val)
|
118 |
-
{
|
119 |
-
if(array_key_exists($key, $this->_data))
|
120 |
-
{
|
121 |
-
$this->_data[$key] = $val;
|
122 |
-
}
|
123 |
-
}
|
124 |
-
return $this;
|
125 |
-
}
|
126 |
-
public function save()
|
127 |
-
{
|
128 |
-
if($this->validate() === true)
|
129 |
-
{
|
130 |
-
update_option('EasyModal_Modal-'.$this->_data['id'], $settings);
|
131 |
-
}
|
132 |
-
return $this;
|
133 |
-
}
|
134 |
-
/**
|
135 |
-
* Check if transaction id is already registered
|
136 |
-
*
|
137 |
-
* @param $transaction_id
|
138 |
-
* @param $payment_status
|
139 |
-
* @return bool
|
140 |
-
*/
|
141 |
-
public function is_unique($transaction_id, $payment_status)
|
142 |
-
{
|
143 |
-
return ! (bool) DB::select(array(DB::expr('COUNT("*")'), 'total_count'))
|
144 |
-
->from($this->_table_name)
|
145 |
-
->where('transaction_id', '=', $transaction_id)
|
146 |
-
->and_where('payment_status', '=', $payment_status)
|
147 |
-
->execute($this->_db)
|
148 |
-
->get('total_count');
|
149 |
-
}
|
150 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/views/admin_footer.php
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<div id="eModal-Admin-1" class="modal tiny">
|
2 |
-
<h2>Let others know</h2>
|
3 |
-
<p>If you found Easy Modal useful, let others know by writing a review or about your experiences and uses for the plugin.</p>
|
4 |
-
<h3>Affiliates - Earn Extra Cash.<img class="right" src="<?php echo EASYMODAL_URL?>/inc/images/admin/affiliate.png" alt="Affiliate"/></h3>
|
5 |
-
<p>Interested in making money with Easy Modal? Earn a 40% commission on every sale you generate. <a href="http://easy-modal.com/affiliates?utm_source=em&utm_medium=dashboard+link&utm_campaign=affiliate+modal" target="_blank">Find out more</a></p>
|
6 |
-
<p>It's really that easy. We will pay you a 40% commission on every sale you generate using your affiliate referral URL! It's as easy as signing up and promoting the program on your website, blog, Facebook, Twitter or other social networks.</p>
|
7 |
-
<!--
|
8 |
-
<h3>Bonus - Free Pro License <small> ($15 Value)</small><img class="right" src="<?php echo EASYMODAL_URL?>/inc/images/admin/bonus.png" alt="Free Bonus"/></h3>
|
9 |
-
<p>If you write at least 400 words and provide a dofollow link to Easy Modal on our site or wp.org you can get a free single license for the pro version for the life of the link.</p>
|
10 |
-
<p>To qualify for your free copy send us a link to the page about Easy Modal containing the required link. We may ask you to change the context that the link is placed in to vary the keywords it is placed on.</p>
|
11 |
-
-->
|
12 |
-
<a class="close-modal">×</a>
|
13 |
-
</div>
|
14 |
-
<div id="fb-root"></div>
|
15 |
-
<script>
|
16 |
-
jQuery(document).ready(function(){
|
17 |
-
(function(d, s, id) {
|
18 |
-
var js, fjs = d.getElementsByTagName(s)[0];
|
19 |
-
if (d.getElementById(id)) return;
|
20 |
-
js = d.createElement(s); js.id = id;
|
21 |
-
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=191746824208314";
|
22 |
-
fjs.parentNode.insertBefore(js, fjs);
|
23 |
-
}(document, 'script', 'facebook-jssdk'));
|
24 |
-
|
25 |
-
(function() {
|
26 |
-
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
|
27 |
-
po.src = 'https://apis.google.com/js/plusone.js';
|
28 |
-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
|
29 |
-
})();
|
30 |
-
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
|
31 |
-
});
|
32 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/views/help.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<div class="wrap">
|
2 |
-
<?php if(!empty($this->messages)){?>
|
3 |
-
<?php foreach($this->messages as $message){?>
|
4 |
-
<div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
|
5 |
-
<?php }?>
|
6 |
-
<?php }?>
|
7 |
-
<?php screen_icon()?>
|
8 |
-
<h2><?php _e('Help','easy-modal')?></h2>
|
9 |
-
<div id="poststuff">
|
10 |
-
<div id="post-body" class="metabox-holder columns-2">
|
11 |
-
<div id="post-body-content">
|
12 |
-
<div class="meta-box-sortables ui-sortable">
|
13 |
-
<div class="meta-box-sortables ui-sortable">
|
14 |
-
<h2 id="em-tabs" class="nav-tab-wrapper">
|
15 |
-
<a href="#top#usage" id="usage-tab" class="nav-tab"><?php _e('Usage','easy-modal')?></a>
|
16 |
-
</h2>
|
17 |
-
<div class="tabwrapper">
|
18 |
-
<div id="usage" class="em-tab">
|
19 |
-
<h4><?php _e('Copy the class to the link/button you want to open this modal.','easy-modal')?><span class="desc">Will start with eModal- and end with a # of the modal you want to open.</span></h4>
|
20 |
-
<h4>Link Example</h4>
|
21 |
-
<a href="#" onclick="return false;" class="eModal-1">Open Modal</a>
|
22 |
-
<pre><a href="#" class="eModal-1">Open Modal</a></pre>
|
23 |
-
<h4>Button Example</h4>
|
24 |
-
<button onclick="return false;" class="eModal-1">Open Modal</button>
|
25 |
-
<pre><button class="eModal-1">Open Modal</button></pre>
|
26 |
-
<h4>Image Example</h4>
|
27 |
-
<img style="cursor:pointer;" src="<?php echo EASYMODAL_URL?>/inc/images/admin/easy-modal-icon.png" onclick="return false;" class="eModal-1" />
|
28 |
-
<pre><img src="easy-modal-icon.png" class="eModal-1" /></pre>
|
29 |
-
</div>
|
30 |
-
</div>
|
31 |
-
</div>
|
32 |
-
</div>
|
33 |
-
</div>
|
34 |
-
<div id="postbox-container-1" class="postbox-container">
|
35 |
-
<?php require(EASYMODAL_DIR.'/inc/views/sidebar.php')?>
|
36 |
-
</div>
|
37 |
-
</div>
|
38 |
-
<br class="clear"/>
|
39 |
-
</div>
|
40 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/views/metaboxes.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<p>
|
2 |
-
<input type="hidden" name="safe_csrf_nonce_easy_modal" id="safe_csrf_nonce_easy_modal" value="<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal"); ?>">
|
3 |
-
<label for="easy_modal_post_modals"><?php _e( "Select which modals to load", 'easy-modal' ); ?></label>
|
4 |
-
<select class="widefat" multiple="multiple" name="easy_modal_post_modals[]" id="easy_modal_post_modals">
|
5 |
-
<?php foreach($modals as $key => $name)
|
6 |
-
{
|
7 |
-
$modal = $this->getModalSettings($key);
|
8 |
-
if(!$modal['sitewide']) {?>
|
9 |
-
<option value="<?php esc_attr_e($key)?>"<?php echo (is_array($current_modals) && in_array($key,$current_modals)) ? esc_attr(' selected="selected"') : ''?>><?php esc_html_e($name)?></option>
|
10 |
-
<?php }
|
11 |
-
}?>
|
12 |
-
</select>
|
13 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/views/modal.php
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
<div id="eModal-<?php esc_attr_e($modal['id'])?>" class="<?php esc_attr_e($modal['size'] != 'custom' ? $modal['size'].' ' : '')?>modal">
|
2 |
-
<?php if($modal['title'] != '') {?>
|
3 |
-
<div class="title"><?php esc_html_e($modal['title'])?></div>
|
4 |
-
<?php }?>
|
5 |
-
<?php echo apply_filters('em_modal_content', $modal['content']);?>
|
6 |
-
<a class="close-modal">×</a>
|
7 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/views/modal_delete.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<div class="wrap">
|
2 |
-
<?php if(!empty($this->messages)){?>
|
3 |
-
<?php foreach($this->messages as $message){?>
|
4 |
-
<div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
|
5 |
-
<?php }?>
|
6 |
-
<?php }?>
|
7 |
-
<?php screen_icon()?>
|
8 |
-
<h2><?php _e('Delete Modal','easy-modal')?></h2>
|
9 |
-
<div id="poststuff">
|
10 |
-
<div id="post-body" class="metabox-holder columns-2">
|
11 |
-
<div id="post-body-content">
|
12 |
-
<<< - <a href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo intval($modal_id)?>">Back to Modal</a>
|
13 |
-
<p>Are you sure you want to delete this modal?</p>
|
14 |
-
<a style="color:#fff;border:1px solid #333; background-color:#900; text-shadow: none;"class="add-new-h2" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo intval($modal_id)?>&action=delete&confirm=yes&safe_csrf_nonce_easy_modal=<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal")?>">Confirm</a>
|
15 |
-
</div>
|
16 |
-
<div id="postbox-container-1" class="postbox-container">
|
17 |
-
<?php require(EASYMODAL_DIR.'/inc/views/sidebar.php')?>
|
18 |
-
</div>
|
19 |
-
</div>
|
20 |
-
<br class="clear"/>
|
21 |
-
</div>
|
22 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/views/modal_list.php
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
<div class="wrap">
|
2 |
-
<?php if(!empty($this->messages)){?>
|
3 |
-
<?php foreach($this->messages as $message){?>
|
4 |
-
<div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
|
5 |
-
<?php }?>
|
6 |
-
<?php }?>
|
7 |
-
<?php screen_icon()?>
|
8 |
-
<h2>Easy Modal Modals<a class="add-new-h2" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=new">Add New</a></h2>
|
9 |
-
<div id="poststuff">
|
10 |
-
<div id="post-body" class="metabox-holder columns-2">
|
11 |
-
<div id="post-body-content">
|
12 |
-
<?php if( $modals && count($modals) > 0 ){?>
|
13 |
-
<table class="wp-list-table widefat fixed posts" style="width:100%">
|
14 |
-
<thead>
|
15 |
-
<th width="60">ID</th>
|
16 |
-
<th width="120">Class</th>
|
17 |
-
<th>Name</th>
|
18 |
-
<th>Display Mode</th>
|
19 |
-
<th width="100" style="text-align:center">Actions</th>
|
20 |
-
</thead>
|
21 |
-
<tbody>
|
22 |
-
<?php foreach($modals as $id => $name){ $modal = $this->getModalSettings($id);?>
|
23 |
-
<tr>
|
24 |
-
<td><a href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php esc_attr_e($id)?>"><?php esc_attr_e($id)?></a></td>
|
25 |
-
<td><a href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php esc_attr_e($id)?>">eModal-<?php esc_html_e($id)?></a></td>
|
26 |
-
<td><a href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php esc_attr_e($id)?>"><?php echo ucfirst(esc_html($name))?></a></td>
|
27 |
-
<td><?php if($modal['sitewide']) echo 'Sitewide'; else 'Page / Post';?></td>
|
28 |
-
<td align="center">
|
29 |
-
<?php if(!in_array($id, array('Login','Register','Forgot'))){?>
|
30 |
-
<a style="margin-right:10px;" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php esc_attr_e($id)?>&action=clone&safe_csrf_nonce_easy_modal=<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal")?>">Clone</a>
|
31 |
-
<a style="color:red" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php esc_attr_e($id)?>&action=delete&safe_csrf_nonce_easy_modal=<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal")?>">Delete</a>
|
32 |
-
<?php }?>
|
33 |
-
</td>
|
34 |
-
</tr>
|
35 |
-
<?php }?>
|
36 |
-
</tbody>
|
37 |
-
</table>
|
38 |
-
<?php }else{?>
|
39 |
-
<p>To get started click the "add new" button above</p>
|
40 |
-
<?php }?>
|
41 |
-
</div>
|
42 |
-
<div id="postbox-container-1" class="postbox-container">
|
43 |
-
<?php require(EASYMODAL_DIR.'/inc/views/sidebar.php')?>
|
44 |
-
</div>
|
45 |
-
</div>
|
46 |
-
<br class="clear"/>
|
47 |
-
</div>
|
48 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/views/modal_settings.php
DELETED
@@ -1,254 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$sizes = array(
|
3 |
-
'' => 'Normal',
|
4 |
-
'tiny' => 'Tiny',
|
5 |
-
'small' => 'Small',
|
6 |
-
'medium' => 'Medium',
|
7 |
-
'large' => 'Large',
|
8 |
-
'xlarge' => 'X Large',
|
9 |
-
'custom' => 'Custom'
|
10 |
-
);
|
11 |
-
$animations = array(
|
12 |
-
'fade' => 'Fade',
|
13 |
-
'fadeAndSlide' => 'Fade and Slide',
|
14 |
-
'grow' => 'Grow',
|
15 |
-
'growAndSlide' => 'Grow and Slide',
|
16 |
-
);
|
17 |
-
$directions = array(
|
18 |
-
'top' => 'Top',
|
19 |
-
'bottom' => 'Bottom',
|
20 |
-
'left' => 'Left',
|
21 |
-
'right' => 'Right',
|
22 |
-
'topleft' => 'Top Left',
|
23 |
-
'topright' => 'Top Right',
|
24 |
-
'bottomleft' => 'Bottom Left',
|
25 |
-
'bottomright' => 'Bottom Right',
|
26 |
-
'mouse' => 'Mouse',
|
27 |
-
);
|
28 |
-
$cssUnits = array(
|
29 |
-
'px' => 'PX',
|
30 |
-
'%' => '%',
|
31 |
-
'em' => 'EM',
|
32 |
-
'rem' => 'REM'
|
33 |
-
);
|
34 |
-
$animationshowhide = !in_array($settings['animation'], array('fadeAndSlide','growAndSlide')) ? ' style="display:none"' : '';
|
35 |
-
$sizeshowhide = $settings['size'] != 'custom' ? ' style="display:none"' : '';
|
36 |
-
?><div class="wrap">
|
37 |
-
<?php if(!empty($this->messages)){?>
|
38 |
-
<?php foreach($this->messages as $message){?>
|
39 |
-
<div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
|
40 |
-
<?php }?>
|
41 |
-
<?php }?>
|
42 |
-
<?php screen_icon()?>
|
43 |
-
<h2>
|
44 |
-
<?php echo ucfirst(esc_html($settings['name'])).' '; _e('Modal','easy-modal')?>
|
45 |
-
<?php if(is_numeric($modal_id)){?>
|
46 |
-
<a style="color:#fff;border:1px solid #333; background-color:#21759B; text-shadow: none;"class="add-new-h2" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo intval($modal_id)?>&action=clone&safe_csrf_nonce_easy_modal=<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal")?>">Clone</a>
|
47 |
-
<a style="color:#fff;border:1px solid #333; background-color:#900; text-shadow: none;"class="add-new-h2" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo intval($modal_id)?>&action=delete&safe_csrf_nonce_easy_modal=<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal")?>">Delete</a>
|
48 |
-
<?php }?>
|
49 |
-
</h2>
|
50 |
-
<div><<< - <a href="admin.php?page=<?php echo EASYMODAL_SLUG?>">Back to Modal Lists</a></div>
|
51 |
-
<div id="poststuff">
|
52 |
-
<div id="post-body" class="metabox-holder columns-2">
|
53 |
-
<div id="post-body-content">
|
54 |
-
<div class="meta-box-sortables ui-sortable">
|
55 |
-
<h2 id="em-tabs" class="nav-tab-wrapper">
|
56 |
-
<a href="#top#general" id="general-tab" class="nav-tab"><?php _e('General','easy-modal')?></a>
|
57 |
-
<a href="#top#options" id="options-tab" class="nav-tab"><?php _e('Options','easy-modal')?></a>
|
58 |
-
<a href="#top#examples" id="examples-tab" class="nav-tab"><?php _e('Examples','easy-modal')?></a>
|
59 |
-
</h2>
|
60 |
-
<div class="tabwrapper">
|
61 |
-
<form method="post" action="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo is_numeric($modal_id) ? intval($modal_id) : 'new' ?>">
|
62 |
-
<input type="hidden" name="em_settings" value="modal"/>
|
63 |
-
<div id="general" class="em-tab">
|
64 |
-
<table class="form-table">
|
65 |
-
<tbody>
|
66 |
-
<tr class="form-field form-required">
|
67 |
-
<th scope="row">
|
68 |
-
<label for="name"><?php _e('Name', 'easy-modal');?> <span class="description">(required)</span></label>
|
69 |
-
</th>
|
70 |
-
<td>
|
71 |
-
<input type="text" name="name" id="name" value="<?php esc_attr_e($settings['name'])?>"/>
|
72 |
-
<p class="description"><?php _e('Enter a name for your modal.','easy-modal')?></p>
|
73 |
-
</td>
|
74 |
-
</tr>
|
75 |
-
|
76 |
-
<tr class="form-field form-required">
|
77 |
-
<th scope="row">
|
78 |
-
<label for="sitewide"><?php _e('Sitewide', 'easy-modal');?></label>
|
79 |
-
</th>
|
80 |
-
<td>
|
81 |
-
<p class="field switch" style="clear:both; overflow:auto; display:block;">
|
82 |
-
<label class="cb-enable"><span>Yes</span></label>
|
83 |
-
<label class="cb-disable selected"><span>No</span></label>
|
84 |
-
<input type="checkbox" class="checkbox" id="sitewide" name="sitewide" value="true" <?php echo $settings['sitewide'] == true ? 'checked="checked"' : '' ?> />
|
85 |
-
</p>
|
86 |
-
<p class="description"><?php _e('Should this modal be loaded on every page of the site?','easy-modal')?></p>
|
87 |
-
</td>
|
88 |
-
</tr>
|
89 |
-
|
90 |
-
<tr class="form-field form-required">
|
91 |
-
<th scope="row">
|
92 |
-
<label for="title"><?php _e('Title', 'easy-modal');?></label>
|
93 |
-
</th>
|
94 |
-
<td>
|
95 |
-
<input type="text" id="title" name="title" value="<?php esc_attr_e($settings['title']);?>" />
|
96 |
-
<p class="description"><?php _e('The title that appears in the modal window.','easy-modal')?></p>
|
97 |
-
</td>
|
98 |
-
</tr>
|
99 |
-
|
100 |
-
<tr class="form-field form-required">
|
101 |
-
<th scope="row">
|
102 |
-
<label for="content"><?php _e('Content', 'easy-modal');?></label>
|
103 |
-
</th>
|
104 |
-
<td>
|
105 |
-
<?php wp_editor($settings['content'], "content");?>
|
106 |
-
<p class="description"><?php _e('Modal content. Can contain shortcodes.','easy-modal')?></p>
|
107 |
-
</td>
|
108 |
-
</tr>
|
109 |
-
</tbody>
|
110 |
-
</table>
|
111 |
-
</div>
|
112 |
-
<div id="options" class="em-tab">
|
113 |
-
<table class="form-table">
|
114 |
-
<tbody>
|
115 |
-
<tr class="form-field form-required">
|
116 |
-
<th scope="row">
|
117 |
-
<label for="size"><?php _e('Size', 'easy-modal');?></label>
|
118 |
-
</th>
|
119 |
-
<td>
|
120 |
-
<select name="size" id="size">
|
121 |
-
<?php foreach($sizes as $value => $name){?>
|
122 |
-
<option value="<?php echo $value?>" <?php echo $value == $settings['size'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
|
123 |
-
<?php }?>
|
124 |
-
</select>
|
125 |
-
<p class="description"><?php _e('Select the size of the modal.','easy-modal')?></p>
|
126 |
-
</td>
|
127 |
-
</tr>
|
128 |
-
|
129 |
-
<tr class="form-field form-required custom-size-only"<?php echo $sizeshowhide?>>
|
130 |
-
<th scope="row">
|
131 |
-
<label for="userHeight"><?php _e('Height', 'easy-modal');?></label>
|
132 |
-
</th>
|
133 |
-
<td>
|
134 |
-
<input type="text" id="userHeight" name="userHeight" size="5" value="<?php esc_attr_e($settings['userHeight'])?>" />
|
135 |
-
<select name="userHeightUnit" id="userHeightUnit">
|
136 |
-
<?php foreach($cssUnits as $value => $name){?>
|
137 |
-
<option value="<?php echo $value?>" <?php echo $value == $settings['userHeightUnit'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
|
138 |
-
<?php }?>
|
139 |
-
</select>
|
140 |
-
<p class="description"><?php _e('Set a custom height for the modal.','easy-modal')?></p>
|
141 |
-
</td>
|
142 |
-
</tr>
|
143 |
-
|
144 |
-
<tr class="form-field form-required custom-size-only"<?php echo $sizeshowhide?>>
|
145 |
-
<th scope="row">
|
146 |
-
<label for="userWidth"><?php _e('Width', 'easy-modal');?></label>
|
147 |
-
</th>
|
148 |
-
<td>
|
149 |
-
<input type="text" id="userWidth" name="userWidth" size="5" value="<?php echo esc_attr_e($settings['userWidth'])?>" />
|
150 |
-
<select name="userWidthUnit" id="userWidthUnit">
|
151 |
-
<?php foreach($cssUnits as $value => $name){?>
|
152 |
-
<option value="<?php echo $value?>" <?php echo $value == $settings['userWidthUnit'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
|
153 |
-
<?php }?>
|
154 |
-
</select>
|
155 |
-
<p class="description"><?php _e('Set a custom height for the modal.','easy-modal')?></p>
|
156 |
-
</td>
|
157 |
-
</tr>
|
158 |
-
|
159 |
-
<tr class="form-field form-required">
|
160 |
-
<th scope="row">
|
161 |
-
<label for="animation"><?php _e('Animation', 'easy-modal');?></label>
|
162 |
-
</th>
|
163 |
-
<td>
|
164 |
-
<select name="animation" id="animation">
|
165 |
-
<?php foreach($animations as $value => $name){?>
|
166 |
-
<option value="<?php echo $value?>" <?php echo $value == $settings['animation'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
|
167 |
-
<?php }?>
|
168 |
-
</select>
|
169 |
-
<p class="description"><?php _e('Select an animation for the modal.','easy-modal')?></p>
|
170 |
-
</td>
|
171 |
-
</tr>
|
172 |
-
|
173 |
-
<tr class="form-field form-required">
|
174 |
-
<th scope="row">
|
175 |
-
<label for="duration"><?php _e('Speed', 'easy-modal');?></label>
|
176 |
-
</th>
|
177 |
-
<td>
|
178 |
-
<input type="text" id="duration" name="duration" size="3" value="<?php esc_attr_e(intval($settings['duration']))?>" />MS
|
179 |
-
<p class="description"><?php _e('Set the animation speed for the modal.','easy-modal')?></p>
|
180 |
-
</td>
|
181 |
-
</tr>
|
182 |
-
|
183 |
-
<tr class="form-field form-required animation-only"<?php echo $animationshowhide?>>
|
184 |
-
<th scope="row">
|
185 |
-
<label for="direction"><?php _e('Direction', 'easy-modal');?></label>
|
186 |
-
</th>
|
187 |
-
<td>
|
188 |
-
<select name="direction" id="direction">
|
189 |
-
<?php foreach($directions as $value => $name){?>
|
190 |
-
<option value="<?php echo $value?>" <?php echo $value == $settings['direction'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
|
191 |
-
<?php }?>
|
192 |
-
</select>
|
193 |
-
<p class="description"><?php _e('Select a direction for the animation.','easy-modal')?></p>
|
194 |
-
</td>
|
195 |
-
</tr>
|
196 |
-
|
197 |
-
<tr class="form-field form-required">
|
198 |
-
<th scope="row">
|
199 |
-
<label for="overlayClose"><?php _e('Click Overlay to Close?', 'easy-modal');?></label>
|
200 |
-
</th>
|
201 |
-
<td>
|
202 |
-
<p class="field switch" style="clear:both; overflow:auto; display:block;">
|
203 |
-
<label class="cb-enable"><span>On</span></label>
|
204 |
-
<label class="cb-disable selected"><span>Off</span></label>
|
205 |
-
<input type="checkbox" class="checkbox" id="overlayClose" name="overlayClose" value="true" <?php echo $settings['overlayClose'] == true ? 'checked="checked"' : '' ?> />
|
206 |
-
</p>
|
207 |
-
<p class="description"><?php _e('Choose whether the modal will close when you click the overlay.','easy-modal')?></p>
|
208 |
-
</td>
|
209 |
-
</tr>
|
210 |
-
|
211 |
-
<tr class="form-field form-required">
|
212 |
-
<th scope="row">
|
213 |
-
<label for="overlayEscClose"><?php _e('ESC Key to Close?', 'easy-modal');?></label>
|
214 |
-
</th>
|
215 |
-
<td>
|
216 |
-
<p class="field switch" style="clear:both; overflow:auto; display:block;">
|
217 |
-
<label class="cb-enable"><span>On</span></label>
|
218 |
-
<label class="cb-disable selected"><span>Off</span></label>
|
219 |
-
<input type="checkbox" class="checkbox" id="overlayEscClose" name="overlayEscClose" value="true" <?php echo $settings['overlayEscClose'] == true ? 'checked="checked"' : '' ?> />
|
220 |
-
</p>
|
221 |
-
<p class="description"><?php _e('Choose whether the modal will close press Esc.','easy-modal')?></p>
|
222 |
-
</td>
|
223 |
-
</tr>
|
224 |
-
|
225 |
-
</tbody>
|
226 |
-
</table>
|
227 |
-
</div>
|
228 |
-
<div id="examples" class="em-tab">
|
229 |
-
<h4><?php _e('Copy this class to the link/button you want to open this modal.','easy-modal')?><span class="desc">eModal-<?php echo intval($settings['id'])?></span></h4>
|
230 |
-
<h4>Link Example</h4>
|
231 |
-
<a href="#" onclick="return false;" class="eModal-<?php echo intval($settings['id'])?>">Open Modal</a>
|
232 |
-
<pre><a href="#" class="eModal-<?php echo intval($settings['id'])?>">Open Modal</a></pre>
|
233 |
-
<h4>Button Example</h4>
|
234 |
-
<button onclick="return false;" class="eModal-<?php echo intval($settings['id'])?>">Open Modal</button>
|
235 |
-
<pre><button class="eModal-<?php echo intval($settings['id'])?>">Open Modal</button></pre>
|
236 |
-
<h4>Image Example</h4>
|
237 |
-
<img style="cursor:pointer;" src="<?php echo EASYMODAL_URL?>/inc/images/admin/easy-modal-icon.png" onclick="return false;" class="eModal-<?php echo intval($settings['id'])?>" />
|
238 |
-
<pre><img src="easy-modal-icon.png" class="eModal-<?php echo intval($settings['id'])?>" /></pre>
|
239 |
-
</div>
|
240 |
-
<div class="submit">
|
241 |
-
<input type="hidden" name="safe_csrf_nonce_easy_modal" id="safe_csrf_nonce_easy_modal" value="<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal"); ?>">
|
242 |
-
<input type="submit" value="<?php _e('Save Settings','easy-modal')?>" name="submit" class="button-primary">
|
243 |
-
</div>
|
244 |
-
</form>
|
245 |
-
</div>
|
246 |
-
</div>
|
247 |
-
</div>
|
248 |
-
<div id="postbox-container-1" class="postbox-container">
|
249 |
-
<?php require(EASYMODAL_DIR.'/inc/views/sidebar.php')?>
|
250 |
-
</div>
|
251 |
-
</div>
|
252 |
-
<br class="clear"/>
|
253 |
-
</div>
|
254 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/views/settings.php
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$settings = $this->getSettings();
|
3 |
-
$messages = $this->messages;
|
4 |
-
$license_status = get_option('EasyModal_License_Status');
|
5 |
-
$valid = is_array($license_status) && !empty($license_status['status']) && in_array($license_status['status'], array(2000,2001,3003)) ? true : false;
|
6 |
-
?>
|
7 |
-
<div class="wrap">
|
8 |
-
<?php if(!empty($this->messages)){?>
|
9 |
-
<?php foreach($this->messages as $message){?>
|
10 |
-
<div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
|
11 |
-
<?php }?>
|
12 |
-
<?php }?>
|
13 |
-
<?php screen_icon()?>
|
14 |
-
<h2>
|
15 |
-
<?php _e('Settings','easy-modal')?>
|
16 |
-
</h2>
|
17 |
-
<?php if(!$valid){?>
|
18 |
-
<div class="error">
|
19 |
-
<p>If you purchased the Pro version and havent already recieved a key please email us at <a href="mailto:danieliser@wizardinternetsolutions.com">danieliser@wizardinternetsolutions.com</a></p>
|
20 |
-
</div>
|
21 |
-
<?php }?>
|
22 |
-
<div id="poststuff">
|
23 |
-
<div id="post-body" class="metabox-holder columns-2">
|
24 |
-
<div id="post-body-content">
|
25 |
-
<div class="meta-box-sortables ui-sortable">
|
26 |
-
<h2 id="em-tabs" class="nav-tab-wrapper">
|
27 |
-
<a href="#top#general" id="general-tab" class="nav-tab"><?php _e('General','easy-modal')?></a>
|
28 |
-
</h2>
|
29 |
-
<div class="tabwrapper">
|
30 |
-
<form method="post" action="admin.php?page=<?php echo EASYMODAL_SLUG?>-settings">
|
31 |
-
<input type="hidden" name="em_settings" value="settings"/>
|
32 |
-
<div id="general" class="em-tab">
|
33 |
-
<table class="form-table">
|
34 |
-
<tbody>
|
35 |
-
<tr class="form-field form-required">
|
36 |
-
<th scope="row">
|
37 |
-
<label for="name"><?php _e('License Key', 'easy-modal');?></label>
|
38 |
-
</th>
|
39 |
-
<td>
|
40 |
-
<input <?php echo $valid ? 'style="background-color:#0f0;border-color:#090;"' : '' ?> type="password" id="license" name="license" value="<?php esc_attr_e(get_option('EasyModal_License'))?>"/>
|
41 |
-
<p class="description"><?php _e( is_array($license_status) && !empty($license_status['message']) ? $license_status['message'] : 'Enter a key to unlock Easy Modal Pro.','easy-modal')?></p>
|
42 |
-
</td>
|
43 |
-
</tr>
|
44 |
-
</tbody>
|
45 |
-
</table>
|
46 |
-
</div>
|
47 |
-
<div class="submit">
|
48 |
-
<input type="hidden" name="safe_csrf_nonce_easy_modal" id="safe_csrf_nonce_easy_modal" value="<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal"); ?>">
|
49 |
-
<input type="submit" value="<?php _e('Save Settings','easy-modal')?>" name="submit" class="button-primary">
|
50 |
-
</div>
|
51 |
-
</form>
|
52 |
-
</div>
|
53 |
-
</div>
|
54 |
-
</div>
|
55 |
-
<div id="postbox-container-1" class="postbox-container">
|
56 |
-
<?php require(EASYMODAL_DIR.'/inc/views/sidebar.php')?>
|
57 |
-
</div>
|
58 |
-
</div>
|
59 |
-
<br class="clear"/>
|
60 |
-
</div>
|
61 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/views/sidebar.php
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
<div class="postbox " id="share">
|
2 |
-
<div title="Click to toggle" class="handlediv"><br></div><h3 style="text-align:center" class="hndle"><span>Love It? Share It!</span></h3>
|
3 |
-
<div class="inside">
|
4 |
-
<ul class="share-buttons">
|
5 |
-
<li><div class="fb-like" data-href="http://easy-modal.com" data-width="100" data-layout="box_count" data-action="like" data-show-faces="false" data-send="true"></div></li>
|
6 |
-
<li><a href="https://twitter.com/intent/tweet" class="twitter-share-button" data-count="vertical" data-url="http://easy-modal.com" data-via="wizard_is" data-related="wizard_is">Tweet</a></li>
|
7 |
-
<li><div class="g-plusone" data-href="http://easy-modal.com" data-size="tall"></div></li>
|
8 |
-
</ul>
|
9 |
-
<br class="clear" />
|
10 |
-
<h4>Show Some Love</h4>
|
11 |
-
<ul>
|
12 |
-
<li><a href="http://wordpress.org/support/view/plugin-reviews/easy-modal#postform">Rate It on WordPress.org</a></li>
|
13 |
-
<li>Got a blog? <a href="#" class="write-it">Write about it.</a></li>
|
14 |
-
<li>Affiliates? <a href="#" class="write-it">Get up to 40%.</a></li>
|
15 |
-
</ul>
|
16 |
-
</div>
|
17 |
-
</div>
|
18 |
-
<div class="postbox " id="upgrade">
|
19 |
-
<div title="Click to toggle" class="handlediv"><br></div><h3 style="text-align:center" class="hndle"><span>Upgrade - Go Pro Now</span></h3>
|
20 |
-
<div class="inside">
|
21 |
-
<h4>Increase Conversions & Newsletter Sign Ups</h4>
|
22 |
-
<p>The pro version aims to take your modals to the next level. With a great set of additional features coupled with our first class support make this a great value.</p>
|
23 |
-
<h4>Features</h4>
|
24 |
-
<ul class="bullets">
|
25 |
-
<li>Unlimited Themes</li>
|
26 |
-
<li>Auto show modals on page load & exit.</li>
|
27 |
-
<li>Import & Export Modals, Themes & Settings</li>
|
28 |
-
<li>Premium Support</li>
|
29 |
-
<li>and More...</li>
|
30 |
-
</ul>
|
31 |
-
<h4>Try it out for yourself!</h4>
|
32 |
-
<p><a href="http://easy-modal.com/demo" target="_blank">Demo Site</a></p>
|
33 |
-
<h4>Upgrading is Easy</h4>
|
34 |
-
<p>Simply go <a href="https://easy-modal.com/pricing-purchase?utm_source=em-lite&utm_medium=dashboard+link&utm_campaign=get+premium">here</a> and click buy now. Once you recieve your key simply enter it on the settings page and then update your plugin.</p>
|
35 |
-
</div>
|
36 |
-
</div>
|
37 |
-
<div class="postbox " id="support">
|
38 |
-
<div title="Click to toggle" class="handlediv"><br></div><h3 style="text-align:center" class="hndle"><span>Get Support</span></h3>
|
39 |
-
<div class="inside">
|
40 |
-
<ul>
|
41 |
-
<li><a href="http://wordpress.org/support/plugin/easy-modal">Easy Modal Support Forum</a></li>
|
42 |
-
<li><a href="https://easy-modal.com/pricing-purchase?utm_source=em-lite&utm_medium=dashboard+link&utm_campaign=pro+support">Purchase Pro</a> for premium support</li>
|
43 |
-
</ul>
|
44 |
-
<a href="https://twitter.com/EasyModal" class="twitter-follow-button" data-show-count="true" data-show-screen-name="true" data-size="medium" data-lang="en">Follow Us</a><br />
|
45 |
-
<div class="fb-like" data-href="https://facebook.com/EasyModal" data-send="false" data-width="100px" data-show-faces="false"></div>
|
46 |
-
</div>
|
47 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/views/theme_settings.php
DELETED
@@ -1,375 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$borderTypes = array(
|
3 |
-
'none' => 'None',
|
4 |
-
'solid' => 'Solid',
|
5 |
-
'dotted' => 'Dotted',
|
6 |
-
'dashed' => 'Dashed',
|
7 |
-
'double' => 'Double',
|
8 |
-
'groove' => 'Groove',
|
9 |
-
'inset' => 'Inset',
|
10 |
-
'outset' => 'Outset',
|
11 |
-
'ridge' => 'Ridge'
|
12 |
-
);
|
13 |
-
$bordershowhide = $settings['containerBorderStyle'] == 'none' ? 'style="display:none"' : '';
|
14 |
-
$fontFamilys = array(
|
15 |
-
'Sans-Serif'=>'Sans-Serif',
|
16 |
-
'Tahoma' => 'Tahoma',
|
17 |
-
'Georgia' => 'Georgia',
|
18 |
-
'Comic Sans MS' => 'Comic Sans MS',
|
19 |
-
'Arial' => 'Arial',
|
20 |
-
'Lucida Grande' => 'Lucida Grande',
|
21 |
-
'Times New Roman' => 'Times New Roman'
|
22 |
-
);
|
23 |
-
$closeLocations = array(
|
24 |
-
'inside' => 'Inside',
|
25 |
-
'outside' => 'Outside',
|
26 |
-
);
|
27 |
-
$closeshowhide = $settings['closeLocation'] == 'inside' ? 'style="display:none"' : '';
|
28 |
-
$closePositions = array(
|
29 |
-
'topleft' => 'Top Left',
|
30 |
-
'topright' => 'Top Right',
|
31 |
-
'bottomleft' => 'Bottom Left',
|
32 |
-
'bottomright' => 'Bottom Right'
|
33 |
-
);
|
34 |
-
?><div style="border-style:" class="wrap">
|
35 |
-
<?php if(!empty($this->messages)){?>
|
36 |
-
<?php foreach($this->messages as $message){?>
|
37 |
-
<div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
|
38 |
-
<?php }?>
|
39 |
-
<?php }?>
|
40 |
-
<?php screen_icon()?>
|
41 |
-
<h2><?php echo ucfirst(esc_html($settings['name'])).' '; _e('Theme','easy-modal')?></h2>
|
42 |
-
<div class="emthemes metabox-holder">
|
43 |
-
<div class="meta-box-sortables ui-sortable">
|
44 |
-
<h2 id="em-tabs" class="nav-tab-wrapper">
|
45 |
-
<a href="#top#general" id="general-tab" class="nav-tab"><?php _e('General','easy-modal')?></a>
|
46 |
-
<a href="#top#overlay" id="overlay-tab" class="nav-tab"><?php _e('Overlay','easy-modal')?></a>
|
47 |
-
<a href="#top#close" id="close-tab" class="nav-tab"><?php _e('Close','easy-modal')?></a>
|
48 |
-
<a href="#top#container" id="container-tab" class="nav-tab"><?php _e('Container','easy-modal')?></a>
|
49 |
-
<a href="#top#content" id="content-tab" class="nav-tab"><?php _e('Content','easy-modal')?></a>
|
50 |
-
</h2>
|
51 |
-
<div class="tabwrapper">
|
52 |
-
<form method="post" action="admin.php?page=easy-modal-themes&theme_id=1">
|
53 |
-
<input type="hidden" name="em_settings" value="theme"/>
|
54 |
-
<div id="general" class="em-tab">
|
55 |
-
<table class="form-table">
|
56 |
-
<tbody>
|
57 |
-
<tr class="form-field form-required">
|
58 |
-
<th scope="row">
|
59 |
-
<label for="name"><?php _e('Theme Name', 'easy-modal');?> <span class="description">(required)</span></label>
|
60 |
-
</th>
|
61 |
-
<td>
|
62 |
-
<input type="text" name="name" id="name" value="<?php esc_attr_e($settings['name'])?>"/>
|
63 |
-
<p class="description"><?php _e('Enter a name for your theme.','easy-modal')?></p>
|
64 |
-
</td>
|
65 |
-
</tr>
|
66 |
-
</tbody>
|
67 |
-
</table>
|
68 |
-
</div>
|
69 |
-
<div id="overlay" class="em-tab">
|
70 |
-
<table class="form-table">
|
71 |
-
<tbody>
|
72 |
-
<tr class="form-field form-required">
|
73 |
-
<th scope="row">
|
74 |
-
<label for="overlayColor"><?php _e('Color', 'easy-modal');?></label>
|
75 |
-
</th>
|
76 |
-
<td>
|
77 |
-
<input type="text" name="overlayColor" id="overlayColor" value="<?php esc_attr_e($settings['overlayColor'])?>" class="colorSelect" />
|
78 |
-
<div class="color-swatch" style="background-color:<?php esc_attr_e($settings['overlayColor'])?>" ></div>
|
79 |
-
<p class="description"><?php _e('Choose the overlay color.','easy-modal')?></p>
|
80 |
-
</td>
|
81 |
-
</tr>
|
82 |
-
<tr class="form-field form-required">
|
83 |
-
<th scope="row">
|
84 |
-
<label for="overlayOpacity"><?php _e('Opacity', 'easy-modal');?></label>
|
85 |
-
</th>
|
86 |
-
<td>
|
87 |
-
<div id="overlayOpacitySlider" class="value-slider"></div>
|
88 |
-
<div class="slider-value"><span id="overlayOpacityValue"><?php echo intval($settings['overlayOpacity'])?></span>%</div>
|
89 |
-
<input type="hidden" id="overlayOpacity" name="overlayOpacity" size="20" value="<?php esc_attr_e(intval($settings['overlayOpacity']))?>"/>
|
90 |
-
<p class="description"><?php _e('The opacity value for the overlay.','easy-modal')?></p>
|
91 |
-
</td>
|
92 |
-
</tr>
|
93 |
-
</tbody>
|
94 |
-
</table>
|
95 |
-
</div>
|
96 |
-
<div id="close" class="em-tab">
|
97 |
-
<table class="form-table">
|
98 |
-
<tbody>
|
99 |
-
<tr class="form-field form-required">
|
100 |
-
<th scope="row">
|
101 |
-
<label for="closeLocation"><?php _e('Close Location', 'easy-modal');?></label>
|
102 |
-
</th>
|
103 |
-
<td>
|
104 |
-
<select name="closeLocation" id="closeLocation">
|
105 |
-
<?php foreach($closeLocations as $value => $name){?>
|
106 |
-
<option value="<?php echo $value?>" <?php echo $value == $settings['closeLocation'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
|
107 |
-
<?php }?>
|
108 |
-
</select>
|
109 |
-
<p class="description"><?php _e('Choose whether the close button is inside or outside of the modal.','easy-modal')?></p>
|
110 |
-
</td>
|
111 |
-
</tr>
|
112 |
-
|
113 |
-
<tr class="form-field form-required outside-only"<?php echo $closeshowhide?>>
|
114 |
-
<th scope="row">
|
115 |
-
<label for="closeBgColor"><?php _e('Background Color', 'easy-modal');?></label>
|
116 |
-
</th>
|
117 |
-
<td>
|
118 |
-
<input type="text" name="closeBgColor" id="closeBgColor" value="<?php esc_attr_e($settings['closeBgColor'])?>" class="colorSelect" />
|
119 |
-
<div class="color-swatch" style="background-color:<?php esc_attr_e($settings['closeBgColor'])?>" ></div>
|
120 |
-
<p class="description"><?php _e('Choose the background color for your close button.','easy-modal')?></p>
|
121 |
-
</td>
|
122 |
-
</tr>
|
123 |
-
|
124 |
-
<tr class="form-field form-required">
|
125 |
-
<th scope="row">
|
126 |
-
<label for="closeFontColor"><?php _e('Font Color', 'easy-modal');?></label>
|
127 |
-
</th>
|
128 |
-
<td>
|
129 |
-
<input type="text" name="closeFontColor" id="closeFontColor" value="<?php esc_attr_e($settings['closeFontColor'])?>" class="colorSelect" />
|
130 |
-
<div class="color-swatch" style="background-color:<?php esc_attr_e($settings['closeFontColor'])?>" ></div>
|
131 |
-
<p class="description"><?php _e('Choose the font color for your close button.','easy-modal')?></p>
|
132 |
-
</td>
|
133 |
-
</tr>
|
134 |
-
<tr class="form-field form-required outside-only"<?php echo $closeshowhide?>>
|
135 |
-
<th scope="row">
|
136 |
-
<label for="closeFontSize"><?php _e('Font Size', 'easy-modal');?></label>
|
137 |
-
</th>
|
138 |
-
<td>
|
139 |
-
<div id="closeFontSizeSlider" class="value-slider"></div>
|
140 |
-
<div class="slider-value"><span id="closeFontSizeValue"><?php esc_attr_e(intval($settings['closeFontSize']))?></span>px</div>
|
141 |
-
<input type="hidden" name="closeFontSize" id="closeFontSize" value="<?php esc_attr_e(intval($settings['closeFontSize']))?>" />
|
142 |
-
<p class="description"><?php _e('Choose the font size for your close button.','easy-modal')?></p>
|
143 |
-
</td>
|
144 |
-
</tr>
|
145 |
-
<tr class="form-field form-required outside-only"<?php echo $closeshowhide?>>
|
146 |
-
<th scope="row">
|
147 |
-
<label for="closeBorderRadius"><?php _e('Border Radius', 'easy-modal');?></label>
|
148 |
-
</th>
|
149 |
-
<td>
|
150 |
-
<div id="closeBorderRadiusSlider" class="value-slider"></div>
|
151 |
-
<div class="slider-value"><span id="closeBorderRadiusValue"><?php esc_attr_e(intval($settings['closeBorderRadius']))?></span>px</div>
|
152 |
-
<input type="hidden" id="closeBorderRadius" name="closeBorderRadius" value="<?php esc_attr_e(intval($settings['closeBorderRadius']))?>"/>
|
153 |
-
<p class="description"><?php _e('Choose a corner radius for your close button.','easy-modal')?></p>
|
154 |
-
</td>
|
155 |
-
</tr>
|
156 |
-
<tr class="form-field form-required outside-only"<?php echo $closeshowhide?>>
|
157 |
-
<th scope="row">
|
158 |
-
<label for="closeSize"><?php _e('Size', 'easy-modal');?></label>
|
159 |
-
</th>
|
160 |
-
<td>
|
161 |
-
<div id="closeSizeSlider" class="value-slider"></div>
|
162 |
-
<div class="slider-value"><span id="closeSizeValue"><?php esc_attr_e(intval($settings['closeSize']))?></span>px</div>
|
163 |
-
<input type="hidden" id="closeSize" name="closeSize" value="<?php esc_attr_e(intval($settings['closeSize']))?>"/>
|
164 |
-
<p class="description"><?php _e('Choose a size for your close button.','easy-modal')?></p>
|
165 |
-
</td>
|
166 |
-
</tr>
|
167 |
-
<tr class="form-field form-required outside-only"<?php echo $closeshowhide?>>
|
168 |
-
<th scope="row">
|
169 |
-
<label for="closePosition"><?php _e('Position', 'easy-modal');?></label>
|
170 |
-
</th>
|
171 |
-
<td>
|
172 |
-
<select name="closePosition" id="closePosition">
|
173 |
-
<?php foreach($closePositions as $value => $name){?>
|
174 |
-
<option value="<?php echo $value?>" <?php echo $value == $settings['closePosition'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
|
175 |
-
<?php }?>
|
176 |
-
</select>
|
177 |
-
<p class="description"><?php _e('Choose which corner the close button will be positioned.','easy-modal')?></p>
|
178 |
-
</td>
|
179 |
-
</tr>
|
180 |
-
</tbody>
|
181 |
-
</table>
|
182 |
-
</div>
|
183 |
-
<div id="container" class="em-tab">
|
184 |
-
<table class="form-table">
|
185 |
-
<tbody>
|
186 |
-
<tr class="form-field form-required">
|
187 |
-
<th scope="row">
|
188 |
-
<label for="containerBgColor"><?php _e('Background Color', 'easy-modal');?></label>
|
189 |
-
</th>
|
190 |
-
<td>
|
191 |
-
<input type="text" name="containerBgColor" id="containerBgColor" value="<?php esc_attr_e($settings['containerBgColor'])?>" class="colorSelect" />
|
192 |
-
<div class="color-swatch" style="background-color:<?php esc_attr_e($settings['containerBgColor'])?>" ></div>
|
193 |
-
<p class="description"><?php _e('Choose a color for the background of the modal.','easy-modal')?></p>
|
194 |
-
</td>
|
195 |
-
</tr>
|
196 |
-
<tr class="form-field form-required">
|
197 |
-
<th scope="row">
|
198 |
-
<label for="containerPadding"><?php _e('Padding', 'easy-modal');?></label>
|
199 |
-
</th>
|
200 |
-
<td>
|
201 |
-
<div id="containerPaddingSlider" class="value-slider"></div>
|
202 |
-
<div class="slider-value"><span id="containerPaddingValue"><?php esc_attr_e(intval($settings['containerPadding']))?></span>px</div>
|
203 |
-
<input type="hidden" id="containerPadding" name="containerPadding" width="20" value="<?php esc_attr_e(intval($settings['containerPadding']))?>"/>
|
204 |
-
<p class="description"><?php _e('Choose the amount of padding for the modal.','easy-modal')?></p>
|
205 |
-
</td>
|
206 |
-
</tr>
|
207 |
-
<tr class="form-field form-required">
|
208 |
-
<th scope="row">
|
209 |
-
<label for="containerBorderStyle"><?php _e('Border Style', 'easy-modal');?></label>
|
210 |
-
</th>
|
211 |
-
<td>
|
212 |
-
<select name="containerBorderStyle" id="containerBorderStyle">
|
213 |
-
<?php foreach($borderTypes as $value => $name){?>
|
214 |
-
<option value="<?php echo $value?>" <?php echo $value == $settings['containerBorderStyle'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
|
215 |
-
<?php }?>
|
216 |
-
</select>
|
217 |
-
<p class="description"><?php _e('Choose a style for the border of the modal.','easy-modal')?></p>
|
218 |
-
</td>
|
219 |
-
</tr>
|
220 |
-
<tr class="form-field form-required border-only"<?php echo $bordershowhide?>>
|
221 |
-
<th scope="row">
|
222 |
-
<label for="containerBorderColor"><?php _e('Border Color', 'easy-modal');?></label>
|
223 |
-
</th>
|
224 |
-
<td>
|
225 |
-
<input type="text" name="containerBorderColor" id="containerBorderColor" value="<?php esc_attr_e($settings['containerBorderColor'])?>" class="colorSelect" />
|
226 |
-
<div class="color-swatch" style="background-color:<?php esc_attr_e($settings['containerBorderColor'])?>" ></div>
|
227 |
-
<p class="description"><?php _e('Choose a color for the border of the modal.','easy-modal')?></p>
|
228 |
-
</td>
|
229 |
-
</tr>
|
230 |
-
<tr class="form-field form-required border-only"<?php echo $bordershowhide?>>
|
231 |
-
<th scope="row">
|
232 |
-
<label for="containerBorderWidth"><?php _e('Border Width', 'easy-modal');?></label>
|
233 |
-
</th>
|
234 |
-
<td>
|
235 |
-
<div id="containerBorderWidthSlider" class="value-slider"></div>
|
236 |
-
<div class="slider-value"><span id="containerBorderWidthValue"><?php esc_attr_e(intval( $settings['containerBorderWidth']))?></span>px</div>
|
237 |
-
<input type="hidden" id="containerBorderWidth" name="containerBorderWidth" value="<?php esc_attr_e(intval( $settings['containerBorderWidth']))?>"/>
|
238 |
-
<p class="description"><?php _e('Choose a width for the border of the modal.','easy-modal')?></p>
|
239 |
-
</td>
|
240 |
-
</tr>
|
241 |
-
<tr class="form-field form-required">
|
242 |
-
<th scope="row">
|
243 |
-
<label for="containerBorderRadius"><?php _e('Border Radius', 'easy-modal');?></label>
|
244 |
-
</th>
|
245 |
-
<td>
|
246 |
-
<div id="containerBorderRadiusSlider" class="value-slider"></div>
|
247 |
-
<div class="slider-value"><span id="containerBorderRadiusValue"><?php echo $settings['containerBorderRadius']?></span>px</div>
|
248 |
-
<input type="hidden" id="containerBorderRadius" name="containerBorderRadius" value="<?php echo $settings['containerBorderRadius']?>"/>
|
249 |
-
<p class="description"><?php _e('Choose a width for the border of the modal.','easy-modal')?></p>
|
250 |
-
</td>
|
251 |
-
</tr>
|
252 |
-
</tbody>
|
253 |
-
</table>
|
254 |
-
</div>
|
255 |
-
<div id="content" class="em-tab">
|
256 |
-
<table class="form-table">
|
257 |
-
<tbody>
|
258 |
-
<tr class="form-field form-required">
|
259 |
-
<th scope="row">
|
260 |
-
<label for="contentTitleFontColor"><?php _e('Title Color', 'easy-modal');?></label>
|
261 |
-
</th>
|
262 |
-
<td>
|
263 |
-
<input type="text" name="contentTitleFontColor" id="contentTitleFontColor" value="<?php esc_attr_e($settings['contentTitleFontColor'])?>" class="colorSelect" />
|
264 |
-
<div class="color-swatch" style="background-color:<?php esc_attr_e($settings['contentTitleFontColor'])?>" ></div>
|
265 |
-
<p class="description"><?php _e('Choose a color for the title.','easy-modal')?></p>
|
266 |
-
</td>
|
267 |
-
</tr>
|
268 |
-
<tr class="form-field form-required">
|
269 |
-
<th scope="row">
|
270 |
-
<label for="contentTitleFontSize"><?php _e('Title Font Size', 'easy-modal');?></label>
|
271 |
-
</th>
|
272 |
-
<td>
|
273 |
-
<div id="contentTitleFontSizeSlider" class="value-slider"></div>
|
274 |
-
<div class="slider-value"><span id="contentTitleFontSizeValue"><?php esc_attr_e(intval($settings['contentTitleFontSize']))?></span>px</div>
|
275 |
-
<input type="hidden" name="contentTitleFontSize" id="contentTitleFontSize" value="<?php esc_attr_e(intval($settings['contentTitleFontSize']))?>" />
|
276 |
-
<p class="description"><?php _e('Choose a font size for the title.','easy-modal')?></p>
|
277 |
-
</td>
|
278 |
-
</tr>
|
279 |
-
<tr class="form-field form-required">
|
280 |
-
<th scope="row">
|
281 |
-
<label for="contentTitleFontFamily"><?php _e('Title Font Family', 'easy-modal');?></label>
|
282 |
-
</th>
|
283 |
-
<td>
|
284 |
-
<select name="contentTitleFontFamily" id="contentTitleFontFamily">
|
285 |
-
<?php foreach($fontFamilys as $value => $name){?>
|
286 |
-
<option value="<?php echo $value?>" <?php echo $value == $settings['contentTitleFontFamily'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
|
287 |
-
<?php }?>
|
288 |
-
</select>
|
289 |
-
<p class="description"><?php _e('Choose a font for the title.','easy-modal')?></p>
|
290 |
-
</td>
|
291 |
-
<tr class="form-field form-required">
|
292 |
-
<th scope="row">
|
293 |
-
<label for="contentFontColor"><?php _e('Font Color', 'easy-modal');?></label>
|
294 |
-
</th>
|
295 |
-
<td>
|
296 |
-
<input type="text" name="contentFontColor" id="contentFontColor" value="<?php esc_attr_e($settings['contentFontColor'])?>" class="colorSelect" />
|
297 |
-
<div class="color-swatch" style="background-color:<?php esc_attr_e($settings['contentFontColor'])?>" ></div>
|
298 |
-
<p class="description"><?php _e('Choose a font color body of the modal.','easy-modal')?></p>
|
299 |
-
</td>
|
300 |
-
</tr>
|
301 |
-
</tbody>
|
302 |
-
</table>
|
303 |
-
</div>
|
304 |
-
<div class="submit">
|
305 |
-
<input type="hidden" name="safe_csrf_nonce_easy_modal" id="safe_csrf_nonce_easy_modal" value="<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal"); ?>">
|
306 |
-
<input type="submit" value="<?php _e('Save Settings','easy-modal')?>" name="submit" class="button-primary">
|
307 |
-
</div>
|
308 |
-
</form>
|
309 |
-
</div>
|
310 |
-
</div>
|
311 |
-
</div>
|
312 |
-
<div class="empreview">
|
313 |
-
<div id="eModal-Preview">
|
314 |
-
<div class="example-modal-overlay" style="background-color:<?php echo $settings['overlayColor']?>;opacity:<?php echo intval($settings['overlayOpacity'])/100 ?>;"></div>
|
315 |
-
<h2>
|
316 |
-
<?php _e('eModal Theme Preview','easy-modal')?>
|
317 |
-
</h2>
|
318 |
-
<div class="example-modal" style="
|
319 |
-
background-color:<?php esc_attr_e($settings['containerBgColor'])?>;
|
320 |
-
padding:<?php esc_attr_e(intval($settings['containerPadding']))?>px;
|
321 |
-
border:<?php esc_attr_e($settings['containerBorderColor'] .' '. intval($settings['containerBorderWidth']).'px '.$settings['containerBorderStyle'])?>;
|
322 |
-
-webkit-border-radius:<?php esc_attr_e(intval($settings['containerBorderRadius']))?>px;
|
323 |
-
border-radius:<?php esc_attr_e(intval($settings['containerBorderRadius']))?>px;
|
324 |
-
color:<?php esc_attr_e($settings['contentFontColor'])?>;
|
325 |
-
">
|
326 |
-
<div class="title" style="
|
327 |
-
color:<?php esc_attr_e($settings['contentTitleFontColor'])?>;
|
328 |
-
font-family:<?php esc_attr_e($settings['contentTitleFontFamily'])?>;
|
329 |
-
font-size:<?php esc_attr_e(intval($settings['contentTitleFontSize']))?>px;
|
330 |
-
">Title Text</div>
|
331 |
-
<p>Suspendisse ipsum eros, tincidunt sed commodo ut, viverra vitae ipsum. Etiam non porta neque. Pellentesque nulla elit, aliquam in ullamcorper at, bibendum sed eros. Morbi non sapien tellus, ac vestibulum eros. In hac habitasse platea dictumst. Nulla vestibulum, diam vel porttitor placerat, eros tortor ultrices lectus, eget faucibus arcu justo eget massa. Maecenas id tellus vitae justo posuere hendrerit aliquet ut dolor.</p>
|
332 |
-
<a class="close-modal" style="
|
333 |
-
color:<?php esc_attr_e($settings['closeFontColor'])?>;
|
334 |
-
<?php if($settings['closeLocation'] == 'outside'){?>
|
335 |
-
font-size:<?php esc_attr_e(intval($settings['closeFontSize']))?>px;
|
336 |
-
width:<?php esc_attr_e(intval($settings['closeSize']))?>px;
|
337 |
-
height:<?php esc_attr_e(intval($settings['closeSize']))?>px;
|
338 |
-
line-height:<?php esc_attr_e(intval($settings['closeSize']))?>px;
|
339 |
-
|
340 |
-
background-color:<?php esc_attr_e($settings['closeBgColor'])?>;
|
341 |
-
-webkit-border-radius:<?php esc_attr_e(intval($settings['closeBorderRadius']))?>px;
|
342 |
-
border-radius:<?php esc_attr_e(intval($settings['closeBorderRadius']))?>px;
|
343 |
-
<?php
|
344 |
-
$size = intval(0-($settings['closeSize']/2)).'px';
|
345 |
-
$top = $left = $bottom = $right = 'auto';
|
346 |
-
switch($settings['closePosition'])
|
347 |
-
{
|
348 |
-
case 'topleft':
|
349 |
-
$top = $size;
|
350 |
-
$left = $size;
|
351 |
-
break;
|
352 |
-
case 'topright':
|
353 |
-
$top = $size;
|
354 |
-
$right = $size;
|
355 |
-
break;
|
356 |
-
case 'bottomleft':
|
357 |
-
$left = $size;
|
358 |
-
$bottom = $size;
|
359 |
-
break;
|
360 |
-
case 'bottomright':
|
361 |
-
$right = $size;
|
362 |
-
$bottom = $size;
|
363 |
-
break;
|
364 |
-
}
|
365 |
-
?>
|
366 |
-
top: <?php esc_attr_e($top)?>;
|
367 |
-
bottom: <?php esc_attr_e($bottom)?>;
|
368 |
-
left: <?php esc_attr_e($left)?>;
|
369 |
-
right: <?php esc_attr_e($right)?>;
|
370 |
-
<?php }?>
|
371 |
-
">×</a>
|
372 |
-
</div>
|
373 |
-
</div>
|
374 |
-
</div>
|
375 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/addon-pro-tab.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_addons_tabs', 'emodal_admin_addons_pro_tab', 10);
|
3 |
+
function emodal_admin_addons_pro_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'pro', 'label' => __('Pro', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_admin_addons_tab_pro', 'emodal_admin_addons_pro_tab_content', 10);
|
10 |
+
function emodal_admin_addons_pro_tab_content()
|
11 |
+
{
|
12 |
+
$addons = EModal_License::available_addons();?>
|
13 |
+
<ul class="addons-available">
|
14 |
+
<?php foreach($addons as $addon) :?>
|
15 |
+
<li class="available-addon-inner">
|
16 |
+
<img class="addon-thumbnail" src="<?php esc_attr_e($addon->image)?>">
|
17 |
+
|
18 |
+
<h3><?php esc_html_e($addon->name)?></h3><?php
|
19 |
+
if(!empty($addon->download_url))
|
20 |
+
{
|
21 |
+
?><span class="action-links"><a class="button install" href="<?php echo esc_url( wp_nonce_url( admin_url('update.php?action=install-plugin&plugin='.$addon->slug.'/'.$addon->slug.'.php') ) );?>"><?php _e('Install', EMCORE_SLUG);?></a></span><?php
|
22 |
+
} else {
|
23 |
+
?><div class="addon-upgrade"><span class="action-links"><?php
|
24 |
+
if($addon->required_license == 'developer')
|
25 |
+
{
|
26 |
+
_e('This Add-On is available to Easy Modal Developer license holders.', EMCORE_SLUG);
|
27 |
+
}
|
28 |
+
else
|
29 |
+
{
|
30 |
+
_e('This Add-On is available to Easy Modal Pro license holders.', EMCORE_SLUG);
|
31 |
+
}
|
32 |
+
?></span></div>
|
33 |
+
<span class="action-links"><a class="button button" target="_blank" href="https://easy-modal.com/pricing"><?php _e('Upgrade Now', EMCORE_SLUG);?></a></span><?php
|
34 |
+
}?>
|
35 |
+
<p><?php esc_html_e($addon->description)?></p>
|
36 |
+
</li>
|
37 |
+
<?php endforeach;?>
|
38 |
+
</ul><?php
|
39 |
+
}
|
includes/admin/content.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
add_action('emodal_example_modal_content', 'emodal_default_example_modal_content',1);
|
4 |
+
function emodal_default_example_modal_content()
|
5 |
+
{?>
|
6 |
+
<p>Suspendisse ipsum eros, tincidunt sed commodo ut, viverra vitae ipsum. Etiam non porta neque. Pellentesque nulla elit, aliquam in ullamcorper at, bibendum sed eros. Morbi non sapien tellus, ac vestibulum eros. In hac habitasse platea dictumst. Nulla vestibulum, diam vel porttitor placerat, eros tortor ultrices lectus, eget faucibus arcu justo eget massa. Maecenas id tellus vitae justo posuere hendrerit aliquet ut dolor.</p>
|
7 |
+
<?php }
|
8 |
+
/*
|
9 |
+
add_filter('emodal_example_modal_content', 'emodal_default_example_modal_content',1);
|
10 |
+
function emodal_default_example_modal_content($content)
|
11 |
+
{
|
12 |
+
return '<p>Suspendisse ipsum eros, tincidunt sed commodo ut, viverra vitae ipsum. Etiam non porta neque. Pellentesque nulla elit, aliquam in ullamcorper at, bibendum sed eros. Morbi non sapien tellus, ac vestibulum eros. In hac habitasse platea dictumst. Nulla vestibulum, diam vel porttitor placerat, eros tortor ultrices lectus, eget faucibus arcu justo eget massa. Maecenas id tellus vitae justo posuere hendrerit aliquet ut dolor.</p>';
|
13 |
+
}
|
14 |
+
*/
|
includes/admin/footer.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_action('emodal_admin_footer', 'emodal_admin_footer_social');
|
3 |
+
function emodal_admin_footer_social()
|
4 |
+
{?>
|
5 |
+
<div id="fb-root"></div>
|
6 |
+
<script>
|
7 |
+
jQuery(document).ready(function(){
|
8 |
+
(function(d, s, id) {
|
9 |
+
var js, fjs = d.getElementsByTagName(s)[0];
|
10 |
+
if (d.getElementById(id)) return;
|
11 |
+
js = d.createElement(s); js.id = id;
|
12 |
+
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=191746824208314";
|
13 |
+
fjs.parentNode.insertBefore(js, fjs);
|
14 |
+
}(document, 'script', 'facebook-jssdk'));
|
15 |
+
(function() {
|
16 |
+
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
|
17 |
+
po.src = 'https://apis.google.com/js/plusone.js';
|
18 |
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
|
19 |
+
})();
|
20 |
+
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
|
21 |
+
});
|
22 |
+
</script><?php
|
23 |
+
}
|
includes/admin/functions.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(!function_exists("is_emodal_admin_page")){
|
3 |
+
function is_emodal_admin_page(){
|
4 |
+
if(is_admin() && !empty($_GET['page']) && ( strpos($_GET['page'], EMCORE_SLUG) == 0 || !in_array($_GET['page'], apply_filters('emodal_admin_pages', array()))))
|
5 |
+
{
|
6 |
+
return true;
|
7 |
+
}
|
8 |
+
return false;
|
9 |
+
}}
|
10 |
+
|
11 |
+
if(!function_exists("empost")){
|
12 |
+
function empost($name, $do_stripslashes = true){
|
13 |
+
$value = emresolve($_POST, $name, false);
|
14 |
+
return $do_stripslashes ? stripslashes_deep($value) : $value;
|
15 |
+
}}
|
16 |
+
|
17 |
+
if(!function_exists("empost_clean")){
|
18 |
+
function empost_clean($value, $type = 'text', $default = NULL){
|
19 |
+
switch($type)
|
20 |
+
{
|
21 |
+
case 'hexcolor': return preg_match('/^#[a-f0-9]{6}$/i', $val) ? $value : $default; break;
|
22 |
+
}
|
23 |
+
}}
|
24 |
+
|
25 |
+
if(!function_exists("is_all_numeric")){
|
26 |
+
function is_all_numeric($array){
|
27 |
+
if(!is_array($array)) return false;
|
28 |
+
foreach($array as $val) if(!is_numeric($val)) return false;
|
29 |
+
return true;
|
30 |
+
}}
|
31 |
+
|
32 |
+
|
33 |
+
if(!function_exists("emodal_admin_url")){
|
34 |
+
function emodal_admin_url($page = ''){
|
35 |
+
return admin_url( 'admin.php?page=' . emodal_admin_slug($page));
|
36 |
+
}}
|
37 |
+
|
38 |
+
if(!function_exists("emodal_admin_slug")){
|
39 |
+
function emodal_admin_slug($page = ''){
|
40 |
+
return EMCORE_SLUG . ($page != '' ? '-'. $page : '');
|
41 |
+
}}
|
42 |
+
|
43 |
+
|
includes/admin/help-general-tab.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_help_tabs', 'emodal_admin_help_general_tab', 10);
|
3 |
+
function emodal_admin_help_general_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'general', 'label' => __('General Usage', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_admin_help_tab_general', 'emodal_admin_help_general_tab_content', 10);
|
10 |
+
function emodal_admin_help_general_tab_content()
|
11 |
+
{?>
|
12 |
+
<h4><?php _e('Copy the class to the link/button you want to open this modal.', EMCORE_SLUG);?><span class="desc"><?php _e('Will start with eModal- and end with a # of the modal you want to open.', EMCORE_SLUG);?></span></h4>
|
13 |
+
<div class="tab-box">
|
14 |
+
<h4><?php _e('Link Example', EMCORE_SLUG);?></h4>
|
15 |
+
<a href="#" onclick="return false;" class="eModal-1"><?php _e('Open Modal', EMCORE_SLUG);?></a>
|
16 |
+
<pre><a href="#" class="eModal-1"><?php _e('Open Modal', EMCORE_SLUG);?></a></pre>
|
17 |
+
</div>
|
18 |
+
<div class="tab-box">
|
19 |
+
<h4><?php _e('Button Example', EMCORE_SLUG);?></h4>
|
20 |
+
<button onclick="return false;" class="eModal-1"><?php _e('Open Modal', EMCORE_SLUG);?></button>
|
21 |
+
<pre><button class="eModal-1"><?php _e('Open Modal', EMCORE_SLUG);?></button></pre>
|
22 |
+
</div>
|
23 |
+
<div class="tab-box">
|
24 |
+
<h4><?php _e('Image Example', EMCORE_SLUG);?></h4>
|
25 |
+
<img style="cursor:pointer;" src="<?php echo EMCORE_URL?>/assets/images/admin/easy-modal-icon.png" onclick="return false;" class="eModal-1" />
|
26 |
+
<pre><img src="easy-modal-icon.png" class="eModal-1" /></pre>
|
27 |
+
</div><?php
|
28 |
+
}
|
includes/admin/modal-form-close-tab.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_modal_form_tabs', 'emodal_admin_modal_form_close_tab', 30);
|
3 |
+
function emodal_admin_modal_form_close_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'close', 'label' => __('Close Options', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
|
10 |
+
add_action('emodal_admin_modal_form_tab_close', 'emodal_admin_modal_form_close_tab_settings', 20);
|
11 |
+
function emodal_admin_modal_form_close_tab_settings()
|
12 |
+
{
|
13 |
+
?><table class="form-table">
|
14 |
+
<tbody>
|
15 |
+
<?php do_action('emodal_admin_modal_form_tab_close_settings');?>
|
16 |
+
</tbody>
|
17 |
+
</table><?php
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
add_action('emodal_admin_modal_form_tab_close_settings', 'emodal_admin_modal_form_tab_close_settings_overlay_click', 10);
|
22 |
+
function emodal_admin_modal_form_tab_close_settings_overlay_click()
|
23 |
+
{
|
24 |
+
?><tr>
|
25 |
+
<th scope="row"><?php _e('Click Overlay to Close', EMCORE_SLUG);?></th>
|
26 |
+
<td>
|
27 |
+
<input type="checkbox" value="true" name="modal[meta][close][overlay_click]" id="close_overlay_click" <?php echo get_current_modal('meta.close.overlay_click') ? 'checked="checked" ' : '';?>/>
|
28 |
+
<label for="close_overlay_click" class="description"><?php _e('Checking this will cause modal to close when user clicks on overlay.', EMCORE_SLUG);?></label>
|
29 |
+
</td>
|
30 |
+
</tr><?php
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
add_action('emodal_admin_modal_form_tab_close_settings', 'emodal_admin_modal_form_tab_close_settings_esc_press', 20);
|
35 |
+
function emodal_admin_modal_form_tab_close_settings_esc_press()
|
36 |
+
{
|
37 |
+
?><tr>
|
38 |
+
<th scope="row"><?php _e('Press ESC to Close', EMCORE_SLUG);?></th>
|
39 |
+
<td>
|
40 |
+
<input type="checkbox" value="true" name="modal[meta][close][esc_press]" id="close_esc_press" <?php echo get_current_modal('meta.close.esc_press') ? 'checked="checked" ' : '';?>/>
|
41 |
+
<label for="close_esc_press" class="description"><?php _e('Checking this will cause modal to close when user presses ESC key.', EMCORE_SLUG);?></label>
|
42 |
+
</td>
|
43 |
+
</tr><?php
|
44 |
+
}
|
includes/admin/modal-form-display-tab.php
ADDED
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_modal_form_tabs', 'emodal_admin_modal_form_display_tab', 20);
|
3 |
+
function emodal_admin_modal_form_display_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'display', 'label' => __('Display Options', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
|
10 |
+
add_action('emodal_admin_modal_form_tab_display', 'emodal_admin_modal_form_display_tab_settings', 20);
|
11 |
+
function emodal_admin_modal_form_display_tab_settings()
|
12 |
+
{
|
13 |
+
?><table class="form-table">
|
14 |
+
<tbody>
|
15 |
+
<?php do_action('emodal_admin_modal_form_tab_display_settings');?>
|
16 |
+
</tbody>
|
17 |
+
</table><?php
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
add_action('emodal_admin_modal_form_tab_display_settings', 'emodal_admin_modal_form_tab_display_settings_size', 10);
|
22 |
+
function emodal_admin_modal_form_tab_display_settings_size()
|
23 |
+
{
|
24 |
+
?><tr>
|
25 |
+
<th scope="row">
|
26 |
+
<label for="size">
|
27 |
+
<?php _e('Size', EMCORE_SLUG);?>
|
28 |
+
</label>
|
29 |
+
</th>
|
30 |
+
<td>
|
31 |
+
<select name="modal[meta][display][size]" id="size">
|
32 |
+
<?php foreach(apply_filters('emodal_modal_display_size_options', array()) as $option => $value) : ?>
|
33 |
+
<option
|
34 |
+
value="<?php echo $value;?>"
|
35 |
+
<?php echo $value == get_current_modal('meta.display.size') ? ' selected="selected"' : '';?>
|
36 |
+
<?php echo $value == '' ? ' class="bold"' : '';?>
|
37 |
+
><?php echo $option;?></option>
|
38 |
+
<?php endforeach ?>
|
39 |
+
</select>
|
40 |
+
<p class="description"><?php _e('Select the size of the modal.', EMCORE_SLUG)?></p>
|
41 |
+
</td>
|
42 |
+
</tr><?php
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
add_action('emodal_admin_modal_form_tab_display_settings', 'emodal_admin_modal_form_tab_display_settings_custom_sizes', 20);
|
47 |
+
function emodal_admin_modal_form_tab_display_settings_custom_sizes()
|
48 |
+
{
|
49 |
+
?><tr class="custom-size-only">
|
50 |
+
<th scope="row">
|
51 |
+
<label for="custom_width"><?php _e('Width', EMCORE_SLUG);?></label>
|
52 |
+
</th>
|
53 |
+
<td>
|
54 |
+
<input type="text" value="<?php esc_html_e(get_current_modal('meta.display.custom_width'));?>" size="5" name="modal[meta][display][custom_width]" id="custom_width"/>
|
55 |
+
<select name="modal[meta][display][custom_width_unit]" id="custom_width_unit">
|
56 |
+
<?php foreach(apply_filters('emodal_size_unit_options', array()) as $option => $value) : ?>
|
57 |
+
<option
|
58 |
+
value="<?php echo $value;?>"
|
59 |
+
<?php echo $value == get_current_modal('meta.display.custom_width_unit') ? ' selected="selected"' : '';?>
|
60 |
+
<?php echo $value == '' ? ' class="bold"' : '';?>
|
61 |
+
><?php echo $option;?></option>
|
62 |
+
<?php endforeach ?>
|
63 |
+
</select>
|
64 |
+
<p class="description"><?php _e('Set a custom width for the modal.', EMCORE_SLUG);?></p>
|
65 |
+
</td>
|
66 |
+
</tr>
|
67 |
+
|
68 |
+
|
69 |
+
<tr class="custom-size-only">
|
70 |
+
<th scope="row"><?php _e('Auto Adjusted Height', EMCORE_SLUG);?></th>
|
71 |
+
<td>
|
72 |
+
<input type="checkbox" value="true" name="modal[meta][display][custom_height_auto]" id="custom_height_auto" <?php echo get_current_modal('meta.display.custom_height_auto') ? 'checked="checked" ' : '';?>/>
|
73 |
+
<label for="custom_height_auto" class="description"><?php _e('Checking this option will set height to fix the content.', EMCORE_SLUG);?></label>
|
74 |
+
</td>
|
75 |
+
</tr>
|
76 |
+
|
77 |
+
|
78 |
+
<tr class="custom-size-only custom-size-height-only"<?php echo get_current_modal('meta.display.custom_height_auto') ? ' style="display:none"' : '';?>>
|
79 |
+
<th scope="row">
|
80 |
+
<?php _e('Height', EMCORE_SLUG);?>
|
81 |
+
</th>
|
82 |
+
<td>
|
83 |
+
<input type="text" value="<?php esc_html_e(get_current_modal('meta.display.custom_height'));?>" size="5" name="modal[meta][display][custom_height]" id="custom_height"/>
|
84 |
+
<select name="modal[meta][display][custom_height_unit]" id="custom_height_unit">
|
85 |
+
<?php foreach(apply_filters('emodal_size_unit_options', array()) as $option => $value) : ?>
|
86 |
+
<option
|
87 |
+
value="<?php echo $value;?>"
|
88 |
+
<?php echo $value == get_current_modal('meta.display.custom_height_unit') ? ' selected="selected"' : '';?>
|
89 |
+
<?php echo $value == '' ? ' class="bold"' : '';?>
|
90 |
+
><?php echo $option;?></option>
|
91 |
+
<?php endforeach ?>
|
92 |
+
</select>
|
93 |
+
<p class="description"><?php _e('Set a custom height for the modal.', EMCORE_SLUG);?></p>
|
94 |
+
</td>
|
95 |
+
</tr>
|
96 |
+
<?php
|
97 |
+
}
|
98 |
+
|
99 |
+
add_action('emodal_admin_modal_form_tab_display_settings', 'emodal_admin_modal_form_tab_display_settings_overlay_disabled', 30);
|
100 |
+
function emodal_admin_modal_form_tab_display_settings_overlay_disabled()
|
101 |
+
{
|
102 |
+
?><tr>
|
103 |
+
<th scope="row"><?php _e('Disable Overlay', EMCORE_SLUG);?></th>
|
104 |
+
<td>
|
105 |
+
<input type="checkbox" value="true" name="modal[meta][display][overlay_disabled]" id="overlay_disabled" <?php echo get_current_modal('meta.display.overlay_disabled') ? 'checked="checked" ' : '';?>/>
|
106 |
+
<label for="overlay_disabled" class="description"><?php _e('Checking this will disable and hide the overlay for this modal.', EMCORE_SLUG);?></label>
|
107 |
+
</td>
|
108 |
+
</tr><?php
|
109 |
+
}
|
110 |
+
|
111 |
+
add_action('emodal_admin_modal_form_tab_display_settings', 'emodal_admin_modal_form_tab_display_settings_animation', 40);
|
112 |
+
function emodal_admin_modal_form_tab_display_settings_animation()
|
113 |
+
{
|
114 |
+
?><tr class="title-divider">
|
115 |
+
<th colspan="2"><h3 class="title"><?php _e('Animation', EMCORE_SLUG);?></h3></th>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<th scope="row">
|
119 |
+
<label for="animation_type">
|
120 |
+
<?php _e('Animation Type', EMCORE_SLUG);?>
|
121 |
+
</label>
|
122 |
+
</th>
|
123 |
+
<td>
|
124 |
+
<select name="modal[meta][display][animation][type]" id="animation_type">
|
125 |
+
<?php foreach(apply_filters('emodal_modal_display_animation_type_options', array()) as $option => $value) : ?>
|
126 |
+
<option
|
127 |
+
value="<?php echo $value;?>"
|
128 |
+
<?php echo $value == get_current_modal('meta.display.animation.type') ? ' selected="selected"' : '';?>
|
129 |
+
><?php echo $option;?></option>
|
130 |
+
<?php endforeach ?>
|
131 |
+
</select>
|
132 |
+
<p class="description"><?php _e('Select an animation type for your modal.', EMCORE_SLUG)?></p>
|
133 |
+
</td>
|
134 |
+
</tr>
|
135 |
+
<tr class="animation-speed">
|
136 |
+
<th scope="row">
|
137 |
+
<label for="animation_speed">
|
138 |
+
<?php _e('Animation Speed', EMCORE_SLUG);?>
|
139 |
+
</label>
|
140 |
+
</th>
|
141 |
+
<td>
|
142 |
+
<input type="range" name="modal[meta][display][animation][speed]" id="animation_speed" step="10" value="<?php esc_attr_e(get_current_modal('meta.display.animation.speed'))?>" min="<?php esc_html_e(apply_filters('emodal_admin_modal_min_animation_speed', 50));?>" max="<?php esc_html_e(apply_filters('emodal_admin_modal_max_animation_speed', 1000));?>"/>
|
143 |
+
<span class="range-value regular-text"><?php esc_html_e(get_current_modal('meta.display.animation.speed'));?>ms</span>
|
144 |
+
<p class="description"><?php _e('Set the animation speed for the modal.', EMCORE_SLUG)?></p>
|
145 |
+
</td>
|
146 |
+
</tr>
|
147 |
+
<tr class="animation-origin">
|
148 |
+
<th scope="row">
|
149 |
+
<label for="animation_origin">
|
150 |
+
<?php _e('Animation Origin', EMCORE_SLUG);?>
|
151 |
+
</label>
|
152 |
+
</th>
|
153 |
+
<td>
|
154 |
+
<select name="modal[meta][display][animation][origin]" id="animation_origin">
|
155 |
+
<?php foreach(apply_filters('emodal_modal_display_animation_origin_options', array()) as $option => $value) : ?>
|
156 |
+
<option
|
157 |
+
value="<?php echo $value;?>"
|
158 |
+
<?php echo $value == get_current_modal('meta.display.animation.origin') ? ' selected="selected"' : '';?>
|
159 |
+
><?php echo $option;?></option>
|
160 |
+
<?php endforeach ?>
|
161 |
+
</select>
|
162 |
+
<p class="description"><?php _e('Choose where the animation will begin.', EMCORE_SLUG)?></p>
|
163 |
+
</td>
|
164 |
+
</tr>
|
165 |
+
<?php
|
166 |
+
}
|
167 |
+
|
168 |
+
|
169 |
+
add_action('emodal_admin_modal_form_tab_display_settings', 'emodal_admin_modal_form_display_tab_settings_position', 50);
|
170 |
+
function emodal_admin_modal_form_display_tab_settings_position()
|
171 |
+
{
|
172 |
+
?><tr class="title-divider">
|
173 |
+
<th colspan="2"><h3 class="title"><?php _e('Position', EMCORE_SLUG);?></h3></th>
|
174 |
+
</tr>
|
175 |
+
<tr>
|
176 |
+
<th scope="row">
|
177 |
+
<label for="display_location"><?php _e('Location', EMCORE_SLUG);?></label>
|
178 |
+
</th>
|
179 |
+
<td>
|
180 |
+
<select name="modal[meta][display][location]" id="display_location">
|
181 |
+
<?php foreach(apply_filters('emodal_modal_display_location_options', array()) as $option => $value) : ?>
|
182 |
+
<option
|
183 |
+
value="<?php echo $value;?>"
|
184 |
+
<?php echo $value == get_current_modal('meta.display.location') ? ' selected="selected"' : '';?>
|
185 |
+
><?php echo $option;?></option>
|
186 |
+
<?php endforeach ?>
|
187 |
+
</select>
|
188 |
+
<p class="description"><?php _e('Choose which corner the close button will be positioned.', EMCORE_SLUG)?></p>
|
189 |
+
</td>
|
190 |
+
</tr>
|
191 |
+
<tr>
|
192 |
+
<th scope="row"><?php _e('Fixed Postioning', EMCORE_SLUG);?></th>
|
193 |
+
<td>
|
194 |
+
<input type="checkbox" value="true" name="modal[meta][display][position][fixed]" id="display_position_fixed" <?php echo get_current_modal('meta.display.position.fixed') ? 'checked="checked" ' : '';?>/>
|
195 |
+
<label for="display_position_fixed" class="description"><?php _e('Checking this sets the positioning of the modal to fixed.', EMCORE_SLUG);?></label>
|
196 |
+
</td>
|
197 |
+
</tr>
|
198 |
+
<tr class="top">
|
199 |
+
<th scope="row">
|
200 |
+
<label for="display_position_top"><?php _e('Top', EMCORE_SLUG);?></label>
|
201 |
+
</th>
|
202 |
+
<td>
|
203 |
+
<input type="range" name="modal[meta][display][position][top]" id="display_position_top" min="0" max="500" step="1" value="<?php esc_attr_e(get_current_modal('meta.display.position.top'))?>" />
|
204 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal('meta.display.position.top'));?></span>px</span>
|
205 |
+
<p class="description"><?php _e('Distance from the top edge of the screen.',EMCORE_SLUG)?></p>
|
206 |
+
</td>
|
207 |
+
</tr>
|
208 |
+
<tr class="bottom">
|
209 |
+
<th scope="row">
|
210 |
+
<label for="display_position_bottom"><?php _e('Bottom', EMCORE_SLUG);?></label>
|
211 |
+
</th>
|
212 |
+
<td>
|
213 |
+
<input type="range" name="modal[meta][display][position][bottom]" id="display_position_bottom" min="0" max="500" step="1" value="<?php esc_attr_e(get_current_modal('meta.display.position.bottom'))?>" />
|
214 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal('meta.display.position.bottom'));?></span>px</span>
|
215 |
+
<p class="description"><?php _e('Distance from the bottom edge of the screen.',EMCORE_SLUG)?></p>
|
216 |
+
</td>
|
217 |
+
</tr>
|
218 |
+
<tr class="left">
|
219 |
+
<th scope="row">
|
220 |
+
<label for="display_position_left"><?php _e('Left', EMCORE_SLUG);?></label>
|
221 |
+
</th>
|
222 |
+
<td>
|
223 |
+
<input type="range" name="modal[meta][display][position][left]" id="display_position_left" min="0" max="500" step="1" value="<?php esc_attr_e(get_current_modal('meta.display.position.left'))?>" />
|
224 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal('meta.display.position.left'));?></span>px</span>
|
225 |
+
<p class="description"><?php _e('Distance from the left edge of the screen.',EMCORE_SLUG)?></p>
|
226 |
+
</td>
|
227 |
+
</tr>
|
228 |
+
<tr class="right">
|
229 |
+
<th scope="row">
|
230 |
+
<label for="display_position_right"><?php _e('Right', EMCORE_SLUG);?></label>
|
231 |
+
</th>
|
232 |
+
<td>
|
233 |
+
<input type="range" name="modal[meta][display][position][right]" id="display_position_right" min="0" max="500" step="1" value="<?php esc_attr_e(get_current_modal('meta.display.position.right'))?>" />
|
234 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal('meta.display.position.right'));?></span>px</span>
|
235 |
+
<p class="description"><?php _e('Distance from the right edge of the screen.',EMCORE_SLUG)?></p>
|
236 |
+
</td>
|
237 |
+
</tr><?php
|
238 |
+
}
|
includes/admin/modal-form-example-tab.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_modal_form_tabs', 'emodal_admin_modal_form_examples_tab', 100);
|
3 |
+
function emodal_admin_modal_form_examples_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'examples', 'label' => __('Examples', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_admin_modal_form_tab_examples', 'emodal_admin_modal_form_examples_tab_settings', 30);
|
10 |
+
function emodal_admin_modal_form_examples_tab_settings()
|
11 |
+
{
|
12 |
+
$modal = get_current_modal();
|
13 |
+
?><h4>
|
14 |
+
<?php _e('Copy this class to the link/button you want to open this modal.', EMCORE_SLUG)?>
|
15 |
+
<span class="desc">eModal-<?php esc_html_e($modal->id)?></span>
|
16 |
+
</h4>
|
17 |
+
<div class="tab-box">
|
18 |
+
<h4><?php _e('Link Example', EMCORE_SLUG)?></h4>
|
19 |
+
<a href="#" onclick="return false;" class="eModal-<?php esc_html_e($modal->id)?>"><?php _e('Open Modal', EMCORE_SLUG)?></a>
|
20 |
+
<pre><a href="#" class="eModal-<?php esc_html_e($modal->id)?>"><?php _e('Open Modal', EMCORE_SLUG)?></a></pre>
|
21 |
+
</div>
|
22 |
+
<div class="tab-box">
|
23 |
+
<h4><?php _e('Button Example', EMCORE_SLUG)?></h4>
|
24 |
+
<button onclick="return false;" class="eModal-<?php esc_html_e($modal->id)?>"><?php _e('Open Modal', EMCORE_SLUG)?></button>
|
25 |
+
<pre><button class="eModal-<?php esc_html_e($modal->id)?>"><?php _e('Open Modal', EMCORE_SLUG)?></button></pre>
|
26 |
+
</div>
|
27 |
+
<div class="tab-box">
|
28 |
+
<h4><?php _e('Image Example', EMCORE_SLUG)?></h4>
|
29 |
+
<img style="cursor:pointer;" src="<?php echo EMCORE_URL?>/assets/images/admin/easy-modal-icon.png" onclick="return false;" class="eModal-<?php esc_html_e($modal->id)?>" />
|
30 |
+
<pre><img src="easy-modal-icon.png" class="eModal-<?php esc_html_e($modal->id)?>" /></pre>
|
31 |
+
</div><?php
|
32 |
+
}
|
includes/admin/modal-form-general-tab.php
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_modal_form_tabs', 'emodal_admin_modal_form_general_tab', 10);
|
3 |
+
function emodal_admin_modal_form_general_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'general', 'label' => __('General', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_admin_modal_form_tab_general', 'emodal_admin_modal_form_general_tab_settings', 10);
|
10 |
+
function emodal_admin_modal_form_general_tab_settings()
|
11 |
+
{
|
12 |
+
?><table class="form-table">
|
13 |
+
<tbody>
|
14 |
+
<?php do_action('emodal_admin_modal_form_tab_general_settings');?>
|
15 |
+
</tbody>
|
16 |
+
</table><?php
|
17 |
+
}
|
18 |
+
|
19 |
+
add_action('emodal_admin_modal_form_tab_general_settings', 'emodal_admin_modal_form_general_tab_settings_name', 10);
|
20 |
+
function emodal_admin_modal_form_general_tab_settings_name()
|
21 |
+
{
|
22 |
+
?><tr>
|
23 |
+
<th scope="row">
|
24 |
+
<label for="name">
|
25 |
+
<?php _e('Name', EMCORE_SLUG);?>
|
26 |
+
<span class="description">(required)</span>
|
27 |
+
</label>
|
28 |
+
</th>
|
29 |
+
<td>
|
30 |
+
<input type="text" class="regular-text" name="modal[name]" id="name" value="<?php esc_attr_e(get_current_modal('name'))?>" required/>
|
31 |
+
</td>
|
32 |
+
</tr><?php
|
33 |
+
}
|
34 |
+
|
35 |
+
|
36 |
+
add_action('emodal_admin_modal_form_tab_general_settings', 'emodal_admin_modal_form_general_tab_settings_load_type', 20);
|
37 |
+
function emodal_admin_modal_form_general_tab_settings_load_type()
|
38 |
+
{
|
39 |
+
?><tr>
|
40 |
+
<th scope="row">
|
41 |
+
<label for="load_type">
|
42 |
+
<?php _e('Load Type', EMCORE_SLUG);?>
|
43 |
+
</label>
|
44 |
+
</th>
|
45 |
+
<td>
|
46 |
+
<select name="modal[load_type]" id="load_type">
|
47 |
+
<option value="per-page-post"<?php echo !get_current_modal('is_sitewide') ? ' selected="selected"' : '';?>><?php _e('Per Page/Post');?></option>
|
48 |
+
<option value="sitewide"<?php echo get_current_modal('is_sitewide') ? ' selected="selected"' : '';?>><?php _e('Load Sitewide');?></option>
|
49 |
+
</select>
|
50 |
+
<p class="description"><?php _e('Load this modal per page or sitewide.', EMCORE_SLUG)?></p>
|
51 |
+
</td>
|
52 |
+
</tr><?php
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
add_action('emodal_admin_modal_form_tab_general_settings', 'emodal_admin_modal_form_general_tab_settings_title', 30);
|
57 |
+
function emodal_admin_modal_form_general_tab_settings_title()
|
58 |
+
{
|
59 |
+
?><tr>
|
60 |
+
<th scope="row">
|
61 |
+
<label for="title">
|
62 |
+
<?php _e('Title', EMCORE_SLUG);?>
|
63 |
+
</label>
|
64 |
+
</th>
|
65 |
+
<td>
|
66 |
+
<input type="text" class="regular-text" name="modal[title]" id="title" value="<?php esc_attr_e(get_current_modal('title'))?>"/>
|
67 |
+
<p class="description"><?php _e(' The title that appears in the modal window. If you leave this blank, the title will be disabled.', EMCORE_SLUG)?></p>
|
68 |
+
</td>
|
69 |
+
</tr><?php
|
70 |
+
}
|
71 |
+
|
72 |
+
add_action('emodal_admin_modal_form_tab_general_settings', 'emodal_admin_modal_form_general_tab_settings_content', 40);
|
73 |
+
function emodal_admin_modal_form_general_tab_settings_content()
|
74 |
+
{
|
75 |
+
?><tr>
|
76 |
+
<th scope="row">
|
77 |
+
<label for="content">
|
78 |
+
<?php _e('Content', EMCORE_SLUG);?>
|
79 |
+
</label>
|
80 |
+
</th>
|
81 |
+
<td>
|
82 |
+
<?php
|
83 |
+
$settings = array(
|
84 |
+
'textarea_name' => 'modal[content]',
|
85 |
+
'wpautop' => false,
|
86 |
+
);
|
87 |
+
if(!function_exists('wp_editor')){
|
88 |
+
the_editor(get_current_modal('content'), "content", $settings);
|
89 |
+
} else {
|
90 |
+
wp_editor(get_current_modal('content'), "content", $settings);
|
91 |
+
}?>
|
92 |
+
<p class="description"><?php _e('Modal content. Can contain shortcodes.', EMCORE_SLUG)?></p>
|
93 |
+
</td>
|
94 |
+
</tr><?php
|
95 |
+
}
|
includes/admin/options.php
ADDED
@@ -0,0 +1,243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_action('emodal_model_modal_meta_defaults', 'emodal_model_modal_meta_core_defaults', 10);
|
3 |
+
function emodal_model_modal_meta_core_defaults($options){
|
4 |
+
$options['display']['overlay_disabled'] = 0;
|
5 |
+
$options['display']['size'] = 'medium';
|
6 |
+
$options['display']['custom_width'] = '';
|
7 |
+
$options['display']['custom_width_unit'] = '%';
|
8 |
+
$options['display']['custom_height'] = '';
|
9 |
+
$options['display']['custom_height_unit'] = 'em';
|
10 |
+
$options['display']['custom_height_auto'] = 1;
|
11 |
+
|
12 |
+
$options['display']['location'] = 'center top';
|
13 |
+
$options['display']['position']['top'] = 100;
|
14 |
+
$options['display']['position']['left'] = 0;
|
15 |
+
$options['display']['position']['bottom'] = 0;
|
16 |
+
$options['display']['position']['right'] = 0;
|
17 |
+
$options['display']['position']['fixed'] = 0;
|
18 |
+
|
19 |
+
$options['display']['animation']['type'] = 'fade';
|
20 |
+
$options['display']['animation']['speed'] = 350;
|
21 |
+
$options['display']['animation']['origin'] = 'center top';
|
22 |
+
|
23 |
+
$options['close']['overlay_click'] = 0;
|
24 |
+
$options['close']['esc_press'] = 1;
|
25 |
+
return $options;
|
26 |
+
}
|
27 |
+
|
28 |
+
add_action('emodal_model_theme_meta_defaults', 'emodal_model_theme_meta_core_defaults', 10);
|
29 |
+
function emodal_model_theme_meta_core_defaults($options){
|
30 |
+
$options['overlay']['background']['color'] = '#220E10';
|
31 |
+
$options['overlay']['background']['opacity'] = 85;
|
32 |
+
|
33 |
+
$options['container']['padding'] = 10;
|
34 |
+
$options['container']['background']['color'] = '#F7F5E7';
|
35 |
+
$options['container']['background']['opacity'] = 100;
|
36 |
+
$options['container']['border']['style'] = 'solid';
|
37 |
+
$options['container']['border']['color'] = '#f0532b';
|
38 |
+
$options['container']['border']['width'] = 1;
|
39 |
+
$options['container']['border']['radius'] = 8;
|
40 |
+
$options['container']['boxshadow']['inset'] = 'no';
|
41 |
+
$options['container']['boxshadow']['horizontal'] = 3;
|
42 |
+
$options['container']['boxshadow']['vertical'] = 3;
|
43 |
+
$options['container']['boxshadow']['blur'] = 2;
|
44 |
+
$options['container']['boxshadow']['spread'] = 0;
|
45 |
+
$options['container']['boxshadow']['color'] = '#000';
|
46 |
+
$options['container']['boxshadow']['opacity'] = 0.4;
|
47 |
+
|
48 |
+
$options['title']['font']['color'] = '#f0532b';
|
49 |
+
$options['title']['font']['size'] = 32;
|
50 |
+
$options['title']['font']['family'] = 'Tahoma';
|
51 |
+
$options['title']['text']['align'] = 'center';
|
52 |
+
$options['title']['textshadow']['horizontal'] = 0;
|
53 |
+
$options['title']['textshadow']['vertical'] = 0;
|
54 |
+
$options['title']['textshadow']['blur'] = 0;
|
55 |
+
$options['title']['textshadow']['color'] = '#000';
|
56 |
+
$options['title']['textshadow']['opacity'] = 0;
|
57 |
+
|
58 |
+
$options['content']['font']['color'] = '#f0532b';
|
59 |
+
$options['content']['font']['family'] = 'Times New Roman';
|
60 |
+
|
61 |
+
$options['close']['text'] = __('×', EMCORE_SLUG);
|
62 |
+
$options['close']['location'] = 'topright';
|
63 |
+
$options['close']['position']['top'] = 0;
|
64 |
+
$options['close']['position']['left'] = 0;
|
65 |
+
$options['close']['position']['bottom'] = 0;
|
66 |
+
$options['close']['position']['right'] = 0;
|
67 |
+
$options['close']['padding'] = 2;
|
68 |
+
$options['close']['background']['color'] = '#000';
|
69 |
+
$options['close']['background']['opacity'] = 100;
|
70 |
+
$options['close']['font']['color'] = '#f0532b';
|
71 |
+
$options['close']['font']['size'] = 16;
|
72 |
+
$options['close']['font']['family'] = 'Times New Roman';
|
73 |
+
$options['close']['border']['style'] = 'solid';
|
74 |
+
$options['close']['border']['color'] = '#fff';
|
75 |
+
$options['close']['border']['width'] = 1;
|
76 |
+
$options['close']['border']['radius'] = 10;
|
77 |
+
$options['close']['boxshadow']['inset'] = 'no';
|
78 |
+
$options['close']['boxshadow']['horizontal'] = 0;
|
79 |
+
$options['close']['boxshadow']['vertical'] = 0;
|
80 |
+
$options['close']['boxshadow']['blur'] = 0;
|
81 |
+
$options['close']['boxshadow']['spread'] = 0;
|
82 |
+
$options['close']['boxshadow']['color'] = '#000';
|
83 |
+
$options['close']['boxshadow']['opacity'] = 0;
|
84 |
+
$options['close']['textshadow']['horizontal'] = 0;
|
85 |
+
$options['close']['textshadow']['vertical'] = 0;
|
86 |
+
$options['close']['textshadow']['blur'] = 0;
|
87 |
+
$options['close']['textshadow']['color'] = '#000';
|
88 |
+
$options['close']['textshadow']['opacity'] = 0;
|
89 |
+
return $options;
|
90 |
+
}
|
91 |
+
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
|
97 |
+
add_filter('emodal_size_unit_options', 'emodal_core_size_unit_options',10);
|
98 |
+
function emodal_core_size_unit_options($options){
|
99 |
+
return array_merge($options, array(
|
100 |
+
// option => value
|
101 |
+
__('PX', EMCORE_SLUG) => 'px',
|
102 |
+
__('%', EMCORE_SLUG) => '%',
|
103 |
+
__('EM', EMCORE_SLUG) => 'em',
|
104 |
+
__('REM', EMCORE_SLUG) => 'rem',
|
105 |
+
));
|
106 |
+
}
|
107 |
+
|
108 |
+
add_filter('emodal_border_style_options', 'emodal_core_border_style_options',10);
|
109 |
+
function emodal_core_border_style_options($options){
|
110 |
+
return array_merge($options, array(
|
111 |
+
// option => value
|
112 |
+
__('None', EMCORE_SLUG) => 'none',
|
113 |
+
__('Solid', EMCORE_SLUG) => 'solid',
|
114 |
+
__('Dotted', EMCORE_SLUG) => 'dotted',
|
115 |
+
__('Dashed', EMCORE_SLUG) => 'dashed',
|
116 |
+
__('Double', EMCORE_SLUG) => 'double',
|
117 |
+
__('Groove', EMCORE_SLUG) => 'groove',
|
118 |
+
__('Inset', EMCORE_SLUG) => 'inset',
|
119 |
+
__('Outset', EMCORE_SLUG) => 'outset',
|
120 |
+
__('Ridge', EMCORE_SLUG) => 'ridge',
|
121 |
+
));
|
122 |
+
}
|
123 |
+
|
124 |
+
add_filter('emodal_font_family_options', 'emodal_core_font_family_options',10);
|
125 |
+
function emodal_core_font_family_options($options){
|
126 |
+
return array_merge($options, array(
|
127 |
+
// option => value
|
128 |
+
__('Sans-Serif', EMCORE_SLUG) => 'Sans-Serif',
|
129 |
+
__('Tahoma', EMCORE_SLUG) => 'Tahoma',
|
130 |
+
__('Georgia', EMCORE_SLUG) => 'Georgia',
|
131 |
+
__('Comic Sans MS', EMCORE_SLUG) => 'Comic Sans MS',
|
132 |
+
__('Arial', EMCORE_SLUG) => 'Arial',
|
133 |
+
__('Lucida Grande', EMCORE_SLUG) => 'Lucida Grande',
|
134 |
+
__('Times New Roman', EMCORE_SLUG) => 'Times New Roman',
|
135 |
+
));
|
136 |
+
}
|
137 |
+
|
138 |
+
add_filter('emodal_text_align_options', 'emodal_core_text_align_options',10);
|
139 |
+
function emodal_core_text_align_options($options){
|
140 |
+
return array_merge($options, array(
|
141 |
+
// option => value
|
142 |
+
__('Left', EMCORE_SLUG) => 'left',
|
143 |
+
__('Center', EMCORE_SLUG) => 'center',
|
144 |
+
__('Right', EMCORE_SLUG) => 'right'
|
145 |
+
));
|
146 |
+
}
|
147 |
+
|
148 |
+
|
149 |
+
add_filter('emodal_modal_display_size_options', 'emodal_dropdown_divider',20);
|
150 |
+
function emodal_dropdown_divider($options){
|
151 |
+
return array_merge($options, array(
|
152 |
+
// value => option
|
153 |
+
__('-----------------------') => ''
|
154 |
+
));
|
155 |
+
}
|
156 |
+
|
157 |
+
add_filter('emodal_modal_display_size_options', 'emodal_modal_display_size_options_responsive',10);
|
158 |
+
function emodal_modal_display_size_options_responsive($options){
|
159 |
+
return array_merge($options, array(
|
160 |
+
// option => value
|
161 |
+
__('Auto', EMCORE_SLUG) => 'auto',
|
162 |
+
__('Responsive', EMCORE_SLUG) => '',
|
163 |
+
__('Normal', EMCORE_SLUG) => 'normal',
|
164 |
+
__('Nano', EMCORE_SLUG) => 'nano',
|
165 |
+
__('Tiny', EMCORE_SLUG) => 'tiny',
|
166 |
+
__('Small', EMCORE_SLUG) => 'small',
|
167 |
+
__('Medium', EMCORE_SLUG) => 'medium',
|
168 |
+
__('Large', EMCORE_SLUG) => 'large',
|
169 |
+
__('X Large', EMCORE_SLUG) => 'x-large'
|
170 |
+
));
|
171 |
+
}
|
172 |
+
|
173 |
+
add_filter('emodal_modal_display_size_options', 'emodal_modal_display_size_options_nonresponsive',30);
|
174 |
+
function emodal_modal_display_size_options_nonresponsive($options){
|
175 |
+
return array_merge($options, array(
|
176 |
+
// value => option
|
177 |
+
'<strong>' . __('Non-Responsive', EMCORE_SLUG) . '</strong>' => '',
|
178 |
+
__('Custom', EMCORE_SLUG) => 'custom',
|
179 |
+
));
|
180 |
+
}
|
181 |
+
|
182 |
+
|
183 |
+
add_filter('emodal_modal_display_animation_type_options', 'emodal_core_modal_display_animation_type_options',10);
|
184 |
+
function emodal_core_modal_display_animation_type_options($options){
|
185 |
+
return array_merge($options, array(
|
186 |
+
// option => value
|
187 |
+
__('None', EMCORE_SLUG) => 'none',
|
188 |
+
__('Slide', EMCORE_SLUG) => 'slide',
|
189 |
+
__('Fade', EMCORE_SLUG) => 'fade',
|
190 |
+
__('Fade and Slide', EMCORE_SLUG) => 'fadeAndSlide',
|
191 |
+
__('Grow', EMCORE_SLUG) => 'grow',
|
192 |
+
__('Grow and Slide', EMCORE_SLUG) => 'growAndSlide',
|
193 |
+
));
|
194 |
+
}
|
195 |
+
|
196 |
+
|
197 |
+
add_filter('emodal_modal_display_animation_origin_options', 'emodal_core_modal_display_animation_origins_options',10);
|
198 |
+
function emodal_core_modal_display_animation_origins_options($options){
|
199 |
+
return array_merge($options, array(
|
200 |
+
// option => value
|
201 |
+
__('Top', EMCORE_SLUG) => 'top',
|
202 |
+
__('Left', EMCORE_SLUG) => 'left',
|
203 |
+
__('Bottom', EMCORE_SLUG) => 'bottom',
|
204 |
+
__('Right', EMCORE_SLUG) => 'right',
|
205 |
+
__('Top Left', EMCORE_SLUG) => 'left top',
|
206 |
+
__('Top Center', EMCORE_SLUG) => 'center top',
|
207 |
+
__('Top Right', EMCORE_SLUG) => 'right top',
|
208 |
+
__('Middle Left', EMCORE_SLUG) => 'left center',
|
209 |
+
__('Middle Center', EMCORE_SLUG) => 'center center',
|
210 |
+
__('Middle Right', EMCORE_SLUG) => 'right center',
|
211 |
+
__('Bottom Left', EMCORE_SLUG) => 'left bottom',
|
212 |
+
__('Bottom Center', EMCORE_SLUG) => 'center bottom',
|
213 |
+
__('Bottom Right', EMCORE_SLUG) => 'right bottom',
|
214 |
+
//__('Mouse', EMCORE_SLUG) => 'mouse',
|
215 |
+
));
|
216 |
+
}
|
217 |
+
|
218 |
+
add_filter('emodal_modal_display_location_options', 'emodal_core_modal_display_location_options',10);
|
219 |
+
function emodal_core_modal_display_location_options($options){
|
220 |
+
return array_merge($options, array(
|
221 |
+
// option => value
|
222 |
+
__('Top Left', EMCORE_SLUG) => 'left top',
|
223 |
+
__('Top Center', EMCORE_SLUG) => 'center top',
|
224 |
+
__('Top Right', EMCORE_SLUG) => 'right top',
|
225 |
+
__('Middle Left', EMCORE_SLUG) => 'left center',
|
226 |
+
__('Middle Center', EMCORE_SLUG) => 'center ',
|
227 |
+
__('Middle Right', EMCORE_SLUG) => 'right center',
|
228 |
+
__('Bottom Left', EMCORE_SLUG) => 'left bottom',
|
229 |
+
__('Bottom Center', EMCORE_SLUG) => 'center bottom',
|
230 |
+
__('Bottom Right', EMCORE_SLUG) => 'right bottom',
|
231 |
+
));
|
232 |
+
}
|
233 |
+
|
234 |
+
add_filter('emodal_theme_close_location_options', 'emodal_core_theme_close_location_options',10);
|
235 |
+
function emodal_core_theme_close_location_options($options){
|
236 |
+
return array_merge($options, array(
|
237 |
+
// option => value
|
238 |
+
__('Top Left', EMCORE_SLUG) => 'topleft',
|
239 |
+
__('Top Right', EMCORE_SLUG) => 'topright',
|
240 |
+
__('Bottom Left', EMCORE_SLUG) => 'bottomleft',
|
241 |
+
__('Bottom Right', EMCORE_SLUG) => 'bottomright',
|
242 |
+
));
|
243 |
+
}
|
includes/admin/postmeta.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_action('emodal_post_meta_box', 'emodal_post_meta_box_setting_table_open', 0);
|
3 |
+
function emodal_post_meta_box_setting_table_open($object)
|
4 |
+
{?>
|
5 |
+
<table class="form-table">
|
6 |
+
<tbody><?php
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_post_meta_box', 'emodal_post_meta_box_setting_load', 1);
|
10 |
+
function emodal_post_meta_box_setting_load($object)
|
11 |
+
{
|
12 |
+
$current_modals = get_post_meta($object->ID, EMCORE_SLUG.'_post_modals', true);
|
13 |
+
$modals = get_all_modals("is_active = 1 AND is_sitewide = 0");
|
14 |
+
wp_nonce_field( EMCORE_NONCE, EMCORE_NONCE);?>
|
15 |
+
<?php if(count($modals)):?>
|
16 |
+
<tr>
|
17 |
+
<th scope="row">
|
18 |
+
<label><?php _e('Select which modals to load', EMCORE_SLUG);?></label>
|
19 |
+
</th>
|
20 |
+
<td>
|
21 |
+
<div class="scrollable-checkboxes" style="padding:5px 10px;border:1px solid #eee;max-height:200px;overflow-y:scroll;">
|
22 |
+
<?php foreach($modals as $modal):?>
|
23 |
+
<label class="selectit"><input type="checkbox" name="emodal_post_modals[]" value="<?php esc_attr_e($modal->id);?>"<?php esc_attr_e(is_array($current_modals) && in_array($modal->id,$current_modals) ? ' checked="checked"' : '');?>> <?php esc_html_e($modal->name);?></label><br/>
|
24 |
+
<?php endforeach;?>
|
25 |
+
</div>
|
26 |
+
<p class="description"><?php _e('Choose witch modal will be loaded on this page.', EMCORE_SLUG)?></p>
|
27 |
+
</td>
|
28 |
+
</tr>
|
29 |
+
<?php endif;
|
30 |
+
}
|
31 |
+
|
32 |
+
add_action('emodal_post_meta_box', 'emodal_post_meta_box_setting_table_close', 1000);
|
33 |
+
function emodal_post_meta_box_setting_table_close($object)
|
34 |
+
{?>
|
35 |
+
</tbody>
|
36 |
+
</table><?php
|
37 |
+
}
|
38 |
+
|
includes/admin/settings-form-general-tab.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_settings_form_tabs', 'emodal_admin_settings_general_tab', 10);
|
3 |
+
function emodal_admin_settings_general_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'general', 'label' => __('General', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_admin_settings_form_tab_general', 'emodal_admin_settings_form_general_tab', 20);
|
10 |
+
function emodal_admin_settings_form_general_tab()
|
11 |
+
{
|
12 |
+
?><table class="form-table">
|
13 |
+
<tbody>
|
14 |
+
<?php do_action('emodal_admin_settings_form_tab_general_settings');?>
|
15 |
+
</tbody>
|
16 |
+
</table><?php
|
17 |
+
}
|
18 |
+
|
19 |
+
|
20 |
+
add_action('emodal_admin_settings_form_tab_general_settings', 'emodal_admin_settings_form_general_tab_license', 10);
|
21 |
+
function emodal_admin_settings_form_general_tab_license()
|
22 |
+
{?>
|
23 |
+
<tr class="form-field">
|
24 |
+
<th scope="row">
|
25 |
+
<label for="license_key"><?php _e('License Key', EMCORE_SLUG);?></label>
|
26 |
+
</th>
|
27 |
+
<td>
|
28 |
+
<input type="<?php echo emodal_get_license('key') ? 'password' : 'text'?>" id="license_key" name="license[key]" value="<?php esc_attr_e(emodal_get_license('key'))?>" class="regular-text"/>
|
29 |
+
<p class="description"><?php _e( emodal_get_license('status.message') ? emodal_get_license('status.message') : 'Enter a key to unlock Easy Modal Pro.',EMCORE_SLUG)?></p>
|
30 |
+
<?php if(emodal_get_license('status.valid')){?>
|
31 |
+
<p class="description expires"><?php echo '<strong>'.__('Expiration Date: ' , EMCORE_SLUG) .'</strong>'. emodal_get_license('status.expires');?></p>
|
32 |
+
<p class="description domains"><?php echo '<strong>'.__('Domains Using this License: ' , EMCORE_SLUG) .'</strong>'. emodal_get_license('status.domains');?></p>
|
33 |
+
<?php }?>
|
34 |
+
</td>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
<td colspan="2">
|
38 |
+
<?php
|
39 |
+
$box_src = EMCORE_URL.'/assets/images/admin/box-shot';
|
40 |
+
if(emodal_get_license('status.valid') && emodal_get_license('status.license_type') > 0)
|
41 |
+
{
|
42 |
+
if(intval(emodal_get_license('status.license_type')) === 2)
|
43 |
+
{
|
44 |
+
$box_src .= '-developer';
|
45 |
+
}
|
46 |
+
elseif(intval(emodal_get_license('status.license_type')) === 1)
|
47 |
+
{
|
48 |
+
$box_src .= '-pro';
|
49 |
+
}
|
50 |
+
}?>
|
51 |
+
<img style="max-width:623px;width:100%;" src="<?php esc_attr_e($box_src.'.jpg');?>"/>
|
52 |
+
</td>
|
53 |
+
</tr><?php
|
54 |
+
}
|
includes/admin/sidebar.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<?php
|
3 |
+
add_action('emodal_admin_sidebar', 'emodal_admin_sidebar_share', 10);
|
4 |
+
function emodal_admin_sidebar_share()
|
5 |
+
{?>
|
6 |
+
<h3 class="loveit-shareit" style="text-align:center">Love It? <span>Share It!</span></h3>
|
7 |
+
<ul class="share-buttons">
|
8 |
+
<li><div class="fb-like" data-href="http://easy-modal.com" data-width="100" data-layout="box_count" data-action="like" data-show-faces="false" data-send="true"></div></li>
|
9 |
+
<li><a href="https://twitter.com/intent/tweet" class="twitter-share-button" data-count="vertical" data-url="http://easy-modal.com" data-via="wizard_is" data-related="wizard_is">Tweet</a></li>
|
10 |
+
<li><div class="g-plusone" data-href="http://easy-modal.com" data-size="tall"></div></li>
|
11 |
+
</ul>
|
12 |
+
<br class="clear" />
|
13 |
+
<br class="clear" />
|
14 |
+
<div style="text-align:center">
|
15 |
+
<a class="button rounded" href="http://wordpress.org/support/view/plugin-reviews/easy-modal#postform">Rate us on WordPress!</a>
|
16 |
+
</div><?php
|
17 |
+
}
|
18 |
+
|
19 |
+
add_action('emodal_admin_sidebar', 'emodal_admin_sidebar_documentation', 20);
|
20 |
+
function emodal_admin_sidebar_documentation()
|
21 |
+
{?>
|
22 |
+
<a href="http://easy-modal.com/documentation?utm_source=emcore&utm_medium=dashboard+link&utm_campaign=documentation" target="_blank">
|
23 |
+
<img src="<?php echo EMCORE_URL;?>/assets/images/admin/sidebar-documentation.jpg" alt="Easy Modal Documentation" />
|
24 |
+
</a><?php
|
25 |
+
}
|
26 |
+
|
27 |
+
add_action('emodal_admin_sidebar', 'emodal_admin_sidebar_upgrade', 30);
|
28 |
+
function emodal_admin_sidebar_upgrade()
|
29 |
+
{?>
|
30 |
+
<hr/>
|
31 |
+
<p class="emodal-feature-list" style="text-align:center">
|
32 |
+
More & Extended Features<br/>
|
33 |
+
Unlimited Themes <span>·</span> Exclusive Add Ons<br/>
|
34 |
+
Exclusive Themes <span>·</span> Priority Support<br/>
|
35 |
+
<img src="<?php echo EMCORE_URL;?>/assets/images/admin/sidebar-logo.png" alt="Easy Modal Pro" /><br/>
|
36 |
+
<a href="https://easy-modal.com/pricing" class="btn" target="_blank">Upgrade</a><br/>
|
37 |
+
<a href="http://easy-modal.com" target="_blank">See what you’re missing out on</a>
|
38 |
+
</p><?php
|
39 |
+
}
|
40 |
+
|
41 |
+
add_action('emodal_admin_sidebar', 'emodal_admin_sidebar_follow', 50);
|
42 |
+
function emodal_admin_sidebar_follow()
|
43 |
+
{?>
|
44 |
+
<div class="follow-box">
|
45 |
+
<a href="https://twitter.com/EasyModal" class="twitter-follow-button" data-show-count="true" data-show-screen-name="true" data-size="medium" data-lang="en">Follow Us</a><br />
|
46 |
+
<div class="fb-like" data-href="https://facebook.com/EasyModal" data-send="false" data-width="100px" data-show-faces="false"></div>
|
47 |
+
</div><?php
|
48 |
+
}
|
includes/admin/theme-form-close-tab.php
ADDED
@@ -0,0 +1,359 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_theme_form_tabs', 'emodal_admin_theme_form_close_tab', 70);
|
3 |
+
function emodal_admin_theme_form_close_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'close', 'label' => __('Close', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_admin_theme_form_tab_close', 'emodal_admin_theme_form_close_tab_settings', 10);
|
10 |
+
function emodal_admin_theme_form_close_tab_settings()
|
11 |
+
{
|
12 |
+
?><table class="form-table">
|
13 |
+
<tbody>
|
14 |
+
<?php do_action('emodal_admin_theme_form_tab_close_settings');?>
|
15 |
+
</tbody>
|
16 |
+
</table><?php
|
17 |
+
}
|
18 |
+
|
19 |
+
add_action('emodal_admin_theme_form_tab_close_settings', 'emodal_admin_theme_form_close_tab_settings_text', 10);
|
20 |
+
function emodal_admin_theme_form_close_tab_settings_text()
|
21 |
+
{
|
22 |
+
?><tr>
|
23 |
+
<th scope="row">
|
24 |
+
<label for="close_text"><?php _e('Text', EMCORE_SLUG);?></label>
|
25 |
+
</th>
|
26 |
+
<td>
|
27 |
+
<input type="text" name="theme[meta][close][text]" id="close_text" value="<?php esc_attr_e(get_current_modal_theme('meta.close.text'))?>" />
|
28 |
+
<p class="description"><?php _e('Enter the close button text.', EMCORE_SLUG)?></p>
|
29 |
+
</td>
|
30 |
+
</tr><?php
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
add_action('emodal_admin_theme_form_tab_close_settings', 'emodal_admin_theme_form_close_tab_settings_padding', 20);
|
35 |
+
function emodal_admin_theme_form_close_tab_settings_padding()
|
36 |
+
{
|
37 |
+
?><tr>
|
38 |
+
<th scope="row">
|
39 |
+
<label for="close_padding"><?php _e('Padding', EMCORE_SLUG);?></label>
|
40 |
+
</th>
|
41 |
+
<td>
|
42 |
+
<input type="range" name="theme[meta][close][padding]" id="close_padding" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.padding'))?>" />
|
43 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.padding'));?></span>px</span>
|
44 |
+
</td>
|
45 |
+
</tr><?php
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
add_action('emodal_admin_theme_form_tab_close_settings', 'emodal_admin_theme_form_close_tab_settings_location', 30);
|
50 |
+
function emodal_admin_theme_form_close_tab_settings_location()
|
51 |
+
{
|
52 |
+
?><tr>
|
53 |
+
<th scope="row">
|
54 |
+
<label for="close_location"><?php _e('Location', EMCORE_SLUG);?></label>
|
55 |
+
</th>
|
56 |
+
<td>
|
57 |
+
<select name="theme[meta][close][location]" id="close_location">
|
58 |
+
<?php foreach(apply_filters('emodal_theme_close_location_options', array()) as $option => $value) : ?>
|
59 |
+
<option
|
60 |
+
value="<?php echo $value;?>"
|
61 |
+
<?php echo $value == get_current_modal_theme('meta.close.location') ? ' selected="selected"' : '';?>
|
62 |
+
><?php echo $option;?></option>
|
63 |
+
<?php endforeach ?>
|
64 |
+
</select>
|
65 |
+
<p class="description"><?php _e('Choose which corner the close button will be positioned.', EMCORE_SLUG)?></p>
|
66 |
+
</td>
|
67 |
+
</tr>
|
68 |
+
<tr class="title-divider">
|
69 |
+
<th colspan="2"><h3 class="title"><?php _e('Position', EMCORE_SLUG);?></h3></th>
|
70 |
+
</tr>
|
71 |
+
<tr class="topright topleft">
|
72 |
+
<th scope="row">
|
73 |
+
<label for="close_position_top"><?php _e('Top', EMCORE_SLUG);?></label>
|
74 |
+
</th>
|
75 |
+
<td>
|
76 |
+
<input type="range" name="theme[meta][close][position][top]" id="close_position_top" min="-100" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.position.top'))?>" />
|
77 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.position.top'));?></span>px</span>
|
78 |
+
</td>
|
79 |
+
</tr>
|
80 |
+
<tr class="topleft bottomleft">
|
81 |
+
<th scope="row">
|
82 |
+
<label for="close_position_left"><?php _e('Left', EMCORE_SLUG);?></label>
|
83 |
+
</th>
|
84 |
+
<td>
|
85 |
+
<input type="range" name="theme[meta][close][position][left]" id="close_position_left" min="-100" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.position.left'))?>" />
|
86 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.position.left'));?></span>px</span>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
<tr class="bottomleft bottomright">
|
90 |
+
<th scope="row">
|
91 |
+
<label for="close_position_bottom"><?php _e('Bottom', EMCORE_SLUG);?></label>
|
92 |
+
</th>
|
93 |
+
<td>
|
94 |
+
<input type="range" name="theme[meta][close][position][bottom]" id="close_position_bottom" min="-100" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.position.bottom'))?>" />
|
95 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.position.bottom'));?></span>px</span>
|
96 |
+
</td>
|
97 |
+
</tr>
|
98 |
+
<tr class="topright bottomright">
|
99 |
+
<th scope="row">
|
100 |
+
<label for="close_position_right"><?php _e('Right', EMCORE_SLUG);?></label>
|
101 |
+
</th>
|
102 |
+
<td>
|
103 |
+
<input type="range" name="theme[meta][close][position][right]" id="close_position_right" min="-100" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.position.right'))?>" />
|
104 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.position.right'));?></span>px</span>
|
105 |
+
</td>
|
106 |
+
</tr><?php
|
107 |
+
}
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
add_action('emodal_admin_theme_form_tab_close_settings', 'emodal_admin_theme_form_close_tab_settings_font', 40);
|
112 |
+
function emodal_admin_theme_form_close_tab_settings_font()
|
113 |
+
{
|
114 |
+
?><tr class="title-divider">
|
115 |
+
<th colspan="2"><h3 class="title"><?php _e('Font', EMCORE_SLUG);?></h3></th>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<th scope="row">
|
119 |
+
<label for="close_font_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
120 |
+
</th>
|
121 |
+
<td>
|
122 |
+
<input type="text" name="theme[meta][close][font][color]" id="close_font_color" value="<?php esc_attr_e(get_current_modal_theme('meta.close.font.color'))?>" class="color-picker" />
|
123 |
+
</td>
|
124 |
+
</tr>
|
125 |
+
|
126 |
+
<tr>
|
127 |
+
<th scope="row">
|
128 |
+
<label for="close_font_size"><?php _e('Size', EMCORE_SLUG);?></label>
|
129 |
+
</th>
|
130 |
+
<td>
|
131 |
+
<input type="range" name="theme[meta][close][font][size]" id="close_font_size" min="8" max="32" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.font.size'))?>" />
|
132 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.font.size'));?></span>px</span>
|
133 |
+
</td>
|
134 |
+
</tr>
|
135 |
+
<tr>
|
136 |
+
<th scope="row">
|
137 |
+
<label for="close_font_family"><?php _e('Family', EMCORE_SLUG);?></label>
|
138 |
+
</th>
|
139 |
+
<td>
|
140 |
+
<select name="theme[meta][close][font][family]" id="close_font_family">
|
141 |
+
<?php foreach(apply_filters('emodal_font_family_options', array()) as $option => $value) : ?>
|
142 |
+
<option
|
143 |
+
value="<?php echo $value;?>"
|
144 |
+
<?php echo $value == get_current_modal_theme('meta.close.font.family') ? ' selected="selected"' : '';?>
|
145 |
+
><?php echo $option;?></option>
|
146 |
+
<?php endforeach ?>
|
147 |
+
</select>
|
148 |
+
</td>
|
149 |
+
</tr><?php
|
150 |
+
}
|
151 |
+
|
152 |
+
|
153 |
+
add_action('emodal_admin_theme_form_tab_close_settings', 'emodal_admin_theme_form_close_tab_settings_background', 50);
|
154 |
+
function emodal_admin_theme_form_close_tab_settings_background()
|
155 |
+
{
|
156 |
+
?><tr class="title-divider">
|
157 |
+
<th colspan="2"><h3 class="title"><?php _e('Background', EMCORE_SLUG);?></ h3></th>
|
158 |
+
</tr>
|
159 |
+
<tr>
|
160 |
+
<th scope="row">
|
161 |
+
<label for="close_background_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
162 |
+
</th>
|
163 |
+
<td>
|
164 |
+
<input type="text" name="theme[meta][close][background][color]" id="close_background_color" value="<?php esc_attr_e(get_current_modal_theme('meta.close.background.color'))?>" class="color-picker background-color" />
|
165 |
+
</td>
|
166 |
+
</tr>
|
167 |
+
<tr class="background-opacity">
|
168 |
+
<th scope="row">
|
169 |
+
<label for="close_background_opacity"><?php _e('Opacity', EMCORE_SLUG);?></label>
|
170 |
+
</th>
|
171 |
+
<td>
|
172 |
+
<input type="range" name="theme[meta][close][background][opacity]" id="close_background_opacity" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.background.opacity'))?>" />
|
173 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.background.opacity'));?></span>px</span>
|
174 |
+
</td>
|
175 |
+
</tr><?php
|
176 |
+
}
|
177 |
+
|
178 |
+
|
179 |
+
|
180 |
+
add_action('emodal_admin_theme_form_tab_close_settings', 'emodal_admin_theme_form_close_tab_settings_border', 60);
|
181 |
+
function emodal_admin_theme_form_close_tab_settings_border()
|
182 |
+
{
|
183 |
+
?><tr class="title-divider">
|
184 |
+
<th colspan="2"><h3 class="title"><?php _e('Border', EMCORE_SLUG);?></h3></th>
|
185 |
+
</tr>
|
186 |
+
<tr>
|
187 |
+
<th scope="row">
|
188 |
+
<label for="close_border_radius"><?php _e('Radius', EMCORE_SLUG);?></label>
|
189 |
+
</th>
|
190 |
+
<td>
|
191 |
+
<input type="range" name="theme[meta][close][border][radius]" id="close_border_radius" min="0" max="28" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.border.radius'))?>" />
|
192 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.border.radius'));?></span>px</span>
|
193 |
+
<p class="description"><?php _e('Choose a corner radius for your close button.',EMCORE_SLUG)?></p>
|
194 |
+
</td>
|
195 |
+
</tr>
|
196 |
+
<tr>
|
197 |
+
<th scope="row">
|
198 |
+
<label for="close_border_style"><?php _e('Style', EMCORE_SLUG);?></label>
|
199 |
+
</th>
|
200 |
+
<td>
|
201 |
+
<select name="theme[meta][close][border][style]" id="close_border_style" class="border-style">
|
202 |
+
<?php foreach(apply_filters('emodal_border_style_options', array()) as $option => $value) : ?>
|
203 |
+
<option
|
204 |
+
value="<?php echo $value;?>"
|
205 |
+
<?php echo $value == get_current_modal_theme('meta.close.border.style') ? ' selected="selected"' : '';?>
|
206 |
+
><?php echo $option;?></option>
|
207 |
+
<?php endforeach ?>
|
208 |
+
</select>
|
209 |
+
<p class="description"><?php _e('Choose a border style for your close button.', EMCORE_SLUG)?></p>
|
210 |
+
</td>
|
211 |
+
</tr>
|
212 |
+
<tr class="border-options">
|
213 |
+
<th scope="row">
|
214 |
+
<label for="close_border_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
215 |
+
</th>
|
216 |
+
<td>
|
217 |
+
<input type="text" name="theme[meta][close][border][color]" id="close_border_color" value="<?php esc_attr_e(get_current_modal_theme('meta.close.border.color'))?>" class="color-picker" />
|
218 |
+
</td>
|
219 |
+
</tr>
|
220 |
+
<tr class="border-options">
|
221 |
+
<th scope="row">
|
222 |
+
<label for="close_border_width"><?php _e('Thickness', EMCORE_SLUG);?></label>
|
223 |
+
</th>
|
224 |
+
<td>
|
225 |
+
<input type="range" name="theme[meta][close][border][width]" id="close_border_width" min="0" max="5" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.border.width'))?>" />
|
226 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.border.width'));?></span>px</span>
|
227 |
+
</td>
|
228 |
+
</tr><?php
|
229 |
+
}
|
230 |
+
|
231 |
+
|
232 |
+
add_action('emodal_admin_theme_form_tab_close_settings', 'emodal_admin_theme_form_close_tab_settings_boxshadow', 70);
|
233 |
+
function emodal_admin_theme_form_close_tab_settings_boxshadow()
|
234 |
+
{
|
235 |
+
?><tr class="title-divider">
|
236 |
+
<th colspan="2"><h3 class="title"><?php _e('Drop Shadow', EMCORE_SLUG);?></h3></th>
|
237 |
+
</tr>
|
238 |
+
<tr>
|
239 |
+
<th scope="row">
|
240 |
+
<label for="close_boxshadow_inset"><?php _e('Inset', EMCORE_SLUG);?></label>
|
241 |
+
</th>
|
242 |
+
<td>
|
243 |
+
<select name="theme[meta][close][boxshadow][inset]" id="close_boxshadow_inset">
|
244 |
+
<?php foreach(array(__('Yes', EMCORE_SLUG) => 'yes', __('No', EMCORE_SLUG) => 'no') as $option => $value) : ?>
|
245 |
+
<option
|
246 |
+
value="<?php echo $value;?>"
|
247 |
+
<?php echo $value == get_current_modal_theme('meta.close.boxshadow.inset') ? ' selected="selected"' : '';?>
|
248 |
+
><?php echo $option;?></option>
|
249 |
+
<?php endforeach ?>
|
250 |
+
</select>
|
251 |
+
<p class="description"><?php _e('Set the box shadow to inset (inner shadow).', EMCORE_SLUG)?></p>
|
252 |
+
</td>
|
253 |
+
</tr>
|
254 |
+
<tr>
|
255 |
+
<th scope="row">
|
256 |
+
<label for="close_boxshadow_horizontal"><?php _e('Horizontal Position', EMCORE_SLUG);?></label>
|
257 |
+
</th>
|
258 |
+
<td>
|
259 |
+
<input type="range" name="theme[meta][close][boxshadow][horizontal]" id="close_boxshadow_horizontal" min="-50" max="50" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.boxshadow.horizontal'))?>" />
|
260 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.boxshadow.horizontal'));?></span>px</span>
|
261 |
+
</td>
|
262 |
+
</tr>
|
263 |
+
<tr>
|
264 |
+
<th scope="row">
|
265 |
+
<label for="close_boxshadow_vertical"><?php _e('Vertical Position', EMCORE_SLUG);?></label>
|
266 |
+
</th>
|
267 |
+
<td>
|
268 |
+
<input type="range" name="theme[meta][close][boxshadow][vertical]" id="close_boxshadow_vertical" min="-50" max="50" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.boxshadow.vertical'))?>" />
|
269 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.boxshadow.vertical'));?></span>px</span>
|
270 |
+
</td>
|
271 |
+
</tr>
|
272 |
+
<tr>
|
273 |
+
<th scope="row">
|
274 |
+
<label for="close_boxshadow_blur"><?php _e('Blur Radius', EMCORE_SLUG);?></label>
|
275 |
+
</th>
|
276 |
+
<td>
|
277 |
+
<input type="range" name="theme[meta][close][boxshadow][blur]" id="close_boxshadow_blur" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.boxshadow.blur'))?>" />
|
278 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.boxshadow.blur'));?></span>px</span>
|
279 |
+
</td>
|
280 |
+
</tr>
|
281 |
+
<tr>
|
282 |
+
<th scope="row">
|
283 |
+
<label for="close_boxshadow_spread"><?php _e('Spread', EMCORE_SLUG);?></label>
|
284 |
+
</th>
|
285 |
+
<td>
|
286 |
+
<input type="range" name="theme[meta][close][boxshadow][spread]" id="close_boxshadow_spread" min="-100" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.boxshadow.spread'))?>" />
|
287 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.boxshadow.spread'));?></span>px</span>
|
288 |
+
</td>
|
289 |
+
</tr>
|
290 |
+
<tr>
|
291 |
+
<th scope="row">
|
292 |
+
<label for="close_boxshadow_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
293 |
+
</th>
|
294 |
+
<td>
|
295 |
+
<input type="text" name="theme[meta][close][boxshadow][color]" id="close_boxshadow_color" value="<?php esc_attr_e(get_current_modal_theme('meta.close.boxshadow.color'))?>" class="color-picker boxshadow-color" />
|
296 |
+
</td>
|
297 |
+
</tr>
|
298 |
+
<tr>
|
299 |
+
<th scope="row">
|
300 |
+
<label for="close_boxshadow_opacity"><?php _e('Opacity', EMCORE_SLUG);?></label>
|
301 |
+
</th>
|
302 |
+
<td>
|
303 |
+
<input type="range" name="theme[meta][close][boxshadow][opacity]" id="close_boxshadow_opacity" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.boxshadow.opacity'))?>" />
|
304 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.boxshadow.opacity'));?></span>%</span>
|
305 |
+
</td>
|
306 |
+
</tr><?php
|
307 |
+
}
|
308 |
+
|
309 |
+
add_action('emodal_admin_theme_form_tab_close_settings', 'emodal_admin_theme_form_close_tab_settings_textshadow', 80);
|
310 |
+
function emodal_admin_theme_form_close_tab_settings_textshadow()
|
311 |
+
{
|
312 |
+
?><tr class="title-divider">
|
313 |
+
<th colspan="2"><h3 class="title"><?php _e('Text Shadow', EMCORE_SLUG);?></h3></th>
|
314 |
+
</tr>
|
315 |
+
<tr>
|
316 |
+
<th scope="row">
|
317 |
+
<label for="close_textshadow_horizontal"><?php _e('Horizontal Position', EMCORE_SLUG);?></label>
|
318 |
+
</th>
|
319 |
+
<td>
|
320 |
+
<input type="range" name="theme[meta][close][textshadow][horizontal]" id="close_textshadow_horizontal" min="-50" max="50" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.textshadow.horizontal'))?>" />
|
321 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.textshadow.horizontal'));?></span>px</span>
|
322 |
+
</td>
|
323 |
+
</tr>
|
324 |
+
<tr>
|
325 |
+
<th scope="row">
|
326 |
+
<label for="close_textshadow_vertical"><?php _e('Vertical Position', EMCORE_SLUG);?></label>
|
327 |
+
</th>
|
328 |
+
<td>
|
329 |
+
<input type="range" name="theme[meta][close][textshadow][vertical]" id="close_textshadow_vertical" min="-50" max="50" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.textshadow.vertical'))?>" />
|
330 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.textshadow.vertical'));?></span>px</span>
|
331 |
+
</td>
|
332 |
+
</tr>
|
333 |
+
<tr>
|
334 |
+
<th scope="row">
|
335 |
+
<label for="close_textshadow_blur"><?php _e('Blur Radius', EMCORE_SLUG);?></label>
|
336 |
+
</th>
|
337 |
+
<td>
|
338 |
+
<input type="range" name="theme[meta][close][textshadow][blur]" id="close_textshadow_blur" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.textshadow.blur'))?>" />
|
339 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.textshadow.blur'));?></span>px</span>
|
340 |
+
</td>
|
341 |
+
</tr>
|
342 |
+
<tr>
|
343 |
+
<th scope="row">
|
344 |
+
<label for="close_textshadow_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
345 |
+
</th>
|
346 |
+
<td>
|
347 |
+
<input type="text" name="theme[meta][close][textshadow][color]" id="close_textshadow_color" value="<?php esc_attr_e(get_current_modal_theme('meta.close.textshadow.color'))?>" class="color-picker textshadow-color" />
|
348 |
+
</td>
|
349 |
+
</tr>
|
350 |
+
<tr>
|
351 |
+
<th scope="row">
|
352 |
+
<label for="close_textshadow_opacity"><?php _e('Opacity', EMCORE_SLUG);?></label>
|
353 |
+
</th>
|
354 |
+
<td>
|
355 |
+
<input type="range" name="theme[meta][close][textshadow][opacity]" id="close_textshadow_opacity" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.close.textshadow.opacity'))?>" />
|
356 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.close.textshadow.opacity'));?></span>%</span>
|
357 |
+
</td>
|
358 |
+
</tr><?php
|
359 |
+
}
|
includes/admin/theme-form-container-tab.php
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_theme_form_tabs', 'emodal_admin_theme_form_container_tab', 40);
|
3 |
+
function emodal_admin_theme_form_container_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'container', 'label' => __('Container', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_admin_theme_form_tab_container', 'emodal_admin_theme_form_container_tab_settings', 10);
|
10 |
+
function emodal_admin_theme_form_container_tab_settings()
|
11 |
+
{
|
12 |
+
?><table class="form-table">
|
13 |
+
<tbody>
|
14 |
+
<?php do_action('emodal_admin_theme_form_tab_container_settings');?>
|
15 |
+
</tbody>
|
16 |
+
</table><?php
|
17 |
+
}
|
18 |
+
|
19 |
+
|
20 |
+
add_action('emodal_admin_theme_form_tab_container_settings', 'emodal_admin_theme_form_container_tab_settings_padding', 10);
|
21 |
+
function emodal_admin_theme_form_container_tab_settings_padding()
|
22 |
+
{
|
23 |
+
?><tr>
|
24 |
+
<th scope="row">
|
25 |
+
<label for="container_padding"><?php _e('Padding', EMCORE_SLUG);?></label>
|
26 |
+
</th>
|
27 |
+
<td>
|
28 |
+
<input type="range" name="theme[meta][container][padding]" id="container_padding" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.container.padding'))?>" />
|
29 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.container.padding'));?></span>px</span>
|
30 |
+
</td>
|
31 |
+
</tr><?php
|
32 |
+
}
|
33 |
+
|
34 |
+
|
35 |
+
add_action('emodal_admin_theme_form_tab_container_settings', 'emodal_admin_theme_form_container_tab_settings_background', 20);
|
36 |
+
function emodal_admin_theme_form_container_tab_settings_background()
|
37 |
+
{
|
38 |
+
?><tr class="title-divider">
|
39 |
+
<th colspan="2"><h3 class="title"><?php _e('Background', EMCORE_SLUG);?></ h3></th>
|
40 |
+
</tr>
|
41 |
+
<tr>
|
42 |
+
<th scope="row">
|
43 |
+
<label for="container_background_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
44 |
+
</th>
|
45 |
+
<td>
|
46 |
+
<input type="text" name="theme[meta][container][background][color]" id="container_background_color" value="<?php esc_attr_e(get_current_modal_theme('meta.container.background.color'))?>" class="color-picker background-color" />
|
47 |
+
</td>
|
48 |
+
</tr>
|
49 |
+
<tr class="background-opacity">
|
50 |
+
<th scope="row">
|
51 |
+
<label for="container_background_opacity"><?php _e('Opacity', EMCORE_SLUG);?></label>
|
52 |
+
</th>
|
53 |
+
<td>
|
54 |
+
<input type="range" name="theme[meta][container][background][opacity]" id="container_background_opacity" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.container.background.opacity'))?>" />
|
55 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.container.background.opacity'));?></span>%</span>
|
56 |
+
</td>
|
57 |
+
</tr><?php
|
58 |
+
}
|
59 |
+
|
60 |
+
add_action('emodal_admin_theme_form_tab_container_settings', 'emodal_admin_theme_form_container_tab_settings_border', 30);
|
61 |
+
function emodal_admin_theme_form_container_tab_settings_border()
|
62 |
+
{
|
63 |
+
?><tr class="title-divider">
|
64 |
+
<th colspan="2"><h3 class="title"><?php _e('Border', EMCORE_SLUG);?></h3></th>
|
65 |
+
</tr>
|
66 |
+
<tr>
|
67 |
+
<th scope="row">
|
68 |
+
<label for="container_border_radius"><?php _e('Radius', EMCORE_SLUG);?></label>
|
69 |
+
</th>
|
70 |
+
<td>
|
71 |
+
<input type="range" name="theme[meta][container][border][radius]" id="container_border_radius" min="0" max="80" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.container.border.radius'))?>" />
|
72 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.container.border.radius'));?></span>px</span>
|
73 |
+
<p class="description"><?php _e('Choose a corner radius for your container button.',EMCORE_SLUG)?></p>
|
74 |
+
</td>
|
75 |
+
</tr>
|
76 |
+
<tr>
|
77 |
+
<th scope="row">
|
78 |
+
<label for="container_border_style"><?php _e('Style', EMCORE_SLUG);?></label>
|
79 |
+
</th>
|
80 |
+
<td>
|
81 |
+
<select name="theme[meta][container][border][style]" id="container_border_style" class="border-style">
|
82 |
+
<?php foreach(apply_filters('emodal_border_style_options', array()) as $option => $value) : ?>
|
83 |
+
<option
|
84 |
+
value="<?php echo $value;?>"
|
85 |
+
<?php echo $value == get_current_modal_theme('meta.container.border.style') ? ' selected="selected"' : '';?>
|
86 |
+
><?php echo $option;?></option>
|
87 |
+
<?php endforeach ?>
|
88 |
+
</select>
|
89 |
+
<p class="description"><?php _e('Choose a border style for your container button.', EMCORE_SLUG)?></p>
|
90 |
+
</td>
|
91 |
+
</tr>
|
92 |
+
<tr class="border-options">
|
93 |
+
<th scope="row">
|
94 |
+
<label for="container_border_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
95 |
+
</th>
|
96 |
+
<td>
|
97 |
+
<input type="text" name="theme[meta][container][border][color]" id="container_border_color" value="<?php esc_attr_e(get_current_modal_theme('meta.container.border.color'))?>" class="color-picker" />
|
98 |
+
</td>
|
99 |
+
</tr>
|
100 |
+
<tr class="border-options">
|
101 |
+
<th scope="row">
|
102 |
+
<label for="container_border_width"><?php _e('Thickness', EMCORE_SLUG);?></label>
|
103 |
+
</th>
|
104 |
+
<td>
|
105 |
+
<input type="range" name="theme[meta][container][border][width]" id="container_border_width" min="0" max="5" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.container.border.width'))?>" />
|
106 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.container.border.width'));?></span>px</span>
|
107 |
+
</td>
|
108 |
+
</tr><?php
|
109 |
+
}
|
110 |
+
|
111 |
+
add_action('emodal_admin_theme_form_tab_container_settings', 'emodal_admin_theme_form_container_tab_settings_boxshadow', 40);
|
112 |
+
function emodal_admin_theme_form_container_tab_settings_boxshadow()
|
113 |
+
{
|
114 |
+
?><tr class="title-divider">
|
115 |
+
<th colspan="2"><h3 class="title"><?php _e('Drop Shadow', EMCORE_SLUG);?></h3></th>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<th scope="row">
|
119 |
+
<label for="container_boxshadow_inset"><?php _e('Inset', EMCORE_SLUG);?></label>
|
120 |
+
</th>
|
121 |
+
<td>
|
122 |
+
<select name="theme[meta][container][boxshadow][inset]" id="container_boxshadow_inset">
|
123 |
+
<?php foreach(array(__('Yes', EMCORE_SLUG) => 'yes', __('No', EMCORE_SLUG) => 'no') as $option => $value) : ?>
|
124 |
+
<option
|
125 |
+
value="<?php echo $value;?>"
|
126 |
+
<?php echo $value == get_current_modal_theme('meta.container.boxshadow.inset') ? ' selected="selected"' : '';?>
|
127 |
+
><?php echo $option;?></option>
|
128 |
+
<?php endforeach ?>
|
129 |
+
</select>
|
130 |
+
<p class="description"><?php _e('Set the box shadow to inset (inner shadow).', EMCORE_SLUG)?></p>
|
131 |
+
</td>
|
132 |
+
</tr>
|
133 |
+
<tr>
|
134 |
+
<th scope="row">
|
135 |
+
<label for="container_boxshadow_horizontal"><?php _e('Horizontal Position', EMCORE_SLUG);?></label>
|
136 |
+
</th>
|
137 |
+
<td>
|
138 |
+
<input type="range" name="theme[meta][container][boxshadow][horizontal]" id="container_boxshadow_horizontal" min="-50" max="50" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.container.boxshadow.horizontal'))?>" />
|
139 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.container.boxshadow.horizontal'));?></span>px</span>
|
140 |
+
</td>
|
141 |
+
</tr>
|
142 |
+
<tr>
|
143 |
+
<th scope="row">
|
144 |
+
<label for="container_boxshadow_vertical"><?php _e('Vertical Position', EMCORE_SLUG);?></label>
|
145 |
+
</th>
|
146 |
+
<td>
|
147 |
+
<input type="range" name="theme[meta][container][boxshadow][vertical]" id="container_boxshadow_vertical" min="-50" max="50" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.container.boxshadow.vertical'))?>" />
|
148 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.container.boxshadow.vertical'));?></span>px</span>
|
149 |
+
</td>
|
150 |
+
</tr>
|
151 |
+
<tr>
|
152 |
+
<th scope="row">
|
153 |
+
<label for="container_boxshadow_blur"><?php _e('Blur Radius', EMCORE_SLUG);?></label>
|
154 |
+
</th>
|
155 |
+
<td>
|
156 |
+
<input type="range" name="theme[meta][container][boxshadow][blur]" id="container_boxshadow_blur" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.container.boxshadow.blur'))?>" />
|
157 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.container.boxshadow.blur'));?></span>px</span>
|
158 |
+
</td>
|
159 |
+
</tr>
|
160 |
+
<tr>
|
161 |
+
<th scope="row">
|
162 |
+
<label for="container_boxshadow_spread"><?php _e('Spread', EMCORE_SLUG);?></label>
|
163 |
+
</th>
|
164 |
+
<td>
|
165 |
+
<input type="range" name="theme[meta][container][boxshadow][spread]" id="container_boxshadow_spread" min="-100" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.container.boxshadow.spread'))?>" />
|
166 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.container.boxshadow.spread'));?></span>px</span>
|
167 |
+
</td>
|
168 |
+
</tr>
|
169 |
+
<tr>
|
170 |
+
<th scope="row">
|
171 |
+
<label for="container_boxshadow_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
172 |
+
</th>
|
173 |
+
<td>
|
174 |
+
<input type="text" name="theme[meta][container][boxshadow][color]" id="container_boxshadow_color" value="<?php esc_attr_e(get_current_modal_theme('meta.container.boxshadow.color'))?>" class="color-picker boxshadow-color" />
|
175 |
+
</td>
|
176 |
+
</tr>
|
177 |
+
<tr>
|
178 |
+
<th scope="row">
|
179 |
+
<label for="container_boxshadow_opacity"><?php _e('Opacity', EMCORE_SLUG);?></label>
|
180 |
+
</th>
|
181 |
+
<td>
|
182 |
+
<input type="range" name="theme[meta][container][boxshadow][opacity]" id="container_boxshadow_opacity" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.container.boxshadow.opacity'))?>" />
|
183 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.container.boxshadow.opacity'));?></span>%</span>
|
184 |
+
</td>
|
185 |
+
</tr><?php
|
186 |
+
}
|
includes/admin/theme-form-content-tab.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_theme_form_tabs', 'emodal_admin_theme_form_content_tab', 60);
|
3 |
+
function emodal_admin_theme_form_content_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'content', 'label' => __('Content', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_admin_theme_form_tab_content', 'emodal_admin_theme_form_content_tab_settings', 10);
|
10 |
+
function emodal_admin_theme_form_content_tab_settings()
|
11 |
+
{
|
12 |
+
?><table class="form-table">
|
13 |
+
<tbody>
|
14 |
+
<?php do_action('emodal_admin_theme_form_tab_content_settings');?>
|
15 |
+
</tbody>
|
16 |
+
</table><?php
|
17 |
+
}
|
18 |
+
|
19 |
+
|
20 |
+
add_action('emodal_admin_theme_form_tab_content_settings', 'emodal_admin_theme_form_content_tab_settings_font', 10);
|
21 |
+
function emodal_admin_theme_form_content_tab_settings_font()
|
22 |
+
{
|
23 |
+
?><tr class="title-divider">
|
24 |
+
<th colspan="2"><h3 class="title"><?php _e('Font', EMCORE_SLUG);?></h3></th>
|
25 |
+
</tr>
|
26 |
+
<tr>
|
27 |
+
<th scope="row">
|
28 |
+
<label for="content_font_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
29 |
+
</th>
|
30 |
+
<td>
|
31 |
+
<input type="text" name="theme[meta][content][font][color]" id="content_font_color" value="<?php esc_attr_e(get_current_modal_theme('meta.content.font.color'))?>" class="color-picker" />
|
32 |
+
</td>
|
33 |
+
</tr>
|
34 |
+
<?php /*
|
35 |
+
<tr>
|
36 |
+
<th scope="row">
|
37 |
+
<label for="content_font_size"><?php _e('Size', EMCORE_SLUG);?></label>
|
38 |
+
</th>
|
39 |
+
<td>
|
40 |
+
<input type="range" name="theme[meta][content][font][size]" id="content_font_size" min="8" max="32" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.content.font.size'))?>" />
|
41 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.content.font.size'));?></span>px</span>
|
42 |
+
<p class="description"><?php _e('Font size.',EMCORE_SLUG)?></p>
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
+
*/?>
|
46 |
+
<tr>
|
47 |
+
<th scope="row">
|
48 |
+
<label for="content_font_family"><?php _e('Family', EMCORE_SLUG);?></label>
|
49 |
+
</th>
|
50 |
+
<td>
|
51 |
+
<select name="theme[meta][content][font][family]" id="content_font_family">
|
52 |
+
<?php foreach(apply_filters('emodal_font_family_options', array()) as $option => $value) : ?>
|
53 |
+
<option
|
54 |
+
value="<?php echo $value;?>"
|
55 |
+
<?php echo $value == get_current_modal_theme('meta.content.font.family') ? ' selected="selected"' : '';?>
|
56 |
+
><?php echo $option;?></option>
|
57 |
+
<?php endforeach ?>
|
58 |
+
</select>
|
59 |
+
</td>
|
60 |
+
</tr><?php
|
61 |
+
}
|
includes/admin/theme-form-general-tab.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_theme_form_tabs', 'emodal_admin_theme_form_general_tab', 10);
|
3 |
+
function emodal_admin_theme_form_general_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'general', 'label' => __('General', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_admin_theme_form_tab_general', 'emodal_admin_theme_form_general_tab_settings', 10);
|
10 |
+
function emodal_admin_theme_form_general_tab_settings()
|
11 |
+
{
|
12 |
+
?><table class="form-table">
|
13 |
+
<tbody>
|
14 |
+
<?php do_action('emodal_admin_theme_form_tab_general_settings');?>
|
15 |
+
</tbody>
|
16 |
+
</table><?php
|
17 |
+
}
|
18 |
+
|
19 |
+
add_action('emodal_admin_theme_form_tab_general_settings', 'emodal_admin_theme_form_general_tab_settings_name', 10);
|
20 |
+
function emodal_admin_theme_form_general_tab_settings_name()
|
21 |
+
{
|
22 |
+
?><tr>
|
23 |
+
<th scope="row">
|
24 |
+
<label for="name">
|
25 |
+
<?php _e('Name', EMCORE_SLUG);?>
|
26 |
+
<span class="description">(required)</span>
|
27 |
+
</label>
|
28 |
+
</th>
|
29 |
+
<td>
|
30 |
+
<input type="text" class="regular-text" name="theme[name]" id="name" value="<?php esc_attr_e(get_current_modal_theme('name'))?>" required/>
|
31 |
+
</td>
|
32 |
+
</tr><?php
|
33 |
+
if(!class_exists('EMPro')){?>
|
34 |
+
<tr>
|
35 |
+
<th colspan="2" class="pro-upgrade-tip">
|
36 |
+
<hr/>
|
37 |
+
<img style="" src="<?php echo EMCORE_URL;?>/assets/images/admin/icon-info-21x21.png"/> Free Users can only create one (1) theme. <a href="https://easy-modal.com/pricing" target="_blank">Upgrade to Pro! See what you’re <br/>missing out on</a>.
|
38 |
+
</th>
|
39 |
+
</tr><?php
|
40 |
+
}
|
41 |
+
}
|
includes/admin/theme-form-overlay-tab.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_theme_form_tabs', 'emodal_admin_theme_form_overlay_tab', 20);
|
3 |
+
function emodal_admin_theme_form_overlay_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'overlay', 'label' => __('Overlay', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_admin_theme_form_tab_overlay', 'emodal_admin_theme_form_overlay_tab_settings', 10);
|
10 |
+
function emodal_admin_theme_form_overlay_tab_settings()
|
11 |
+
{
|
12 |
+
?><table class="form-table">
|
13 |
+
<tbody>
|
14 |
+
<?php do_action('emodal_admin_theme_form_tab_overlay_settings');?>
|
15 |
+
</tbody>
|
16 |
+
</table><?php
|
17 |
+
}
|
18 |
+
|
19 |
+
add_action('emodal_admin_theme_form_tab_overlay_settings', 'emodal_admin_theme_form_overlay_tab_settings_background', 10);
|
20 |
+
function emodal_admin_theme_form_overlay_tab_settings_background()
|
21 |
+
{
|
22 |
+
?><tr>
|
23 |
+
<th scope="row">
|
24 |
+
<label for="overlay_background_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
25 |
+
</th>
|
26 |
+
<td>
|
27 |
+
<input type="text" name="theme[meta][overlay][background][color]" id="overlay_background_color" value="<?php esc_attr_e(get_current_modal_theme('meta.overlay.background.color'))?>" class="color-picker background-color" />
|
28 |
+
<p class="description"><?php _e('Choose the overlay color.', EMCORE_SLUG)?></p>
|
29 |
+
</td>
|
30 |
+
</tr>
|
31 |
+
<tr class="background-opacity">
|
32 |
+
<th scope="row">
|
33 |
+
<label for="overlay_background_opacity"><?php _e('Opacity', EMCORE_SLUG);?></label>
|
34 |
+
</th>
|
35 |
+
<td>
|
36 |
+
<input type="range" name="theme[meta][overlay][background][opacity]" id="overlay_background_opacity" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.overlay.background.opacity'))?>" />
|
37 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.overlay.background.opacity'));?></span>%</span>
|
38 |
+
<p class="description"><?php _e('The opacity value for the overlay.',EMCORE_SLUG)?></p>
|
39 |
+
</td>
|
40 |
+
</tr><?php
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
|
includes/admin/theme-form-title-tab.php
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_admin_theme_form_tabs', 'emodal_admin_theme_form_title_tab', 50);
|
3 |
+
function emodal_admin_theme_form_title_tab($tabs)
|
4 |
+
{
|
5 |
+
$tabs[] = array( 'id' => 'title', 'label' => __('Title', EMCORE_SLUG) );
|
6 |
+
return $tabs;
|
7 |
+
}
|
8 |
+
|
9 |
+
add_action('emodal_admin_theme_form_tab_title', 'emodal_admin_theme_form_title_tab_settings', 10);
|
10 |
+
function emodal_admin_theme_form_title_tab_settings()
|
11 |
+
{
|
12 |
+
?><table class="form-table">
|
13 |
+
<tbody>
|
14 |
+
<?php do_action('emodal_admin_theme_form_tab_title_settings');?>
|
15 |
+
</tbody>
|
16 |
+
</table><?php
|
17 |
+
}
|
18 |
+
|
19 |
+
|
20 |
+
add_action('emodal_admin_theme_form_tab_title_settings', 'emodal_admin_theme_form_title_tab_settings_font', 10);
|
21 |
+
function emodal_admin_theme_form_title_tab_settings_font()
|
22 |
+
{
|
23 |
+
?><tr class="title-divider">
|
24 |
+
<th colspan="2"><h3 class="title"><?php _e('Font', EMCORE_SLUG);?></h3></th>
|
25 |
+
</tr>
|
26 |
+
<tr>
|
27 |
+
<th scope="row">
|
28 |
+
<label for="title_font_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
29 |
+
</th>
|
30 |
+
<td>
|
31 |
+
<input type="text" name="theme[meta][title][font][color]" id="title_font_color" value="<?php esc_attr_e(get_current_modal_theme('meta.title.font.color'))?>" class="color-picker" />
|
32 |
+
</td>
|
33 |
+
</tr>
|
34 |
+
|
35 |
+
<tr>
|
36 |
+
<th scope="row">
|
37 |
+
<label for="title_font_size"><?php _e('Size', EMCORE_SLUG);?></label>
|
38 |
+
</th>
|
39 |
+
<td>
|
40 |
+
<input type="range" name="theme[meta][title][font][size]" id="title_font_size" min="8" max="32" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.title.font.size'))?>" />
|
41 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.title.font.size'));?></span>px
|
42 |
+
</td>
|
43 |
+
</tr>
|
44 |
+
<tr>
|
45 |
+
<th scope="row">
|
46 |
+
<label for="title_font_family"><?php _e('Family', EMCORE_SLUG);?></label>
|
47 |
+
</th>
|
48 |
+
<td>
|
49 |
+
<select name="theme[meta][title][font][family]" id="title_font_family">
|
50 |
+
<?php foreach(apply_filters('emodal_font_family_options', array()) as $option => $value) : ?>
|
51 |
+
<option
|
52 |
+
value="<?php echo $value;?>"
|
53 |
+
<?php echo $value == get_current_modal_theme('meta.title.font.family') ? ' selected="selected"' : '';?>
|
54 |
+
><?php echo $option;?></option>
|
55 |
+
<?php endforeach ?>
|
56 |
+
</select>
|
57 |
+
</td>
|
58 |
+
</tr>
|
59 |
+
<tr>
|
60 |
+
<th scope="row">
|
61 |
+
<label for="title_text_align"><?php _e('Align', EMCORE_SLUG);?></label>
|
62 |
+
</th>
|
63 |
+
<td>
|
64 |
+
<select name="theme[meta][title][text][align]" id="title_text_align">
|
65 |
+
<?php foreach(apply_filters('emodal_text_align_options', array()) as $option => $value) : ?>
|
66 |
+
<option
|
67 |
+
value="<?php echo $value;?>"
|
68 |
+
<?php echo $value == get_current_modal_theme('meta.title.text.align') ? ' selected="selected"' : '';?>
|
69 |
+
><?php echo $option;?></option>
|
70 |
+
<?php endforeach ?>
|
71 |
+
</select>
|
72 |
+
</td>
|
73 |
+
</tr><?php
|
74 |
+
}
|
75 |
+
|
76 |
+
add_action('emodal_admin_theme_form_tab_title_settings', 'emodal_admin_theme_form_title_tab_settings_textshadow', 20);
|
77 |
+
function emodal_admin_theme_form_title_tab_settings_textshadow()
|
78 |
+
{
|
79 |
+
?><tr class="title-divider">
|
80 |
+
<th colspan="2"><h3 class="title"><?php _e('Text Shadow', EMCORE_SLUG);?></h3></th>
|
81 |
+
</tr>
|
82 |
+
<tr>
|
83 |
+
<th scope="row">
|
84 |
+
<label for="title_textshadow_horizontal"><?php _e('Horizontal Position', EMCORE_SLUG);?></label>
|
85 |
+
</th>
|
86 |
+
<td>
|
87 |
+
<input type="range" name="theme[meta][title][textshadow][horizontal]" id="title_textshadow_horizontal" min="-50" max="50" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.title.textshadow.horizontal'))?>" />
|
88 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.title.textshadow.horizontal'));?></span>px</span>
|
89 |
+
</td>
|
90 |
+
</tr>
|
91 |
+
<tr>
|
92 |
+
<th scope="row">
|
93 |
+
<label for="title_textshadow_vertical"><?php _e('Vertical Position', EMCORE_SLUG);?></label>
|
94 |
+
</th>
|
95 |
+
<td>
|
96 |
+
<input type="range" name="theme[meta][title][textshadow][vertical]" id="title_textshadow_vertical" min="-50" max="50" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.title.textshadow.vertical'))?>" />
|
97 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.title.textshadow.vertical'));?></span>px</span>
|
98 |
+
</td>
|
99 |
+
</tr>
|
100 |
+
<tr>
|
101 |
+
<th scope="row">
|
102 |
+
<label for="title_textshadow_blur"><?php _e('Blur Radius', EMCORE_SLUG);?></label>
|
103 |
+
</th>
|
104 |
+
<td>
|
105 |
+
<input type="range" name="theme[meta][title][textshadow][blur]" id="title_textshadow_blur" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.title.textshadow.blur'))?>" />
|
106 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.title.textshadow.blur'));?></span>px</span>
|
107 |
+
</td>
|
108 |
+
</tr>
|
109 |
+
<tr>
|
110 |
+
<th scope="row">
|
111 |
+
<label for="title_textshadow_color"><?php _e('Color', EMCORE_SLUG);?></label>
|
112 |
+
</th>
|
113 |
+
<td>
|
114 |
+
<input type="text" name="theme[meta][title][textshadow][color]" id="title_textshadow_color" value="<?php esc_attr_e(get_current_modal_theme('meta.title.textshadow.color'))?>" class="color-picker textshadow-color" />
|
115 |
+
</td>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<th scope="row">
|
119 |
+
<label for="title_textshadow_opacity"><?php _e('Opacity', EMCORE_SLUG);?></label>
|
120 |
+
</th>
|
121 |
+
<td>
|
122 |
+
<input type="range" name="theme[meta][title][textshadow][opacity]" id="title_textshadow_opacity" min="0" max="100" step="1" value="<?php esc_attr_e(get_current_modal_theme('meta.title.textshadow.opacity'))?>" />
|
123 |
+
<span class="range-value regular-text"><span class="value"><?php esc_html_e(get_current_modal_theme('meta.title.textshadow.opacity'));?></span>%</span>
|
124 |
+
</td>
|
125 |
+
</tr><?php
|
126 |
+
}
|
includes/deprecated.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter('emodal_shortcode_modal_atts', 'emodal_shortcode_modal_attribute_deprecated_options');
|
3 |
+
function emodal_shortcode_modal_attribute_deprecated_options($atts)
|
4 |
+
{
|
5 |
+
if(!empty($atts['theme']))
|
6 |
+
{
|
7 |
+
$atts['theme_id'] = $atts['theme'];
|
8 |
+
unset($atts['theme']);
|
9 |
+
}
|
10 |
+
if(!empty($atts['duration']))
|
11 |
+
{
|
12 |
+
$atts['animationSpeed'] = $atts['duration'];
|
13 |
+
unset($atts['duration']);
|
14 |
+
}
|
15 |
+
if(!empty($atts['overlayEscClose']))
|
16 |
+
{
|
17 |
+
$atts['escClose'] = $atts['overlayEscClose'];
|
18 |
+
unset($atts['overlayEscClose']);
|
19 |
+
}
|
20 |
+
if(!empty($atts['direction']))
|
21 |
+
{
|
22 |
+
switch($atts['direction'])
|
23 |
+
{
|
24 |
+
case 'topleft': $atts['origin'] = 'left top'; break;
|
25 |
+
case 'topright': $atts['origin'] = 'right top'; break;
|
26 |
+
case 'bottomleft': $atts['origin'] = 'left bottom'; break;
|
27 |
+
case 'bottomright': $atts['origin'] = 'right bottom'; break;
|
28 |
+
default: $atts['origin'] = $atts['direction']; break;
|
29 |
+
}
|
30 |
+
unset($atts['direction']);
|
31 |
+
}
|
32 |
+
return $atts;
|
33 |
+
}
|
includes/functions.php
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(!function_exists("get_all_modals")){
|
3 |
+
function enqueue_modal($id)
|
4 |
+
{
|
5 |
+
if(!is_array($id))
|
6 |
+
EModal_Modals::enqueue_modal($id);
|
7 |
+
else
|
8 |
+
foreach($id as $i)
|
9 |
+
EModal_Modals::enqueue_modal($i);
|
10 |
+
}}
|
11 |
+
|
12 |
+
if(!function_exists("emodal_get_option")){
|
13 |
+
function emodal_get_option($key)
|
14 |
+
{
|
15 |
+
global $blog_id;
|
16 |
+
if(function_exists('is_multisite') && is_multisite() && $blog_id)
|
17 |
+
{
|
18 |
+
return get_blog_option($blog_id, $key);
|
19 |
+
}
|
20 |
+
else
|
21 |
+
{
|
22 |
+
return get_site_option($key);
|
23 |
+
}
|
24 |
+
}}
|
25 |
+
|
26 |
+
|
27 |
+
if(!function_exists("emodal_update_option")){
|
28 |
+
function emodal_update_option($key, $value) {
|
29 |
+
global $blog_id;
|
30 |
+
if(function_exists('is_multisite') && is_multisite() && $blog_id)
|
31 |
+
{
|
32 |
+
return update_blog_option($blog_id, $key, $value);
|
33 |
+
}
|
34 |
+
else
|
35 |
+
{
|
36 |
+
return update_site_option($key, $value);
|
37 |
+
}
|
38 |
+
}}
|
39 |
+
|
40 |
+
if(!function_exists("emodal_delete_option")){
|
41 |
+
function emodal_delete_option($key) {
|
42 |
+
global $blog_id;
|
43 |
+
if(function_exists('is_multisite') && is_multisite() && $blog_id)
|
44 |
+
{
|
45 |
+
return delete_blog_option($blog_id, $key);
|
46 |
+
}
|
47 |
+
else
|
48 |
+
{
|
49 |
+
return delete_site_option($key);
|
50 |
+
}
|
51 |
+
}}
|
52 |
+
|
53 |
+
if(!function_exists("emodal_get_license")){
|
54 |
+
function emodal_get_license($key = NULL) {
|
55 |
+
$license = emodal_get_option(EMCORE_SLUG.'-license');
|
56 |
+
if(!$license)
|
57 |
+
{
|
58 |
+
$license = array(
|
59 |
+
'valid' => false,
|
60 |
+
'key' => '',
|
61 |
+
'status' => array(
|
62 |
+
'code' => NULL,
|
63 |
+
'message' => NULL,
|
64 |
+
'expires' => NULL,
|
65 |
+
'domains' => NULL
|
66 |
+
)
|
67 |
+
);
|
68 |
+
emodal_update_option(EMCORE_SLUG.'-license', $license);
|
69 |
+
}
|
70 |
+
return $license && $key ? emresolve($license, $key) : $license;
|
71 |
+
}}
|
72 |
+
|
73 |
+
|
74 |
+
if(!function_exists("emresolve")){
|
75 |
+
function emresolve(array $a, $path, $default = null){
|
76 |
+
$current = $a;
|
77 |
+
$p = strtok($path, '.');
|
78 |
+
while ($p !== false) {
|
79 |
+
if (!isset($current[$p])) {
|
80 |
+
return $default;
|
81 |
+
}
|
82 |
+
$current = $current[$p];
|
83 |
+
$p = strtok('.');
|
84 |
+
}
|
85 |
+
return $current;
|
86 |
+
}}
|
87 |
+
|
88 |
+
|
89 |
+
|
90 |
+
if(!function_exists("emodal_debug")){
|
91 |
+
function emodal_debug($var){
|
92 |
+
echo '<pre>'; var_dump($var); echo '</pre>';
|
93 |
+
}}
|
includes/shortcodes.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_shortcode( 'modal', 'emodal_shortcode_modal');
|
3 |
+
function emodal_shortcode_modal($atts, $content = NULL)
|
4 |
+
{
|
5 |
+
$atts = shortcode_atts(
|
6 |
+
apply_filters('emodal_shortcode_modal_default_atts', array(
|
7 |
+
'id' => "",
|
8 |
+
'theme_id' => 1,
|
9 |
+
'title' => "",
|
10 |
+
'size' => "auto",
|
11 |
+
'width' => "",
|
12 |
+
'widthUnit' => "px",
|
13 |
+
'height' => "",
|
14 |
+
'heightUnit' => "px",
|
15 |
+
'location' => "center top",
|
16 |
+
'positionTop' => 100,
|
17 |
+
'positionLeft' => 0,
|
18 |
+
'positionBottom' => 0,
|
19 |
+
'positionRight' => 0,
|
20 |
+
'positionFixed' => 0,
|
21 |
+
'animation' => "slide",
|
22 |
+
'animationSpeed' => 350,
|
23 |
+
'animationOrigin' => 'top',
|
24 |
+
'overlayClose' => 0,
|
25 |
+
'escClose' => 1,
|
26 |
+
// Deprecated
|
27 |
+
'theme' => NULL,
|
28 |
+
'duration' => NULL,
|
29 |
+
'direction' => NULL,
|
30 |
+
'overlayEscClose' => NULL,
|
31 |
+
)),
|
32 |
+
apply_filters('emodal_shortcode_modal_atts', $atts)
|
33 |
+
);
|
34 |
+
|
35 |
+
$modal_fields = array(
|
36 |
+
'id' => $atts['id'],
|
37 |
+
'theme_id' => $atts['theme_id'],
|
38 |
+
'title' => $atts['title'],
|
39 |
+
'content' => $content,
|
40 |
+
'meta' => array(
|
41 |
+
'display' => array(
|
42 |
+
'size' => $atts['size'],
|
43 |
+
'custom_width' => $atts['width'],
|
44 |
+
'custom_width_unit' => $atts['widthUnit'],
|
45 |
+
'custom_height' => $atts['height'],
|
46 |
+
'custom_height_unit' => $atts['heightUnit'],
|
47 |
+
'custom_height_auto' => $atts['width'] > 0 ? 0 : 1,
|
48 |
+
'location' => $atts['location'],
|
49 |
+
'position' => array(
|
50 |
+
'top' => $atts['positionTop'],
|
51 |
+
'left' => $atts['positionLeft'],
|
52 |
+
'bottom' => $atts['positionBottom'],
|
53 |
+
'right' => $atts['positionRight'],
|
54 |
+
'fixed' => $atts['positionFixed'],
|
55 |
+
),
|
56 |
+
'animation' => array(
|
57 |
+
'type' => $atts['animation'],
|
58 |
+
'speed' => $atts['animationSpeed'],
|
59 |
+
'origin' => $atts['animationOrigin'],
|
60 |
+
),
|
61 |
+
),
|
62 |
+
'close' => array(
|
63 |
+
'overlay_click' => $atts['overlayClose'],
|
64 |
+
'esc_press' => $atts['escClose']
|
65 |
+
),
|
66 |
+
),
|
67 |
+
);
|
68 |
+
|
69 |
+
$modal_fields = apply_filters('emodal_shortcode_modal_settings', $modal_fields, $atts);
|
70 |
+
$Modal = new EModal_Model_Modal;
|
71 |
+
$Modal->set_fields($modal_fields);
|
72 |
+
|
73 |
+
$View = new EModal_View_Modal;
|
74 |
+
$View->set('modal', $Modal->as_array());
|
75 |
+
return $View->output();
|
76 |
+
}
|
includes/updates/css/puc-debug-bar.css
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.puc-debug-bar-panel pre {
|
2 |
+
margin-top: 0;
|
3 |
+
}
|
4 |
+
|
5 |
+
table.puc-debug-data th {
|
6 |
+
width: 11em;
|
7 |
+
}
|
8 |
+
|
9 |
+
.puc-ajax-response {
|
10 |
+
border: 1px solid #dfdfdf;
|
11 |
+
border-radius: 3px;
|
12 |
+
padding: 0.5em;
|
13 |
+
margin: 5px 0;
|
14 |
+
background-color: white;
|
15 |
+
}
|
16 |
+
|
17 |
+
.puc-ajax-nonce {
|
18 |
+
display: none;
|
19 |
+
}
|
includes/updates/debug-bar-panel.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( !class_exists('PluginUpdateCheckerPanel') && class_exists('Debug_Bar_Panel') ) {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* A Debug Bar panel for the plugin update checker.
|
7 |
+
*/
|
8 |
+
class PluginUpdateCheckerPanel extends Debug_Bar_Panel {
|
9 |
+
/** @var PluginUpdateChecker */
|
10 |
+
private $updateChecker;
|
11 |
+
|
12 |
+
public function __construct($updateChecker) {
|
13 |
+
$this->updateChecker = $updateChecker;
|
14 |
+
$title = sprintf(
|
15 |
+
'<span id="puc-debug-menu-link-%s">PUC (%s)</span>',
|
16 |
+
esc_attr($this->updateChecker->slug),
|
17 |
+
$this->updateChecker->slug
|
18 |
+
);
|
19 |
+
parent::Debug_Bar_Panel($title);
|
20 |
+
}
|
21 |
+
|
22 |
+
public function render() {
|
23 |
+
printf(
|
24 |
+
'<div class="puc-debug-bar-panel" id="puc-debug-bar-panel_%1$s" data-slug="%1$s" data-nonce="%2$s">',
|
25 |
+
esc_attr($this->updateChecker->slug),
|
26 |
+
esc_attr(wp_create_nonce('puc-ajax'))
|
27 |
+
);
|
28 |
+
|
29 |
+
$responseBox = '<div class="puc-ajax-response" style="display: none;"></div>';
|
30 |
+
|
31 |
+
echo '<h3>Configuration</h3>';
|
32 |
+
echo '<table class="puc-debug-data">';
|
33 |
+
$this->row('Plugin file', htmlentities($this->updateChecker->pluginFile));
|
34 |
+
$this->row('Slug', htmlentities($this->updateChecker->slug));
|
35 |
+
$this->row('DB option', htmlentities($this->updateChecker->optionName));
|
36 |
+
|
37 |
+
$requestInfoButton = function_exists('get_submit_button') ? get_submit_button('Request Info', 'secondary', 'puc-request-info-button', false) : '';
|
38 |
+
$this->row('Metadata URL', htmlentities($this->updateChecker->metadataUrl) . ' ' . $requestInfoButton . $responseBox);
|
39 |
+
|
40 |
+
if ( $this->updateChecker->checkPeriod > 0 ) {
|
41 |
+
$this->row('Automatic checks', 'Every ' . $this->updateChecker->checkPeriod . ' hours');
|
42 |
+
} else {
|
43 |
+
$this->row('Automatic checks', 'Disabled');
|
44 |
+
}
|
45 |
+
|
46 |
+
if ( isset($this->updateChecker->throttleRedundantChecks) ) {
|
47 |
+
if ( $this->updateChecker->throttleRedundantChecks && ($this->updateChecker->checkPeriod > 0) ) {
|
48 |
+
$this->row(
|
49 |
+
'Throttling',
|
50 |
+
sprintf(
|
51 |
+
'Enabled. If an update is already available, check for updates every %1$d hours instead of every %2$d hours.',
|
52 |
+
$this->updateChecker->throttledCheckPeriod,
|
53 |
+
$this->updateChecker->checkPeriod
|
54 |
+
)
|
55 |
+
);
|
56 |
+
} else {
|
57 |
+
$this->row('Throttling', 'Disabled');
|
58 |
+
}
|
59 |
+
}
|
60 |
+
echo '</table>';
|
61 |
+
|
62 |
+
echo '<h3>Status</h3>';
|
63 |
+
echo '<table class="puc-debug-data">';
|
64 |
+
$state = $this->updateChecker->getUpdateState();
|
65 |
+
$checkNowButton = function_exists('get_submit_button') ? get_submit_button('Check Now', 'secondary', 'puc-check-now-button', false) : '';
|
66 |
+
|
67 |
+
if ( isset($state, $state->lastCheck) ) {
|
68 |
+
$this->row('Last check', $this->formatTimeWithDelta($state->lastCheck) . ' ' . $checkNowButton . $responseBox);
|
69 |
+
} else {
|
70 |
+
$this->row('Last check', 'Never');
|
71 |
+
}
|
72 |
+
|
73 |
+
$nextCheck = wp_next_scheduled($this->updateChecker->getCronHookName());
|
74 |
+
$this->row('Next automatic check', $this->formatTimeWithDelta($nextCheck));
|
75 |
+
|
76 |
+
if ( isset($state, $state->checkedVersion) ) {
|
77 |
+
$this->row('Checked version', htmlentities($state->checkedVersion));
|
78 |
+
$this->row('Cached update', $state->update);
|
79 |
+
}
|
80 |
+
$this->row('Update checker class', htmlentities(get_class($this->updateChecker)));
|
81 |
+
echo '</table>';
|
82 |
+
|
83 |
+
$update = $this->updateChecker->getUpdate();
|
84 |
+
if ( $update !== null ) {
|
85 |
+
echo '<h3>An Update Is Available</h3>';
|
86 |
+
echo '<table class="puc-debug-data">';
|
87 |
+
$fields = array('version', 'download_url', 'slug', 'homepage', 'upgrade_notice');
|
88 |
+
foreach($fields as $field) {
|
89 |
+
$this->row(ucwords(str_replace('_', ' ', $field)), htmlentities($update->$field));
|
90 |
+
}
|
91 |
+
echo '</table>';
|
92 |
+
} else {
|
93 |
+
echo '<h3>No updates currently available</h3>';
|
94 |
+
}
|
95 |
+
|
96 |
+
echo '</div>';
|
97 |
+
}
|
98 |
+
|
99 |
+
private function formatTimeWithDelta($unixTime) {
|
100 |
+
if ( empty($unixTime) ) {
|
101 |
+
return 'Never';
|
102 |
+
}
|
103 |
+
|
104 |
+
$delta = time() - $unixTime;
|
105 |
+
$result = human_time_diff(time(), $unixTime);
|
106 |
+
if ( $delta < 0 ) {
|
107 |
+
$result = 'after ' . $result;
|
108 |
+
} else {
|
109 |
+
$result = $result . ' ago';
|
110 |
+
}
|
111 |
+
$result .= ' (' . $this->formatTimestamp($unixTime) . ')';
|
112 |
+
return $result;
|
113 |
+
}
|
114 |
+
|
115 |
+
private function formatTimestamp($unixTime) {
|
116 |
+
return gmdate('Y-m-d H:i:s', $unixTime + (get_option('gmt_offset') * 3600));
|
117 |
+
}
|
118 |
+
|
119 |
+
private function row($name, $value) {
|
120 |
+
if ( is_object($value) || is_array($value) ) {
|
121 |
+
$value = '<pre>' . htmlentities(print_r($value, true)) . '</pre>';
|
122 |
+
} else if ($value === null) {
|
123 |
+
$value = '<code>null</code>';
|
124 |
+
}
|
125 |
+
printf('<tr><th scope="row">%1$s</th> <td>%2$s</td></tr>', $name, $value);
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
includes/updates/debug-bar-plugin.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !class_exists('PucDebugBarPlugin') ) {
|
3 |
+
|
4 |
+
class PucDebugBarPlugin {
|
5 |
+
/** @var PluginUpdateChecker */
|
6 |
+
private $updateChecker;
|
7 |
+
|
8 |
+
public function __construct($updateChecker) {
|
9 |
+
$this->updateChecker = $updateChecker;
|
10 |
+
|
11 |
+
add_filter('debug_bar_panels', array($this, 'addDebugBarPanel'));
|
12 |
+
add_action('debug_bar_enqueue_scripts', array($this, 'enqueuePanelDependencies'));
|
13 |
+
|
14 |
+
add_action('wp_ajax_puc_debug_check_now', array($this, 'ajaxCheckNow'));
|
15 |
+
add_action('wp_ajax_puc_debug_request_info', array($this, 'ajaxRequestInfo'));
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Register the PUC Debug Bar panel.
|
20 |
+
*
|
21 |
+
* @param array $panels
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function addDebugBarPanel($panels) {
|
25 |
+
require_once dirname(__FILE__) . '/debug-bar-panel.php';
|
26 |
+
if ( current_user_can('update_plugins') && class_exists('PluginUpdateCheckerPanel') ) {
|
27 |
+
$panels[] = new PluginUpdateCheckerPanel($this->updateChecker);
|
28 |
+
}
|
29 |
+
return $panels;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Enqueue our Debug Bar scripts and styles.
|
34 |
+
*/
|
35 |
+
public function enqueuePanelDependencies() {
|
36 |
+
wp_enqueue_style(
|
37 |
+
'puc-debug-bar-style',
|
38 |
+
plugins_url( "/css/puc-debug-bar.css", __FILE__ ),
|
39 |
+
array('debug-bar'),
|
40 |
+
'20130927'
|
41 |
+
);
|
42 |
+
|
43 |
+
wp_enqueue_script(
|
44 |
+
'puc-debug-bar-js',
|
45 |
+
plugins_url( "/js/debug-bar.js", __FILE__ ),
|
46 |
+
array('jquery'),
|
47 |
+
'20121026'
|
48 |
+
);
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Run an update check and output the result. Useful for making sure that
|
53 |
+
* the update checking process works as expected.
|
54 |
+
*/
|
55 |
+
public function ajaxCheckNow() {
|
56 |
+
if ( $_POST['slug'] !== $this->updateChecker->slug ) {
|
57 |
+
return;
|
58 |
+
}
|
59 |
+
$this->preAjaxReqest();
|
60 |
+
$update = $this->updateChecker->checkForUpdates();
|
61 |
+
if ( $update !== null ) {
|
62 |
+
echo "An update is available:";
|
63 |
+
echo '<pre>', htmlentities(print_r($update, true)), '</pre>';
|
64 |
+
} else {
|
65 |
+
echo 'No updates found.';
|
66 |
+
}
|
67 |
+
exit;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Request plugin info and output it.
|
72 |
+
*/
|
73 |
+
public function ajaxRequestInfo() {
|
74 |
+
if ( $_POST['slug'] !== $this->updateChecker->slug ) {
|
75 |
+
return;
|
76 |
+
}
|
77 |
+
$this->preAjaxReqest();
|
78 |
+
$info = $this->updateChecker->requestInfo();
|
79 |
+
if ( $info !== null ) {
|
80 |
+
echo 'Successfully retrieved plugin info from the metadata URL:';
|
81 |
+
echo '<pre>', htmlentities(print_r($info, true)), '</pre>';
|
82 |
+
} else {
|
83 |
+
echo 'Failed to retrieve plugin info from the metadata URL.';
|
84 |
+
}
|
85 |
+
exit;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Check access permissions and enable error display (for debugging).
|
90 |
+
*/
|
91 |
+
private function preAjaxReqest() {
|
92 |
+
if ( !current_user_can('update_plugins') ) {
|
93 |
+
die('Access denied');
|
94 |
+
}
|
95 |
+
check_ajax_referer('puc-ajax');
|
96 |
+
|
97 |
+
error_reporting(E_ALL);
|
98 |
+
@ini_set('display_errors','On');
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
}
|
includes/updates/js/debug-bar.js
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function($) {
|
2 |
+
|
3 |
+
function runAjaxAction(button, action) {
|
4 |
+
button = $(button);
|
5 |
+
var panel = button.closest('.puc-debug-bar-panel');
|
6 |
+
var responseBox = button.closest('td').find('.puc-ajax-response');
|
7 |
+
|
8 |
+
responseBox.text('Processing...').show();
|
9 |
+
$.post(
|
10 |
+
ajaxurl,
|
11 |
+
{
|
12 |
+
action : action,
|
13 |
+
slug : panel.data('slug'),
|
14 |
+
_wpnonce: panel.data('nonce')
|
15 |
+
},
|
16 |
+
function(data) {
|
17 |
+
responseBox.html(data);
|
18 |
+
},
|
19 |
+
'html'
|
20 |
+
);
|
21 |
+
}
|
22 |
+
|
23 |
+
$('.puc-debug-bar-panel input[name="puc-check-now-button"]').click(function() {
|
24 |
+
runAjaxAction(this, 'puc_debug_check_now');
|
25 |
+
return false;
|
26 |
+
});
|
27 |
+
|
28 |
+
$('.puc-debug-bar-panel input[name="puc-request-info-button"]').click(function() {
|
29 |
+
runAjaxAction(this, 'puc_debug_request_info');
|
30 |
+
return false;
|
31 |
+
});
|
32 |
+
|
33 |
+
|
34 |
+
// Debug Bar uses the panel class name as part of its link and container IDs. This means we can
|
35 |
+
// end up with multiple identical IDs if more than one plugin uses the update checker library.
|
36 |
+
// Fix it by replacing the class name with the plugin slug.
|
37 |
+
var panels = $('#debug-menu-targets').find('.puc-debug-bar-panel');
|
38 |
+
panels.each(function(index) {
|
39 |
+
var panel = $(this);
|
40 |
+
var slug = panel.data('slug');
|
41 |
+
var target = panel.closest('.debug-menu-target');
|
42 |
+
|
43 |
+
//Change the panel wrapper ID.
|
44 |
+
target.attr('id', 'debug-menu-target-puc-' + slug);
|
45 |
+
|
46 |
+
//Change the menu link ID as well and point it at the new target ID.
|
47 |
+
$('#puc-debug-menu-link-' + panel.data('slug'))
|
48 |
+
.closest('.debug-menu-link')
|
49 |
+
.attr('id', 'debug-menu-link-puc-' + slug)
|
50 |
+
.attr('href', '#' + target.attr('id'));
|
51 |
+
});
|
52 |
+
});
|
includes/updates/plugin-update-checker.php
ADDED
@@ -0,0 +1,1061 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Update Checker Library 1.5
|
4 |
+
* http://w-shadow.com/
|
5 |
+
*
|
6 |
+
* Copyright 2014 Janis Elsts
|
7 |
+
* Licensed under the GNU GPL license.
|
8 |
+
* http://www.gnu.org/licenses/gpl.html
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( !class_exists('PluginUpdateChecker_1_5') ):
|
12 |
+
|
13 |
+
/**
|
14 |
+
* A custom plugin update checker.
|
15 |
+
*
|
16 |
+
* @author Janis Elsts
|
17 |
+
* @copyright 2014
|
18 |
+
* @version 1.5
|
19 |
+
* @access public
|
20 |
+
*/
|
21 |
+
class PluginUpdateChecker_1_5 {
|
22 |
+
public $metadataUrl = ''; //The URL of the plugin's metadata file.
|
23 |
+
public $pluginAbsolutePath = ''; //Full path of the main plugin file.
|
24 |
+
public $pluginFile = ''; //Plugin filename relative to the plugins directory. Many WP APIs use this to identify plugins.
|
25 |
+
public $slug = ''; //Plugin slug.
|
26 |
+
public $checkPeriod = 12; //How often to check for updates (in hours).
|
27 |
+
public $optionName = ''; //Where to store the update info.
|
28 |
+
public $muPluginFile = ''; //For MU plugins, the plugin filename relative to the mu-plugins directory.
|
29 |
+
|
30 |
+
public $debugMode = false; //Set to TRUE to enable error reporting. Errors are raised using trigger_error()
|
31 |
+
//and should be logged to the standard PHP error log.
|
32 |
+
|
33 |
+
public $throttleRedundantChecks = false; //Check less often if we already know that an update is available.
|
34 |
+
public $throttledCheckPeriod = 72;
|
35 |
+
|
36 |
+
private $cronHook = null;
|
37 |
+
private $debugBarPlugin = null;
|
38 |
+
private $cachedInstalledVersion = null;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Class constructor.
|
42 |
+
*
|
43 |
+
* @param string $metadataUrl The URL of the plugin's metadata file.
|
44 |
+
* @param string $pluginFile Fully qualified path to the main plugin file.
|
45 |
+
* @param string $slug The plugin's 'slug'. If not specified, the filename part of $pluginFile sans '.php' will be used as the slug.
|
46 |
+
* @param integer $checkPeriod How often to check for updates (in hours). Defaults to checking every 12 hours. Set to 0 to disable automatic update checks.
|
47 |
+
* @param string $optionName Where to store book-keeping info about update checks. Defaults to 'external_updates-$slug'.
|
48 |
+
* @param string $muPluginFile Optional. The plugin filename relative to the mu-plugins directory.
|
49 |
+
*/
|
50 |
+
public function __construct($metadataUrl, $pluginFile, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = ''){
|
51 |
+
$this->metadataUrl = $metadataUrl;
|
52 |
+
$this->pluginAbsolutePath = $pluginFile;
|
53 |
+
$this->pluginFile = plugin_basename($this->pluginAbsolutePath);
|
54 |
+
$this->muPluginFile = $muPluginFile;
|
55 |
+
$this->checkPeriod = $checkPeriod;
|
56 |
+
$this->slug = $slug;
|
57 |
+
$this->optionName = $optionName;
|
58 |
+
$this->debugMode = defined('WP_DEBUG') && WP_DEBUG;
|
59 |
+
|
60 |
+
//If no slug is specified, use the name of the main plugin file as the slug.
|
61 |
+
//For example, 'my-cool-plugin/cool-plugin.php' becomes 'cool-plugin'.
|
62 |
+
if ( empty($this->slug) ){
|
63 |
+
$this->slug = basename($this->pluginFile, '.php');
|
64 |
+
}
|
65 |
+
|
66 |
+
if ( empty($this->optionName) ){
|
67 |
+
$this->optionName = 'external_updates-' . $this->slug;
|
68 |
+
}
|
69 |
+
|
70 |
+
//Backwards compatibility: If the plugin is a mu-plugin but no $muPluginFile is specified, assume
|
71 |
+
//it's the same as $pluginFile given that it's not in a subdirectory (WP only looks in the base dir).
|
72 |
+
if ( empty($this->muPluginFile) && (strpbrk($this->pluginFile, '/\\') === false) && $this->isMuPlugin() ) {
|
73 |
+
$this->muPluginFile = $this->pluginFile;
|
74 |
+
}
|
75 |
+
|
76 |
+
$this->installHooks();
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Install the hooks required to run periodic update checks and inject update info
|
81 |
+
* into WP data structures.
|
82 |
+
*
|
83 |
+
* @return void
|
84 |
+
*/
|
85 |
+
protected function installHooks(){
|
86 |
+
//Override requests for plugin information
|
87 |
+
add_filter('plugins_api', array($this, 'injectInfo'), 20, 3);
|
88 |
+
|
89 |
+
//Insert our update info into the update array maintained by WP
|
90 |
+
add_filter('site_transient_update_plugins', array($this,'injectUpdate')); //WP 3.0+
|
91 |
+
add_filter('transient_update_plugins', array($this,'injectUpdate')); //WP 2.8+
|
92 |
+
|
93 |
+
add_filter('plugin_row_meta', array($this, 'addCheckForUpdatesLink'), 10, 2);
|
94 |
+
add_action('admin_init', array($this, 'handleManualCheck'));
|
95 |
+
add_action('all_admin_notices', array($this, 'displayManualCheckResult'));
|
96 |
+
|
97 |
+
//Clear the version number cache when something - anything - is upgraded or WP clears the update cache.
|
98 |
+
add_filter('upgrader_post_install', array($this, 'clearCachedVersion'));
|
99 |
+
add_action('delete_site_transient_update_plugins', array($this, 'clearCachedVersion'));
|
100 |
+
|
101 |
+
//Set up the periodic update checks
|
102 |
+
$this->cronHook = 'check_plugin_updates-' . $this->slug;
|
103 |
+
if ( $this->checkPeriod > 0 ){
|
104 |
+
|
105 |
+
//Trigger the check via Cron.
|
106 |
+
//Try to use one of the default schedules if possible as it's less likely to conflict
|
107 |
+
//with other plugins and their custom schedules.
|
108 |
+
$defaultSchedules = array(
|
109 |
+
1 => 'hourly',
|
110 |
+
12 => 'twicedaily',
|
111 |
+
24 => 'daily',
|
112 |
+
);
|
113 |
+
if ( array_key_exists($this->checkPeriod, $defaultSchedules) ) {
|
114 |
+
$scheduleName = $defaultSchedules[$this->checkPeriod];
|
115 |
+
} else {
|
116 |
+
//Use a custom cron schedule.
|
117 |
+
$scheduleName = 'every' . $this->checkPeriod . 'hours';
|
118 |
+
add_filter('cron_schedules', array($this, '_addCustomSchedule'));
|
119 |
+
}
|
120 |
+
|
121 |
+
if ( !wp_next_scheduled($this->cronHook) && !defined('WP_INSTALLING') ) {
|
122 |
+
wp_schedule_event(time(), $scheduleName, $this->cronHook);
|
123 |
+
}
|
124 |
+
add_action($this->cronHook, array($this, 'maybeCheckForUpdates'));
|
125 |
+
|
126 |
+
register_deactivation_hook($this->pluginFile, array($this, '_removeUpdaterCron'));
|
127 |
+
|
128 |
+
//In case Cron is disabled or unreliable, we also manually trigger
|
129 |
+
//the periodic checks while the user is browsing the Dashboard.
|
130 |
+
add_action( 'admin_init', array($this, 'maybeCheckForUpdates') );
|
131 |
+
|
132 |
+
//Like WordPress itself, we check more often on certain pages.
|
133 |
+
add_action( 'load-update-core.php', array($this, 'maybeCheckForUpdates') );
|
134 |
+
|
135 |
+
} else {
|
136 |
+
//Periodic checks are disabled.
|
137 |
+
wp_clear_scheduled_hook($this->cronHook);
|
138 |
+
}
|
139 |
+
|
140 |
+
if ( did_action('plugins_loaded') ) {
|
141 |
+
$this->initDebugBarPanel();
|
142 |
+
} else {
|
143 |
+
add_action('plugins_loaded', array($this, 'initDebugBarPanel'));
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Add our custom schedule to the array of Cron schedules used by WP.
|
149 |
+
*
|
150 |
+
* @param array $schedules
|
151 |
+
* @return array
|
152 |
+
*/
|
153 |
+
public function _addCustomSchedule($schedules){
|
154 |
+
if ( $this->checkPeriod && ($this->checkPeriod > 0) ){
|
155 |
+
$scheduleName = 'every' . $this->checkPeriod . 'hours';
|
156 |
+
$schedules[$scheduleName] = array(
|
157 |
+
'interval' => $this->checkPeriod * 3600,
|
158 |
+
'display' => sprintf('Every %d hours', $this->checkPeriod),
|
159 |
+
);
|
160 |
+
}
|
161 |
+
return $schedules;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Remove the scheduled cron event that the library uses to check for updates.
|
166 |
+
*
|
167 |
+
* @return void
|
168 |
+
*/
|
169 |
+
public function _removeUpdaterCron(){
|
170 |
+
wp_clear_scheduled_hook($this->cronHook);
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Get the name of the update checker's WP-cron hook. Mostly useful for debugging.
|
175 |
+
*
|
176 |
+
* @return string
|
177 |
+
*/
|
178 |
+
public function getCronHookName() {
|
179 |
+
return $this->cronHook;
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Retrieve plugin info from the configured API endpoint.
|
184 |
+
*
|
185 |
+
* @uses wp_remote_get()
|
186 |
+
*
|
187 |
+
* @param array $queryArgs Additional query arguments to append to the request. Optional.
|
188 |
+
* @return PluginInfo
|
189 |
+
*/
|
190 |
+
public function requestInfo($queryArgs = array()){
|
191 |
+
//Query args to append to the URL. Plugins can add their own by using a filter callback (see addQueryArgFilter()).
|
192 |
+
$installedVersion = $this->getInstalledVersion();
|
193 |
+
$queryArgs['installed_version'] = ($installedVersion !== null) ? $installedVersion : '';
|
194 |
+
$queryArgs = apply_filters('puc_request_info_query_args-'.$this->slug, $queryArgs);
|
195 |
+
|
196 |
+
//Various options for the wp_remote_get() call. Plugins can filter these, too.
|
197 |
+
$options = array(
|
198 |
+
'timeout' => 10, //seconds
|
199 |
+
'headers' => array(
|
200 |
+
'Accept' => 'application/json'
|
201 |
+
),
|
202 |
+
);
|
203 |
+
$options = apply_filters('puc_request_info_options-'.$this->slug, $options);
|
204 |
+
|
205 |
+
//The plugin info should be at 'http://your-api.com/url/here/$slug/info.json'
|
206 |
+
$url = $this->metadataUrl;
|
207 |
+
if ( !empty($queryArgs) ){
|
208 |
+
$url = add_query_arg($queryArgs, $url);
|
209 |
+
}
|
210 |
+
|
211 |
+
$result = wp_remote_get(
|
212 |
+
$url,
|
213 |
+
$options
|
214 |
+
);
|
215 |
+
|
216 |
+
//Try to parse the response
|
217 |
+
$pluginInfo = null;
|
218 |
+
if ( !is_wp_error($result) && isset($result['response']['code']) && ($result['response']['code'] == 200) && !empty($result['body']) ){
|
219 |
+
$pluginInfo = PluginInfo_1_3::fromJson($result['body'], $this->debugMode);
|
220 |
+
} else if ( $this->debugMode ) {
|
221 |
+
$message = sprintf("The URL %s does not point to a valid plugin metadata file. ", $url);
|
222 |
+
if ( is_wp_error($result) ) {
|
223 |
+
$message .= "WP HTTP error: " . $result->get_error_message();
|
224 |
+
} else if ( isset($result['response']['code']) ) {
|
225 |
+
$message .= "HTTP response code is " . $result['response']['code'] . " (expected: 200)";
|
226 |
+
} else {
|
227 |
+
$message .= "wp_remote_get() returned an unexpected result.";
|
228 |
+
}
|
229 |
+
trigger_error($message, E_USER_WARNING);
|
230 |
+
}
|
231 |
+
|
232 |
+
$pluginInfo = apply_filters('puc_request_info_result-'.$this->slug, $pluginInfo, $result);
|
233 |
+
return $pluginInfo;
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Retrieve the latest update (if any) from the configured API endpoint.
|
238 |
+
*
|
239 |
+
* @uses PluginUpdateChecker::requestInfo()
|
240 |
+
*
|
241 |
+
* @return PluginUpdate An instance of PluginUpdate, or NULL when no updates are available.
|
242 |
+
*/
|
243 |
+
public function requestUpdate(){
|
244 |
+
//For the sake of simplicity, this function just calls requestInfo()
|
245 |
+
//and transforms the result accordingly.
|
246 |
+
$pluginInfo = $this->requestInfo(array('checking_for_updates' => '1'));
|
247 |
+
if ( $pluginInfo == null ){
|
248 |
+
return null;
|
249 |
+
}
|
250 |
+
return PluginUpdate_1_3::fromPluginInfo($pluginInfo);
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Get the currently installed version of the plugin.
|
255 |
+
*
|
256 |
+
* @return string Version number.
|
257 |
+
*/
|
258 |
+
public function getInstalledVersion(){
|
259 |
+
if ( isset($this->cachedInstalledVersion) ) {
|
260 |
+
return $this->cachedInstalledVersion;
|
261 |
+
}
|
262 |
+
|
263 |
+
if ( !function_exists('get_plugin_data') ){
|
264 |
+
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
265 |
+
}
|
266 |
+
|
267 |
+
if ( !is_file($this->pluginAbsolutePath) ) {
|
268 |
+
//This can happen if the plugin filename is wrong.
|
269 |
+
if ( $this->debugMode ) {
|
270 |
+
trigger_error(
|
271 |
+
sprintf(
|
272 |
+
"Can't to read the Version header for %s. The file does not exist.",
|
273 |
+
$this->pluginFile
|
274 |
+
),
|
275 |
+
E_USER_WARNING
|
276 |
+
);
|
277 |
+
}
|
278 |
+
return null;
|
279 |
+
}
|
280 |
+
|
281 |
+
$pluginHeader = get_plugin_data($this->pluginAbsolutePath, false, false);
|
282 |
+
if ( isset($pluginHeader['Version']) ) {
|
283 |
+
$this->cachedInstalledVersion = $pluginHeader['Version'];
|
284 |
+
return $pluginHeader['Version'];
|
285 |
+
} else {
|
286 |
+
//This can happen if the filename points to something that is not a plugin.
|
287 |
+
if ( $this->debugMode ) {
|
288 |
+
trigger_error(
|
289 |
+
sprintf(
|
290 |
+
"Can't to read the Version header for %s. The filename is incorrect or is not a plugin.",
|
291 |
+
$this->pluginFile
|
292 |
+
),
|
293 |
+
E_USER_WARNING
|
294 |
+
);
|
295 |
+
}
|
296 |
+
return null;
|
297 |
+
}
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Check for plugin updates.
|
302 |
+
* The results are stored in the DB option specified in $optionName.
|
303 |
+
*
|
304 |
+
* @return PluginUpdate|null
|
305 |
+
*/
|
306 |
+
public function checkForUpdates(){
|
307 |
+
$installedVersion = $this->getInstalledVersion();
|
308 |
+
//Fail silently if we can't find the plugin or read its header.
|
309 |
+
if ( $installedVersion === null ) {
|
310 |
+
if ( $this->debugMode ) {
|
311 |
+
trigger_error(
|
312 |
+
sprintf('Skipping update check for %s - installed version unknown.', $this->pluginFile),
|
313 |
+
E_USER_WARNING
|
314 |
+
);
|
315 |
+
}
|
316 |
+
return null;
|
317 |
+
}
|
318 |
+
|
319 |
+
$state = $this->getUpdateState();
|
320 |
+
if ( empty($state) ){
|
321 |
+
$state = new StdClass;
|
322 |
+
$state->lastCheck = 0;
|
323 |
+
$state->checkedVersion = '';
|
324 |
+
$state->update = null;
|
325 |
+
}
|
326 |
+
|
327 |
+
$state->lastCheck = time();
|
328 |
+
$state->checkedVersion = $installedVersion;
|
329 |
+
$this->setUpdateState($state); //Save before checking in case something goes wrong
|
330 |
+
|
331 |
+
$state->update = $this->requestUpdate();
|
332 |
+
$this->setUpdateState($state);
|
333 |
+
|
334 |
+
return $this->getUpdate();
|
335 |
+
}
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Check for updates if the configured check interval has already elapsed.
|
339 |
+
* Will use a shorter check interval on certain admin pages like "Dashboard -> Updates" or when doing cron.
|
340 |
+
*
|
341 |
+
* You can override the default behaviour by using the "puc_check_now-$slug" filter.
|
342 |
+
* The filter callback will be passed three parameters:
|
343 |
+
* - Current decision. TRUE = check updates now, FALSE = don't check now.
|
344 |
+
* - Last check time as a Unix timestamp.
|
345 |
+
* - Configured check period in hours.
|
346 |
+
* Return TRUE to check for updates immediately, or FALSE to cancel.
|
347 |
+
*
|
348 |
+
* This method is declared public because it's a hook callback. Calling it directly is not recommended.
|
349 |
+
*/
|
350 |
+
public function maybeCheckForUpdates(){
|
351 |
+
if ( empty($this->checkPeriod) ){
|
352 |
+
return;
|
353 |
+
}
|
354 |
+
|
355 |
+
if ( current_filter() == 'load-update-core.php' ) {
|
356 |
+
//Check more often when the user visits Dashboard -> Updates.
|
357 |
+
$timeout = 60;
|
358 |
+
} else if ( $this->throttleRedundantChecks && ($this->getUpdate() !== null) ) {
|
359 |
+
//Check less frequently if it's already known that an update is available.
|
360 |
+
$timeout = $this->throttledCheckPeriod * 3600;
|
361 |
+
} else if ( defined('DOING_CRON') && constant('DOING_CRON') ) {
|
362 |
+
//WordPress cron schedules are not exact, so lets do an update check even
|
363 |
+
//if slightly less than $checkPeriod hours have elapsed since the last check.
|
364 |
+
$cronFuzziness = 20 * 60;
|
365 |
+
$timeout = $this->checkPeriod * 3600 - $cronFuzziness;
|
366 |
+
} else {
|
367 |
+
$timeout = $this->checkPeriod * 3600;
|
368 |
+
}
|
369 |
+
|
370 |
+
$state = $this->getUpdateState();
|
371 |
+
$shouldCheck =
|
372 |
+
empty($state) ||
|
373 |
+
!isset($state->lastCheck) ||
|
374 |
+
( (time() - $state->lastCheck) >= $timeout );
|
375 |
+
|
376 |
+
//Let plugin authors substitute their own algorithm.
|
377 |
+
$shouldCheck = apply_filters(
|
378 |
+
'puc_check_now-' . $this->slug,
|
379 |
+
$shouldCheck,
|
380 |
+
(!empty($state) && isset($state->lastCheck)) ? $state->lastCheck : 0,
|
381 |
+
$this->checkPeriod
|
382 |
+
);
|
383 |
+
|
384 |
+
if ( $shouldCheck ){
|
385 |
+
$this->checkForUpdates();
|
386 |
+
}
|
387 |
+
}
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Load the update checker state from the DB.
|
391 |
+
*
|
392 |
+
* @return StdClass|null
|
393 |
+
*/
|
394 |
+
public function getUpdateState() {
|
395 |
+
$state = get_site_option($this->optionName, null);
|
396 |
+
if ( empty($state) || !is_object($state)) {
|
397 |
+
$state = null;
|
398 |
+
}
|
399 |
+
|
400 |
+
if ( !empty($state) && isset($state->update) && is_object($state->update) ){
|
401 |
+
$state->update = PluginUpdate_1_3::fromObject($state->update);
|
402 |
+
}
|
403 |
+
return $state;
|
404 |
+
}
|
405 |
+
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Persist the update checker state to the DB.
|
409 |
+
*
|
410 |
+
* @param StdClass $state
|
411 |
+
* @return void
|
412 |
+
*/
|
413 |
+
private function setUpdateState($state) {
|
414 |
+
if ( isset($state->update) && is_object($state->update) && method_exists($state->update, 'toStdClass') ) {
|
415 |
+
$update = $state->update; /** @var PluginUpdate $update */
|
416 |
+
$state->update = $update->toStdClass();
|
417 |
+
}
|
418 |
+
update_site_option($this->optionName, $state);
|
419 |
+
}
|
420 |
+
|
421 |
+
/**
|
422 |
+
* Reset update checker state - i.e. last check time, cached update data and so on.
|
423 |
+
*
|
424 |
+
* Call this when your plugin is being uninstalled, or if you want to
|
425 |
+
* clear the update cache.
|
426 |
+
*/
|
427 |
+
public function resetUpdateState() {
|
428 |
+
delete_site_option($this->optionName);
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Intercept plugins_api() calls that request information about our plugin and
|
433 |
+
* use the configured API endpoint to satisfy them.
|
434 |
+
*
|
435 |
+
* @see plugins_api()
|
436 |
+
*
|
437 |
+
* @param mixed $result
|
438 |
+
* @param string $action
|
439 |
+
* @param array|object $args
|
440 |
+
* @return mixed
|
441 |
+
*/
|
442 |
+
public function injectInfo($result, $action = null, $args = null){
|
443 |
+
$relevant = ($action == 'plugin_information') && isset($args->slug) && ($args->slug == $this->slug);
|
444 |
+
if ( !$relevant ){
|
445 |
+
return $result;
|
446 |
+
}
|
447 |
+
|
448 |
+
$pluginInfo = $this->requestInfo();
|
449 |
+
$pluginInfo = apply_filters('puc_pre_inject_info-' . $this->slug, $pluginInfo);
|
450 |
+
if ($pluginInfo){
|
451 |
+
return $pluginInfo->toWpFormat();
|
452 |
+
}
|
453 |
+
|
454 |
+
return $result;
|
455 |
+
}
|
456 |
+
|
457 |
+
/**
|
458 |
+
* Insert the latest update (if any) into the update list maintained by WP.
|
459 |
+
*
|
460 |
+
* @param StdClass $updates Update list.
|
461 |
+
* @return StdClass Modified update list.
|
462 |
+
*/
|
463 |
+
public function injectUpdate($updates){
|
464 |
+
//Is there an update to insert?
|
465 |
+
$update = $this->getUpdate();
|
466 |
+
|
467 |
+
//No update notifications for mu-plugins unless explicitly enabled. The MU plugin file
|
468 |
+
//is usually different from the main plugin file so the update wouldn't show up properly anyway.
|
469 |
+
if ( !empty($update) && empty($this->muPluginFile) && $this->isMuPlugin() ) {
|
470 |
+
$update = null;
|
471 |
+
}
|
472 |
+
|
473 |
+
if ( !empty($update) ) {
|
474 |
+
//Let plugins filter the update info before it's passed on to WordPress.
|
475 |
+
$update = apply_filters('puc_pre_inject_update-' . $this->slug, $update);
|
476 |
+
if ( !is_object($updates) ) {
|
477 |
+
$updates = new StdClass();
|
478 |
+
$updates->response = array();
|
479 |
+
}
|
480 |
+
|
481 |
+
$wpUpdate = $update->toWpFormat();
|
482 |
+
$pluginFile = $this->pluginFile;
|
483 |
+
|
484 |
+
if ( $this->isMuPlugin() ) {
|
485 |
+
//WP does not support automatic update installation for mu-plugins, but we can still display a notice.
|
486 |
+
$wpUpdate->package = null;
|
487 |
+
$pluginFile = $this->muPluginFile;
|
488 |
+
}
|
489 |
+
$updates->response[$pluginFile] = $wpUpdate;
|
490 |
+
|
491 |
+
} else if ( isset($updates, $updates->response) ) {
|
492 |
+
unset($updates->response[$this->pluginFile]);
|
493 |
+
if ( !empty($this->muPluginFile) ) {
|
494 |
+
unset($updates->response[$this->muPluginFile]);
|
495 |
+
}
|
496 |
+
}
|
497 |
+
|
498 |
+
return $updates;
|
499 |
+
}
|
500 |
+
|
501 |
+
/**
|
502 |
+
* Get the details of the currently available update, if any.
|
503 |
+
*
|
504 |
+
* If no updates are available, or if the last known update version is below or equal
|
505 |
+
* to the currently installed version, this method will return NULL.
|
506 |
+
*
|
507 |
+
* Uses cached update data. To retrieve update information straight from
|
508 |
+
* the metadata URL, call requestUpdate() instead.
|
509 |
+
*
|
510 |
+
* @return PluginUpdate|null
|
511 |
+
*/
|
512 |
+
public function getUpdate() {
|
513 |
+
$state = $this->getUpdateState(); /** @var StdClass $state */
|
514 |
+
|
515 |
+
//Is there an update available insert?
|
516 |
+
if ( !empty($state) && isset($state->update) && !empty($state->update) ){
|
517 |
+
$update = $state->update;
|
518 |
+
//Check if the update is actually newer than the currently installed version.
|
519 |
+
$installedVersion = $this->getInstalledVersion();
|
520 |
+
if ( ($installedVersion !== null) && version_compare($update->version, $installedVersion, '>') ){
|
521 |
+
return $update;
|
522 |
+
}
|
523 |
+
}
|
524 |
+
return null;
|
525 |
+
}
|
526 |
+
|
527 |
+
/**
|
528 |
+
* Add a "Check for updates" link to the plugin row in the "Plugins" page. By default,
|
529 |
+
* the new link will appear after the "Visit plugin site" link.
|
530 |
+
*
|
531 |
+
* You can change the link text by using the "puc_manual_check_link-$slug" filter.
|
532 |
+
* Returning an empty string from the filter will disable the link.
|
533 |
+
*
|
534 |
+
* @param array $pluginMeta Array of meta links.
|
535 |
+
* @param string $pluginFile
|
536 |
+
* @return array
|
537 |
+
*/
|
538 |
+
public function addCheckForUpdatesLink($pluginMeta, $pluginFile) {
|
539 |
+
$isRelevant = ($pluginFile == $this->pluginFile)
|
540 |
+
|| (!empty($this->muPluginFile) && $pluginFile == $this->muPluginFile);
|
541 |
+
|
542 |
+
if ( $isRelevant && current_user_can('update_plugins') ) {
|
543 |
+
$linkUrl = wp_nonce_url(
|
544 |
+
add_query_arg(
|
545 |
+
array(
|
546 |
+
'puc_check_for_updates' => 1,
|
547 |
+
'puc_slug' => $this->slug,
|
548 |
+
),
|
549 |
+
is_network_admin() ? network_admin_url('plugins.php') : admin_url('plugins.php')
|
550 |
+
),
|
551 |
+
'puc_check_for_updates'
|
552 |
+
);
|
553 |
+
|
554 |
+
$linkText = apply_filters('puc_manual_check_link-' . $this->slug, 'Check for updates');
|
555 |
+
if ( !empty($linkText) ) {
|
556 |
+
$pluginMeta[] = sprintf('<a href="%s">%s</a>', esc_attr($linkUrl), $linkText);
|
557 |
+
}
|
558 |
+
}
|
559 |
+
return $pluginMeta;
|
560 |
+
}
|
561 |
+
|
562 |
+
/**
|
563 |
+
* Check for updates when the user clicks the "Check for updates" link.
|
564 |
+
* @see self::addCheckForUpdatesLink()
|
565 |
+
*
|
566 |
+
* @return void
|
567 |
+
*/
|
568 |
+
public function handleManualCheck() {
|
569 |
+
$shouldCheck =
|
570 |
+
isset($_GET['puc_check_for_updates'], $_GET['puc_slug'])
|
571 |
+
&& $_GET['puc_slug'] == $this->slug
|
572 |
+
&& current_user_can('update_plugins')
|
573 |
+
&& check_admin_referer('puc_check_for_updates');
|
574 |
+
|
575 |
+
if ( $shouldCheck ) {
|
576 |
+
$update = $this->checkForUpdates();
|
577 |
+
$status = ($update === null) ? 'no_update' : 'update_available';
|
578 |
+
wp_redirect(add_query_arg(
|
579 |
+
array(
|
580 |
+
'puc_update_check_result' => $status,
|
581 |
+
'puc_slug' => $this->slug,
|
582 |
+
),
|
583 |
+
is_network_admin() ? network_admin_url('plugins.php') : admin_url('plugins.php')
|
584 |
+
));
|
585 |
+
}
|
586 |
+
}
|
587 |
+
|
588 |
+
/**
|
589 |
+
* Display the results of a manual update check.
|
590 |
+
* @see self::handleManualCheck()
|
591 |
+
*
|
592 |
+
* You can change the result message by using the "puc_manual_check_message-$slug" filter.
|
593 |
+
*/
|
594 |
+
public function displayManualCheckResult() {
|
595 |
+
if ( isset($_GET['puc_update_check_result'], $_GET['puc_slug']) && ($_GET['puc_slug'] == $this->slug) ) {
|
596 |
+
$status = strval($_GET['puc_update_check_result']);
|
597 |
+
if ( $status == 'no_update' ) {
|
598 |
+
$message = 'This plugin is up to date.';
|
599 |
+
} else if ( $status == 'update_available' ) {
|
600 |
+
$message = 'A new version of this plugin is available.';
|
601 |
+
} else {
|
602 |
+
$message = sprintf('Unknown update checker status "%s"', htmlentities($status));
|
603 |
+
}
|
604 |
+
printf(
|
605 |
+
'<div class="updated"><p>%s</p></div>',
|
606 |
+
apply_filters('puc_manual_check_message-' . $this->slug, $message, $status)
|
607 |
+
);
|
608 |
+
}
|
609 |
+
}
|
610 |
+
|
611 |
+
/**
|
612 |
+
* Check if the plugin file is inside the mu-plugins directory.
|
613 |
+
*
|
614 |
+
* @return bool
|
615 |
+
*/
|
616 |
+
protected function isMuPlugin() {
|
617 |
+
static $cachedResult = null;
|
618 |
+
|
619 |
+
if ( $cachedResult === null ) {
|
620 |
+
//Convert both paths to the canonical form before comparison.
|
621 |
+
$muPluginDir = realpath(WPMU_PLUGIN_DIR);
|
622 |
+
$pluginPath = realpath($this->pluginAbsolutePath);
|
623 |
+
|
624 |
+
$cachedResult = (strpos($pluginPath, $muPluginDir) === 0);
|
625 |
+
}
|
626 |
+
|
627 |
+
return $cachedResult;
|
628 |
+
}
|
629 |
+
|
630 |
+
/**
|
631 |
+
* Clear the cached plugin version. This method can be set up as a filter (hook) and will
|
632 |
+
* return the filter argument unmodified.
|
633 |
+
*
|
634 |
+
* @param mixed $filterArgument
|
635 |
+
* @return mixed
|
636 |
+
*/
|
637 |
+
public function clearCachedVersion($filterArgument = null) {
|
638 |
+
$this->cachedInstalledVersion = null;
|
639 |
+
return $filterArgument;
|
640 |
+
}
|
641 |
+
|
642 |
+
/**
|
643 |
+
* Register a callback for filtering query arguments.
|
644 |
+
*
|
645 |
+
* The callback function should take one argument - an associative array of query arguments.
|
646 |
+
* It should return a modified array of query arguments.
|
647 |
+
*
|
648 |
+
* @uses add_filter() This method is a convenience wrapper for add_filter().
|
649 |
+
*
|
650 |
+
* @param callable $callback
|
651 |
+
* @return void
|
652 |
+
*/
|
653 |
+
public function addQueryArgFilter($callback){
|
654 |
+
add_filter('puc_request_info_query_args-'.$this->slug, $callback);
|
655 |
+
}
|
656 |
+
|
657 |
+
/**
|
658 |
+
* Register a callback for filtering arguments passed to wp_remote_get().
|
659 |
+
*
|
660 |
+
* The callback function should take one argument - an associative array of arguments -
|
661 |
+
* and return a modified array or arguments. See the WP documentation on wp_remote_get()
|
662 |
+
* for details on what arguments are available and how they work.
|
663 |
+
*
|
664 |
+
* @uses add_filter() This method is a convenience wrapper for add_filter().
|
665 |
+
*
|
666 |
+
* @param callable $callback
|
667 |
+
* @return void
|
668 |
+
*/
|
669 |
+
public function addHttpRequestArgFilter($callback){
|
670 |
+
add_filter('puc_request_info_options-'.$this->slug, $callback);
|
671 |
+
}
|
672 |
+
|
673 |
+
/**
|
674 |
+
* Register a callback for filtering the plugin info retrieved from the external API.
|
675 |
+
*
|
676 |
+
* The callback function should take two arguments. If the plugin info was retrieved
|
677 |
+
* successfully, the first argument passed will be an instance of PluginInfo. Otherwise,
|
678 |
+
* it will be NULL. The second argument will be the corresponding return value of
|
679 |
+
* wp_remote_get (see WP docs for details).
|
680 |
+
*
|
681 |
+
* The callback function should return a new or modified instance of PluginInfo or NULL.
|
682 |
+
*
|
683 |
+
* @uses add_filter() This method is a convenience wrapper for add_filter().
|
684 |
+
*
|
685 |
+
* @param callable $callback
|
686 |
+
* @return void
|
687 |
+
*/
|
688 |
+
public function addResultFilter($callback){
|
689 |
+
add_filter('puc_request_info_result-'.$this->slug, $callback, 10, 2);
|
690 |
+
}
|
691 |
+
|
692 |
+
/**
|
693 |
+
* Register a callback for one of the update checker filters.
|
694 |
+
*
|
695 |
+
* Identical to add_filter(), except it automatically adds the "puc_" prefix
|
696 |
+
* and the "-$plugin_slug" suffix to the filter name. For example, "request_info_result"
|
697 |
+
* becomes "puc_request_info_result-your_plugin_slug".
|
698 |
+
*
|
699 |
+
* @param string $tag
|
700 |
+
* @param callable $callback
|
701 |
+
* @param int $priority
|
702 |
+
* @param int $acceptedArgs
|
703 |
+
*/
|
704 |
+
public function addFilter($tag, $callback, $priority = 10, $acceptedArgs = 1) {
|
705 |
+
add_filter('puc_' . $tag . '-' . $this->slug, $callback, $priority, $acceptedArgs);
|
706 |
+
}
|
707 |
+
|
708 |
+
/**
|
709 |
+
* Initialize the update checker Debug Bar plugin/add-on thingy.
|
710 |
+
*/
|
711 |
+
public function initDebugBarPanel() {
|
712 |
+
if ( class_exists('Debug_Bar') ) {
|
713 |
+
require_once dirname(__FILE__) . '/debug-bar-plugin.php';
|
714 |
+
$this->debugBarPlugin = new PucDebugBarPlugin($this);
|
715 |
+
}
|
716 |
+
}
|
717 |
+
}
|
718 |
+
|
719 |
+
endif;
|
720 |
+
|
721 |
+
if ( !class_exists('PluginInfo_1_3') ):
|
722 |
+
|
723 |
+
/**
|
724 |
+
* A container class for holding and transforming various plugin metadata.
|
725 |
+
*
|
726 |
+
* @author Janis Elsts
|
727 |
+
* @copyright 2012
|
728 |
+
* @version 1.3
|
729 |
+
* @access public
|
730 |
+
*/
|
731 |
+
class PluginInfo_1_3 {
|
732 |
+
//Most fields map directly to the contents of the plugin's info.json file.
|
733 |
+
//See the relevant docs for a description of their meaning.
|
734 |
+
public $name;
|
735 |
+
public $slug;
|
736 |
+
public $version;
|
737 |
+
public $homepage;
|
738 |
+
public $sections;
|
739 |
+
public $download_url;
|
740 |
+
|
741 |
+
public $author;
|
742 |
+
public $author_homepage;
|
743 |
+
|
744 |
+
public $requires;
|
745 |
+
public $tested;
|
746 |
+
public $upgrade_notice;
|
747 |
+
|
748 |
+
public $rating;
|
749 |
+
public $num_ratings;
|
750 |
+
public $downloaded;
|
751 |
+
public $last_updated;
|
752 |
+
|
753 |
+
public $id = 0; //The native WP.org API returns numeric plugin IDs, but they're not used for anything.
|
754 |
+
|
755 |
+
/**
|
756 |
+
* Create a new instance of PluginInfo from JSON-encoded plugin info
|
757 |
+
* returned by an external update API.
|
758 |
+
*
|
759 |
+
* @param string $json Valid JSON string representing plugin info.
|
760 |
+
* @param bool $triggerErrors
|
761 |
+
* @return PluginInfo|null New instance of PluginInfo, or NULL on error.
|
762 |
+
*/
|
763 |
+
public static function fromJson($json, $triggerErrors = false){
|
764 |
+
/** @var StdClass $apiResponse */
|
765 |
+
$apiResponse = json_decode($json);
|
766 |
+
if ( empty($apiResponse) || !is_object($apiResponse) ){
|
767 |
+
if ( $triggerErrors ) {
|
768 |
+
trigger_error(
|
769 |
+
"Failed to parse plugin metadata. Try validating your .json file with http://jsonlint.com/",
|
770 |
+
E_USER_NOTICE
|
771 |
+
);
|
772 |
+
}
|
773 |
+
return null;
|
774 |
+
}
|
775 |
+
|
776 |
+
//Very, very basic validation.
|
777 |
+
$valid = isset($apiResponse->name) && !empty($apiResponse->name) && isset($apiResponse->version) && !empty($apiResponse->version);
|
778 |
+
if ( !$valid ){
|
779 |
+
if ( $triggerErrors ) {
|
780 |
+
trigger_error(
|
781 |
+
"The plugin metadata file does not contain the required 'name' and/or 'version' keys.",
|
782 |
+
E_USER_NOTICE
|
783 |
+
);
|
784 |
+
}
|
785 |
+
return null;
|
786 |
+
}
|
787 |
+
|
788 |
+
$info = new self();
|
789 |
+
foreach(get_object_vars($apiResponse) as $key => $value){
|
790 |
+
$info->$key = $value;
|
791 |
+
}
|
792 |
+
|
793 |
+
return $info;
|
794 |
+
}
|
795 |
+
|
796 |
+
/**
|
797 |
+
* Transform plugin info into the format used by the native WordPress.org API
|
798 |
+
*
|
799 |
+
* @return object
|
800 |
+
*/
|
801 |
+
public function toWpFormat(){
|
802 |
+
$info = new StdClass;
|
803 |
+
|
804 |
+
//The custom update API is built so that many fields have the same name and format
|
805 |
+
//as those returned by the native WordPress.org API. These can be assigned directly.
|
806 |
+
$sameFormat = array(
|
807 |
+
'name', 'slug', 'version', 'requires', 'tested', 'rating', 'upgrade_notice',
|
808 |
+
'num_ratings', 'downloaded', 'homepage', 'last_updated',
|
809 |
+
);
|
810 |
+
foreach($sameFormat as $field){
|
811 |
+
if ( isset($this->$field) ) {
|
812 |
+
$info->$field = $this->$field;
|
813 |
+
} else {
|
814 |
+
$info->$field = null;
|
815 |
+
}
|
816 |
+
}
|
817 |
+
|
818 |
+
//Other fields need to be renamed and/or transformed.
|
819 |
+
$info->download_link = $this->download_url;
|
820 |
+
|
821 |
+
if ( !empty($this->author_homepage) ){
|
822 |
+
$info->author = sprintf('<a href="%s">%s</a>', $this->author_homepage, $this->author);
|
823 |
+
} else {
|
824 |
+
$info->author = $this->author;
|
825 |
+
}
|
826 |
+
|
827 |
+
if ( is_object($this->sections) ){
|
828 |
+
$info->sections = get_object_vars($this->sections);
|
829 |
+
} elseif ( is_array($this->sections) ) {
|
830 |
+
$info->sections = $this->sections;
|
831 |
+
} else {
|
832 |
+
$info->sections = array('description' => '');
|
833 |
+
}
|
834 |
+
|
835 |
+
return $info;
|
836 |
+
}
|
837 |
+
}
|
838 |
+
|
839 |
+
endif;
|
840 |
+
|
841 |
+
if ( !class_exists('PluginUpdate_1_3') ):
|
842 |
+
|
843 |
+
/**
|
844 |
+
* A simple container class for holding information about an available update.
|
845 |
+
*
|
846 |
+
* @author Janis Elsts
|
847 |
+
* @copyright 2012
|
848 |
+
* @version 1.2
|
849 |
+
* @access public
|
850 |
+
*/
|
851 |
+
class PluginUpdate_1_3 {
|
852 |
+
public $id = 0;
|
853 |
+
public $slug;
|
854 |
+
public $version;
|
855 |
+
public $homepage;
|
856 |
+
public $download_url;
|
857 |
+
public $upgrade_notice;
|
858 |
+
private static $fields = array('id', 'slug', 'version', 'homepage', 'download_url', 'upgrade_notice');
|
859 |
+
|
860 |
+
/**
|
861 |
+
* Create a new instance of PluginUpdate from its JSON-encoded representation.
|
862 |
+
*
|
863 |
+
* @param string $json
|
864 |
+
* @param bool $triggerErrors
|
865 |
+
* @return PluginUpdate|null
|
866 |
+
*/
|
867 |
+
public static function fromJson($json, $triggerErrors = false){
|
868 |
+
//Since update-related information is simply a subset of the full plugin info,
|
869 |
+
//we can parse the update JSON as if it was a plugin info string, then copy over
|
870 |
+
//the parts that we care about.
|
871 |
+
$pluginInfo = PluginInfo_1_3::fromJson($json, $triggerErrors);
|
872 |
+
if ( $pluginInfo != null ) {
|
873 |
+
return self::fromPluginInfo($pluginInfo);
|
874 |
+
} else {
|
875 |
+
return null;
|
876 |
+
}
|
877 |
+
}
|
878 |
+
|
879 |
+
/**
|
880 |
+
* Create a new instance of PluginUpdate based on an instance of PluginInfo.
|
881 |
+
* Basically, this just copies a subset of fields from one object to another.
|
882 |
+
*
|
883 |
+
* @param PluginInfo $info
|
884 |
+
* @return PluginUpdate
|
885 |
+
*/
|
886 |
+
public static function fromPluginInfo($info){
|
887 |
+
return self::fromObject($info);
|
888 |
+
}
|
889 |
+
|
890 |
+
/**
|
891 |
+
* Create a new instance of PluginUpdate by copying the necessary fields from
|
892 |
+
* another object.
|
893 |
+
*
|
894 |
+
* @param StdClass|PluginInfo|PluginUpdate $object The source object.
|
895 |
+
* @return PluginUpdate The new copy.
|
896 |
+
*/
|
897 |
+
public static function fromObject($object) {
|
898 |
+
$update = new self();
|
899 |
+
$fields = self::$fields;
|
900 |
+
if (!empty($object->slug)) $fields = apply_filters('puc_retain_fields-'.$object->slug, $fields);
|
901 |
+
foreach($fields as $field){
|
902 |
+
if (property_exists($object, $field)) {
|
903 |
+
$update->$field = $object->$field;
|
904 |
+
}
|
905 |
+
}
|
906 |
+
return $update;
|
907 |
+
}
|
908 |
+
|
909 |
+
/**
|
910 |
+
* Create an instance of StdClass that can later be converted back to
|
911 |
+
* a PluginUpdate. Useful for serialization and caching, as it avoids
|
912 |
+
* the "incomplete object" problem if the cached value is loaded before
|
913 |
+
* this class.
|
914 |
+
*
|
915 |
+
* @return StdClass
|
916 |
+
*/
|
917 |
+
public function toStdClass() {
|
918 |
+
$object = new StdClass();
|
919 |
+
$fields = self::$fields;
|
920 |
+
if (!empty($this->slug)) $fields = apply_filters('puc_retain_fields-'.$this->slug, $fields);
|
921 |
+
foreach($fields as $field){
|
922 |
+
if (property_exists($this, $field)) {
|
923 |
+
$object->$field = $this->$field;
|
924 |
+
}
|
925 |
+
}
|
926 |
+
return $object;
|
927 |
+
}
|
928 |
+
|
929 |
+
|
930 |
+
/**
|
931 |
+
* Transform the update into the format used by WordPress native plugin API.
|
932 |
+
*
|
933 |
+
* @return object
|
934 |
+
*/
|
935 |
+
public function toWpFormat(){
|
936 |
+
$update = new StdClass;
|
937 |
+
|
938 |
+
$update->id = $this->id;
|
939 |
+
$update->slug = $this->slug;
|
940 |
+
$update->new_version = $this->version;
|
941 |
+
$update->url = $this->homepage;
|
942 |
+
$update->package = $this->download_url;
|
943 |
+
if ( !empty($this->upgrade_notice) ){
|
944 |
+
$update->upgrade_notice = $this->upgrade_notice;
|
945 |
+
}
|
946 |
+
|
947 |
+
return $update;
|
948 |
+
}
|
949 |
+
}
|
950 |
+
|
951 |
+
endif;
|
952 |
+
|
953 |
+
if ( !class_exists('PucFactory') ):
|
954 |
+
|
955 |
+
/**
|
956 |
+
* A factory that builds instances of other classes from this library.
|
957 |
+
*
|
958 |
+
* When multiple versions of the same class have been loaded (e.g. PluginUpdateChecker 1.2
|
959 |
+
* and 1.3), this factory will always use the latest available version. Register class
|
960 |
+
* versions by calling {@link PucFactory::addVersion()}.
|
961 |
+
*
|
962 |
+
* At the moment it can only build instances of the PluginUpdateChecker class. Other classes
|
963 |
+
* are intended mainly for internal use and refer directly to specific implementations. If you
|
964 |
+
* want to instantiate one of them anyway, you can use {@link PucFactory::getLatestClassVersion()}
|
965 |
+
* to get the class name and then create it with <code>new $class(...)</code>.
|
966 |
+
*/
|
967 |
+
class PucFactory {
|
968 |
+
protected static $classVersions = array();
|
969 |
+
protected static $sorted = false;
|
970 |
+
|
971 |
+
/**
|
972 |
+
* Create a new instance of PluginUpdateChecker.
|
973 |
+
*
|
974 |
+
* @see PluginUpdateChecker::__construct()
|
975 |
+
*
|
976 |
+
* @param $metadataUrl
|
977 |
+
* @param $pluginFile
|
978 |
+
* @param string $slug
|
979 |
+
* @param int $checkPeriod
|
980 |
+
* @param string $optionName
|
981 |
+
* @param string $muPluginFile
|
982 |
+
* @return PluginUpdateChecker
|
983 |
+
*/
|
984 |
+
public static function buildUpdateChecker($metadataUrl, $pluginFile, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = '') {
|
985 |
+
$class = self::getLatestClassVersion('PluginUpdateChecker');
|
986 |
+
return new $class($metadataUrl, $pluginFile, $slug, $checkPeriod, $optionName, $muPluginFile);
|
987 |
+
}
|
988 |
+
|
989 |
+
/**
|
990 |
+
* Get the specific class name for the latest available version of a class.
|
991 |
+
*
|
992 |
+
* @param string $class
|
993 |
+
* @return string|null
|
994 |
+
*/
|
995 |
+
public static function getLatestClassVersion($class) {
|
996 |
+
if ( !self::$sorted ) {
|
997 |
+
self::sortVersions();
|
998 |
+
}
|
999 |
+
|
1000 |
+
if ( isset(self::$classVersions[$class]) ) {
|
1001 |
+
return reset(self::$classVersions[$class]);
|
1002 |
+
} else {
|
1003 |
+
return null;
|
1004 |
+
}
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
/**
|
1008 |
+
* Sort available class versions in descending order (i.e. newest first).
|
1009 |
+
*/
|
1010 |
+
protected static function sortVersions() {
|
1011 |
+
foreach ( self::$classVersions as $class => $versions ) {
|
1012 |
+
uksort($versions, array(__CLASS__, 'compareVersions'));
|
1013 |
+
self::$classVersions[$class] = $versions;
|
1014 |
+
}
|
1015 |
+
self::$sorted = true;
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
protected static function compareVersions($a, $b) {
|
1019 |
+
return -version_compare($a, $b);
|
1020 |
+
}
|
1021 |
+
|
1022 |
+
/**
|
1023 |
+
* Register a version of a class.
|
1024 |
+
*
|
1025 |
+
* @access private This method is only for internal use by the library.
|
1026 |
+
*
|
1027 |
+
* @param string $generalClass Class name without version numbers, e.g. 'PluginUpdateChecker'.
|
1028 |
+
* @param string $versionedClass Actual class name, e.g. 'PluginUpdateChecker_1_2'.
|
1029 |
+
* @param string $version Version number, e.g. '1.2'.
|
1030 |
+
*/
|
1031 |
+
public static function addVersion($generalClass, $versionedClass, $version) {
|
1032 |
+
if ( !isset(self::$classVersions[$generalClass]) ) {
|
1033 |
+
self::$classVersions[$generalClass] = array();
|
1034 |
+
}
|
1035 |
+
self::$classVersions[$generalClass][$version] = $versionedClass;
|
1036 |
+
self::$sorted = false;
|
1037 |
+
}
|
1038 |
+
}
|
1039 |
+
|
1040 |
+
endif;
|
1041 |
+
|
1042 |
+
//Register classes defined in this file with the factory.
|
1043 |
+
PucFactory::addVersion('PluginUpdateChecker', 'PluginUpdateChecker_1_5', '1.5');
|
1044 |
+
PucFactory::addVersion('PluginUpdate', 'PluginUpdate_1_3', '1.3');
|
1045 |
+
PucFactory::addVersion('PluginInfo', 'PluginInfo_1_3', '1.3');
|
1046 |
+
|
1047 |
+
/**
|
1048 |
+
* Create non-versioned variants of the update checker classes. This allows for backwards
|
1049 |
+
* compatibility with versions that did not use a factory, and it simplifies doc-comments.
|
1050 |
+
*/
|
1051 |
+
if ( !class_exists('PluginUpdateChecker') ) {
|
1052 |
+
class PluginUpdateChecker extends PluginUpdateChecker_1_5 { }
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
if ( !class_exists('PluginUpdate') ) {
|
1056 |
+
class PluginUpdate extends PluginUpdate_1_3 {}
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
if ( !class_exists('PluginInfo') ) {
|
1060 |
+
class PluginInfo extends PluginInfo_1_3 {}
|
1061 |
+
}
|
init.php
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// General Functions
|
4 |
+
require EMCORE_DIR.'/includes/functions.php';
|
5 |
+
require EMCORE_DIR.'/includes/shortcodes.php';
|
6 |
+
require EMCORE_DIR.'/includes/deprecated.php';
|
7 |
+
|
8 |
+
|
9 |
+
require EMCORE_DIR.'/classes/controller.php';
|
10 |
+
require EMCORE_DIR.'/classes/model.php';
|
11 |
+
require EMCORE_DIR.'/classes/view.php';
|
12 |
+
|
13 |
+
// General Models
|
14 |
+
require EMCORE_DIR.'/classes/model/modal.php';
|
15 |
+
require EMCORE_DIR.'/classes/model/modal/meta.php';
|
16 |
+
require EMCORE_DIR.'/classes/model/theme.php';
|
17 |
+
require EMCORE_DIR.'/classes/model/theme/meta.php';
|
18 |
+
|
19 |
+
// Core Addons
|
20 |
+
require EMCORE_DIR.'/addons/gravityforms.php';
|
21 |
+
|
22 |
+
|
23 |
+
if(is_admin())
|
24 |
+
{
|
25 |
+
require EMCORE_DIR.'/classes/migrate.php';
|
26 |
+
|
27 |
+
// General Functions and Content
|
28 |
+
require EMCORE_DIR.'/includes/admin/sidebar.php';
|
29 |
+
require EMCORE_DIR.'/includes/admin/footer.php';
|
30 |
+
require EMCORE_DIR.'/includes/admin/content.php';
|
31 |
+
require EMCORE_DIR.'/includes/admin/functions.php';
|
32 |
+
|
33 |
+
// API
|
34 |
+
require EMCORE_DIR.'/classes/license.php';
|
35 |
+
require EMCORE_DIR.'/includes/updates/plugin-update-checker.php';
|
36 |
+
|
37 |
+
// Selectbox and Other Default Options
|
38 |
+
require EMCORE_DIR.'/includes/admin/options.php';
|
39 |
+
|
40 |
+
// Form Tabs
|
41 |
+
require EMCORE_DIR.'/includes/admin/modal-form-general-tab.php';
|
42 |
+
require EMCORE_DIR.'/includes/admin/modal-form-display-tab.php';
|
43 |
+
require EMCORE_DIR.'/includes/admin/modal-form-close-tab.php';
|
44 |
+
require EMCORE_DIR.'/includes/admin/modal-form-example-tab.php';
|
45 |
+
|
46 |
+
// Theme Tabs
|
47 |
+
require EMCORE_DIR.'/includes/admin/theme-form-general-tab.php';
|
48 |
+
require EMCORE_DIR.'/includes/admin/theme-form-overlay-tab.php';
|
49 |
+
require EMCORE_DIR.'/includes/admin/theme-form-close-tab.php';
|
50 |
+
require EMCORE_DIR.'/includes/admin/theme-form-container-tab.php';
|
51 |
+
require EMCORE_DIR.'/includes/admin/theme-form-content-tab.php';
|
52 |
+
require EMCORE_DIR.'/includes/admin/theme-form-title-tab.php';
|
53 |
+
|
54 |
+
// Settings Tabs
|
55 |
+
require EMCORE_DIR.'/includes/admin/settings-form-general-tab.php';
|
56 |
+
|
57 |
+
// Addons Tabs
|
58 |
+
require EMCORE_DIR.'/includes/admin/addon-pro-tab.php';
|
59 |
+
|
60 |
+
// Help Tabs
|
61 |
+
require EMCORE_DIR.'/includes/admin/help-general-tab.php';
|
62 |
+
|
63 |
+
|
64 |
+
// Post Meta Boxes
|
65 |
+
require EMCORE_DIR.'/includes/admin/postmeta.php';
|
66 |
+
|
67 |
+
//
|
68 |
+
require EMCORE_DIR.'/classes/admin.php';
|
69 |
+
require EMCORE_DIR.'/classes/admin/menu.php';
|
70 |
+
require EMCORE_DIR.'/classes/admin/notice.php';
|
71 |
+
require EMCORE_DIR.'/classes/admin/postmeta.php';
|
72 |
+
require EMCORE_DIR.'/classes/admin/editor.php';
|
73 |
+
|
74 |
+
// Controllers
|
75 |
+
require EMCORE_DIR.'/classes/controller/admin/modals.php';
|
76 |
+
require EMCORE_DIR.'/classes/controller/admin/theme.php';
|
77 |
+
require EMCORE_DIR.'/classes/controller/admin/settings.php';
|
78 |
+
require EMCORE_DIR.'/classes/controller/admin/addons.php';
|
79 |
+
require EMCORE_DIR.'/classes/controller/admin/help.php';
|
80 |
+
|
81 |
+
// Views
|
82 |
+
require EMCORE_DIR.'/classes/view/admin/modal/form.php';
|
83 |
+
require EMCORE_DIR.'/classes/view/admin/modal/index.php';
|
84 |
+
require EMCORE_DIR.'/classes/view/admin/theme/form.php';
|
85 |
+
require EMCORE_DIR.'/classes/view/admin/settings/form.php';
|
86 |
+
require EMCORE_DIR.'/classes/view/admin/addons.php';
|
87 |
+
require EMCORE_DIR.'/classes/view/admin/help.php';
|
88 |
+
}
|
89 |
+
else
|
90 |
+
{
|
91 |
+
require EMCORE_DIR.'/classes/modals.php';
|
92 |
+
require EMCORE_DIR.'/classes/site.php';
|
93 |
+
require EMCORE_DIR.'/classes/view/modal.php';
|
94 |
+
}
|
95 |
+
|
languages/easy-modal-en_US.mo
ADDED
Binary file
|
languages/easy-modal-en_US.po
ADDED
@@ -0,0 +1,892 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Easy Modal\n"
|
4 |
+
"POT-Creation-Date: 2014-07-05 21:57-0500\n"
|
5 |
+
"PO-Revision-Date: 2014-07-05 21:57-0500\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: en_US\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.6\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
16 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
17 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
|
21 |
+
#: classes/admin.php:53 classes/admin/menu.php:52 classes/admin/menu.php:53
|
22 |
+
msgid "Settings"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: classes/admin.php:55
|
26 |
+
msgid "Go Pro"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: classes/admin/api.php:151
|
30 |
+
msgid "An Unexpected HTTP Error occurred during the API request."
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: classes/admin/api.php:158
|
34 |
+
msgid "An unknown error occurred"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: classes/admin/menu.php:30 classes/admin/menu.php:31
|
38 |
+
#: classes/controller/admin/modals.php:45
|
39 |
+
msgid "Modals"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: classes/admin/menu.php:41 classes/admin/menu.php:42
|
43 |
+
msgid "Theme"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: classes/admin/menu.php:63 classes/admin/menu.php:64
|
47 |
+
msgid "Help"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: classes/controller/admin/modals.php:61
|
51 |
+
msgid "Modal Updated."
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: classes/controller/admin/modals.php:61
|
55 |
+
msgid "Modal Created."
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: classes/controller/admin/modals.php:65
|
59 |
+
msgid "Edit Modal"
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: classes/controller/admin/modals.php:65
|
63 |
+
msgid "Add New Modal"
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: classes/controller/admin/modals.php:80
|
67 |
+
msgid "Modal cloned successfully"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: classes/controller/admin/modals.php:106
|
71 |
+
msgid " modals moved to the trash"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: classes/controller/admin/modals.php:118
|
75 |
+
msgid "Modal trash has been permanantly removed."
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: classes/controller/admin/modals.php:143
|
79 |
+
msgid " modal restored from trash."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: classes/controller/admin/settings.php:33
|
83 |
+
msgid "Settings Updated."
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: classes/controller/admin/settings.php:37
|
87 |
+
msgid "Easy Modal Settings"
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: classes/controller/admin/theme.php:29
|
91 |
+
msgid "Theme Updated."
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: classes/controller/admin/theme.php:33
|
95 |
+
msgid "Edit Theme"
|
96 |
+
msgstr ""
|
97 |
+
|
98 |
+
#: classes/view/admin/modal/form.php:9 classes/view/admin/modal/index.php:9
|
99 |
+
#: classes/view/admin/theme/form.php:9
|
100 |
+
msgid "Add New"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: classes/view/admin/modal/form.php:33 classes/view/admin/modal/form.php:57
|
104 |
+
#: classes/view/admin/settings/form.php:29
|
105 |
+
#: classes/view/admin/settings/form.php:53
|
106 |
+
#: classes/view/admin/theme/form.php:46
|
107 |
+
msgid "Publish"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: classes/view/admin/modal/form.php:39
|
111 |
+
#: classes/view/admin/settings/form.php:35
|
112 |
+
msgid "Clone"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: classes/view/admin/modal/form.php:43
|
116 |
+
#: classes/view/admin/settings/form.php:39
|
117 |
+
#: classes/view/admin/theme/form.php:52
|
118 |
+
msgid "Preview"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: classes/view/admin/modal/form.php:52
|
122 |
+
#: classes/view/admin/settings/form.php:48
|
123 |
+
msgid "Move to Trash"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: classes/view/admin/modal/index.php:129
|
127 |
+
#: includes/admin/modal-form-general-tab.php:25
|
128 |
+
#: includes/admin/theme-form-general-tab.php:25
|
129 |
+
msgid "Name"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#: classes/view/admin/modal/index.php:130
|
133 |
+
msgid "Class"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: classes/view/admin/modal/index.php:131
|
137 |
+
msgid "Load Method"
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
+
#: classes/view/admin/modal/index.php:162
|
141 |
+
#: classes/view/admin/modal/index.php:195
|
142 |
+
msgid "Delete"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: classes/view/admin/modal/index.php:164
|
146 |
+
msgid "Restore"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: classes/view/admin/modal/index.php:166
|
150 |
+
msgid "Empty Trash"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: classes/view/admin/modal/index.php:187
|
154 |
+
#, php-format
|
155 |
+
msgid "Edit “%s”"
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: classes/view/admin/modal/index.php:191
|
159 |
+
msgid "Edit"
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: classes/view/admin/modal/index.php:197
|
163 |
+
msgid "View"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: classes/view/admin/modal/index.php:216
|
167 |
+
msgid "Per Page / Post"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: classes/view/admin/modal/index.php:220
|
171 |
+
msgid "AJAX"
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: classes/view/admin/modal/index.php:224
|
175 |
+
msgid "Sitewide"
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: classes/view/admin/theme/form.php:25
|
179 |
+
msgid "Theme Preview"
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: classes/view/admin/theme/form.php:28
|
183 |
+
msgid "Title Text"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: classes/view/admin/theme/form.php:30 classes/view/modal.php:80
|
187 |
+
#: includes/admin/options.php:60
|
188 |
+
msgid "×"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: classes/view/admin/theme/form.php:62
|
192 |
+
msgid "Save"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: em-core.php:77 em-core.php:78
|
196 |
+
msgid "Test"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: em-core.php:80
|
200 |
+
msgid "-test"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: includes/admin/modal-form-close-tab.php:5
|
204 |
+
msgid "Close Options"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: includes/admin/modal-form-close-tab.php:25
|
208 |
+
msgid "Click Overlay to Close"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: includes/admin/modal-form-close-tab.php:28
|
212 |
+
msgid "Checking this will cause modal to close when user clicks on overlay."
|
213 |
+
msgstr ""
|
214 |
+
|
215 |
+
#: includes/admin/modal-form-close-tab.php:38
|
216 |
+
msgid "Press ESC to Close"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: includes/admin/modal-form-close-tab.php:41
|
220 |
+
msgid "Checking this will cause modal to close when user presses ESC key."
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: includes/admin/modal-form-display-tab.php:5
|
224 |
+
msgid "Display Options"
|
225 |
+
msgstr ""
|
226 |
+
|
227 |
+
#: includes/admin/modal-form-display-tab.php:27
|
228 |
+
#: includes/admin/theme-form-close-tab.php:134
|
229 |
+
#: includes/admin/theme-form-title-tab.php:38
|
230 |
+
msgid "Size"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: includes/admin/modal-form-display-tab.php:40
|
234 |
+
msgid "Select the size of the modal."
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: includes/admin/modal-form-display-tab.php:51
|
238 |
+
#: includes/admin/theme-form-close-tab.php:233
|
239 |
+
#: includes/admin/theme-form-container-tab.php:107
|
240 |
+
msgid "Width"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: includes/admin/modal-form-display-tab.php:64
|
244 |
+
msgid "Set a custom width for the modal."
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: includes/admin/modal-form-display-tab.php:70
|
248 |
+
msgid "Auto Adjusted Height"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: includes/admin/modal-form-display-tab.php:73
|
252 |
+
msgid "Checking this option will set height to fix the content."
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: includes/admin/modal-form-display-tab.php:80
|
256 |
+
msgid "Height"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: includes/admin/modal-form-display-tab.php:93
|
260 |
+
msgid "Set a custom height for the modal."
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: includes/admin/modal-form-display-tab.php:104
|
264 |
+
msgid "Animation"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: includes/admin/modal-form-display-tab.php:109
|
268 |
+
msgid "Animation Type"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: includes/admin/modal-form-display-tab.php:121
|
272 |
+
msgid "Select an animation type for your modal."
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: includes/admin/modal-form-display-tab.php:127
|
276 |
+
msgid "Animation Speed"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: includes/admin/modal-form-display-tab.php:133
|
280 |
+
msgid "Set the animation speed for the modal."
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: includes/admin/modal-form-display-tab.php:139
|
284 |
+
msgid "Animation Origin"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: includes/admin/modal-form-display-tab.php:151
|
288 |
+
msgid "Choose where the animation will begin."
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: includes/admin/modal-form-display-tab.php:162
|
292 |
+
#: includes/admin/theme-form-close-tab.php:70
|
293 |
+
msgid "Position"
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: includes/admin/modal-form-display-tab.php:166
|
297 |
+
#: includes/admin/theme-form-close-tab.php:55
|
298 |
+
msgid "Location"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: includes/admin/modal-form-display-tab.php:177
|
302 |
+
#: includes/admin/theme-form-close-tab.php:66
|
303 |
+
msgid "Choose which corner the close button will be positioned."
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: includes/admin/modal-form-display-tab.php:181
|
307 |
+
msgid "Fixed"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: includes/admin/modal-form-display-tab.php:184
|
311 |
+
msgid "Checking this fixes the position of the modal."
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: includes/admin/modal-form-display-tab.php:189
|
315 |
+
#: includes/admin/options.php:200 includes/admin/theme-form-close-tab.php:74
|
316 |
+
msgid "Top"
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
#: includes/admin/modal-form-display-tab.php:194
|
320 |
+
#: includes/admin/theme-form-close-tab.php:79
|
321 |
+
msgid "Top."
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
#: includes/admin/modal-form-display-tab.php:199
|
325 |
+
#: includes/admin/options.php:202 includes/admin/theme-form-close-tab.php:94
|
326 |
+
msgid "Bottom"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: includes/admin/modal-form-display-tab.php:204
|
330 |
+
#: includes/admin/theme-form-close-tab.php:99
|
331 |
+
msgid "Bottom."
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: includes/admin/modal-form-display-tab.php:209
|
335 |
+
#: includes/admin/options.php:141 includes/admin/options.php:201
|
336 |
+
#: includes/admin/theme-form-close-tab.php:84
|
337 |
+
msgid "Left"
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: includes/admin/modal-form-display-tab.php:214
|
341 |
+
#: includes/admin/theme-form-close-tab.php:89
|
342 |
+
msgid "Left."
|
343 |
+
msgstr ""
|
344 |
+
|
345 |
+
#: includes/admin/modal-form-display-tab.php:219
|
346 |
+
#: includes/admin/options.php:143 includes/admin/options.php:203
|
347 |
+
#: includes/admin/theme-form-close-tab.php:104
|
348 |
+
msgid "Right"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: includes/admin/modal-form-display-tab.php:224
|
352 |
+
#: includes/admin/theme-form-close-tab.php:109
|
353 |
+
msgid "Right."
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: includes/admin/modal-form-example-tab.php:5
|
357 |
+
msgid "Examples"
|
358 |
+
msgstr ""
|
359 |
+
|
360 |
+
#: includes/admin/modal-form-example-tab.php:14
|
361 |
+
msgid "Copy this class to the link/button you want to open this modal."
|
362 |
+
msgstr ""
|
363 |
+
|
364 |
+
#: includes/admin/modal-form-example-tab.php:18
|
365 |
+
msgid "Link Example"
|
366 |
+
msgstr ""
|
367 |
+
|
368 |
+
#: includes/admin/modal-form-example-tab.php:19
|
369 |
+
#: includes/admin/modal-form-example-tab.php:20
|
370 |
+
#: includes/admin/modal-form-example-tab.php:24
|
371 |
+
#: includes/admin/modal-form-example-tab.php:25
|
372 |
+
msgid "Open Modal"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: includes/admin/modal-form-example-tab.php:23
|
376 |
+
msgid "Button Example"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: includes/admin/modal-form-example-tab.php:27
|
380 |
+
msgid "Image Example"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: includes/admin/modal-form-general-tab.php:5
|
384 |
+
#: includes/admin/theme-form-general-tab.php:5
|
385 |
+
msgid "General"
|
386 |
+
msgstr ""
|
387 |
+
|
388 |
+
#: includes/admin/modal-form-general-tab.php:31
|
389 |
+
msgid "Enter a name for your modal."
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: includes/admin/modal-form-general-tab.php:43
|
393 |
+
msgid "Load Type"
|
394 |
+
msgstr ""
|
395 |
+
|
396 |
+
#: includes/admin/modal-form-general-tab.php:48
|
397 |
+
msgid "Per Page/Post"
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#: includes/admin/modal-form-general-tab.php:49
|
401 |
+
msgid "Load Sitewide"
|
402 |
+
msgstr ""
|
403 |
+
|
404 |
+
#: includes/admin/modal-form-general-tab.php:50
|
405 |
+
msgid "Using AJAX"
|
406 |
+
msgstr ""
|
407 |
+
|
408 |
+
#: includes/admin/modal-form-general-tab.php:52
|
409 |
+
msgid "Load this modal per page, sitewide or using ajax."
|
410 |
+
msgstr ""
|
411 |
+
|
412 |
+
#: includes/admin/modal-form-general-tab.php:64
|
413 |
+
#: includes/admin/theme-form-title-tab.php:5
|
414 |
+
msgid "Title"
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
+
#: includes/admin/modal-form-general-tab.php:70
|
418 |
+
msgid "The title that appears in the modal window."
|
419 |
+
msgstr ""
|
420 |
+
|
421 |
+
#: includes/admin/modal-form-general-tab.php:81
|
422 |
+
#: includes/admin/theme-form-content-tab.php:5
|
423 |
+
msgid "Content"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: includes/admin/modal-form-general-tab.php:96
|
427 |
+
msgid "Modal content. Can contain shortcodes."
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: includes/admin/options.php:100
|
431 |
+
msgid "PX"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: includes/admin/options.php:101
|
435 |
+
msgid "%"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: includes/admin/options.php:102
|
439 |
+
msgid "EM"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: includes/admin/options.php:103
|
443 |
+
msgid "REM"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: includes/admin/options.php:111 includes/admin/options.php:186
|
447 |
+
msgid "None"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: includes/admin/options.php:112
|
451 |
+
msgid "Solid"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: includes/admin/options.php:113
|
455 |
+
msgid "Dotted"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: includes/admin/options.php:114
|
459 |
+
msgid "Dashed"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: includes/admin/options.php:115
|
463 |
+
msgid "Double"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: includes/admin/options.php:116
|
467 |
+
msgid "Groove"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: includes/admin/options.php:117 includes/admin/theme-form-close-tab.php:252
|
471 |
+
#: includes/admin/theme-form-container-tab.php:125
|
472 |
+
msgid "Inset"
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: includes/admin/options.php:118
|
476 |
+
msgid "Outset"
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: includes/admin/options.php:119
|
480 |
+
msgid "Ridge"
|
481 |
+
msgstr ""
|
482 |
+
|
483 |
+
#: includes/admin/options.php:127
|
484 |
+
msgid "Sans-Serif"
|
485 |
+
msgstr ""
|
486 |
+
|
487 |
+
#: includes/admin/options.php:128
|
488 |
+
msgid "Tahoma"
|
489 |
+
msgstr ""
|
490 |
+
|
491 |
+
#: includes/admin/options.php:129
|
492 |
+
msgid "Georgia"
|
493 |
+
msgstr ""
|
494 |
+
|
495 |
+
#: includes/admin/options.php:130
|
496 |
+
msgid "Comic Sans MS"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: includes/admin/options.php:131
|
500 |
+
msgid "Arial"
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: includes/admin/options.php:132
|
504 |
+
msgid "Lucida Grande"
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: includes/admin/options.php:133
|
508 |
+
msgid "Times New Roman"
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: includes/admin/options.php:142
|
512 |
+
msgid "Center"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#: includes/admin/options.php:152
|
516 |
+
msgid "-----------------------"
|
517 |
+
msgstr ""
|
518 |
+
|
519 |
+
#: includes/admin/options.php:160
|
520 |
+
msgid "Auto"
|
521 |
+
msgstr ""
|
522 |
+
|
523 |
+
#: includes/admin/options.php:161
|
524 |
+
msgid "Responsive"
|
525 |
+
msgstr ""
|
526 |
+
|
527 |
+
#: includes/admin/options.php:162
|
528 |
+
msgid "Normal"
|
529 |
+
msgstr ""
|
530 |
+
|
531 |
+
#: includes/admin/options.php:163
|
532 |
+
msgid "Nano"
|
533 |
+
msgstr ""
|
534 |
+
|
535 |
+
#: includes/admin/options.php:164
|
536 |
+
msgid "Tiny"
|
537 |
+
msgstr ""
|
538 |
+
|
539 |
+
#: includes/admin/options.php:165
|
540 |
+
msgid "Small"
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: includes/admin/options.php:166
|
544 |
+
msgid "Medium"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
#: includes/admin/options.php:167
|
548 |
+
msgid "Large"
|
549 |
+
msgstr ""
|
550 |
+
|
551 |
+
#: includes/admin/options.php:168
|
552 |
+
msgid "X Large"
|
553 |
+
msgstr ""
|
554 |
+
|
555 |
+
#: includes/admin/options.php:176
|
556 |
+
msgid "Non-Responsive"
|
557 |
+
msgstr ""
|
558 |
+
|
559 |
+
#: includes/admin/options.php:177
|
560 |
+
msgid "Custom"
|
561 |
+
msgstr ""
|
562 |
+
|
563 |
+
#: includes/admin/options.php:187
|
564 |
+
msgid "Slide"
|
565 |
+
msgstr ""
|
566 |
+
|
567 |
+
#: includes/admin/options.php:188
|
568 |
+
msgid "Fade"
|
569 |
+
msgstr ""
|
570 |
+
|
571 |
+
#: includes/admin/options.php:189
|
572 |
+
msgid "Fade and Slide"
|
573 |
+
msgstr ""
|
574 |
+
|
575 |
+
#: includes/admin/options.php:190
|
576 |
+
msgid "Grow"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: includes/admin/options.php:191
|
580 |
+
msgid "Grow and Slide"
|
581 |
+
msgstr ""
|
582 |
+
|
583 |
+
#: includes/admin/options.php:204 includes/admin/options.php:221
|
584 |
+
#: includes/admin/options.php:237
|
585 |
+
msgid "Top Left"
|
586 |
+
msgstr ""
|
587 |
+
|
588 |
+
#: includes/admin/options.php:205 includes/admin/options.php:222
|
589 |
+
msgid "Top Center"
|
590 |
+
msgstr ""
|
591 |
+
|
592 |
+
#: includes/admin/options.php:206 includes/admin/options.php:223
|
593 |
+
#: includes/admin/options.php:238
|
594 |
+
msgid "Top Right"
|
595 |
+
msgstr ""
|
596 |
+
|
597 |
+
#: includes/admin/options.php:207 includes/admin/options.php:224
|
598 |
+
msgid "Middle Left"
|
599 |
+
msgstr ""
|
600 |
+
|
601 |
+
#: includes/admin/options.php:208 includes/admin/options.php:225
|
602 |
+
msgid "Middle Center"
|
603 |
+
msgstr ""
|
604 |
+
|
605 |
+
#: includes/admin/options.php:209 includes/admin/options.php:226
|
606 |
+
msgid "Middle Right"
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: includes/admin/options.php:210 includes/admin/options.php:227
|
610 |
+
#: includes/admin/options.php:239
|
611 |
+
msgid "Bottom Left"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: includes/admin/options.php:211 includes/admin/options.php:228
|
615 |
+
msgid "Bottom Center"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: includes/admin/options.php:212 includes/admin/options.php:229
|
619 |
+
#: includes/admin/options.php:240
|
620 |
+
msgid "Bottom Right"
|
621 |
+
msgstr ""
|
622 |
+
|
623 |
+
#: includes/admin/postmeta.php:9
|
624 |
+
msgid "Select which modals to load"
|
625 |
+
msgstr ""
|
626 |
+
|
627 |
+
#: includes/admin/postmeta.php:12
|
628 |
+
msgid " checked=\"checked\""
|
629 |
+
msgstr ""
|
630 |
+
|
631 |
+
#: includes/admin/theme-form-close-tab.php:5
|
632 |
+
msgid "Close"
|
633 |
+
msgstr ""
|
634 |
+
|
635 |
+
#: includes/admin/theme-form-close-tab.php:24
|
636 |
+
msgid "Text"
|
637 |
+
msgstr ""
|
638 |
+
|
639 |
+
#: includes/admin/theme-form-close-tab.php:28
|
640 |
+
msgid "Enter the close button text."
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
+
#: includes/admin/theme-form-close-tab.php:39
|
644 |
+
#: includes/admin/theme-form-container-tab.php:26
|
645 |
+
msgid "Padding"
|
646 |
+
msgstr ""
|
647 |
+
|
648 |
+
#: includes/admin/theme-form-close-tab.php:44
|
649 |
+
#: includes/admin/theme-form-container-tab.php:31
|
650 |
+
msgid "Padding."
|
651 |
+
msgstr ""
|
652 |
+
|
653 |
+
#: includes/admin/theme-form-close-tab.php:120
|
654 |
+
#: includes/admin/theme-form-content-tab.php:24
|
655 |
+
#: includes/admin/theme-form-title-tab.php:24
|
656 |
+
msgid "Font"
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#: includes/admin/theme-form-close-tab.php:124
|
660 |
+
#: includes/admin/theme-form-close-tab.php:169
|
661 |
+
#: includes/admin/theme-form-close-tab.php:224
|
662 |
+
#: includes/admin/theme-form-close-tab.php:308
|
663 |
+
#: includes/admin/theme-form-close-tab.php:365
|
664 |
+
#: includes/admin/theme-form-container-tab.php:45
|
665 |
+
#: includes/admin/theme-form-container-tab.php:98
|
666 |
+
#: includes/admin/theme-form-container-tab.php:181
|
667 |
+
#: includes/admin/theme-form-content-tab.php:28
|
668 |
+
#: includes/admin/theme-form-overlay-tab.php:24
|
669 |
+
#: includes/admin/theme-form-title-tab.php:28
|
670 |
+
#: includes/admin/theme-form-title-tab.php:118
|
671 |
+
msgid "Color"
|
672 |
+
msgstr ""
|
673 |
+
|
674 |
+
#: includes/admin/theme-form-close-tab.php:128
|
675 |
+
msgid "Choose the font color for your close button."
|
676 |
+
msgstr ""
|
677 |
+
|
678 |
+
#: includes/admin/theme-form-close-tab.php:139
|
679 |
+
#: includes/admin/theme-form-title-tab.php:43
|
680 |
+
msgid "Font size."
|
681 |
+
msgstr ""
|
682 |
+
|
683 |
+
#: includes/admin/theme-form-close-tab.php:144
|
684 |
+
#: includes/admin/theme-form-content-tab.php:49
|
685 |
+
#: includes/admin/theme-form-title-tab.php:48
|
686 |
+
msgid "Family"
|
687 |
+
msgstr ""
|
688 |
+
|
689 |
+
#: includes/admin/theme-form-close-tab.php:155
|
690 |
+
#: includes/admin/theme-form-content-tab.php:60
|
691 |
+
#: includes/admin/theme-form-title-tab.php:59
|
692 |
+
msgid "Font family."
|
693 |
+
msgstr ""
|
694 |
+
|
695 |
+
#: includes/admin/theme-form-close-tab.php:165
|
696 |
+
#: includes/admin/theme-form-container-tab.php:41
|
697 |
+
msgid "Background"
|
698 |
+
msgstr ""
|
699 |
+
|
700 |
+
#: includes/admin/theme-form-close-tab.php:173
|
701 |
+
msgid "Choose the background color for your close button."
|
702 |
+
msgstr ""
|
703 |
+
|
704 |
+
#: includes/admin/theme-form-close-tab.php:178
|
705 |
+
#: includes/admin/theme-form-close-tab.php:317
|
706 |
+
#: includes/admin/theme-form-close-tab.php:374
|
707 |
+
#: includes/admin/theme-form-container-tab.php:54
|
708 |
+
#: includes/admin/theme-form-container-tab.php:190
|
709 |
+
#: includes/admin/theme-form-overlay-tab.php:33
|
710 |
+
#: includes/admin/theme-form-title-tab.php:127
|
711 |
+
msgid "Opacity"
|
712 |
+
msgstr ""
|
713 |
+
|
714 |
+
#: includes/admin/theme-form-close-tab.php:183
|
715 |
+
#: includes/admin/theme-form-container-tab.php:59
|
716 |
+
msgid "Background opacity."
|
717 |
+
msgstr ""
|
718 |
+
|
719 |
+
#: includes/admin/theme-form-close-tab.php:194
|
720 |
+
#: includes/admin/theme-form-container-tab.php:68
|
721 |
+
msgid "Border"
|
722 |
+
msgstr ""
|
723 |
+
|
724 |
+
#: includes/admin/theme-form-close-tab.php:198
|
725 |
+
#: includes/admin/theme-form-container-tab.php:72
|
726 |
+
msgid "Radius"
|
727 |
+
msgstr ""
|
728 |
+
|
729 |
+
#: includes/admin/theme-form-close-tab.php:203
|
730 |
+
msgid "Choose a corner radius for your close button."
|
731 |
+
msgstr ""
|
732 |
+
|
733 |
+
#: includes/admin/theme-form-close-tab.php:208
|
734 |
+
#: includes/admin/theme-form-container-tab.php:82
|
735 |
+
msgid "Style"
|
736 |
+
msgstr ""
|
737 |
+
|
738 |
+
#: includes/admin/theme-form-close-tab.php:219
|
739 |
+
msgid "Choose a border style for your close button."
|
740 |
+
msgstr ""
|
741 |
+
|
742 |
+
#: includes/admin/theme-form-close-tab.php:228
|
743 |
+
msgid "Choose the border color for your close button."
|
744 |
+
msgstr ""
|
745 |
+
|
746 |
+
#: includes/admin/theme-form-close-tab.php:238
|
747 |
+
#: includes/admin/theme-form-container-tab.php:112
|
748 |
+
msgid "Choose a width for your border."
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: includes/admin/theme-form-close-tab.php:248
|
752 |
+
#: includes/admin/theme-form-container-tab.php:121
|
753 |
+
msgid "Drop Shadow"
|
754 |
+
msgstr ""
|
755 |
+
|
756 |
+
#: includes/admin/theme-form-close-tab.php:256
|
757 |
+
#: includes/admin/theme-form-container-tab.php:129
|
758 |
+
msgid "Yes"
|
759 |
+
msgstr ""
|
760 |
+
|
761 |
+
#: includes/admin/theme-form-close-tab.php:256
|
762 |
+
#: includes/admin/theme-form-container-tab.php:129
|
763 |
+
msgid "No"
|
764 |
+
msgstr ""
|
765 |
+
|
766 |
+
#: includes/admin/theme-form-close-tab.php:263
|
767 |
+
#: includes/admin/theme-form-container-tab.php:136
|
768 |
+
msgid "Is boxshadow inset or drop."
|
769 |
+
msgstr ""
|
770 |
+
|
771 |
+
#: includes/admin/theme-form-close-tab.php:268
|
772 |
+
#: includes/admin/theme-form-close-tab.php:335
|
773 |
+
#: includes/admin/theme-form-container-tab.php:141
|
774 |
+
#: includes/admin/theme-form-title-tab.php:88
|
775 |
+
msgid "Horizontal Length"
|
776 |
+
msgstr ""
|
777 |
+
|
778 |
+
#: includes/admin/theme-form-close-tab.php:273
|
779 |
+
#: includes/admin/theme-form-close-tab.php:340
|
780 |
+
#: includes/admin/theme-form-container-tab.php:146
|
781 |
+
#: includes/admin/theme-form-title-tab.php:93
|
782 |
+
msgid "Shadow horizontal length."
|
783 |
+
msgstr ""
|
784 |
+
|
785 |
+
#: includes/admin/theme-form-close-tab.php:278
|
786 |
+
#: includes/admin/theme-form-close-tab.php:345
|
787 |
+
#: includes/admin/theme-form-container-tab.php:151
|
788 |
+
#: includes/admin/theme-form-title-tab.php:98
|
789 |
+
msgid "Vertical Length"
|
790 |
+
msgstr ""
|
791 |
+
|
792 |
+
#: includes/admin/theme-form-close-tab.php:283
|
793 |
+
#: includes/admin/theme-form-close-tab.php:350
|
794 |
+
#: includes/admin/theme-form-container-tab.php:156
|
795 |
+
#: includes/admin/theme-form-title-tab.php:103
|
796 |
+
msgid "Shadow vertical length."
|
797 |
+
msgstr ""
|
798 |
+
|
799 |
+
#: includes/admin/theme-form-close-tab.php:288
|
800 |
+
#: includes/admin/theme-form-close-tab.php:355
|
801 |
+
#: includes/admin/theme-form-container-tab.php:161
|
802 |
+
#: includes/admin/theme-form-title-tab.php:108
|
803 |
+
msgid "Blur Radius"
|
804 |
+
msgstr ""
|
805 |
+
|
806 |
+
#: includes/admin/theme-form-close-tab.php:293
|
807 |
+
#: includes/admin/theme-form-close-tab.php:360
|
808 |
+
#: includes/admin/theme-form-container-tab.php:166
|
809 |
+
#: includes/admin/theme-form-title-tab.php:113
|
810 |
+
msgid "Shadow blur radius."
|
811 |
+
msgstr ""
|
812 |
+
|
813 |
+
#: includes/admin/theme-form-close-tab.php:298
|
814 |
+
#: includes/admin/theme-form-container-tab.php:171
|
815 |
+
msgid "Spread"
|
816 |
+
msgstr ""
|
817 |
+
|
818 |
+
#: includes/admin/theme-form-close-tab.php:303
|
819 |
+
#: includes/admin/theme-form-container-tab.php:176
|
820 |
+
msgid "Shadow spread."
|
821 |
+
msgstr ""
|
822 |
+
|
823 |
+
#: includes/admin/theme-form-close-tab.php:312
|
824 |
+
#: includes/admin/theme-form-close-tab.php:369
|
825 |
+
#: includes/admin/theme-form-container-tab.php:185
|
826 |
+
#: includes/admin/theme-form-title-tab.php:122
|
827 |
+
msgid "Shadow color."
|
828 |
+
msgstr ""
|
829 |
+
|
830 |
+
#: includes/admin/theme-form-close-tab.php:322
|
831 |
+
#: includes/admin/theme-form-close-tab.php:379
|
832 |
+
#: includes/admin/theme-form-container-tab.php:195
|
833 |
+
#: includes/admin/theme-form-title-tab.php:132
|
834 |
+
msgid "Shadow opacity."
|
835 |
+
msgstr ""
|
836 |
+
|
837 |
+
#: includes/admin/theme-form-close-tab.php:331
|
838 |
+
#: includes/admin/theme-form-title-tab.php:84
|
839 |
+
msgid "Text Shadow"
|
840 |
+
msgstr ""
|
841 |
+
|
842 |
+
#: includes/admin/theme-form-container-tab.php:5
|
843 |
+
msgid "Container"
|
844 |
+
msgstr ""
|
845 |
+
|
846 |
+
#: includes/admin/theme-form-container-tab.php:49
|
847 |
+
msgid "Choose the background color for your container."
|
848 |
+
msgstr ""
|
849 |
+
|
850 |
+
#: includes/admin/theme-form-container-tab.php:77
|
851 |
+
msgid "Choose a corner radius for your container button."
|
852 |
+
msgstr ""
|
853 |
+
|
854 |
+
#: includes/admin/theme-form-container-tab.php:93
|
855 |
+
msgid "Choose a border style for your container button."
|
856 |
+
msgstr ""
|
857 |
+
|
858 |
+
#: includes/admin/theme-form-container-tab.php:102
|
859 |
+
msgid "Choose the border color for your container button."
|
860 |
+
msgstr ""
|
861 |
+
|
862 |
+
#: includes/admin/theme-form-content-tab.php:32
|
863 |
+
msgid "Choose the font color for your content button."
|
864 |
+
msgstr ""
|
865 |
+
|
866 |
+
#: includes/admin/theme-form-general-tab.php:31
|
867 |
+
msgid "Enter a name for your theme."
|
868 |
+
msgstr ""
|
869 |
+
|
870 |
+
#: includes/admin/theme-form-overlay-tab.php:5
|
871 |
+
msgid "Overlay"
|
872 |
+
msgstr ""
|
873 |
+
|
874 |
+
#: includes/admin/theme-form-overlay-tab.php:28
|
875 |
+
msgid "Choose the overlay color."
|
876 |
+
msgstr ""
|
877 |
+
|
878 |
+
#: includes/admin/theme-form-overlay-tab.php:38
|
879 |
+
msgid "The opacity value for the overlay."
|
880 |
+
msgstr ""
|
881 |
+
|
882 |
+
#: includes/admin/theme-form-title-tab.php:32
|
883 |
+
msgid "Font color."
|
884 |
+
msgstr ""
|
885 |
+
|
886 |
+
#: includes/admin/theme-form-title-tab.php:64
|
887 |
+
msgid "Align"
|
888 |
+
msgstr ""
|
889 |
+
|
890 |
+
#: includes/admin/theme-form-title-tab.php:75
|
891 |
+
msgid "Text alignment."
|
892 |
+
msgstr ""
|
languages/easy-modal-pt.mo
ADDED
Binary file
|
languages/easy-modal-pt.po
ADDED
@@ -0,0 +1,892 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Easy Modal\n"
|
4 |
+
"POT-Creation-Date: 2014-07-05 23:44-0500\n"
|
5 |
+
"PO-Revision-Date: 2014-07-05 23:44-0500\n"
|
6 |
+
"Last-Translator: Daniel Iser <danieliser@wizardinternetsolutions.com>\n"
|
7 |
+
"Language-Team: Daniel Iser <danieliser@wizardinternetsolutions.com>\n"
|
8 |
+
"Language: pt\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.6\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
16 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
17 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
|
21 |
+
#: classes/admin.php:53 classes/admin/menu.php:52 classes/admin/menu.php:53
|
22 |
+
msgid "Settings"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: classes/admin.php:55
|
26 |
+
msgid "Go Pro"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: classes/admin/api.php:151
|
30 |
+
msgid "An Unexpected HTTP Error occurred during the API request."
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: classes/admin/api.php:158
|
34 |
+
msgid "An unknown error occurred"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: classes/admin/menu.php:30 classes/admin/menu.php:31
|
38 |
+
#: classes/controller/admin/modals.php:45
|
39 |
+
msgid "Modals"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: classes/admin/menu.php:41 classes/admin/menu.php:42
|
43 |
+
msgid "Theme"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: classes/admin/menu.php:63 classes/admin/menu.php:64
|
47 |
+
msgid "Help"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: classes/controller/admin/modals.php:61
|
51 |
+
msgid "Modal Updated."
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: classes/controller/admin/modals.php:61
|
55 |
+
msgid "Modal Created."
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: classes/controller/admin/modals.php:65
|
59 |
+
msgid "Edit Modal"
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: classes/controller/admin/modals.php:65
|
63 |
+
msgid "Add New Modal"
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: classes/controller/admin/modals.php:80
|
67 |
+
msgid "Modal cloned successfully"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: classes/controller/admin/modals.php:106
|
71 |
+
msgid " modals moved to the trash"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: classes/controller/admin/modals.php:118
|
75 |
+
msgid "Modal trash has been permanantly removed."
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: classes/controller/admin/modals.php:143
|
79 |
+
msgid " modal restored from trash."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: classes/controller/admin/settings.php:33
|
83 |
+
msgid "Settings Updated."
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: classes/controller/admin/settings.php:37
|
87 |
+
msgid "Easy Modal Settings"
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: classes/controller/admin/theme.php:29
|
91 |
+
msgid "Theme Updated."
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: classes/controller/admin/theme.php:33
|
95 |
+
msgid "Edit Theme"
|
96 |
+
msgstr ""
|
97 |
+
|
98 |
+
#: classes/view/admin/modal/form.php:9 classes/view/admin/modal/index.php:9
|
99 |
+
#: classes/view/admin/theme/form.php:9
|
100 |
+
msgid "Add New"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: classes/view/admin/modal/form.php:33 classes/view/admin/modal/form.php:57
|
104 |
+
#: classes/view/admin/settings/form.php:29
|
105 |
+
#: classes/view/admin/settings/form.php:53
|
106 |
+
#: classes/view/admin/theme/form.php:46
|
107 |
+
msgid "Publish"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: classes/view/admin/modal/form.php:39
|
111 |
+
#: classes/view/admin/settings/form.php:35
|
112 |
+
msgid "Clone"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: classes/view/admin/modal/form.php:43
|
116 |
+
#: classes/view/admin/settings/form.php:39
|
117 |
+
#: classes/view/admin/theme/form.php:52
|
118 |
+
msgid "Preview"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: classes/view/admin/modal/form.php:52
|
122 |
+
#: classes/view/admin/settings/form.php:48
|
123 |
+
msgid "Move to Trash"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: classes/view/admin/modal/index.php:129
|
127 |
+
#: includes/admin/modal-form-general-tab.php:25
|
128 |
+
#: includes/admin/theme-form-general-tab.php:25
|
129 |
+
msgid "Name"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#: classes/view/admin/modal/index.php:130
|
133 |
+
msgid "Class"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: classes/view/admin/modal/index.php:131
|
137 |
+
msgid "Load Method"
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
+
#: classes/view/admin/modal/index.php:162
|
141 |
+
#: classes/view/admin/modal/index.php:195
|
142 |
+
msgid "Delete"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: classes/view/admin/modal/index.php:164
|
146 |
+
msgid "Restore"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: classes/view/admin/modal/index.php:166
|
150 |
+
msgid "Empty Trash"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: classes/view/admin/modal/index.php:187
|
154 |
+
#, php-format
|
155 |
+
msgid "Edit “%s”"
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: classes/view/admin/modal/index.php:191
|
159 |
+
msgid "Edit"
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: classes/view/admin/modal/index.php:197
|
163 |
+
msgid "View"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: classes/view/admin/modal/index.php:216
|
167 |
+
msgid "Per Page / Post"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: classes/view/admin/modal/index.php:220
|
171 |
+
msgid "AJAX"
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: classes/view/admin/modal/index.php:224
|
175 |
+
msgid "Sitewide"
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: classes/view/admin/theme/form.php:25
|
179 |
+
msgid "Theme Preview"
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: classes/view/admin/theme/form.php:28
|
183 |
+
msgid "Title Text"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: classes/view/admin/theme/form.php:30 classes/view/modal.php:80
|
187 |
+
#: includes/admin/options.php:60
|
188 |
+
msgid "×"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: classes/view/admin/theme/form.php:62
|
192 |
+
msgid "Save"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: em-core.php:77 em-core.php:78
|
196 |
+
msgid "Test"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: em-core.php:80
|
200 |
+
msgid "-test"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: includes/admin/modal-form-close-tab.php:5
|
204 |
+
msgid "Close Options"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: includes/admin/modal-form-close-tab.php:25
|
208 |
+
msgid "Click Overlay to Close"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: includes/admin/modal-form-close-tab.php:28
|
212 |
+
msgid "Checking this will cause modal to close when user clicks on overlay."
|
213 |
+
msgstr ""
|
214 |
+
|
215 |
+
#: includes/admin/modal-form-close-tab.php:38
|
216 |
+
msgid "Press ESC to Close"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: includes/admin/modal-form-close-tab.php:41
|
220 |
+
msgid "Checking this will cause modal to close when user presses ESC key."
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: includes/admin/modal-form-display-tab.php:5
|
224 |
+
msgid "Display Options"
|
225 |
+
msgstr ""
|
226 |
+
|
227 |
+
#: includes/admin/modal-form-display-tab.php:27
|
228 |
+
#: includes/admin/theme-form-close-tab.php:134
|
229 |
+
#: includes/admin/theme-form-title-tab.php:38
|
230 |
+
msgid "Size"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: includes/admin/modal-form-display-tab.php:40
|
234 |
+
msgid "Select the size of the modal."
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: includes/admin/modal-form-display-tab.php:51
|
238 |
+
#: includes/admin/theme-form-close-tab.php:233
|
239 |
+
#: includes/admin/theme-form-container-tab.php:107
|
240 |
+
msgid "Width"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: includes/admin/modal-form-display-tab.php:64
|
244 |
+
msgid "Set a custom width for the modal."
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: includes/admin/modal-form-display-tab.php:70
|
248 |
+
msgid "Auto Adjusted Height"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: includes/admin/modal-form-display-tab.php:73
|
252 |
+
msgid "Checking this option will set height to fix the content."
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: includes/admin/modal-form-display-tab.php:80
|
256 |
+
msgid "Height"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: includes/admin/modal-form-display-tab.php:93
|
260 |
+
msgid "Set a custom height for the modal."
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: includes/admin/modal-form-display-tab.php:104
|
264 |
+
msgid "Animation"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: includes/admin/modal-form-display-tab.php:109
|
268 |
+
msgid "Animation Type"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: includes/admin/modal-form-display-tab.php:121
|
272 |
+
msgid "Select an animation type for your modal."
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: includes/admin/modal-form-display-tab.php:127
|
276 |
+
msgid "Animation Speed"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: includes/admin/modal-form-display-tab.php:133
|
280 |
+
msgid "Set the animation speed for the modal."
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: includes/admin/modal-form-display-tab.php:139
|
284 |
+
msgid "Animation Origin"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: includes/admin/modal-form-display-tab.php:151
|
288 |
+
msgid "Choose where the animation will begin."
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: includes/admin/modal-form-display-tab.php:162
|
292 |
+
#: includes/admin/theme-form-close-tab.php:70
|
293 |
+
msgid "Position"
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: includes/admin/modal-form-display-tab.php:166
|
297 |
+
#: includes/admin/theme-form-close-tab.php:55
|
298 |
+
msgid "Location"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: includes/admin/modal-form-display-tab.php:177
|
302 |
+
#: includes/admin/theme-form-close-tab.php:66
|
303 |
+
msgid "Choose which corner the close button will be positioned."
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: includes/admin/modal-form-display-tab.php:181
|
307 |
+
msgid "Fixed"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: includes/admin/modal-form-display-tab.php:184
|
311 |
+
msgid "Checking this fixes the position of the modal."
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: includes/admin/modal-form-display-tab.php:189
|
315 |
+
#: includes/admin/options.php:200 includes/admin/theme-form-close-tab.php:74
|
316 |
+
msgid "Top"
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
#: includes/admin/modal-form-display-tab.php:194
|
320 |
+
#: includes/admin/theme-form-close-tab.php:79
|
321 |
+
msgid "Top."
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
#: includes/admin/modal-form-display-tab.php:199
|
325 |
+
#: includes/admin/options.php:202 includes/admin/theme-form-close-tab.php:94
|
326 |
+
msgid "Bottom"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: includes/admin/modal-form-display-tab.php:204
|
330 |
+
#: includes/admin/theme-form-close-tab.php:99
|
331 |
+
msgid "Bottom."
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: includes/admin/modal-form-display-tab.php:209
|
335 |
+
#: includes/admin/options.php:141 includes/admin/options.php:201
|
336 |
+
#: includes/admin/theme-form-close-tab.php:84
|
337 |
+
msgid "Left"
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: includes/admin/modal-form-display-tab.php:214
|
341 |
+
#: includes/admin/theme-form-close-tab.php:89
|
342 |
+
msgid "Left."
|
343 |
+
msgstr ""
|
344 |
+
|
345 |
+
#: includes/admin/modal-form-display-tab.php:219
|
346 |
+
#: includes/admin/options.php:143 includes/admin/options.php:203
|
347 |
+
#: includes/admin/theme-form-close-tab.php:104
|
348 |
+
msgid "Right"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: includes/admin/modal-form-display-tab.php:224
|
352 |
+
#: includes/admin/theme-form-close-tab.php:109
|
353 |
+
msgid "Right."
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: includes/admin/modal-form-example-tab.php:5
|
357 |
+
msgid "Examples"
|
358 |
+
msgstr ""
|
359 |
+
|
360 |
+
#: includes/admin/modal-form-example-tab.php:14
|
361 |
+
msgid "Copy this class to the link/button you want to open this modal."
|
362 |
+
msgstr ""
|
363 |
+
|
364 |
+
#: includes/admin/modal-form-example-tab.php:18
|
365 |
+
msgid "Link Example"
|
366 |
+
msgstr ""
|
367 |
+
|
368 |
+
#: includes/admin/modal-form-example-tab.php:19
|
369 |
+
#: includes/admin/modal-form-example-tab.php:20
|
370 |
+
#: includes/admin/modal-form-example-tab.php:24
|
371 |
+
#: includes/admin/modal-form-example-tab.php:25
|
372 |
+
msgid "Open Modal"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: includes/admin/modal-form-example-tab.php:23
|
376 |
+
msgid "Button Example"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: includes/admin/modal-form-example-tab.php:27
|
380 |
+
msgid "Image Example"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: includes/admin/modal-form-general-tab.php:5
|
384 |
+
#: includes/admin/theme-form-general-tab.php:5
|
385 |
+
msgid "General"
|
386 |
+
msgstr ""
|
387 |
+
|
388 |
+
#: includes/admin/modal-form-general-tab.php:31
|
389 |
+
msgid "Enter a name for your modal."
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: includes/admin/modal-form-general-tab.php:43
|
393 |
+
msgid "Load Type"
|
394 |
+
msgstr ""
|
395 |
+
|
396 |
+
#: includes/admin/modal-form-general-tab.php:48
|
397 |
+
msgid "Per Page/Post"
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#: includes/admin/modal-form-general-tab.php:49
|
401 |
+
msgid "Load Sitewide"
|
402 |
+
msgstr ""
|
403 |
+
|
404 |
+
#: includes/admin/modal-form-general-tab.php:50
|
405 |
+
msgid "Using AJAX"
|
406 |
+
msgstr ""
|
407 |
+
|
408 |
+
#: includes/admin/modal-form-general-tab.php:52
|
409 |
+
msgid "Load this modal per page, sitewide or using ajax."
|
410 |
+
msgstr ""
|
411 |
+
|
412 |
+
#: includes/admin/modal-form-general-tab.php:64
|
413 |
+
#: includes/admin/theme-form-title-tab.php:5
|
414 |
+
msgid "Title"
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
+
#: includes/admin/modal-form-general-tab.php:70
|
418 |
+
msgid "The title that appears in the modal window."
|
419 |
+
msgstr ""
|
420 |
+
|
421 |
+
#: includes/admin/modal-form-general-tab.php:81
|
422 |
+
#: includes/admin/theme-form-content-tab.php:5
|
423 |
+
msgid "Content"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: includes/admin/modal-form-general-tab.php:96
|
427 |
+
msgid "Modal content. Can contain shortcodes."
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: includes/admin/options.php:100
|
431 |
+
msgid "PX"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: includes/admin/options.php:101
|
435 |
+
msgid "%"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: includes/admin/options.php:102
|
439 |
+
msgid "EM"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: includes/admin/options.php:103
|
443 |
+
msgid "REM"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: includes/admin/options.php:111 includes/admin/options.php:186
|
447 |
+
msgid "None"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: includes/admin/options.php:112
|
451 |
+
msgid "Solid"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: includes/admin/options.php:113
|
455 |
+
msgid "Dotted"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: includes/admin/options.php:114
|
459 |
+
msgid "Dashed"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: includes/admin/options.php:115
|
463 |
+
msgid "Double"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: includes/admin/options.php:116
|
467 |
+
msgid "Groove"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: includes/admin/options.php:117 includes/admin/theme-form-close-tab.php:252
|
471 |
+
#: includes/admin/theme-form-container-tab.php:125
|
472 |
+
msgid "Inset"
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: includes/admin/options.php:118
|
476 |
+
msgid "Outset"
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: includes/admin/options.php:119
|
480 |
+
msgid "Ridge"
|
481 |
+
msgstr ""
|
482 |
+
|
483 |
+
#: includes/admin/options.php:127
|
484 |
+
msgid "Sans-Serif"
|
485 |
+
msgstr ""
|
486 |
+
|
487 |
+
#: includes/admin/options.php:128
|
488 |
+
msgid "Tahoma"
|
489 |
+
msgstr ""
|
490 |
+
|
491 |
+
#: includes/admin/options.php:129
|
492 |
+
msgid "Georgia"
|
493 |
+
msgstr ""
|
494 |
+
|
495 |
+
#: includes/admin/options.php:130
|
496 |
+
msgid "Comic Sans MS"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: includes/admin/options.php:131
|
500 |
+
msgid "Arial"
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: includes/admin/options.php:132
|
504 |
+
msgid "Lucida Grande"
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: includes/admin/options.php:133
|
508 |
+
msgid "Times New Roman"
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: includes/admin/options.php:142
|
512 |
+
msgid "Center"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#: includes/admin/options.php:152
|
516 |
+
msgid "-----------------------"
|
517 |
+
msgstr ""
|
518 |
+
|
519 |
+
#: includes/admin/options.php:160
|
520 |
+
msgid "Auto"
|
521 |
+
msgstr ""
|
522 |
+
|
523 |
+
#: includes/admin/options.php:161
|
524 |
+
msgid "Responsive"
|
525 |
+
msgstr ""
|
526 |
+
|
527 |
+
#: includes/admin/options.php:162
|
528 |
+
msgid "Normal"
|
529 |
+
msgstr ""
|
530 |
+
|
531 |
+
#: includes/admin/options.php:163
|
532 |
+
msgid "Nano"
|
533 |
+
msgstr ""
|
534 |
+
|
535 |
+
#: includes/admin/options.php:164
|
536 |
+
msgid "Tiny"
|
537 |
+
msgstr ""
|
538 |
+
|
539 |
+
#: includes/admin/options.php:165
|
540 |
+
msgid "Small"
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: includes/admin/options.php:166
|
544 |
+
msgid "Medium"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
#: includes/admin/options.php:167
|
548 |
+
msgid "Large"
|
549 |
+
msgstr ""
|
550 |
+
|
551 |
+
#: includes/admin/options.php:168
|
552 |
+
msgid "X Large"
|
553 |
+
msgstr ""
|
554 |
+
|
555 |
+
#: includes/admin/options.php:176
|
556 |
+
msgid "Non-Responsive"
|
557 |
+
msgstr ""
|
558 |
+
|
559 |
+
#: includes/admin/options.php:177
|
560 |
+
msgid "Custom"
|
561 |
+
msgstr ""
|
562 |
+
|
563 |
+
#: includes/admin/options.php:187
|
564 |
+
msgid "Slide"
|
565 |
+
msgstr ""
|
566 |
+
|
567 |
+
#: includes/admin/options.php:188
|
568 |
+
msgid "Fade"
|
569 |
+
msgstr ""
|
570 |
+
|
571 |
+
#: includes/admin/options.php:189
|
572 |
+
msgid "Fade and Slide"
|
573 |
+
msgstr ""
|
574 |
+
|
575 |
+
#: includes/admin/options.php:190
|
576 |
+
msgid "Grow"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: includes/admin/options.php:191
|
580 |
+
msgid "Grow and Slide"
|
581 |
+
msgstr ""
|
582 |
+
|
583 |
+
#: includes/admin/options.php:204 includes/admin/options.php:221
|
584 |
+
#: includes/admin/options.php:237
|
585 |
+
msgid "Top Left"
|
586 |
+
msgstr ""
|
587 |
+
|
588 |
+
#: includes/admin/options.php:205 includes/admin/options.php:222
|
589 |
+
msgid "Top Center"
|
590 |
+
msgstr ""
|
591 |
+
|
592 |
+
#: includes/admin/options.php:206 includes/admin/options.php:223
|
593 |
+
#: includes/admin/options.php:238
|
594 |
+
msgid "Top Right"
|
595 |
+
msgstr ""
|
596 |
+
|
597 |
+
#: includes/admin/options.php:207 includes/admin/options.php:224
|
598 |
+
msgid "Middle Left"
|
599 |
+
msgstr ""
|
600 |
+
|
601 |
+
#: includes/admin/options.php:208 includes/admin/options.php:225
|
602 |
+
msgid "Middle Center"
|
603 |
+
msgstr ""
|
604 |
+
|
605 |
+
#: includes/admin/options.php:209 includes/admin/options.php:226
|
606 |
+
msgid "Middle Right"
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: includes/admin/options.php:210 includes/admin/options.php:227
|
610 |
+
#: includes/admin/options.php:239
|
611 |
+
msgid "Bottom Left"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: includes/admin/options.php:211 includes/admin/options.php:228
|
615 |
+
msgid "Bottom Center"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: includes/admin/options.php:212 includes/admin/options.php:229
|
619 |
+
#: includes/admin/options.php:240
|
620 |
+
msgid "Bottom Right"
|
621 |
+
msgstr ""
|
622 |
+
|
623 |
+
#: includes/admin/postmeta.php:9
|
624 |
+
msgid "Select which modals to load"
|
625 |
+
msgstr ""
|
626 |
+
|
627 |
+
#: includes/admin/postmeta.php:12
|
628 |
+
msgid " checked=\"checked\""
|
629 |
+
msgstr ""
|
630 |
+
|
631 |
+
#: includes/admin/theme-form-close-tab.php:5
|
632 |
+
msgid "Close"
|
633 |
+
msgstr ""
|
634 |
+
|
635 |
+
#: includes/admin/theme-form-close-tab.php:24
|
636 |
+
msgid "Text"
|
637 |
+
msgstr ""
|
638 |
+
|
639 |
+
#: includes/admin/theme-form-close-tab.php:28
|
640 |
+
msgid "Enter the close button text."
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
+
#: includes/admin/theme-form-close-tab.php:39
|
644 |
+
#: includes/admin/theme-form-container-tab.php:26
|
645 |
+
msgid "Padding"
|
646 |
+
msgstr ""
|
647 |
+
|
648 |
+
#: includes/admin/theme-form-close-tab.php:44
|
649 |
+
#: includes/admin/theme-form-container-tab.php:31
|
650 |
+
msgid "Padding."
|
651 |
+
msgstr ""
|
652 |
+
|
653 |
+
#: includes/admin/theme-form-close-tab.php:120
|
654 |
+
#: includes/admin/theme-form-content-tab.php:24
|
655 |
+
#: includes/admin/theme-form-title-tab.php:24
|
656 |
+
msgid "Font"
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#: includes/admin/theme-form-close-tab.php:124
|
660 |
+
#: includes/admin/theme-form-close-tab.php:169
|
661 |
+
#: includes/admin/theme-form-close-tab.php:224
|
662 |
+
#: includes/admin/theme-form-close-tab.php:308
|
663 |
+
#: includes/admin/theme-form-close-tab.php:365
|
664 |
+
#: includes/admin/theme-form-container-tab.php:45
|
665 |
+
#: includes/admin/theme-form-container-tab.php:98
|
666 |
+
#: includes/admin/theme-form-container-tab.php:181
|
667 |
+
#: includes/admin/theme-form-content-tab.php:28
|
668 |
+
#: includes/admin/theme-form-overlay-tab.php:24
|
669 |
+
#: includes/admin/theme-form-title-tab.php:28
|
670 |
+
#: includes/admin/theme-form-title-tab.php:118
|
671 |
+
msgid "Color"
|
672 |
+
msgstr ""
|
673 |
+
|
674 |
+
#: includes/admin/theme-form-close-tab.php:128
|
675 |
+
msgid "Choose the font color for your close button."
|
676 |
+
msgstr ""
|
677 |
+
|
678 |
+
#: includes/admin/theme-form-close-tab.php:139
|
679 |
+
#: includes/admin/theme-form-title-tab.php:43
|
680 |
+
msgid "Font size."
|
681 |
+
msgstr ""
|
682 |
+
|
683 |
+
#: includes/admin/theme-form-close-tab.php:144
|
684 |
+
#: includes/admin/theme-form-content-tab.php:49
|
685 |
+
#: includes/admin/theme-form-title-tab.php:48
|
686 |
+
msgid "Family"
|
687 |
+
msgstr ""
|
688 |
+
|
689 |
+
#: includes/admin/theme-form-close-tab.php:155
|
690 |
+
#: includes/admin/theme-form-content-tab.php:60
|
691 |
+
#: includes/admin/theme-form-title-tab.php:59
|
692 |
+
msgid "Font family."
|
693 |
+
msgstr ""
|
694 |
+
|
695 |
+
#: includes/admin/theme-form-close-tab.php:165
|
696 |
+
#: includes/admin/theme-form-container-tab.php:41
|
697 |
+
msgid "Background"
|
698 |
+
msgstr ""
|
699 |
+
|
700 |
+
#: includes/admin/theme-form-close-tab.php:173
|
701 |
+
msgid "Choose the background color for your close button."
|
702 |
+
msgstr ""
|
703 |
+
|
704 |
+
#: includes/admin/theme-form-close-tab.php:178
|
705 |
+
#: includes/admin/theme-form-close-tab.php:317
|
706 |
+
#: includes/admin/theme-form-close-tab.php:374
|
707 |
+
#: includes/admin/theme-form-container-tab.php:54
|
708 |
+
#: includes/admin/theme-form-container-tab.php:190
|
709 |
+
#: includes/admin/theme-form-overlay-tab.php:33
|
710 |
+
#: includes/admin/theme-form-title-tab.php:127
|
711 |
+
msgid "Opacity"
|
712 |
+
msgstr ""
|
713 |
+
|
714 |
+
#: includes/admin/theme-form-close-tab.php:183
|
715 |
+
#: includes/admin/theme-form-container-tab.php:59
|
716 |
+
msgid "Background opacity."
|
717 |
+
msgstr ""
|
718 |
+
|
719 |
+
#: includes/admin/theme-form-close-tab.php:194
|
720 |
+
#: includes/admin/theme-form-container-tab.php:68
|
721 |
+
msgid "Border"
|
722 |
+
msgstr ""
|
723 |
+
|
724 |
+
#: includes/admin/theme-form-close-tab.php:198
|
725 |
+
#: includes/admin/theme-form-container-tab.php:72
|
726 |
+
msgid "Radius"
|
727 |
+
msgstr ""
|
728 |
+
|
729 |
+
#: includes/admin/theme-form-close-tab.php:203
|
730 |
+
msgid "Choose a corner radius for your close button."
|
731 |
+
msgstr ""
|
732 |
+
|
733 |
+
#: includes/admin/theme-form-close-tab.php:208
|
734 |
+
#: includes/admin/theme-form-container-tab.php:82
|
735 |
+
msgid "Style"
|
736 |
+
msgstr ""
|
737 |
+
|
738 |
+
#: includes/admin/theme-form-close-tab.php:219
|
739 |
+
msgid "Choose a border style for your close button."
|
740 |
+
msgstr ""
|
741 |
+
|
742 |
+
#: includes/admin/theme-form-close-tab.php:228
|
743 |
+
msgid "Choose the border color for your close button."
|
744 |
+
msgstr ""
|
745 |
+
|
746 |
+
#: includes/admin/theme-form-close-tab.php:238
|
747 |
+
#: includes/admin/theme-form-container-tab.php:112
|
748 |
+
msgid "Choose a width for your border."
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: includes/admin/theme-form-close-tab.php:248
|
752 |
+
#: includes/admin/theme-form-container-tab.php:121
|
753 |
+
msgid "Drop Shadow"
|
754 |
+
msgstr ""
|
755 |
+
|
756 |
+
#: includes/admin/theme-form-close-tab.php:256
|
757 |
+
#: includes/admin/theme-form-container-tab.php:129
|
758 |
+
msgid "Yes"
|
759 |
+
msgstr ""
|
760 |
+
|
761 |
+
#: includes/admin/theme-form-close-tab.php:256
|
762 |
+
#: includes/admin/theme-form-container-tab.php:129
|
763 |
+
msgid "No"
|
764 |
+
msgstr ""
|
765 |
+
|
766 |
+
#: includes/admin/theme-form-close-tab.php:263
|
767 |
+
#: includes/admin/theme-form-container-tab.php:136
|
768 |
+
msgid "Is boxshadow inset or drop."
|
769 |
+
msgstr ""
|
770 |
+
|
771 |
+
#: includes/admin/theme-form-close-tab.php:268
|
772 |
+
#: includes/admin/theme-form-close-tab.php:335
|
773 |
+
#: includes/admin/theme-form-container-tab.php:141
|
774 |
+
#: includes/admin/theme-form-title-tab.php:88
|
775 |
+
msgid "Horizontal Length"
|
776 |
+
msgstr ""
|
777 |
+
|
778 |
+
#: includes/admin/theme-form-close-tab.php:273
|
779 |
+
#: includes/admin/theme-form-close-tab.php:340
|
780 |
+
#: includes/admin/theme-form-container-tab.php:146
|
781 |
+
#: includes/admin/theme-form-title-tab.php:93
|
782 |
+
msgid "Shadow horizontal length."
|
783 |
+
msgstr ""
|
784 |
+
|
785 |
+
#: includes/admin/theme-form-close-tab.php:278
|
786 |
+
#: includes/admin/theme-form-close-tab.php:345
|
787 |
+
#: includes/admin/theme-form-container-tab.php:151
|
788 |
+
#: includes/admin/theme-form-title-tab.php:98
|
789 |
+
msgid "Vertical Length"
|
790 |
+
msgstr ""
|
791 |
+
|
792 |
+
#: includes/admin/theme-form-close-tab.php:283
|
793 |
+
#: includes/admin/theme-form-close-tab.php:350
|
794 |
+
#: includes/admin/theme-form-container-tab.php:156
|
795 |
+
#: includes/admin/theme-form-title-tab.php:103
|
796 |
+
msgid "Shadow vertical length."
|
797 |
+
msgstr ""
|
798 |
+
|
799 |
+
#: includes/admin/theme-form-close-tab.php:288
|
800 |
+
#: includes/admin/theme-form-close-tab.php:355
|
801 |
+
#: includes/admin/theme-form-container-tab.php:161
|
802 |
+
#: includes/admin/theme-form-title-tab.php:108
|
803 |
+
msgid "Blur Radius"
|
804 |
+
msgstr ""
|
805 |
+
|
806 |
+
#: includes/admin/theme-form-close-tab.php:293
|
807 |
+
#: includes/admin/theme-form-close-tab.php:360
|
808 |
+
#: includes/admin/theme-form-container-tab.php:166
|
809 |
+
#: includes/admin/theme-form-title-tab.php:113
|
810 |
+
msgid "Shadow blur radius."
|
811 |
+
msgstr ""
|
812 |
+
|
813 |
+
#: includes/admin/theme-form-close-tab.php:298
|
814 |
+
#: includes/admin/theme-form-container-tab.php:171
|
815 |
+
msgid "Spread"
|
816 |
+
msgstr ""
|
817 |
+
|
818 |
+
#: includes/admin/theme-form-close-tab.php:303
|
819 |
+
#: includes/admin/theme-form-container-tab.php:176
|
820 |
+
msgid "Shadow spread."
|
821 |
+
msgstr ""
|
822 |
+
|
823 |
+
#: includes/admin/theme-form-close-tab.php:312
|
824 |
+
#: includes/admin/theme-form-close-tab.php:369
|
825 |
+
#: includes/admin/theme-form-container-tab.php:185
|
826 |
+
#: includes/admin/theme-form-title-tab.php:122
|
827 |
+
msgid "Shadow color."
|
828 |
+
msgstr ""
|
829 |
+
|
830 |
+
#: includes/admin/theme-form-close-tab.php:322
|
831 |
+
#: includes/admin/theme-form-close-tab.php:379
|
832 |
+
#: includes/admin/theme-form-container-tab.php:195
|
833 |
+
#: includes/admin/theme-form-title-tab.php:132
|
834 |
+
msgid "Shadow opacity."
|
835 |
+
msgstr ""
|
836 |
+
|
837 |
+
#: includes/admin/theme-form-close-tab.php:331
|
838 |
+
#: includes/admin/theme-form-title-tab.php:84
|
839 |
+
msgid "Text Shadow"
|
840 |
+
msgstr ""
|
841 |
+
|
842 |
+
#: includes/admin/theme-form-container-tab.php:5
|
843 |
+
msgid "Container"
|
844 |
+
msgstr ""
|
845 |
+
|
846 |
+
#: includes/admin/theme-form-container-tab.php:49
|
847 |
+
msgid "Choose the background color for your container."
|
848 |
+
msgstr ""
|
849 |
+
|
850 |
+
#: includes/admin/theme-form-container-tab.php:77
|
851 |
+
msgid "Choose a corner radius for your container button."
|
852 |
+
msgstr ""
|
853 |
+
|
854 |
+
#: includes/admin/theme-form-container-tab.php:93
|
855 |
+
msgid "Choose a border style for your container button."
|
856 |
+
msgstr ""
|
857 |
+
|
858 |
+
#: includes/admin/theme-form-container-tab.php:102
|
859 |
+
msgid "Choose the border color for your container button."
|
860 |
+
msgstr ""
|
861 |
+
|
862 |
+
#: includes/admin/theme-form-content-tab.php:32
|
863 |
+
msgid "Choose the font color for your content button."
|
864 |
+
msgstr ""
|
865 |
+
|
866 |
+
#: includes/admin/theme-form-general-tab.php:31
|
867 |
+
msgid "Enter a name for your theme."
|
868 |
+
msgstr ""
|
869 |
+
|
870 |
+
#: includes/admin/theme-form-overlay-tab.php:5
|
871 |
+
msgid "Overlay"
|
872 |
+
msgstr ""
|
873 |
+
|
874 |
+
#: includes/admin/theme-form-overlay-tab.php:28
|
875 |
+
msgid "Choose the overlay color."
|
876 |
+
msgstr ""
|
877 |
+
|
878 |
+
#: includes/admin/theme-form-overlay-tab.php:38
|
879 |
+
msgid "The opacity value for the overlay."
|
880 |
+
msgstr ""
|
881 |
+
|
882 |
+
#: includes/admin/theme-form-title-tab.php:32
|
883 |
+
msgid "Font color."
|
884 |
+
msgstr ""
|
885 |
+
|
886 |
+
#: includes/admin/theme-form-title-tab.php:64
|
887 |
+
msgid "Align"
|
888 |
+
msgstr ""
|
889 |
+
|
890 |
+
#: includes/admin/theme-form-title-tab.php:75
|
891 |
+
msgid "Text alignment."
|
892 |
+
msgstr ""
|
languages/easy-modal-ru_RU.mo
ADDED
Binary file
|
languages/easy-modal-ru_RU.po
ADDED
@@ -0,0 +1,893 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Easy Modal\n"
|
4 |
+
"POT-Creation-Date: 2014-07-05 21:57-0500\n"
|
5 |
+
"PO-Revision-Date: 2014-07-05 21:57-0500\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: ru_RU\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.6\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
16 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
17 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
+
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
19 |
+
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
#: classes/admin.php:53 classes/admin/menu.php:52 classes/admin/menu.php:53
|
23 |
+
msgid "Settings"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: classes/admin.php:55
|
27 |
+
msgid "Go Pro"
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: classes/admin/api.php:151
|
31 |
+
msgid "An Unexpected HTTP Error occurred during the API request."
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: classes/admin/api.php:158
|
35 |
+
msgid "An unknown error occurred"
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: classes/admin/menu.php:30 classes/admin/menu.php:31
|
39 |
+
#: classes/controller/admin/modals.php:45
|
40 |
+
msgid "Modals"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: classes/admin/menu.php:41 classes/admin/menu.php:42
|
44 |
+
msgid "Theme"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: classes/admin/menu.php:63 classes/admin/menu.php:64
|
48 |
+
msgid "Help"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: classes/controller/admin/modals.php:61
|
52 |
+
msgid "Modal Updated."
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: classes/controller/admin/modals.php:61
|
56 |
+
msgid "Modal Created."
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: classes/controller/admin/modals.php:65
|
60 |
+
msgid "Edit Modal"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: classes/controller/admin/modals.php:65
|
64 |
+
msgid "Add New Modal"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: classes/controller/admin/modals.php:80
|
68 |
+
msgid "Modal cloned successfully"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: classes/controller/admin/modals.php:106
|
72 |
+
msgid " modals moved to the trash"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: classes/controller/admin/modals.php:118
|
76 |
+
msgid "Modal trash has been permanantly removed."
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: classes/controller/admin/modals.php:143
|
80 |
+
msgid " modal restored from trash."
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: classes/controller/admin/settings.php:33
|
84 |
+
msgid "Settings Updated."
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: classes/controller/admin/settings.php:37
|
88 |
+
msgid "Easy Modal Settings"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: classes/controller/admin/theme.php:29
|
92 |
+
msgid "Theme Updated."
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: classes/controller/admin/theme.php:33
|
96 |
+
msgid "Edit Theme"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: classes/view/admin/modal/form.php:9 classes/view/admin/modal/index.php:9
|
100 |
+
#: classes/view/admin/theme/form.php:9
|
101 |
+
msgid "Add New"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: classes/view/admin/modal/form.php:33 classes/view/admin/modal/form.php:57
|
105 |
+
#: classes/view/admin/settings/form.php:29
|
106 |
+
#: classes/view/admin/settings/form.php:53
|
107 |
+
#: classes/view/admin/theme/form.php:46
|
108 |
+
msgid "Publish"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: classes/view/admin/modal/form.php:39
|
112 |
+
#: classes/view/admin/settings/form.php:35
|
113 |
+
msgid "Clone"
|
114 |
+
msgstr ""
|
115 |
+
|
116 |
+
#: classes/view/admin/modal/form.php:43
|
117 |
+
#: classes/view/admin/settings/form.php:39
|
118 |
+
#: classes/view/admin/theme/form.php:52
|
119 |
+
msgid "Preview"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: classes/view/admin/modal/form.php:52
|
123 |
+
#: classes/view/admin/settings/form.php:48
|
124 |
+
msgid "Move to Trash"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: classes/view/admin/modal/index.php:129
|
128 |
+
#: includes/admin/modal-form-general-tab.php:25
|
129 |
+
#: includes/admin/theme-form-general-tab.php:25
|
130 |
+
msgid "Name"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: classes/view/admin/modal/index.php:130
|
134 |
+
msgid "Class"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: classes/view/admin/modal/index.php:131
|
138 |
+
msgid "Load Method"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: classes/view/admin/modal/index.php:162
|
142 |
+
#: classes/view/admin/modal/index.php:195
|
143 |
+
msgid "Delete"
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#: classes/view/admin/modal/index.php:164
|
147 |
+
msgid "Restore"
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: classes/view/admin/modal/index.php:166
|
151 |
+
msgid "Empty Trash"
|
152 |
+
msgstr ""
|
153 |
+
|
154 |
+
#: classes/view/admin/modal/index.php:187
|
155 |
+
#, php-format
|
156 |
+
msgid "Edit “%s”"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: classes/view/admin/modal/index.php:191
|
160 |
+
msgid "Edit"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: classes/view/admin/modal/index.php:197
|
164 |
+
msgid "View"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: classes/view/admin/modal/index.php:216
|
168 |
+
msgid "Per Page / Post"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: classes/view/admin/modal/index.php:220
|
172 |
+
msgid "AJAX"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: classes/view/admin/modal/index.php:224
|
176 |
+
msgid "Sitewide"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: classes/view/admin/theme/form.php:25
|
180 |
+
msgid "Theme Preview"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: classes/view/admin/theme/form.php:28
|
184 |
+
msgid "Title Text"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: classes/view/admin/theme/form.php:30 classes/view/modal.php:80
|
188 |
+
#: includes/admin/options.php:60
|
189 |
+
msgid "×"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: classes/view/admin/theme/form.php:62
|
193 |
+
msgid "Save"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: em-core.php:77 em-core.php:78
|
197 |
+
msgid "Test"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: em-core.php:80
|
201 |
+
msgid "-test"
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: includes/admin/modal-form-close-tab.php:5
|
205 |
+
msgid "Close Options"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: includes/admin/modal-form-close-tab.php:25
|
209 |
+
msgid "Click Overlay to Close"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: includes/admin/modal-form-close-tab.php:28
|
213 |
+
msgid "Checking this will cause modal to close when user clicks on overlay."
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: includes/admin/modal-form-close-tab.php:38
|
217 |
+
msgid "Press ESC to Close"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: includes/admin/modal-form-close-tab.php:41
|
221 |
+
msgid "Checking this will cause modal to close when user presses ESC key."
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: includes/admin/modal-form-display-tab.php:5
|
225 |
+
msgid "Display Options"
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: includes/admin/modal-form-display-tab.php:27
|
229 |
+
#: includes/admin/theme-form-close-tab.php:134
|
230 |
+
#: includes/admin/theme-form-title-tab.php:38
|
231 |
+
msgid "Size"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: includes/admin/modal-form-display-tab.php:40
|
235 |
+
msgid "Select the size of the modal."
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: includes/admin/modal-form-display-tab.php:51
|
239 |
+
#: includes/admin/theme-form-close-tab.php:233
|
240 |
+
#: includes/admin/theme-form-container-tab.php:107
|
241 |
+
msgid "Width"
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: includes/admin/modal-form-display-tab.php:64
|
245 |
+
msgid "Set a custom width for the modal."
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: includes/admin/modal-form-display-tab.php:70
|
249 |
+
msgid "Auto Adjusted Height"
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: includes/admin/modal-form-display-tab.php:73
|
253 |
+
msgid "Checking this option will set height to fix the content."
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: includes/admin/modal-form-display-tab.php:80
|
257 |
+
msgid "Height"
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: includes/admin/modal-form-display-tab.php:93
|
261 |
+
msgid "Set a custom height for the modal."
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: includes/admin/modal-form-display-tab.php:104
|
265 |
+
msgid "Animation"
|
266 |
+
msgstr ""
|
267 |
+
|
268 |
+
#: includes/admin/modal-form-display-tab.php:109
|
269 |
+
msgid "Animation Type"
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
#: includes/admin/modal-form-display-tab.php:121
|
273 |
+
msgid "Select an animation type for your modal."
|
274 |
+
msgstr ""
|
275 |
+
|
276 |
+
#: includes/admin/modal-form-display-tab.php:127
|
277 |
+
msgid "Animation Speed"
|
278 |
+
msgstr ""
|
279 |
+
|
280 |
+
#: includes/admin/modal-form-display-tab.php:133
|
281 |
+
msgid "Set the animation speed for the modal."
|
282 |
+
msgstr ""
|
283 |
+
|
284 |
+
#: includes/admin/modal-form-display-tab.php:139
|
285 |
+
msgid "Animation Origin"
|
286 |
+
msgstr ""
|
287 |
+
|
288 |
+
#: includes/admin/modal-form-display-tab.php:151
|
289 |
+
msgid "Choose where the animation will begin."
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: includes/admin/modal-form-display-tab.php:162
|
293 |
+
#: includes/admin/theme-form-close-tab.php:70
|
294 |
+
msgid "Position"
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
#: includes/admin/modal-form-display-tab.php:166
|
298 |
+
#: includes/admin/theme-form-close-tab.php:55
|
299 |
+
msgid "Location"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: includes/admin/modal-form-display-tab.php:177
|
303 |
+
#: includes/admin/theme-form-close-tab.php:66
|
304 |
+
msgid "Choose which corner the close button will be positioned."
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: includes/admin/modal-form-display-tab.php:181
|
308 |
+
msgid "Fixed"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: includes/admin/modal-form-display-tab.php:184
|
312 |
+
msgid "Checking this fixes the position of the modal."
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: includes/admin/modal-form-display-tab.php:189
|
316 |
+
#: includes/admin/options.php:200 includes/admin/theme-form-close-tab.php:74
|
317 |
+
msgid "Top"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: includes/admin/modal-form-display-tab.php:194
|
321 |
+
#: includes/admin/theme-form-close-tab.php:79
|
322 |
+
msgid "Top."
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: includes/admin/modal-form-display-tab.php:199
|
326 |
+
#: includes/admin/options.php:202 includes/admin/theme-form-close-tab.php:94
|
327 |
+
msgid "Bottom"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: includes/admin/modal-form-display-tab.php:204
|
331 |
+
#: includes/admin/theme-form-close-tab.php:99
|
332 |
+
msgid "Bottom."
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: includes/admin/modal-form-display-tab.php:209
|
336 |
+
#: includes/admin/options.php:141 includes/admin/options.php:201
|
337 |
+
#: includes/admin/theme-form-close-tab.php:84
|
338 |
+
msgid "Left"
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: includes/admin/modal-form-display-tab.php:214
|
342 |
+
#: includes/admin/theme-form-close-tab.php:89
|
343 |
+
msgid "Left."
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: includes/admin/modal-form-display-tab.php:219
|
347 |
+
#: includes/admin/options.php:143 includes/admin/options.php:203
|
348 |
+
#: includes/admin/theme-form-close-tab.php:104
|
349 |
+
msgid "Right"
|
350 |
+
msgstr ""
|
351 |
+
|
352 |
+
#: includes/admin/modal-form-display-tab.php:224
|
353 |
+
#: includes/admin/theme-form-close-tab.php:109
|
354 |
+
msgid "Right."
|
355 |
+
msgstr ""
|
356 |
+
|
357 |
+
#: includes/admin/modal-form-example-tab.php:5
|
358 |
+
msgid "Examples"
|
359 |
+
msgstr ""
|
360 |
+
|
361 |
+
#: includes/admin/modal-form-example-tab.php:14
|
362 |
+
msgid "Copy this class to the link/button you want to open this modal."
|
363 |
+
msgstr ""
|
364 |
+
|
365 |
+
#: includes/admin/modal-form-example-tab.php:18
|
366 |
+
msgid "Link Example"
|
367 |
+
msgstr ""
|
368 |
+
|
369 |
+
#: includes/admin/modal-form-example-tab.php:19
|
370 |
+
#: includes/admin/modal-form-example-tab.php:20
|
371 |
+
#: includes/admin/modal-form-example-tab.php:24
|
372 |
+
#: includes/admin/modal-form-example-tab.php:25
|
373 |
+
msgid "Open Modal"
|
374 |
+
msgstr ""
|
375 |
+
|
376 |
+
#: includes/admin/modal-form-example-tab.php:23
|
377 |
+
msgid "Button Example"
|
378 |
+
msgstr ""
|
379 |
+
|
380 |
+
#: includes/admin/modal-form-example-tab.php:27
|
381 |
+
msgid "Image Example"
|
382 |
+
msgstr ""
|
383 |
+
|
384 |
+
#: includes/admin/modal-form-general-tab.php:5
|
385 |
+
#: includes/admin/theme-form-general-tab.php:5
|
386 |
+
msgid "General"
|
387 |
+
msgstr ""
|
388 |
+
|
389 |
+
#: includes/admin/modal-form-general-tab.php:31
|
390 |
+
msgid "Enter a name for your modal."
|
391 |
+
msgstr ""
|
392 |
+
|
393 |
+
#: includes/admin/modal-form-general-tab.php:43
|
394 |
+
msgid "Load Type"
|
395 |
+
msgstr ""
|
396 |
+
|
397 |
+
#: includes/admin/modal-form-general-tab.php:48
|
398 |
+
msgid "Per Page/Post"
|
399 |
+
msgstr ""
|
400 |
+
|
401 |
+
#: includes/admin/modal-form-general-tab.php:49
|
402 |
+
msgid "Load Sitewide"
|
403 |
+
msgstr ""
|
404 |
+
|
405 |
+
#: includes/admin/modal-form-general-tab.php:50
|
406 |
+
msgid "Using AJAX"
|
407 |
+
msgstr ""
|
408 |
+
|
409 |
+
#: includes/admin/modal-form-general-tab.php:52
|
410 |
+
msgid "Load this modal per page, sitewide or using ajax."
|
411 |
+
msgstr ""
|
412 |
+
|
413 |
+
#: includes/admin/modal-form-general-tab.php:64
|
414 |
+
#: includes/admin/theme-form-title-tab.php:5
|
415 |
+
msgid "Title"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: includes/admin/modal-form-general-tab.php:70
|
419 |
+
msgid "The title that appears in the modal window."
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: includes/admin/modal-form-general-tab.php:81
|
423 |
+
#: includes/admin/theme-form-content-tab.php:5
|
424 |
+
msgid "Content"
|
425 |
+
msgstr ""
|
426 |
+
|
427 |
+
#: includes/admin/modal-form-general-tab.php:96
|
428 |
+
msgid "Modal content. Can contain shortcodes."
|
429 |
+
msgstr ""
|
430 |
+
|
431 |
+
#: includes/admin/options.php:100
|
432 |
+
msgid "PX"
|
433 |
+
msgstr ""
|
434 |
+
|
435 |
+
#: includes/admin/options.php:101
|
436 |
+
msgid "%"
|
437 |
+
msgstr ""
|
438 |
+
|
439 |
+
#: includes/admin/options.php:102
|
440 |
+
msgid "EM"
|
441 |
+
msgstr ""
|
442 |
+
|
443 |
+
#: includes/admin/options.php:103
|
444 |
+
msgid "REM"
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#: includes/admin/options.php:111 includes/admin/options.php:186
|
448 |
+
msgid "None"
|
449 |
+
msgstr ""
|
450 |
+
|
451 |
+
#: includes/admin/options.php:112
|
452 |
+
msgid "Solid"
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: includes/admin/options.php:113
|
456 |
+
msgid "Dotted"
|
457 |
+
msgstr ""
|
458 |
+
|
459 |
+
#: includes/admin/options.php:114
|
460 |
+
msgid "Dashed"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: includes/admin/options.php:115
|
464 |
+
msgid "Double"
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#: includes/admin/options.php:116
|
468 |
+
msgid "Groove"
|
469 |
+
msgstr ""
|
470 |
+
|
471 |
+
#: includes/admin/options.php:117 includes/admin/theme-form-close-tab.php:252
|
472 |
+
#: includes/admin/theme-form-container-tab.php:125
|
473 |
+
msgid "Inset"
|
474 |
+
msgstr ""
|
475 |
+
|
476 |
+
#: includes/admin/options.php:118
|
477 |
+
msgid "Outset"
|
478 |
+
msgstr ""
|
479 |
+
|
480 |
+
#: includes/admin/options.php:119
|
481 |
+
msgid "Ridge"
|
482 |
+
msgstr ""
|
483 |
+
|
484 |
+
#: includes/admin/options.php:127
|
485 |
+
msgid "Sans-Serif"
|
486 |
+
msgstr ""
|
487 |
+
|
488 |
+
#: includes/admin/options.php:128
|
489 |
+
msgid "Tahoma"
|
490 |
+
msgstr ""
|
491 |
+
|
492 |
+
#: includes/admin/options.php:129
|
493 |
+
msgid "Georgia"
|
494 |
+
msgstr ""
|
495 |
+
|
496 |
+
#: includes/admin/options.php:130
|
497 |
+
msgid "Comic Sans MS"
|
498 |
+
msgstr ""
|
499 |
+
|
500 |
+
#: includes/admin/options.php:131
|
501 |
+
msgid "Arial"
|
502 |
+
msgstr ""
|
503 |
+
|
504 |
+
#: includes/admin/options.php:132
|
505 |
+
msgid "Lucida Grande"
|
506 |
+
msgstr ""
|
507 |
+
|
508 |
+
#: includes/admin/options.php:133
|
509 |
+
msgid "Times New Roman"
|
510 |
+
msgstr ""
|
511 |
+
|
512 |
+
#: includes/admin/options.php:142
|
513 |
+
msgid "Center"
|
514 |
+
msgstr ""
|
515 |
+
|
516 |
+
#: includes/admin/options.php:152
|
517 |
+
msgid "-----------------------"
|
518 |
+
msgstr ""
|
519 |
+
|
520 |
+
#: includes/admin/options.php:160
|
521 |
+
msgid "Auto"
|
522 |
+
msgstr ""
|
523 |
+
|
524 |
+
#: includes/admin/options.php:161
|
525 |
+
msgid "Responsive"
|
526 |
+
msgstr ""
|
527 |
+
|
528 |
+
#: includes/admin/options.php:162
|
529 |
+
msgid "Normal"
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
+
#: includes/admin/options.php:163
|
533 |
+
msgid "Nano"
|
534 |
+
msgstr ""
|
535 |
+
|
536 |
+
#: includes/admin/options.php:164
|
537 |
+
msgid "Tiny"
|
538 |
+
msgstr ""
|
539 |
+
|
540 |
+
#: includes/admin/options.php:165
|
541 |
+
msgid "Small"
|
542 |
+
msgstr ""
|
543 |
+
|
544 |
+
#: includes/admin/options.php:166
|
545 |
+
msgid "Medium"
|
546 |
+
msgstr ""
|
547 |
+
|
548 |
+
#: includes/admin/options.php:167
|
549 |
+
msgid "Large"
|
550 |
+
msgstr ""
|
551 |
+
|
552 |
+
#: includes/admin/options.php:168
|
553 |
+
msgid "X Large"
|
554 |
+
msgstr ""
|
555 |
+
|
556 |
+
#: includes/admin/options.php:176
|
557 |
+
msgid "Non-Responsive"
|
558 |
+
msgstr ""
|
559 |
+
|
560 |
+
#: includes/admin/options.php:177
|
561 |
+
msgid "Custom"
|
562 |
+
msgstr ""
|
563 |
+
|
564 |
+
#: includes/admin/options.php:187
|
565 |
+
msgid "Slide"
|
566 |
+
msgstr ""
|
567 |
+
|
568 |
+
#: includes/admin/options.php:188
|
569 |
+
msgid "Fade"
|
570 |
+
msgstr ""
|
571 |
+
|
572 |
+
#: includes/admin/options.php:189
|
573 |
+
msgid "Fade and Slide"
|
574 |
+
msgstr ""
|
575 |
+
|
576 |
+
#: includes/admin/options.php:190
|
577 |
+
msgid "Grow"
|
578 |
+
msgstr ""
|
579 |
+
|
580 |
+
#: includes/admin/options.php:191
|
581 |
+
msgid "Grow and Slide"
|
582 |
+
msgstr ""
|
583 |
+
|
584 |
+
#: includes/admin/options.php:204 includes/admin/options.php:221
|
585 |
+
#: includes/admin/options.php:237
|
586 |
+
msgid "Top Left"
|
587 |
+
msgstr ""
|
588 |
+
|
589 |
+
#: includes/admin/options.php:205 includes/admin/options.php:222
|
590 |
+
msgid "Top Center"
|
591 |
+
msgstr ""
|
592 |
+
|
593 |
+
#: includes/admin/options.php:206 includes/admin/options.php:223
|
594 |
+
#: includes/admin/options.php:238
|
595 |
+
msgid "Top Right"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: includes/admin/options.php:207 includes/admin/options.php:224
|
599 |
+
msgid "Middle Left"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: includes/admin/options.php:208 includes/admin/options.php:225
|
603 |
+
msgid "Middle Center"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: includes/admin/options.php:209 includes/admin/options.php:226
|
607 |
+
msgid "Middle Right"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: includes/admin/options.php:210 includes/admin/options.php:227
|
611 |
+
#: includes/admin/options.php:239
|
612 |
+
msgid "Bottom Left"
|
613 |
+
msgstr ""
|
614 |
+
|
615 |
+
#: includes/admin/options.php:211 includes/admin/options.php:228
|
616 |
+
msgid "Bottom Center"
|
617 |
+
msgstr ""
|
618 |
+
|
619 |
+
#: includes/admin/options.php:212 includes/admin/options.php:229
|
620 |
+
#: includes/admin/options.php:240
|
621 |
+
msgid "Bottom Right"
|
622 |
+
msgstr ""
|
623 |
+
|
624 |
+
#: includes/admin/postmeta.php:9
|
625 |
+
msgid "Select which modals to load"
|
626 |
+
msgstr ""
|
627 |
+
|
628 |
+
#: includes/admin/postmeta.php:12
|
629 |
+
msgid " checked=\"checked\""
|
630 |
+
msgstr ""
|
631 |
+
|
632 |
+
#: includes/admin/theme-form-close-tab.php:5
|
633 |
+
msgid "Close"
|
634 |
+
msgstr ""
|
635 |
+
|
636 |
+
#: includes/admin/theme-form-close-tab.php:24
|
637 |
+
msgid "Text"
|
638 |
+
msgstr ""
|
639 |
+
|
640 |
+
#: includes/admin/theme-form-close-tab.php:28
|
641 |
+
msgid "Enter the close button text."
|
642 |
+
msgstr ""
|
643 |
+
|
644 |
+
#: includes/admin/theme-form-close-tab.php:39
|
645 |
+
#: includes/admin/theme-form-container-tab.php:26
|
646 |
+
msgid "Padding"
|
647 |
+
msgstr ""
|
648 |
+
|
649 |
+
#: includes/admin/theme-form-close-tab.php:44
|
650 |
+
#: includes/admin/theme-form-container-tab.php:31
|
651 |
+
msgid "Padding."
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: includes/admin/theme-form-close-tab.php:120
|
655 |
+
#: includes/admin/theme-form-content-tab.php:24
|
656 |
+
#: includes/admin/theme-form-title-tab.php:24
|
657 |
+
msgid "Font"
|
658 |
+
msgstr ""
|
659 |
+
|
660 |
+
#: includes/admin/theme-form-close-tab.php:124
|
661 |
+
#: includes/admin/theme-form-close-tab.php:169
|
662 |
+
#: includes/admin/theme-form-close-tab.php:224
|
663 |
+
#: includes/admin/theme-form-close-tab.php:308
|
664 |
+
#: includes/admin/theme-form-close-tab.php:365
|
665 |
+
#: includes/admin/theme-form-container-tab.php:45
|
666 |
+
#: includes/admin/theme-form-container-tab.php:98
|
667 |
+
#: includes/admin/theme-form-container-tab.php:181
|
668 |
+
#: includes/admin/theme-form-content-tab.php:28
|
669 |
+
#: includes/admin/theme-form-overlay-tab.php:24
|
670 |
+
#: includes/admin/theme-form-title-tab.php:28
|
671 |
+
#: includes/admin/theme-form-title-tab.php:118
|
672 |
+
msgid "Color"
|
673 |
+
msgstr ""
|
674 |
+
|
675 |
+
#: includes/admin/theme-form-close-tab.php:128
|
676 |
+
msgid "Choose the font color for your close button."
|
677 |
+
msgstr ""
|
678 |
+
|
679 |
+
#: includes/admin/theme-form-close-tab.php:139
|
680 |
+
#: includes/admin/theme-form-title-tab.php:43
|
681 |
+
msgid "Font size."
|
682 |
+
msgstr ""
|
683 |
+
|
684 |
+
#: includes/admin/theme-form-close-tab.php:144
|
685 |
+
#: includes/admin/theme-form-content-tab.php:49
|
686 |
+
#: includes/admin/theme-form-title-tab.php:48
|
687 |
+
msgid "Family"
|
688 |
+
msgstr ""
|
689 |
+
|
690 |
+
#: includes/admin/theme-form-close-tab.php:155
|
691 |
+
#: includes/admin/theme-form-content-tab.php:60
|
692 |
+
#: includes/admin/theme-form-title-tab.php:59
|
693 |
+
msgid "Font family."
|
694 |
+
msgstr ""
|
695 |
+
|
696 |
+
#: includes/admin/theme-form-close-tab.php:165
|
697 |
+
#: includes/admin/theme-form-container-tab.php:41
|
698 |
+
msgid "Background"
|
699 |
+
msgstr ""
|
700 |
+
|
701 |
+
#: includes/admin/theme-form-close-tab.php:173
|
702 |
+
msgid "Choose the background color for your close button."
|
703 |
+
msgstr ""
|
704 |
+
|
705 |
+
#: includes/admin/theme-form-close-tab.php:178
|
706 |
+
#: includes/admin/theme-form-close-tab.php:317
|
707 |
+
#: includes/admin/theme-form-close-tab.php:374
|
708 |
+
#: includes/admin/theme-form-container-tab.php:54
|
709 |
+
#: includes/admin/theme-form-container-tab.php:190
|
710 |
+
#: includes/admin/theme-form-overlay-tab.php:33
|
711 |
+
#: includes/admin/theme-form-title-tab.php:127
|
712 |
+
msgid "Opacity"
|
713 |
+
msgstr ""
|
714 |
+
|
715 |
+
#: includes/admin/theme-form-close-tab.php:183
|
716 |
+
#: includes/admin/theme-form-container-tab.php:59
|
717 |
+
msgid "Background opacity."
|
718 |
+
msgstr ""
|
719 |
+
|
720 |
+
#: includes/admin/theme-form-close-tab.php:194
|
721 |
+
#: includes/admin/theme-form-container-tab.php:68
|
722 |
+
msgid "Border"
|
723 |
+
msgstr ""
|
724 |
+
|
725 |
+
#: includes/admin/theme-form-close-tab.php:198
|
726 |
+
#: includes/admin/theme-form-container-tab.php:72
|
727 |
+
msgid "Radius"
|
728 |
+
msgstr ""
|
729 |
+
|
730 |
+
#: includes/admin/theme-form-close-tab.php:203
|
731 |
+
msgid "Choose a corner radius for your close button."
|
732 |
+
msgstr ""
|
733 |
+
|
734 |
+
#: includes/admin/theme-form-close-tab.php:208
|
735 |
+
#: includes/admin/theme-form-container-tab.php:82
|
736 |
+
msgid "Style"
|
737 |
+
msgstr ""
|
738 |
+
|
739 |
+
#: includes/admin/theme-form-close-tab.php:219
|
740 |
+
msgid "Choose a border style for your close button."
|
741 |
+
msgstr ""
|
742 |
+
|
743 |
+
#: includes/admin/theme-form-close-tab.php:228
|
744 |
+
msgid "Choose the border color for your close button."
|
745 |
+
msgstr ""
|
746 |
+
|
747 |
+
#: includes/admin/theme-form-close-tab.php:238
|
748 |
+
#: includes/admin/theme-form-container-tab.php:112
|
749 |
+
msgid "Choose a width for your border."
|
750 |
+
msgstr ""
|
751 |
+
|
752 |
+
#: includes/admin/theme-form-close-tab.php:248
|
753 |
+
#: includes/admin/theme-form-container-tab.php:121
|
754 |
+
msgid "Drop Shadow"
|
755 |
+
msgstr ""
|
756 |
+
|
757 |
+
#: includes/admin/theme-form-close-tab.php:256
|
758 |
+
#: includes/admin/theme-form-container-tab.php:129
|
759 |
+
msgid "Yes"
|
760 |
+
msgstr ""
|
761 |
+
|
762 |
+
#: includes/admin/theme-form-close-tab.php:256
|
763 |
+
#: includes/admin/theme-form-container-tab.php:129
|
764 |
+
msgid "No"
|
765 |
+
msgstr ""
|
766 |
+
|
767 |
+
#: includes/admin/theme-form-close-tab.php:263
|
768 |
+
#: includes/admin/theme-form-container-tab.php:136
|
769 |
+
msgid "Is boxshadow inset or drop."
|
770 |
+
msgstr ""
|
771 |
+
|
772 |
+
#: includes/admin/theme-form-close-tab.php:268
|
773 |
+
#: includes/admin/theme-form-close-tab.php:335
|
774 |
+
#: includes/admin/theme-form-container-tab.php:141
|
775 |
+
#: includes/admin/theme-form-title-tab.php:88
|
776 |
+
msgid "Horizontal Length"
|
777 |
+
msgstr ""
|
778 |
+
|
779 |
+
#: includes/admin/theme-form-close-tab.php:273
|
780 |
+
#: includes/admin/theme-form-close-tab.php:340
|
781 |
+
#: includes/admin/theme-form-container-tab.php:146
|
782 |
+
#: includes/admin/theme-form-title-tab.php:93
|
783 |
+
msgid "Shadow horizontal length."
|
784 |
+
msgstr ""
|
785 |
+
|
786 |
+
#: includes/admin/theme-form-close-tab.php:278
|
787 |
+
#: includes/admin/theme-form-close-tab.php:345
|
788 |
+
#: includes/admin/theme-form-container-tab.php:151
|
789 |
+
#: includes/admin/theme-form-title-tab.php:98
|
790 |
+
msgid "Vertical Length"
|
791 |
+
msgstr ""
|
792 |
+
|
793 |
+
#: includes/admin/theme-form-close-tab.php:283
|
794 |
+
#: includes/admin/theme-form-close-tab.php:350
|
795 |
+
#: includes/admin/theme-form-container-tab.php:156
|
796 |
+
#: includes/admin/theme-form-title-tab.php:103
|
797 |
+
msgid "Shadow vertical length."
|
798 |
+
msgstr ""
|
799 |
+
|
800 |
+
#: includes/admin/theme-form-close-tab.php:288
|
801 |
+
#: includes/admin/theme-form-close-tab.php:355
|
802 |
+
#: includes/admin/theme-form-container-tab.php:161
|
803 |
+
#: includes/admin/theme-form-title-tab.php:108
|
804 |
+
msgid "Blur Radius"
|
805 |
+
msgstr ""
|
806 |
+
|
807 |
+
#: includes/admin/theme-form-close-tab.php:293
|
808 |
+
#: includes/admin/theme-form-close-tab.php:360
|
809 |
+
#: includes/admin/theme-form-container-tab.php:166
|
810 |
+
#: includes/admin/theme-form-title-tab.php:113
|
811 |
+
msgid "Shadow blur radius."
|
812 |
+
msgstr ""
|
813 |
+
|
814 |
+
#: includes/admin/theme-form-close-tab.php:298
|
815 |
+
#: includes/admin/theme-form-container-tab.php:171
|
816 |
+
msgid "Spread"
|
817 |
+
msgstr ""
|
818 |
+
|
819 |
+
#: includes/admin/theme-form-close-tab.php:303
|
820 |
+
#: includes/admin/theme-form-container-tab.php:176
|
821 |
+
msgid "Shadow spread."
|
822 |
+
msgstr ""
|
823 |
+
|
824 |
+
#: includes/admin/theme-form-close-tab.php:312
|
825 |
+
#: includes/admin/theme-form-close-tab.php:369
|
826 |
+
#: includes/admin/theme-form-container-tab.php:185
|
827 |
+
#: includes/admin/theme-form-title-tab.php:122
|
828 |
+
msgid "Shadow color."
|
829 |
+
msgstr ""
|
830 |
+
|
831 |
+
#: includes/admin/theme-form-close-tab.php:322
|
832 |
+
#: includes/admin/theme-form-close-tab.php:379
|
833 |
+
#: includes/admin/theme-form-container-tab.php:195
|
834 |
+
#: includes/admin/theme-form-title-tab.php:132
|
835 |
+
msgid "Shadow opacity."
|
836 |
+
msgstr ""
|
837 |
+
|
838 |
+
#: includes/admin/theme-form-close-tab.php:331
|
839 |
+
#: includes/admin/theme-form-title-tab.php:84
|
840 |
+
msgid "Text Shadow"
|
841 |
+
msgstr ""
|
842 |
+
|
843 |
+
#: includes/admin/theme-form-container-tab.php:5
|
844 |
+
msgid "Container"
|
845 |
+
msgstr ""
|
846 |
+
|
847 |
+
#: includes/admin/theme-form-container-tab.php:49
|
848 |
+
msgid "Choose the background color for your container."
|
849 |
+
msgstr ""
|
850 |
+
|
851 |
+
#: includes/admin/theme-form-container-tab.php:77
|
852 |
+
msgid "Choose a corner radius for your container button."
|
853 |
+
msgstr ""
|
854 |
+
|
855 |
+
#: includes/admin/theme-form-container-tab.php:93
|
856 |
+
msgid "Choose a border style for your container button."
|
857 |
+
msgstr ""
|
858 |
+
|
859 |
+
#: includes/admin/theme-form-container-tab.php:102
|
860 |
+
msgid "Choose the border color for your container button."
|
861 |
+
msgstr ""
|
862 |
+
|
863 |
+
#: includes/admin/theme-form-content-tab.php:32
|
864 |
+
msgid "Choose the font color for your content button."
|
865 |
+
msgstr ""
|
866 |
+
|
867 |
+
#: includes/admin/theme-form-general-tab.php:31
|
868 |
+
msgid "Enter a name for your theme."
|
869 |
+
msgstr ""
|
870 |
+
|
871 |
+
#: includes/admin/theme-form-overlay-tab.php:5
|
872 |
+
msgid "Overlay"
|
873 |
+
msgstr ""
|
874 |
+
|
875 |
+
#: includes/admin/theme-form-overlay-tab.php:28
|
876 |
+
msgid "Choose the overlay color."
|
877 |
+
msgstr ""
|
878 |
+
|
879 |
+
#: includes/admin/theme-form-overlay-tab.php:38
|
880 |
+
msgid "The opacity value for the overlay."
|
881 |
+
msgstr ""
|
882 |
+
|
883 |
+
#: includes/admin/theme-form-title-tab.php:32
|
884 |
+
msgid "Font color."
|
885 |
+
msgstr ""
|
886 |
+
|
887 |
+
#: includes/admin/theme-form-title-tab.php:64
|
888 |
+
msgid "Align"
|
889 |
+
msgstr ""
|
890 |
+
|
891 |
+
#: includes/admin/theme-form-title-tab.php:75
|
892 |
+
msgid "Text alignment."
|
893 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -1,40 +1,76 @@
|
|
1 |
=== Easy Modal ===
|
2 |
-
Contributors: danieliser
|
3 |
Author URI: http://wizardinternetsolutions.com
|
4 |
Plugin URI: http://easy-modal.com
|
5 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PQTG2JYUKSLFW
|
6 |
Tags: modal,modal box,modal form,modal window,popup,popup box,popup form,popup window,ajax forms
|
7 |
-
Requires at least: 3.
|
8 |
-
Tested up to: 3.9
|
9 |
-
Stable tag:
|
10 |
-
|
11 |
== Description ==
|
12 |
-
|
13 |
|
14 |
= Core Features =
|
15 |
* Unlimited Customizable Modals
|
16 |
-
* Modal
|
|
|
|
|
|
|
|
|
|
|
17 |
* Visual Theme Editor
|
18 |
-
*
|
19 |
-
*
|
20 |
-
*
|
21 |
-
*
|
22 |
-
*
|
23 |
-
*
|
24 |
-
*
|
|
|
25 |
|
26 |
= Pro Features =
|
27 |
-
*
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
* Expedited Feature Requests
|
30 |
-
*
|
31 |
-
*
|
32 |
-
|
33 |
-
|
34 |
-
*
|
35 |
-
*
|
36 |
-
*
|
37 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
If you like the plugin please rate it.
|
40 |
|
@@ -45,13 +81,43 @@ If you like the plugin please rate it.
|
|
45 |
To be notified of plugin updates, [follow us on Twitter](https://twitter.com/EasyModal "Easy Modal on Twitter")!
|
46 |
|
47 |
== Installation ==
|
48 |
-
1.
|
49 |
-
2.
|
50 |
-
3.
|
51 |
-
4.
|
52 |
-
5. Copy and Add `eModal-#` class from the modals settings page to the element you want to make open the modal window. Will work on divs, links, images, list elements and just about anything else.
|
53 |
|
54 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
= v1.3.0.3 =
|
56 |
* Bug
|
57 |
* [EM-67] - Modal Custom Height Not Working
|
@@ -141,8 +207,4 @@ To be notified of plugin updates, [follow us on Twitter](https://twitter.com/Eas
|
|
141 |
= v0.9.0.4 =
|
142 |
* Options will be overwritten with default options.
|
143 |
= 0.9 =
|
144 |
-
* Initial Release
|
145 |
-
|
146 |
-
== Upgrade Notice ==
|
147 |
-
= 1.3 =
|
148 |
-
Added modal shortcode, full plugin support for gravity forms. A few minor code, updated readme.txt file.
|
1 |
=== Easy Modal ===
|
2 |
+
Contributors: danieliser, waltmesser
|
3 |
Author URI: http://wizardinternetsolutions.com
|
4 |
Plugin URI: http://easy-modal.com
|
5 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PQTG2JYUKSLFW
|
6 |
Tags: modal,modal box,modal form,modal window,popup,popup box,popup form,popup window,ajax forms
|
7 |
+
Requires at least: 3.4
|
8 |
+
Tested up to: 3.9.2
|
9 |
+
Stable tag: 2
|
10 |
+
Make a pop up - any pop up. Logins, Auto Exits, Scroll Pops, Age Verification Pops. Theme, customize, make a glorious pop up!
|
11 |
== Description ==
|
12 |
+
Make a pop up - any pop up - Logins, Auto Exits, Scroll Pops, Age Verification Pops - use EasyModal's ultimate theme capabilities and customization options to make glorious pop ups that increase your site's usability and conversion rates.
|
13 |
|
14 |
= Core Features =
|
15 |
* Unlimited Customizable Modals
|
16 |
+
* One (1) Customizable Modal Theme
|
17 |
+
* Custom Background Image Capabilities
|
18 |
+
* Disable Background Overlay Option
|
19 |
+
* Add Modals Anywhere
|
20 |
+
* Complete Modal Positioning Control
|
21 |
+
* Responsive Modals
|
22 |
* Visual Theme Editor
|
23 |
+
* WYSIWIG Content Editor
|
24 |
+
* Scrollable Content
|
25 |
+
* Site Wide Modals
|
26 |
+
* Page/Post Specific Modals
|
27 |
+
* Customizable Modal Opening Animations
|
28 |
+
* Customize close functions, click overlay, press esc key.
|
29 |
+
* Hooks & Filters for Ultimate Customization
|
30 |
+
* Support Forum Access
|
31 |
|
32 |
= Pro Features =
|
33 |
+
* Unlimited Customizable Modals Themes
|
34 |
+
* Enhanced Visual Theme Editor
|
35 |
+
* Force User Action Modals (Disable Close)
|
36 |
+
* Auto Open Modals (Per Page/Post or Site Wide)
|
37 |
+
* Access to Pro & Core Add Ons
|
38 |
+
* 1 Domain Only
|
39 |
+
* Pro Support Features:
|
40 |
+
* Page/Post Specific Modals
|
41 |
+
* Support Forum Access
|
42 |
+
* Pro User Support Requests
|
43 |
* Expedited Feature Requests
|
44 |
+
* Support Assistance
|
45 |
+
* Personal Customized Setup Assistance
|
46 |
+
|
47 |
+
= Pro Developer Features =
|
48 |
+
* EasyModal Core
|
49 |
+
* EasyModal Pro
|
50 |
+
* Access to Developer, Pro & Core Add Ons
|
51 |
+
* Unlimited Domains
|
52 |
+
* Pro Developer Support Features:
|
53 |
+
* Priority Developer Support
|
54 |
+
* Support Forum Access
|
55 |
+
* Pro User Support Requests
|
56 |
+
* Expedited Feature Requests
|
57 |
+
* Support Assistance
|
58 |
+
* Personal Customized Setup Assistance
|
59 |
+
|
60 |
+
|
61 |
+
= Add Ons =
|
62 |
+
* EasyModal Pro Add On
|
63 |
+
* This add on upgrades your Core Version to the Pro Version and includes both auto open on page load and open on scroll position modals.
|
64 |
+
* Exit Modals Add On (Pro & Pro Developer Only)
|
65 |
+
* This add on allows you to create modals and pop-ups that appear when a user attempts to leave or exit your site
|
66 |
+
* Login Modals Add On (Pro & Pro Developer Only)
|
67 |
+
* This add on gives you the ability to have ajax login forms appear in a pop-up. Also includes registration and forgot your password modals.
|
68 |
+
* Import/Export Add On (Pro & Pro Developer Only)
|
69 |
+
* This add on imports and exports settings from the EasyModal Plug-In
|
70 |
+
* Age Verification Add On (Pro & Pro Developer Only)
|
71 |
+
* This add on will pop-up and prompt users to verify their age by inputting the information in a form (or drop down), or use a simple button (click to proceed) format
|
72 |
+
|
73 |
+
|
74 |
|
75 |
If you like the plugin please rate it.
|
76 |
|
81 |
To be notified of plugin updates, [follow us on Twitter](https://twitter.com/EasyModal "Easy Modal on Twitter")!
|
82 |
|
83 |
== Installation ==
|
84 |
+
1. Login to WordPress and update to/install EasyModal version 2.0
|
85 |
+
2. Pro License Holders: Enter your license key on the settings page to activate your site. Then go to the Add Ons page under EasyModal - install the EasyModal Pro Add On, plus any other Add Ons you desire
|
86 |
+
3. For current users, settings from previously existing functionality will be imported to the appropriate Add Ons containing respective functionality automatically
|
87 |
+
4. Theme, customize, make a pop up.
|
|
|
88 |
|
89 |
== Changelog ==
|
90 |
+
|
91 |
+
= v2.0 =
|
92 |
+
* Bug
|
93 |
+
* Most bugs from previous versions have been addressed!
|
94 |
+
* Improvement
|
95 |
+
* EasyModal has been rewritten to support platforming, extendability, and customization
|
96 |
+
* Introduced EasyModal Add Ons as part of the platform
|
97 |
+
* Introduced Hooks & Filters Code Base as part of the extendability and customization of the plug-in
|
98 |
+
* There are now triple the theme settings, including:
|
99 |
+
* Pixel perfect positioning of the modal container, its' shadows, and its' text shadows
|
100 |
+
* Pixel perfect positioning of the close button, its' shadows, and its' text shadows
|
101 |
+
* Create your own custom background images for the overlay, modal container and close button (Pro Only)
|
102 |
+
* Modals now have an additional animation type and smoother animations, plus you can customize the animations' origins and finish positions
|
103 |
+
* We have added modal positioning options to both set the modal to fixed positioning as well as the ability to place it:
|
104 |
+
* To the right, to the left, on the bottom, or on the top
|
105 |
+
* Plus, use associated settings to place the modal exactly where you want, down to the pixel!
|
106 |
+
* Added the ability to use Auto Open Modals on scroll position (Pro Only)
|
107 |
+
* Plus many, many more options to personalize and customize your modal any way you like!
|
108 |
+
* Add Ons
|
109 |
+
* Added the EasyModal Pro Add On
|
110 |
+
* This add on upgrades your Core Version to the Pro Version
|
111 |
+
* Added the Exit Modals Add On (Pro & Pro Developer Only)
|
112 |
+
* This add on allows you to create modals and pop-ups that appear when a user attempts to leave or exit your site
|
113 |
+
* Added the Login Modals Add On (Pro & Pro Developer Only)
|
114 |
+
* This add on gives you the ability to have login forms appear in a pop-up
|
115 |
+
* Added the Import/Export Add On (Pro & Pro Developer Only)
|
116 |
+
* This add on imports and exports settings from the EasyModal Plug-In
|
117 |
+
* Added the Age Verification Add On (Pro & Pro Developer Only)
|
118 |
+
* This add on will pop-up and prompt users to verify their age by inputting the information in a form (or drop down), or use a simple button (click to proceed) format
|
119 |
+
|
120 |
+
|
121 |
= v1.3.0.3 =
|
122 |
* Bug
|
123 |
* [EM-67] - Modal Custom Height Not Working
|
207 |
= v0.9.0.4 =
|
208 |
* Options will be overwritten with default options.
|
209 |
= 0.9 =
|
210 |
+
* Initial Release
|
|
|
|
|
|
|
|
screenshot-1.jpg
DELETED
Binary file
|
screenshot-2.jpg
DELETED
Binary file
|