Version Description
(2022-12-08) = - Added new tutorial videos to the settings pages that explain and show what each option does. - Added quick links to the admin about page to re-run the walk-through, view tutorial videos and suggest a feature. - Added new parameters to the Display FAQs block and the ultimate-faqs shortcode that let you enable/disable FAQ accordion and category accordion. - Updated dropdown block parameters to have a default value. - Accessibility updates (e.g. for the Expand button and the FAQ search label). - Tested with PHP 8.1. - Updated the export class for PHP 8 compatibility.
Download this release
Release Info
Developer | Rustaurius |
Plugin | Ultimate FAQ |
Version | 2.2.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.18 to 2.2.0
- assets/css/ewd-ufaq-admin.css +210 -3
- assets/css/plugin-deactivation.css +10 -0
- assets/img/ewd_new_logo_purple2.png +0 -0
- assets/js/ewd-ufaq-admin.js +36 -1
- assets/js/ewd-ufaq-blocks.js +15 -1
- ewd-ufaq-templates/faqs-expand-collapse-all.php +2 -2
- ewd-ufaq-templates/faqs-search.php +2 -1
- includes/AboutUs.class.php +284 -0
- includes/Blocks.class.php +6 -0
- includes/Dashboard.class.php +2 -2
- includes/Settings.class.php +31 -25
- includes/template-functions.php +2 -0
- lib/simple-admin-pages/classes/AdminPage.Menu.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPage.Submenu.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPage.Themes.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPage.class.php +41 -54
- lib/simple-admin-pages/classes/AdminPageSection.class.php +3 -3
- lib/simple-admin-pages/classes/AdminPageSetting.Address.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Checkbox.class.php +3 -1
- lib/simple-admin-pages/classes/AdminPageSetting.ColorPicker.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Count.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Editor.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.FileUpload.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.HTML.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Image.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.InfiniteTable.class.php +16 -3
- lib/simple-admin-pages/classes/AdminPageSetting.McApiKey.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.McListMerge.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Number.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.OpeningHours.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Ordering.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Password.class.php +38 -0
- lib/simple-admin-pages/classes/AdminPageSetting.Radio.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php +152 -46
- lib/simple-admin-pages/classes/AdminPageSetting.Select.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.SelectMenu.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.SelectPost.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.SelectTaxonomy.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Text.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Textarea.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Time.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Toggle.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.WarningTip.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.class.php +8 -3
- lib/simple-admin-pages/classes/Library.class.php +12 -4
- lib/simple-admin-pages/css/admin-settings.css +14 -0
- lib/simple-admin-pages/css/admin.css +24 -9
- lib/simple-admin-pages/js/admin-settings.js +18 -1
- lib/simple-admin-pages/js/scheduler.js +54 -5
- readme.txt +10 -1
- ultimate-faqs.php +10 -4
- views/View.FAQs.class.php +6 -3
assets/css/ewd-ufaq-admin.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
.ewd-ufaq-clear {
|
2 |
-
clear:both;
|
3 |
}
|
4 |
|
5 |
.ewd-ufaq-item {
|
@@ -277,6 +277,11 @@ body.post-type-ufaq .ewd-ufaq-admin-header-menu {
|
|
277 |
padding: 12px 32px;
|
278 |
}
|
279 |
}
|
|
|
|
|
|
|
|
|
|
|
280 |
@media screen and (max-width: 1150px) {
|
281 |
.ewd-ufaq-admin-header-menu .nav-tab {
|
282 |
padding: 12px 18px;
|
@@ -829,7 +834,7 @@ body.post-type-ufaq .ewd-ufaq-admin-header-menu {
|
|
829 |
margin: 32px 20px 32px 174px;
|
830 |
}
|
831 |
}
|
832 |
-
@media screen and (max-width:
|
833 |
#ewd-ufaq-dashboard-content-area {
|
834 |
width: calc(100% - 40px);
|
835 |
margin: 16px 20px 32px;
|
@@ -1171,4 +1176,206 @@ SETTINGS PREVIEW SCREENS
|
|
1171 |
margin-right: 0;
|
1172 |
margin-top: 12px;
|
1173 |
}
|
1174 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.ewd-ufaq-clear {
|
2 |
+
clear: both;
|
3 |
}
|
4 |
|
5 |
.ewd-ufaq-item {
|
277 |
padding: 12px 32px;
|
278 |
}
|
279 |
}
|
280 |
+
@media screen and (max-width: 1295px) {
|
281 |
+
.ewd-ufaq-admin-header-menu .nav-tab {
|
282 |
+
padding: 12px 24px;
|
283 |
+
}
|
284 |
+
}
|
285 |
@media screen and (max-width: 1150px) {
|
286 |
.ewd-ufaq-admin-header-menu .nav-tab {
|
287 |
padding: 12px 18px;
|
834 |
margin: 32px 20px 32px 174px;
|
835 |
}
|
836 |
}
|
837 |
+
@media screen and (max-width: 1295px) {
|
838 |
#ewd-ufaq-dashboard-content-area {
|
839 |
width: calc(100% - 40px);
|
840 |
margin: 16px 20px 32px;
|
1176 |
margin-right: 0;
|
1177 |
margin-top: 12px;
|
1178 |
}
|
1179 |
+
}
|
1180 |
+
|
1181 |
+
|
1182 |
+
/*
|
1183 |
+
==============================================
|
1184 |
+
About Us page
|
1185 |
+
==============================================
|
1186 |
+
*/
|
1187 |
+
|
1188 |
+
.ufaq_page_ewd-ufaq-about-us #wpcontent {
|
1189 |
+
background: #fff;
|
1190 |
+
}
|
1191 |
+
|
1192 |
+
.ewd-ufaq-about-us-logo {
|
1193 |
+
display: flex;
|
1194 |
+
width: 100%;
|
1195 |
+
padding: 24px 0 0 32px;
|
1196 |
+
}
|
1197 |
+
.ewd-ufaq-about-us-logo img {
|
1198 |
+
width: 300px;
|
1199 |
+
height: auto;
|
1200 |
+
}
|
1201 |
+
|
1202 |
+
#ewd-ufaq-about-us-tabs-menu,
|
1203 |
+
#ewd-ufaq-about-us-tabs-menu *,
|
1204 |
+
.ewd-ufaq-about-us-tab,
|
1205 |
+
.ewd-ufaq-about-us-tab * {
|
1206 |
+
box-sizing: border-box;
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
.ewd-ufaq-about-us-tabs {
|
1210 |
+
display: flex;
|
1211 |
+
flex-direction: column;
|
1212 |
+
width: calc(100% - 20px);
|
1213 |
+
border: 1px solid #ddd;
|
1214 |
+
border-radius: 14px;
|
1215 |
+
overflow: hidden;
|
1216 |
+
margin-top: 48px;
|
1217 |
+
}
|
1218 |
+
|
1219 |
+
#ewd-ufaq-about-us-tabs-menu {
|
1220 |
+
display: flex;
|
1221 |
+
justify-content: space-between;
|
1222 |
+
flex-wrap: nowrap;
|
1223 |
+
width: 100%;
|
1224 |
+
padding: 0;
|
1225 |
+
margin: 0;
|
1226 |
+
}
|
1227 |
+
.ewd-ufaq-about-us-tab-menu-item {
|
1228 |
+
width: 25%;
|
1229 |
+
background: #f3f3f3;
|
1230 |
+
color: #000;
|
1231 |
+
border-left: 1px solid #ddd;
|
1232 |
+
border-bottom: 1px solid #ddd;
|
1233 |
+
padding: 16px 32px;
|
1234 |
+
margin: 0;
|
1235 |
+
text-align: left;
|
1236 |
+
font-size: 14px;
|
1237 |
+
cursor: pointer;
|
1238 |
+
transition: background .35s;
|
1239 |
+
}
|
1240 |
+
.ewd-ufaq-about-us-tab-menu-item:hover {
|
1241 |
+
background: #fff;
|
1242 |
+
color: #000;
|
1243 |
+
}
|
1244 |
+
.ewd-ufaq-about-us-tab-menu-item.ewd-ufaq-tab-selected {
|
1245 |
+
background: #fff;
|
1246 |
+
color: #000;
|
1247 |
+
border-bottom: none;
|
1248 |
+
}
|
1249 |
+
.ewd-ufaq-about-us-tab-menu-item:first-of-type {
|
1250 |
+
border-left: none;
|
1251 |
+
}
|
1252 |
+
|
1253 |
+
.ewd-ufaq-about-us-tab {
|
1254 |
+
display: flex;
|
1255 |
+
flex-direction: column;
|
1256 |
+
align-items: flex-start;
|
1257 |
+
padding: 16px 32px;
|
1258 |
+
width: 100%;
|
1259 |
+
}
|
1260 |
+
.ewd-ufaq-about-us-tab p {
|
1261 |
+
color: #555;
|
1262 |
+
}
|
1263 |
+
.ewd-ufaq-about-us-feature-suggestion input,
|
1264 |
+
.ewd-ufaq-about-us-feature-suggestion textarea {
|
1265 |
+
width: 100%;
|
1266 |
+
max-width: 400px;
|
1267 |
+
margin: 12px 0;
|
1268 |
+
border: 1px solid #ddd;
|
1269 |
+
border-radius: 10px;
|
1270 |
+
padding: 12px 16px;
|
1271 |
+
color: #000;
|
1272 |
+
font-size: 13px;
|
1273 |
+
font-weight: normal;
|
1274 |
+
}
|
1275 |
+
.ewd-ufaq-about-us-feature-suggestion textarea {
|
1276 |
+
min-height: 160px;
|
1277 |
+
}
|
1278 |
+
|
1279 |
+
.ewd-ufaq-about-us-tab-button {
|
1280 |
+
display: flex;
|
1281 |
+
margin-top: 12px;
|
1282 |
+
padding: 12px 16px;
|
1283 |
+
font-size: 13px;
|
1284 |
+
font-weight: bold;
|
1285 |
+
text-decoration: none;
|
1286 |
+
border-radius: 10px;
|
1287 |
+
cursor: pointer;
|
1288 |
+
transition: background .35s;
|
1289 |
+
}
|
1290 |
+
.ewd-ufaq-about-us-tab-button-purchase {
|
1291 |
+
background: #6026B4;
|
1292 |
+
color: #fff;
|
1293 |
+
margin-top: 24px;
|
1294 |
+
}
|
1295 |
+
.ewd-ufaq-about-us-tab-button-purchase:hover {
|
1296 |
+
background: #7a40cb;
|
1297 |
+
color: #fff;
|
1298 |
+
}
|
1299 |
+
.ewd-ufaq-about-us-tab-button-walkthrough {
|
1300 |
+
background: #6026B4;
|
1301 |
+
color: #fff;
|
1302 |
+
margin-bottom: 24px;
|
1303 |
+
}
|
1304 |
+
.ewd-ufaq-about-us-tab-button-walkthrough:hover {
|
1305 |
+
background: #7a40cb;
|
1306 |
+
color: #fff;
|
1307 |
+
}
|
1308 |
+
.ewd-ufaq-about-us-tab-button-youtube {
|
1309 |
+
background: #f00;
|
1310 |
+
color: #fff;
|
1311 |
+
}
|
1312 |
+
.ewd-ufaq-about-us-tab-button-youtube:hover {
|
1313 |
+
background: #fe4c4c;
|
1314 |
+
color: #fff;
|
1315 |
+
}
|
1316 |
+
.ewd-ufaq-about-us-send-feature-suggestion {
|
1317 |
+
background: #6026B4;
|
1318 |
+
color: #fff;
|
1319 |
+
}
|
1320 |
+
.ewd-ufaq-about-us-send-feature-suggestion:hover {
|
1321 |
+
background: #7a40cb;
|
1322 |
+
color: #fff;
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
.ewd-ufaq-about-us-premium-table {
|
1326 |
+
display: flex;
|
1327 |
+
flex-direction: column;
|
1328 |
+
width: 100%;
|
1329 |
+
margin-top: 24px;
|
1330 |
+
border: 1px solid #ddd;
|
1331 |
+
border-bottom-left-radius: 10px;
|
1332 |
+
border-bottom-right-radius: 10px;
|
1333 |
+
overflow: hidden;
|
1334 |
+
}
|
1335 |
+
.ewd-ufaq-about-us-premium-table-head,
|
1336 |
+
.ewd-ufaq-about-us-premium-table-body {
|
1337 |
+
display: flex;
|
1338 |
+
justify-content: space-between;
|
1339 |
+
}
|
1340 |
+
.ewd-ufaq-about-us-premium-table-cell {
|
1341 |
+
display: flex;
|
1342 |
+
align-items: center;
|
1343 |
+
width: calc(100% / 3);
|
1344 |
+
border-left: 1px solid #ddd;
|
1345 |
+
border-top: 1px solid #ddd;
|
1346 |
+
padding: 8px 16px;
|
1347 |
+
}
|
1348 |
+
.ewd-ufaq-about-us-premium-table-cell:first-of-type {
|
1349 |
+
border-left: none;
|
1350 |
+
}
|
1351 |
+
.ewd-ufaq-about-us-premium-table-cell:last-of-type {
|
1352 |
+
background: #f8f1ff;
|
1353 |
+
}
|
1354 |
+
|
1355 |
+
.ewd-ufaq-about-us-premium-table-head .ewd-ufaq-about-us-premium-table-cell {
|
1356 |
+
font-weight: bold;
|
1357 |
+
border-top: none;
|
1358 |
+
}
|
1359 |
+
.ewd-ufaq-about-us-premium-table-cell img {
|
1360 |
+
width: 16px;
|
1361 |
+
height: auto;
|
1362 |
+
}
|
1363 |
+
|
1364 |
+
@media screen and (max-width: 668px) {
|
1365 |
+
#ewd-ufaq-about-us-tabs-menu {
|
1366 |
+
flex-wrap: wrap;
|
1367 |
+
}
|
1368 |
+
.ewd-ufaq-about-us-tab-menu-item {
|
1369 |
+
width: 100%;
|
1370 |
+
border-left: none;
|
1371 |
+
}
|
1372 |
+
.ewd-ufaq-about-us-tab-menu-item.ewd-ufaq-tab-selected {
|
1373 |
+
background: #fff;
|
1374 |
+
color: #000;
|
1375 |
+
border-bottom: 1px solid #ddd;
|
1376 |
+
}
|
1377 |
+
}
|
1378 |
+
|
1379 |
+
.ewd-ufaq-hidden {
|
1380 |
+
display: none;
|
1381 |
+
}
|
assets/css/plugin-deactivation.css
CHANGED
@@ -65,4 +65,14 @@
|
|
65 |
color: #ccc;
|
66 |
text-decoration: none;
|
67 |
padding-top: 7px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
65 |
color: #ccc;
|
66 |
text-decoration: none;
|
67 |
padding-top: 7px;
|
68 |
+
}
|
69 |
+
|
70 |
+
/*************************************
|
71 |
+
* "Try Premium" Upgrade Link
|
72 |
+
*************************************/
|
73 |
+
/* We also style the upgrade link here since this file loads on the plugins listing screen */
|
74 |
+
|
75 |
+
.ewd-ufaq-plugin-page-upgrade-link {
|
76 |
+
color: #1da867;
|
77 |
+
font-weight: 600;
|
78 |
}
|
assets/img/ewd_new_logo_purple2.png
ADDED
Binary file
|
assets/js/ewd-ufaq-admin.js
CHANGED
@@ -30,6 +30,39 @@ jQuery(document).ready(function($){
|
|
30 |
});
|
31 |
});
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
jQuery(document).ready(function($) {
|
34 |
|
35 |
$( '.ewd-ufaq-list' ).sortable({
|
@@ -77,6 +110,8 @@ function ewd_ufaq_field_added_handler() {
|
|
77 |
|
78 |
jQuery( document ).ready( function() {
|
79 |
|
80 |
-
jQuery( '.ewd-ufaq-settings-preview' ).
|
|
|
|
|
81 |
});
|
82 |
|
30 |
});
|
31 |
});
|
32 |
|
33 |
+
// About Us Page
|
34 |
+
jQuery( document ).ready( function( $ ) {
|
35 |
+
|
36 |
+
jQuery( '.ewd-ufaq-about-us-tab-menu-item' ).on( 'click', function() {
|
37 |
+
|
38 |
+
jQuery( '.ewd-ufaq-about-us-tab-menu-item' ).removeClass( 'ewd-ufaq-tab-selected' );
|
39 |
+
jQuery( '.ewd-ufaq-about-us-tab' ).addClass( 'ewd-ufaq-hidden' );
|
40 |
+
|
41 |
+
var tab = jQuery( this ).data( 'tab' );
|
42 |
+
|
43 |
+
jQuery( this ).addClass( 'ewd-ufaq-tab-selected' );
|
44 |
+
jQuery( '.ewd-ufaq-about-us-tab[data-tab="' + tab + '"]' ).removeClass( 'ewd-ufaq-hidden' );
|
45 |
+
} );
|
46 |
+
|
47 |
+
jQuery( '.ewd-ufaq-about-us-send-feature-suggestion' ).on( 'click', function() {
|
48 |
+
|
49 |
+
var feature_suggestion = jQuery( '.ewd-ufaq-about-us-feature-suggestion textarea' ).val();
|
50 |
+
var email_address = jQuery( '.ewd-ufaq-about-us-feature-suggestion input[name="feature_suggestion_email_address"]' ).val();
|
51 |
+
|
52 |
+
var params = {};
|
53 |
+
|
54 |
+
params.nonce = ewd_ufaq_php_data.nonce;
|
55 |
+
params.action = 'ewd_ufaq_send_feature_suggestion';
|
56 |
+
params.feature_suggestion = feature_suggestion;
|
57 |
+
params.email_address = email_address;
|
58 |
+
|
59 |
+
var data = jQuery.param( params );
|
60 |
+
jQuery.post( ajaxurl, data, function() {} );
|
61 |
+
|
62 |
+
jQuery( '.ewd-ufaq-about-us-feature-suggestion' ).prepend( '<p>Thank you, your feature suggestion has been submitted.' );
|
63 |
+
} );
|
64 |
+
} );
|
65 |
+
|
66 |
jQuery(document).ready(function($) {
|
67 |
|
68 |
$( '.ewd-ufaq-list' ).sortable({
|
110 |
|
111 |
jQuery( document ).ready( function() {
|
112 |
|
113 |
+
jQuery( '.ewd-ufaq-settings-preview' ).prevAll( 'h2' ).hide();
|
114 |
+
jQuery( '.ewd-ufaq-settings-preview' ).prevAll( '.sap-tutorial-toggle' ).hide();
|
115 |
+
jQuery( '.ewd-ufaq-settings-preview .sap-tutorial-toggle' ).hide();
|
116 |
});
|
117 |
|
assets/js/ewd-ufaq-blocks.js
CHANGED
@@ -16,6 +16,8 @@ registerBlockType( 'ultimate-faqs/ewd-ufaq-display-faq-block', {
|
|
16 |
default: -1
|
17 |
},
|
18 |
group_by_category: { type: 'string' },
|
|
|
|
|
19 |
include_category: { type: 'string' },
|
20 |
exclude_category: { type: 'string' },
|
21 |
post__in_string: { type: 'string' },
|
@@ -35,9 +37,21 @@ registerBlockType( 'ultimate-faqs/ewd-ufaq-display-faq-block', {
|
|
35 |
el( SelectControl, {
|
36 |
label: Localize( 'Group FAQs by Category', 'ultimate-faqs' ),
|
37 |
value: props.attributes.group_by_category,
|
38 |
-
options: [ {value: 'yes', label: 'Yes'}, {value: 'no', label: 'No'} ],
|
39 |
onChange: ( value ) => { props.setAttributes( { group_by_category: value } ); },
|
40 |
} ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
el( TextControl, {
|
42 |
label: Localize( 'Include Category', 'ultimate-faqs' ),
|
43 |
help: Localize( 'Comma-separated list of category IDs you\'d like to include.', 'ultimate-faqs' ),
|
16 |
default: -1
|
17 |
},
|
18 |
group_by_category: { type: 'string' },
|
19 |
+
faq_accordion: { type: 'string' },
|
20 |
+
category_accordion: { type: 'string' },
|
21 |
include_category: { type: 'string' },
|
22 |
exclude_category: { type: 'string' },
|
23 |
post__in_string: { type: 'string' },
|
37 |
el( SelectControl, {
|
38 |
label: Localize( 'Group FAQs by Category', 'ultimate-faqs' ),
|
39 |
value: props.attributes.group_by_category,
|
40 |
+
options: [ {value: '', label: 'Default (from settings)'}, {value: 'yes', label: 'Yes'}, {value: 'no', label: 'No'} ],
|
41 |
onChange: ( value ) => { props.setAttributes( { group_by_category: value } ); },
|
42 |
} ),
|
43 |
+
el( SelectControl, {
|
44 |
+
label: Localize( 'FAQ Accordion', 'ultimate-faqs' ),
|
45 |
+
value: props.attributes.faq_accordion,
|
46 |
+
options: [ {value: '', label: 'Default (from settings)'}, {value: 'yes', label: 'Yes'}, {value: 'no', label: 'No'} ],
|
47 |
+
onChange: ( value ) => { props.setAttributes( { faq_accordion: value } ); },
|
48 |
+
} ),
|
49 |
+
el( SelectControl, {
|
50 |
+
label: Localize( 'Category Accordion', 'ultimate-faqs' ),
|
51 |
+
value: props.attributes.category_accordion,
|
52 |
+
options: [ {value: '', label: 'Default (from settings)'}, {value: 'yes', label: 'Yes'}, {value: 'no', label: 'No'} ],
|
53 |
+
onChange: ( value ) => { props.setAttributes( { category_accordion: value } ); },
|
54 |
+
} ),
|
55 |
el( TextControl, {
|
56 |
label: Localize( 'Include Category', 'ultimate-faqs' ),
|
57 |
help: Localize( 'Comma-separated list of category IDs you\'d like to include.', 'ultimate-faqs' ),
|
ewd-ufaq-templates/faqs-expand-collapse-all.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<div class='ewd-ufaq-expand-collapse-div'>
|
2 |
|
3 |
-
<span class='ewd-ufaq-expand-all <?php echo ( $this->display_all_answers ? 'ewd-ufaq-hidden' : '' ); ?>'>
|
4 |
<span class='ewd-ufaq-toggle-all-symbol'>c</span>
|
5 |
<?php echo esc_html( $this->get_label( 'label-expand-all' ) ); ?>
|
6 |
</span>
|
7 |
|
8 |
-
<span class='ewd-ufaq-collapse-all <?php echo ( ! $this->display_all_answers ? 'ewd-ufaq-hidden' : '' ); ?>'>
|
9 |
<span class='ewd-ufaq-toggle-all-symbol'>C</span>
|
10 |
<?php echo esc_html( $this->get_label( 'label-collapse-all' ) ); ?>
|
11 |
</span>
|
1 |
<div class='ewd-ufaq-expand-collapse-div'>
|
2 |
|
3 |
+
<span class='ewd-ufaq-expand-all <?php echo ( $this->display_all_answers ? 'ewd-ufaq-hidden' : '' ); ?>' tabindex="0">
|
4 |
<span class='ewd-ufaq-toggle-all-symbol'>c</span>
|
5 |
<?php echo esc_html( $this->get_label( 'label-expand-all' ) ); ?>
|
6 |
</span>
|
7 |
|
8 |
+
<span class='ewd-ufaq-collapse-all <?php echo ( ! $this->display_all_answers ? 'ewd-ufaq-hidden' : '' ); ?>' tabindex="0">
|
9 |
<span class='ewd-ufaq-toggle-all-symbol'>C</span>
|
10 |
<?php echo esc_html( $this->get_label( 'label-collapse-all' ) ); ?>
|
11 |
</span>
|
ewd-ufaq-templates/faqs-search.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div id='ewd-ufaq-jquery-ajax-search'>
|
2 |
|
3 |
-
<label class='ewd-ufaq-field-label'>
|
4 |
<?php echo esc_html( $this->get_label( 'label-enter-question' ) ); ?>:
|
5 |
</label>
|
6 |
|
@@ -8,6 +8,7 @@
|
|
8 |
|
9 |
<div class="search-field">
|
10 |
<input
|
|
|
11 |
type='search'
|
12 |
class='ewd-ufaq-text-input <?php echo ( $this->get_option( 'auto-complete-titles' ) ? 'ewd-ufaq-text-auto-complete' : '' ); ?>'
|
13 |
placeholder='<?php echo esc_attr( $this->get_label( 'label-search-placeholder' ) ); ?>'
|
1 |
<div id='ewd-ufaq-jquery-ajax-search'>
|
2 |
|
3 |
+
<label class='ewd-ufaq-field-label' for='ewd-ufaq-text-search'>
|
4 |
<?php echo esc_html( $this->get_label( 'label-enter-question' ) ); ?>:
|
5 |
</label>
|
6 |
|
8 |
|
9 |
<div class="search-field">
|
10 |
<input
|
11 |
+
id='ewd-ufaq-text-search'
|
12 |
type='search'
|
13 |
class='ewd-ufaq-text-input <?php echo ( $this->get_option( 'auto-complete-titles' ) ? 'ewd-ufaq-text-auto-complete' : '' ); ?>'
|
14 |
placeholder='<?php echo esc_attr( $this->get_label( 'label-search-placeholder' ) ); ?>'
|
includes/AboutUs.class.php
ADDED
@@ -0,0 +1,284 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class to create the 'About Us' submenu
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( !defined( 'ABSPATH' ) )
|
7 |
+
exit;
|
8 |
+
|
9 |
+
if ( !class_exists( 'ewdufaqAboutUs' ) ) {
|
10 |
+
class ewdufaqAboutUs {
|
11 |
+
|
12 |
+
public function __construct() {
|
13 |
+
|
14 |
+
add_action( 'wp_ajax_ewd_ufaq_send_feature_suggestion', array( $this, 'send_feature_suggestion' ) );
|
15 |
+
|
16 |
+
add_action( 'admin_menu', array( $this, 'register_menu_screen' ) );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Adds filtering form, controls and column titles
|
21 |
+
* @since 2.2.0
|
22 |
+
*/
|
23 |
+
public function register_menu_screen() {
|
24 |
+
global $ewd_ufaq_controller;
|
25 |
+
|
26 |
+
add_submenu_page(
|
27 |
+
'edit.php?post_type=ufaq',
|
28 |
+
esc_html__( 'About Us', 'ultimate-faqs' ),
|
29 |
+
esc_html__( 'About Us', 'ultimate-faqs' ),
|
30 |
+
$ewd_ufaq_controller->settings->get_setting( 'access-role' ),
|
31 |
+
'ewd-ufaq-about-us',
|
32 |
+
array( $this, 'display_admin_screen' )
|
33 |
+
);
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Diplays the admin screen where it's possible to set the order of FAQs
|
38 |
+
* @since 2.2.0
|
39 |
+
*/
|
40 |
+
public function display_admin_screen() { ?>
|
41 |
+
|
42 |
+
<div class='ewd-ufaq-about-us-logo'>
|
43 |
+
<img src='<?php echo plugins_url( "../assets/img/ewd_new_logo_purple2.png", __FILE__ ); ?>'>
|
44 |
+
</div>
|
45 |
+
|
46 |
+
<div class='ewd-ufaq-about-us-tabs'>
|
47 |
+
|
48 |
+
<ul id='ewd-ufaq-about-us-tabs-menu'>
|
49 |
+
|
50 |
+
<li class='ewd-ufaq-about-us-tab-menu-item ewd-ufaq-tab-selected' data-tab='who_we_are'>
|
51 |
+
<?php _e( 'Who We Are', 'ultimate-faqs' ); ?>
|
52 |
+
</li>
|
53 |
+
|
54 |
+
<li class='ewd-ufaq-about-us-tab-menu-item' data-tab='lite_vs_premium'>
|
55 |
+
<?php _e( 'Lite vs. Premium', 'ultimate-faqs' ); ?>
|
56 |
+
</li>
|
57 |
+
|
58 |
+
<li class='ewd-ufaq-about-us-tab-menu-item' data-tab='getting_started'>
|
59 |
+
<?php _e( 'Getting Started', 'ultimate-faqs' ); ?>
|
60 |
+
</li>
|
61 |
+
|
62 |
+
<li class='ewd-ufaq-about-us-tab-menu-item' data-tab='suggest_feature'>
|
63 |
+
<?php _e( 'Suggest a Feature', 'ultimate-faqs' ); ?>
|
64 |
+
</li>
|
65 |
+
|
66 |
+
</ul>
|
67 |
+
|
68 |
+
<div class='ewd-ufaq-about-us-tab' data-tab='who_we_are'>
|
69 |
+
|
70 |
+
<p>
|
71 |
+
<strong>Founded in 2014, Etoile Web Design is a leading WordPress plugin development company. </strong>
|
72 |
+
Privately owned and located in Canada, our growing business is expanding in size and scope.
|
73 |
+
We have more than 50,000 active users across the world, over 2,000,000 total downloads, and our client based is steadily increasing every day.
|
74 |
+
Our reliable WordPress plugins bring a tremendous amount of value to our users by offering them solutions that are designed to be simple to maintain and easy to use.
|
75 |
+
Our plugins, like the Ultimate Product Catalog, Status Tracking, Ultimate FAQs and Ultimate Reviews are rich in features, highly customizable and responsive.
|
76 |
+
We provide expert support to all of our customers and believe in being a part of their success stories.
|
77 |
+
</p>
|
78 |
+
|
79 |
+
<p>
|
80 |
+
Our current team consists of web developers, marketing associates, digital designers and product support associates.
|
81 |
+
As a small business, we are able to offer our team flexible work schedules, significant autonomy and a challenging environment where creative people can flourish.
|
82 |
+
</p>
|
83 |
+
|
84 |
+
</div>
|
85 |
+
|
86 |
+
<div class='ewd-ufaq-about-us-tab ewd-ufaq-hidden' data-tab='lite_vs_premium'>
|
87 |
+
|
88 |
+
<p><?php _e( 'The premium version of the Ultimate FAQ plugin includes a large number of features to extend the functionality of the plugin and offer your visitors the best possible FAQ experience. This includes advanced layout, styling and labelling options, drag and drop re-ordering, export and import functionality and an FAQ submission form, to let your visitors suggest their own FAQs for your site.', 'ultimate-faqs' ); ?></p>
|
89 |
+
|
90 |
+
<p><?php _e( 'In order to make it as easy as possible for your visitors to find the information they are looking for, the premium plugin comes with a built-in <strong>FAQ search form</strong>, which uses asynchronous requests to <strong>search your whole database of FAQs in real time</strong>, without having to reload the page, and includes options to auto-complete the search, highlight search results and display all FAQs on initial page load.', 'ultimate-faqs' ); ?></p>
|
91 |
+
|
92 |
+
<p><?php _e( 'The premium version also comes with <strong>WooCommerce integration</strong>, so you can easily <strong>add FAQs tab to your product page</strong>, with options to either automatically add FAQs, by creating an FAQ category that matches the name of a WooCommerce product or category, or to <strong>manage FAQs directly from the product edit screen</strong>.', 'ultimate-faqs' ); ?></p>
|
93 |
+
|
94 |
+
<p><em><?php _e( 'The following table provides a comparison of the lite and premium versions.', 'ultimate-faqs' ); ?></em></p>
|
95 |
+
|
96 |
+
<div class='ewd-ufaq-about-us-premium-table'>
|
97 |
+
<div class='ewd-ufaq-about-us-premium-table-head'>
|
98 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Feature', 'ultimate-faqs' ); ?></div>
|
99 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Lite Version', 'ultimate-faqs' ); ?></div>
|
100 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Premium Version', 'ultimate-faqs' ); ?></div>
|
101 |
+
</div>
|
102 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
103 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Unlimited FAQs', 'ultimate-faqs' ); ?></div>
|
104 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
105 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
106 |
+
</div>
|
107 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
108 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'FAQ Gutenberg blocks', 'ultimate-faqs' ); ?></div>
|
109 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
110 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
111 |
+
</div>
|
112 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
113 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Accordion layout', 'ultimate-faqs' ); ?></div>
|
114 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
115 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
116 |
+
</div>
|
117 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
118 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'FAQ structured data', 'ultimate-faqs' ); ?></div>
|
119 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
120 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
121 |
+
</div>
|
122 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
123 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Sorting and ordering options', 'ultimate-faqs' ); ?></div>
|
124 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
125 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
126 |
+
</div>
|
127 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
128 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Translation ready', 'ultimate-faqs' ); ?></div>
|
129 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
130 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
131 |
+
</div>
|
132 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
133 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Style with custom CSS', 'ultimate-faqs' ); ?></div>
|
134 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
135 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
136 |
+
</div>
|
137 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
138 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'FAQ statistics', 'ultimate-faqs' ); ?></div>
|
139 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
140 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
141 |
+
</div>
|
142 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
143 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Comments on FAQs', 'ultimate-faqs' ); ?></div>
|
144 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
145 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
146 |
+
</div>
|
147 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
148 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Advanced FAQ layouts', 'ultimate-faqs' ); ?></div>
|
149 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
150 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
151 |
+
</div>
|
152 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
153 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'FAQ Search', 'ultimate-faqs' ); ?></div>
|
154 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
155 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
156 |
+
</div>
|
157 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
158 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'WooCommerce FAQs', 'ultimate-faqs' ); ?></div>
|
159 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
160 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
161 |
+
</div>
|
162 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
163 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'FAQ submit form', 'ultimate-faqs' ); ?></div>
|
164 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
165 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
166 |
+
</div>
|
167 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
168 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Drag and drop FAQ ordering', 'ultimate-faqs' ); ?></div>
|
169 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
170 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
171 |
+
</div>
|
172 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
173 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Add custom fields to your FAQs', 'ultimate-faqs' ); ?></div>
|
174 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
175 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
176 |
+
</div>
|
177 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
178 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Icon and animation options', 'ultimate-faqs' ); ?></div>
|
179 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
180 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
181 |
+
</div>
|
182 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
183 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Pretty permalinks for FAQs and categories', 'ultimate-faqs' ); ?></div>
|
184 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
185 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
186 |
+
</div>
|
187 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
188 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Advanced styling options', 'ultimate-faqs' ); ?></div>
|
189 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
190 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
191 |
+
</div>
|
192 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
193 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Export FAQs to PDF or spreadsheet', 'ultimate-faqs' ); ?></div>
|
194 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
195 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
196 |
+
</div>
|
197 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
198 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Import FAQs', 'ultimate-faqs' ); ?></div>
|
199 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
200 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
201 |
+
</div>
|
202 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
203 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Share FAQs on social media', 'ultimate-faqs' ); ?></div>
|
204 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
205 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
206 |
+
</div>
|
207 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
208 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Advanced styling options', 'ultimate-faqs' ); ?></div>
|
209 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
210 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
211 |
+
</div>
|
212 |
+
<div class='ewd-ufaq-about-us-premium-table-body'>
|
213 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><?php _e( 'Labelling options', 'ultimate-faqs' ); ?></div>
|
214 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'></div>
|
215 |
+
<div class='ewd-ufaq-about-us-premium-table-cell'><img src="<?php echo plugins_url( '../assets/img/dash-asset-checkmark.png', __FILE__ ); ?>"></div>
|
216 |
+
</div>
|
217 |
+
</div>
|
218 |
+
|
219 |
+
<?php printf( __( '<a href="%s" target="_blank" class="ewd-ufaq-about-us-tab-button ewd-ufaq-about-us-tab-button-purchase">Buy Premium Version</a>', 'ultimate-faqs' ), 'https://www.etoilewebdesign.com/license-payment/?Selected=UFAQ&Quantity=1&utm_source=admin_about_us' ); ?>
|
220 |
+
|
221 |
+
</div>
|
222 |
+
|
223 |
+
<div class='ewd-ufaq-about-us-tab ewd-ufaq-hidden' data-tab='getting_started'>
|
224 |
+
|
225 |
+
<p><?php _e( 'The walk-though that ran when you first activated the plugin offers a quick way to get started with setting it up. If you would like to run through it again, just click the button below', 'ultimate-faqs' ); ?></p>
|
226 |
+
|
227 |
+
<?php printf( __( '<a href="%s" class="ewd-ufaq-about-us-tab-button ewd-ufaq-about-us-tab-button-walkthrough">Re-Run Walk-Through</a>', 'ultimate-faqs' ), admin_url( '?page=ewd-ufaq-getting-started' ) ); ?>
|
228 |
+
|
229 |
+
<p><?php _e( 'We also have a series of video tutorials that cover the available settings as well as key features of the plugin.', 'ultimate-faqs' ); ?></p>
|
230 |
+
|
231 |
+
<?php printf( __( '<a href="%s" target="_blank" class="ewd-ufaq-about-us-tab-button ewd-ufaq-about-us-tab-button-youtube">YouTube Playlist</a>', 'ultimate-faqs' ), 'https://www.youtube.com/watch?v=ULAq7e-JyL8&list=PLEndQUuhlvSrNdfu5FKa1uGHsaKZxgdWt&ab_channel=EtoileWebDesign' ); ?>
|
232 |
+
|
233 |
+
|
234 |
+
</div>
|
235 |
+
|
236 |
+
<div class='ewd-ufaq-about-us-tab ewd-ufaq-hidden' data-tab='suggest_feature'>
|
237 |
+
|
238 |
+
<div class='ewd-ufaq-about-us-feature-suggestion'>
|
239 |
+
|
240 |
+
<p><?php _e( 'You can use the form below to let us know about a feature suggestion you might have.', 'ultimate-faqs' ); ?></p>
|
241 |
+
|
242 |
+
<textarea placeholder="<?php _e( 'Please describe your feature idea...', 'ultimate-faqs' ); ?>"></textarea>
|
243 |
+
|
244 |
+
<br>
|
245 |
+
|
246 |
+
<input type="email" name="feature_suggestion_email_address" placeholder="<?php _e( 'Email Address', 'ultimate-faqs' ); ?>">
|
247 |
+
|
248 |
+
</div>
|
249 |
+
|
250 |
+
<div class='ewd-ufaq-about-us-tab-button ewd-ufaq-about-us-send-feature-suggestion'>Send Feature Suggestion</div>
|
251 |
+
|
252 |
+
</div>
|
253 |
+
|
254 |
+
</div>
|
255 |
+
|
256 |
+
<?php }
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Sends the feature suggestions submitted via the About Us page
|
260 |
+
* @since 2.2.0
|
261 |
+
*/
|
262 |
+
public function send_feature_suggestion() {
|
263 |
+
global $ewd_ufaq_controller;
|
264 |
+
|
265 |
+
if (
|
266 |
+
! check_ajax_referer( 'ewd-ufaq-admin-js', 'nonce' )
|
267 |
+
||
|
268 |
+
! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
|
269 |
+
) {
|
270 |
+
ewdufaqHelper::admin_nopriv_ajax();
|
271 |
+
}
|
272 |
+
|
273 |
+
$headers = 'Content-type: text/html;charset=utf-8' . "\r\n";
|
274 |
+
$feedback = sanitize_text_field( $_POST['feature_suggestion'] );
|
275 |
+
$feedback .= '<br /><br />Email Address: ';
|
276 |
+
$feedback .= sanitize_email( $_POST['email_address'] );
|
277 |
+
|
278 |
+
wp_mail( 'contact@etoilewebdesign.com', 'UFAQ Feature Suggesstion', $feedback, $headers );
|
279 |
+
|
280 |
+
die();
|
281 |
+
}
|
282 |
+
|
283 |
+
}
|
284 |
+
} // endif;
|
includes/Blocks.class.php
CHANGED
@@ -35,6 +35,12 @@ class ewdufaqBlocks {
|
|
35 |
'group_by_category' => array(
|
36 |
'type' => 'string',
|
37 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
'include_category' => array(
|
39 |
'type' => 'string',
|
40 |
),
|
35 |
'group_by_category' => array(
|
36 |
'type' => 'string',
|
37 |
),
|
38 |
+
'faq_accordion' => array(
|
39 |
+
'type' => 'string',
|
40 |
+
),
|
41 |
+
'category_accordion' => array(
|
42 |
+
'type' => 'string',
|
43 |
+
),
|
44 |
'include_category' => array(
|
45 |
'type' => 'string',
|
46 |
),
|
includes/Dashboard.class.php
CHANGED
@@ -211,7 +211,7 @@ class ewdufaqDashboard {
|
|
211 |
<li>SEO-Friendly Permalinks</li>
|
212 |
<li>+ More</li>
|
213 |
</ul>
|
214 |
-
<a href="https://www.etoilewebdesign.com/license-payment/?Selected=UFAQ&Quantity=1" class="ewd-ufaq-dashboard-get-premium-widget-button" target="_blank">UPGRADE NOW</a>
|
215 |
|
216 |
<?php if ( ! get_option("EWD_UFAQ_Trial_Happening") ) {
|
217 |
$trial_info = sprintf( __( '<a href="%s" target="_blank">Visit our website</a> to learn how to get a free 7-day trial of the premium plugin.'), 'https://www.etoilewebdesign.com/premium-upgrade-instructions/' );
|
@@ -266,7 +266,7 @@ class ewdufaqDashboard {
|
|
266 |
</ul>
|
267 |
</div>
|
268 |
<div class="ewd-ufaq-dashboard-new-footer-one-buttons">
|
269 |
-
<a class="ewd-ufaq-dashboard-new-upgrade-button" href="https://www.etoilewebdesign.com/license-payment/?Selected=UFAQ&Quantity=1" target="_blank">UPGRADE NOW</a>
|
270 |
</div>
|
271 |
</div>
|
272 |
</div> <!-- us-dashboard-new-footer-one -->
|
211 |
<li>SEO-Friendly Permalinks</li>
|
212 |
<li>+ More</li>
|
213 |
</ul>
|
214 |
+
<a href="https://www.etoilewebdesign.com/license-payment/?Selected=UFAQ&Quantity=1&utm_source=ufaq_admin&utm_content=dashboard_sidebar" class="ewd-ufaq-dashboard-get-premium-widget-button" target="_blank">UPGRADE NOW</a>
|
215 |
|
216 |
<?php if ( ! get_option("EWD_UFAQ_Trial_Happening") ) {
|
217 |
$trial_info = sprintf( __( '<a href="%s" target="_blank">Visit our website</a> to learn how to get a free 7-day trial of the premium plugin.'), 'https://www.etoilewebdesign.com/premium-upgrade-instructions/' );
|
266 |
</ul>
|
267 |
</div>
|
268 |
<div class="ewd-ufaq-dashboard-new-footer-one-buttons">
|
269 |
+
<a class="ewd-ufaq-dashboard-new-upgrade-button" href="https://www.etoilewebdesign.com/license-payment/?Selected=UFAQ&Quantity=1&utm_source=ufaq_admin&utm_content=dashboard_footer" target="_blank">UPGRADE NOW</a>
|
270 |
</div>
|
271 |
</div>
|
272 |
</div> <!-- us-dashboard-new-footer-one -->
|
includes/Settings.class.php
CHANGED
@@ -134,7 +134,7 @@ class ewdufaqSettings {
|
|
134 |
require_once( EWD_UFAQ_PLUGIN_DIR . '/lib/simple-admin-pages/simple-admin-pages.php' );
|
135 |
$sap = sap_initialize_library(
|
136 |
$args = array(
|
137 |
-
'version' => '2.6.
|
138 |
'lib_url' => EWD_UFAQ_PLUGIN_URL . '/lib/simple-admin-pages/',
|
139 |
'theme' => 'purple',
|
140 |
)
|
@@ -156,9 +156,10 @@ class ewdufaqSettings {
|
|
156 |
$sap->add_section(
|
157 |
'ewd-ufaq-settings',
|
158 |
array(
|
159 |
-
'id'
|
160 |
-
'title'
|
161 |
-
'is_tab'
|
|
|
162 |
)
|
163 |
);
|
164 |
|
@@ -178,7 +179,7 @@ class ewdufaqSettings {
|
|
178 |
array(
|
179 |
'id' => 'faq-page',
|
180 |
'title' => __( 'FAQs Page', 'ultimate-faqs' ),
|
181 |
-
'description' => __( 'Select a page on your site to automatically display all of the FAQs you have created.
|
182 |
'blank_option' => true,
|
183 |
'args' => array(
|
184 |
'post_type' => 'page',
|
@@ -433,9 +434,10 @@ class ewdufaqSettings {
|
|
433 |
$sap->add_section(
|
434 |
'ewd-ufaq-settings',
|
435 |
array(
|
436 |
-
'id'
|
437 |
-
'title'
|
438 |
-
'is_tab'
|
|
|
439 |
)
|
440 |
);
|
441 |
|
@@ -550,10 +552,11 @@ class ewdufaqSettings {
|
|
550 |
$sap->add_section(
|
551 |
'ewd-ufaq-settings',
|
552 |
array(
|
553 |
-
'id'
|
554 |
-
'title'
|
555 |
-
'is_tab'
|
556 |
-
'
|
|
|
557 |
)
|
558 |
);
|
559 |
$sap->add_section(
|
@@ -569,10 +572,11 @@ class ewdufaqSettings {
|
|
569 |
$sap->add_section(
|
570 |
'ewd-ufaq-settings',
|
571 |
array(
|
572 |
-
'id'
|
573 |
-
'title'
|
574 |
-
'is_tab'
|
575 |
-
'
|
|
|
576 |
)
|
577 |
);
|
578 |
$sap->add_section(
|
@@ -588,10 +592,11 @@ class ewdufaqSettings {
|
|
588 |
$sap->add_section(
|
589 |
'ewd-ufaq-settings',
|
590 |
array(
|
591 |
-
'id'
|
592 |
-
'title'
|
593 |
-
'is_tab'
|
594 |
-
'
|
|
|
595 |
)
|
596 |
);
|
597 |
$sap->add_section(
|
@@ -607,10 +612,11 @@ class ewdufaqSettings {
|
|
607 |
$sap->add_section(
|
608 |
'ewd-ufaq-settings',
|
609 |
array(
|
610 |
-
'id'
|
611 |
-
'title'
|
612 |
-
'is_tab'
|
613 |
-
'
|
|
|
614 |
)
|
615 |
);
|
616 |
$sap->add_section(
|
@@ -664,7 +670,7 @@ class ewdufaqSettings {
|
|
664 |
<li>' . __( 'Email Support', 'ultimate-faqs' ) . '</li>
|
665 |
</ul>
|
666 |
<div class="ewd-ufaq-dashboard-new-footer-one-buttons">
|
667 |
-
<a class="ewd-ufaq-dashboard-new-upgrade-button" href="https://www.etoilewebdesign.com/license-payment/?Selected=UFAQ&Quantity=1" target="_blank">' . __( 'UPGRADE NOW', 'ultimate-faqs' ) . '</a>
|
668 |
</div>
|
669 |
';
|
670 |
|
134 |
require_once( EWD_UFAQ_PLUGIN_DIR . '/lib/simple-admin-pages/simple-admin-pages.php' );
|
135 |
$sap = sap_initialize_library(
|
136 |
$args = array(
|
137 |
+
'version' => '2.6.9',
|
138 |
'lib_url' => EWD_UFAQ_PLUGIN_URL . '/lib/simple-admin-pages/',
|
139 |
'theme' => 'purple',
|
140 |
)
|
156 |
$sap->add_section(
|
157 |
'ewd-ufaq-settings',
|
158 |
array(
|
159 |
+
'id' => 'ewd-ufaq-basic-tab',
|
160 |
+
'title' => __( 'Basic', 'ultimate-faqs' ),
|
161 |
+
'is_tab' => true,
|
162 |
+
'tutorial_yt_id' => 'MUuFQxywjsA'
|
163 |
)
|
164 |
);
|
165 |
|
179 |
array(
|
180 |
'id' => 'faq-page',
|
181 |
'title' => __( 'FAQs Page', 'ultimate-faqs' ),
|
182 |
+
'description' => __( 'Select a page on your site to automatically display all of the FAQs you have created. Alternatively, you can also use the blocks and shortcodes to display your FAQs on pages other than the one selected above.', 'ultimate-faqs' ),
|
183 |
'blank_option' => true,
|
184 |
'args' => array(
|
185 |
'post_type' => 'page',
|
434 |
$sap->add_section(
|
435 |
'ewd-ufaq-settings',
|
436 |
array(
|
437 |
+
'id' => 'ewd-ufaq-ordering-tab',
|
438 |
+
'title' => __( 'Ordering', 'ultimate-faqs' ),
|
439 |
+
'is_tab' => true,
|
440 |
+
'tutorial_yt_id' => 'sTzcb20tjc0'
|
441 |
)
|
442 |
);
|
443 |
|
552 |
$sap->add_section(
|
553 |
'ewd-ufaq-settings',
|
554 |
array(
|
555 |
+
'id' => 'ewd-ufaq-premium-tab',
|
556 |
+
'title' => __( 'Premium', 'ultimate-faqs' ),
|
557 |
+
'is_tab' => true,
|
558 |
+
'tutorial_yt_id' => 'gV0mAkKWSXg',
|
559 |
+
'show_submit_button' => $this->show_submit_button( 'premium' )
|
560 |
)
|
561 |
);
|
562 |
$sap->add_section(
|
572 |
$sap->add_section(
|
573 |
'ewd-ufaq-settings',
|
574 |
array(
|
575 |
+
'id' => 'ewd-ufaq-fields-tab',
|
576 |
+
'title' => __( 'Fields', 'ultimate-faqs' ),
|
577 |
+
'is_tab' => true,
|
578 |
+
'tutorial_yt_id' => 'yo2PcuirlnY',
|
579 |
+
'show_submit_button' => $this->show_submit_button( 'fields' )
|
580 |
)
|
581 |
);
|
582 |
$sap->add_section(
|
592 |
$sap->add_section(
|
593 |
'ewd-ufaq-settings',
|
594 |
array(
|
595 |
+
'id' => 'ewd-ufaq-labelling-tab',
|
596 |
+
'title' => __( 'Labelling', 'ultimate-faqs' ),
|
597 |
+
'is_tab' => true,
|
598 |
+
'tutorial_yt_id' => 'ziuY0Tj75MQ',
|
599 |
+
'show_submit_button' => $this->show_submit_button( 'labelling' )
|
600 |
)
|
601 |
);
|
602 |
$sap->add_section(
|
612 |
$sap->add_section(
|
613 |
'ewd-ufaq-settings',
|
614 |
array(
|
615 |
+
'id' => 'ewd-ufaq-styling-tab',
|
616 |
+
'title' => __( 'Styling', 'ultimate-faqs' ),
|
617 |
+
'is_tab' => true,
|
618 |
+
'tutorial_yt_id' => 'OenPtDrNBjg',
|
619 |
+
'show_submit_button' => $this->show_submit_button( 'styling' )
|
620 |
)
|
621 |
);
|
622 |
$sap->add_section(
|
670 |
<li>' . __( 'Email Support', 'ultimate-faqs' ) . '</li>
|
671 |
</ul>
|
672 |
<div class="ewd-ufaq-dashboard-new-footer-one-buttons">
|
673 |
+
<a class="ewd-ufaq-dashboard-new-upgrade-button" href="https://www.etoilewebdesign.com/license-payment/?Selected=UFAQ&Quantity=1&utm_source=ufaq_settings&utm_content=' . $section_and_perm_type . '" target="_blank">' . __( 'UPGRADE NOW', 'ultimate-faqs' ) . '</a>
|
674 |
</div>
|
675 |
';
|
676 |
|
includes/template-functions.php
CHANGED
@@ -23,6 +23,8 @@ function ewd_ufaq_faqs_shortcode( $atts ) {
|
|
23 |
'order' => '',
|
24 |
'display_all_answers' => '',
|
25 |
'group_by_category' => '',
|
|
|
|
|
26 |
'faq_page' => 1,
|
27 |
'post_count' => -1
|
28 |
);
|
23 |
'order' => '',
|
24 |
'display_all_answers' => '',
|
25 |
'group_by_category' => '',
|
26 |
+
'faq_accordion' => '',
|
27 |
+
'category_accordion' => '',
|
28 |
'faq_page' => 1,
|
29 |
'post_count' => -1
|
30 |
);
|
lib/simple-admin-pages/classes/AdminPage.Menu.class.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
-
class
|
12 |
|
13 |
public $setup_function = 'add_menu_page'; // WP function to register the page
|
14 |
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
+
class sapAdminPageMenu_2_6_9 extends sapAdminPage_2_6_9 {
|
12 |
|
13 |
public $setup_function = 'add_menu_page'; // WP function to register the page
|
14 |
|
lib/simple-admin-pages/classes/AdminPage.Submenu.class.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
-
class
|
12 |
|
13 |
public $setup_function = 'add_submenu_page'; // WP function to register the page
|
14 |
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
+
class sapAdminPageSubmenu_2_6_9 extends sapAdminPage_2_6_9 {
|
12 |
|
13 |
public $setup_function = 'add_submenu_page'; // WP function to register the page
|
14 |
|
lib/simple-admin-pages/classes/AdminPage.Themes.class.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
-
class
|
12 |
|
13 |
public $setup_function = 'add_theme_page'; // WP function to register the page
|
14 |
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
+
class sapAdminPageThemes_2_6_9 extends sapAdminPage_2_6_9 {
|
12 |
|
13 |
public $setup_function = 'add_theme_page'; // WP function to register the page
|
14 |
|
lib/simple-admin-pages/classes/AdminPage.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
public $title;
|
13 |
public $menu_title;
|
@@ -115,7 +115,7 @@ class sapAdminPage_2_6_3 {
|
|
115 |
}
|
116 |
|
117 |
// Get the current page/tab so we only update those settings
|
118 |
-
parse_str( $_POST['_wp_http_referer'], $referrer );
|
119 |
$current_page = $this->get_current_page( $referrer );
|
120 |
|
121 |
// Use a new empty value so only values for settings that were added are
|
@@ -150,7 +150,7 @@ class sapAdminPage_2_6_3 {
|
|
150 |
public function get_current_page( $request ) {
|
151 |
|
152 |
if ( !empty( $request['tab'] ) ) {
|
153 |
-
return $request['tab'];
|
154 |
} elseif ( !empty( $this->default_tab ) ) {
|
155 |
return $this->default_tab;
|
156 |
} else {
|
@@ -175,8 +175,28 @@ class sapAdminPage_2_6_3 {
|
|
175 |
|
176 |
$current_page = $this->get_current_page( $_GET );
|
177 |
|
178 |
-
|
179 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
?>
|
182 |
|
@@ -214,6 +234,7 @@ class sapAdminPage_2_6_3 {
|
|
214 |
|
215 |
<form method="post" action="options.php" class="sap-parent-form">
|
216 |
<?php settings_fields( $this->id ); ?>
|
|
|
217 |
<?php do_settings_sections( $current_page ); ?>
|
218 |
<?php if ( $this->show_button ) { submit_button(); } ?>
|
219 |
</form>
|
@@ -237,61 +258,27 @@ class sapAdminPage_2_6_3 {
|
|
237 |
}
|
238 |
|
239 |
/**
|
240 |
-
*
|
241 |
-
* @since 2.6
|
242 |
*/
|
243 |
-
public function
|
244 |
-
{
|
245 |
-
// Fetch and Order sections/tabs
|
246 |
-
$tab_list = [];
|
247 |
-
$section_list = [];
|
248 |
-
foreach( $this->sections as $id => $section ) {
|
249 |
-
if ( isset( $section->is_tab ) && $section->is_tab === true ) {
|
250 |
-
if( property_exists( $section, 'rank' ) && count( $tab_list ) > $section->rank ) {
|
251 |
-
// array start from 0, rank start from 1
|
252 |
-
array_splice($tab_list, ($section->rank - 1), 0, [$id => $section]);
|
253 |
-
}
|
254 |
-
else {
|
255 |
-
$tab_list[$id] = $section;
|
256 |
-
}
|
257 |
-
}
|
258 |
-
else {
|
259 |
-
$section_list[$id] = $section;
|
260 |
-
}
|
261 |
-
}
|
262 |
|
263 |
-
$this->sections
|
264 |
-
}
|
265 |
|
266 |
-
|
267 |
-
* Order the sections in tabs as per the value of rank
|
268 |
-
* @since 2.6
|
269 |
-
*/
|
270 |
-
public function order_sections_by_rank()
|
271 |
-
{
|
272 |
-
// Fetch and Order sections/tabs
|
273 |
-
$tab_list = [];
|
274 |
-
$non_tab_list = [];
|
275 |
-
foreach( $this->sections as $id => $section ) {
|
276 |
-
if ( isset( $section->is_tab ) && $section->is_tab == true ) {
|
277 |
-
$tab_list[$id] = $section;
|
278 |
-
}
|
279 |
-
else {
|
280 |
-
$non_tab_list[$id] = $section;
|
281 |
-
}
|
282 |
-
}
|
283 |
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
|
|
|
|
291 |
}
|
292 |
}
|
293 |
|
294 |
-
|
295 |
}
|
296 |
-
|
297 |
}
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPage_2_6_9 {
|
11 |
|
12 |
public $title;
|
13 |
public $menu_title;
|
115 |
}
|
116 |
|
117 |
// Get the current page/tab so we only update those settings
|
118 |
+
parse_str( sanitize_url( $_POST['_wp_http_referer'] ), $referrer );
|
119 |
$current_page = $this->get_current_page( $referrer );
|
120 |
|
121 |
// Use a new empty value so only values for settings that were added are
|
150 |
public function get_current_page( $request ) {
|
151 |
|
152 |
if ( !empty( $request['tab'] ) ) {
|
153 |
+
return sanitize_text_field( $request['tab'] );
|
154 |
} elseif ( !empty( $this->default_tab ) ) {
|
155 |
return $this->default_tab;
|
156 |
} else {
|
175 |
|
176 |
$current_page = $this->get_current_page( $_GET );
|
177 |
|
178 |
+
// Fetch and Order sections/tabs
|
179 |
+
$tab_list = []; $non_tab_list = []; $bottom = 1000;
|
180 |
+
foreach( $this->sections as $section ) {
|
181 |
+
if ( isset( $section->is_tab ) && $section->is_tab === true ) {
|
182 |
+
if( property_exists( $section, 'rank' ) ) {
|
183 |
+
// array start from 0, rank start from 1
|
184 |
+
$tab_list[ $section->rank - 1 ][] = $section;
|
185 |
+
}
|
186 |
+
else {
|
187 |
+
$tab_list[$bottom][] = $section;
|
188 |
+
}
|
189 |
+
} else {
|
190 |
+
$non_tab_list[] = $section;
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
$this->sections = [];
|
195 |
+
ksort($tab_list);
|
196 |
+
foreach ($tab_list as $rank => $sub_list) {
|
197 |
+
$this->sections = array_merge( $this->sections, $sub_list );
|
198 |
+
}
|
199 |
+
$this->sections = array_merge( $this->sections, $non_tab_list );
|
200 |
|
201 |
?>
|
202 |
|
234 |
|
235 |
<form method="post" action="options.php" class="sap-parent-form">
|
236 |
<?php settings_fields( $this->id ); ?>
|
237 |
+
<?php $this->maybe_print_tutorial_div( $current_page ); ?>
|
238 |
<?php do_settings_sections( $current_page ); ?>
|
239 |
<?php if ( $this->show_button ) { submit_button(); } ?>
|
240 |
</form>
|
258 |
}
|
259 |
|
260 |
/**
|
261 |
+
* Output the title of the page
|
262 |
+
* @since 2.6.9
|
263 |
*/
|
264 |
+
public function maybe_print_tutorial_div( $current_page ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
|
266 |
+
foreach ( $this->sections as $section ) {
|
|
|
267 |
|
268 |
+
if ( $current_page == $section->id and ! empty( $section->tutorial_yt_id ) ) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
|
270 |
+
<div class='sap-tutorial-div sap-hidden'>
|
271 |
+
|
272 |
+
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo esc_attr( $section->tutorial_yt_id ); ?>" frameborder="0" allow="autoplay; clipboard-write; encrypted-media; gyroscope;" allowfullscreen></iframe>
|
273 |
+
|
274 |
+
</div>
|
275 |
+
|
276 |
+
<?php
|
277 |
+
|
278 |
+
return true;
|
279 |
}
|
280 |
}
|
281 |
|
282 |
+
return false;
|
283 |
}
|
|
|
284 |
}
|
lib/simple-admin-pages/classes/AdminPageSection.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
// Page defaults
|
13 |
public $id; // unique id for this section
|
@@ -135,8 +135,8 @@ class sapAdminPageSection_2_6_3 {
|
|
135 |
<?php echo ( isset($this->purchase_link ) ? "<div class='sap-premium-options-table-overlay'>" : '' ); ?>
|
136 |
<div class="section-disabled">
|
137 |
<img src="<?php echo plugins_url( '../img/options-asset-lock.png', __FILE__ ); ?>" alt="Upgrade to Premium">
|
138 |
-
<p>Access this section by upgrading to premium
|
139 |
-
<a href="<?php echo esc_url( $this->purchase_link ); ?>" class="sap-dashboard-get-premium-widget-button" target="_blank">UPGRADE NOW</a>
|
140 |
</div>
|
141 |
<?php echo ( isset( $this->purchase_link ) ? "</div>" : '' ); ?>
|
142 |
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSection_2_6_9 {
|
11 |
|
12 |
// Page defaults
|
13 |
public $id; // unique id for this section
|
135 |
<?php echo ( isset($this->purchase_link ) ? "<div class='sap-premium-options-table-overlay'>" : '' ); ?>
|
136 |
<div class="section-disabled">
|
137 |
<img src="<?php echo plugins_url( '../img/options-asset-lock.png', __FILE__ ); ?>" alt="Upgrade to Premium">
|
138 |
+
<p>Access this section by upgrading to <?php echo ( isset( $this->ultimate_needed ) ? 'ultimate' : 'premium' ); ?></p>
|
139 |
+
<a href="<?php echo esc_url( add_query_arg( 'utm_content', $this->id, $this->purchase_link ) ); ?>" class="sap-dashboard-get-premium-widget-button" target="_blank">UPGRADE NOW</a>
|
140 |
</div>
|
141 |
<?php echo ( isset( $this->purchase_link ) ? "</div>" : '' ); ?>
|
142 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Address.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
/*
|
13 |
* Size of this textarea
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSettingAddress_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
11 |
|
12 |
/*
|
13 |
* Size of this textarea
|
lib/simple-admin-pages/classes/AdminPageSetting.Checkbox.class.php
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
* @package Simple Admin Pages
|
20 |
*/
|
21 |
|
22 |
-
class
|
23 |
|
24 |
//public $sanitize_callback = 'sanitize_text_field';
|
25 |
|
@@ -31,6 +31,8 @@ class sapAdminPageSettingCheckbox_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
31 |
|
32 |
$input_name = $this->get_input_name();
|
33 |
$values = ( is_array( $this->value ) ? $this->value : array() );
|
|
|
|
|
34 |
|
35 |
?>
|
36 |
<fieldset <?php echo ( isset( $this->columns ) ? 'class="sap-setting-columns-' . $this->columns . '"' : '' ); ?> <?php $this->print_conditional_data(); ?>>
|
19 |
* @package Simple Admin Pages
|
20 |
*/
|
21 |
|
22 |
+
class sapAdminPageSettingCheckbox_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
23 |
|
24 |
//public $sanitize_callback = 'sanitize_text_field';
|
25 |
|
31 |
|
32 |
$input_name = $this->get_input_name();
|
33 |
$values = ( is_array( $this->value ) ? $this->value : array() );
|
34 |
+
|
35 |
+
if ( empty( $values ) ) { $values = $this->get_default_setting(); }
|
36 |
|
37 |
?>
|
38 |
<fieldset <?php echo ( isset( $this->columns ) ? 'class="sap-setting-columns-' . $this->columns . '"' : '' ); ?> <?php $this->print_conditional_data(); ?>>
|
lib/simple-admin-pages/classes/AdminPageSetting.ColorPicker.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSettingColorPicker_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Count.class.php
CHANGED
@@ -24,7 +24,7 @@
|
|
24 |
* @package Simple Admin Pages
|
25 |
*/
|
26 |
|
27 |
-
class
|
28 |
|
29 |
public $sanitize_callback = 'sanitize_text_field';
|
30 |
|
24 |
* @package Simple Admin Pages
|
25 |
*/
|
26 |
|
27 |
+
class sapAdminPageSettingCount_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
28 |
|
29 |
public $sanitize_callback = 'sanitize_text_field';
|
30 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Editor.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
public $sanitize_callback = 'wp_kses_post';
|
13 |
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSettingEditor_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
11 |
|
12 |
public $sanitize_callback = 'wp_kses_post';
|
13 |
|
lib/simple-admin-pages/classes/AdminPageSetting.FileUpload.class.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @package Simple Admin Pages
|
16 |
*/
|
17 |
|
18 |
-
class
|
19 |
|
20 |
public $sanitize_callback = 'esc_url_raw';
|
21 |
|
15 |
* @package Simple Admin Pages
|
16 |
*/
|
17 |
|
18 |
+
class sapAdminPageSettingFileUpload_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
19 |
|
20 |
public $sanitize_callback = 'esc_url_raw';
|
21 |
|
lib/simple-admin-pages/classes/AdminPageSetting.HTML.class.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @package Simple Admin Pages
|
15 |
*/
|
16 |
|
17 |
-
class
|
18 |
|
19 |
public $sanitize_callback = 'sanitize_text_field';
|
20 |
|
14 |
* @package Simple Admin Pages
|
15 |
*/
|
16 |
|
17 |
+
class sapAdminPageSettingHTML_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
18 |
|
19 |
public $sanitize_callback = 'sanitize_text_field';
|
20 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Image.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
public $sanitize_callback = 'absint';
|
13 |
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSettingImage_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
11 |
|
12 |
public $sanitize_callback = 'absint';
|
13 |
|
lib/simple-admin-pages/classes/AdminPageSetting.InfiniteTable.class.php
CHANGED
@@ -24,7 +24,7 @@
|
|
24 |
* @package Simple Admin Pages
|
25 |
*/
|
26 |
|
27 |
-
class
|
28 |
|
29 |
public $sanitize_callback = 'sanitize_textarea_field';
|
30 |
|
@@ -63,8 +63,10 @@ class sapAdminPageSettingInfiniteTable_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
63 |
$input_name = $this->get_input_name();
|
64 |
$values = json_decode( html_entity_decode( $this->value ) );
|
65 |
|
66 |
-
if ( ! is_array( $values ) )
|
67 |
-
|
|
|
|
|
68 |
|
69 |
$fields = '';
|
70 |
foreach ($this->fields as $field_id => $field) {
|
@@ -216,4 +218,15 @@ class sapAdminPageSettingInfiniteTable_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
216 |
}
|
217 |
}
|
218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
}
|
24 |
* @package Simple Admin Pages
|
25 |
*/
|
26 |
|
27 |
+
class sapAdminPageSettingInfiniteTable_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
28 |
|
29 |
public $sanitize_callback = 'sanitize_textarea_field';
|
30 |
|
63 |
$input_name = $this->get_input_name();
|
64 |
$values = json_decode( html_entity_decode( $this->value ) );
|
65 |
|
66 |
+
if ( ! is_array( $values ) ) {
|
67 |
+
|
68 |
+
$values = $this->get_default_setting();
|
69 |
+
}
|
70 |
|
71 |
$fields = '';
|
72 |
foreach ($this->fields as $field_id => $field) {
|
218 |
}
|
219 |
}
|
220 |
|
221 |
+
/**
|
222 |
+
* Get the default value for a setting if value is currently empty
|
223 |
+
* Uses a fallback value rather than the default $this->value, used in the main class
|
224 |
+
*
|
225 |
+
* @since 2.6.4
|
226 |
+
*/
|
227 |
+
public function get_default_setting( $fallback_value = array() ) {
|
228 |
+
|
229 |
+
return ! empty( $this->default ) ? $this->default : $fallback_value;
|
230 |
+
}
|
231 |
+
|
232 |
}
|
lib/simple-admin-pages/classes/AdminPageSetting.McApiKey.class.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
*
|
15 |
*/
|
16 |
|
17 |
-
class
|
18 |
|
19 |
/**
|
20 |
* Scripts and styles to load for this component
|
14 |
*
|
15 |
*/
|
16 |
|
17 |
+
class mcfrtbAdminPageSettingMcApiKey_2_6_9 {
|
18 |
|
19 |
/**
|
20 |
* Scripts and styles to load for this component
|
lib/simple-admin-pages/classes/AdminPageSetting.McListMerge.class.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
*
|
15 |
*/
|
16 |
|
17 |
-
class
|
18 |
|
19 |
/**
|
20 |
* Scripts and styles to load for this component
|
14 |
*
|
15 |
*/
|
16 |
|
17 |
+
class mcfrtbAdminPageSettingMcListMerge_2_6_9 {
|
18 |
|
19 |
/**
|
20 |
* Scripts and styles to load for this component
|
lib/simple-admin-pages/classes/AdminPageSetting.Number.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSettingNumber_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
lib/simple-admin-pages/classes/AdminPageSetting.OpeningHours.class.php
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
* @package Simple Admin Pages
|
26 |
*/
|
27 |
|
28 |
-
class
|
29 |
|
30 |
public $sanitize_callback = 'sanitize_text_field';
|
31 |
|
25 |
* @package Simple Admin Pages
|
26 |
*/
|
27 |
|
28 |
+
class sapAdminPageSettingOpeningHours_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
29 |
|
30 |
public $sanitize_callback = 'sanitize_text_field';
|
31 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Ordering.class.php
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
* @package Simple Admin Pages
|
19 |
*/
|
20 |
|
21 |
-
class
|
22 |
|
23 |
public $sanitize_callback = 'sanitize_text_field';
|
24 |
|
18 |
* @package Simple Admin Pages
|
19 |
*/
|
20 |
|
21 |
+
class sapAdminPageSettingOrdering_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
22 |
|
23 |
public $sanitize_callback = 'sanitize_text_field';
|
24 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Password.class.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Register, display and save a password field setting in the admin menu
|
5 |
+
*
|
6 |
+
* @since 2.6.8
|
7 |
+
* @package Simple Admin Pages
|
8 |
+
*/
|
9 |
+
|
10 |
+
class sapAdminPageSettingPassword_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
11 |
+
|
12 |
+
public $sanitize_callback = 'sanitize_text_field';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Placeholder string for the input field
|
16 |
+
* @since 2.6.8
|
17 |
+
*/
|
18 |
+
public $placeholder = '';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Display this setting
|
22 |
+
* @since 2.6.8
|
23 |
+
*/
|
24 |
+
public function display_setting() {
|
25 |
+
?>
|
26 |
+
|
27 |
+
<fieldset <?php $this->print_conditional_data(); ?>>
|
28 |
+
<input name="<?php echo esc_attr( $this->get_input_name() ); ?>" type="password" id="<?php echo esc_attr( $this->get_input_name() ); ?>" value="<?php echo esc_attr( $this->value ); ?>"<?php echo !empty( $this->placeholder ) ? ' placeholder="' . esc_attr( $this->placeholder ) . '"' : ''; ?> class="regular-text <?php echo ( $this->small ? 'sap-small-text-input' : '' ); ?>" <?php echo ( $this->disabled ? 'disabled' : ''); ?> />
|
29 |
+
|
30 |
+
<?php $this->display_disabled(); ?>
|
31 |
+
</fieldset>
|
32 |
+
|
33 |
+
<?php
|
34 |
+
|
35 |
+
$this->display_description();
|
36 |
+
}
|
37 |
+
|
38 |
+
}
|
lib/simple-admin-pages/classes/AdminPageSetting.Radio.class.php
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
* @package Simple Admin Pages
|
20 |
*/
|
21 |
|
22 |
-
class
|
23 |
|
24 |
public $sanitize_callback = 'sanitize_text_field';
|
25 |
|
19 |
* @package Simple Admin Pages
|
20 |
*/
|
21 |
|
22 |
+
class sapAdminPageSettingRadio_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
23 |
|
24 |
public $sanitize_callback = 'sanitize_text_field';
|
25 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* @package Simple Admin Pages
|
11 |
*/
|
12 |
|
13 |
-
class
|
14 |
|
15 |
public $sanitize_callback = 'sanitize_text_field';
|
16 |
|
@@ -107,29 +107,32 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
107 |
* @since 2.0.a.8
|
108 |
*/
|
109 |
public $strings = array(
|
110 |
-
'add_rule'
|
111 |
-
'weekly'
|
112 |
-
'monthly'
|
113 |
-
'date'
|
114 |
-
'
|
115 |
-
'
|
116 |
-
'
|
117 |
-
'
|
118 |
-
'
|
119 |
-
'
|
120 |
-
'
|
121 |
-
'
|
122 |
-
'
|
123 |
-
'
|
124 |
-
'
|
125 |
-
'
|
126 |
-
'
|
127 |
-
'
|
128 |
-
'
|
129 |
-
'
|
130 |
-
'
|
131 |
-
'
|
132 |
-
'
|
|
|
|
|
|
|
133 |
);
|
134 |
|
135 |
/**
|
@@ -164,6 +167,11 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
164 |
*/
|
165 |
public $disable_date = false;
|
166 |
|
|
|
|
|
|
|
|
|
|
|
167 |
/**
|
168 |
* Boolean to disable the time selection option
|
169 |
*/
|
@@ -219,6 +227,11 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
219 |
$value[$i]['date'] = esc_attr( $rule['date'] );
|
220 |
}
|
221 |
|
|
|
|
|
|
|
|
|
|
|
222 |
if ( !empty( $rule['time']['start'] ) ) {
|
223 |
$value[$i]['time']['start'] = esc_attr( $rule['time']['start'] );
|
224 |
}
|
@@ -247,18 +260,19 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
247 |
}
|
248 |
|
249 |
$sap_scheduler_settings[ $this->id ] = array(
|
250 |
-
'time_interval'
|
251 |
-
'time_format'
|
252 |
-
'date_format'
|
253 |
-
'template'
|
254 |
-
'weekdays'
|
255 |
-
'weeks'
|
256 |
-
'disable_weekdays'
|
257 |
-
'disable_weeks'
|
258 |
-
'disable_date'
|
259 |
-
'
|
260 |
-
'
|
261 |
-
'
|
|
|
262 |
);
|
263 |
|
264 |
// This gets called multiple times, but only the last call is actually
|
@@ -337,6 +351,9 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
337 |
<?php echo esc_html( $this->strings['monthly'] ); ?>
|
338 |
<?php elseif ( $date_format == 'date' ) : ?>
|
339 |
<?php echo esc_html( $this->strings['date'] ); ?>
|
|
|
|
|
|
|
340 |
<?php endif; ?>
|
341 |
</li>
|
342 |
<?php else : ?>
|
@@ -366,6 +383,14 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
366 |
</li>
|
367 |
<?php endif; ?>
|
368 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
<?php endif; ?>
|
370 |
</ul>
|
371 |
|
@@ -410,6 +435,25 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
410 |
</div>
|
411 |
<?php endif; ?>
|
412 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
</div>
|
414 |
|
415 |
<?php if ( $this->disable_time === false ) : ?>
|
@@ -496,7 +540,9 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
496 |
*/
|
497 |
public function get_date_format( $values ) {
|
498 |
|
499 |
-
if ( !empty( $values['
|
|
|
|
|
500 |
return 'date';
|
501 |
} elseif ( !empty( $values['weeks'] ) ) {
|
502 |
return 'monthly';
|
@@ -513,6 +559,9 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
513 |
if ( $this->disable_date === false ) {
|
514 |
return 'date';
|
515 |
}
|
|
|
|
|
|
|
516 |
}
|
517 |
|
518 |
/**
|
@@ -542,6 +591,9 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
542 |
if ( $this->disable_date === false ) {
|
543 |
$i++;
|
544 |
}
|
|
|
|
|
|
|
545 |
|
546 |
if ( $i > 1 ) {
|
547 |
return true;
|
@@ -562,14 +614,16 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
562 |
}
|
563 |
|
564 |
$this->schedule_summaries = array(
|
565 |
-
'never'
|
566 |
-
'weekly_always'
|
567 |
-
'monthly_weekdays'
|
568 |
-
'monthly_weeks'
|
569 |
-
'all_day'
|
570 |
-
'before'
|
571 |
-
'after'
|
572 |
-
'separator'
|
|
|
|
|
573 |
);
|
574 |
}
|
575 |
|
@@ -579,10 +633,34 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
579 |
*/
|
580 |
public function get_date_summary( $values = array() ) {
|
581 |
|
582 |
-
if ( !empty( $values['date'] ) ) {
|
583 |
return $values['date'];
|
584 |
}
|
585 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
586 |
if ( empty( $values['weekdays'] ) && $this->disable_weekdays === false ) {
|
587 |
return $this->schedule_summaries['never'];
|
588 |
}
|
@@ -688,6 +766,34 @@ class sapAdminPageSettingScheduler_2_6_3 extends sapAdminPageSetting_2_6_3 {
|
|
688 |
}
|
689 |
}
|
690 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
691 |
if ( !empty( $rule['time']['start'] ) ) {
|
692 |
$output[$i]['time']['start'] = call_user_func( $this->sanitize_callback, $rule['time']['start'] );
|
693 |
}
|
10 |
* @package Simple Admin Pages
|
11 |
*/
|
12 |
|
13 |
+
class sapAdminPageSettingScheduler_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
14 |
|
15 |
public $sanitize_callback = 'sanitize_text_field';
|
16 |
|
107 |
* @since 2.0.a.8
|
108 |
*/
|
109 |
public $strings = array(
|
110 |
+
'add_rule' => null, // __( 'Add new scheduling rule', 'textdomain' ),
|
111 |
+
'weekly' => null, // _x( 'Weekly', 'Format of a scheduling rule', 'textdomain' ),
|
112 |
+
'monthly' => null, // _x( 'Monthly', 'Format of a scheduling rule', 'textdomain' ),
|
113 |
+
'date' => null, // _x( 'Date', 'Format of a scheduling rule', 'textdomain' ),
|
114 |
+
'date_range' => null, // _x( 'Date Range', 'Format of a scheduling rule', 'textdomain' ),
|
115 |
+
'weekdays' => null, // _x( 'Days of the week', 'Label for selecting days of the week in a scheduling rule', 'textdomain' ),
|
116 |
+
'month_weeks' => null, // _x( 'Weeks of the month', 'Label for selecting weeks of the month in a scheduling rule', 'textdomain' ),
|
117 |
+
'date_label' => null, // _x( 'Date', 'Label to select a date for a scheduling rule', 'textdomain' ),
|
118 |
+
'time_label' => null, // _x( 'Time', 'Label to select a time slot for a scheduling rule', 'textdomain' ),
|
119 |
+
'allday' => null, // _x( 'All day', 'Label to set a scheduling rule to last all day', 'textdomain' ),
|
120 |
+
'start' => null, // _x( 'Start', 'Label for the starting date/time of a scheduling rule', 'textdomain' ),
|
121 |
+
'end' => null, // _x( 'End', 'Label for the ending date/time of a scheduling rule', 'textdomain' ),
|
122 |
+
'set_time_prompt' => null, // _x( 'All day long. Want to %sset a time slot%s?', 'Prompt displayed when a scheduling rule is set without any time restrictions', 'textdomain' ),
|
123 |
+
'toggle' => null, // _x( 'Open and close this rule', 'Toggle a scheduling rule open and closed', 'textdomain' ),
|
124 |
+
'delete' => null, // _x( 'Delete rule', 'Delete a scheduling rule', 'textdomain' ),
|
125 |
+
'delete_schedule' => null, // __( 'Delete scheduling rule', 'textdomain' ),
|
126 |
+
'never' => null, // _x( 'Never', 'Brief default description of a scheduling rule when no weekdays or weeks are included in the rule', 'textdomain' ),
|
127 |
+
'weekly_always' => null, // _x( 'Every day', 'Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule', 'textdomain' ),
|
128 |
+
'monthly_weekdays' => null, // _x( '%s on the %s week of the month', 'Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. %s should be left alone and will be replaced by a comma-separated list of days and weeks in the following format: M, T, W on the first, second week of the month', 'textdomain' ),
|
129 |
+
'monthly_weeks' => null, // _x( '%s week of the month', 'Brief default description of a scheduling rule when some weeks of the month are included but all or no weekdays are selected. %s should be left alone and will be replaced by a comma-separated list of weeks in the following format: First, second week of the month', 'textdomain' ),
|
130 |
+
'all_day' => null, // _x( 'All day', 'Brief default description of a scheduling rule when no times are set', 'textdomain' ),
|
131 |
+
'before' => null, // _x( 'Ends at', 'Brief default description of a scheduling rule when an end time is set but no start time. If the end time is 6pm, it will read: Ends at 6pm', 'textdomain' ),
|
132 |
+
'after' => null, // _x( 'Starts at', 'Brief default description of a scheduling rule when a start time is set but no end time. If the start time is 6pm, it will read: Starts at 6pm', 'textdomain' ),
|
133 |
+
'separator' => null, // _x( '—', 'Separator between times of a scheduling rule', 'textdomain' ),
|
134 |
+
'date_range_from_today' => null, // _x( 'From Today', 'When Date range start date is not set', 'textdomain' ),
|
135 |
+
'date_range_upto_indefinite' => null // _x( 'Upto Indefinite', 'When Date range end date is not set', 'textdomain' ),
|
136 |
);
|
137 |
|
138 |
/**
|
167 |
*/
|
168 |
public $disable_date = false;
|
169 |
|
170 |
+
/**
|
171 |
+
* Boolean to disable the date range selection option
|
172 |
+
*/
|
173 |
+
public $disable_date_range = false;
|
174 |
+
|
175 |
/**
|
176 |
* Boolean to disable the time selection option
|
177 |
*/
|
227 |
$value[$i]['date'] = esc_attr( $rule['date'] );
|
228 |
}
|
229 |
|
230 |
+
if ( !empty( $rule['date_range'] ) ) {
|
231 |
+
$value[$i]['date_range']['start'] = esc_attr( $rule['date_range']['start'] );
|
232 |
+
$value[$i]['date_range']['end'] = esc_attr( $rule['date_range']['end'] );
|
233 |
+
}
|
234 |
+
|
235 |
if ( !empty( $rule['time']['start'] ) ) {
|
236 |
$value[$i]['time']['start'] = esc_attr( $rule['time']['start'] );
|
237 |
}
|
260 |
}
|
261 |
|
262 |
$sap_scheduler_settings[ $this->id ] = array(
|
263 |
+
'time_interval' => $this->time_interval,
|
264 |
+
'time_format' => $this->time_format,
|
265 |
+
'date_format' => $this->date_format,
|
266 |
+
'template' => $this->get_template(),
|
267 |
+
'weekdays' => $this->weekdays,
|
268 |
+
'weeks' => $this->weeks,
|
269 |
+
'disable_weekdays' => $this->disable_weekdays,
|
270 |
+
'disable_weeks' => $this->disable_weeks,
|
271 |
+
'disable_date' => $this->disable_date,
|
272 |
+
'disable_date_range' => $this->disable_date_range,
|
273 |
+
'disable_time' => $this->disable_time,
|
274 |
+
'disable_multiple' => $this->disable_multiple,
|
275 |
+
'summaries' => $this->schedule_summaries,
|
276 |
);
|
277 |
|
278 |
// This gets called multiple times, but only the last call is actually
|
351 |
<?php echo esc_html( $this->strings['monthly'] ); ?>
|
352 |
<?php elseif ( $date_format == 'date' ) : ?>
|
353 |
<?php echo esc_html( $this->strings['date'] ); ?>
|
354 |
+
<?php elseif ( $date_format == 'date_range' ) : ?>
|
355 |
+
<?php echo esc_html( $this->strings['date_range'] ); ?>
|
356 |
+
|
357 |
<?php endif; ?>
|
358 |
</li>
|
359 |
<?php else : ?>
|
383 |
</li>
|
384 |
<?php endif; ?>
|
385 |
|
386 |
+
<?php if ( $this->disable_date_range === false ) : ?>
|
387 |
+
<li>
|
388 |
+
<a href="#" data-format="date_range"<?php echo $date_format == 'date_range' ? ' class="selected"' : ''; ?>>
|
389 |
+
<?php echo $this->strings['date_range']; ?>
|
390 |
+
</a>
|
391 |
+
</li>
|
392 |
+
<?php endif; ?>
|
393 |
+
|
394 |
<?php endif; ?>
|
395 |
</ul>
|
396 |
|
435 |
</div>
|
436 |
<?php endif; ?>
|
437 |
|
438 |
+
<?php if ( $this->disable_date_range === false ) : ?>
|
439 |
+
<?php $range_start_name = "{$this->get_input_name()}[{$id}][date_range][start]"; ?>
|
440 |
+
<?php $range_end_name = "{$this->get_input_name()}[{$id}][date_range][end]"; ?>
|
441 |
+
<div class="sap-scheduler-date-range-input">
|
442 |
+
<div class="date-range-start">
|
443 |
+
<label for="<?php echo $range_start_name; ?>">
|
444 |
+
<?php echo $this->strings['start']; ?>
|
445 |
+
</label>
|
446 |
+
<input type="text" name="<?php echo $range_start_name; ?>" id="<?php echo $range_start_name; ?>" value="<?php echo empty( $values['date_range']['start'] ) ? '' : $values['date_range']['start']; ?>">
|
447 |
+
</div>
|
448 |
+
<div class="date-range-end">
|
449 |
+
<label for="<?php echo $range_end_name; ?>">
|
450 |
+
<?php echo $this->strings['end']; ?>
|
451 |
+
</label>
|
452 |
+
<input type="text" name="<?php echo $range_end_name; ?>" id="<?php echo $range_end_name; ?>" value="<?php echo empty( $values['date_range']['end'] ) ? '' : $values['date_range']['end']; ?>">
|
453 |
+
</div>
|
454 |
+
</div>
|
455 |
+
<?php endif; ?>
|
456 |
+
|
457 |
</div>
|
458 |
|
459 |
<?php if ( $this->disable_time === false ) : ?>
|
540 |
*/
|
541 |
public function get_date_format( $values ) {
|
542 |
|
543 |
+
if ( !empty( $values['date_range'] ) ) {
|
544 |
+
return 'date_range';
|
545 |
+
} elseif ( !empty( $values['date'] ) ) {
|
546 |
return 'date';
|
547 |
} elseif ( !empty( $values['weeks'] ) ) {
|
548 |
return 'monthly';
|
559 |
if ( $this->disable_date === false ) {
|
560 |
return 'date';
|
561 |
}
|
562 |
+
if ( $this->disable_date_range === false ) {
|
563 |
+
return 'date_range';
|
564 |
+
}
|
565 |
}
|
566 |
|
567 |
/**
|
591 |
if ( $this->disable_date === false ) {
|
592 |
$i++;
|
593 |
}
|
594 |
+
if ( $this->disable_date_range === false ) {
|
595 |
+
$i++;
|
596 |
+
}
|
597 |
|
598 |
if ( $i > 1 ) {
|
599 |
return true;
|
614 |
}
|
615 |
|
616 |
$this->schedule_summaries = array(
|
617 |
+
'never' => $this->strings['never'],
|
618 |
+
'weekly_always' => $this->strings['weekly_always'],
|
619 |
+
'monthly_weekdays' => sprintf( $this->strings['monthly_weekdays'], '{days}', '{weeks}' ),
|
620 |
+
'monthly_weeks' => sprintf( $this->strings['monthly_weeks'], '{weeks}' ),
|
621 |
+
'all_day' => $this->strings['all_day'],
|
622 |
+
'before' => $this->strings['before'],
|
623 |
+
'after' => $this->strings['after'],
|
624 |
+
'separator' => $this->strings['separator'],
|
625 |
+
'from_today' => $this->strings['date_range_from_today'],
|
626 |
+
'upto_indefinite' => $this->strings['date_range_upto_indefinite'],
|
627 |
);
|
628 |
}
|
629 |
|
633 |
*/
|
634 |
public function get_date_summary( $values = array() ) {
|
635 |
|
636 |
+
if ( isset( $values['date'] ) && !empty( $values['date'] ) ) {
|
637 |
return $values['date'];
|
638 |
}
|
639 |
|
640 |
+
if ( isset( $values['date_range'] ) && !empty( $values['date_range']['start'] ) ) {
|
641 |
+
|
642 |
+
$date_range = '';
|
643 |
+
|
644 |
+
if( empty( $values['date_range']['start'] ) ) {
|
645 |
+
$date_range .= $this->schedule_summaries['from_today'];
|
646 |
+
}
|
647 |
+
else {
|
648 |
+
$date_range .= $values['date_range']['start'];
|
649 |
+
}
|
650 |
+
|
651 |
+
$date_range .= ' - ';
|
652 |
+
|
653 |
+
|
654 |
+
if( empty( $values['date_range']['end'] ) ) {
|
655 |
+
$date_range .= $this->schedule_summaries['upto_indefinite'];
|
656 |
+
}
|
657 |
+
else {
|
658 |
+
$date_range .= $values['date_range']['end'];
|
659 |
+
}
|
660 |
+
|
661 |
+
return $date_range;
|
662 |
+
}
|
663 |
+
|
664 |
if ( empty( $values['weekdays'] ) && $this->disable_weekdays === false ) {
|
665 |
return $this->schedule_summaries['never'];
|
666 |
}
|
766 |
}
|
767 |
}
|
768 |
|
769 |
+
if (
|
770 |
+
! empty( $rule['date_range']['start'] )
|
771 |
+
||
|
772 |
+
! empty( $rule['date_range']['end'] )
|
773 |
+
&&
|
774 |
+
! ( empty( $rule['date_range']['start'] ) && empty( $rule['date_range']['end'] ) )
|
775 |
+
) {
|
776 |
+
if( ! empty( $rule['date_range']['start'] ) ) {
|
777 |
+
$date = new DateTime( $rule['date_range']['start'] );
|
778 |
+
if( checkdate( $date->format( 'n' ), $date->format( 'j' ), $date->format( 'Y' ) ) ) {
|
779 |
+
$output[$i]['date_range']['start'] = call_user_func( $this->sanitize_callback, $rule['date_range']['start'] );
|
780 |
+
}
|
781 |
+
}
|
782 |
+
else {
|
783 |
+
$output[$i]['date_range']['start'] = '';
|
784 |
+
}
|
785 |
+
|
786 |
+
if( ! empty( $rule['date_range']['end'] ) ) {
|
787 |
+
$date = new DateTime( $rule['date_range']['end'] );
|
788 |
+
if( checkdate( $date->format( 'n' ), $date->format( 'j' ), $date->format( 'Y' ) ) ) {
|
789 |
+
$output[$i]['date_range']['end'] = call_user_func( $this->sanitize_callback, $rule['date_range']['end'] );
|
790 |
+
}
|
791 |
+
}
|
792 |
+
else {
|
793 |
+
$output[$i]['date_range']['end'] = '';
|
794 |
+
}
|
795 |
+
}
|
796 |
+
|
797 |
if ( !empty( $rule['time']['start'] ) ) {
|
798 |
$output[$i]['time']['start'] = call_user_func( $this->sanitize_callback, $rule['time']['start'] );
|
799 |
}
|
lib/simple-admin-pages/classes/AdminPageSetting.Select.class.php
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
* @package Simple Admin Pages
|
22 |
*/
|
23 |
|
24 |
-
class
|
25 |
|
26 |
public $sanitize_callback = 'sanitize_text_field';
|
27 |
|
21 |
* @package Simple Admin Pages
|
22 |
*/
|
23 |
|
24 |
+
class sapAdminPageSettingSelect_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
25 |
|
26 |
public $sanitize_callback = 'sanitize_text_field';
|
27 |
|
lib/simple-admin-pages/classes/AdminPageSetting.SelectMenu.class.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
* @package Simple Admin Pages
|
18 |
*/
|
19 |
|
20 |
-
class
|
21 |
|
22 |
public $sanitize_callback = 'intval';
|
23 |
|
17 |
* @package Simple Admin Pages
|
18 |
*/
|
19 |
|
20 |
+
class sapAdminPageSettingSelectMenu_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
21 |
|
22 |
public $sanitize_callback = 'intval';
|
23 |
|
lib/simple-admin-pages/classes/AdminPageSetting.SelectPost.class.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
* @package Simple Admin Pages
|
18 |
*/
|
19 |
|
20 |
-
class
|
21 |
|
22 |
public $sanitize_callback = 'intval';
|
23 |
|
17 |
* @package Simple Admin Pages
|
18 |
*/
|
19 |
|
20 |
+
class sapAdminPageSettingSelectPost_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
21 |
|
22 |
public $sanitize_callback = 'intval';
|
23 |
|
lib/simple-admin-pages/classes/AdminPageSetting.SelectTaxonomy.class.php
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
* @package Simple Admin Pages
|
20 |
*/
|
21 |
|
22 |
-
class
|
23 |
|
24 |
public $sanitize_callback = 'intval';
|
25 |
|
19 |
* @package Simple Admin Pages
|
20 |
*/
|
21 |
|
22 |
+
class sapAdminPageSettingSelectTaxonomy_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
23 |
|
24 |
public $sanitize_callback = 'intval';
|
25 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Text.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSettingText_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Textarea.class.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @todo textareas should have an option to swap new lines for <br>s
|
10 |
*/
|
11 |
|
12 |
-
class
|
13 |
|
14 |
/*
|
15 |
* Size of this textarea
|
9 |
* @todo textareas should have an option to swap new lines for <br>s
|
10 |
*/
|
11 |
|
12 |
+
class sapAdminPageSettingTextarea_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
13 |
|
14 |
/*
|
15 |
* Size of this textarea
|
lib/simple-admin-pages/classes/AdminPageSetting.Time.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSettingTime_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Toggle.class.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
* @package Simple Admin Pages
|
18 |
*/
|
19 |
|
20 |
-
class
|
21 |
|
22 |
public $sanitize_callback = 'sanitize_text_field';
|
23 |
|
17 |
* @package Simple Admin Pages
|
18 |
*/
|
19 |
|
20 |
+
class sapAdminPageSettingToggle_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
21 |
|
22 |
public $sanitize_callback = 'sanitize_text_field';
|
23 |
|
lib/simple-admin-pages/classes/AdminPageSetting.WarningTip.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSettingWarningTip_2_6_9 extends sapAdminPageSetting_2_6_9 {
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
lib/simple-admin-pages/classes/AdminPageSetting.class.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* @package Simple Admin Pages
|
17 |
*/
|
18 |
|
19 |
-
abstract class
|
20 |
|
21 |
// Page defaults
|
22 |
public $id; // used in form fields and database to track and store setting
|
@@ -158,7 +158,12 @@ abstract class sapAdminPageSetting_2_6_3 {
|
|
158 |
$this->{$key} = esc_attr( $val );
|
159 |
|
160 |
default :
|
161 |
-
$this->{$key}
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
}
|
164 |
}
|
@@ -347,7 +352,7 @@ abstract class sapAdminPageSetting_2_6_3 {
|
|
347 |
*
|
348 |
* @since 2.4.1
|
349 |
*/
|
350 |
-
public function get_default_setting() {
|
351 |
return ! empty( $this->default ) ? $this->default : $this->value;
|
352 |
}
|
353 |
|
16 |
* @package Simple Admin Pages
|
17 |
*/
|
18 |
|
19 |
+
abstract class sapAdminPageSetting_2_6_9 {
|
20 |
|
21 |
// Page defaults
|
22 |
public $id; // used in form fields and database to track and store setting
|
158 |
$this->{$key} = esc_attr( $val );
|
159 |
|
160 |
default :
|
161 |
+
if( property_exists( $this, $key ) && is_array( $this->{$key} ) ) {
|
162 |
+
$this->{$key} = array_replace( $this->{$key}, $val );
|
163 |
+
}
|
164 |
+
else {
|
165 |
+
$this->{$key} = $val;
|
166 |
+
}
|
167 |
|
168 |
}
|
169 |
}
|
352 |
*
|
353 |
* @since 2.4.1
|
354 |
*/
|
355 |
+
public function get_default_setting( $default_override = null ) {
|
356 |
return ! empty( $this->default ) ? $this->default : $this->value;
|
357 |
}
|
358 |
|
lib/simple-admin-pages/classes/Library.class.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
if ( !class_exists( '
|
3 |
/**
|
4 |
* This library class loads and provides access to the correct version of the
|
5 |
* Simple Admin Pages library.
|
@@ -7,10 +7,10 @@ if ( !class_exists( 'sapLibrary_2_6_3' ) ) {
|
|
7 |
* @since 1.0
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
// Version of the library
|
13 |
-
private $version = '2.6.
|
14 |
|
15 |
// A full URL to the library which is used to correctly link scripts and
|
16 |
// stylesheets.
|
@@ -49,7 +49,7 @@ class sapLibrary_2_6_3 {
|
|
49 |
public function __construct( $args ) {
|
50 |
|
51 |
if ( ! defined( 'SAP_VERSION' ) ) {
|
52 |
-
define( 'SAP_VERSION', '2.6.
|
53 |
}
|
54 |
|
55 |
// If no URL path to the library is passed, we won't be able to add the
|
@@ -221,6 +221,10 @@ class sapLibrary_2_6_3 {
|
|
221 |
require_once('AdminPageSetting.Ordering.class.php');
|
222 |
return $this->get_versioned_classname( 'sapAdminPageSettingOrdering' );
|
223 |
|
|
|
|
|
|
|
|
|
224 |
case 'mcapikey' :
|
225 |
require_once('AdminPageSetting.McApiKey.class.php');
|
226 |
return $this->get_versioned_classname( 'mcfrtbAdminPageSettingMcApiKey' );
|
@@ -229,6 +233,10 @@ class sapLibrary_2_6_3 {
|
|
229 |
require_once('AdminPageSetting.McListMerge.class.php');
|
230 |
return $this->get_versioned_classname( 'mcfrtbAdminPageSettingMcListMerge' );
|
231 |
|
|
|
|
|
|
|
|
|
232 |
default :
|
233 |
|
234 |
// Exit early if a custom type is declared without providing the
|
1 |
<?php
|
2 |
+
if ( !class_exists( 'sapLibrary_2_6_9' ) ) {
|
3 |
/**
|
4 |
* This library class loads and provides access to the correct version of the
|
5 |
* Simple Admin Pages library.
|
7 |
* @since 1.0
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
+
class sapLibrary_2_6_9 {
|
11 |
|
12 |
// Version of the library
|
13 |
+
private $version = '2.6.9';
|
14 |
|
15 |
// A full URL to the library which is used to correctly link scripts and
|
16 |
// stylesheets.
|
49 |
public function __construct( $args ) {
|
50 |
|
51 |
if ( ! defined( 'SAP_VERSION' ) ) {
|
52 |
+
define( 'SAP_VERSION', '2.6.9' );
|
53 |
}
|
54 |
|
55 |
// If no URL path to the library is passed, we won't be able to add the
|
221 |
require_once('AdminPageSetting.Ordering.class.php');
|
222 |
return $this->get_versioned_classname( 'sapAdminPageSettingOrdering' );
|
223 |
|
224 |
+
case 'time' :
|
225 |
+
require_once('AdminPageSetting.Time.class.php');
|
226 |
+
return $this->get_versioned_classname( 'sapAdminPageSettingTime' );
|
227 |
+
|
228 |
case 'mcapikey' :
|
229 |
require_once('AdminPageSetting.McApiKey.class.php');
|
230 |
return $this->get_versioned_classname( 'mcfrtbAdminPageSettingMcApiKey' );
|
233 |
require_once('AdminPageSetting.McListMerge.class.php');
|
234 |
return $this->get_versioned_classname( 'mcfrtbAdminPageSettingMcListMerge' );
|
235 |
|
236 |
+
case 'password' :
|
237 |
+
require_once('AdminPageSetting.Password.class.php');
|
238 |
+
return $this->get_versioned_classname( 'sapAdminPageSettingPassword' );
|
239 |
+
|
240 |
default :
|
241 |
|
242 |
// Exit early if a custom type is declared without providing the
|
lib/simple-admin-pages/css/admin-settings.css
CHANGED
@@ -78,6 +78,7 @@
|
|
78 |
font-size: 18px;
|
79 |
color: var(--main-color, #1b335f);
|
80 |
margin: 0 0 32px !important;
|
|
|
81 |
}
|
82 |
|
83 |
.wrap.sap-settings-page form h2:nth-of-type(1n+2) {
|
@@ -552,6 +553,7 @@ fieldset.sap-colorpicker {
|
|
552 |
.sap-new-admin-add-button:hover {
|
553 |
background: #f5f5f5;
|
554 |
color: #888;
|
|
|
555 |
}
|
556 |
.sap-infinite-table-row-delete,
|
557 |
.sap-custom-fields-add-nutrional-information {
|
@@ -660,3 +662,15 @@ Lightbox Icon Selection
|
|
660 |
margin-left: 8px;
|
661 |
height: 60px;
|
662 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
font-size: 18px;
|
79 |
color: var(--main-color, #1b335f);
|
80 |
margin: 0 0 32px !important;
|
81 |
+
display: inline-block;
|
82 |
}
|
83 |
|
84 |
.wrap.sap-settings-page form h2:nth-of-type(1n+2) {
|
553 |
.sap-new-admin-add-button:hover {
|
554 |
background: #f5f5f5;
|
555 |
color: #888;
|
556 |
+
cursor: pointer;
|
557 |
}
|
558 |
.sap-infinite-table-row-delete,
|
559 |
.sap-custom-fields-add-nutrional-information {
|
662 |
margin-left: 8px;
|
663 |
height: 60px;
|
664 |
}
|
665 |
+
|
666 |
+
|
667 |
+
/*************************/
|
668 |
+
/**** VIDEO TUTORIALS ****/
|
669 |
+
/*************************/
|
670 |
+
.sap-tutorial-toggle {
|
671 |
+
margin: -4px 0 0 16px !important
|
672 |
+
}
|
673 |
+
.sap-tutorial-div {
|
674 |
+
width: 100%;
|
675 |
+
margin-bottom: 32px;
|
676 |
+
}
|
lib/simple-admin-pages/css/admin.css
CHANGED
@@ -104,7 +104,8 @@ input.sap-opening-hours-hours {
|
|
104 |
text-align: center;
|
105 |
}
|
106 |
.sap-scheduler-date .label,
|
107 |
-
.sap-scheduler-date-input label
|
|
|
108 |
display: block;
|
109 |
font-style: italic;
|
110 |
text-align: left;
|
@@ -118,19 +119,33 @@ input.sap-opening-hours-hours {
|
|
118 |
.sap-scheduler-date label {
|
119 |
display: block;
|
120 |
}
|
121 |
-
.sap-scheduler-date-input
|
|
|
122 |
display: none;
|
123 |
margin-top: 1em;
|
124 |
-
}
|
125 |
-
|
126 |
-
.sap-scheduler-date.date .sap-scheduler-weekdays {
|
127 |
-
display: none;
|
128 |
-
}
|
129 |
.sap-scheduler-date.weekly .sap-scheduler-weeks,
|
130 |
-
.sap-scheduler-date.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
display: none;
|
132 |
}
|
133 |
-
.sap-scheduler-date.
|
|
|
|
|
|
|
134 |
display: block;
|
135 |
}
|
136 |
.sap-scheduler-time {
|
104 |
text-align: center;
|
105 |
}
|
106 |
.sap-scheduler-date .label,
|
107 |
+
.sap-scheduler-date-input label,
|
108 |
+
.sap-scheduler-date-range-input label {
|
109 |
display: block;
|
110 |
font-style: italic;
|
111 |
text-align: left;
|
119 |
.sap-scheduler-date label {
|
120 |
display: block;
|
121 |
}
|
122 |
+
/* .sap-scheduler-date-input,
|
123 |
+
.sap-scheduler-date-range-input {
|
124 |
display: none;
|
125 |
margin-top: 1em;
|
126 |
+
} */
|
127 |
+
|
|
|
|
|
|
|
128 |
.sap-scheduler-date.weekly .sap-scheduler-weeks,
|
129 |
+
.sap-scheduler-date.weekly .sap-scheduler-date-input,
|
130 |
+
.sap-scheduler-date.weekly .sap-scheduler-date-range-input,
|
131 |
+
|
132 |
+
.sap-scheduler-date.monthly .sap-scheduler-date-input,
|
133 |
+
.sap-scheduler-date.monthly .sap-scheduler-date-range-input,
|
134 |
+
|
135 |
+
.sap-scheduler-date.date .sap-scheduler-weekdays,
|
136 |
+
.sap-scheduler-date.date .sap-scheduler-weeks,
|
137 |
+
.sap-scheduler-date.date .sap-scheduler-date-range-input,
|
138 |
+
|
139 |
+
/* date_range with underscore is directly from php, where everywhere date_range is with underscore */
|
140 |
+
.sap-scheduler-date.date_range .sap-scheduler-weekdays,
|
141 |
+
.sap-scheduler-date.date_range .sap-scheduler-date-input,
|
142 |
+
.sap-scheduler-date.date_range .sap-scheduler-weeks {
|
143 |
display: none;
|
144 |
}
|
145 |
+
.sap-scheduler-date.weekly .sap-scheduler-weekdays
|
146 |
+
.sap-scheduler-date.monthly .sap-scheduler-weeks,
|
147 |
+
.sap-scheduler-date.date .sap-scheduler-date-input,
|
148 |
+
.sap-scheduler-date.date-range .sap-scheduler-date-range-input {
|
149 |
display: block;
|
150 |
}
|
151 |
.sap-scheduler-time {
|
lib/simple-admin-pages/js/admin-settings.js
CHANGED
@@ -102,4 +102,21 @@ jQuery( document ).ready( function() {
|
|
102 |
setTimeout( resizeLockdownBoxes, 750 );
|
103 |
setInterval( resizeLockdownBoxes, 3000 );
|
104 |
jQuery( window ).on( 'resize', resizeLockdownBoxes );
|
105 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
setTimeout( resizeLockdownBoxes, 750 );
|
103 |
setInterval( resizeLockdownBoxes, 3000 );
|
104 |
jQuery( window ).on( 'resize', resizeLockdownBoxes );
|
105 |
+
});
|
106 |
+
|
107 |
+
/* TUTORIAL VIDEOS */
|
108 |
+
jQuery( document ).ready( function() {
|
109 |
+
|
110 |
+
if ( ! jQuery( '.sap-tutorial-div' ).length ) { return; }
|
111 |
+
|
112 |
+
var tutorial_div = jQuery( '.sap-tutorial-div' );
|
113 |
+
|
114 |
+
tutorial_div.next().insertBefore( tutorial_div );
|
115 |
+
|
116 |
+
jQuery( '.sap-parent-form h2:first-of-type' ).after( '<div class="sap-tutorial-toggle button button-primary">Video Tutorial</div>' );
|
117 |
+
|
118 |
+
jQuery( document ).on('click', '.sap-tutorial-toggle', function( event ) {
|
119 |
+
|
120 |
+
jQuery( '.sap-tutorial-div' ).toggle();
|
121 |
+
} );
|
122 |
+
} );
|
lib/simple-admin-pages/js/scheduler.js
CHANGED
@@ -74,15 +74,33 @@ jQuery(document).ready(function ($) {
|
|
74 |
|
75 |
var date = $(this).closest( '.sap-scheduler-date' );
|
76 |
|
77 |
-
if ( $(this).data( 'format' ) == '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
date.children( '.sap-scheduler-weeks' ).slideUp( function() {
|
79 |
$(this).find( 'input' ).prop('checked', false);
|
80 |
});
|
81 |
date.children( '.sap-scheduler-date-input' ).slideUp( function() {
|
82 |
$(this).find( 'input' ).val( '' );
|
83 |
});
|
|
|
|
|
|
|
84 |
date.children( '.sap-scheduler-weekdays' ).slideDown( function() {
|
85 |
-
date.removeClass( 'monthly date' );
|
86 |
date.addClass( 'weekly' );
|
87 |
});
|
88 |
|
@@ -90,9 +108,12 @@ jQuery(document).ready(function ($) {
|
|
90 |
date.children( '.sap-scheduler-date-input' ).slideUp( function() {
|
91 |
$(this).find( 'input' ).val( '' );
|
92 |
});
|
|
|
|
|
|
|
93 |
date.children( '.sap-scheduler-weekdays' ).slideDown();
|
94 |
date.children( '.sap-scheduler-weeks' ).slideDown( function() {
|
95 |
-
date.removeClass( 'weekly date' );
|
96 |
date.addClass( 'monthly' );
|
97 |
});
|
98 |
|
@@ -103,8 +124,11 @@ jQuery(document).ready(function ($) {
|
|
103 |
date.children( '.sap-scheduler-weeks' ).slideUp( function() {
|
104 |
$(this).find( 'input' ).prop('checked', false);
|
105 |
});
|
|
|
|
|
|
|
106 |
date.children( '.sap-scheduler-date-input' ).slideDown( function() {
|
107 |
-
date.removeClass( 'weekly monthly' );
|
108 |
date.addClass( 'date' );
|
109 |
});
|
110 |
}
|
@@ -208,6 +232,29 @@ jQuery(document).ready(function ($) {
|
|
208 |
return;
|
209 |
}
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
var weekdays = 0;
|
212 |
var weekday_arr = new Array();
|
213 |
scheduler_rule.find( '.sap-scheduler-weekdays input' ).each( function() {
|
@@ -295,7 +342,7 @@ jQuery(document).ready(function ($) {
|
|
295 |
* Register a new datepicker on an element
|
296 |
*/
|
297 |
function sap_scheduler_register_datepicker( el ) {
|
298 |
-
|
299 |
el.pickadate({
|
300 |
format: obj.date_format,
|
301 |
formatSubmit: 'yyyy/mm/dd',
|
@@ -351,6 +398,7 @@ jQuery(document).ready(function ($) {
|
|
351 |
for ( var key in sap_scheduler.settings ) {
|
352 |
var obj = sap_scheduler.settings[key];
|
353 |
sap_scheduler_register_datepicker( $( '#' + key + ' .sap-scheduler-date-input input[type="text"]' ) );
|
|
|
354 |
sap_scheduler_register_timepicker( $( '#' + key + ' .sap-scheduler-time-input input[type="text"]' ) );
|
355 |
|
356 |
$( '#' + key + ' .sap-scheduler-rule' ).each( function() {
|
@@ -375,6 +423,7 @@ jQuery(document).ready(function ($) {
|
|
375 |
var scheduler_settings = sap_scheduler.settings[ scheduler_id ];
|
376 |
scheduler.append( scheduler_settings.template.replace( /\[0\]/g, '[' + scheduler.children( '.sap-scheduler-rule' ).length + ']' ) );
|
377 |
sap_scheduler_register_datepicker( scheduler.last( '#' + scheduler_id + ' .sap-scheduler-rule' ).find( '.sap-scheduler-date-input input[type="text"]' ) );
|
|
|
378 |
sap_scheduler_register_timepicker( scheduler.last( '#' + scheduler_id + ' .sap-scheduler-rule' ).find( '.sap-scheduler-time-input input[type="text"]' ) );
|
379 |
sap_scheduler_register_events();
|
380 |
|
74 |
|
75 |
var date = $(this).closest( '.sap-scheduler-date' );
|
76 |
|
77 |
+
if ( $(this).data( 'format' ) == 'date_range' && date.hasClass( 'date_range' ) === false ) {
|
78 |
+
date.children( '.sap-scheduler-weekdays' ).slideUp(250, function() {
|
79 |
+
$(this).find( 'input' ).prop('checked', false);
|
80 |
+
});
|
81 |
+
date.children( '.sap-scheduler-weeks' ).slideUp(250, function() {
|
82 |
+
$(this).find( 'input' ).prop('checked', false);
|
83 |
+
});
|
84 |
+
date.children( '.sap-scheduler-date-input' ).slideUp(250, function() {
|
85 |
+
$(this).find( 'input' ).val( '' );
|
86 |
+
});
|
87 |
+
date.children( '.sap-scheduler-date-range-input' ).slideDown( function() {
|
88 |
+
date.removeClass( 'weekly monthly date' );
|
89 |
+
date.addClass( 'date_range' );
|
90 |
+
});
|
91 |
+
|
92 |
+
} else if ( $(this).data( 'format' ) == 'weekly' && date.hasClass( 'weekly' ) === false ) {
|
93 |
date.children( '.sap-scheduler-weeks' ).slideUp( function() {
|
94 |
$(this).find( 'input' ).prop('checked', false);
|
95 |
});
|
96 |
date.children( '.sap-scheduler-date-input' ).slideUp( function() {
|
97 |
$(this).find( 'input' ).val( '' );
|
98 |
});
|
99 |
+
date.children( '.sap-scheduler-date-range-input' ).slideUp( function() {
|
100 |
+
$(this).find( 'input' ).val( '' );
|
101 |
+
});
|
102 |
date.children( '.sap-scheduler-weekdays' ).slideDown( function() {
|
103 |
+
date.removeClass( 'monthly date date_range' );
|
104 |
date.addClass( 'weekly' );
|
105 |
});
|
106 |
|
108 |
date.children( '.sap-scheduler-date-input' ).slideUp( function() {
|
109 |
$(this).find( 'input' ).val( '' );
|
110 |
});
|
111 |
+
date.children( '.sap-scheduler-date-range-input' ).slideUp( function() {
|
112 |
+
$(this).find( 'input' ).val( '' );
|
113 |
+
});
|
114 |
date.children( '.sap-scheduler-weekdays' ).slideDown();
|
115 |
date.children( '.sap-scheduler-weeks' ).slideDown( function() {
|
116 |
+
date.removeClass( 'weekly date date_range' );
|
117 |
date.addClass( 'monthly' );
|
118 |
});
|
119 |
|
124 |
date.children( '.sap-scheduler-weeks' ).slideUp( function() {
|
125 |
$(this).find( 'input' ).prop('checked', false);
|
126 |
});
|
127 |
+
date.children( '.sap-scheduler-date-range-input' ).slideUp( function() {
|
128 |
+
$(this).find( 'input' ).val( '' );
|
129 |
+
});
|
130 |
date.children( '.sap-scheduler-date-input' ).slideDown( function() {
|
131 |
+
date.removeClass( 'weekly monthly date_range' );
|
132 |
date.addClass( 'date' );
|
133 |
});
|
134 |
}
|
232 |
return;
|
233 |
}
|
234 |
|
235 |
+
var date_range_start_value = scheduler_rule.find( '.sap-scheduler-date-range-input .date-range-start input' ).val();
|
236 |
+
var date_range_end_value = scheduler_rule.find( '.sap-scheduler-date-range-input .date-range-end input' ).val();
|
237 |
+
var phrase = '';
|
238 |
+
if (
|
239 |
+
typeof date_range_start_value !== 'undefined' && date_range_start_value != ''
|
240 |
+
||
|
241 |
+
typeof date_range_end_value !== 'undefined' && date_range_end_value != ''
|
242 |
+
) {
|
243 |
+
phrase = typeof date_range_start_value !== 'undefined' && date_range_start_value != ''
|
244 |
+
? date_range_start_value
|
245 |
+
: sap_scheduler.settings[scheduler_id].summaries['from_today'];
|
246 |
+
|
247 |
+
phrase += '' == phrase ? phrase : ' - ';
|
248 |
+
|
249 |
+
phrase += typeof date_range_end_value !== 'undefined' && date_range_end_value != ''
|
250 |
+
? date_range_end_value
|
251 |
+
: sap_scheduler.settings[scheduler_id].summaries['upto_indefinite'];
|
252 |
+
|
253 |
+
scheduler_rule.find( '.sap-scheduler-brief .date .value' ).html( phrase );
|
254 |
+
|
255 |
+
return;
|
256 |
+
}
|
257 |
+
|
258 |
var weekdays = 0;
|
259 |
var weekday_arr = new Array();
|
260 |
scheduler_rule.find( '.sap-scheduler-weekdays input' ).each( function() {
|
342 |
* Register a new datepicker on an element
|
343 |
*/
|
344 |
function sap_scheduler_register_datepicker( el ) {
|
345 |
+
|
346 |
el.pickadate({
|
347 |
format: obj.date_format,
|
348 |
formatSubmit: 'yyyy/mm/dd',
|
398 |
for ( var key in sap_scheduler.settings ) {
|
399 |
var obj = sap_scheduler.settings[key];
|
400 |
sap_scheduler_register_datepicker( $( '#' + key + ' .sap-scheduler-date-input input[type="text"]' ) );
|
401 |
+
sap_scheduler_register_datepicker( $( '#' + key + ' .sap-scheduler-date-range-input input[type="text"]' ) );
|
402 |
sap_scheduler_register_timepicker( $( '#' + key + ' .sap-scheduler-time-input input[type="text"]' ) );
|
403 |
|
404 |
$( '#' + key + ' .sap-scheduler-rule' ).each( function() {
|
423 |
var scheduler_settings = sap_scheduler.settings[ scheduler_id ];
|
424 |
scheduler.append( scheduler_settings.template.replace( /\[0\]/g, '[' + scheduler.children( '.sap-scheduler-rule' ).length + ']' ) );
|
425 |
sap_scheduler_register_datepicker( scheduler.last( '#' + scheduler_id + ' .sap-scheduler-rule' ).find( '.sap-scheduler-date-input input[type="text"]' ) );
|
426 |
+
sap_scheduler_register_datepicker( scheduler.last( '#' + scheduler_id + ' .sap-scheduler-rule' ).find( '.sap-scheduler-date-range-input input[type="text"]' ) );
|
427 |
sap_scheduler_register_timepicker( scheduler.last( '#' + scheduler_id + ' .sap-scheduler-rule' ).find( '.sap-scheduler-time-input input[type="text"]' ) );
|
428 |
sap_scheduler_register_events();
|
429 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Rustaurius, EtoileWebDesign
|
|
3 |
Tags: faq, faqs, accordion, woocommerce faq, gutenberg faq, faq block
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 6.1
|
6 |
-
Stable tag: 2.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -261,6 +261,15 @@ For more info about the premium version, please see here: https://doc.etoilewebd
|
|
261 |
|
262 |
== Changelog ==
|
263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
= 2.1.18 (2022-10-13) =
|
265 |
- Fixed an issue in which, if the include_category attribute was used in the search shortcode, multiple categories would display if some of the FAQs matching that category were in multiple categories.
|
266 |
|
3 |
Tags: faq, faqs, accordion, woocommerce faq, gutenberg faq, faq block
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 6.1
|
6 |
+
Stable tag: 2.2.0
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
261 |
|
262 |
== Changelog ==
|
263 |
|
264 |
+
= 2.2.0 (2022-12-08) =
|
265 |
+
- Added new tutorial videos to the settings pages that explain and show what each option does.
|
266 |
+
- Added quick links to the admin about page to re-run the walk-through, view tutorial videos and suggest a feature.
|
267 |
+
- Added new parameters to the Display FAQs block and the ultimate-faqs shortcode that let you enable/disable FAQ accordion and category accordion.
|
268 |
+
- Updated dropdown block parameters to have a default value.
|
269 |
+
- Accessibility updates (e.g. for the Expand button and the FAQ search label).
|
270 |
+
- Tested with PHP 8.1.
|
271 |
+
- Updated the export class for PHP 8 compatibility.
|
272 |
+
|
273 |
= 2.1.18 (2022-10-13) =
|
274 |
- Fixed an issue in which, if the include_category attribute was used in the search shortcode, multiple categories would display if some of the FAQs matching that category were in multiple categories.
|
275 |
|
ultimate-faqs.php
CHANGED
@@ -6,9 +6,9 @@ Description: FAQ and accordion plugin with easy to use Gutenberg blocks, shortco
|
|
6 |
Author URI: https://www.etoilewebdesign.com/
|
7 |
Terms and Conditions: https://www.etoilewebdesign.com/plugin-terms-and-conditions/
|
8 |
Text Domain: ultimate-faqs
|
9 |
-
Version: 2.
|
10 |
WC requires at least: 3.0
|
11 |
-
WC tested up to:
|
12 |
*/
|
13 |
|
14 |
if ( ! defined( 'ABSPATH' ) )
|
@@ -46,7 +46,7 @@ class ewdufaqInit {
|
|
46 |
define( 'EWD_UFAQ_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
|
47 |
define( 'EWD_UFAQ_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
|
48 |
define( 'EWD_UFAQ_TEMPLATE_DIR', 'ewd-ufaq-templates' );
|
49 |
-
define( 'EWD_UFAQ_VERSION', '2.
|
50 |
|
51 |
define( 'EWD_UFAQ_FAQ_POST_TYPE', 'ufaq' );
|
52 |
define( 'EWD_UFAQ_FAQ_CATEGORY_TAXONOMY', 'ufaq-category' );
|
@@ -62,6 +62,7 @@ class ewdufaqInit {
|
|
62 |
*/
|
63 |
protected function includes() {
|
64 |
|
|
|
65 |
require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Ajax.class.php' );
|
66 |
require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Blocks.class.php' );
|
67 |
require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Patterns.class.php' );
|
@@ -119,6 +120,8 @@ class ewdufaqInit {
|
|
119 |
new ewdufaqOrderingTable();
|
120 |
new ewdufaqUltimateWPMail();
|
121 |
new ewdufaqWidgetManager();
|
|
|
|
|
122 |
}
|
123 |
|
124 |
/**
|
@@ -302,6 +305,7 @@ class ewdufaqInit {
|
|
302 |
'edit-ufaq',
|
303 |
'edit-ufaq-category',
|
304 |
'edit-ufaq-tag',
|
|
|
305 |
'ufaq_page_ewd-ufaq-export',
|
306 |
'ufaq_page_ewd-ufaq-import'
|
307 |
);
|
@@ -393,6 +397,8 @@ class ewdufaqInit {
|
|
393 |
|
394 |
if ( $plugin == EWD_UFAQ_PLUGIN_FNAME ) {
|
395 |
|
|
|
|
|
396 |
$links['settings'] = '<a href="admin.php?page=ewd-ufaq-settings" title="' . __( 'Head to the settings page for Ultimate FAQs', 'ultimate-faqs' ) . '">' . __( 'Settings', 'ultimate-faqs' ) . '</a>';
|
397 |
}
|
398 |
|
@@ -485,7 +491,7 @@ class ewdufaqInit {
|
|
485 |
<div class="ewd-ufaq-dashboard-new-upgrade-banner">
|
486 |
<div class="ewd-ufaq-dashboard-banner-icon"></div>
|
487 |
<div class="ewd-ufaq-dashboard-banner-buttons">
|
488 |
-
<a class="ewd-ufaq-dashboard-new-upgrade-button" href="https://www.etoilewebdesign.com/license-payment/?Selected=UFAQ&Quantity=
|
489 |
</div>
|
490 |
<div class="ewd-ufaq-dashboard-banner-text">
|
491 |
<div class="ewd-ufaq-dashboard-banner-title">
|
6 |
Author URI: https://www.etoilewebdesign.com/
|
7 |
Terms and Conditions: https://www.etoilewebdesign.com/plugin-terms-and-conditions/
|
8 |
Text Domain: ultimate-faqs
|
9 |
+
Version: 2.2.0
|
10 |
WC requires at least: 3.0
|
11 |
+
WC tested up to: 7.1
|
12 |
*/
|
13 |
|
14 |
if ( ! defined( 'ABSPATH' ) )
|
46 |
define( 'EWD_UFAQ_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
|
47 |
define( 'EWD_UFAQ_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
|
48 |
define( 'EWD_UFAQ_TEMPLATE_DIR', 'ewd-ufaq-templates' );
|
49 |
+
define( 'EWD_UFAQ_VERSION', '2.2.0' );
|
50 |
|
51 |
define( 'EWD_UFAQ_FAQ_POST_TYPE', 'ufaq' );
|
52 |
define( 'EWD_UFAQ_FAQ_CATEGORY_TAXONOMY', 'ufaq-category' );
|
62 |
*/
|
63 |
protected function includes() {
|
64 |
|
65 |
+
require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/AboutUs.class.php' );
|
66 |
require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Ajax.class.php' );
|
67 |
require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Blocks.class.php' );
|
68 |
require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Patterns.class.php' );
|
120 |
new ewdufaqOrderingTable();
|
121 |
new ewdufaqUltimateWPMail();
|
122 |
new ewdufaqWidgetManager();
|
123 |
+
|
124 |
+
new ewdufaqAboutUs();
|
125 |
}
|
126 |
|
127 |
/**
|
305 |
'edit-ufaq',
|
306 |
'edit-ufaq-category',
|
307 |
'edit-ufaq-tag',
|
308 |
+
'ufaq_page_ewd-ufaq-about-us',
|
309 |
'ufaq_page_ewd-ufaq-export',
|
310 |
'ufaq_page_ewd-ufaq-import'
|
311 |
);
|
397 |
|
398 |
if ( $plugin == EWD_UFAQ_PLUGIN_FNAME ) {
|
399 |
|
400 |
+
array_unshift( $links, '<a class="ewd-ufaq-plugin-page-upgrade-link" href="https://www.etoilewebdesign.com/license-payment/?Selected=UFAQ&Quantity=1&utm_source=wp_admin_plugins_page" title="' . __( 'Try Premium', 'ultimate-faqs' ) . '" target="_blank">' . __( 'Try Premium', 'ultimate-faqs' ) . '</a>' );
|
401 |
+
|
402 |
$links['settings'] = '<a href="admin.php?page=ewd-ufaq-settings" title="' . __( 'Head to the settings page for Ultimate FAQs', 'ultimate-faqs' ) . '">' . __( 'Settings', 'ultimate-faqs' ) . '</a>';
|
403 |
}
|
404 |
|
491 |
<div class="ewd-ufaq-dashboard-new-upgrade-banner">
|
492 |
<div class="ewd-ufaq-dashboard-banner-icon"></div>
|
493 |
<div class="ewd-ufaq-dashboard-banner-buttons">
|
494 |
+
<a class="ewd-ufaq-dashboard-new-upgrade-button" href="https://www.etoilewebdesign.com/license-payment/?Selected=UFAQ&Quantity=1utm_source=ufaq_admin&utm_content=banner" target="_blank">UPGRADE NOW</a>
|
495 |
</div>
|
496 |
<div class="ewd-ufaq-dashboard-banner-text">
|
497 |
<div class="ewd-ufaq-dashboard-banner-title">
|
views/View.FAQs.class.php
CHANGED
@@ -328,7 +328,7 @@ class ewdufaqViewFAQs extends ewdufaqView {
|
|
328 |
)
|
329 |
);
|
330 |
|
331 |
-
if ( $
|
332 |
$classes[] = 'ewd-ufaq-faq-category-title-accordion';
|
333 |
}
|
334 |
|
@@ -466,6 +466,9 @@ class ewdufaqViewFAQs extends ewdufaqView {
|
|
466 |
$this->display_all_answers = ! empty( $this->display_all_answers ) ? $this->display_all_answers : $ewd_ufaq_controller->settings->get_setting( 'display-all-answers' );
|
467 |
$this->include_category_children = ( ! empty( $this->include_category_children ) and strtolower( $this->include_category_children ) == 'yes' ) ? true : false;
|
468 |
|
|
|
|
|
|
|
469 |
$this->include_categories = ! empty( $this->include_category_ids ) ? explode( ',', $this->include_category_ids ) : array();
|
470 |
|
471 |
$include_category_slugs = ! empty( $this->include_category ) ? explode( ',', $this->include_category ) : array();
|
@@ -499,8 +502,8 @@ class ewdufaqViewFAQs extends ewdufaqView {
|
|
499 |
|
500 |
$handle = 'ewd-ufaq-js';
|
501 |
$args = array(
|
502 |
-
'faq_accordion' => $
|
503 |
-
'category_accordion' => $
|
504 |
'faq_scroll' => $ewd_ufaq_controller->settings->get_setting( 'scroll-to-top' ),
|
505 |
'reveal_effect' => $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ),
|
506 |
'retrieving_results' => $ewd_ufaq_controller->settings->get_setting( 'label-retrieving-results' ),
|
328 |
)
|
329 |
);
|
330 |
|
331 |
+
if ( $this->category_accordion ) {
|
332 |
$classes[] = 'ewd-ufaq-faq-category-title-accordion';
|
333 |
}
|
334 |
|
466 |
$this->display_all_answers = ! empty( $this->display_all_answers ) ? $this->display_all_answers : $ewd_ufaq_controller->settings->get_setting( 'display-all-answers' );
|
467 |
$this->include_category_children = ( ! empty( $this->include_category_children ) and strtolower( $this->include_category_children ) == 'yes' ) ? true : false;
|
468 |
|
469 |
+
$this->category_accordion = empty( $this->category_accordion ) ? $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ) : ( strtolower( $this->category_accordion ) == 'yes' ? true : false );
|
470 |
+
$this->faq_accordion = empty( $this->faq_accordion ) ? $ewd_ufaq_controller->settings->get_setting( 'faq-accordion' ) : ( strtolower( $this->faq_accordion ) == 'yes' ? true : false );
|
471 |
+
|
472 |
$this->include_categories = ! empty( $this->include_category_ids ) ? explode( ',', $this->include_category_ids ) : array();
|
473 |
|
474 |
$include_category_slugs = ! empty( $this->include_category ) ? explode( ',', $this->include_category ) : array();
|
502 |
|
503 |
$handle = 'ewd-ufaq-js';
|
504 |
$args = array(
|
505 |
+
'faq_accordion' => $this->faq_accordion,
|
506 |
+
'category_accordion' => $this->category_accordion,
|
507 |
'faq_scroll' => $ewd_ufaq_controller->settings->get_setting( 'scroll-to-top' ),
|
508 |
'reveal_effect' => $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ),
|
509 |
'retrieving_results' => $ewd_ufaq_controller->settings->get_setting( 'label-retrieving-results' ),
|