diff --git a/.gitignore b/.gitignore index 60bdeae7e8..dd6be7c35d 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,9 @@ assets/css/builder.css assets/css/builder.min.css assets/css/builder-rtl.css assets/css/builder-rtl.min.css +assets/css/admin-importer* +assets/css/editor* +assets/css/certificates* assets/css/lifterlms-rtl.css assets/css/lifterlms-rtl.min.css assets/css/lifterlms.css diff --git a/CHANGELOG.md b/CHANGELOG.md index 3abded92e0..5fba3530cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ LifterLMS Changelog =================== +v7.7.7 - 2024-09-12 +------------------- + +##### Bug Fixes + ++ Avoid modifying non-LifterLMS block component styling in the editor. [#2752](https://github.com/gocodebox/lifterlms/issues/2752) ++ Use student email for the student login merge code in notification emails if usernames are not used. [#2755](https://github.com/gocodebox/lifterlms/issues/2755) ++ Show video or audio embed URLs in lessons which are valid but contain special characters. [#2749](https://github.com/gocodebox/lifterlms/issues/2749) + + v7.7.6 - 2024-08-22 ------------------- diff --git a/assets/css/admin-importer-rtl.css b/assets/css/admin-importer-rtl.css deleted file mode 100644 index e146a4810c..0000000000 --- a/assets/css/admin-importer-rtl.css +++ /dev/null @@ -1,112 +0,0 @@ -.llms-import-file-wrap { - background: #fafafa; - border: 1px solid #ccd0d4; - padding: 10px; - margin: 20px auto; - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.llms-cloud-import-help.button-link { - color: inherit; - vertical-align: top; - text-decoration: none; -} - -.wrap.llms-import-export ul.llms-importable-courses { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - gap: 20px; -} -@media only screen and (min-width: 680px) { - .wrap.llms-import-export ul.llms-importable-courses { - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - } -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course { - background-color: #FFF; - border: 1px solid #dedede; - border-radius: 12px; - -webkit-box-shadow: 0px 0px 1px rgba(48, 49, 51, 0.05), 0px 2px 4px rgba(48, 49, 51, 0.1); - box-shadow: 0px 0px 1px rgba(48, 49, 51, 0.05), 0px 2px 4px rgba(48, 49, 51, 0.1); - list-style: none; - margin: 20px 0; - overflow: hidden; -} -@media only screen and (min-width: 680px) { - .wrap.llms-import-export ul.llms-importable-courses .llms-importable-course { - -webkit-box-flex: 0; - -ms-flex-positive: 0; - flex-grow: 0; - -ms-flex-negative: 1; - flex-shrink: 1; - -ms-flex-preferred-size: 31%; - flex-basis: 31%; - } -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course img { - display: block; - max-width: 100%; -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course h3 { - color: #1d2327; - font-size: 20px; - line-height: 1.5; - margin: 30px 20px 15px; -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course p { - font-size: 15px; - line-height: 1.5; - margin: 0 20px 15px; -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course.has-action-button { - padding-bottom: 10px; - position: relative; -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course.has-action-button .button { - bottom: 20px; - left: 20px; - position: absolute; -} -@media only screen and (min-width: 600px) { - .wrap.llms-import-export ul.llms-importable-courses { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - } -} -@media only screen and (min-width: 600px) and (max-width: 767px) { - .wrap.llms-import-export ul.llms-importable-courses li.llms-importable-course { - -webkit-box-flex: 1; - -ms-flex: 1 0 calc(50% - 20px); - flex: 1 0 calc(50% - 20px); - max-width: calc(50% - 20px); - } -} -@media only screen and (min-width: 768px) { - .wrap.llms-import-export ul.llms-importable-courses li.llms-importable-course { - -webkit-box-flex: 1; - -ms-flex: 1 0 calc(33% - 20px); - flex: 1 0 calc(33% - 20px); - max-width: calc(33% - 20px); - } -} diff --git a/assets/css/admin-importer-rtl.min.css b/assets/css/admin-importer-rtl.min.css deleted file mode 100644 index 7d0a7db2be..0000000000 --- a/assets/css/admin-importer-rtl.min.css +++ /dev/null @@ -1 +0,0 @@ -.llms-import-file-wrap{background:#fafafa;border:1px solid #ccd0d4;padding:10px;margin:20px auto;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.llms-cloud-import-help.button-link{color:inherit;vertical-align:top;text-decoration:none}.wrap.llms-import-export ul.llms-importable-courses{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:20px}@media only screen and (min-width: 680px){.wrap.llms-import-export ul.llms-importable-courses{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course{background-color:#fff;border:1px solid #dedede;border-radius:12px;-webkit-box-shadow:0px 0px 1px rgba(48,49,51,.05),0px 2px 4px rgba(48,49,51,.1);box-shadow:0px 0px 1px rgba(48,49,51,.05),0px 2px 4px rgba(48,49,51,.1);list-style:none;margin:20px 0;overflow:hidden}@media only screen and (min-width: 680px){.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:1;flex-shrink:1;-ms-flex-preferred-size:31%;flex-basis:31%}}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course img{display:block;max-width:100%}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course h3{color:#1d2327;font-size:20px;line-height:1.5;margin:30px 20px 15px}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course p{font-size:15px;line-height:1.5;margin:0 20px 15px}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course.has-action-button{padding-bottom:10px;position:relative}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course.has-action-button .button{bottom:20px;left:20px;position:absolute}@media only screen and (min-width: 600px){.wrap.llms-import-export ul.llms-importable-courses{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}}@media only screen and (min-width: 600px)and (max-width: 767px){.wrap.llms-import-export ul.llms-importable-courses li.llms-importable-course{-webkit-box-flex:1;-ms-flex:1 0 calc(50% - 20px);flex:1 0 calc(50% - 20px);max-width:calc(50% - 20px)}}@media only screen and (min-width: 768px){.wrap.llms-import-export ul.llms-importable-courses li.llms-importable-course{-webkit-box-flex:1;-ms-flex:1 0 calc(33% - 20px);flex:1 0 calc(33% - 20px);max-width:calc(33% - 20px)}} diff --git a/assets/css/admin-importer.css b/assets/css/admin-importer.css deleted file mode 100644 index fc4b724e8b..0000000000 --- a/assets/css/admin-importer.css +++ /dev/null @@ -1,113 +0,0 @@ -.llms-import-file-wrap { - background: #fafafa; - border: 1px solid #ccd0d4; - padding: 10px; - margin: 20px auto; - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.llms-cloud-import-help.button-link { - color: inherit; - vertical-align: top; - text-decoration: none; -} - -.wrap.llms-import-export ul.llms-importable-courses { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - gap: 20px; -} -@media only screen and (min-width: 680px) { - .wrap.llms-import-export ul.llms-importable-courses { - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - } -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course { - background-color: #FFF; - border: 1px solid #dedede; - border-radius: 12px; - -webkit-box-shadow: 0px 0px 1px rgba(48, 49, 51, 0.05), 0px 2px 4px rgba(48, 49, 51, 0.1); - box-shadow: 0px 0px 1px rgba(48, 49, 51, 0.05), 0px 2px 4px rgba(48, 49, 51, 0.1); - list-style: none; - margin: 20px 0; - overflow: hidden; -} -@media only screen and (min-width: 680px) { - .wrap.llms-import-export ul.llms-importable-courses .llms-importable-course { - -webkit-box-flex: 0; - -ms-flex-positive: 0; - flex-grow: 0; - -ms-flex-negative: 1; - flex-shrink: 1; - -ms-flex-preferred-size: 31%; - flex-basis: 31%; - } -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course img { - display: block; - max-width: 100%; -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course h3 { - color: #1d2327; - font-size: 20px; - line-height: 1.5; - margin: 30px 20px 15px; -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course p { - font-size: 15px; - line-height: 1.5; - margin: 0 20px 15px; -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course.has-action-button { - padding-bottom: 10px; - position: relative; -} -.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course.has-action-button .button { - bottom: 20px; - right: 20px; - position: absolute; -} -@media only screen and (min-width: 600px) { - .wrap.llms-import-export ul.llms-importable-courses { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - } -} -@media only screen and (min-width: 600px) and (max-width: 767px) { - .wrap.llms-import-export ul.llms-importable-courses li.llms-importable-course { - -webkit-box-flex: 1; - -ms-flex: 1 0 calc(50% - 20px); - flex: 1 0 calc(50% - 20px); - max-width: calc(50% - 20px); - } -} -@media only screen and (min-width: 768px) { - .wrap.llms-import-export ul.llms-importable-courses li.llms-importable-course { - -webkit-box-flex: 1; - -ms-flex: 1 0 calc(33% - 20px); - flex: 1 0 calc(33% - 20px); - max-width: calc(33% - 20px); - } -} -/*# sourceMappingURL=../maps/css/admin-importer.css.map */ diff --git a/assets/css/admin-importer.min.css b/assets/css/admin-importer.min.css deleted file mode 100644 index cb5d70981f..0000000000 --- a/assets/css/admin-importer.min.css +++ /dev/null @@ -1,2 +0,0 @@ -.llms-import-file-wrap{background:#fafafa;border:1px solid #ccd0d4;padding:10px;margin:20px auto;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.llms-cloud-import-help.button-link{color:inherit;vertical-align:top;text-decoration:none}.wrap.llms-import-export ul.llms-importable-courses{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:20px}@media only screen and (min-width: 680px){.wrap.llms-import-export ul.llms-importable-courses{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course{background-color:#fff;border:1px solid #dedede;border-radius:12px;-webkit-box-shadow:0px 0px 1px rgba(48,49,51,.05),0px 2px 4px rgba(48,49,51,.1);box-shadow:0px 0px 1px rgba(48,49,51,.05),0px 2px 4px rgba(48,49,51,.1);list-style:none;margin:20px 0;overflow:hidden}@media only screen and (min-width: 680px){.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:1;flex-shrink:1;-ms-flex-preferred-size:31%;flex-basis:31%}}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course img{display:block;max-width:100%}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course h3{color:#1d2327;font-size:20px;line-height:1.5;margin:30px 20px 15px}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course p{font-size:15px;line-height:1.5;margin:0 20px 15px}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course.has-action-button{padding-bottom:10px;position:relative}.wrap.llms-import-export ul.llms-importable-courses .llms-importable-course.has-action-button .button{bottom:20px;right:20px;position:absolute}@media only screen and (min-width: 600px){.wrap.llms-import-export ul.llms-importable-courses{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}}@media only screen and (min-width: 600px)and (max-width: 767px){.wrap.llms-import-export ul.llms-importable-courses li.llms-importable-course{-webkit-box-flex:1;-ms-flex:1 0 calc(50% - 20px);flex:1 0 calc(50% - 20px);max-width:calc(50% - 20px)}}@media only screen and (min-width: 768px){.wrap.llms-import-export ul.llms-importable-courses li.llms-importable-course{-webkit-box-flex:1;-ms-flex:1 0 calc(33% - 20px);flex:1 0 calc(33% - 20px);max-width:calc(33% - 20px)}} -/*# sourceMappingURL=../maps/css/admin-importer.min.css.map */ diff --git a/assets/css/certificates-rtl.css b/assets/css/certificates-rtl.css deleted file mode 100644 index a261b4c489..0000000000 --- a/assets/css/certificates-rtl.css +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Reset. - */ -body { - background-color: #fff; - background-image: none; - margin: 0 auto; -} - -.header, .footer, -.wrap-header, .wrap-footer, -.site-header, .site-footer, -.nav-primary, .primary-nav { - display: none; -} - -.llms-certificate-container { - margin: 40px auto 0; -} - -/** - * Legacy Template. - */ -.llms-certificate-container:not(.cert-template-v2) { - padding: 0; - overflow: hidden; -} -.llms-certificate-container:not(.cert-template-v2) .certificate-background { - position: relative; - z-index: 1; - width: 100%; - display: block; -} -.llms-certificate-container:not(.cert-template-v2) .llms_certificate, -.llms-certificate-container:not(.cert-template-v2) .llms_my_certificate { - margin: 80px; - position: relative; - z-index: 2; -} -.llms-certificate-container:not(.cert-template-v2) h1:first-child { - text-align: center; -} - -/** - * V2 Template - */ -.llms-certificate-wrapper { - margin: 0 auto; -} - -.llms-certificate-container.cert-template-v2 { - width: 100%; - height: 100%; - background-size: 100% 100% !important; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.llms-certificate-container.cert-template-v2 .wp-block-columns .wp-block-column > * { - margin-top: 0 !important; - margin-bottom: 0 !important; -} - -/** - * Certificate Actions Footer. - */ -.llms-print-certificate { - margin-top: 40px; - margin-bottom: 40px; - text-align: center; -} -.llms-print-certificate form { - display: inline; -} - -@media print { - html, body { - -webkit-print-color-adjust: exact !important; - print-color-adjust: exact !important; - height: 100%; - overflow: hidden; - } - @page { - size: auto; - } - .no-print { - display: none; - } - body * { - visibility: hidden !important; - background: #fff none; - } - .site, .site-content { - overflow: visible; - } - header, aside, nav, footer { - display: none !important; - } - .single-llms_my_certificate .container, -.single-llms_certificate .container { - width: 100%; - } - .llms-certificate-container, -.llms-certificate-container * { - visibility: visible !important; - background: transparent none; - } - .llms-certificate-container:not(.cert-template-v2) { - position: absolute; - top: 0; - right: 0; - left: 0; - margin: 0 auto; - background: #fff none; - } - .llms-certificate-container.cert-template-v2 { - margin: 0 auto !important; - -webkit-print-color-adjust: exact !important; - print-color-adjust: exact !important; - -webkit-transform: scale(0.95); - transform: scale(0.95); - } -} diff --git a/assets/css/certificates-rtl.min.css b/assets/css/certificates-rtl.min.css deleted file mode 100644 index 997c1f2981..0000000000 --- a/assets/css/certificates-rtl.min.css +++ /dev/null @@ -1 +0,0 @@ -body{background-color:#fff;background-image:none;margin:0 auto}.header,.footer,.wrap-header,.wrap-footer,.site-header,.site-footer,.nav-primary,.primary-nav{display:none}.llms-certificate-container{margin:40px auto 0}.llms-certificate-container:not(.cert-template-v2){padding:0;overflow:hidden}.llms-certificate-container:not(.cert-template-v2) .certificate-background{position:relative;z-index:1;width:100%;display:block}.llms-certificate-container:not(.cert-template-v2) .llms_certificate,.llms-certificate-container:not(.cert-template-v2) .llms_my_certificate{margin:80px;position:relative;z-index:2}.llms-certificate-container:not(.cert-template-v2) h1:first-child{text-align:center}.llms-certificate-wrapper{margin:0 auto}.llms-certificate-container.cert-template-v2{width:100%;height:100%;background-size:100% 100% !important;-webkit-box-sizing:border-box;box-sizing:border-box}.llms-certificate-container.cert-template-v2 .wp-block-columns .wp-block-column>*{margin-top:0 !important;margin-bottom:0 !important}.llms-print-certificate{margin-top:40px;margin-bottom:40px;text-align:center}.llms-print-certificate form{display:inline}@media print{html,body{-webkit-print-color-adjust:exact !important;print-color-adjust:exact !important;height:100%;overflow:hidden}@page{size:auto}.no-print{display:none}body *{visibility:hidden !important;background:#fff none}.site,.site-content{overflow:visible}header,aside,nav,footer{display:none !important}.single-llms_my_certificate .container,.single-llms_certificate .container{width:100%}.llms-certificate-container,.llms-certificate-container *{visibility:visible !important;background:rgba(0,0,0,0) none}.llms-certificate-container:not(.cert-template-v2){position:absolute;top:0;right:0;left:0;margin:0 auto;background:#fff none}.llms-certificate-container.cert-template-v2{margin:0 auto !important;-webkit-print-color-adjust:exact !important;print-color-adjust:exact !important;-webkit-transform:scale(0.95);transform:scale(0.95)}} diff --git a/assets/css/certificates.css b/assets/css/certificates.css deleted file mode 100644 index 9e822cf762..0000000000 --- a/assets/css/certificates.css +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Reset. - */ -body { - background-color: #fff; - background-image: none; - margin: 0 auto; -} - -.header, .footer, -.wrap-header, .wrap-footer, -.site-header, .site-footer, -.nav-primary, .primary-nav { - display: none; -} - -.llms-certificate-container { - margin: 40px auto 0; -} - -/** - * Legacy Template. - */ -.llms-certificate-container:not(.cert-template-v2) { - padding: 0; - overflow: hidden; -} -.llms-certificate-container:not(.cert-template-v2) .certificate-background { - position: relative; - z-index: 1; - width: 100%; - display: block; -} -.llms-certificate-container:not(.cert-template-v2) .llms_certificate, -.llms-certificate-container:not(.cert-template-v2) .llms_my_certificate { - margin: 80px; - position: relative; - z-index: 2; -} -.llms-certificate-container:not(.cert-template-v2) h1:first-child { - text-align: center; -} - -/** - * V2 Template - */ -.llms-certificate-wrapper { - margin: 0 auto; -} - -.llms-certificate-container.cert-template-v2 { - width: 100%; - height: 100%; - background-size: 100% 100% !important; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.llms-certificate-container.cert-template-v2 .wp-block-columns .wp-block-column > * { - margin-top: 0 !important; - margin-bottom: 0 !important; -} - -/** - * Certificate Actions Footer. - */ -.llms-print-certificate { - margin-top: 40px; - margin-bottom: 40px; - text-align: center; -} -.llms-print-certificate form { - display: inline; -} - -@media print { - html, body { - -webkit-print-color-adjust: exact !important; - print-color-adjust: exact !important; - height: 100%; - overflow: hidden; - } - @page { - size: auto; - } - .no-print { - display: none; - } - body * { - visibility: hidden !important; - background: #fff none; - } - .site, .site-content { - overflow: visible; - } - header, aside, nav, footer { - display: none !important; - } - .single-llms_my_certificate .container, -.single-llms_certificate .container { - width: 100%; - } - .llms-certificate-container, -.llms-certificate-container * { - visibility: visible !important; - background: transparent none; - } - .llms-certificate-container:not(.cert-template-v2) { - position: absolute; - top: 0; - left: 0; - right: 0; - margin: 0 auto; - background: #fff none; - } - .llms-certificate-container.cert-template-v2 { - margin: 0 auto !important; - -webkit-print-color-adjust: exact !important; - print-color-adjust: exact !important; - -webkit-transform: scale(0.95); - transform: scale(0.95); - } -} -/*# sourceMappingURL=../maps/css/certificates.css.map */ diff --git a/assets/css/certificates.min.css b/assets/css/certificates.min.css deleted file mode 100644 index 317f971da8..0000000000 --- a/assets/css/certificates.min.css +++ /dev/null @@ -1,2 +0,0 @@ -body{background-color:#fff;background-image:none;margin:0 auto}.header,.footer,.wrap-header,.wrap-footer,.site-header,.site-footer,.nav-primary,.primary-nav{display:none}.llms-certificate-container{margin:40px auto 0}.llms-certificate-container:not(.cert-template-v2){padding:0;overflow:hidden}.llms-certificate-container:not(.cert-template-v2) .certificate-background{position:relative;z-index:1;width:100%;display:block}.llms-certificate-container:not(.cert-template-v2) .llms_certificate,.llms-certificate-container:not(.cert-template-v2) .llms_my_certificate{margin:80px;position:relative;z-index:2}.llms-certificate-container:not(.cert-template-v2) h1:first-child{text-align:center}.llms-certificate-wrapper{margin:0 auto}.llms-certificate-container.cert-template-v2{width:100%;height:100%;background-size:100% 100% !important;-webkit-box-sizing:border-box;box-sizing:border-box}.llms-certificate-container.cert-template-v2 .wp-block-columns .wp-block-column>*{margin-top:0 !important;margin-bottom:0 !important}.llms-print-certificate{margin-top:40px;margin-bottom:40px;text-align:center}.llms-print-certificate form{display:inline}@media print{html,body{-webkit-print-color-adjust:exact !important;print-color-adjust:exact !important;height:100%;overflow:hidden}@page{size:auto}.no-print{display:none}body *{visibility:hidden !important;background:#fff none}.site,.site-content{overflow:visible}header,aside,nav,footer{display:none !important}.single-llms_my_certificate .container,.single-llms_certificate .container{width:100%}.llms-certificate-container,.llms-certificate-container *{visibility:visible !important;background:rgba(0,0,0,0) none}.llms-certificate-container:not(.cert-template-v2){position:absolute;top:0;left:0;right:0;margin:0 auto;background:#fff none}.llms-certificate-container.cert-template-v2{margin:0 auto !important;-webkit-print-color-adjust:exact !important;print-color-adjust:exact !important;-webkit-transform:scale(0.95);transform:scale(0.95)}} -/*# sourceMappingURL=../maps/css/certificates.min.css.map */ diff --git a/assets/css/editor-rtl.css b/assets/css/editor-rtl.css deleted file mode 100644 index 3281354421..0000000000 --- a/assets/css/editor-rtl.css +++ /dev/null @@ -1,52 +0,0 @@ -.components-panel__row > .components-base-control, -.components-form-token-field, -.components-number-control, -.components-range-control { - width: 100%; -} - -.llms-block-empty, -.llms-block-error { - padding: 1em; - border: 1px solid #e0e0e0; - font-size: 16px; -} - -.llms-block-empty { - font-style: italic; -} - -.wp-block .components-button { - height: auto; -} - -.wp-block .llms-button-primary { - text-decoration: none; -} - -.llms-navigation-link-settings .components-panel__row > .components-base-control { - width: 100%; -} - -.llms-block-icon { - -webkit-transform: scale(0.75); - transform: scale(0.75); -} - -.components-range-control__root { - height: 3em; -} - -.llms-loop-item .llms-video-wrapper { - aspect-ratio: 16/9; - position: relative; -} -.llms-loop-item .llms-video-wrapper iframe { - width: 100%; - height: 100%; - position: absolute; - right: 0; - top: 0; - -o-object-fit: cover; - object-fit: cover; -} diff --git a/assets/css/editor-rtl.min.css b/assets/css/editor-rtl.min.css deleted file mode 100644 index 0974b2374f..0000000000 --- a/assets/css/editor-rtl.min.css +++ /dev/null @@ -1 +0,0 @@ -.components-panel__row>.components-base-control,.components-form-token-field,.components-number-control,.components-range-control{width:100%}.llms-block-empty,.llms-block-error{padding:1em;border:1px solid #e0e0e0;font-size:16px}.llms-block-empty{font-style:italic}.wp-block .components-button{height:auto}.wp-block .llms-button-primary{text-decoration:none}.llms-navigation-link-settings .components-panel__row>.components-base-control{width:100%}.llms-block-icon{-webkit-transform:scale(0.75);transform:scale(0.75)}.components-range-control__root{height:3em}.llms-loop-item .llms-video-wrapper{aspect-ratio:16/9;position:relative}.llms-loop-item .llms-video-wrapper iframe{width:100%;height:100%;position:absolute;right:0;top:0;-o-object-fit:cover;object-fit:cover} diff --git a/assets/css/editor.css b/assets/css/editor.css deleted file mode 100644 index ce4d8ac983..0000000000 --- a/assets/css/editor.css +++ /dev/null @@ -1,53 +0,0 @@ -.components-panel__row > .components-base-control, -.components-form-token-field, -.components-number-control, -.components-range-control { - width: 100%; -} - -.llms-block-empty, -.llms-block-error { - padding: 1em; - border: 1px solid #e0e0e0; - font-size: 16px; -} - -.llms-block-empty { - font-style: italic; -} - -.wp-block .components-button { - height: auto; -} - -.wp-block .llms-button-primary { - text-decoration: none; -} - -.llms-navigation-link-settings .components-panel__row > .components-base-control { - width: 100%; -} - -.llms-block-icon { - -webkit-transform: scale(0.75); - transform: scale(0.75); -} - -.components-range-control__root { - height: 3em; -} - -.llms-loop-item .llms-video-wrapper { - aspect-ratio: 16/9; - position: relative; -} -.llms-loop-item .llms-video-wrapper iframe { - width: 100%; - height: 100%; - position: absolute; - left: 0; - top: 0; - -o-object-fit: cover; - object-fit: cover; -} -/*# sourceMappingURL=../maps/css/editor.css.map */ diff --git a/assets/css/editor.min.css b/assets/css/editor.min.css deleted file mode 100644 index b5eb31dd12..0000000000 --- a/assets/css/editor.min.css +++ /dev/null @@ -1,2 +0,0 @@ -.components-panel__row>.components-base-control,.components-form-token-field,.components-number-control,.components-range-control{width:100%}.llms-block-empty,.llms-block-error{padding:1em;border:1px solid #e0e0e0;font-size:16px}.llms-block-empty{font-style:italic}.wp-block .components-button{height:auto}.wp-block .llms-button-primary{text-decoration:none}.llms-navigation-link-settings .components-panel__row>.components-base-control{width:100%}.llms-block-icon{-webkit-transform:scale(0.75);transform:scale(0.75)}.components-range-control__root{height:3em}.llms-loop-item .llms-video-wrapper{aspect-ratio:16/9;position:relative}.llms-loop-item .llms-video-wrapper iframe{width:100%;height:100%;position:absolute;left:0;top:0;-o-object-fit:cover;object-fit:cover} -/*# sourceMappingURL=../maps/css/editor.min.css.map */ diff --git a/assets/scss/editor.scss b/assets/scss/editor.scss index 4b18002422..0c54087c58 100644 --- a/assets/scss/editor.scss +++ b/assets/scss/editor.scss @@ -1,10 +1,3 @@ -.components-panel__row > .components-base-control, -.components-form-token-field, -.components-number-control, -.components-range-control { - width: 100%; -} - .llms-block-empty, .llms-block-error { padding: 1em; @@ -16,10 +9,6 @@ font-style: italic; } -.wp-block .components-button { - height: auto; -} - .wp-block .llms-button-primary { text-decoration: none; } @@ -32,11 +21,6 @@ transform: scale(0.75); } -// Fixes core range control component flex issue. -.components-range-control__root { - height: 3em; -} - .llms-loop-item { .llms-video-wrapper { aspect-ratio: 16/9; diff --git a/class-lifterlms.php b/class-lifterlms.php index 3dd32874d5..1f45827bcc 100644 --- a/class-lifterlms.php +++ b/class-lifterlms.php @@ -34,7 +34,7 @@ final class LifterLMS { * * @var string */ - public $version = '7.7.6'; + public $version = '7.7.7'; /** * LLMS_Assets instance diff --git a/composer.json b/composer.json index 1f86153d04..9ed0417120 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "woocommerce/action-scheduler": "3.5.4" }, "require-dev": { - "lifterlms/lifterlms-tests": "^4.3", + "lifterlms/lifterlms-tests": "^4.4", "lifterlms/lifterlms-cs": "dev-trunk" }, "archive": { diff --git a/includes/abstracts/abstract.llms.post.model.php b/includes/abstracts/abstract.llms.post.model.php index 897a113faa..d055e502ad 100755 --- a/includes/abstracts/abstract.llms.post.model.php +++ b/includes/abstracts/abstract.llms.post.model.php @@ -848,11 +848,10 @@ protected function get_embed( $type = 'video', $prop = '' ) { $prop = $prop ? $prop : $type . '_embed'; $url = $this->get( $prop ); - if ( filter_var( $url, FILTER_VALIDATE_URL ) ) { - + if ( trim( $url ) && parse_url( $url ) ) { $this->get_provider_support( $url ); - $ret = wp_oembed_get( $url ); + $ret = wp_oembed_get( sanitize_url( $url ) ); if ( ! $ret ) { diff --git a/includes/forms/class-llms-forms.php b/includes/forms/class-llms-forms.php index 18e7038c5d..5eb865744b 100644 --- a/includes/forms/class-llms-forms.php +++ b/includes/forms/class-llms-forms.php @@ -45,7 +45,6 @@ private function __construct() { add_filter( 'render_block', array( $this, 'render_field_block' ), 10, 2 ); add_filter( 'llms_get_form_post', array( $this, 'maybe_load_preview' ) ); - } /** @@ -75,9 +74,6 @@ public function are_requirements_met() { * If the array contains at least one item that means there is a form with a username block in it and, * we therefore consider usernames to be enabled for the site. * - * This isn't perfect. We're well aware. But usernames are kind of silly anyway, right? Just use the email - * address like your average website owner and stop pretending usernames matter. - * * @since 5.0.0 * * @return bool @@ -99,7 +95,6 @@ public function are_usernames_enabled() { * @param boolean $enabled Whether or not usernames are enabled. */ return apply_filters( 'llms_are_usernames_enabled', ! empty( $locations ) ); - } /** @@ -151,7 +146,6 @@ private function block_to_field_settings( $block, $block_list = array() ) { * @param array[] $block_list The list of WP Block array `$block` comes from. */ return apply_filters( 'llms_forms_block_to_field_settings', $attrs, $block, $block_list ); - } /** @@ -190,7 +184,6 @@ private function cascade_visibility_attrs( $blocks, $visibility = null ) { } return $blocks; - } /** @@ -233,7 +226,6 @@ private function convert_settings_format( $map, $orignal_format ) { } return $map; - } /** @@ -297,7 +289,6 @@ public function create( $location_id, $recreate = false ) { $args = apply_filters( 'llms_forms_install_post_args', $args, $location_id, $data ); return wp_insert_post( $args ); - } /** @@ -340,7 +331,6 @@ public function get_field_blocks( $blocks ) { } return $fields; - } /** @@ -381,7 +371,6 @@ public function get_field_names() { * @param string[] $names List of registered field names. */ return apply_filters( 'llms_forms_field_names', $names ); - } /** @@ -418,7 +407,6 @@ public function get_form_blocks( $location, $args = array() ) { * @param array $args Additional arguments passed to the short-circuit filter. */ return apply_filters( 'llms_get_form_blocks', $blocks, $location, $args ); - } /** @@ -452,7 +440,6 @@ public function get_form_fields( $location, $args = array() ) { * @param array $args Additional arguments passed to the short-circuit filter in `get_form_post()`. */ return apply_filters( 'llms_get_form_fields', $fields, $location, $args ); - } /** @@ -519,7 +506,6 @@ public function get_field_by( $fields, $key, $val, $return = 'field' ) { } return false; - } /** @@ -564,7 +550,6 @@ public function get_form_html( $location, $args = array() ) { * @param array $args Additional arguments passed to the short-circuit filter in `get_form_post()`. */ return apply_filters( 'llms_get_form_html', $html, $location, $args ); - } /** @@ -627,7 +612,6 @@ public function get_form_post( $location, $args = array() ) { * @param array $args Additional custom arguments. */ return apply_filters( 'llms_get_form_post', $post, $location, $args ); - } /** @@ -649,7 +633,6 @@ public function is_a_core_form( $form ) { } return in_array( $form_id, $this->get_core_forms( 'ids' ), true ); - } /** @@ -700,7 +683,6 @@ private function get_core_forms( $return = 'posts', $use_cache = true ) { wp_cache_set( $forms_cache_key, $forms ); return $forms; - } @@ -726,7 +708,6 @@ private function get_additional_fields( $location, $args = array() ) { * @param array $args Additional arguments passed to the short-circuit filter. */ return apply_filters( 'lifterlms_get_person_fields', array(), $location, $args ); - } /** @@ -750,7 +731,6 @@ private function get_additional_fields_html( $location, $args = array() ) { } return $html; - } /** @@ -821,7 +801,6 @@ public function get_free_enroll_form_fields( $plan ) { * @param LLMS_Access_Plan $plan Access plan being used for enrollment. */ return apply_filters( 'llms_forms_get_free_enroll_form_fields', $fields, $plan ); - } /** @@ -842,7 +821,6 @@ public function get_free_enroll_form_html( $plan ) { } return $html; - } /** @@ -876,7 +854,6 @@ public function get_locations() { * @param array[] $locations Associative array of form location information. */ return apply_filters( 'llms_forms_get_locations', $locations ); - } /** @@ -925,7 +902,6 @@ private function is_block_visible( $block ) { * @param array $block Parsed block array. */ return apply_filters( 'llms_forms_is_block_visible', llms_parse_bool( $render ), $block ); - } /** @@ -965,7 +941,6 @@ public function is_block_visible_in_list( $block, $block_list ) { * @param array[] $block_list The list of WP Block array `$block` comes from. */ return apply_filters( 'llms_forms_is_block_visible', $is_visible, $block, $block_list ); - } /** @@ -1021,7 +996,6 @@ private function get_block_path( $block, $block_list, $iterations = 0 ) { // Block not found in the list. return array(); - } /** @@ -1066,7 +1040,6 @@ private function get_block_tree( $block, $block_list ) { } return array(); - } /** @@ -1086,7 +1059,6 @@ public function install( $recreate = false ) { } return $installed; - } /** @@ -1146,7 +1118,6 @@ public function load_reusable_blocks( $blocks ) { } return $loaded; - } /** @@ -1172,7 +1143,6 @@ public function maybe_load_preview( $post ) { $is_preview = ( is_preview() && current_user_can( $this->get_capability(), $post->ID ) ); return $is_preview ? _set_preview( $post ) : $post; - } /** @@ -1195,7 +1165,6 @@ public function parse_blocks( $content ) { $blocks = $this->cascade_visibility_attrs( $blocks ); return $blocks; - } /** @@ -1227,7 +1196,6 @@ public function prepare_field_for_free_enroll_form( $attrs, $block, $block_list $attrs['type'] = 'hidden'; return $attrs; - } /** @@ -1257,7 +1225,6 @@ public function render_field_block( $html, $block ) { $attrs = $this->block_to_field_settings( $block ); return llms_form_field( $attrs, false ); - } /** @@ -1274,7 +1241,6 @@ public function render_field_block( $html, $block ) { public static function __return_string(): string {// phpcs:ignore -- PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.MethodDoubleUnderscore. return '1'; } - } return LLMS_Forms::instance(); diff --git a/includes/notifications/views/class.llms.notification.view.student.welcome.php b/includes/notifications/views/class.llms.notification.view.student.welcome.php index 98cf7bb1ed..bddcc9f5d1 100644 --- a/includes/notifications/views/class.llms.notification.view.student.welcome.php +++ b/includes/notifications/views/class.llms.notification.view.student.welcome.php @@ -112,7 +112,7 @@ protected function set_merge_data( $code ) { break; case '{{STUDENT_LOGIN}}': - $field = ( 'yes' === get_option( 'lifterlms_registration_generate_username' ) ) ? 'user_email' : 'user_login'; + $field = ( LLMS_Forms::instance()->are_usernames_enabled() ) ? 'user_login' : 'user_email'; $code = $this->user->get( $field ); break; diff --git a/lifterlms.php b/lifterlms.php index d228d71ef0..8bc7530413 100644 --- a/lifterlms.php +++ b/lifterlms.php @@ -10,7 +10,7 @@ * Plugin Name: LifterLMS * Plugin URI: https://lifterlms.com/ * Description: Complete e-learning platform to sell online courses, protect lessons, offer memberships, and quiz students. WP Learning Management System. - * Version: 7.7.6 + * Version: 7.7.7 * Author: LifterLMS * Author URI: https://lifterlms.com/ * Text Domain: lifterlms diff --git a/package-lock.json b/package-lock.json index b3b36a9169..c5670f468a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "lifterlms", - "version": "7.7.6", + "version": "7.7.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "lifterlms", - "version": "7.7.6", + "version": "7.7.7", "license": "GPL-3.0", "dependencies": { "@babel/core": "^7.16.5", diff --git a/package.json b/package.json index 1259e41990..1ce6cff68f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lifterlms", - "version": "7.7.6", + "version": "7.7.7", "description": "LifterLMS by codeBOX", "repository": { "type": "git", diff --git a/tests/phpunit/unit-tests/models/class-llms-test-model-llms-course.php b/tests/phpunit/unit-tests/models/class-llms-test-model-llms-course.php index de07b05a95..4b69375b32 100644 --- a/tests/phpunit/unit-tests/models/class-llms-test-model-llms-course.php +++ b/tests/phpunit/unit-tests/models/class-llms-test-model-llms-course.php @@ -184,6 +184,17 @@ public function test_get_embeds() { $this->assertStringContains( sprintf( 'href="%s"', $not_embeddable_url ), $audio_embed ); $this->assertStringContains( sprintf( 'href="%s"', $not_embeddable_url ), $video_embed ); + // Ensure special characters in URL works. + $audio_url_special_char = home_url( '/a①b.mp3' ); + $video_url_special_char = home_url( '/a①b.mp4' ); + + $course->set( 'audio_embed', $audio_url_special_char ); + $course->set( 'video_embed', $video_url_special_char ); + + $this->assertStringContains( 'get_audio() ); + $this->assertStringContains( 'get_video() ); + $this->assertStringContains( $audio_url_special_char, $course->get_audio() ); + $this->assertStringContains( $video_url_special_char, $course->get_video() ); }