PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | js/admin/applications.js +12 -10 6.27 → trunk View file →
@@ -108,9 +108,9 @@
108 108 children: [
109 109 div( {
110 110 className: 'frm10 frm_clearfix',
111 111 children: [
112 - img( { src: getUrlToApplicationsImages() + 'folder.svg' } ),
112 + img( { src: `${ getUrlToApplicationsImages() }folder.svg` } ),
113 113 tag( 'h3', __( 'Improve your workflow with applications', 'formidable' ) ),
114 114 div( __( 'Applications help to organize your workspace by combining forms, Views, and pages into a full solution.', 'formidable' ) ),
115 115 ]
116 116 } ),
@@ -128,9 +128,9 @@
128 128 customTemplatesNav.parentNode.insertBefore( placeholder, customTemplatesNav.nextElementSibling );
129 129 }
130 130
131 131 function getUrlToApplicationsImages() {
132 - return frmGlobal.url + '/images/applications/';
132 + return `${ frmGlobal.url }/images/applications/`;
133 133 }
134 134
135 135 function renderFormidableTemplates( contentWrapper, templates ) {
136 136 elements.templatesGrid = div( {
@@ -230,9 +230,9 @@
230 230 }
231 231
232 232 addTemplatesToGrid(
233 233 state.templates.filter(
234 - template => -1 !== template.categories.indexOf( category )
234 + template => template.categories.includes( category )
235 235 )
236 236 );
237 237 }
238 238
@@ -326,9 +326,9 @@
326 326 return wp.hooks.applyFilters( hookName, false, args );
327 327 }
328 328
329 329 function getCardContent() {
330 - const thumbnailFolderUrl = getUrlToApplicationsImages() + 'thumbnails/';
330 + const thumbnailFolderUrl = `${ getUrlToApplicationsImages() }thumbnails/`;
331 331 const filenameToUse = data.hasLiteThumbnail ? data.key + ( data.isWebp ? '.webp' : '.png' ) : 'placeholder.svg';
332 332 return div( {
333 333 className: 'frm-application-card-image-wrapper',
334 334 child: img( { src: thumbnailFolderUrl + filenameToUse } )
@@ -338,11 +338,11 @@
338 338 return card;
339 339 }
340 340
341 341 function filterItemCount( counter, { data } ) {
342 - const hasForms = 'undefined' !== typeof data.formCount && '0' !== data.formCount;
343 - const hasViews = 'undefined' !== typeof data.viewCount && '0' !== data.viewCount;
344 - const hasPages = 'undefined' !== typeof data.pageCount && '0' !== data.pageCount;
342 + const hasForms = data.formCount !== undefined && '0' !== data.formCount;
343 + const hasViews = data.viewCount !== undefined && '0' !== data.viewCount;
344 + const hasPages = data.pageCount !== undefined && '0' !== data.pageCount;
345 345
346 346 if ( ! hasForms && ! hasViews && ! hasPages ) {
347 347 return counter;
348 348 }
@@ -367,9 +367,9 @@
367 367 }
368 368
369 369 const descriptor = '1' === countValue ? singularDescriptor : pluralDescriptor;
370 370 counter.append(
371 - span( countValue + ' ' + descriptor )
371 + span( `${ countValue } ${ descriptor }` )
372 372 );
373 373 }
374 374
375 375 return counter;
@@ -438,9 +438,9 @@
438 438 } )
439 439 );
440 440 }
441 441
442 - const placeholderImage = img( { src: getUrlToApplicationsImages() + 'placeholder.png' } );
442 + const placeholderImage = img( { src: `${ getUrlToApplicationsImages() }placeholder.png` } );
443 443 if ( placeholderImage.complete ) {
444 444 setTimeout( maybeCenterViewApplicationModal, 0 );
445 445 } else {
446 446 placeholderImage.addEventListener( 'load', maybeCenterViewApplicationModal );
@@ -453,9 +453,9 @@
453 453 } ),
454 454 div( data.description )
455 455 ];
456 456
457 - if ( data.usedAddons && data.usedAddons.length ) {
457 + if ( data.usedAddons?.length ) {
458 458 detailsChildren.push(
459 459 div( {
460 460 className: 'frm-application-modal-label',
461 461 text: __( 'Required Add-ons', 'formidable-pro' )
@@ -524,8 +524,10 @@
524 524
525 525 if ( data.upgradeUrl ) {
526 526 primaryActionButton.classList.remove( 'dismiss' );
527 527 primaryActionButton.setAttribute( 'href', data.upgradeUrl );
528 + primaryActionButton.target = '_blank';
529 + primaryActionButton.rel = 'noopener';
528 530 }
529 531
530 532 const hookName = 'frm_view_application_modal_primary_action_button';
531 533 const args = { data };