Version Description
- Fix : Blank page when edit post tag & attribute
- Fix : Snippet for homepage is not properly checked
- Add : Opt In feedback on plugin first disabling & review message
Download this release
Release Info
Developer | JoomUnited |
Plugin | WP Meta SEO |
Version | 4.0.10 |
Comparing to | |
See all releases |
Code changes from version 4.0.9 to 4.0.10
- inc/class.metaseo-admin.php +18 -15
- inc/class.metaseo-opengraph.php +8 -2
- jufeedback/assets/css/fonts/MaterialIcons-Regular.eot +0 -0
- jufeedback/assets/css/fonts/MaterialIcons-Regular.ttf +0 -0
- jufeedback/assets/css/fonts/MaterialIcons-Regular.woff +0 -0
- jufeedback/assets/css/fonts/MaterialIcons-Regular.woff2 +0 -0
- jufeedback/assets/css/jufeedback.css +316 -0
- jufeedback/assets/js/global.js +37 -0
- jufeedback/assets/js/jufeedback.js +196 -0
- jufeedback/assets/js/jufeedback.min.js +1 -0
- jufeedback/assets/js/jureview.js +35 -0
- jufeedback/assets/js/jureview.min.js +1 -0
- jufeedback/assets/js/tooltip.js +201 -0
- jufeedback/assets/js/velocity.min.js +5 -0
- jufeedback/assets/loading.gif +0 -0
- jufeedback/ju-check-debug-data.php +1163 -0
- jufeedback/jufeedback.php +613 -0
- languages/wp-meta-seo-en_US.mo +0 -0
- readme.txt +7 -2
- wp-meta-seo.php +15 -4
inc/class.metaseo-admin.php
CHANGED
@@ -283,28 +283,31 @@ class MetaSeoAdmin
|
|
283 |
public function saveCategoryMeta($term_id)
|
284 |
{
|
285 |
global $pagenow;
|
286 |
-
// phpcs:
|
287 |
if ($pagenow === 'edit-tags.php' || (isset($_POST['action'], $_POST['screen']) && $_POST['action'] === 'add-tag' && ($_POST['screen'] === 'edit-category' || $_POST['screen'] === 'edit-product_cat'))) {
|
288 |
-
if (
|
289 |
-
|
290 |
-
|
291 |
-
|
|
|
292 |
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
|
|
305 |
}
|
306 |
}
|
307 |
}
|
|
|
308 |
}
|
309 |
|
310 |
/**
|
283 |
public function saveCategoryMeta($term_id)
|
284 |
{
|
285 |
global $pagenow;
|
286 |
+
// phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce used in next lines
|
287 |
if ($pagenow === 'edit-tags.php' || (isset($_POST['action'], $_POST['screen']) && $_POST['action'] === 'add-tag' && ($_POST['screen'] === 'edit-category' || $_POST['screen'] === 'edit-product_cat'))) {
|
288 |
+
if (isset($_POST['taxonomy']) && ($_POST['taxonomy'] === 'product_cat' || $_POST['taxonomy'] === 'category')) {
|
289 |
+
if (empty($_POST['wpms_nonce'])
|
290 |
+
|| !wp_verify_nonce($_POST['wpms_nonce'], 'wpms_nonce')) {
|
291 |
+
die();
|
292 |
+
}
|
293 |
|
294 |
+
if (isset($_POST['wpms_category_metatitle'])) {
|
295 |
+
update_term_meta($term_id, 'wpms_category_metatitle', $_POST['wpms_category_metatitle']);
|
296 |
+
}
|
297 |
|
298 |
+
if (isset($_POST['wpms_category_metadesc'])) {
|
299 |
+
update_term_meta($term_id, 'wpms_category_metadesc', $_POST['wpms_category_metadesc']);
|
300 |
+
}
|
301 |
|
302 |
+
$settings = get_option('_metaseo_settings');
|
303 |
+
if (isset($settings['metaseo_showkeywords']) && (int) $settings['metaseo_showkeywords'] === 1) {
|
304 |
+
if (isset($_POST['wpms_category_metakeywords'])) {
|
305 |
+
update_term_meta($term_id, 'wpms_category_metakeywords', $_POST['wpms_category_metakeywords']);
|
306 |
+
}
|
307 |
}
|
308 |
}
|
309 |
}
|
310 |
+
//phpcs:enable
|
311 |
}
|
312 |
|
313 |
/**
|
inc/class.metaseo-opengraph.php
CHANGED
@@ -416,11 +416,12 @@ class MetaSeoOpenGraph
|
|
416 |
/**
|
417 |
* Get meta for front page
|
418 |
*
|
419 |
-
* @param array
|
|
|
420 |
*
|
421 |
* @return array
|
422 |
*/
|
423 |
-
public function getFrontPageMeta($settings)
|
424 |
{
|
425 |
$mpage_on_front = get_option('page_on_front');
|
426 |
$title = get_post_meta($mpage_on_front, '_metaseo_metatitle', true);
|
@@ -430,6 +431,11 @@ class MetaSeoOpenGraph
|
|
430 |
$title = $settings['metaseo_title_home'];
|
431 |
}
|
432 |
|
|
|
|
|
|
|
|
|
|
|
433 |
if ($desc === '') {
|
434 |
$desc = $settings['metaseo_desc_home'];
|
435 |
}
|
416 |
/**
|
417 |
* Get meta for front page
|
418 |
*
|
419 |
+
* @param array $settings Settings
|
420 |
+
* @param integer $id Id of posts
|
421 |
*
|
422 |
* @return array
|
423 |
*/
|
424 |
+
public function getFrontPageMeta($settings, $id)
|
425 |
{
|
426 |
$mpage_on_front = get_option('page_on_front');
|
427 |
$title = get_post_meta($mpage_on_front, '_metaseo_metatitle', true);
|
431 |
$title = $settings['metaseo_title_home'];
|
432 |
}
|
433 |
|
434 |
+
if (!empty($id)) {
|
435 |
+
$post = get_post($id);
|
436 |
+
$title = $this->replaceSnippet($title, $post);
|
437 |
+
}
|
438 |
+
|
439 |
if ($desc === '') {
|
440 |
$desc = $settings['metaseo_desc_home'];
|
441 |
}
|
jufeedback/assets/css/fonts/MaterialIcons-Regular.eot
ADDED
Binary file
|
jufeedback/assets/css/fonts/MaterialIcons-Regular.ttf
ADDED
Binary file
|
jufeedback/assets/css/fonts/MaterialIcons-Regular.woff
ADDED
Binary file
|
jufeedback/assets/css/fonts/MaterialIcons-Regular.woff2
ADDED
Binary file
|
jufeedback/assets/css/jufeedback.css
ADDED
@@ -0,0 +1,316 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@font-face {
|
2 |
+
font-family: 'Material Icons';
|
3 |
+
font-style: normal;
|
4 |
+
font-weight: 400;
|
5 |
+
src: url('../../../css/fonts/MaterialIcons-Regular.eot'); /* For IE6-8 */
|
6 |
+
src: url('../../../css/fonts/MaterialIcons-Regular.woff2') format('woff2'),
|
7 |
+
url('../../../css/fonts/MaterialIcons-Regular.woff') format('woff'),
|
8 |
+
url('../../../css/fonts/MaterialIcons-Regular.ttf') format('truetype');
|
9 |
+
}
|
10 |
+
.material-icons{
|
11 |
+
font-family: 'Material Icons';
|
12 |
+
font-weight: normal;
|
13 |
+
font-style: normal;
|
14 |
+
font-size: 24px; /* Preferred icon size */
|
15 |
+
display: inline-block;
|
16 |
+
line-height: 1;
|
17 |
+
text-transform: none;
|
18 |
+
letter-spacing: normal;
|
19 |
+
word-wrap: normal;
|
20 |
+
white-space: nowrap;
|
21 |
+
direction: ltr;
|
22 |
+
/* Support for all WebKit browsers. */
|
23 |
+
-webkit-font-smoothing: antialiased;
|
24 |
+
/* Support for Safari and Chrome. */
|
25 |
+
text-rendering: optimizeLegibility;
|
26 |
+
|
27 |
+
/* Support for Firefox. */
|
28 |
+
-moz-osx-font-smoothing: grayscale;
|
29 |
+
|
30 |
+
/* Support for IE. */
|
31 |
+
font-feature-settings: 'liga';
|
32 |
+
}
|
33 |
+
|
34 |
+
/*tooltip*/
|
35 |
+
|
36 |
+
.material-tooltip {
|
37 |
+
padding: 18px 20px;
|
38 |
+
font-size: 14px;
|
39 |
+
z-index: 10000;
|
40 |
+
background-color: transparent;
|
41 |
+
border-radius: 2px;
|
42 |
+
color: #fff;
|
43 |
+
min-height: 0;
|
44 |
+
line-height: 100%;
|
45 |
+
opacity: 0;
|
46 |
+
display: none;
|
47 |
+
position: absolute;
|
48 |
+
text-align: center;
|
49 |
+
overflow: hidden;
|
50 |
+
left: 0;
|
51 |
+
top: 0;
|
52 |
+
will-change: top, left;
|
53 |
+
max-width: 700px;
|
54 |
+
}
|
55 |
+
|
56 |
+
.backdrop {
|
57 |
+
position: absolute;
|
58 |
+
opacity: 0;
|
59 |
+
display: none;
|
60 |
+
height: 7px;
|
61 |
+
width: 14px;
|
62 |
+
border-radius: 0 0 14px 14px;
|
63 |
+
background-color: #000000;
|
64 |
+
z-index: -1;
|
65 |
+
-webkit-transform-origin: 50% 10%;
|
66 |
+
-moz-transform-origin: 50% 10%;
|
67 |
+
-ms-transform-origin: 50% 10%;
|
68 |
+
-o-transform-origin: 50% 10%;
|
69 |
+
transform-origin: 50% 10%;
|
70 |
+
will-change: transform, opacity;
|
71 |
+
}
|
72 |
+
|
73 |
+
a, div {
|
74 |
+
outline : none;
|
75 |
+
}
|
76 |
+
|
77 |
+
/* Overlays */
|
78 |
+
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
79 |
+
|
80 |
+
/*
|
81 |
+
* jQuery UI CSS Framework 1.8.16
|
82 |
+
*
|
83 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
84 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
85 |
+
* http://jquery.org/license
|
86 |
+
*
|
87 |
+
* http://docs.jquery.com/UI/Theming/API
|
88 |
+
*
|
89 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=sans-serif&fwDefault=normal&fsDefault=12px&cornerRadius=4px&bgColorHeader=ececec&bgTextureHeader=04_highlight_hard.png&bgImgOpacityHeader=75&borderColorHeader=dfdfdf&fcHeader=333333&iconColorHeader=999999&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=dfdfdf&fcContent=333333&iconColorContent=333333&bgColorDefault=ececec&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=75&borderColorDefault=dfdfdf&fcDefault=333333&iconColorDefault=333333&bgColorHover=ececec&bgTextureHover=06_inset_hard.png&bgImgOpacityHover=75&borderColorHover=ccc&fcHover=000000&iconColorHover=333333&bgColorActive=ffffff&bgTextureActive=01_flat.png&bgImgOpacityActive=65&borderColorActive=dfdfdf&fcActive=333333&iconColorActive=333333&bgColorHighlight=ffffe0&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=e6db55&fcHighlight=333333&iconColorHighlight=21759b&bgColorError=ffebe8&bgTextureError=01_flat.png&bgImgOpacityError=95&borderColorError=cc0000&fcError=cc0000&iconColorError=cc0000&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=3px
|
90 |
+
*/
|
91 |
+
|
92 |
+
|
93 |
+
/* Component containers
|
94 |
+
----------------------------------*/
|
95 |
+
.ui-widget { font-family: sans-serif; font-size: 12px; }
|
96 |
+
.ui-widget .ui-widget { font-size: 1em; }
|
97 |
+
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: sans-serif; font-size: 1em; }
|
98 |
+
.ui-widget-content { border: 1px solid #dfdfdf; background: #ffffff; color: #333333; }
|
99 |
+
.ui-widget-header { color: #333333; font-weight: bold; background-color: #f1f1f1; background-image: -ms-linear-gradient(top, #f9f9f9, #ececec); background-image: -moz-linear-gradient(top, #f9f9f9, #ececec); background-image: -o-linear-gradient(top, #f9f9f9, #ececec); background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec)); background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec); background-image: linear-gradient(top, #f9f9f9, #ececec); }
|
100 |
+
.ui-widget-header a { color: #333333; }
|
101 |
+
|
102 |
+
|
103 |
+
/* Overlays */
|
104 |
+
.ui-widget-overlay { background: #000000; opacity: .6;filter:Alpha(Opacity=60); }
|
105 |
+
.ui-widget-shadow { box-shadow: 0 0 16px rgba(0, 0, 0, 0.3); }/*
|
106 |
+
|
107 |
+
/*
|
108 |
+
* jQuery UI Dialog 1.8.16
|
109 |
+
*
|
110 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
111 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
112 |
+
* http://jquery.org/license
|
113 |
+
*
|
114 |
+
* http://docs.jquery.com/UI/Dialog#theming
|
115 |
+
*/
|
116 |
+
.ui-dialog { position: fixed; padding: .2em; width: 300px; overflow: hidden; }
|
117 |
+
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
118 |
+
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
119 |
+
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
120 |
+
.ui-dialog .ui-dialog-titlebar-close span { display: block; }
|
121 |
+
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
122 |
+
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
123 |
+
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
124 |
+
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
125 |
+
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
126 |
+
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
127 |
+
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
128 |
+
|
129 |
+
|
130 |
+
/** jQuery UI Dialog overrides **/
|
131 |
+
.noPadding.ui-dialog .ui-dialog-content {
|
132 |
+
padding: 0;
|
133 |
+
}
|
134 |
+
.noTitle .ui-dialog-titlebar {
|
135 |
+
display: none;
|
136 |
+
}
|
137 |
+
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
|
138 |
+
float: none;
|
139 |
+
text-align: center;
|
140 |
+
}
|
141 |
+
.ui-widget-overlay{
|
142 |
+
z-index: 1000;
|
143 |
+
position: fixed !important;
|
144 |
+
}
|
145 |
+
.ui-dialog{
|
146 |
+
z-index: 2000;
|
147 |
+
border-radius: 10px !important;
|
148 |
+
}
|
149 |
+
|
150 |
+
/*Modal feedback*/
|
151 |
+
|
152 |
+
.ju-feedback-dialog{
|
153 |
+
padding: 0 !important;
|
154 |
+
border-radius: 10px;
|
155 |
+
}
|
156 |
+
|
157 |
+
.ju-feedback-dialog .title {
|
158 |
+
text-transform: uppercase;
|
159 |
+
padding: 8px 15px;
|
160 |
+
-webkit-box-shadow: 0 0 8px rgba(0,0,0,.1);
|
161 |
+
box-shadow: 0 0 8px rgba(0,0,0,.1);
|
162 |
+
text-align: center;
|
163 |
+
line-height: 1.3;
|
164 |
+
font-size: 16px;
|
165 |
+
font-weight: bold;
|
166 |
+
}
|
167 |
+
|
168 |
+
.ju-feedback-dialog .feedback-content {
|
169 |
+
padding: 20px 20px 15px 20px;
|
170 |
+
}
|
171 |
+
|
172 |
+
.ju-feedback-dialog .feedback-content .text-introduction {
|
173 |
+
text-align: center;
|
174 |
+
padding: 5px;
|
175 |
+
}
|
176 |
+
|
177 |
+
.ju-feedback-dialog .feedback-content .text-introduction span {
|
178 |
+
line-height: 1.2;
|
179 |
+
font-size: 14px;
|
180 |
+
}
|
181 |
+
|
182 |
+
.ju-feedback-dialog .feedback-content ul.list-comments li{
|
183 |
+
margin-bottom: 12px;
|
184 |
+
font-size: 14px;
|
185 |
+
}
|
186 |
+
|
187 |
+
.ju-feedback-dialog .feedback-content ul.list-comments li label{
|
188 |
+
vertical-align: baseline;
|
189 |
+
line-height: 1.5;
|
190 |
+
}
|
191 |
+
|
192 |
+
.ju-feedback-dialog textarea.feedback-text {
|
193 |
+
width: 100%;
|
194 |
+
display: none;
|
195 |
+
margin-top: 5px;
|
196 |
+
}
|
197 |
+
|
198 |
+
.ju-feedback-dialog textarea.feedback-text:focus {
|
199 |
+
border: 1px solid #ddd;
|
200 |
+
box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
|
201 |
+
animation: blink 1s;
|
202 |
+
animation-iteration-count: 3;
|
203 |
+
}
|
204 |
+
|
205 |
+
@keyframes blink {
|
206 |
+
0% { border-color:#ddd ; }
|
207 |
+
50% { border-color:#90EE90 ; }
|
208 |
+
100% { border-color:#ddd ; }
|
209 |
+
}
|
210 |
+
|
211 |
+
|
212 |
+
.ju-feedback-dialog .technical-information textarea{
|
213 |
+
width: 100%;
|
214 |
+
margin-top: 5px;
|
215 |
+
max-height: 105px;
|
216 |
+
font-size: 14px;
|
217 |
+
}
|
218 |
+
|
219 |
+
.ju-feedback-dialog .feedback-notification {
|
220 |
+
font-size : 12px;
|
221 |
+
color : #ff0000;
|
222 |
+
display: none;
|
223 |
+
}
|
224 |
+
|
225 |
+
.ju-feedback-dialog .feedback-button {
|
226 |
+
float: right;
|
227 |
+
padding: 0 20px;
|
228 |
+
margin-bottom: 15px;
|
229 |
+
}
|
230 |
+
|
231 |
+
.ju-feedback-dialog .feedback-button a {
|
232 |
+
text-decoration: none;
|
233 |
+
cursor: pointer;
|
234 |
+
font-size: 14px;
|
235 |
+
border: 1px solid #ff8726;
|
236 |
+
margin-left: 10px;
|
237 |
+
font-weight: bold;
|
238 |
+
padding: 0 10px;
|
239 |
+
}
|
240 |
+
.ju-feedback-dialog .feedback-button a:hover {
|
241 |
+
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
|
242 |
+
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
|
243 |
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16);
|
244 |
+
}
|
245 |
+
|
246 |
+
.ju-feedback-dialog .feedback-button a.send-message {
|
247 |
+
background-color: #3287B7;
|
248 |
+
border-color: #3287B7;
|
249 |
+
color : #ffffff;
|
250 |
+
text-transform: uppercase;
|
251 |
+
line-height: 28px;
|
252 |
+
}
|
253 |
+
|
254 |
+
.ju-feedback-dialog .feedback-button a.disable-only {
|
255 |
+
background-color: #cccccc;
|
256 |
+
border-color: #cccccc;
|
257 |
+
color : #444;
|
258 |
+
text-transform: uppercase;
|
259 |
+
line-height: 28px;
|
260 |
+
}
|
261 |
+
|
262 |
+
.ju-feedback-dialog .ju-loading {
|
263 |
+
width: 28px;
|
264 |
+
height: 28px;
|
265 |
+
display: none;
|
266 |
+
}
|
267 |
+
|
268 |
+
.ju-feedback-dialog .feedback-result-notice {
|
269 |
+
background: #fff;
|
270 |
+
border-left: 4px solid #fff;
|
271 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
272 |
+
padding: 1px 12px;
|
273 |
+
font-weight: bold;
|
274 |
+
display: none;
|
275 |
+
}
|
276 |
+
|
277 |
+
.ju-feedback-dialog .feedback-result-notice.send-success {
|
278 |
+
border-left-color: #46b450;
|
279 |
+
}
|
280 |
+
|
281 |
+
.ju-feedback-dialog .feedback-result-notice.send-error {
|
282 |
+
border-left-color: #ff0000;
|
283 |
+
}
|
284 |
+
|
285 |
+
.ju-feedback-dialog .technical-information {
|
286 |
+
margin-top: 10px;
|
287 |
+
}
|
288 |
+
|
289 |
+
.ju-feedback-dialog .technical-information label {
|
290 |
+
font-size: 14px;
|
291 |
+
line-height: 1.5;
|
292 |
+
vertical-align: baseline;
|
293 |
+
}
|
294 |
+
|
295 |
+
.ju-feedback-dialog .technical-information textarea {
|
296 |
+
margin-top: 15px;
|
297 |
+
display: none;
|
298 |
+
}
|
299 |
+
|
300 |
+
.ju-feedback-dialog .technical-information .material-icons {
|
301 |
+
vertical-align: middle;
|
302 |
+
cursor: pointer;
|
303 |
+
}
|
304 |
+
|
305 |
+
.ju-feedback-dialog .technical-information .material-icons.more {
|
306 |
+
font-size: 26px;
|
307 |
+
margin-left: 10px;
|
308 |
+
cursor: pointer;
|
309 |
+
}
|
310 |
+
|
311 |
+
@media all and (max-width: 500px){
|
312 |
+
.ui-dialog.juDialogFeedback {
|
313 |
+
width: 97% !important;
|
314 |
+
margin-left: 1%;
|
315 |
+
}
|
316 |
+
}
|
jufeedback/assets/js/global.js
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Required for Meteor package, the use of window prevents export by Meteor
|
2 |
+
(function(window){
|
3 |
+
if(window.Package){
|
4 |
+
Materialize = {};
|
5 |
+
} else {
|
6 |
+
window.Materialize = {};
|
7 |
+
}
|
8 |
+
})(window);
|
9 |
+
|
10 |
+
|
11 |
+
// Unique ID
|
12 |
+
Materialize.guid = (function() {
|
13 |
+
function s4() {
|
14 |
+
return Math.floor((1 + Math.random()) * 0x10000)
|
15 |
+
.toString(16)
|
16 |
+
.substring(1);
|
17 |
+
}
|
18 |
+
return function() {
|
19 |
+
return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
|
20 |
+
s4() + '-' + s4() + s4() + s4();
|
21 |
+
};
|
22 |
+
})();
|
23 |
+
|
24 |
+
Materialize.elementOrParentIsFixed = function(element) {
|
25 |
+
var $element = $(element);
|
26 |
+
var $checkElements = $element.add($element.parents());
|
27 |
+
var isFixed = false;
|
28 |
+
$checkElements.each(function(){
|
29 |
+
if ($(this).css("position") === "fixed") {
|
30 |
+
isFixed = true;
|
31 |
+
return false;
|
32 |
+
}
|
33 |
+
});
|
34 |
+
return isFixed;
|
35 |
+
};
|
36 |
+
|
37 |
+
// Velocity has conflicts when loaded with jQuery, this will check for it
|
jufeedback/assets/js/jufeedback.js
ADDED
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
if (typeof ajaxurl === "undefined") {
|
3 |
+
ajaxurl = ju_feedback.ajaxurl;
|
4 |
+
}
|
5 |
+
|
6 |
+
var JUFeedbackApp = {
|
7 |
+
listFreePlugins: function () {
|
8 |
+
return [
|
9 |
+
"wp-speed-of-light",
|
10 |
+
"wp-meta-seo",
|
11 |
+
"wp-latest-post",
|
12 |
+
"advanced-gutenberg"
|
13 |
+
];
|
14 |
+
},
|
15 |
+
getElements: function (slug) {
|
16 |
+
var reasonKey = [];
|
17 |
+
|
18 |
+
$(".ju-feedback-dialog." + slug).find("input.reason-deactive:checked").each(function (index, ele) {
|
19 |
+
reasonKey.push(this.name);
|
20 |
+
});
|
21 |
+
|
22 |
+
return {
|
23 |
+
deactiveElement: $("#the-list").find('[data-slug="' + slug + '"] span.deactivate a'),
|
24 |
+
modalElement: $(".ju-feedback-dialog." + slug),
|
25 |
+
disableButton: $(".ju-feedback-dialog." + slug).find(".feedback-button a.disable-only"),
|
26 |
+
sendFeedbackButton: $(".ju-feedback-dialog." + slug).find(".feedback-button a.send-message"),
|
27 |
+
reasonKey: reasonKey,
|
28 |
+
technicalElement: $(".ju-feedback-dialog." + slug).find(".technical-information")
|
29 |
+
};
|
30 |
+
},
|
31 |
+
deactivateAction: function (slug) {
|
32 |
+
location.href = this.getElements(slug).deactiveElement.attr('href');
|
33 |
+
},
|
34 |
+
modal: function () {
|
35 |
+
var self = this;
|
36 |
+
self.initModal = function (slug) {
|
37 |
+
var modal;
|
38 |
+
if (!modal) {
|
39 |
+
modal = self.getElements(slug).modalElement.dialog({
|
40 |
+
width: 500,
|
41 |
+
maxHeight: 400,
|
42 |
+
autoOpen: false,
|
43 |
+
closeOnEscape: true,
|
44 |
+
draggable: false,
|
45 |
+
resizable: false,
|
46 |
+
position: {my: "center", at: "center", of: window},
|
47 |
+
modal: true,
|
48 |
+
dialogClass: 'noTitle juDialogFeedback',
|
49 |
+
show: {
|
50 |
+
effect: "fade",
|
51 |
+
duration: 500
|
52 |
+
},
|
53 |
+
hide: {
|
54 |
+
effect: "fade",
|
55 |
+
duration: 300
|
56 |
+
},
|
57 |
+
open: function (event, ui) {
|
58 |
+
$('.ui-widget-overlay').bind('click', function () {
|
59 |
+
self.getElements(slug).modalElement.dialog('close');
|
60 |
+
});
|
61 |
+
},
|
62 |
+
create: function (event, ui) {
|
63 |
+
$(".choose-reason").click(function () {
|
64 |
+
if (self.getElements(slug).reasonKey.length > 0) {
|
65 |
+
var id = $(this).attr('id');
|
66 |
+
if ($('input#' + id + ':checked').length > 0) {
|
67 |
+
$('textarea#comment-' + id).show().focus();
|
68 |
+
} else {
|
69 |
+
$('textarea#comment-' + id).hide();
|
70 |
+
}
|
71 |
+
|
72 |
+
positionDialog(self.getElements(slug).modalElement);
|
73 |
+
} else {
|
74 |
+
$('textarea.feedback-text').hide();
|
75 |
+
}
|
76 |
+
});
|
77 |
+
|
78 |
+
$(".technical-information .more").toggle(function () {
|
79 |
+
$(this).html('arrow_drop_up');
|
80 |
+
$(".technical-information textarea[name='technical']").show();
|
81 |
+
|
82 |
+
positionDialog(self.getElements(slug).modalElement);
|
83 |
+
}, function () {
|
84 |
+
$(this).html('arrow_drop_down');
|
85 |
+
$(".technical-information textarea[name='technical']").hide();
|
86 |
+
|
87 |
+
positionDialog(self.getElements(slug).modalElement);
|
88 |
+
});
|
89 |
+
|
90 |
+
self.getElements(slug).disableButton.click(function (e) {
|
91 |
+
e.preventDefault();
|
92 |
+
$.ajax({
|
93 |
+
url: ajaxurl,
|
94 |
+
dataType: 'json',
|
95 |
+
method: 'POST',
|
96 |
+
data: {
|
97 |
+
action: 'ju_disable_feedback_' + slug,
|
98 |
+
ajax_nonce: ju_feedback.token
|
99 |
+
},
|
100 |
+
success: function () {
|
101 |
+
self.deactivateAction(slug);
|
102 |
+
}
|
103 |
+
})
|
104 |
+
});
|
105 |
+
|
106 |
+
self.getElements(slug).sendFeedbackButton.click(function (e) {
|
107 |
+
var technical_val = '';
|
108 |
+
var allow_send_technical = $('input[name="allow_send_technical"]:checked').length > 0;
|
109 |
+
if (allow_send_technical) {
|
110 |
+
technical_val = self.getElements(slug).technicalElement.find('textarea[name="technical"]').attr('data-info');
|
111 |
+
}
|
112 |
+
|
113 |
+
var reasons = [];
|
114 |
+
if (self.getElements(slug).reasonKey.length > 0) {
|
115 |
+
self.getElements(slug).reasonKey.forEach(function (ele) {
|
116 |
+
reasons.push({
|
117 |
+
'reason': ele,
|
118 |
+
'comment': $('textarea#comment-' + ele).val()
|
119 |
+
});
|
120 |
+
});
|
121 |
+
}
|
122 |
+
|
123 |
+
e.preventDefault();
|
124 |
+
self.getElements(slug).modalElement.find('.ju-loading').show();
|
125 |
+
$.ajax({
|
126 |
+
url: ajaxurl,
|
127 |
+
dataType: 'json',
|
128 |
+
method: 'POST',
|
129 |
+
data: {
|
130 |
+
action: 'ju_send_feedback_deactive_' + slug,
|
131 |
+
reasons: JSON.stringify(reasons),
|
132 |
+
feedbackTechnical: technical_val,
|
133 |
+
ajax_nonce: ju_feedback.token
|
134 |
+
},
|
135 |
+
success: function (res) {
|
136 |
+
setTimeout(function () {
|
137 |
+
self.getElements(slug).modalElement.find('.feedback-button').hide();
|
138 |
+
self.getElements(slug).modalElement.find('.content').hide();
|
139 |
+
self.getElements(slug).modalElement.find('.feedback-result-notice').html(res.message).show();
|
140 |
+
if (res.send_status) {
|
141 |
+
self.getElements(slug).modalElement.find('.feedback-result-notice').addClass('send-success');
|
142 |
+
} else {
|
143 |
+
self.getElements(slug).modalElement.find('.feedback-result-notice').addClass('send-error');
|
144 |
+
}
|
145 |
+
setTimeout(function () {
|
146 |
+
self.deactivateAction(slug);
|
147 |
+
}, 1000);
|
148 |
+
}, 1000);
|
149 |
+
}
|
150 |
+
});
|
151 |
+
});
|
152 |
+
}
|
153 |
+
});
|
154 |
+
}
|
155 |
+
|
156 |
+
return modal;
|
157 |
+
};
|
158 |
+
|
159 |
+
self.showModal = function (slug) {
|
160 |
+
self.initModal(slug).dialog("open");
|
161 |
+
};
|
162 |
+
},
|
163 |
+
blindEvents: function blindEvents() {
|
164 |
+
var self = this;
|
165 |
+
var deactive_button = $("#the-list").find('tr.active span.deactivate');
|
166 |
+
|
167 |
+
deactive_button.on('click', 'a', function (e) {
|
168 |
+
var slug = $(e.target).parents('tr.active').attr("data-slug");
|
169 |
+
|
170 |
+
if ($.inArray(slug, self.listFreePlugins()) !== -1 && self.getElements(slug).modalElement.length > 0) {
|
171 |
+
e.preventDefault();
|
172 |
+
self.showModal(slug);
|
173 |
+
}
|
174 |
+
});
|
175 |
+
},
|
176 |
+
init: function () {
|
177 |
+
this.modal();
|
178 |
+
this.blindEvents();
|
179 |
+
},
|
180 |
+
};
|
181 |
+
|
182 |
+
function positionDialog(element) {
|
183 |
+
var screen_height = $(window).height();
|
184 |
+
var dialog_height = element.outerHeight();
|
185 |
+
|
186 |
+
if (dialog_height + 70 >= screen_height) {
|
187 |
+
element.dialog("option", "maxHeight", screen_height);
|
188 |
+
} else {
|
189 |
+
element.dialog("option", "maxHeight", screen_height - 70);
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
$(function () {
|
194 |
+
JUFeedbackApp.init();
|
195 |
+
});
|
196 |
+
})(jQuery);
|
jufeedback/assets/js/jufeedback.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){"undefined"==typeof ajaxurl&&(ajaxurl=ju_feedback.ajaxurl);var t={listFreePlugins:function(){return["wp-speed-of-light","wp-meta-seo","wp-latest-post","advanced-gutenberg"]},getElements:function(t){var n=[];return e(".ju-feedback-dialog."+t).find("input.reason-deactive:checked").each(function(e,t){n.push(this.name)}),{deactiveElement:e("#the-list").find('[data-slug="'+t+'"] span.deactivate a'),modalElement:e(".ju-feedback-dialog."+t),disableButton:e(".ju-feedback-dialog."+t).find(".feedback-button a.disable-only"),sendFeedbackButton:e(".ju-feedback-dialog."+t).find(".feedback-button a.send-message"),reasonKey:n,technicalElement:e(".ju-feedback-dialog."+t).find(".technical-information")}},deactivateAction:function(e){location.href=this.getElements(e).deactiveElement.attr("href")},modal:function(){var t=this;t.initModal=function(a){var i;return i||(i=t.getElements(a).modalElement.dialog({width:500,maxHeight:400,autoOpen:!1,closeOnEscape:!0,draggable:!1,resizable:!1,position:{my:"center",at:"center",of:window},modal:!0,dialogClass:"noTitle juDialogFeedback",show:{effect:"fade",duration:500},hide:{effect:"fade",duration:300},open:function(n,i){e(".ui-widget-overlay").bind("click",function(){t.getElements(a).modalElement.dialog("close")})},create:function(i,o){e(".choose-reason").click(function(){if(t.getElements(a).reasonKey.length>0){var i=e(this).attr("id");e("input#"+i+":checked").length>0?e("textarea#comment-"+i).show().focus():e("textarea#comment-"+i).hide(),n(t.getElements(a).modalElement)}else e("textarea.feedback-text").hide()}),e(".technical-information .more").toggle(function(){e(this).html("arrow_drop_up"),e(".technical-information textarea[name='technical']").show(),n(t.getElements(a).modalElement)},function(){e(this).html("arrow_drop_down"),e(".technical-information textarea[name='technical']").hide(),n(t.getElements(a).modalElement)}),t.getElements(a).disableButton.click(function(n){n.preventDefault(),e.ajax({url:ajaxurl,dataType:"json",method:"POST",data:{action:"ju_disable_feedback_"+a,ajax_nonce:ju_feedback.token},success:function(){t.deactivateAction(a)}})}),t.getElements(a).sendFeedbackButton.click(function(n){var i="";e('input[name="allow_send_technical"]:checked').length>0&&(i=t.getElements(a).technicalElement.find('textarea[name="technical"]').attr("data-info"));var o=[];t.getElements(a).reasonKey.length>0&&t.getElements(a).reasonKey.forEach(function(t){o.push({reason:t,comment:e("textarea#comment-"+t).val()})}),n.preventDefault(),t.getElements(a).modalElement.find(".ju-loading").show(),e.ajax({url:ajaxurl,dataType:"json",method:"POST",data:{action:"ju_send_feedback_deactive_"+a,reasons:JSON.stringify(o),feedbackTechnical:i,ajax_nonce:ju_feedback.token},success:function(e){setTimeout(function(){t.getElements(a).modalElement.find(".feedback-button").hide(),t.getElements(a).modalElement.find(".content").hide(),t.getElements(a).modalElement.find(".feedback-result-notice").html(e.message).show(),e.send_status?t.getElements(a).modalElement.find(".feedback-result-notice").addClass("send-success"):t.getElements(a).modalElement.find(".feedback-result-notice").addClass("send-error"),setTimeout(function(){t.deactivateAction(a)},1e3)},1e3)}})})}})),i},t.showModal=function(e){t.initModal(e).dialog("open")}},blindEvents:function(){var t=this;e("#the-list").find("tr.active span.deactivate").on("click","a",function(n){var a=e(n.target).parents("tr.active").attr("data-slug");-1!==e.inArray(a,t.listFreePlugins())&&t.getElements(a).modalElement.length>0&&(n.preventDefault(),t.showModal(a))})},init:function(){this.modal(),this.blindEvents()}};function n(t){var n=e(window).height();t.outerHeight()+70>=n?t.dialog("option","maxHeight",n):t.dialog("option","maxHeight",n-70)}e(function(){t.init()})}(jQuery);
|
jufeedback/assets/js/jureview.js
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($){
|
2 |
+
if (typeof ajaxurl === "undefined") {
|
3 |
+
ajaxurl = ju_review.ajaxurl;
|
4 |
+
}
|
5 |
+
|
6 |
+
$('.jureview-hide-review').click(function(e){
|
7 |
+
var slug = ($(e.target).parents('.jureview-notice').attr('data-slug'));
|
8 |
+
hide_review(slug);
|
9 |
+
|
10 |
+
});
|
11 |
+
|
12 |
+
$('.jureview-already-review').on('click', function (e) {
|
13 |
+
e.preventDefault();
|
14 |
+
var slug = ($(e.target).parents('.jureview-notice').attr('data-slug'));
|
15 |
+
var linkreview = $(this).attr('href');
|
16 |
+
|
17 |
+
window.open(linkreview);
|
18 |
+
hide_review(slug);
|
19 |
+
});
|
20 |
+
|
21 |
+
function hide_review(slug) {
|
22 |
+
$.ajax({
|
23 |
+
url: ajaxurl,
|
24 |
+
dataType: 'json',
|
25 |
+
method: 'POST',
|
26 |
+
data: {
|
27 |
+
action: 'jureview_ajax_hide_review_' + slug,
|
28 |
+
ajaxnonce: ju_review.token
|
29 |
+
},
|
30 |
+
success: function () {
|
31 |
+
$('.jureview-notice[data-slug="' + slug + '"]').hide('fade');
|
32 |
+
}
|
33 |
+
});
|
34 |
+
}
|
35 |
+
});
|
jufeedback/assets/js/jureview.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(document).ready(function(e){function a(a){e.ajax({url:ajaxurl,dataType:"json",method:"POST",data:{action:"jureview_ajax_hide_review_"+a,ajaxnonce:ju_review.token},success:function(){e('.jureview-notice[data-slug="'+a+'"]').hide("fade")}})}"undefined"==typeof ajaxurl&&(ajaxurl=ju_review.ajaxurl),e(".jureview-hide-review").click(function(t){a(e(t.target).parents(".jureview-notice").attr("data-slug"))}),e(".jureview-already-review").on("click",function(t){t.preventDefault();var r=e(t.target).parents(".jureview-notice").attr("data-slug"),i=e(this).attr("href");window.open(i),a(r)})});
|
jufeedback/assets/js/tooltip.js
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
$.fn.tooltip = function (options) {
|
3 |
+
var timeout = null,
|
4 |
+
counter = null,
|
5 |
+
started = false,
|
6 |
+
counterInterval = null,
|
7 |
+
margin = 5;
|
8 |
+
|
9 |
+
// Defaults
|
10 |
+
var defaults = {
|
11 |
+
delay: 350
|
12 |
+
};
|
13 |
+
|
14 |
+
// Remove tooltip from the activator
|
15 |
+
if (options === "remove") {
|
16 |
+
this.each(function(){
|
17 |
+
$('#' + $(this).attr('data-tooltip-id')).remove();
|
18 |
+
});
|
19 |
+
return false;
|
20 |
+
}
|
21 |
+
|
22 |
+
options = $.extend(defaults, options);
|
23 |
+
|
24 |
+
|
25 |
+
return this.each(function(){
|
26 |
+
var tooltipId = Materialize.guid();
|
27 |
+
var origin = $(this);
|
28 |
+
origin.attr('data-tooltip-id', tooltipId);
|
29 |
+
|
30 |
+
// Create Text span
|
31 |
+
var tooltip_text = $('<span></span>').text(origin.attr('data-tooltip'));
|
32 |
+
|
33 |
+
// Create tooltip
|
34 |
+
var newTooltip = $('<div></div>');
|
35 |
+
newTooltip.addClass('material-tooltip').append(tooltip_text)
|
36 |
+
.appendTo($('body'))
|
37 |
+
.attr('id', tooltipId);
|
38 |
+
|
39 |
+
var backdrop = $('<div></div>').addClass('backdrop');
|
40 |
+
backdrop.appendTo(newTooltip);
|
41 |
+
backdrop.css({ top: 0, left:0 });
|
42 |
+
|
43 |
+
|
44 |
+
//Destroy previously binded events
|
45 |
+
origin.off('mouseenter.tooltip mouseleave.tooltip');
|
46 |
+
// Mouse In
|
47 |
+
origin.on({
|
48 |
+
'mouseenter.tooltip': function(e) {
|
49 |
+
var tooltip_delay = origin.data("delay");
|
50 |
+
tooltip_delay = (tooltip_delay === undefined || tooltip_delay === '') ? options.delay : tooltip_delay;
|
51 |
+
counter = 0;
|
52 |
+
counterInterval = setInterval(function(){
|
53 |
+
counter += 10;
|
54 |
+
if (counter >= tooltip_delay && started === false) {
|
55 |
+
started = true;
|
56 |
+
newTooltip.css({ display: 'block', left: '0px', top: '0px' });
|
57 |
+
|
58 |
+
// Set Tooltip text
|
59 |
+
newTooltip.children('span').text(origin.attr('data-tooltip'));
|
60 |
+
|
61 |
+
// Tooltip positioning
|
62 |
+
var originWidth = origin.outerWidth();
|
63 |
+
var originHeight = origin.outerHeight();
|
64 |
+
var tooltipPosition = origin.attr('data-position');
|
65 |
+
var tooltipHeight = newTooltip.outerHeight();
|
66 |
+
var tooltipWidth = newTooltip.outerWidth();
|
67 |
+
var tooltipVerticalMovement = '0px';
|
68 |
+
var tooltipHorizontalMovement = '0px';
|
69 |
+
var scale_factor = 8;
|
70 |
+
var targetTop, targetLeft, newCoordinates;
|
71 |
+
|
72 |
+
if (tooltipPosition === "top") {
|
73 |
+
// Top Position
|
74 |
+
targetTop = origin.offset().top - tooltipHeight - margin;
|
75 |
+
targetLeft = origin.offset().left + originWidth/2 - tooltipWidth/2;
|
76 |
+
newCoordinates = repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);
|
77 |
+
|
78 |
+
tooltipVerticalMovement = '-10px';
|
79 |
+
backdrop.css({
|
80 |
+
borderRadius: '14px 14px 0 0',
|
81 |
+
transformOrigin: '50% 90%',
|
82 |
+
marginTop: tooltipHeight,
|
83 |
+
marginLeft: (tooltipWidth/2) - (backdrop.width()/2)
|
84 |
+
});
|
85 |
+
}
|
86 |
+
// Left Position
|
87 |
+
else if (tooltipPosition === "left") {
|
88 |
+
targetTop = origin.offset().top + originHeight/2 - tooltipHeight/2;
|
89 |
+
targetLeft = origin.offset().left - tooltipWidth - margin;
|
90 |
+
newCoordinates = repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);
|
91 |
+
|
92 |
+
tooltipHorizontalMovement = '-10px';
|
93 |
+
backdrop.css({
|
94 |
+
width: '14px',
|
95 |
+
height: '14px',
|
96 |
+
borderRadius: '14px 0 0 14px',
|
97 |
+
transformOrigin: '95% 50%',
|
98 |
+
marginTop: tooltipHeight/2,
|
99 |
+
marginLeft: tooltipWidth
|
100 |
+
});
|
101 |
+
}
|
102 |
+
// Right Position
|
103 |
+
else if (tooltipPosition === "right") {
|
104 |
+
targetTop = origin.offset().top + originHeight/2 - tooltipHeight/2;
|
105 |
+
targetLeft = origin.offset().left + originWidth + margin;
|
106 |
+
newCoordinates = repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);
|
107 |
+
|
108 |
+
tooltipHorizontalMovement = '+10px';
|
109 |
+
backdrop.css({
|
110 |
+
width: '14px',
|
111 |
+
height: '14px',
|
112 |
+
borderRadius: '0 14px 14px 0',
|
113 |
+
transformOrigin: '5% 50%',
|
114 |
+
marginTop: tooltipHeight/2,
|
115 |
+
marginLeft: '0px'
|
116 |
+
});
|
117 |
+
}
|
118 |
+
else {
|
119 |
+
// Bottom Position
|
120 |
+
targetTop = origin.offset().top + origin.outerHeight() + margin;
|
121 |
+
targetLeft = origin.offset().left + originWidth/2 - tooltipWidth/2;
|
122 |
+
newCoordinates = repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);
|
123 |
+
tooltipVerticalMovement = '+10px';
|
124 |
+
backdrop.css({
|
125 |
+
marginLeft: (tooltipWidth/2) - (backdrop.width()/2)
|
126 |
+
});
|
127 |
+
}
|
128 |
+
|
129 |
+
// Set tooptip css placement
|
130 |
+
newTooltip.css({
|
131 |
+
top: newCoordinates.y,
|
132 |
+
left: newCoordinates.x
|
133 |
+
});
|
134 |
+
|
135 |
+
// Calculate Scale to fill
|
136 |
+
scale_factor = tooltipWidth / 8;
|
137 |
+
if (scale_factor < 8) {
|
138 |
+
scale_factor = 8;
|
139 |
+
}
|
140 |
+
if (tooltipPosition === "right" || tooltipPosition === "left") {
|
141 |
+
scale_factor = tooltipWidth / 10;
|
142 |
+
if (scale_factor < 6)
|
143 |
+
scale_factor = 6;
|
144 |
+
}
|
145 |
+
|
146 |
+
newTooltip.velocity({ marginTop: tooltipVerticalMovement, marginLeft: tooltipHorizontalMovement}, { duration: 350, queue: false })
|
147 |
+
.velocity({opacity: 1}, {duration: 300, delay: 50, queue: false});
|
148 |
+
backdrop.css({ display: 'block' })
|
149 |
+
.velocity({opacity:1},{duration: 55, delay: 0, queue: false})
|
150 |
+
.velocity({scale: scale_factor}, {duration: 300, delay: 0, queue: false, easing: 'easeInOutQuad'});
|
151 |
+
|
152 |
+
}
|
153 |
+
}, 10); // End Interval
|
154 |
+
|
155 |
+
// Mouse Out
|
156 |
+
},
|
157 |
+
'mouseleave.tooltip': function(){
|
158 |
+
// Reset State
|
159 |
+
clearInterval(counterInterval);
|
160 |
+
counter = 0;
|
161 |
+
|
162 |
+
// Animate back
|
163 |
+
newTooltip.velocity({
|
164 |
+
opacity: 0, marginTop: 0, marginLeft: 0}, { duration: 225, queue: false, delay: 225 }
|
165 |
+
);
|
166 |
+
backdrop.velocity({opacity: 0, scale: 1}, {
|
167 |
+
duration:225,
|
168 |
+
delay: 275, queue: false,
|
169 |
+
complete: function(){
|
170 |
+
backdrop.css('display', 'none');
|
171 |
+
newTooltip.css('display', 'none');
|
172 |
+
started = false;}
|
173 |
+
});
|
174 |
+
}
|
175 |
+
});
|
176 |
+
});
|
177 |
+
};
|
178 |
+
|
179 |
+
var repositionWithinScreen = function(x, y, width, height) {
|
180 |
+
var newX = x;
|
181 |
+
var newY = y;
|
182 |
+
|
183 |
+
if (newX < 0) {
|
184 |
+
newX = 4;
|
185 |
+
} else if (newX + width > window.innerWidth) {
|
186 |
+
newX -= newX + width - window.innerWidth;
|
187 |
+
}
|
188 |
+
|
189 |
+
if (newY < 0) {
|
190 |
+
newY = 4;
|
191 |
+
} else if (newY + height > window.innerHeight + $(window).scrollTop) {
|
192 |
+
newY -= newY + height - window.innerHeight;
|
193 |
+
}
|
194 |
+
|
195 |
+
return {x: newX, y: newY};
|
196 |
+
};
|
197 |
+
|
198 |
+
$(document).ready(function(){
|
199 |
+
$('.tooltipped').tooltip({delay: 50});
|
200 |
+
});
|
201 |
+
}( jQuery ));
|
jufeedback/assets/js/velocity.min.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! VelocityJS.org (1.2.3). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
|
2 |
+
/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
|
3 |
+
/*! Note that this has been modified by Materialize to confirm that Velocity is not already being imported. */
|
4 |
+
jQuery.Velocity?console.log("Velocity is already loaded. You may be needlessly importing Velocity again; note that Materialize includes Velocity."):(!function(e){function t(e){var t=e.length,a=r.type(e);return"function"===a||r.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===a||0===t||"number"==typeof t&&t>0&&t-1 in e}if(!e.jQuery){var r=function(e,t){return new r.fn.init(e,t)};r.isWindow=function(e){return null!=e&&e==e.window},r.type=function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e},r.isArray=Array.isArray||function(e){return"array"===r.type(e)},r.isPlainObject=function(e){var t;if(!e||"object"!==r.type(e)||e.nodeType||r.isWindow(e))return!1;try{if(e.constructor&&!o.call(e,"constructor")&&!o.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(a){return!1}for(t in e);return void 0===t||o.call(e,t)},r.each=function(e,r,a){var n,o=0,i=e.length,s=t(e);if(a){if(s)for(;i>o&&(n=r.apply(e[o],a),n!==!1);o++);else for(o in e)if(n=r.apply(e[o],a),n===!1)break}else if(s)for(;i>o&&(n=r.call(e[o],o,e[o]),n!==!1);o++);else for(o in e)if(n=r.call(e[o],o,e[o]),n===!1)break;return e},r.data=function(e,t,n){if(void 0===n){var o=e[r.expando],i=o&&a[o];if(void 0===t)return i;if(i&&t in i)return i[t]}else if(void 0!==t){var o=e[r.expando]||(e[r.expando]=++r.uuid);return a[o]=a[o]||{},a[o][t]=n,n}},r.removeData=function(e,t){var n=e[r.expando],o=n&&a[n];o&&r.each(t,function(e,t){delete o[t]})},r.extend=function(){var e,t,a,n,o,i,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[l]||{},l++),"object"!=typeof s&&"function"!==r.type(s)&&(s={}),l===u&&(s=this,l--);u>l;l++)if(null!=(o=arguments[l]))for(n in o)e=s[n],a=o[n],s!==a&&(c&&a&&(r.isPlainObject(a)||(t=r.isArray(a)))?(t?(t=!1,i=e&&r.isArray(e)?e:[]):i=e&&r.isPlainObject(e)?e:{},s[n]=r.extend(c,i,a)):void 0!==a&&(s[n]=a));return s},r.queue=function(e,a,n){function o(e,r){var a=r||[];return null!=e&&(t(Object(e))?!function(e,t){for(var r=+t.length,a=0,n=e.length;r>a;)e[n++]=t[a++];if(r!==r)for(;void 0!==t[a];)e[n++]=t[a++];return e.length=n,e}(a,"string"==typeof e?[e]:e):[].push.call(a,e)),a}if(e){a=(a||"fx")+"queue";var i=r.data(e,a);return n?(!i||r.isArray(n)?i=r.data(e,a,o(n)):i.push(n),i):i||[]}},r.dequeue=function(e,t){r.each(e.nodeType?[e]:e,function(e,a){t=t||"fx";var n=r.queue(a,t),o=n.shift();"inprogress"===o&&(o=n.shift()),o&&("fx"===t&&n.unshift("inprogress"),o.call(a,function(){r.dequeue(a,t)}))})},r.fn=r.prototype={init:function(e){if(e.nodeType)return this[0]=e,this;throw new Error("Not a DOM node.")},offset:function(){var t=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:t.top+(e.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:t.left+(e.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function e(){for(var e=this.offsetParent||document;e&&"html"===!e.nodeType.toLowerCase&&"static"===e.style.position;)e=e.offsetParent;return e||document}var t=this[0],e=e.apply(t),a=this.offset(),n=/^(?:body|html)$/i.test(e.nodeName)?{top:0,left:0}:r(e).offset();return a.top-=parseFloat(t.style.marginTop)||0,a.left-=parseFloat(t.style.marginLeft)||0,e.style&&(n.top+=parseFloat(e.style.borderTopWidth)||0,n.left+=parseFloat(e.style.borderLeftWidth)||0),{top:a.top-n.top,left:a.left-n.left}}};var a={};r.expando="velocity"+(new Date).getTime(),r.uuid=0;for(var n={},o=n.hasOwnProperty,i=n.toString,s="Boolean Number String Function Array Date RegExp Object Error".split(" "),l=0;l<s.length;l++)n["[object "+s[l]+"]"]=s[l].toLowerCase();r.fn.init.prototype=r.fn,e.Velocity={Utilities:r}}}(window),function(e){"object"==typeof module&&"object"==typeof module.exports?module.exports=e():"function"==typeof define&&define.amd?define(e):e()}(function(){return function(e,t,r,a){function n(e){for(var t=-1,r=e?e.length:0,a=[];++t<r;){var n=e[t];n&&a.push(n)}return a}function o(e){return m.isWrapped(e)?e=[].slice.call(e):m.isNode(e)&&(e=[e]),e}function i(e){var t=f.data(e,"velocity");return null===t?a:t}function s(e){return function(t){return Math.round(t*e)*(1/e)}}function l(e,r,a,n){function o(e,t){return 1-3*t+3*e}function i(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,r){return((o(t,r)*e+i(t,r))*e+s(t))*e}function u(e,t,r){return 3*o(t,r)*e*e+2*i(t,r)*e+s(t)}function c(t,r){for(var n=0;m>n;++n){var o=u(r,e,a);if(0===o)return r;var i=l(r,e,a)-t;r-=i/o}return r}function p(){for(var t=0;b>t;++t)w[t]=l(t*x,e,a)}function f(t,r,n){var o,i,s=0;do i=r+(n-r)/2,o=l(i,e,a)-t,o>0?n=i:r=i;while(Math.abs(o)>h&&++s<v);return i}function d(t){for(var r=0,n=1,o=b-1;n!=o&&w[n]<=t;++n)r+=x;--n;var i=(t-w[n])/(w[n+1]-w[n]),s=r+i*x,l=u(s,e,a);return l>=y?c(t,s):0==l?s:f(t,r,r+x)}function g(){V=!0,(e!=r||a!=n)&&p()}var m=4,y=.001,h=1e-7,v=10,b=11,x=1/(b-1),S="Float32Array"in t;if(4!==arguments.length)return!1;for(var P=0;4>P;++P)if("number"!=typeof arguments[P]||isNaN(arguments[P])||!isFinite(arguments[P]))return!1;e=Math.min(e,1),a=Math.min(a,1),e=Math.max(e,0),a=Math.max(a,0);var w=S?new Float32Array(b):new Array(b),V=!1,C=function(t){return V||g(),e===r&&a===n?t:0===t?0:1===t?1:l(d(t),r,n)};C.getControlPoints=function(){return[{x:e,y:r},{x:a,y:n}]};var T="generateBezier("+[e,r,a,n]+")";return C.toString=function(){return T},C}function u(e,t){var r=e;return m.isString(e)?b.Easings[e]||(r=!1):r=m.isArray(e)&&1===e.length?s.apply(null,e):m.isArray(e)&&2===e.length?x.apply(null,e.concat([t])):m.isArray(e)&&4===e.length?l.apply(null,e):!1,r===!1&&(r=b.Easings[b.defaults.easing]?b.defaults.easing:v),r}function c(e){if(e){var t=(new Date).getTime(),r=b.State.calls.length;r>1e4&&(b.State.calls=n(b.State.calls));for(var o=0;r>o;o++)if(b.State.calls[o]){var s=b.State.calls[o],l=s[0],u=s[2],d=s[3],g=!!d,y=null;d||(d=b.State.calls[o][3]=t-16);for(var h=Math.min((t-d)/u.duration,1),v=0,x=l.length;x>v;v++){var P=l[v],V=P.element;if(i(V)){var C=!1;if(u.display!==a&&null!==u.display&&"none"!==u.display){if("flex"===u.display){var T=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];f.each(T,function(e,t){S.setPropertyValue(V,"display",t)})}S.setPropertyValue(V,"display",u.display)}u.visibility!==a&&"hidden"!==u.visibility&&S.setPropertyValue(V,"visibility",u.visibility);for(var k in P)if("element"!==k){var A,F=P[k],j=m.isString(F.easing)?b.Easings[F.easing]:F.easing;if(1===h)A=F.endValue;else{var E=F.endValue-F.startValue;if(A=F.startValue+E*j(h,u,E),!g&&A===F.currentValue)continue}if(F.currentValue=A,"tween"===k)y=A;else{if(S.Hooks.registered[k]){var H=S.Hooks.getRoot(k),N=i(V).rootPropertyValueCache[H];N&&(F.rootPropertyValue=N)}var L=S.setPropertyValue(V,k,F.currentValue+(0===parseFloat(A)?"":F.unitType),F.rootPropertyValue,F.scrollData);S.Hooks.registered[k]&&(i(V).rootPropertyValueCache[H]=S.Normalizations.registered[H]?S.Normalizations.registered[H]("extract",null,L[1]):L[1]),"transform"===L[0]&&(C=!0)}}u.mobileHA&&i(V).transformCache.translate3d===a&&(i(V).transformCache.translate3d="(0px, 0px, 0px)",C=!0),C&&S.flushTransformCache(V)}}u.display!==a&&"none"!==u.display&&(b.State.calls[o][2].display=!1),u.visibility!==a&&"hidden"!==u.visibility&&(b.State.calls[o][2].visibility=!1),u.progress&&u.progress.call(s[1],s[1],h,Math.max(0,d+u.duration-t),d,y),1===h&&p(o)}}b.State.isTicking&&w(c)}function p(e,t){if(!b.State.calls[e])return!1;for(var r=b.State.calls[e][0],n=b.State.calls[e][1],o=b.State.calls[e][2],s=b.State.calls[e][4],l=!1,u=0,c=r.length;c>u;u++){var p=r[u].element;if(t||o.loop||("none"===o.display&&S.setPropertyValue(p,"display",o.display),"hidden"===o.visibility&&S.setPropertyValue(p,"visibility",o.visibility)),o.loop!==!0&&(f.queue(p)[1]===a||!/\.velocityQueueEntryFlag/i.test(f.queue(p)[1]))&&i(p)){i(p).isAnimating=!1,i(p).rootPropertyValueCache={};var d=!1;f.each(S.Lists.transforms3D,function(e,t){var r=/^scale/.test(t)?1:0,n=i(p).transformCache[t];i(p).transformCache[t]!==a&&new RegExp("^\\("+r+"[^.]").test(n)&&(d=!0,delete i(p).transformCache[t])}),o.mobileHA&&(d=!0,delete i(p).transformCache.translate3d),d&&S.flushTransformCache(p),S.Values.removeClass(p,"velocity-animating")}if(!t&&o.complete&&!o.loop&&u===c-1)try{o.complete.call(n,n)}catch(g){setTimeout(function(){throw g},1)}s&&o.loop!==!0&&s(n),i(p)&&o.loop===!0&&!t&&(f.each(i(p).tweensContainer,function(e,t){/^rotate/.test(e)&&360===parseFloat(t.endValue)&&(t.endValue=0,t.startValue=360),/^backgroundPosition/.test(e)&&100===parseFloat(t.endValue)&&"%"===t.unitType&&(t.endValue=0,t.startValue=100)}),b(p,"reverse",{loop:!0,delay:o.delay})),o.queue!==!1&&f.dequeue(p,o.queue)}b.State.calls[e]=!1;for(var m=0,y=b.State.calls.length;y>m;m++)if(b.State.calls[m]!==!1){l=!0;break}l===!1&&(b.State.isTicking=!1,delete b.State.calls,b.State.calls=[])}var f,d=function(){if(r.documentMode)return r.documentMode;for(var e=7;e>4;e--){var t=r.createElement("div");if(t.innerHTML="<!--[if IE "+e+"]><span></span><![endif]-->",t.getElementsByTagName("span").length)return t=null,e}return a}(),g=function(){var e=0;return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(t){var r,a=(new Date).getTime();return r=Math.max(0,16-(a-e)),e=a+r,setTimeout(function(){t(a+r)},r)}}(),m={isString:function(e){return"string"==typeof e},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isNode:function(e){return e&&e.nodeType},isNodeList:function(e){return"object"==typeof e&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&e.length!==a&&(0===e.length||"object"==typeof e[0]&&e[0].nodeType>0)},isWrapped:function(e){return e&&(e.jquery||t.Zepto&&t.Zepto.zepto.isZ(e))},isSVG:function(e){return t.SVGElement&&e instanceof t.SVGElement},isEmptyObject:function(e){for(var t in e)return!1;return!0}},y=!1;if(e.fn&&e.fn.jquery?(f=e,y=!0):f=t.Velocity.Utilities,8>=d&&!y)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=d)return void(jQuery.fn.velocity=jQuery.fn.animate);var h=400,v="swing",b={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:t.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:r.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:f,Redirects:{},Easings:{},Promise:t.Promise,defaults:{queue:"",duration:h,easing:v,begin:a,complete:a,progress:a,display:a,visibility:a,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(e){f.data(e,"velocity",{isSVG:m.isSVG(e),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};t.pageYOffset!==a?(b.State.scrollAnchor=t,b.State.scrollPropertyLeft="pageXOffset",b.State.scrollPropertyTop="pageYOffset"):(b.State.scrollAnchor=r.documentElement||r.body.parentNode||r.body,b.State.scrollPropertyLeft="scrollLeft",b.State.scrollPropertyTop="scrollTop");var x=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,r,a){var n={x:t.x+a.dx*r,v:t.v+a.dv*r,tension:t.tension,friction:t.friction};return{dx:n.v,dv:e(n)}}function r(r,a){var n={dx:r.v,dv:e(r)},o=t(r,.5*a,n),i=t(r,.5*a,o),s=t(r,a,i),l=1/6*(n.dx+2*(o.dx+i.dx)+s.dx),u=1/6*(n.dv+2*(o.dv+i.dv)+s.dv);return r.x=r.x+l*a,r.v=r.v+u*a,r}return function a(e,t,n){var o,i,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,p=1e-4,f=.016;for(e=parseFloat(e)||500,t=parseFloat(t)||20,n=n||null,l.tension=e,l.friction=t,o=null!==n,o?(c=a(e,t),i=c/n*f):i=f;s=r(s||l,i),u.push(1+s.x),c+=16,Math.abs(s.x)>p&&Math.abs(s.v)>p;);return o?function(e){return u[e*(u.length-1)|0]}:c}}();b.Easings={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},spring:function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)}},f.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(e,t){b.Easings[t[0]]=l.apply(null,t[1])});var S=b.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e<S.Lists.colors.length;e++){var t="color"===S.Lists.colors[e]?"0 0 0 1":"255 255 255 1";S.Hooks.templates[S.Lists.colors[e]]=["Red Green Blue Alpha",t]}var r,a,n;if(d)for(r in S.Hooks.templates){a=S.Hooks.templates[r],n=a[0].split(" ");var o=a[1].match(S.RegEx.valueSplit);"Color"===n[0]&&(n.push(n.shift()),o.push(o.shift()),S.Hooks.templates[r]=[n.join(" "),o.join(" ")])}for(r in S.Hooks.templates){a=S.Hooks.templates[r],n=a[0].split(" ");for(var e in n){var i=r+n[e],s=e;S.Hooks.registered[i]=[r,s]}}},getRoot:function(e){var t=S.Hooks.registered[e];return t?t[0]:e},cleanRootPropertyValue:function(e,t){return S.RegEx.valueUnwrap.test(t)&&(t=t.match(S.RegEx.valueUnwrap)[1]),S.Values.isCSSNullValue(t)&&(t=S.Hooks.templates[e][1]),t},extractValue:function(e,t){var r=S.Hooks.registered[e];if(r){var a=r[0],n=r[1];return t=S.Hooks.cleanRootPropertyValue(a,t),t.toString().match(S.RegEx.valueSplit)[n]}return t},injectValue:function(e,t,r){var a=S.Hooks.registered[e];if(a){var n,o,i=a[0],s=a[1];return r=S.Hooks.cleanRootPropertyValue(i,r),n=r.toString().match(S.RegEx.valueSplit),n[s]=t,o=n.join(" ")}return r}},Normalizations:{registered:{clip:function(e,t,r){switch(e){case"name":return"clip";case"extract":var a;return S.RegEx.wrappedValueAlreadyExtracted.test(r)?a=r:(a=r.toString().match(S.RegEx.valueUnwrap),a=a?a[1].replace(/,(\s+)?/g," "):r),a;case"inject":return"rect("+r+")"}},blur:function(e,t,r){switch(e){case"name":return b.State.isFirefox?"filter":"-webkit-filter";case"extract":var a=parseFloat(r);if(!a&&0!==a){var n=r.toString().match(/blur\(([0-9]+[A-z]+)\)/i);a=n?n[1]:0}return a;case"inject":return parseFloat(r)?"blur("+r+")":"none"}},opacity:function(e,t,r){if(8>=d)switch(e){case"name":return"filter";case"extract":var a=r.toString().match(/alpha\(opacity=(.*)\)/i);return r=a?a[1]/100:1;case"inject":return t.style.zoom=1,parseFloat(r)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(r),10)+")"}else switch(e){case"name":return"opacity";case"extract":return r;case"inject":return r}}},register:function(){9>=d||b.State.isGingerbread||(S.Lists.transformsBase=S.Lists.transformsBase.concat(S.Lists.transforms3D));for(var e=0;e<S.Lists.transformsBase.length;e++)!function(){var t=S.Lists.transformsBase[e];S.Normalizations.registered[t]=function(e,r,n){switch(e){case"name":return"transform";case"extract":return i(r)===a||i(r).transformCache[t]===a?/^scale/i.test(t)?1:0:i(r).transformCache[t].replace(/[()]/g,"");case"inject":var o=!1;switch(t.substr(0,t.length-1)){case"translate":o=!/(%|px|em|rem|vw|vh|\d)$/i.test(n);break;case"scal":case"scale":b.State.isAndroid&&i(r).transformCache[t]===a&&1>n&&(n=1),o=!/(\d)$/i.test(n);break;case"skew":o=!/(deg|\d)$/i.test(n);break;case"rotate":o=!/(deg|\d)$/i.test(n)}return o||(i(r).transformCache[t]="("+n+")"),i(r).transformCache[t]}}}();for(var e=0;e<S.Lists.colors.length;e++)!function(){var t=S.Lists.colors[e];S.Normalizations.registered[t]=function(e,r,n){switch(e){case"name":return t;case"extract":var o;if(S.RegEx.wrappedValueAlreadyExtracted.test(n))o=n;else{var i,s={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(n)?i=s[n]!==a?s[n]:s.black:S.RegEx.isHex.test(n)?i="rgb("+S.Values.hexToRgb(n).join(" ")+")":/^rgba?\(/i.test(n)||(i=s.black),o=(i||n).toString().match(S.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return 8>=d||3!==o.split(" ").length||(o+=" 1"),o;case"inject":return 8>=d?4===n.split(" ").length&&(n=n.split(/\s+/).slice(0,3).join(" ")):3===n.split(" ").length&&(n+=" 1"),(8>=d?"rgb":"rgba")+"("+n.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})},SVGAttribute:function(e){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(d||b.State.isAndroid&&!b.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(e)},prefixCheck:function(e){if(b.State.prefixMatches[e])return[b.State.prefixMatches[e],!0];for(var t=["","Webkit","Moz","ms","O"],r=0,a=t.length;a>r;r++){var n;if(n=0===r?e:t[r]+e.replace(/^\w/,function(e){return e.toUpperCase()}),m.isString(b.State.prefixElement.style[n]))return b.State.prefixMatches[e]=n,[n,!0]}return[e,!1]}},Values:{hexToRgb:function(e){var t,r=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return e=e.replace(r,function(e,t,r,a){return t+t+r+r+a+a}),t=a.exec(e),t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]},isCSSNullValue:function(e){return 0==e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e)?"":"px"},getDisplayType:function(e){var t=e&&e.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":/^(table)$/i.test(t)?"table":/^(tbody)$/i.test(t)?"table-row-group":"block"},addClass:function(e,t){e.classList?e.classList.add(t):e.className+=(e.className.length?" ":"")+t},removeClass:function(e,t){e.classList?e.classList.remove(t):e.className=e.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(e,r,n,o){function s(e,r){function n(){u&&S.setPropertyValue(e,"display","none")}var l=0;if(8>=d)l=f.css(e,r);else{var u=!1;if(/^(width|height)$/.test(r)&&0===S.getPropertyValue(e,"display")&&(u=!0,S.setPropertyValue(e,"display",S.Values.getDisplayType(e))),!o){if("height"===r&&"border-box"!==S.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var c=e.offsetHeight-(parseFloat(S.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(S.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(S.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(S.getPropertyValue(e,"paddingBottom"))||0);return n(),c}if("width"===r&&"border-box"!==S.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var p=e.offsetWidth-(parseFloat(S.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(S.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(S.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(S.getPropertyValue(e,"paddingRight"))||0);return n(),p}}var g;g=i(e)===a?t.getComputedStyle(e,null):i(e).computedStyle?i(e).computedStyle:i(e).computedStyle=t.getComputedStyle(e,null),"borderColor"===r&&(r="borderTopColor"),l=9===d&&"filter"===r?g.getPropertyValue(r):g[r],(""===l||null===l)&&(l=e.style[r]),n()}if("auto"===l&&/^(top|right|bottom|left)$/i.test(r)){var m=s(e,"position");("fixed"===m||"absolute"===m&&/top|left/i.test(r))&&(l=f(e).position()[r]+"px")}return l}var l;if(S.Hooks.registered[r]){var u=r,c=S.Hooks.getRoot(u);n===a&&(n=S.getPropertyValue(e,S.Names.prefixCheck(c)[0])),S.Normalizations.registered[c]&&(n=S.Normalizations.registered[c]("extract",e,n)),l=S.Hooks.extractValue(u,n)}else if(S.Normalizations.registered[r]){var p,g;p=S.Normalizations.registered[r]("name",e),"transform"!==p&&(g=s(e,S.Names.prefixCheck(p)[0]),S.Values.isCSSNullValue(g)&&S.Hooks.templates[r]&&(g=S.Hooks.templates[r][1])),l=S.Normalizations.registered[r]("extract",e,g)}if(!/^[\d-]/.test(l))if(i(e)&&i(e).isSVG&&S.Names.SVGAttribute(r))if(/^(height|width)$/i.test(r))try{l=e.getBBox()[r]}catch(m){l=0}else l=e.getAttribute(r);else l=s(e,S.Names.prefixCheck(r)[0]);return S.Values.isCSSNullValue(l)&&(l=0),b.debug>=2&&console.log("Get "+r+": "+l),l},setPropertyValue:function(e,r,a,n,o){var s=r;if("scroll"===r)o.container?o.container["scroll"+o.direction]=a:"Left"===o.direction?t.scrollTo(a,o.alternateValue):t.scrollTo(o.alternateValue,a);else if(S.Normalizations.registered[r]&&"transform"===S.Normalizations.registered[r]("name",e))S.Normalizations.registered[r]("inject",e,a),s="transform",a=i(e).transformCache[r];else{if(S.Hooks.registered[r]){var l=r,u=S.Hooks.getRoot(r);n=n||S.getPropertyValue(e,u),a=S.Hooks.injectValue(l,a,n),r=u}if(S.Normalizations.registered[r]&&(a=S.Normalizations.registered[r]("inject",e,a),r=S.Normalizations.registered[r]("name",e)),s=S.Names.prefixCheck(r)[0],8>=d)try{e.style[s]=a}catch(c){b.debug&&console.log("Browser does not support ["+a+"] for ["+s+"]")}else i(e)&&i(e).isSVG&&S.Names.SVGAttribute(r)?e.setAttribute(r,a):e.style[s]=a;b.debug>=2&&console.log("Set "+r+" ("+s+"): "+a)}return[s,a]},flushTransformCache:function(e){function t(t){return parseFloat(S.getPropertyValue(e,t))}var r="";if((d||b.State.isAndroid&&!b.State.isChrome)&&i(e).isSVG){var a={translate:[t("translateX"),t("translateY")],skewX:[t("skewX")],skewY:[t("skewY")],scale:1!==t("scale")?[t("scale"),t("scale")]:[t("scaleX"),t("scaleY")],rotate:[t("rotateZ"),0,0]};f.each(i(e).transformCache,function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),a[e]&&(r+=e+"("+a[e].join(" ")+") ",delete a[e])})}else{var n,o;f.each(i(e).transformCache,function(t){return n=i(e).transformCache[t],"transformPerspective"===t?(o=n,!0):(9===d&&"rotateZ"===t&&(t="rotate"),void(r+=t+n+" "))}),o&&(r="perspective"+o+" "+r)}S.setPropertyValue(e,"transform",r)}};S.Hooks.register(),S.Normalizations.register(),b.hook=function(e,t,r){var n=a;return e=o(e),f.each(e,function(e,o){if(i(o)===a&&b.init(o),r===a)n===a&&(n=b.CSS.getPropertyValue(o,t));else{var s=b.CSS.setPropertyValue(o,t,r);"transform"===s[0]&&b.CSS.flushTransformCache(o),n=s}}),n};var P=function(){function e(){return s?k.promise||null:l}function n(){function e(e){function p(e,t){var r=a,n=a,i=a;return m.isArray(e)?(r=e[0],!m.isArray(e[1])&&/^[\d-]/.test(e[1])||m.isFunction(e[1])||S.RegEx.isHex.test(e[1])?i=e[1]:(m.isString(e[1])&&!S.RegEx.isHex.test(e[1])||m.isArray(e[1]))&&(n=t?e[1]:u(e[1],s.duration),e[2]!==a&&(i=e[2]))):r=e,t||(n=n||s.easing),m.isFunction(r)&&(r=r.call(o,V,w)),m.isFunction(i)&&(i=i.call(o,V,w)),[r||0,n,i]}function d(e,t){var r,a;return a=(t||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(e){return r=e,""}),r||(r=S.Values.getUnitType(e)),[a,r]}function h(){var e={myParent:o.parentNode||r.body,position:S.getPropertyValue(o,"position"),fontSize:S.getPropertyValue(o,"fontSize")},a=e.position===L.lastPosition&&e.myParent===L.lastParent,n=e.fontSize===L.lastFontSize;L.lastParent=e.myParent,L.lastPosition=e.position,L.lastFontSize=e.fontSize;var s=100,l={};if(n&&a)l.emToPx=L.lastEmToPx,l.percentToPxWidth=L.lastPercentToPxWidth,l.percentToPxHeight=L.lastPercentToPxHeight;else{var u=i(o).isSVG?r.createElementNS("http://www.w3.org/2000/svg","rect"):r.createElement("div");b.init(u),e.myParent.appendChild(u),f.each(["overflow","overflowX","overflowY"],function(e,t){b.CSS.setPropertyValue(u,t,"hidden")}),b.CSS.setPropertyValue(u,"position",e.position),b.CSS.setPropertyValue(u,"fontSize",e.fontSize),b.CSS.setPropertyValue(u,"boxSizing","content-box"),f.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(e,t){b.CSS.setPropertyValue(u,t,s+"%")}),b.CSS.setPropertyValue(u,"paddingLeft",s+"em"),l.percentToPxWidth=L.lastPercentToPxWidth=(parseFloat(S.getPropertyValue(u,"width",null,!0))||1)/s,l.percentToPxHeight=L.lastPercentToPxHeight=(parseFloat(S.getPropertyValue(u,"height",null,!0))||1)/s,l.emToPx=L.lastEmToPx=(parseFloat(S.getPropertyValue(u,"paddingLeft"))||1)/s,e.myParent.removeChild(u)}return null===L.remToPx&&(L.remToPx=parseFloat(S.getPropertyValue(r.body,"fontSize"))||16),null===L.vwToPx&&(L.vwToPx=parseFloat(t.innerWidth)/100,L.vhToPx=parseFloat(t.innerHeight)/100),l.remToPx=L.remToPx,l.vwToPx=L.vwToPx,l.vhToPx=L.vhToPx,b.debug>=1&&console.log("Unit ratios: "+JSON.stringify(l),o),l}if(s.begin&&0===V)try{s.begin.call(g,g)}catch(x){setTimeout(function(){throw x},1)}if("scroll"===A){var P,C,T,F=/^x$/i.test(s.axis)?"Left":"Top",j=parseFloat(s.offset)||0;s.container?m.isWrapped(s.container)||m.isNode(s.container)?(s.container=s.container[0]||s.container,P=s.container["scroll"+F],T=P+f(o).position()[F.toLowerCase()]+j):s.container=null:(P=b.State.scrollAnchor[b.State["scrollProperty"+F]],C=b.State.scrollAnchor[b.State["scrollProperty"+("Left"===F?"Top":"Left")]],T=f(o).offset()[F.toLowerCase()]+j),l={scroll:{rootPropertyValue:!1,startValue:P,currentValue:P,endValue:T,unitType:"",easing:s.easing,scrollData:{container:s.container,direction:F,alternateValue:C}},element:o},b.debug&&console.log("tweensContainer (scroll): ",l.scroll,o)}else if("reverse"===A){if(!i(o).tweensContainer)return void f.dequeue(o,s.queue);"none"===i(o).opts.display&&(i(o).opts.display="auto"),"hidden"===i(o).opts.visibility&&(i(o).opts.visibility="visible"),i(o).opts.loop=!1,i(o).opts.begin=null,i(o).opts.complete=null,v.easing||delete s.easing,v.duration||delete s.duration,s=f.extend({},i(o).opts,s);var E=f.extend(!0,{},i(o).tweensContainer);for(var H in E)if("element"!==H){var N=E[H].startValue;E[H].startValue=E[H].currentValue=E[H].endValue,E[H].endValue=N,m.isEmptyObject(v)||(E[H].easing=s.easing),b.debug&&console.log("reverse tweensContainer ("+H+"): "+JSON.stringify(E[H]),o)}l=E}else if("start"===A){var E;i(o).tweensContainer&&i(o).isAnimating===!0&&(E=i(o).tweensContainer),f.each(y,function(e,t){if(RegExp("^"+S.Lists.colors.join("$|^")+"$").test(e)){var r=p(t,!0),n=r[0],o=r[1],i=r[2];if(S.RegEx.isHex.test(n)){for(var s=["Red","Green","Blue"],l=S.Values.hexToRgb(n),u=i?S.Values.hexToRgb(i):a,c=0;c<s.length;c++){var f=[l[c]];o&&f.push(o),u!==a&&f.push(u[c]),y[e+s[c]]=f}delete y[e]}}});for(var z in y){var O=p(y[z]),q=O[0],$=O[1],M=O[2];z=S.Names.camelCase(z);var I=S.Hooks.getRoot(z),B=!1;if(i(o).isSVG||"tween"===I||S.Names.prefixCheck(I)[1]!==!1||S.Normalizations.registered[I]!==a){(s.display!==a&&null!==s.display&&"none"!==s.display||s.visibility!==a&&"hidden"!==s.visibility)&&/opacity|filter/.test(z)&&!M&&0!==q&&(M=0),s._cacheValues&&E&&E[z]?(M===a&&(M=E[z].endValue+E[z].unitType),B=i(o).rootPropertyValueCache[I]):S.Hooks.registered[z]?M===a?(B=S.getPropertyValue(o,I),M=S.getPropertyValue(o,z,B)):B=S.Hooks.templates[I][1]:M===a&&(M=S.getPropertyValue(o,z));var W,G,Y,D=!1;if(W=d(z,M),M=W[0],Y=W[1],W=d(z,q),q=W[0].replace(/^([+-\/*])=/,function(e,t){return D=t,""}),G=W[1],M=parseFloat(M)||0,q=parseFloat(q)||0,"%"===G&&(/^(fontSize|lineHeight)$/.test(z)?(q/=100,G="em"):/^scale/.test(z)?(q/=100,G=""):/(Red|Green|Blue)$/i.test(z)&&(q=q/100*255,G="")),/[\/*]/.test(D))G=Y;else if(Y!==G&&0!==M)if(0===q)G=Y;else{n=n||h();var Q=/margin|padding|left|right|width|text|word|letter/i.test(z)||/X$/.test(z)||"x"===z?"x":"y";switch(Y){case"%":M*="x"===Q?n.percentToPxWidth:n.percentToPxHeight;break;case"px":break;default:M*=n[Y+"ToPx"]}switch(G){case"%":M*=1/("x"===Q?n.percentToPxWidth:n.percentToPxHeight);break;case"px":break;default:M*=1/n[G+"ToPx"]}}switch(D){case"+":q=M+q;break;case"-":q=M-q;break;case"*":q=M*q;break;case"/":q=M/q}l[z]={rootPropertyValue:B,startValue:M,currentValue:M,endValue:q,unitType:G,easing:$},b.debug&&console.log("tweensContainer ("+z+"): "+JSON.stringify(l[z]),o)}else b.debug&&console.log("Skipping ["+I+"] due to a lack of browser support.")}l.element=o}l.element&&(S.Values.addClass(o,"velocity-animating"),R.push(l),""===s.queue&&(i(o).tweensContainer=l,i(o).opts=s),i(o).isAnimating=!0,V===w-1?(b.State.calls.push([R,g,s,null,k.resolver]),b.State.isTicking===!1&&(b.State.isTicking=!0,c())):V++)}var n,o=this,s=f.extend({},b.defaults,v),l={};switch(i(o)===a&&b.init(o),parseFloat(s.delay)&&s.queue!==!1&&f.queue(o,s.queue,function(e){b.velocityQueueEntryFlag=!0,i(o).delayTimer={setTimeout:setTimeout(e,parseFloat(s.delay)),next:e}}),s.duration.toString().toLowerCase()){case"fast":s.duration=200;break;case"normal":s.duration=h;break;case"slow":s.duration=600;break;default:s.duration=parseFloat(s.duration)||1}b.mock!==!1&&(b.mock===!0?s.duration=s.delay=1:(s.duration*=parseFloat(b.mock)||1,s.delay*=parseFloat(b.mock)||1)),s.easing=u(s.easing,s.duration),s.begin&&!m.isFunction(s.begin)&&(s.begin=null),s.progress&&!m.isFunction(s.progress)&&(s.progress=null),s.complete&&!m.isFunction(s.complete)&&(s.complete=null),s.display!==a&&null!==s.display&&(s.display=s.display.toString().toLowerCase(),"auto"===s.display&&(s.display=b.CSS.Values.getDisplayType(o))),s.visibility!==a&&null!==s.visibility&&(s.visibility=s.visibility.toString().toLowerCase()),s.mobileHA=s.mobileHA&&b.State.isMobile&&!b.State.isGingerbread,s.queue===!1?s.delay?setTimeout(e,s.delay):e():f.queue(o,s.queue,function(t,r){return r===!0?(k.promise&&k.resolver(g),!0):(b.velocityQueueEntryFlag=!0,void e(t))}),""!==s.queue&&"fx"!==s.queue||"inprogress"===f.queue(o)[0]||f.dequeue(o)}var s,l,d,g,y,v,x=arguments[0]&&(arguments[0].p||f.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||m.isString(arguments[0].properties));if(m.isWrapped(this)?(s=!1,d=0,g=this,l=this):(s=!0,d=1,g=x?arguments[0].elements||arguments[0].e:arguments[0]),g=o(g)){x?(y=arguments[0].properties||arguments[0].p,v=arguments[0].options||arguments[0].o):(y=arguments[d],v=arguments[d+1]);var w=g.length,V=0;if(!/^(stop|finish)$/i.test(y)&&!f.isPlainObject(v)){var C=d+1;v={};for(var T=C;T<arguments.length;T++)m.isArray(arguments[T])||!/^(fast|normal|slow)$/i.test(arguments[T])&&!/^\d/.test(arguments[T])?m.isString(arguments[T])||m.isArray(arguments[T])?v.easing=arguments[T]:m.isFunction(arguments[T])&&(v.complete=arguments[T]):v.duration=arguments[T]}var k={promise:null,resolver:null,rejecter:null};s&&b.Promise&&(k.promise=new b.Promise(function(e,t){k.resolver=e,k.rejecter=t}));var A;switch(y){case"scroll":A="scroll";break;case"reverse":A="reverse";break;case"finish":case"stop":f.each(g,function(e,t){i(t)&&i(t).delayTimer&&(clearTimeout(i(t).delayTimer.setTimeout),i(t).delayTimer.next&&i(t).delayTimer.next(),delete i(t).delayTimer)});var F=[];return f.each(b.State.calls,function(e,t){t&&f.each(t[1],function(r,n){var o=v===a?"":v;return o===!0||t[2].queue===o||v===a&&t[2].queue===!1?void f.each(g,function(r,a){a===n&&((v===!0||m.isString(v))&&(f.each(f.queue(a,m.isString(v)?v:""),function(e,t){
|
5 |
+
m.isFunction(t)&&t(null,!0)}),f.queue(a,m.isString(v)?v:"",[])),"stop"===y?(i(a)&&i(a).tweensContainer&&o!==!1&&f.each(i(a).tweensContainer,function(e,t){t.endValue=t.currentValue}),F.push(e)):"finish"===y&&(t[2].duration=1))}):!0})}),"stop"===y&&(f.each(F,function(e,t){p(t,!0)}),k.promise&&k.resolver(g)),e();default:if(!f.isPlainObject(y)||m.isEmptyObject(y)){if(m.isString(y)&&b.Redirects[y]){var j=f.extend({},v),E=j.duration,H=j.delay||0;return j.backwards===!0&&(g=f.extend(!0,[],g).reverse()),f.each(g,function(e,t){parseFloat(j.stagger)?j.delay=H+parseFloat(j.stagger)*e:m.isFunction(j.stagger)&&(j.delay=H+j.stagger.call(t,e,w)),j.drag&&(j.duration=parseFloat(E)||(/^(callout|transition)/.test(y)?1e3:h),j.duration=Math.max(j.duration*(j.backwards?1-e/w:(e+1)/w),.75*j.duration,200)),b.Redirects[y].call(t,t,j||{},e,w,g,k.promise?k:a)}),e()}var N="Velocity: First argument ("+y+") was not a property map, a known action, or a registered redirect. Aborting.";return k.promise?k.rejecter(new Error(N)):console.log(N),e()}A="start"}var L={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},R=[];f.each(g,function(e,t){m.isNode(t)&&n.call(t)});var z,j=f.extend({},b.defaults,v);if(j.loop=parseInt(j.loop),z=2*j.loop-1,j.loop)for(var O=0;z>O;O++){var q={delay:j.delay,progress:j.progress};O===z-1&&(q.display=j.display,q.visibility=j.visibility,q.complete=j.complete),P(g,"reverse",q)}return e()}};b=f.extend(P,b),b.animate=P;var w=t.requestAnimationFrame||g;return b.State.isMobile||r.hidden===a||r.addEventListener("visibilitychange",function(){r.hidden?(w=function(e){return setTimeout(function(){e(!0)},16)},c()):w=t.requestAnimationFrame||g}),e.Velocity=b,e!==t&&(e.fn.velocity=P,e.fn.velocity.defaults=b.defaults),f.each(["Down","Up"],function(e,t){b.Redirects["slide"+t]=function(e,r,n,o,i,s){var l=f.extend({},r),u=l.begin,c=l.complete,p={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},d={};l.display===a&&(l.display="Down"===t?"inline"===b.CSS.Values.getDisplayType(e)?"inline-block":"block":"none"),l.begin=function(){u&&u.call(i,i);for(var r in p){d[r]=e.style[r];var a=b.CSS.getPropertyValue(e,r);p[r]="Down"===t?[a,0]:[0,a]}d.overflow=e.style.overflow,e.style.overflow="hidden"},l.complete=function(){for(var t in d)e.style[t]=d[t];c&&c.call(i,i),s&&s.resolver(i)},b(e,p,l)}}),f.each(["In","Out"],function(e,t){b.Redirects["fade"+t]=function(e,r,n,o,i,s){var l=f.extend({},r),u={opacity:"In"===t?1:0},c=l.complete;l.complete=n!==o-1?l.begin=null:function(){c&&c.call(i,i),s&&s.resolver(i)},l.display===a&&(l.display="In"===t?"auto":"none"),b(this,u,l)}}),b}(window.jQuery||window.Zepto||window,window,document)}));
|
jufeedback/assets/loading.gif
ADDED
Binary file
|
jufeedback/ju-check-debug-data.php
ADDED
@@ -0,0 +1,1163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class for providing debug data based on a users WordPress environment.
|
4 |
+
*
|
5 |
+
* @package Jufeedback
|
6 |
+
*/
|
7 |
+
|
8 |
+
if (!defined('ABSPATH')) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class JuCheckDebugData
|
14 |
+
*/
|
15 |
+
class JuCheckDebugData
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Calls all core functions to check for updates
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public static function checkForUpdates()
|
23 |
+
{
|
24 |
+
wp_version_check();
|
25 |
+
wp_update_plugins();
|
26 |
+
wp_update_themes();
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Static function for generating site debug data when required.
|
31 |
+
*
|
32 |
+
* @throws ImagickException Imagic Exception
|
33 |
+
* @global wpdb $wpdb WordPress database abstraction object.
|
34 |
+
*
|
35 |
+
* @return array The debug data for the site.
|
36 |
+
*/
|
37 |
+
public static function debugData()
|
38 |
+
{
|
39 |
+
global $wpdb, $is_apache;
|
40 |
+
|
41 |
+
// Save few function calls.
|
42 |
+
$upload_dir = wp_get_upload_dir();
|
43 |
+
$permalink_structure = get_option('permalink_structure');
|
44 |
+
$is_ssl = is_ssl();
|
45 |
+
$users_can_register = get_option('users_can_register');
|
46 |
+
$default_comment_status = get_option('default_comment_status');
|
47 |
+
$is_multisite = is_multisite();
|
48 |
+
$core_version = get_bloginfo('version');
|
49 |
+
$core_updates = get_core_updates();
|
50 |
+
$core_update_needed = '';
|
51 |
+
if (!empty($core_updates)) {
|
52 |
+
foreach ($core_updates as $core => $update) {
|
53 |
+
if ('upgrade' === $update->response) {
|
54 |
+
// translators: %s: Latest WordPress version number.
|
55 |
+
$core_update_needed = ' ' . sprintf('(Latest version: %s)', $update->version);
|
56 |
+
} else {
|
57 |
+
$core_update_needed = '';
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
// Set up the array that holds all debug information.
|
63 |
+
$info = array();
|
64 |
+
|
65 |
+
$info['wp-core'] = array(
|
66 |
+
'label' => 'WordPress',
|
67 |
+
'fields' => array(
|
68 |
+
'version' => array(
|
69 |
+
'label' => 'Version',
|
70 |
+
'value' => $core_version . $core_update_needed,
|
71 |
+
'debug' => $core_version,
|
72 |
+
),
|
73 |
+
'site_language' => array(
|
74 |
+
'label' => 'Site Language',
|
75 |
+
'value' => get_locale(),
|
76 |
+
),
|
77 |
+
'user_language' => array(
|
78 |
+
'label' => 'User Language',
|
79 |
+
'value' => get_user_locale(),
|
80 |
+
),
|
81 |
+
'home_url' => array(
|
82 |
+
'label' => 'Home URL',
|
83 |
+
'value' => get_bloginfo('url'),
|
84 |
+
'private' => true,
|
85 |
+
),
|
86 |
+
'site_url' => array(
|
87 |
+
'label' => 'Site URL',
|
88 |
+
'value' => get_bloginfo('wpurl'),
|
89 |
+
'private' => true,
|
90 |
+
),
|
91 |
+
'permalink' => array(
|
92 |
+
'label' => 'Permalink structure',
|
93 |
+
'value' => $permalink_structure ? $permalink_structure : 'No permalink structure set',
|
94 |
+
'debug' => $permalink_structure,
|
95 |
+
),
|
96 |
+
'https_status' => array(
|
97 |
+
'label' => 'Is this site using HTTPS?',
|
98 |
+
'value' => $is_ssl ? 'Yes' : 'No',
|
99 |
+
'debug' => $is_ssl,
|
100 |
+
),
|
101 |
+
'user_registration' => array(
|
102 |
+
'label' => 'Can anyone register on this site?',
|
103 |
+
'value' => $users_can_register ? 'Yes' : 'No',
|
104 |
+
'debug' => $users_can_register,
|
105 |
+
),
|
106 |
+
'default_comment_status' => array(
|
107 |
+
'label' => 'Default comment status',
|
108 |
+
'value' => 'open' === $default_comment_status ? 'Open' : 'Closed',
|
109 |
+
'debug' => $default_comment_status,
|
110 |
+
),
|
111 |
+
'multisite' => array(
|
112 |
+
'label' => 'Is this a multisite?',
|
113 |
+
'value' => $is_multisite ? 'Yes' : 'No',
|
114 |
+
'debug' => $is_multisite,
|
115 |
+
),
|
116 |
+
),
|
117 |
+
);
|
118 |
+
|
119 |
+
if (!$is_multisite) {
|
120 |
+
$info['wp-paths-sizes'] = array(
|
121 |
+
'label' => 'Directories and Sizes',
|
122 |
+
'fields' => array(),
|
123 |
+
);
|
124 |
+
}
|
125 |
+
|
126 |
+
$info['wp-dropins'] = array(
|
127 |
+
'label' => 'Drop-ins',
|
128 |
+
'show_count' => true,
|
129 |
+
'description' => 'Drop-ins are single files that replace or enhance WordPress features in ways that are not possible for traditional plugins.',
|
130 |
+
'fields' => array(),
|
131 |
+
);
|
132 |
+
|
133 |
+
$info['wp-active-theme'] = array(
|
134 |
+
'label' => 'Active Theme',
|
135 |
+
'fields' => array(),
|
136 |
+
);
|
137 |
+
|
138 |
+
$info['wp-parent-theme'] = array(
|
139 |
+
'label' => 'Parent Theme',
|
140 |
+
'fields' => array(),
|
141 |
+
);
|
142 |
+
|
143 |
+
$info['wp-themes-inactive'] = array(
|
144 |
+
'label' => 'Inactive Themes',
|
145 |
+
'show_count' => true,
|
146 |
+
'fields' => array(),
|
147 |
+
);
|
148 |
+
|
149 |
+
$info['wp-mu-plugins'] = array(
|
150 |
+
'label' => 'Must Use Plugins',
|
151 |
+
'show_count' => true,
|
152 |
+
'fields' => array(),
|
153 |
+
);
|
154 |
+
|
155 |
+
$info['wp-plugins-active'] = array(
|
156 |
+
'label' => 'Active Plugins',
|
157 |
+
'show_count' => true,
|
158 |
+
'fields' => array(),
|
159 |
+
);
|
160 |
+
|
161 |
+
$info['wp-plugins-inactive'] = array(
|
162 |
+
'label' => 'Inactive Plugins',
|
163 |
+
'show_count' => true,
|
164 |
+
'fields' => array(),
|
165 |
+
);
|
166 |
+
|
167 |
+
$info['wp-media'] = array(
|
168 |
+
'label' => 'Media Handling',
|
169 |
+
'fields' => array(),
|
170 |
+
);
|
171 |
+
|
172 |
+
$info['wp-server'] = array(
|
173 |
+
'label' => 'Server',
|
174 |
+
'description' => 'The options shown below relate to your server setup. If changes are required, you may need your web host’s assistance.',
|
175 |
+
'fields' => array(),
|
176 |
+
);
|
177 |
+
|
178 |
+
$info['wp-database'] = array(
|
179 |
+
'label' => 'Database',
|
180 |
+
'fields' => array(),
|
181 |
+
);
|
182 |
+
|
183 |
+
// Check if WP_DEBUG_LOG is set.
|
184 |
+
$wp_debug_log_value = 'Disabled';
|
185 |
+
|
186 |
+
if (is_string(WP_DEBUG_LOG)) {
|
187 |
+
$wp_debug_log_value = WP_DEBUG_LOG;
|
188 |
+
} elseif (WP_DEBUG_LOG) {
|
189 |
+
$wp_debug_log_value = 'Enabled';
|
190 |
+
}
|
191 |
+
|
192 |
+
// Check CONCATENATE_SCRIPTS.
|
193 |
+
if (defined('CONCATENATE_SCRIPTS')) {
|
194 |
+
$concatenate_scripts = CONCATENATE_SCRIPTS ? 'Enabled' : 'Disabled';
|
195 |
+
$concatenate_scripts_debug = CONCATENATE_SCRIPTS ? 'true' : 'false';
|
196 |
+
} else {
|
197 |
+
$concatenate_scripts = 'Undefined';
|
198 |
+
$concatenate_scripts_debug = 'undefined';
|
199 |
+
}
|
200 |
+
|
201 |
+
// Check COMPRESS_SCRIPTS.
|
202 |
+
if (defined('COMPRESS_SCRIPTS')) {
|
203 |
+
$compress_scripts = COMPRESS_SCRIPTS ? 'Enabled' : 'Disabled';
|
204 |
+
$compress_scripts_debug = COMPRESS_SCRIPTS ? 'true' : 'false';
|
205 |
+
} else {
|
206 |
+
$compress_scripts = 'Undefined';
|
207 |
+
$compress_scripts_debug = 'undefined';
|
208 |
+
}
|
209 |
+
|
210 |
+
// Check COMPRESS_CSS.
|
211 |
+
if (defined('COMPRESS_CSS')) {
|
212 |
+
$compress_css = COMPRESS_CSS ? 'Enabled' : 'Disabled';
|
213 |
+
$compress_css_debug = COMPRESS_CSS ? 'true' : 'false';
|
214 |
+
} else {
|
215 |
+
$compress_css = 'Undefined';
|
216 |
+
$compress_css_debug = 'undefined';
|
217 |
+
}
|
218 |
+
|
219 |
+
// Check WP_LOCAL_DEV.
|
220 |
+
if (defined('WP_LOCAL_DEV')) {
|
221 |
+
$wp_local_dev = WP_LOCAL_DEV ? 'Enabled' : 'Disabled';
|
222 |
+
$wp_local_dev_debug = WP_LOCAL_DEV ? 'true' : 'false';
|
223 |
+
} else {
|
224 |
+
$wp_local_dev = 'Undefined';
|
225 |
+
$wp_local_dev_debug = 'undefined';
|
226 |
+
}
|
227 |
+
|
228 |
+
$info['wp-constants'] = array(
|
229 |
+
'label' => 'WordPress Constants',
|
230 |
+
'description' => 'These settings alter where and how parts of WordPress are loaded.',
|
231 |
+
'fields' => array(
|
232 |
+
'ABSPATH' => array(
|
233 |
+
'label' => 'ABSPATH',
|
234 |
+
'value' => ABSPATH,
|
235 |
+
'private' => true,
|
236 |
+
),
|
237 |
+
'WP_HOME' => array(
|
238 |
+
'label' => 'WP_HOME',
|
239 |
+
'value' => (defined('WP_HOME') ? WP_HOME : 'Undefined'),
|
240 |
+
'debug' => (defined('WP_HOME') ? WP_HOME : 'undefined'),
|
241 |
+
),
|
242 |
+
'WP_SITEURL' => array(
|
243 |
+
'label' => 'WP_SITEURL',
|
244 |
+
'value' => (defined('WP_SITEURL') ? WP_SITEURL : 'Undefined'),
|
245 |
+
'debug' => (defined('WP_SITEURL') ? WP_SITEURL : 'undefined'),
|
246 |
+
),
|
247 |
+
'WP_CONTENT_DIR' => array(
|
248 |
+
'label' => 'WP_CONTENT_DIR',
|
249 |
+
'value' => WP_CONTENT_DIR,
|
250 |
+
),
|
251 |
+
'WP_PLUGIN_DIR' => array(
|
252 |
+
'label' => 'WP_PLUGIN_DIR',
|
253 |
+
'value' => WP_PLUGIN_DIR,
|
254 |
+
),
|
255 |
+
'WP_MAX_MEMORY_LIMIT' => array(
|
256 |
+
'label' => 'WP_MAX_MEMORY_LIMIT',
|
257 |
+
'value' => WP_MAX_MEMORY_LIMIT,
|
258 |
+
),
|
259 |
+
'WP_DEBUG' => array(
|
260 |
+
'label' => 'WP_DEBUG',
|
261 |
+
'value' => WP_DEBUG ? 'Enabled' : 'Disabled',
|
262 |
+
'debug' => WP_DEBUG,
|
263 |
+
),
|
264 |
+
'WP_DEBUG_DISPLAY' => array(
|
265 |
+
'label' => 'WP_DEBUG_DISPLAY',
|
266 |
+
'value' => WP_DEBUG_DISPLAY ? 'Enabled' : 'Disabled',
|
267 |
+
'debug' => WP_DEBUG_DISPLAY,
|
268 |
+
),
|
269 |
+
'WP_DEBUG_LOG' => array(
|
270 |
+
'label' => 'WP_DEBUG_LOG',
|
271 |
+
'value' => $wp_debug_log_value,
|
272 |
+
'debug' => WP_DEBUG_LOG,
|
273 |
+
),
|
274 |
+
'SCRIPT_DEBUG' => array(
|
275 |
+
'label' => 'SCRIPT_DEBUG',
|
276 |
+
'value' => SCRIPT_DEBUG ? 'Enabled' : 'Disabled',
|
277 |
+
'debug' => SCRIPT_DEBUG,
|
278 |
+
),
|
279 |
+
'WP_CACHE' => array(
|
280 |
+
'label' => 'WP_CACHE',
|
281 |
+
'value' => WP_CACHE ? 'Enabled' : 'Disabled',
|
282 |
+
'debug' => WP_CACHE,
|
283 |
+
),
|
284 |
+
'CONCATENATE_SCRIPTS' => array(
|
285 |
+
'label' => 'CONCATENATE_SCRIPTS',
|
286 |
+
'value' => $concatenate_scripts,
|
287 |
+
'debug' => $concatenate_scripts_debug,
|
288 |
+
),
|
289 |
+
'COMPRESS_SCRIPTS' => array(
|
290 |
+
'label' => 'COMPRESS_SCRIPTS',
|
291 |
+
'value' => $compress_scripts,
|
292 |
+
'debug' => $compress_scripts_debug,
|
293 |
+
),
|
294 |
+
'COMPRESS_CSS' => array(
|
295 |
+
'label' => 'COMPRESS_CSS',
|
296 |
+
'value' => $compress_css,
|
297 |
+
'debug' => $compress_css_debug,
|
298 |
+
),
|
299 |
+
'WP_LOCAL_DEV' => array(
|
300 |
+
'label' => 'WP_LOCAL_DEV',
|
301 |
+
'value' => $wp_local_dev,
|
302 |
+
'debug' => $wp_local_dev_debug,
|
303 |
+
),
|
304 |
+
),
|
305 |
+
);
|
306 |
+
|
307 |
+
$is_writable_abspath = wp_is_writable(ABSPATH);
|
308 |
+
$is_writable_wp_content_dir = wp_is_writable(WP_CONTENT_DIR);
|
309 |
+
$is_writable_upload_dir = wp_is_writable($upload_dir['basedir']);
|
310 |
+
$is_writable_wp_plugin_dir = wp_is_writable(WP_PLUGIN_DIR);
|
311 |
+
$is_writable_template_directory = wp_is_writable(get_template_directory() . '/..');
|
312 |
+
|
313 |
+
$info['wp-filesystem'] = array(
|
314 |
+
'label' => 'Filesystem Permissions',
|
315 |
+
'description' => 'Shows whether WordPress is able to write to the directories it needs access to.',
|
316 |
+
'fields' => array(
|
317 |
+
'wordpress' => array(
|
318 |
+
'label' => 'The main WordPress directory',
|
319 |
+
'value' => ($is_writable_abspath ? 'Writable' : 'Not writable'),
|
320 |
+
'debug' => ($is_writable_abspath ? 'writable' : 'not writable'),
|
321 |
+
),
|
322 |
+
'wp-content' => array(
|
323 |
+
'label' => 'The wp-content directory',
|
324 |
+
'value' => ($is_writable_wp_content_dir ? 'Writable' : 'Not writable'),
|
325 |
+
'debug' => ($is_writable_wp_content_dir ? 'writable' : 'not writable'),
|
326 |
+
),
|
327 |
+
'uploads' => array(
|
328 |
+
'label' => 'The uploads directory',
|
329 |
+
'value' => ($is_writable_upload_dir ? 'Writable' : 'Not writable'),
|
330 |
+
'debug' => ($is_writable_upload_dir ? 'writable' : 'not writable'),
|
331 |
+
),
|
332 |
+
'plugins' => array(
|
333 |
+
'label' => 'The plugins directory',
|
334 |
+
'value' => ($is_writable_wp_plugin_dir ? 'Writable' : 'Not writable'),
|
335 |
+
'debug' => ($is_writable_wp_plugin_dir ? 'writable' : 'not writable'),
|
336 |
+
),
|
337 |
+
'themes' => array(
|
338 |
+
'label' => 'The themes directory',
|
339 |
+
'value' => ($is_writable_template_directory ? 'Writable' : 'Not writable'),
|
340 |
+
'debug' => ($is_writable_template_directory ? 'writable' : 'not writable'),
|
341 |
+
),
|
342 |
+
),
|
343 |
+
);
|
344 |
+
|
345 |
+
// Conditionally add debug information for multisite setups.
|
346 |
+
if (is_multisite()) {
|
347 |
+
$network_query = new WP_Network_Query();
|
348 |
+
$network_ids = $network_query->query(
|
349 |
+
array(
|
350 |
+
'fields' => 'ids',
|
351 |
+
'number' => 100,
|
352 |
+
'no_found_rows' => false,
|
353 |
+
)
|
354 |
+
);
|
355 |
+
|
356 |
+
$site_count = 0;
|
357 |
+
if (!empty($network_ids)) {
|
358 |
+
foreach ($network_ids as $network_id) {
|
359 |
+
$site_count += get_blog_count($network_id);
|
360 |
+
}
|
361 |
+
}
|
362 |
+
|
363 |
+
$info['wp-core']['fields']['user_count'] = array(
|
364 |
+
'label' => 'User count',
|
365 |
+
'value' => get_user_count(),
|
366 |
+
);
|
367 |
+
|
368 |
+
$info['wp-core']['fields']['site_count'] = array(
|
369 |
+
'label' => 'Site count',
|
370 |
+
'value' => $site_count,
|
371 |
+
);
|
372 |
+
|
373 |
+
$info['wp-core']['fields']['network_count'] = array(
|
374 |
+
'label' => 'Network count',
|
375 |
+
'value' => $network_query->found_networks,
|
376 |
+
);
|
377 |
+
} else {
|
378 |
+
$user_count = count_users();
|
379 |
+
|
380 |
+
$info['wp-core']['fields']['user_count'] = array(
|
381 |
+
'label' => 'User count',
|
382 |
+
'value' => $user_count['total_users'],
|
383 |
+
);
|
384 |
+
}
|
385 |
+
|
386 |
+
// WordPress features requiring processing.
|
387 |
+
$wp_dotorg = wp_remote_get('https://wordpress.org', array('timeout' => 10));
|
388 |
+
|
389 |
+
if (!is_wp_error($wp_dotorg)) {
|
390 |
+
$info['wp-core']['fields']['dotorg_communication'] = array(
|
391 |
+
'label' => 'Communication with WordPress.org',
|
392 |
+
'value' => 'WordPress.org is reachable',
|
393 |
+
'debug' => 'true',
|
394 |
+
);
|
395 |
+
} else {
|
396 |
+
$info['wp-core']['fields']['dotorg_communication'] = array(
|
397 |
+
'label' => 'Communication with WordPress.org',
|
398 |
+
'value' => sprintf(
|
399 |
+
// translators: 1: The IP address WordPress.org resolves to. 2: The error returned by the lookup.
|
400 |
+
'Unable to reach WordPress.org at %1$s: %2$s',
|
401 |
+
gethostbyname('wordpress.org'),
|
402 |
+
$wp_dotorg->get_error_message()
|
403 |
+
),
|
404 |
+
'debug' => $wp_dotorg->get_error_message(),
|
405 |
+
);
|
406 |
+
}
|
407 |
+
|
408 |
+
// Remove accordion for Directories and Sizes if in Multisite.
|
409 |
+
if (!$is_multisite) {
|
410 |
+
$loading = 'Loading…';
|
411 |
+
|
412 |
+
$info['wp-paths-sizes']['fields'] = array(
|
413 |
+
'wordpress_path' => array(
|
414 |
+
'label' => 'WordPress directory location',
|
415 |
+
'value' => untrailingslashit(ABSPATH),
|
416 |
+
),
|
417 |
+
'wordpress_size' => array(
|
418 |
+
'label' => 'WordPress directory size',
|
419 |
+
'value' => $loading,
|
420 |
+
'debug' => 'loading...',
|
421 |
+
),
|
422 |
+
'uploads_path' => array(
|
423 |
+
'label' => 'Uploads directory location',
|
424 |
+
'value' => $upload_dir['basedir'],
|
425 |
+
),
|
426 |
+
'uploads_size' => array(
|
427 |
+
'label' => 'Uploads directory size',
|
428 |
+
'value' => $loading,
|
429 |
+
'debug' => 'loading...',
|
430 |
+
),
|
431 |
+
'themes_path' => array(
|
432 |
+
'label' => 'Themes directory location',
|
433 |
+
'value' => get_theme_root(),
|
434 |
+
),
|
435 |
+
'themes_size' => array(
|
436 |
+
'label' => 'Themes directory size',
|
437 |
+
'value' => $loading,
|
438 |
+
'debug' => 'loading...',
|
439 |
+
),
|
440 |
+
'plugins_path' => array(
|
441 |
+
'label' => 'Plugins directory location',
|
442 |
+
'value' => WP_PLUGIN_DIR,
|
443 |
+
),
|
444 |
+
'plugins_size' => array(
|
445 |
+
'label' => 'Plugins directory size',
|
446 |
+
'value' => $loading,
|
447 |
+
'debug' => 'loading...',
|
448 |
+
),
|
449 |
+
'database_size' => array(
|
450 |
+
'label' => 'Database size',
|
451 |
+
'value' => $loading,
|
452 |
+
'debug' => 'loading...',
|
453 |
+
),
|
454 |
+
'total_size' => array(
|
455 |
+
'label' => 'Total installation size',
|
456 |
+
'value' => $loading,
|
457 |
+
'debug' => 'loading...',
|
458 |
+
),
|
459 |
+
);
|
460 |
+
}
|
461 |
+
|
462 |
+
// Get a list of all drop-in replacements.
|
463 |
+
$dropins = get_dropins();
|
464 |
+
|
465 |
+
// Get dropins descriptions.
|
466 |
+
$dropin_descriptions = _get_dropins();
|
467 |
+
|
468 |
+
// Spare few function calls.
|
469 |
+
$not_available = 'Not available';
|
470 |
+
|
471 |
+
if (!empty($dropins)) {
|
472 |
+
foreach ($dropins as $dropin_key => $dropin) {
|
473 |
+
$info['wp-dropins']['fields'][sanitize_text_field($dropin_key)] = array(
|
474 |
+
'label' => $dropin_key,
|
475 |
+
'value' => $dropin_descriptions[$dropin_key][0],
|
476 |
+
'debug' => 'true',
|
477 |
+
);
|
478 |
+
}
|
479 |
+
}
|
480 |
+
|
481 |
+
// Populate the media fields.
|
482 |
+
$info['wp-media']['fields']['image_editor'] = array(
|
483 |
+
'label' => 'Active editor',
|
484 |
+
'value' => _wp_image_editor_choose(),
|
485 |
+
);
|
486 |
+
|
487 |
+
// Get ImageMagic information, if available.
|
488 |
+
if (class_exists('Imagick') && extension_loaded('imagick')) {
|
489 |
+
// Save the Imagick instance for later use.
|
490 |
+
$imagick = new Imagick();
|
491 |
+
$imagick_version = $imagick->getVersion();
|
492 |
+
} else {
|
493 |
+
$imagick_version = 'Not available';
|
494 |
+
}
|
495 |
+
|
496 |
+
$info['wp-media']['fields']['imagick_module_version'] = array(
|
497 |
+
'label' => 'ImageMagick version number',
|
498 |
+
'value' => (is_array($imagick_version) ? $imagick_version['versionNumber'] : $imagick_version),
|
499 |
+
);
|
500 |
+
|
501 |
+
$info['wp-media']['fields']['imagemagick_version'] = array(
|
502 |
+
'label' => 'ImageMagick version string',
|
503 |
+
'value' => (is_array($imagick_version) ? $imagick_version['versionString'] : $imagick_version),
|
504 |
+
);
|
505 |
+
|
506 |
+
// If Imagick is used as our editor, provide some more information about its limitations.
|
507 |
+
if ('WP_Image_Editor_Imagick' === _wp_image_editor_choose() && isset($imagick) && $imagick instanceof Imagick) {
|
508 |
+
$limits = array(
|
509 |
+
'area' => (defined('imagick::RESOURCETYPE_AREA') ? size_format($imagick->getResourceLimit(imagick::RESOURCETYPE_AREA)) : $not_available),
|
510 |
+
'disk' => (defined('imagick::RESOURCETYPE_DISK') ? $imagick->getResourceLimit(imagick::RESOURCETYPE_DISK) : $not_available),
|
511 |
+
'file' => (defined('imagick::RESOURCETYPE_FILE') ? $imagick->getResourceLimit(imagick::RESOURCETYPE_FILE) : $not_available),
|
512 |
+
'map' => (defined('imagick::RESOURCETYPE_MAP') ? size_format($imagick->getResourceLimit(imagick::RESOURCETYPE_MAP)) : $not_available),
|
513 |
+
'memory' => (defined('imagick::RESOURCETYPE_MEMORY') ? size_format($imagick->getResourceLimit(imagick::RESOURCETYPE_MEMORY)) : $not_available),
|
514 |
+
'thread' => (defined('imagick::RESOURCETYPE_THREAD') ? $imagick->getResourceLimit(imagick::RESOURCETYPE_THREAD) : $not_available),
|
515 |
+
);
|
516 |
+
|
517 |
+
$limits_debug = array(
|
518 |
+
'imagick::RESOURCETYPE_AREA' => (defined('imagick::RESOURCETYPE_AREA') ? size_format($imagick->getResourceLimit(imagick::RESOURCETYPE_AREA)) : 'not available'),
|
519 |
+
'imagick::RESOURCETYPE_DISK' => (defined('imagick::RESOURCETYPE_DISK') ? $imagick->getResourceLimit(imagick::RESOURCETYPE_DISK) : 'not available'),
|
520 |
+
'imagick::RESOURCETYPE_FILE' => (defined('imagick::RESOURCETYPE_FILE') ? $imagick->getResourceLimit(imagick::RESOURCETYPE_FILE) : 'not available'),
|
521 |
+
'imagick::RESOURCETYPE_MAP' => (defined('imagick::RESOURCETYPE_MAP') ? size_format($imagick->getResourceLimit(imagick::RESOURCETYPE_MAP)) : 'not available'),
|
522 |
+
'imagick::RESOURCETYPE_MEMORY' => (defined('imagick::RESOURCETYPE_MEMORY') ? size_format($imagick->getResourceLimit(imagick::RESOURCETYPE_MEMORY)) : 'not available'),
|
523 |
+
'imagick::RESOURCETYPE_THREAD' => (defined('imagick::RESOURCETYPE_THREAD') ? $imagick->getResourceLimit(imagick::RESOURCETYPE_THREAD) : 'not available'),
|
524 |
+
);
|
525 |
+
|
526 |
+
$info['wp-media']['fields']['imagick_limits'] = array(
|
527 |
+
'label' => 'Imagick Resource Limits',
|
528 |
+
'value' => $limits,
|
529 |
+
'debug' => $limits_debug,
|
530 |
+
);
|
531 |
+
}
|
532 |
+
|
533 |
+
// Get GD information, if available.
|
534 |
+
if (function_exists('gd_info')) {
|
535 |
+
$gd = gd_info();
|
536 |
+
} else {
|
537 |
+
$gd = false;
|
538 |
+
}
|
539 |
+
|
540 |
+
$info['wp-media']['fields']['gd_version'] = array(
|
541 |
+
'label' => 'GD version',
|
542 |
+
'value' => (is_array($gd) ? $gd['GD Version'] : $not_available),
|
543 |
+
'debug' => (is_array($gd) ? $gd['GD Version'] : 'not available'),
|
544 |
+
);
|
545 |
+
|
546 |
+
// Get Ghostscript information, if available.
|
547 |
+
if (function_exists('exec')) {
|
548 |
+
$gs = exec('gs --version');
|
549 |
+
|
550 |
+
if (empty($gs)) {
|
551 |
+
$gs = $not_available;
|
552 |
+
$gs_debug = 'not available';
|
553 |
+
} else {
|
554 |
+
$gs_debug = $gs;
|
555 |
+
}
|
556 |
+
} else {
|
557 |
+
$gs = 'Unable to determine if Ghostscript is installed';
|
558 |
+
$gs_debug = 'unknown';
|
559 |
+
}
|
560 |
+
|
561 |
+
$info['wp-media']['fields']['ghostscript_version'] = array(
|
562 |
+
'label' => 'Ghostscript version',
|
563 |
+
'value' => $gs,
|
564 |
+
'debug' => $gs_debug,
|
565 |
+
);
|
566 |
+
|
567 |
+
// Populate the server debug fields.
|
568 |
+
if (function_exists('php_uname')) {
|
569 |
+
$server_architecture = sprintf('%s %s %s', php_uname('s'), php_uname('r'), php_uname('m'));
|
570 |
+
} else {
|
571 |
+
$server_architecture = 'unknown';
|
572 |
+
}
|
573 |
+
|
574 |
+
if (function_exists('phpversion')) {
|
575 |
+
$php_version_debug = phpversion();
|
576 |
+
// Whether PHP supports 64bit
|
577 |
+
$php64bit = (PHP_INT_SIZE * 8 === 64);
|
578 |
+
|
579 |
+
$php_version = sprintf(
|
580 |
+
'%s %s',
|
581 |
+
$php_version_debug,
|
582 |
+
($php64bit ? '(Supports 64bit values)' : '(Does not support 64bit values)')
|
583 |
+
);
|
584 |
+
|
585 |
+
if ($php64bit) {
|
586 |
+
$php_version_debug .= ' 64bit';
|
587 |
+
}
|
588 |
+
} else {
|
589 |
+
$php_version = 'Unable to determine PHP version';
|
590 |
+
$php_version_debug = 'unknown';
|
591 |
+
}
|
592 |
+
|
593 |
+
if (function_exists('php_sapi_name')) {
|
594 |
+
$php_sapi = php_sapi_name();
|
595 |
+
} else {
|
596 |
+
$php_sapi = 'unknown';
|
597 |
+
}
|
598 |
+
|
599 |
+
$info['wp-server']['fields']['server_architecture'] = array(
|
600 |
+
'label' => 'Server architecture',
|
601 |
+
'value' => ('unknown' !== $server_architecture ? $server_architecture : 'Unable to determine server architecture'),
|
602 |
+
'debug' => $server_architecture,
|
603 |
+
);
|
604 |
+
$info['wp-server']['fields']['httpd_software'] = array(
|
605 |
+
'label' => 'Web server',
|
606 |
+
'value' => (isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : 'Unable to determine what web server software is used'),
|
607 |
+
'debug' => (isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : 'unknown'),
|
608 |
+
);
|
609 |
+
$info['wp-server']['fields']['php_version'] = array(
|
610 |
+
'label' => 'PHP version',
|
611 |
+
'value' => $php_version,
|
612 |
+
'debug' => $php_version_debug,
|
613 |
+
);
|
614 |
+
$info['wp-server']['fields']['php_sapi'] = array(
|
615 |
+
'label' => 'PHP SAPI',
|
616 |
+
'value' => ('unknown' !== $php_sapi ? $php_sapi : 'Unable to determine PHP SAPI'),
|
617 |
+
'debug' => $php_sapi,
|
618 |
+
);
|
619 |
+
|
620 |
+
// Some servers disable `ini_set()` and `ini_get()`, we check this before trying to get configuration values.
|
621 |
+
if (!function_exists('ini_get')) {
|
622 |
+
$info['wp-server']['fields']['ini_get'] = array(
|
623 |
+
'label' => 'Server settings',
|
624 |
+
'value' => 'Unable to determine some settings, as the ini_get() function has been disabled.',
|
625 |
+
'debug' => 'ini_get() is disabled',
|
626 |
+
);
|
627 |
+
} else {
|
628 |
+
//phpcs:disable PHPCompatibility.IniDirectives.NewIniDirectives.max_input_varsFound -- Use for above php 5.4
|
629 |
+
$info['wp-server']['fields']['max_input_variables'] = array(
|
630 |
+
'label' => 'PHP max input variables',
|
631 |
+
'value' => ini_get('max_input_vars'),
|
632 |
+
);
|
633 |
+
//phpcs:enable
|
634 |
+
$info['wp-server']['fields']['time_limit'] = array(
|
635 |
+
'label' => 'PHP time limit',
|
636 |
+
'value' => ini_get('max_execution_time'),
|
637 |
+
);
|
638 |
+
$info['wp-server']['fields']['memory_limit'] = array(
|
639 |
+
'label' => 'PHP memory limit',
|
640 |
+
'value' => ini_get('memory_limit'),
|
641 |
+
);
|
642 |
+
$info['wp-server']['fields']['max_input_time'] = array(
|
643 |
+
'label' => 'Max input time',
|
644 |
+
'value' => ini_get('max_input_time'),
|
645 |
+
);
|
646 |
+
$info['wp-server']['fields']['upload_max_size'] = array(
|
647 |
+
'label' => 'Upload max filesize',
|
648 |
+
'value' => ini_get('upload_max_filesize'),
|
649 |
+
);
|
650 |
+
$info['wp-server']['fields']['php_post_max_size'] = array(
|
651 |
+
'label' => 'PHP post max size',
|
652 |
+
'value' => ini_get('post_max_size'),
|
653 |
+
);
|
654 |
+
}
|
655 |
+
|
656 |
+
if (function_exists('curl_version')) {
|
657 |
+
$curl = curl_version();
|
658 |
+
|
659 |
+
$info['wp-server']['fields']['curl_version'] = array(
|
660 |
+
'label' => 'cURL version',
|
661 |
+
'value' => sprintf('%s %s', $curl['version'], $curl['ssl_version']),
|
662 |
+
);
|
663 |
+
} else {
|
664 |
+
$info['wp-server']['fields']['curl_version'] = array(
|
665 |
+
'label' => 'cURL version',
|
666 |
+
'value' => $not_available,
|
667 |
+
'debug' => 'not available',
|
668 |
+
);
|
669 |
+
}
|
670 |
+
|
671 |
+
// SUHOSIN
|
672 |
+
$suhosin_loaded = (extension_loaded('suhosin') || (defined('SUHOSIN_PATCH') && constant('SUHOSIN_PATCH')));
|
673 |
+
|
674 |
+
$info['wp-server']['fields']['suhosin'] = array(
|
675 |
+
'label' => 'Is SUHOSIN installed?',
|
676 |
+
'value' => ($suhosin_loaded ? 'Yes' : 'No'),
|
677 |
+
'debug' => $suhosin_loaded,
|
678 |
+
);
|
679 |
+
|
680 |
+
// Imagick
|
681 |
+
$imagick_loaded = extension_loaded('imagick');
|
682 |
+
|
683 |
+
$info['wp-server']['fields']['imagick_availability'] = array(
|
684 |
+
'label' => 'Is the Imagick library available?',
|
685 |
+
'value' => ($imagick_loaded ? 'Yes' : 'No'),
|
686 |
+
'debug' => $imagick_loaded,
|
687 |
+
);
|
688 |
+
|
689 |
+
// Check if a .htaccess file exists.
|
690 |
+
if ($is_apache && is_file(ABSPATH . '.htaccess')) {
|
691 |
+
// If the file exists, grab the content of it.
|
692 |
+
$htaccess_content = file_get_contents(ABSPATH . '.htaccess');
|
693 |
+
|
694 |
+
// Filter away the core WordPress rules.
|
695 |
+
$filtered_htaccess_content = trim(preg_replace('/\# BEGIN WordPress[\s\S]+?# END WordPress/si', '', $htaccess_content));
|
696 |
+
$filtered_htaccess_content = !empty($filtered_htaccess_content);
|
697 |
+
|
698 |
+
$info['wp-server']['fields']['htaccess_extra_rules'] = array(
|
699 |
+
'label' => '.htaccess rules',
|
700 |
+
'value' => ($filtered_htaccess_content ? 'Custom rules have been added to your .htaccess file.' : 'Your .htaccess file contains only core WordPress features.'),
|
701 |
+
'debug' => $filtered_htaccess_content,
|
702 |
+
);
|
703 |
+
}
|
704 |
+
|
705 |
+
// Populate the database debug fields.
|
706 |
+
if (is_resource($wpdb->dbh)) {
|
707 |
+
// Old mysql extension.
|
708 |
+
$extension = 'mysql';
|
709 |
+
} elseif (is_object($wpdb->dbh)) {
|
710 |
+
// mysqli or PDO.
|
711 |
+
$extension = get_class($wpdb->dbh);
|
712 |
+
} else {
|
713 |
+
// Unknown sql extension.
|
714 |
+
$extension = null;
|
715 |
+
}
|
716 |
+
|
717 |
+
$server = $wpdb->db_version();
|
718 |
+
|
719 |
+
if (isset($wpdb->use_mysqli) && $wpdb->use_mysqli) {
|
720 |
+
$client_version = $wpdb->dbh->client_info;
|
721 |
+
} else {
|
722 |
+
// phpcs:disable PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved -- Use for above php 5.5
|
723 |
+
// phpcs:disable WordPress.DB.RestrictedFunctions.mysql_mysql_get_client_info -- Use for above php 5.5
|
724 |
+
if (preg_match('|[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}|', mysql_get_client_info(), $matches)) {
|
725 |
+
$client_version = $matches[0];
|
726 |
+
} else {
|
727 |
+
$client_version = null;
|
728 |
+
}
|
729 |
+
//phpcs:enable
|
730 |
+
//phpcs:enable
|
731 |
+
}
|
732 |
+
|
733 |
+
$info['wp-database']['fields']['extension'] = array(
|
734 |
+
'label' => 'Extension',
|
735 |
+
'value' => $extension,
|
736 |
+
);
|
737 |
+
|
738 |
+
$info['wp-database']['fields']['server_version'] = array(
|
739 |
+
'label' => 'Server version',
|
740 |
+
'value' => $server,
|
741 |
+
);
|
742 |
+
|
743 |
+
$info['wp-database']['fields']['client_version'] = array(
|
744 |
+
'label' => 'Client version',
|
745 |
+
'value' => $client_version,
|
746 |
+
);
|
747 |
+
|
748 |
+
$info['wp-database']['fields']['database_user'] = array(
|
749 |
+
'label' => 'Database user',
|
750 |
+
'value' => $wpdb->dbuser,
|
751 |
+
'private' => true,
|
752 |
+
);
|
753 |
+
|
754 |
+
$info['wp-database']['fields']['database_host'] = array(
|
755 |
+
'label' => 'Database host',
|
756 |
+
'value' => $wpdb->dbhost,
|
757 |
+
'private' => true,
|
758 |
+
);
|
759 |
+
|
760 |
+
$info['wp-database']['fields']['database_name'] = array(
|
761 |
+
'label' => 'Database name',
|
762 |
+
'value' => $wpdb->dbname,
|
763 |
+
'private' => true,
|
764 |
+
);
|
765 |
+
|
766 |
+
$info['wp-database']['fields']['database_prefix'] = array(
|
767 |
+
'label' => 'Database prefix',
|
768 |
+
'value' => $wpdb->prefix,
|
769 |
+
'private' => true,
|
770 |
+
);
|
771 |
+
|
772 |
+
// List must use plugins if there are any.
|
773 |
+
$mu_plugins = get_mu_plugins();
|
774 |
+
if (!empty($mu_plugins)) {
|
775 |
+
foreach ($mu_plugins as $plugin_path => $plugin) {
|
776 |
+
$plugin_version = $plugin['Version'];
|
777 |
+
$plugin_author = $plugin['Author'];
|
778 |
+
|
779 |
+
$plugin_version_string = 'No version or author information is available.';
|
780 |
+
$plugin_version_string_debug = 'author: (undefined), version: (undefined)';
|
781 |
+
|
782 |
+
if (!empty($plugin_version) && !empty($plugin_author)) {
|
783 |
+
// translators: 1: Plugin version number. 2: Plugin author name.
|
784 |
+
$plugin_version_string = sprintf('Version %1$s by %2$s', $plugin_version, $plugin_author);
|
785 |
+
$plugin_version_string_debug = sprintf('version: %s, author: %s', $plugin_version, $plugin_author);
|
786 |
+
} else {
|
787 |
+
if (!empty($plugin_author)) {
|
788 |
+
// translators: %s: Plugin author name.
|
789 |
+
$plugin_version_string = sprintf('By %s', $plugin_author);
|
790 |
+
$plugin_version_string_debug = sprintf('author: %s, version: (undefined)', $plugin_author);
|
791 |
+
}
|
792 |
+
|
793 |
+
if (!empty($plugin_version)) {
|
794 |
+
// translators: %s: Plugin version number.
|
795 |
+
$plugin_version_string = sprintf('Version %s', $plugin_version);
|
796 |
+
$plugin_version_string_debug = sprintf('author: (undefined), version: %s', $plugin_version);
|
797 |
+
}
|
798 |
+
}
|
799 |
+
|
800 |
+
$info['wp-mu-plugins']['fields'][sanitize_text_field($plugin['Name'])] = array(
|
801 |
+
'label' => $plugin['Name'],
|
802 |
+
'value' => $plugin_version_string,
|
803 |
+
'debug' => $plugin_version_string_debug,
|
804 |
+
);
|
805 |
+
}
|
806 |
+
}
|
807 |
+
|
808 |
+
// List all available plugins.
|
809 |
+
$plugins = get_plugins();
|
810 |
+
$plugin_updates = get_plugin_updates();
|
811 |
+
if (!empty($plugins)) {
|
812 |
+
foreach ($plugins as $plugin_path => $plugin) {
|
813 |
+
$plugin_part = (is_plugin_active($plugin_path)) ? 'wp-plugins-active' : 'wp-plugins-inactive';
|
814 |
+
|
815 |
+
$plugin_version = $plugin['Version'];
|
816 |
+
$plugin_author = $plugin['Author'];
|
817 |
+
|
818 |
+
$plugin_version_string = 'No version or author information is available.';
|
819 |
+
$plugin_version_string_debug = 'author: (undefined), version: (undefined)';
|
820 |
+
|
821 |
+
if (!empty($plugin_version) && !empty($plugin_author)) {
|
822 |
+
// translators: 1: Plugin version number. 2: Plugin author name.
|
823 |
+
$plugin_version_string = sprintf('Version %1$s by %2$s', $plugin_version, $plugin_author);
|
824 |
+
$plugin_version_string_debug = sprintf('version: %s, author: %s', $plugin_version, $plugin_author);
|
825 |
+
} else {
|
826 |
+
if (!empty($plugin_author)) {
|
827 |
+
// translators: %s: Plugin author name.
|
828 |
+
$plugin_version_string = sprintf('By %s', $plugin_author);
|
829 |
+
$plugin_version_string_debug = sprintf('author: %s, version: (undefined)', $plugin_author);
|
830 |
+
}
|
831 |
+
|
832 |
+
if (!empty($plugin_version)) {
|
833 |
+
// translators: %s: Plugin version number.
|
834 |
+
$plugin_version_string = sprintf('Version %s', $plugin_version);
|
835 |
+
$plugin_version_string_debug = sprintf('author: (undefined), version: %s', $plugin_version);
|
836 |
+
}
|
837 |
+
}
|
838 |
+
|
839 |
+
if (array_key_exists($plugin_path, $plugin_updates)) {
|
840 |
+
// translators: %s: Latest plugin version number.
|
841 |
+
$plugin_version_string .= ' ' . sprintf('(Latest version: %s)', $plugin_updates[$plugin_path]->update->new_version);
|
842 |
+
$plugin_version_string_debug .= sprintf(' (latest version: %s)', $plugin_updates[$plugin_path]->update->new_version);
|
843 |
+
}
|
844 |
+
|
845 |
+
$info[$plugin_part]['fields'][sanitize_text_field($plugin['Name'])] = array(
|
846 |
+
'label' => $plugin['Name'],
|
847 |
+
'value' => $plugin_version_string,
|
848 |
+
'debug' => $plugin_version_string_debug,
|
849 |
+
);
|
850 |
+
}
|
851 |
+
}
|
852 |
+
|
853 |
+
// Populate the section for the currently active theme.
|
854 |
+
global $_wp_theme_features;
|
855 |
+
$theme_features = array();
|
856 |
+
|
857 |
+
if (!empty($_wp_theme_features)) {
|
858 |
+
foreach ($_wp_theme_features as $feature => $options) {
|
859 |
+
$theme_features[] = $feature;
|
860 |
+
}
|
861 |
+
}
|
862 |
+
|
863 |
+
$active_theme = wp_get_theme();
|
864 |
+
$theme_updates = get_theme_updates();
|
865 |
+
|
866 |
+
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
867 |
+
$active_theme_version = $active_theme->Version;
|
868 |
+
$active_theme_version_debug = $active_theme_version;
|
869 |
+
|
870 |
+
if (array_key_exists($active_theme->stylesheet, $theme_updates)) {
|
871 |
+
$theme_update_new_version = $theme_updates[$active_theme->stylesheet]->update['new_version'];
|
872 |
+
|
873 |
+
// translators: %s: Latest theme version number.
|
874 |
+
$active_theme_version .= ' ' . sprintf('(Latest version: %s)', $theme_update_new_version);
|
875 |
+
$active_theme_version_debug .= sprintf(' (latest version: %s)', $theme_update_new_version);
|
876 |
+
}
|
877 |
+
|
878 |
+
$active_theme_author_uri = $active_theme->offsetGet('Author URI');
|
879 |
+
|
880 |
+
$info['wp-active-theme']['fields'] = array(
|
881 |
+
'name' => array(
|
882 |
+
'label' => 'Name',
|
883 |
+
'value' => sprintf(
|
884 |
+
// translators: 1: Parent theme name. 2: Parent theme slug.
|
885 |
+
'%1$s (%2$s)',
|
886 |
+
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
887 |
+
$active_theme->Name,
|
888 |
+
$active_theme->stylesheet
|
889 |
+
),
|
890 |
+
),
|
891 |
+
'version' => array(
|
892 |
+
'label' => 'Version',
|
893 |
+
'value' => $active_theme_version,
|
894 |
+
'debug' => $active_theme_version_debug,
|
895 |
+
),
|
896 |
+
'author' => array(
|
897 |
+
'label' => 'Author',
|
898 |
+
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
899 |
+
'value' => wp_kses($active_theme->Author, array()),
|
900 |
+
),
|
901 |
+
'author_website' => array(
|
902 |
+
'label' => 'Author website',
|
903 |
+
'value' => ($active_theme_author_uri ? $active_theme_author_uri : 'Undefined'),
|
904 |
+
'debug' => ($active_theme_author_uri ? $active_theme_author_uri : '(undefined)'),
|
905 |
+
),
|
906 |
+
'parent_theme' => array(
|
907 |
+
'label' => 'Parent theme',
|
908 |
+
'value' => ($active_theme->parent_theme ? $active_theme->parent_theme . ' (' . $active_theme->template . ')' : 'None'),
|
909 |
+
'debug' => ($active_theme->parent_theme ? $active_theme->parent_theme . ' (' . $active_theme->template . ')' : 'none'),
|
910 |
+
),
|
911 |
+
'theme_features' => array(
|
912 |
+
'label' => 'Theme features',
|
913 |
+
'value' => implode(', ', $theme_features),
|
914 |
+
),
|
915 |
+
'theme_path' => array(
|
916 |
+
'label' => 'Theme directory location',
|
917 |
+
'value' => get_stylesheet_directory(),
|
918 |
+
),
|
919 |
+
);
|
920 |
+
|
921 |
+
$parent_theme = $active_theme->parent();
|
922 |
+
|
923 |
+
if ($parent_theme) {
|
924 |
+
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
925 |
+
$parent_theme_version = $parent_theme->Version;
|
926 |
+
$parent_theme_version_debug = $parent_theme_version;
|
927 |
+
|
928 |
+
if (array_key_exists($parent_theme->stylesheet, $theme_updates)) {
|
929 |
+
$parent_theme_update_new_version = $theme_updates[$parent_theme->stylesheet]->update['new_version'];
|
930 |
+
|
931 |
+
// translators: %s: Latest theme version number.
|
932 |
+
$parent_theme_version .= ' ' . sprintf('(Latest version: %s)', $parent_theme_update_new_version);
|
933 |
+
$parent_theme_version_debug .= sprintf(' (latest version: %s)', $parent_theme_update_new_version);
|
934 |
+
}
|
935 |
+
|
936 |
+
$parent_theme_author_uri = $parent_theme->offsetGet('Author URI');
|
937 |
+
|
938 |
+
$info['wp-parent-theme']['fields'] = array(
|
939 |
+
'name' => array(
|
940 |
+
'label' => 'Name',
|
941 |
+
'value' => sprintf(
|
942 |
+
// translators: 1: Parent theme name. 2: Parent theme slug.
|
943 |
+
'%1$s (%2$s)',
|
944 |
+
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
945 |
+
$parent_theme->Name,
|
946 |
+
$parent_theme->stylesheet
|
947 |
+
),
|
948 |
+
),
|
949 |
+
'version' => array(
|
950 |
+
'label' => 'Version',
|
951 |
+
'value' => $parent_theme_version,
|
952 |
+
'debug' => $parent_theme_version_debug,
|
953 |
+
),
|
954 |
+
'author' => array(
|
955 |
+
'label' => 'Author',
|
956 |
+
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
957 |
+
'value' => wp_kses($parent_theme->Author, array()),
|
958 |
+
),
|
959 |
+
'author_website' => array(
|
960 |
+
'label' => 'Author website',
|
961 |
+
'value' => ($parent_theme_author_uri ? $parent_theme_author_uri : 'Undefined'),
|
962 |
+
'debug' => ($parent_theme_author_uri ? $parent_theme_author_uri : '(undefined)'),
|
963 |
+
),
|
964 |
+
'theme_path' => array(
|
965 |
+
'label' => 'Theme directory location',
|
966 |
+
'value' => get_template_directory(),
|
967 |
+
),
|
968 |
+
);
|
969 |
+
}
|
970 |
+
|
971 |
+
// Populate a list of all themes available in the install.
|
972 |
+
$all_themes = wp_get_themes();
|
973 |
+
|
974 |
+
if (!empty($all_themes)) {
|
975 |
+
foreach ($all_themes as $theme_slug => $theme) {
|
976 |
+
// Ignore the currently active theme from the list of all themes.
|
977 |
+
if ($active_theme->stylesheet === $theme_slug) {
|
978 |
+
continue;
|
979 |
+
}
|
980 |
+
|
981 |
+
// Ignore the currently active parent theme from the list of all themes.
|
982 |
+
if (!empty($parent_theme) && $parent_theme->stylesheet === $theme_slug) {
|
983 |
+
continue;
|
984 |
+
}
|
985 |
+
|
986 |
+
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
987 |
+
$theme_version = $theme->Version;
|
988 |
+
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
989 |
+
$theme_author = $theme->Author;
|
990 |
+
|
991 |
+
// Sanitize
|
992 |
+
$theme_author = wp_kses($theme_author, array());
|
993 |
+
|
994 |
+
$theme_version_string = 'No version or author information is available.';
|
995 |
+
$theme_version_string_debug = 'undefined';
|
996 |
+
|
997 |
+
if (!empty($theme_version) && !empty($theme_author)) {
|
998 |
+
// translators: 1: Theme version number. 2: Theme author name.
|
999 |
+
$theme_version_string = sprintf('Version %1$s by %2$s', $theme_version, $theme_author);
|
1000 |
+
$theme_version_string_debug = sprintf('version: %s, author: %s', $theme_version, $theme_author);
|
1001 |
+
} else {
|
1002 |
+
if (!empty($theme_author)) {
|
1003 |
+
// translators: %s: Theme author name.
|
1004 |
+
$theme_version_string = sprintf('By %s', $theme_author);
|
1005 |
+
$theme_version_string_debug = sprintf('author: %s, version: (undefined)', $theme_author);
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
if (!empty($theme_version)) {
|
1009 |
+
// translators: %s: Theme version number.
|
1010 |
+
$theme_version_string = sprintf('Version %s', $theme_version);
|
1011 |
+
$theme_version_string_debug = sprintf('author: (undefined), version: %s', $theme_version);
|
1012 |
+
}
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
if (array_key_exists($theme_slug, $theme_updates)) {
|
1016 |
+
// translators: %s: Latest theme version number.
|
1017 |
+
$theme_version_string .= ' ' . sprintf('(Latest version: %s)', $theme_updates[$theme_slug]->update['new_version']);
|
1018 |
+
$theme_version_string_debug .= sprintf(' (latest version: %s)', $theme_updates[$theme_slug]->update['new_version']);
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
1022 |
+
$info['wp-themes-inactive']['fields'][sanitize_text_field($theme->Name)] = array(
|
1023 |
+
'label' => sprintf(
|
1024 |
+
// translators: 1: Theme name. 2: Theme slug.
|
1025 |
+
'%1$s (%2$s)',
|
1026 |
+
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
1027 |
+
$theme->Name,
|
1028 |
+
$theme_slug
|
1029 |
+
),
|
1030 |
+
'value' => $theme_version_string,
|
1031 |
+
'debug' => $theme_version_string_debug,
|
1032 |
+
);
|
1033 |
+
}
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
// Add more filesystem checks
|
1037 |
+
if (defined('WPMU_PLUGIN_DIR') && is_dir(WPMU_PLUGIN_DIR)) {
|
1038 |
+
$is_writable_wpmu_plugin_dir = wp_is_writable(WPMU_PLUGIN_DIR);
|
1039 |
+
|
1040 |
+
$info['wp-filesystem']['fields']['mu-plugins'] = array(
|
1041 |
+
'label' => 'The must use plugins directory',
|
1042 |
+
'value' => ($is_writable_wpmu_plugin_dir ? 'Writable' : 'Not writable'),
|
1043 |
+
'debug' => ($is_writable_wpmu_plugin_dir ? 'writable' : 'not writable'),
|
1044 |
+
);
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
/**
|
1048 |
+
* Add or modify the debug information.
|
1049 |
+
*
|
1050 |
+
* Plugin or themes may wish to introduce their own debug information without creating additional admin pages
|
1051 |
+
* they can utilize this filter to introduce their own sections or add more data to existing sections.
|
1052 |
+
*
|
1053 |
+
* Array keys for sections added by core are all prefixed with `wp-`, plugins and themes should use their own slug as
|
1054 |
+
* a prefix, both for consistency as well as avoiding key collisions. Note that the array keys are used as labels
|
1055 |
+
* for the copied data.
|
1056 |
+
*
|
1057 |
+
* All strings are expected to be plain text except $description that can contain inline HTML tags (see below).
|
1058 |
+
*
|
1059 |
+
* @param array $info Information
|
1060 |
+
*/
|
1061 |
+
$info = apply_filters('debug_information', $info);
|
1062 |
+
|
1063 |
+
return $info;
|
1064 |
+
}
|
1065 |
+
|
1066 |
+
/**
|
1067 |
+
* Format the information gathered for debugging, in a manner suitable for copying to a forum or support ticket.
|
1068 |
+
*
|
1069 |
+
* @param array $info_array Information gathered from the `WP_Debug_Data::debugData` function.
|
1070 |
+
* @param string $type The data type to return, either 'info' or 'debug'.
|
1071 |
+
*
|
1072 |
+
* @return string The formatted data.
|
1073 |
+
*/
|
1074 |
+
public static function format($info_array, $type)
|
1075 |
+
{
|
1076 |
+
$return = "`\n";
|
1077 |
+
|
1078 |
+
if (!empty($info_array)) {
|
1079 |
+
foreach ($info_array as $section => $details) {
|
1080 |
+
// Skip this section if there are no fields, or the section has been declared as private.
|
1081 |
+
if (empty($details['fields']) || (isset($details['private']) && $details['private'])) {
|
1082 |
+
continue;
|
1083 |
+
}
|
1084 |
+
|
1085 |
+
$section_label = 'debug' === $type ? $section : $details['label'];
|
1086 |
+
|
1087 |
+
$return .= sprintf(
|
1088 |
+
"### %s%s ###\n\n",
|
1089 |
+
$section_label,
|
1090 |
+
(isset($details['show_count']) && $details['show_count'] ? sprintf(' (%d)', count($details['fields'])) : '')
|
1091 |
+
);
|
1092 |
+
|
1093 |
+
if (!empty($details['fields'])) {
|
1094 |
+
foreach ($details['fields'] as $field_name => $field) {
|
1095 |
+
if (isset($field['private']) && true === $field['private']) {
|
1096 |
+
continue;
|
1097 |
+
}
|
1098 |
+
|
1099 |
+
if ('debug' === $type && isset($field['debug'])) {
|
1100 |
+
$debug_data = $field['debug'];
|
1101 |
+
} else {
|
1102 |
+
$debug_data = $field['value'];
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
// Can be array, one level deep only.
|
1106 |
+
if (is_array($debug_data)) {
|
1107 |
+
$value = '';
|
1108 |
+
if (!empty($debug_data)) {
|
1109 |
+
foreach ($debug_data as $sub_field_name => $sub_field_value) {
|
1110 |
+
$value .= sprintf("\n\t%s: %s", $sub_field_name, $sub_field_value);
|
1111 |
+
}
|
1112 |
+
}
|
1113 |
+
} elseif (is_bool($debug_data)) {
|
1114 |
+
$value = $debug_data ? 'true' : 'false';
|
1115 |
+
} elseif (empty($debug_data) && '0' !== $debug_data) {
|
1116 |
+
$value = 'undefined';
|
1117 |
+
} else {
|
1118 |
+
$value = $debug_data;
|
1119 |
+
}
|
1120 |
+
|
1121 |
+
if ('debug' === $type) {
|
1122 |
+
$label = $field_name;
|
1123 |
+
} else {
|
1124 |
+
$label = $field['label'];
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
$return .= sprintf("%s: %s\n", $label, $value);
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
$return .= "\n";
|
1132 |
+
}
|
1133 |
+
}
|
1134 |
+
|
1135 |
+
$return .= '`';
|
1136 |
+
|
1137 |
+
return $return;
|
1138 |
+
}
|
1139 |
+
|
1140 |
+
/**
|
1141 |
+
* Fetch the total size of all the database tables for the active database user.
|
1142 |
+
*
|
1143 |
+
* @since 5.2.0
|
1144 |
+
*
|
1145 |
+
* @return integer The size of the database, in bytes.
|
1146 |
+
*/
|
1147 |
+
public static function getDatabaseSize()
|
1148 |
+
{
|
1149 |
+
global $wpdb;
|
1150 |
+
$size = 0;
|
1151 |
+
$rows = $wpdb->get_results('SHOW TABLE STATUS', ARRAY_A);
|
1152 |
+
|
1153 |
+
if ($wpdb->num_rows > 0) {
|
1154 |
+
if (!empty($rows)) {
|
1155 |
+
foreach ($rows as $row) {
|
1156 |
+
$size += $row['Data_length'] + $row['Index_length'];
|
1157 |
+
}
|
1158 |
+
}
|
1159 |
+
}
|
1160 |
+
|
1161 |
+
return (int)$size;
|
1162 |
+
}
|
1163 |
+
}
|
jufeedback/jufeedback.php
ADDED
@@ -0,0 +1,613 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Jufeedback main file
|
4 |
+
*
|
5 |
+
* @package Joomunited\WPMetaSEO\Jufeedback
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Joomunited\WPMetaSEO\Jufeedback;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class Jufeedback
|
12 |
+
*/
|
13 |
+
class Jufeedback
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* The main plugin php file
|
17 |
+
*
|
18 |
+
* @var string $main_plugin_file
|
19 |
+
*/
|
20 |
+
public static $main_plugin_file;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* The extension prefix
|
24 |
+
*
|
25 |
+
* @var string plugin_prefix
|
26 |
+
*/
|
27 |
+
public static $plugin_prefix;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* The extension slug
|
31 |
+
*
|
32 |
+
* @var string $plugin_slug
|
33 |
+
*/
|
34 |
+
public static $plugin_slug;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* The plugin name
|
38 |
+
*
|
39 |
+
* @var string $plugin_name
|
40 |
+
*/
|
41 |
+
public static $plugin_name;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* The plugin translation text
|
45 |
+
*
|
46 |
+
* @var string $text_domain
|
47 |
+
*/
|
48 |
+
public static $text_domain;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Init list feedback params
|
52 |
+
*
|
53 |
+
* @var array $list_comments
|
54 |
+
*/
|
55 |
+
public static $list_comments = array();
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Define mailto
|
59 |
+
*
|
60 |
+
* @var string $mailto
|
61 |
+
*/
|
62 |
+
public static $mailto = 'feedback@joomunited.com';
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Define technical information
|
66 |
+
*
|
67 |
+
* @var string $technical_data
|
68 |
+
*/
|
69 |
+
public static $technical_data = array();
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Initialize Jutranslation
|
73 |
+
*
|
74 |
+
* @param string $main_plugin_file Main plugin file
|
75 |
+
* @param string $plugin_prefix Extension prefix
|
76 |
+
* @param string $plugin_slug Extension slug
|
77 |
+
* @param string $plugin_name Extension name
|
78 |
+
* @param string $text_domain Language text domain
|
79 |
+
*
|
80 |
+
* @return void
|
81 |
+
*/
|
82 |
+
public static function init($main_plugin_file, $plugin_prefix, $plugin_slug, $plugin_name, $text_domain)
|
83 |
+
{
|
84 |
+
//Only need on admin side
|
85 |
+
if (!is_admin()) {
|
86 |
+
return;
|
87 |
+
}
|
88 |
+
|
89 |
+
self::$main_plugin_file = $main_plugin_file;
|
90 |
+
self::$plugin_prefix = $plugin_prefix;
|
91 |
+
self::$plugin_slug = $plugin_slug;
|
92 |
+
self::$plugin_name = $plugin_name;
|
93 |
+
self::$text_domain = $text_domain;
|
94 |
+
//phpcs:disable WordPress.WP.I18n.NonSingularStringLiteralDomain -- Already use text domain for extensions
|
95 |
+
self::$list_comments = array(
|
96 |
+
self::$plugin_prefix . '_feature_missing' => array(
|
97 |
+
'explain' => __('There\'s a feature missing', self::$text_domain),
|
98 |
+
'placeholder' => __('Let us know what\'s missing', self::$text_domain),
|
99 |
+
),
|
100 |
+
self::$plugin_prefix . '_not_working' => array(
|
101 |
+
'explain' => __('The plugin is not working great', self::$text_domain),
|
102 |
+
'placeholder' => __('Please let us know what\'s the problem', self::$text_domain),
|
103 |
+
),
|
104 |
+
self::$plugin_prefix . '_found_better_plugin' => array(
|
105 |
+
'explain' => __('I found a better plugin', self::$text_domain),
|
106 |
+
'placeholder' => __('Oh, which one is it?', self::$text_domain),
|
107 |
+
),
|
108 |
+
self::$plugin_prefix . '_something_else' => array(
|
109 |
+
'explain' => __('I was searching for something else', self::$text_domain),
|
110 |
+
'placeholder' => __('Can you let us know what\'s you\'re searching for?', self::$text_domain),
|
111 |
+
),
|
112 |
+
self::$plugin_prefix . '_other' => array(
|
113 |
+
'explain' => __('Other, We\'d like to hear your opinion :)', self::$text_domain),
|
114 |
+
'placeholder' => __('Write what\'s in your mind', self::$text_domain))
|
115 |
+
);
|
116 |
+
//phpcs:enable
|
117 |
+
|
118 |
+
// Check if the current screen
|
119 |
+
add_action('current_screen', array(__CLASS__, 'screenFeedback'));
|
120 |
+
// Check if the current user
|
121 |
+
add_action('admin_init', array(__CLASS__, 'jufeedbackCallAjax'));
|
122 |
+
|
123 |
+
// ADD REVIEW NOTICE FOR PLUGIN
|
124 |
+
//
|
125 |
+
//
|
126 |
+
register_activation_hook(self::$main_plugin_file, array(__CLASS__, 'jureviewActivation'));
|
127 |
+
register_deactivation_hook(self::$main_plugin_file, array(__CLASS__, 'jureviewDeactivation'));
|
128 |
+
|
129 |
+
$install_time = get_option(self::$plugin_prefix . '_jureview_installation_time');
|
130 |
+
if (!empty($install_time) && $install_time !== 'unnecessary' && ($install_time + (30 * 24 * 60 * 60) < time())) {
|
131 |
+
add_action('admin_notices', array(__CLASS__, 'jureviewNotice'));
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Ajax method
|
137 |
+
*
|
138 |
+
* @return void
|
139 |
+
*/
|
140 |
+
public static function jufeedbackCallAjax()
|
141 |
+
{
|
142 |
+
if (current_user_can('manage_options')) {
|
143 |
+
add_action('wp_ajax_ju_send_feedback_deactive_' . self::$plugin_slug, array(__CLASS__, 'sendFeedbackDeactive'));
|
144 |
+
add_action('wp_ajax_ju_disable_feedback_' . self::$plugin_slug, array(__CLASS__, 'disableFeedback'));
|
145 |
+
add_action('wp_ajax_jureview_ajax_hide_review_' . self::$plugin_slug, array(__CLASS__, 'ajaxHideReview'));
|
146 |
+
}
|
147 |
+
|
148 |
+
self::juUpdatePlugin();
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Trigger in update plugin
|
153 |
+
*
|
154 |
+
* @return void
|
155 |
+
*/
|
156 |
+
public static function juUpdatePlugin()
|
157 |
+
{
|
158 |
+
$ju_version_installed = get_option(self::$plugin_prefix . '_jufeedback_version', false);
|
159 |
+
|
160 |
+
if (!$ju_version_installed) {
|
161 |
+
update_option(self::$plugin_prefix . '_jureview_installation_time', time());
|
162 |
+
// Update current version
|
163 |
+
update_option(self::$plugin_prefix . '_jufeedback_version', '1.0.0');
|
164 |
+
|
165 |
+
return;
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Trigger in current_screen usage
|
171 |
+
*
|
172 |
+
* @param object $current_screen Current screen
|
173 |
+
*
|
174 |
+
* @return void
|
175 |
+
*/
|
176 |
+
public static function screenFeedback($current_screen)
|
177 |
+
{
|
178 |
+
// Return if it is not plugin screen
|
179 |
+
if (!in_array($current_screen->id, array('plugins', 'plugins-network'))) {
|
180 |
+
return;
|
181 |
+
}
|
182 |
+
|
183 |
+
// Check once deactive
|
184 |
+
$allow_feedback = get_option(self::$plugin_prefix . '_disallow_feedback', false);
|
185 |
+
if (!$allow_feedback) {
|
186 |
+
self::enqueueFeedbackScript();
|
187 |
+
|
188 |
+
// Load JuCheckDebugData class
|
189 |
+
if (!class_exists('JuCheckDebugData')) {
|
190 |
+
require_once(plugin_dir_path(self::$main_plugin_file) . 'jufeedback/ju-check-debug-data.php');
|
191 |
+
}
|
192 |
+
|
193 |
+
// Get server information
|
194 |
+
self::$technical_data = call_user_func('JuCheckDebugData::debugData');
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Enqueue feedback script in plugin screen
|
200 |
+
*
|
201 |
+
* @return void
|
202 |
+
*/
|
203 |
+
public static function enqueueFeedbackScript()
|
204 |
+
{
|
205 |
+
// Enqueue style
|
206 |
+
wp_enqueue_style(
|
207 |
+
'ju-feedback-style',
|
208 |
+
plugin_dir_url(self::$main_plugin_file) . 'jufeedback/assets/css/jufeedback.css'
|
209 |
+
);
|
210 |
+
|
211 |
+
// Enqueue script
|
212 |
+
wp_enqueue_script('jquery');
|
213 |
+
wp_enqueue_script('jquery-ui-dialog');
|
214 |
+
wp_enqueue_script(
|
215 |
+
'ju-feedback-tooltip',
|
216 |
+
plugin_dir_url(self::$main_plugin_file) . 'jufeedback/assets/js/tooltip.js'
|
217 |
+
);
|
218 |
+
wp_enqueue_script(
|
219 |
+
'ju-feedback-global',
|
220 |
+
plugin_dir_url(self::$main_plugin_file) . 'jufeedback/assets/js/global.js'
|
221 |
+
);
|
222 |
+
wp_enqueue_script(
|
223 |
+
'ju-feedback-velocity',
|
224 |
+
plugin_dir_url(self::$main_plugin_file) . 'jufeedback/assets/js/velocity.min.js'
|
225 |
+
);
|
226 |
+
wp_enqueue_script(
|
227 |
+
'ju-feedback',
|
228 |
+
plugin_dir_url(self::$main_plugin_file) . 'jufeedback/assets/js/jufeedback.min.js'
|
229 |
+
);
|
230 |
+
|
231 |
+
wp_localize_script('ju-feedback', 'ju_feedback', array(
|
232 |
+
'token' => wp_create_nonce('ju-feedback'),
|
233 |
+
'ajaxurl' => admin_url('admin-ajax.php')
|
234 |
+
));
|
235 |
+
|
236 |
+
add_action('admin_footer', array(__CLASS__, 'renderFeedbackModal'));
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Render feedback modal in plugin screen
|
241 |
+
*
|
242 |
+
* @return void
|
243 |
+
*/
|
244 |
+
public static function renderFeedbackModal()
|
245 |
+
{
|
246 |
+
$technical_data = self::getTechnicalData();
|
247 |
+
//phpcs:disable WordPress.WP.I18n.NonSingularStringLiteralDomain -- Already use text domain for extensions
|
248 |
+
?>
|
249 |
+
<!--Dialog-->
|
250 |
+
<div id="<?php echo esc_attr(self::$plugin_prefix) ?>_feedback_modal"
|
251 |
+
class="ju-feedback-dialog <?php echo esc_attr(self::$plugin_slug) ?>" style="display: none">
|
252 |
+
<div class="title"><?php esc_html_e('Very quick feedback', self::$text_domain) ?></div>
|
253 |
+
<div class="feedback-content">
|
254 |
+
<div class="content">
|
255 |
+
<div class="text-introduction">
|
256 |
+
<span><?php esc_html_e('Before leaving, would you have 30 seconds to give your anonymous opinion about why you\'re disabling the plugin?', self::$text_domain) ?></span>
|
257 |
+
</div>
|
258 |
+
<ul class="list-comments">
|
259 |
+
<?php foreach (self::$list_comments as $key => $comments) : ?>
|
260 |
+
<li>
|
261 |
+
<input id="<?php echo esc_html($key) ?>" type="checkbox"
|
262 |
+
name="<?php echo esc_html($key) ?>"
|
263 |
+
class="choose-reason reason-deactive" value="<?php echo esc_html($key) ?>"/>
|
264 |
+
<label for="<?php echo esc_html($key) ?>">
|
265 |
+
<?php echo esc_html($comments['explain']) ?>
|
266 |
+
</label>
|
267 |
+
<textarea id="comment-<?php echo esc_html($key) ?>"
|
268 |
+
placeholder="<?php echo esc_html($comments['placeholder']) ?>"
|
269 |
+
name="comment-<?php echo esc_html($key) ?>" class="feedback-text" rows="2"
|
270 |
+
value=""></textarea>
|
271 |
+
</li>
|
272 |
+
<?php endforeach; ?>
|
273 |
+
</ul>
|
274 |
+
<div class="technical-information">
|
275 |
+
<input id="<?php echo esc_attr(self::$plugin_prefix) ?>-allow-send-technical" type="checkbox"
|
276 |
+
checked="checked" name="allow_send_technical" class="" value=""/>
|
277 |
+
<label for="<?php echo esc_attr(self::$plugin_prefix) ?>-allow-send-technical">
|
278 |
+
<?php esc_html_e('Share anonymous technical informations', self::$text_domain) ?></label>
|
279 |
+
<i class="material-icons signaling tooltipped" data-position="top"
|
280 |
+
data-tooltip="<?php esc_html_e('We get 100% anonymously info for debug and statistics purpose only (theme name, server informations...), click the drop down icon to see what information is sent', self::$text_domain) ?>">chat</i>
|
281 |
+
<i class="material-icons more">arrow_drop_down</i>
|
282 |
+
<textarea name="technical" readonly="readonly" class="technical" rows="5"
|
283 |
+
data-info="<?php echo esc_html(($technical_data) ? json_encode($technical_data) : '') ?>"><?php
|
284 |
+
//phpcs:ignore PHPCompatibility.Constants.NewConstants.json_pretty_printFound -- We do not use for php <5.3
|
285 |
+
echo esc_html(($technical_data) ? json_encode($technical_data, JSON_PRETTY_PRINT) : '')
|
286 |
+
?></textarea>
|
287 |
+
</div>
|
288 |
+
</div>
|
289 |
+
<div class="feedback-result-notice"></div>
|
290 |
+
</div>
|
291 |
+
<div class="feedback-button">
|
292 |
+
<a href="#" class="btn button disable-only"><?php esc_html_e('Disable now', self::$text_domain) ?></a>
|
293 |
+
<a href="#"
|
294 |
+
class="btn button send-message"><?php esc_html_e('SEND & DISABLE, THANKS!', self::$text_domain) ?></a>
|
295 |
+
<img class="ju-loading"
|
296 |
+
src="<?php echo esc_html(plugin_dir_url(self::$main_plugin_file) . 'jufeedback/assets/loading.gif') ?>"/>
|
297 |
+
<div class="clear"></div>
|
298 |
+
</div>
|
299 |
+
</div>
|
300 |
+
<?php
|
301 |
+
//phpcs:enable
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Ajax send feedback to mail on deactive
|
306 |
+
*
|
307 |
+
* @return void
|
308 |
+
*/
|
309 |
+
public static function sendFeedbackDeactive()
|
310 |
+
{
|
311 |
+
check_ajax_referer('ju-feedback', 'ajax_nonce');
|
312 |
+
|
313 |
+
$temp_array = array();
|
314 |
+
$output = '';
|
315 |
+
|
316 |
+
if (isset($_POST['feedbackTechnical']) && !empty($_POST['feedbackTechnical'])) {
|
317 |
+
$temp_array = json_decode(stripslashes($_POST['feedbackTechnical']), true);
|
318 |
+
}
|
319 |
+
|
320 |
+
$email = sanitize_email(self::$mailto);
|
321 |
+
$wp_address = get_bloginfo('url');
|
322 |
+
$wp_name = get_bloginfo('name');
|
323 |
+
|
324 |
+
// First array with timestamp, reasons, other comment
|
325 |
+
$first_array = array('Timestamp' => gmdate('Y-m-d h:i:s', current_time('timestamp')));
|
326 |
+
|
327 |
+
// translators: %s: website url.
|
328 |
+
$email_subject = sprintf(self::$plugin_name . ' - Feedback from %s', $wp_address);
|
329 |
+
|
330 |
+
$email_body = sprintf(
|
331 |
+
'<i>%1$s</i> plugin feedback from %2$s (%3$s).<br><br>',
|
332 |
+
self::$plugin_name,
|
333 |
+
$wp_name,
|
334 |
+
$wp_address
|
335 |
+
);
|
336 |
+
|
337 |
+
if (isset($_POST['reasons']) && !empty($_POST['reasons'])) {
|
338 |
+
$reasons = json_decode(stripslashes($_POST['reasons']), true);
|
339 |
+
foreach ($reasons as $k => $v) {
|
340 |
+
$reasons[$k]['reason'] = self::$list_comments[$v['reason']]['explain'];
|
341 |
+
}
|
342 |
+
$first_array['Reasons'] = $reasons;
|
343 |
+
}
|
344 |
+
|
345 |
+
$temp_array = array_merge($first_array, $temp_array);
|
346 |
+
|
347 |
+
if (!empty($temp_array)) {
|
348 |
+
//phpcs:disable PHPCompatibility.Constants.NewConstants.json_pretty_printFound -- We do not use for php <5.3
|
349 |
+
$email_body .= sprintf(
|
350 |
+
// translators: %s: The custom message that may be included with the email.
|
351 |
+
'<b>Feedback Information</b> : <pre>%s</pre>',
|
352 |
+
json_encode($temp_array, JSON_PRETTY_PRINT)
|
353 |
+
);
|
354 |
+
//phpcs:enable
|
355 |
+
}
|
356 |
+
|
357 |
+
$headers = "MIME-Version: 1.0\r\n";
|
358 |
+
//Set the content-type to html
|
359 |
+
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
|
360 |
+
|
361 |
+
$sendmail = wp_mail($email, $email_subject, $email_body, $headers);
|
362 |
+
$status = false;
|
363 |
+
$output .= '<p>';
|
364 |
+
//phpcs:disable WordPress.WP.I18n.NonSingularStringLiteralDomain -- Already use text domain for extensions
|
365 |
+
if (!empty($sendmail)) {
|
366 |
+
$status = true;
|
367 |
+
$output .= __('Thanks for your feedback! We will acknowledge and make it better in the future.', self::$text_domain);
|
368 |
+
// Update status feedback
|
369 |
+
update_option(self::$plugin_prefix . '_disallow_feedback', true);
|
370 |
+
} else {
|
371 |
+
$output .= __('Oops! It seems there was a problem sending the e-mail. Please try again!', self::$text_domain);
|
372 |
+
}
|
373 |
+
//phpcs:enable
|
374 |
+
$output .= '</p>';
|
375 |
+
|
376 |
+
$response = array(
|
377 |
+
'send_status' => $status,
|
378 |
+
'message' => $output,
|
379 |
+
);
|
380 |
+
|
381 |
+
wp_send_json($response);
|
382 |
+
|
383 |
+
wp_die();
|
384 |
+
}
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Get technical data by json
|
388 |
+
*
|
389 |
+
* @return array|boolean
|
390 |
+
*/
|
391 |
+
public static function getTechnicalData()
|
392 |
+
{
|
393 |
+
$output = array();
|
394 |
+
$sub_output = array();
|
395 |
+
|
396 |
+
if (!empty(self::$technical_data)) {
|
397 |
+
foreach (self::$technical_data as $key => $data) {
|
398 |
+
if (!isset($data['fields']) || empty($data['fields'])) {
|
399 |
+
continue;
|
400 |
+
}
|
401 |
+
|
402 |
+
if ($key === 'wp-core') {
|
403 |
+
$output['Wordpress version'] = $data['fields']['version']['value'];
|
404 |
+
$output['Is https site'] = $data['fields']['https_status']['value'];
|
405 |
+
$output['Is multisite'] = $data['fields']['multisite']['value'];
|
406 |
+
}
|
407 |
+
|
408 |
+
if ($key === 'wp-active-theme') {
|
409 |
+
$output['Active theme']['Name'] = $data['fields']['name']['value'];
|
410 |
+
$output['Active theme']['Version'] = $data['fields']['version']['value'];
|
411 |
+
$output['Active theme']['Folder'] = self::setAnonymousPath($data['fields']['theme_path']['value']);
|
412 |
+
}
|
413 |
+
|
414 |
+
if ($key === 'wp-plugins-active') {
|
415 |
+
foreach ($data['fields'] as $data_name) {
|
416 |
+
$sub_output[] = array(
|
417 |
+
'Name' => $data_name['label'],
|
418 |
+
'Version' => $data_name['value']
|
419 |
+
);
|
420 |
+
}
|
421 |
+
$output['Active plugins'] = $sub_output;
|
422 |
+
unset($sub_output);
|
423 |
+
}
|
424 |
+
|
425 |
+
if ($key === 'wp-media') {
|
426 |
+
foreach ($data['fields'] as $data_name) {
|
427 |
+
$sub_output[$data_name['label']] = $data_name['value'];
|
428 |
+
}
|
429 |
+
$output['Media handling'] = $sub_output;
|
430 |
+
unset($sub_output);
|
431 |
+
}
|
432 |
+
|
433 |
+
if ($key === 'wp-server') {
|
434 |
+
foreach ($data['fields'] as $data_name) {
|
435 |
+
$sub_output[$data_name['label']] = $data_name['value'];
|
436 |
+
}
|
437 |
+
$output['Server'] = $sub_output;
|
438 |
+
unset($sub_output);
|
439 |
+
}
|
440 |
+
|
441 |
+
if ($key === 'wp-database') {
|
442 |
+
$output['Database']['Extension'] = $data['fields']['extension']['value'];
|
443 |
+
$output['Database']['Version'] = $data['fields']['server_version']['value'];
|
444 |
+
$output['Database']['Client'] = $data['fields']['client_version']['value'];
|
445 |
+
}
|
446 |
+
|
447 |
+
if ($key === 'wp-constants') {
|
448 |
+
foreach ($data['fields'] as $data_name) {
|
449 |
+
$data_name['value'] = self::setAnonymousPath($data_name['value']);
|
450 |
+
$sub_output[$data_name['label']] = $data_name['value'];
|
451 |
+
}
|
452 |
+
$output['Wordpress constants'] = $sub_output;
|
453 |
+
unset($sub_output);
|
454 |
+
}
|
455 |
+
|
456 |
+
if ($key === 'wp-filesystem') {
|
457 |
+
foreach ($data['fields'] as $data_name) {
|
458 |
+
$sub_output[$data_name['label']] = $data_name['value'];
|
459 |
+
}
|
460 |
+
if (file_exists(ABSPATH . 'wp-config.php') && is_writable(ABSPATH . 'wp-config.php')) {
|
461 |
+
/**
|
462 |
+
* The config file resides in ABSPATH
|
463 |
+
*/
|
464 |
+
$config_is_writeable = true;
|
465 |
+
} elseif (file_exists(dirname(ABSPATH) . '/wp-config.php') && is_writable(dirname(ABSPATH) . '/wp-config.php')) {
|
466 |
+
/**
|
467 |
+
* The config file resides one level above ABSPATH but is not part of another installation
|
468 |
+
*/
|
469 |
+
$config_is_writeable = true;
|
470 |
+
} else {
|
471 |
+
// A config file doesn't exist or isn't writeable
|
472 |
+
$config_is_writeable = false;
|
473 |
+
}
|
474 |
+
//phpcs:disable WordPress.WP.I18n.NonSingularStringLiteralDomain -- Already use text domain for extensions
|
475 |
+
if ($config_is_writeable) {
|
476 |
+
$sub_output['WordPress configuration file'] = __('Writable', self::$text_domain);
|
477 |
+
} else {
|
478 |
+
$sub_output['WordPress configuration file'] = __('Not writable', self::$text_domain);
|
479 |
+
}
|
480 |
+
//phpcs:enable
|
481 |
+
$output['Filesystem permissions'] = $sub_output;
|
482 |
+
unset($sub_output);
|
483 |
+
}
|
484 |
+
}
|
485 |
+
}
|
486 |
+
|
487 |
+
$extension_settings = self::getSettingsOfPlugin();
|
488 |
+
if (!empty($extension_settings)) {
|
489 |
+
$output['Extension Configuration'] = $extension_settings;
|
490 |
+
}
|
491 |
+
|
492 |
+
if (empty($output)) {
|
493 |
+
return false;
|
494 |
+
}
|
495 |
+
|
496 |
+
return $output;
|
497 |
+
}
|
498 |
+
|
499 |
+
/**
|
500 |
+
* Get settings of plugin to display information
|
501 |
+
*
|
502 |
+
* @return array
|
503 |
+
*/
|
504 |
+
public static function getSettingsOfPlugin()
|
505 |
+
{
|
506 |
+
$configuration = array(
|
507 |
+
'general-settings' => get_option('_metaseo_settings'),
|
508 |
+
);
|
509 |
+
|
510 |
+
return $configuration;
|
511 |
+
}
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Remove the base path
|
515 |
+
*
|
516 |
+
* @param string $base_path Base path
|
517 |
+
*
|
518 |
+
* @return string
|
519 |
+
*/
|
520 |
+
public static function setAnonymousPath($base_path)
|
521 |
+
{
|
522 |
+
if (!empty($base_path) && is_dir($base_path)) {
|
523 |
+
$base_path = str_replace(get_home_path(), '/ANONYMOUS_BASE_PATH/', $base_path);
|
524 |
+
}
|
525 |
+
return $base_path;
|
526 |
+
}
|
527 |
+
|
528 |
+
/**
|
529 |
+
* Disable only in extension feedback
|
530 |
+
*
|
531 |
+
* @return void
|
532 |
+
*/
|
533 |
+
public static function disableFeedback()
|
534 |
+
{
|
535 |
+
check_ajax_referer('ju-feedback', 'ajax_nonce');
|
536 |
+
|
537 |
+
update_option(self::$plugin_prefix . '_disallow_feedback', true);
|
538 |
+
|
539 |
+
wp_send_json(array('status' => true));
|
540 |
+
|
541 |
+
wp_die();
|
542 |
+
}
|
543 |
+
|
544 |
+
/**
|
545 |
+
* Hide review notice
|
546 |
+
*
|
547 |
+
* @return void
|
548 |
+
*/
|
549 |
+
public static function ajaxHideReview()
|
550 |
+
{
|
551 |
+
check_ajax_referer('ju-review', 'ajaxnonce');
|
552 |
+
update_option(self::$plugin_prefix . '_jureview_installation_time', 'unnecessary');
|
553 |
+
wp_die();
|
554 |
+
}
|
555 |
+
|
556 |
+
/**
|
557 |
+
* Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook()
|
558 |
+
*
|
559 |
+
* @static
|
560 |
+
* @return void
|
561 |
+
*/
|
562 |
+
public static function jureviewActivation()
|
563 |
+
{
|
564 |
+
$install_time = get_option(self::$plugin_prefix . '_jureview_installation_time');
|
565 |
+
|
566 |
+
if (empty($install_time)) {
|
567 |
+
update_option(self::$plugin_prefix . '_jureview_installation_time', time());
|
568 |
+
}
|
569 |
+
}
|
570 |
+
|
571 |
+
/**
|
572 |
+
* Removes all connection options
|
573 |
+
*
|
574 |
+
* @static
|
575 |
+
* @return void
|
576 |
+
*/
|
577 |
+
public static function jureviewDeactivation()
|
578 |
+
{
|
579 |
+
$install_time = get_option(self::$plugin_prefix . '_jureview_installation_time');
|
580 |
+
if (!empty($install_time) && $install_time !== 'unnecessary' && ($install_time + (7 * 24 * 60 * 60) > time())) {
|
581 |
+
delete_option(self::$plugin_prefix . '_jureview_installation_time');
|
582 |
+
}
|
583 |
+
}
|
584 |
+
|
585 |
+
/**
|
586 |
+
* Show a message asking to make a review on the PD after a week after the installation
|
587 |
+
*
|
588 |
+
* @return void
|
589 |
+
*/
|
590 |
+
public static function jureviewNotice()
|
591 |
+
{
|
592 |
+
wp_enqueue_script(
|
593 |
+
'ju-review',
|
594 |
+
plugin_dir_url(self::$main_plugin_file) . 'jufeedback/assets/js/jureview.min.js'
|
595 |
+
);
|
596 |
+
wp_localize_script('ju-review', 'ju_review', array(
|
597 |
+
'token' => wp_create_nonce('ju-review'),
|
598 |
+
'ajaxurl' => admin_url('admin-ajax.php')
|
599 |
+
));
|
600 |
+
//phpcs:disable WordPress.WP.I18n.NonSingularStringLiteralDomain -- Already use text domain for extensions
|
601 |
+
echo '<div id="' . esc_attr(self::$plugin_prefix) . '-review-notice" class="updated jureview-notice" data-slug="' . esc_attr(self::$plugin_slug) . '">
|
602 |
+
<p>' . sprintf(
|
603 |
+
esc_html__('Thanks for using %s, it’s been more than a month now! Would you consider leaving a review on the plugin directory? It helps us make the plugin & support better :)', self::$text_domain),
|
604 |
+
esc_html(self::$plugin_name)
|
605 |
+
) . '</p>
|
606 |
+
<p class="submit">
|
607 |
+
<a href="' . esc_html('https://wordpress.org/support/plugin/' . self::$plugin_slug . '/reviews/?filter=5#new-post') . '" target="_blank" class="button-primary jureview-already-review">' . esc_html__('Sure I’d love to', self::$text_domain) . '</a>
|
608 |
+
<button class="button-secondary jureview-hide-review">' . esc_html__('No hide notification', self::$text_domain) . '</button>
|
609 |
+
</p>
|
610 |
+
</div>';
|
611 |
+
//phpcs:enable
|
612 |
+
}
|
613 |
+
}
|
languages/wp-meta-seo-en_US.mo
CHANGED
Binary file
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: JoomUnited
|
3 |
Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo, redirect, redirection, 301, broken link
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 5.2.
|
6 |
-
Stable tag: 4.0.
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -258,6 +258,11 @@ Yes WP Meta SEO is compatible with Gutenberg editor since 3.7 version.
|
|
258 |
|
259 |
== Changelog ==
|
260 |
|
|
|
|
|
|
|
|
|
|
|
261 |
= 4.0.9 =
|
262 |
* Fix : JuTranslation duplicate slash in language url
|
263 |
|
2 |
Contributors: JoomUnited
|
3 |
Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo, redirect, redirection, 301, broken link
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 5.2.3
|
6 |
+
Stable tag: 4.0.10
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
258 |
|
259 |
== Changelog ==
|
260 |
|
261 |
+
= 4.0.10 =
|
262 |
+
* Fix : Blank page when edit post tag & attribute
|
263 |
+
* Fix : Snippet for homepage is not properly checked
|
264 |
+
* Add : Opt In feedback on plugin first disabling & review message
|
265 |
+
|
266 |
= 4.0.9 =
|
267 |
* Fix : JuTranslation duplicate slash in language url
|
268 |
|
wp-meta-seo.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: WP Meta SEO
|
5 |
* Plugin URI: http://www.joomunited.com/wordpress-products/wp-meta-seo
|
6 |
* Description: WP Meta SEO is a plugin for WordPress to fill meta for content, images and main SEO info in a single view.
|
7 |
-
* Version: 4.0.
|
8 |
* Text Domain: wp-meta-seo
|
9 |
* Domain Path: /languages
|
10 |
* Author: JoomUnited
|
@@ -65,6 +65,17 @@ call_user_func(
|
|
65 |
'languages' . DIRECTORY_SEPARATOR . 'wp-meta-seo-en_US.mo'
|
66 |
);
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
if (!class_exists('\Joomunited\WPMS\JUCheckRequirements')) {
|
69 |
require_once(trailingslashit(dirname(__FILE__)) . 'requirements.php');
|
70 |
}
|
@@ -121,7 +132,7 @@ if (!defined('WPMSEO_VERSION')) {
|
|
121 |
/**
|
122 |
* Plugin version
|
123 |
*/
|
124 |
-
define('WPMSEO_VERSION', '4.0.
|
125 |
}
|
126 |
|
127 |
if (!defined('WPMS_CLIENTID')) {
|
@@ -556,7 +567,7 @@ if (is_admin()) {
|
|
556 |
|
557 |
// is front page
|
558 |
if (is_front_page() && 'page' === get_option('show_on_front') && is_page(get_option('page_on_front'))) {
|
559 |
-
$metas = $opengraph->getFrontPageMeta($settings);
|
560 |
$meta_title_esc = $metas['title'];
|
561 |
$meta_twtitle = $metas['title'];
|
562 |
$meta_fbtitle = $metas['title'];
|
@@ -697,7 +708,7 @@ if (is_admin()) {
|
|
697 |
|
698 |
// is front page
|
699 |
if (is_front_page() && 'page' === get_option('show_on_front') && is_page(get_option('page_on_front'))) {
|
700 |
-
$metas = $opengraph->getFrontPageMeta($settings);
|
701 |
$meta_title = $metas['title'];
|
702 |
}
|
703 |
|
4 |
* Plugin Name: WP Meta SEO
|
5 |
* Plugin URI: http://www.joomunited.com/wordpress-products/wp-meta-seo
|
6 |
* Description: WP Meta SEO is a plugin for WordPress to fill meta for content, images and main SEO info in a single view.
|
7 |
+
* Version: 4.0.10
|
8 |
* Text Domain: wp-meta-seo
|
9 |
* Domain Path: /languages
|
10 |
* Author: JoomUnited
|
65 |
'languages' . DIRECTORY_SEPARATOR . 'wp-meta-seo-en_US.mo'
|
66 |
);
|
67 |
|
68 |
+
// Include jufeedback helpers
|
69 |
+
require_once('jufeedback'. DIRECTORY_SEPARATOR . 'jufeedback.php');
|
70 |
+
call_user_func(
|
71 |
+
'\Joomunited\WPMetaSEO\Jufeedback\Jufeedback::init',
|
72 |
+
__FILE__,
|
73 |
+
'wpms',
|
74 |
+
'wp-meta-seo',
|
75 |
+
'WP Meta Seo',
|
76 |
+
'wp-meta-seo'
|
77 |
+
);
|
78 |
+
|
79 |
if (!class_exists('\Joomunited\WPMS\JUCheckRequirements')) {
|
80 |
require_once(trailingslashit(dirname(__FILE__)) . 'requirements.php');
|
81 |
}
|
132 |
/**
|
133 |
* Plugin version
|
134 |
*/
|
135 |
+
define('WPMSEO_VERSION', '4.0.10');
|
136 |
}
|
137 |
|
138 |
if (!defined('WPMS_CLIENTID')) {
|
567 |
|
568 |
// is front page
|
569 |
if (is_front_page() && 'page' === get_option('show_on_front') && is_page(get_option('page_on_front'))) {
|
570 |
+
$metas = $opengraph->getFrontPageMeta($settings, $id);
|
571 |
$meta_title_esc = $metas['title'];
|
572 |
$meta_twtitle = $metas['title'];
|
573 |
$meta_fbtitle = $metas['title'];
|
708 |
|
709 |
// is front page
|
710 |
if (is_front_page() && 'page' === get_option('show_on_front') && is_page(get_option('page_on_front'))) {
|
711 |
+
$metas = $opengraph->getFrontPageMeta($settings, $id);
|
712 |
$meta_title = $metas['title'];
|
713 |
}
|
714 |
|