Changeset 3821169
- Timestamp:
- 11/24/2026 06:00:27 PM (less than one hour ago)
- Location:
- ultimate-faqs
- Files:
-
- 2 added
- 128 deleted
- 56 edited
- 1 copied
-
tags/2.7.0 (copied) (copied from ultimate-faqs/trunk )
-
tags/2.7.0/assets/css/ewd-ufaq-admin.css (modified) (67 diffs)
-
tags/2.7.0/assets/css/ewd-ufaq-admin1.css (deleted)
-
tags/2.7.0/assets/css/ewd-ufaq-minimalist.css (deleted)
-
tags/2.7.0/assets/css/ewd-ufaq-wc-admin.css (deleted)
-
tags/2.7.0/assets/css/ewd-ufaq-wpforms.css (deleted)
-
tags/2.7.0/assets/css/ewd-ufaq.css (modified) (16 diffs)
-
tags/2.7.0/assets/css/images (deleted)
-
tags/2.7.0/assets/css/jquery-ui.min.css (deleted)
-
tags/2.7.0/assets/css/rrssb-min.css (deleted)
-
tags/2.7.0/assets/img/Thumbs-down-icon.png (deleted)
-
tags/2.7.0/assets/img/Thumbs-up-icon.png (deleted)
-
tags/2.7.0/assets/js/ewd-ufaq-admin.js (modified) (2 diffs)
-
tags/2.7.0/assets/js/ewd-ufaq-analytics.js (deleted)
-
tags/2.7.0/assets/js/ewd-ufaq-managed-editor.js (modified) (2 diffs)
-
tags/2.7.0/assets/js/ewd-ufaq-wc-admin.js (deleted)
-
tags/2.7.0/assets/js/ewd-ufaq.js (modified) (15 diffs)
-
tags/2.7.0/ewd-ufaq-templates/faq-custom-fields.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/faq-ratings.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/faq-social-media-email.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/faq-social-media-facebook.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/faq-social-media-linkedin.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/faq-social-media-pinterest.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/faq-social-media-twitter.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/faq-social-media.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/faq.php (modified) (1 diff)
-
tags/2.7.0/ewd-ufaq-templates/faqs-category-list-header.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/faqs-list-header.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/faqs-pagination.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/faqs-search-submit.php (modified) (1 diff)
-
tags/2.7.0/ewd-ufaq-templates/faqs-search.php (modified) (1 diff)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-captcha.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-custom-field-checkbox.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-custom-field-date.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-custom-field-datetime.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-custom-field-radio.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-custom-field-select.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-custom-field-text.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-custom-field-textarea.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-field-author-email.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-field-author.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-field-faq-answer.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-field-faq-question.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq-submitted-faq-message.php (deleted)
-
tags/2.7.0/ewd-ufaq-templates/submit-faq.php (deleted)
-
tags/2.7.0/includes/AIAssist.class.php (modified) (7 diffs)
-
tags/2.7.0/includes/Ajax.class.php (modified) (7 diffs)
-
tags/2.7.0/includes/AnalyticsBridge.class.php (modified) (1 diff)
-
tags/2.7.0/includes/Blocks.class.php (modified) (1 diff)
-
tags/2.7.0/includes/CustomPostTypes.class.php (modified) (7 diffs)
-
tags/2.7.0/includes/EditorFAQWorkflow.class.php (modified) (1 diff)
-
tags/2.7.0/includes/FAQ.class.php (modified) (9 diffs)
-
tags/2.7.0/includes/HelperCompatibility.class.php (modified) (2 diffs)
-
tags/2.7.0/includes/Notifications.class.php (modified) (4 diffs)
-
tags/2.7.0/includes/OrderingTable.class.php (deleted)
-
tags/2.7.0/includes/Permissions.class.php (modified) (1 diff)
-
tags/2.7.0/includes/Query.class.php (modified) (8 diffs)
-
tags/2.7.0/includes/RetainedData.class.php (added)
-
tags/2.7.0/includes/Settings.class.php (modified) (1 diff)
-
tags/2.7.0/includes/WPForms.class.php (deleted)
-
tags/2.7.0/includes/WooCommerce.class.php (deleted)
-
tags/2.7.0/includes/template-functions.php (modified) (4 diffs)
-
tags/2.7.0/lib/FPDF/FAQ.htm (deleted)
-
tags/2.7.0/lib/FPDF/changelog.htm (deleted)
-
tags/2.7.0/lib/FPDF/doc (deleted)
-
tags/2.7.0/lib/FPDF/font (deleted)
-
tags/2.7.0/lib/FPDF/fpdf.css (deleted)
-
tags/2.7.0/lib/FPDF/fpdf.php (deleted)
-
tags/2.7.0/lib/FPDF/install.txt (deleted)
-
tags/2.7.0/lib/FPDF/license.txt (deleted)
-
tags/2.7.0/lib/FPDF/makefont (deleted)
-
tags/2.7.0/lib/FPDF/tutorial (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/BUILD.md (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/composer.json (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/composer.lock (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/scoper.inc.php (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/vendor/autoload.php (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/vendor/composer (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/vendor/ezyang (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/vendor/maennchen (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/vendor/markbaker (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/vendor/myclabs (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/vendor/phpoffice (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/vendor/psr (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/vendor/scoper-autoload.php (deleted)
-
tags/2.7.0/lib/PHPSpreadsheet/vendor/symfony (deleted)
-
tags/2.7.0/readme.txt (modified) (3 diffs)
-
tags/2.7.0/ultimate-faqs.php (modified) (9 diffs)
-
tags/2.7.0/views/Base.class.php (modified) (1 diff)
-
tags/2.7.0/views/View.FAQ.class.php (modified) (27 diffs)
-
tags/2.7.0/views/View.FAQSearch.class.php (modified) (3 diffs)
-
tags/2.7.0/views/View.FAQs.class.php (modified) (12 diffs)
-
tags/2.7.0/views/View.SubmitFAQ.class.php (deleted)
-
tags/2.7.0/views/View.class.php (modified) (5 diffs)
-
trunk/assets/css/ewd-ufaq-admin.css (modified) (67 diffs)
-
trunk/assets/css/ewd-ufaq-admin1.css (deleted)
-
trunk/assets/css/ewd-ufaq-minimalist.css (deleted)
-
trunk/assets/css/ewd-ufaq-wc-admin.css (deleted)
-
trunk/assets/css/ewd-ufaq-wpforms.css (deleted)
-
trunk/assets/css/ewd-ufaq.css (modified) (16 diffs)
-
trunk/assets/css/images (deleted)
-
trunk/assets/css/jquery-ui.min.css (deleted)
-
trunk/assets/css/rrssb-min.css (deleted)
-
trunk/assets/img/Thumbs-down-icon.png (deleted)
-
trunk/assets/img/Thumbs-up-icon.png (deleted)
-
trunk/assets/js/ewd-ufaq-admin.js (modified) (2 diffs)
-
trunk/assets/js/ewd-ufaq-analytics.js (deleted)
-
trunk/assets/js/ewd-ufaq-managed-editor.js (modified) (2 diffs)
-
trunk/assets/js/ewd-ufaq-wc-admin.js (deleted)
-
trunk/assets/js/ewd-ufaq.js (modified) (15 diffs)
-
trunk/ewd-ufaq-templates/faq-custom-fields.php (deleted)
-
trunk/ewd-ufaq-templates/faq-ratings.php (deleted)
-
trunk/ewd-ufaq-templates/faq-social-media-email.php (deleted)
-
trunk/ewd-ufaq-templates/faq-social-media-facebook.php (deleted)
-
trunk/ewd-ufaq-templates/faq-social-media-linkedin.php (deleted)
-
trunk/ewd-ufaq-templates/faq-social-media-pinterest.php (deleted)
-
trunk/ewd-ufaq-templates/faq-social-media-twitter.php (deleted)
-
trunk/ewd-ufaq-templates/faq-social-media.php (deleted)
-
trunk/ewd-ufaq-templates/faq.php (modified) (1 diff)
-
trunk/ewd-ufaq-templates/faqs-category-list-header.php (deleted)
-
trunk/ewd-ufaq-templates/faqs-list-header.php (deleted)
-
trunk/ewd-ufaq-templates/faqs-pagination.php (deleted)
-
trunk/ewd-ufaq-templates/faqs-search-submit.php (modified) (1 diff)
-
trunk/ewd-ufaq-templates/faqs-search.php (modified) (1 diff)
-
trunk/ewd-ufaq-templates/submit-faq-captcha.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-custom-field-checkbox.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-custom-field-date.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-custom-field-datetime.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-custom-field-radio.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-custom-field-select.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-custom-field-text.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-custom-field-textarea.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-field-author-email.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-field-author.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-field-faq-answer.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-field-faq-question.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq-submitted-faq-message.php (deleted)
-
trunk/ewd-ufaq-templates/submit-faq.php (deleted)
-
trunk/includes/AIAssist.class.php (modified) (7 diffs)
-
trunk/includes/Ajax.class.php (modified) (7 diffs)
-
trunk/includes/AnalyticsBridge.class.php (modified) (1 diff)
-
trunk/includes/Blocks.class.php (modified) (1 diff)
-
trunk/includes/CustomPostTypes.class.php (modified) (7 diffs)
-
trunk/includes/EditorFAQWorkflow.class.php (modified) (1 diff)
-
trunk/includes/FAQ.class.php (modified) (9 diffs)
-
trunk/includes/HelperCompatibility.class.php (modified) (2 diffs)
-
trunk/includes/Notifications.class.php (modified) (4 diffs)
-
trunk/includes/OrderingTable.class.php (deleted)
-
trunk/includes/Permissions.class.php (modified) (1 diff)
-
trunk/includes/Query.class.php (modified) (8 diffs)
-
trunk/includes/RetainedData.class.php (added)
-
trunk/includes/Settings.class.php (modified) (1 diff)
-
trunk/includes/WPForms.class.php (deleted)
-
trunk/includes/WooCommerce.class.php (deleted)
-
trunk/includes/template-functions.php (modified) (4 diffs)
-
trunk/lib/FPDF/FAQ.htm (deleted)
-
trunk/lib/FPDF/changelog.htm (deleted)
-
trunk/lib/FPDF/doc (deleted)
-
trunk/lib/FPDF/font (deleted)
-
trunk/lib/FPDF/fpdf.css (deleted)
-
trunk/lib/FPDF/fpdf.php (deleted)
-
trunk/lib/FPDF/install.txt (deleted)
-
trunk/lib/FPDF/license.txt (deleted)
-
trunk/lib/FPDF/makefont (deleted)
-
trunk/lib/FPDF/tutorial (deleted)
-
trunk/lib/PHPSpreadsheet/BUILD.md (deleted)
-
trunk/lib/PHPSpreadsheet/composer.json (deleted)
-
trunk/lib/PHPSpreadsheet/composer.lock (deleted)
-
trunk/lib/PHPSpreadsheet/scoper.inc.php (deleted)
-
trunk/lib/PHPSpreadsheet/vendor/autoload.php (deleted)
-
trunk/lib/PHPSpreadsheet/vendor/composer (deleted)
-
trunk/lib/PHPSpreadsheet/vendor/ezyang (deleted)
-
trunk/lib/PHPSpreadsheet/vendor/maennchen (deleted)
-
trunk/lib/PHPSpreadsheet/vendor/markbaker (deleted)
-
trunk/lib/PHPSpreadsheet/vendor/myclabs (deleted)
-
trunk/lib/PHPSpreadsheet/vendor/phpoffice (deleted)
-
trunk/lib/PHPSpreadsheet/vendor/psr (deleted)
-
trunk/lib/PHPSpreadsheet/vendor/scoper-autoload.php (deleted)
-
trunk/lib/PHPSpreadsheet/vendor/symfony (deleted)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/ultimate-faqs.php (modified) (9 diffs)
-
trunk/views/Base.class.php (modified) (1 diff)
-
trunk/views/View.FAQ.class.php (modified) (27 diffs)
-
trunk/views/View.FAQSearch.class.php (modified) (3 diffs)
-
trunk/views/View.FAQs.class.php (modified) (12 diffs)
-
trunk/views/View.SubmitFAQ.class.php (deleted)
-
trunk/views/View.class.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ultimate-faqs/tags/2.7.0/assets/css/ewd-ufaq-admin.css
r3744649 r3821169 1 .ewd-ufaq-clear { 1 2 .ewd-ufaq-clear{ 2 3 clear: both; 3 }4 .ewd-ufaq-item {5 cursor: move;6 4 } 7 5 8 6 .ufaq_page_ewd-ufaq-dashboard, 9 7 .ufaq_page_ewd-ufaq-settings, 10 .post-type-ufaq, 11 .ufaq_page_ewd-ufaq-ordering-table { 8 .post-type-ufaq{ 12 9 background: #fff; 13 10 } 11 14 12 .ufaq_page_ewd-ufaq-settings .wrap, 15 .post-type-ufaq .wrap, 16 .ufaq_page_ewd-ufaq-ordering-table .wrap { 13 .post-type-ufaq .wrap{ 17 14 margin: 10px 0 0 -20px; 18 15 box-sizing: border-box; 19 16 } 17 20 18 .ufaq_page_ewd-ufaq-settings .wrap *, 21 .post-type-ufaq .wrap *, 22 .ufaq_page_ewd-ufaq-ordering-table .wrap * { 19 .post-type-ufaq .wrap *{ 23 20 box-sizing: border-box; 24 21 } 25 22 26 27 /* BANNER */ 28 29 .ewd-ufaq-dashboard-new-upgrade-banner { 23 .ewd-ufaq-dashboard-new-upgrade-banner{ 30 24 position: relative; 31 25 display: flex; … … 36 30 box-sizing: border-box; 37 31 } 38 .ewd-ufaq-dashboard-new-upgrade-banner * { 32 33 .ewd-ufaq-dashboard-new-upgrade-banner *{ 39 34 box-sizing: border-box; 40 35 } 41 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon { 36 37 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{ 42 38 position: absolute; 43 39 height: 112px; … … 48 44 background-size: 112px 112px; 49 45 } 50 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons { 46 47 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons{ 51 48 position: absolute; 52 49 height: 112px; … … 55 52 top: 84px; 56 53 } 57 .ewd-ufaq-dashboard-new-upgrade-button { 54 55 .ewd-ufaq-dashboard-new-upgrade-button{ 58 56 display: flex; 59 57 justify-content: center; … … 72 70 transition: background .25s, color .25s, border-color .25s; 73 71 } 74 .ewd-ufaq-dashboard-new-upgrade-button:hover { 72 73 .ewd-ufaq-dashboard-new-upgrade-button:hover{ 75 74 background: #915add; 76 75 border-color: #915add; 77 76 color: #fff; 78 77 } 79 .ewd-ufaq-dashboard-new-upgrade-button.ewd-ufaq-dashboard-new-trial-button { 78 79 .ewd-ufaq-dashboard-new-upgrade-button.ewd-ufaq-dashboard-new-trial-button{ 80 80 background-color: transparent; 81 81 border: 1px solid #0acbaa; 82 82 color: #0acbaa; 83 83 } 84 .ewd-ufaq-dashboard-new-upgrade-button.ewd-ufaq-dashboard-new-trial-button:hover { 84 85 .ewd-ufaq-dashboard-new-upgrade-button.ewd-ufaq-dashboard-new-trial-button:hover{ 85 86 background-color: #0acbaa; 86 87 border-color: #0acbaa; 87 88 color: #fff; 88 89 } 89 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text { 90 91 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text{ 90 92 position: absolute; 91 93 display: flex; … … 97 99 color: #fff; 98 100 } 99 .ewd-ufaq-dashboard-banner-title { 101 102 .ewd-ufaq-dashboard-banner-title{ 100 103 font-size: 29px; 101 104 line-height: 32px; 102 105 font-weight: bold; 103 106 } 104 .ewd-ufaq-dashboard-banner-brief { 107 108 .ewd-ufaq-dashboard-banner-brief{ 105 109 margin-top: 14px; 106 110 font-size: 14px; 107 111 } 108 112 113 109 114 @media screen and (min-width: 1700px) { 110 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{115 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{ 111 116 left: 272px; 112 117 } 113 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons { 118 119 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons{ 114 120 right: 228px; 115 121 } 116 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text { 122 123 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text{ 117 124 width: calc(100% - 880px); 118 125 left: 420px; 119 } 120 } 126 }} 127 121 128 @media screen and (max-width: 1200px) { 122 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{129 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{ 123 130 left: 54px; 124 131 } 125 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons { 132 133 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons{ 126 134 right: 32px; 127 135 } 128 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text { 136 137 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text{ 129 138 width: calc(100% - 466px); 130 139 left: 202px; 131 } 132 } 140 }} 141 133 142 @media screen and (max-width: 800px) { 134 .ewd-ufaq-dashboard-new-upgrade-banner{143 .ewd-ufaq-dashboard-new-upgrade-banner{ 135 144 height: 512px; 136 145 height: 300px; 137 146 } 138 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon { 147 148 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{ 139 149 left: calc(50% - 56px); 140 150 top: 48px; 141 151 display: none; 142 152 } 143 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text { 153 154 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text{ 144 155 width: 80%; 145 156 left: 10%; … … 150 161 top: 42px; 151 162 } 152 .ewd-ufaq-dashboard-banner-brief { 163 164 .ewd-ufaq-dashboard-banner-brief{ 153 165 display: none; 154 } 155 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons { 166 } 167 168 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons{ 156 169 right: calc(50% - 96px); 157 170 top: 368px; 158 171 top: 172px; 159 } 160 } 161 162 163 /* MENU */ 164 165 .ewd-ufaq-admin-header-menu { 172 }} 173 174 .ewd-ufaq-admin-header-menu{ 166 175 margin: 48px 96px 0 76px; 167 176 } 168 .ewd-ufaq-admin-header-menu .nav-tab-wrapper { 177 178 .ewd-ufaq-admin-header-menu .nav-tab-wrapper{ 169 179 border: 0; 170 180 margin: 0; … … 174 184 border-bottom: 1px solid #e9e9e9; 175 185 } 176 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab { 186 187 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab{ 177 188 border: 0; 178 189 margin: 0 28px -1px 0; … … 183 194 font-size: 20px; 184 195 } 196 185 197 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab:nth-of-type(1n+2):hover, 186 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab.nav-tab-active {198 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab.nav-tab-active{ 187 199 color: #7B31AF; 188 200 border-bottom-color: #7B31AF; 189 201 } 190 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open { 202 203 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open{ 191 204 display: none; 192 205 align-items: center; 193 206 } 194 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open .dashicons { 207 208 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open .dashicons{ 195 209 display: flex; 196 210 justify-content: center; … … 204 218 width: 32px; 205 219 } 220 206 221 #ewd-ufaq-dash-mobile-menu-up-caret, 207 #ewd-ufaq-dash-mobile-menu-down-caret {222 #ewd-ufaq-dash-mobile-menu-down-caret{ 208 223 display: none; 209 224 } 210 225 211 226 227 212 228 @media screen and (max-width: 1600px) { 213 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab{229 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab{ 214 230 font-size: 18px; 215 } 216 } 231 }} 232 217 233 @media screen and (max-width: 1024px) { 218 .ewd-ufaq-admin-header-menu{234 .ewd-ufaq-admin-header-menu{ 219 235 margin: 40px 32px 0 22px; 220 236 } 221 .ewd-ufaq-admin-header-menu .nav-tab-wrapper { 237 238 .ewd-ufaq-admin-header-menu .nav-tab-wrapper{ 222 239 border-bottom: none; 223 240 } 224 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open { 241 242 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open{ 225 243 display: flex; 226 244 } 227 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab { 245 246 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab{ 228 247 font-size: 22px; 229 248 } 230 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab:nth-of-type(1) { 249 250 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab:nth-of-type(1){ 231 251 width: 100%; 232 252 font-size: 28px; 233 253 margin-bottom: 16px; 234 } 235 } 236 237 238 /* PAGE GLOBALS */ 239 240 .post-type-ufaq .wrap, 241 .ufaq_page_ewd-ufaq-ordering-table .wrap { 254 }} 255 256 .post-type-ufaq .wrap{ 242 257 padding: 0 96px; 243 258 } 244 .ufaq_page_ewd-ufaq-settings .wrap { 259 260 .ufaq_page_ewd-ufaq-settings .wrap{ 245 261 padding: 0; 246 262 } 247 .wrap h1 { 263 264 .wrap h1{ 248 265 display: inline-block; 249 266 width: 100%; … … 253 270 color: #212427; 254 271 } 272 255 273 @media screen and (max-width: 1024px) { 256 .post-type-ufaq .wrap, 257 .ufaq_page_ewd-ufaq-ordering-table .wrap { 274 .post-type-ufaq .wrap{ 258 275 padding: 0 32px 0 42px; 259 276 } 260 .ufaq_page_ewd-ufaq-settings .wrap { 277 278 .ufaq_page_ewd-ufaq-settings .wrap{ 261 279 padding: 0; 262 } 263 } 264 265 266 /* DASHBOARD */ 267 268 #ewd-ufaq-dashboard-content-area { 280 }} 281 282 #ewd-ufaq-dashboard-content-area{ 269 283 display: flex; 270 284 flex-direction: column; … … 274 288 box-sizing: border-box; 275 289 } 276 #ewd-ufaq-dashboard-content-area * { 290 291 #ewd-ufaq-dashboard-content-area *{ 277 292 box-sizing: border-box; 278 293 } 279 294 280 .ewd-ufaq-dashboard-visit-our-site {295 .ewd-ufaq-dashboard-visit-our-site{ 281 296 display: block; 282 297 text-align: center; … … 289 304 font-size: 16px; 290 305 } 306 291 307 .ewd-ufaq-dashboard-visit-our-site a, 292 .ewd-ufaq-dashboard-visit-our-site a:hover {308 .ewd-ufaq-dashboard-visit-our-site a:hover{ 293 309 color: #fff; 294 310 } 295 311 296 .ewd-ufaq-dashboard-support-widgets {312 .ewd-ufaq-dashboard-support-widgets{ 297 313 display: grid; 298 314 grid-template-columns: repeat(2, 1fr); … … 301 317 margin: 48px 0 0; 302 318 } 303 .ewd-ufaq-dashboard-support-widgets li { 319 320 .ewd-ufaq-dashboard-support-widgets li{ 304 321 display: flex; 305 322 flex-direction: column; … … 311 328 justify-content: space-between; 312 329 } 313 .ewd-ufaq-dashboard-support-widgets-title { 330 331 .ewd-ufaq-dashboard-support-widgets-title{ 314 332 font-size: 16px; 315 333 font-weight: bold; 316 334 color: #212427; 317 335 } 318 .ewd-ufaq-dashboard-support-widgets-text-and-link { 336 337 .ewd-ufaq-dashboard-support-widgets-text-and-link{ 319 338 display: flex; 320 339 justify-content: space-between; 321 340 align-items: center; 322 341 } 323 .ewd-ufaq-dashboard-support-widgets-text { 342 343 .ewd-ufaq-dashboard-support-widgets-text{ 324 344 font-size: 16px; 325 345 color: #5f5f5f; 326 346 } 327 .ewd-ufaq-dashboard-support-widgets-text span { 347 348 .ewd-ufaq-dashboard-support-widgets-text span{ 328 349 margin-right: 12px; 329 350 } 330 .ewd-ufaq-dashboard-support-widgets-link { 351 352 .ewd-ufaq-dashboard-support-widgets-link{ 331 353 display: flex; 332 354 justify-content: center; … … 344 366 transition: background .25s, color .25s, border-color .25s; 345 367 } 346 .ewd-ufaq-dashboard-support-widgets-link:hover { 368 369 .ewd-ufaq-dashboard-support-widgets-link:hover{ 347 370 background: #915add; 348 371 border-color: #915add; … … 350 373 } 351 374 352 .ewd-ufaq-dashboard-catalogs {375 .ewd-ufaq-dashboard-catalogs{ 353 376 display: flex; 354 377 flex-direction: column; … … 358 381 margin: 40px 0 0; 359 382 } 360 .ewd-ufaq-dashboard-catalogs-title { 383 384 .ewd-ufaq-dashboard-catalogs-title{ 361 385 font-size: 16px; 362 386 font-weight: bold; … … 365 389 } 366 390 367 .ewd-ufaq-license-status summary {391 .ewd-ufaq-license-status summary{ 368 392 cursor: pointer; 369 393 } 370 .ewd-ufaq-license-status form { 394 395 .ewd-ufaq-license-status form{ 371 396 margin-top: 16px; 372 397 display: flex; … … 375 400 gap: 12px; 376 401 } 377 .ewd-ufaq-license-status form:first-of-type { 402 403 .ewd-ufaq-license-status form:first-of-type{ 378 404 margin-bottom: 32px; 379 405 } 380 .ewd-ufaq-license-status input[type="text"] { 406 407 .ewd-ufaq-license-status input[type="text"]{ 381 408 min-height: 30px; 382 409 height: 30px; … … 384 411 margin: 0; 385 412 } 386 .ewd-ufaq-license-status input[name="key"], .ewd-ufaq-license-status button[name="ewd_upgrade_to_full"] { 413 414 .ewd-ufaq-license-status input[name="key"], .ewd-ufaq-license-status button[name="ewd_upgrade_to_full"]{ 387 415 height: 40px; 388 416 } 389 417 390 .ewd-ufaq-dashboard-get-premium-and-trial { 391 display: flex; 392 flex-direction: column; 393 } 394 .ewd-ufaq-dashboard-get-premium-and-trial.trial-happening { 418 .ewd-ufaq-dashboard-get-premium-and-trial{ 419 display: flex; 420 flex-direction: column; 421 } 422 423 .ewd-ufaq-dashboard-get-premium-and-trial.trial-happening{ 395 424 flex-direction: row; 396 425 justify-content: space-between; 397 426 } 398 427 399 #ewd-ufaq-dashboard-new-footer-one {428 #ewd-ufaq-dashboard-new-footer-one{ 400 429 display: flex; 401 430 flex-direction: column; … … 406 435 background: #7B31AF; 407 436 } 408 .ewd-ufaq-dashboard-new-footer-one-inside { 437 438 .ewd-ufaq-dashboard-new-footer-one-inside{ 409 439 display: flex; 410 440 justify-content: space-between; … … 412 442 width: 100%; 413 443 } 414 .ewd-ufaq-dashboard-new-footer-one-left { 444 445 .ewd-ufaq-dashboard-new-footer-one-left{ 415 446 display: flex; 416 447 flex-direction: column; … … 418 449 margin-bottom: 32px; 419 450 } 420 .ewd-ufaq-dashboard-new-footer-one-title { 451 452 .ewd-ufaq-dashboard-new-footer-one-title{ 421 453 font-size: 16px; 422 454 font-weight: bold; … … 424 456 line-height: 1.2; 425 457 } 426 .ewd-ufaq-dashboard-new-footer-one-benefits { 458 459 .ewd-ufaq-dashboard-new-footer-one-benefits{ 427 460 width: 100%; 428 461 margin-top: 32px; … … 433 466 margin: 40px 0 0; 434 467 } 435 .ewd-ufaq-dashboard-new-footer-one-benefits li { 468 469 .ewd-ufaq-dashboard-new-footer-one-benefits li{ 436 470 margin: 0; 437 471 padding-left: 36px; … … 444 478 color: #fbfbfb 445 479 } 446 .ewd-ufaq-dashboard-new-footer-one-buttons { 480 481 .ewd-ufaq-dashboard-new-footer-one-buttons{ 447 482 display: flex; 448 483 flex-direction: column; 449 484 width: 192px; 450 485 } 451 .ewd-ufaq-dashboard-new-footer-one-buttons .ewd-ufaq-dashboard-new-upgrade-button { 486 487 .ewd-ufaq-dashboard-new-footer-one-buttons .ewd-ufaq-dashboard-new-upgrade-button{ 452 488 background: #fff; 453 489 border: 1px solid #fff; … … 456 492 transition: background .25s, color .25s, border-color .25s; 457 493 } 458 .ewd-ufaq-dashboard-new-footer-one-buttons .ewd-ufaq-dashboard-new-upgrade-button:hover { 494 495 .ewd-ufaq-dashboard-new-footer-one-buttons .ewd-ufaq-dashboard-new-upgrade-button:hover{ 459 496 background: #ece2f3; 460 497 border-color: #ece2f3; 461 498 color: #212427; 462 499 } 463 .ewd-premium-helper-dashboard-get-premium-widget-button { 500 501 .ewd-premium-helper-dashboard-get-premium-widget-button{ 464 502 background: transparent !important; 465 503 border: 1px solid #fff !important; 466 504 color: #fff !important; 467 505 } 468 .ewd-premium-helper-dashboard-get-premium-widget-button:hover { 506 507 .ewd-premium-helper-dashboard-get-premium-widget-button:hover{ 469 508 background: #fff !important; 470 509 border-color: #fff !important; 471 510 color: #212427 !important; 472 511 } 473 .trial-happening #ewd-ufaq-dashboard-new-footer-one { 512 513 .trial-happening #ewd-ufaq-dashboard-new-footer-one{ 474 514 width: calc(70% - 12px); 475 515 } 476 .trial-happening .ewd-ufaq-dashboard-new-footer-one-inside { 477 flex-direction: column; 478 } 479 .trial-happening .ewd-ufaq-dashboard-new-footer-one-left { 516 517 .trial-happening .ewd-ufaq-dashboard-new-footer-one-inside{ 518 flex-direction: column; 519 } 520 521 .trial-happening .ewd-ufaq-dashboard-new-footer-one-left{ 480 522 width: 100%; 481 523 } 482 .trial-happening .ewd-ufaq-dashboard-new-footer-one-title { 524 525 .trial-happening .ewd-ufaq-dashboard-new-footer-one-title{ 483 526 text-align: center; 484 527 } 485 .trial-happening .ewd-ufaq-dashboard-new-footer-one-benefits { 528 529 .trial-happening .ewd-ufaq-dashboard-new-footer-one-benefits{ 486 530 grid-template-columns: repeat(2, 1fr); 487 531 } 488 .trial-happening .ewd-ufaq-dashboard-new-footer-one-buttons { 532 533 .trial-happening .ewd-ufaq-dashboard-new-footer-one-buttons{ 489 534 width: 100%; 490 535 justify-content: center; … … 492 537 } 493 538 494 .ewd-ufaq-dashboard-trial-container {539 .ewd-ufaq-dashboard-trial-container{ 495 540 display: flex; 496 541 flex-direction: column; … … 500 545 margin: 40px 0 0; 501 546 } 502 .trial-happening .ewd-ufaq-dashboard-trial-container { 547 548 .trial-happening .ewd-ufaq-dashboard-trial-container{ 503 549 width: calc(30% - 12px); 504 550 } 505 551 506 .ewd-ufaq-dashboard-guarantee {552 .ewd-ufaq-dashboard-guarantee{ 507 553 display: flex; 508 554 align-items: center; … … 512 558 color: #5f5f5f; 513 559 } 514 .ewd-ufaq-dashboard-guarantee img { 560 561 .ewd-ufaq-dashboard-guarantee img{ 515 562 width: 128px; 516 563 height: auto; 517 564 margin-right: 32px; 518 565 } 519 .ewd-ufaq-dashboard-guarantee-title-and-text { 520 display: flex; 521 flex-direction: column; 522 } 523 .ewd-ufaq-dashboard-guarantee-title { 566 567 .ewd-ufaq-dashboard-guarantee-title-and-text{ 568 display: flex; 569 flex-direction: column; 570 } 571 572 .ewd-ufaq-dashboard-guarantee-title{ 524 573 font-size: 24px; 525 574 font-weight: bold; … … 528 577 color: #212427 529 578 } 530 .ewd-ufaq-dashboard-guarantee-text { 579 580 .ewd-ufaq-dashboard-guarantee-text{ 531 581 font-size: 14px; 532 582 font-weight: normal; 533 583 } 534 535 .ewd-ufaq-dashboard-testimonials-and-other-plugins {584 585 .ewd-ufaq-dashboard-testimonials-and-other-plugins{ 536 586 display: flex; 537 587 justify-content: space-between; 538 588 } 539 589 540 .ewd-ufaq-dashboard-other-plugins-container {590 .ewd-ufaq-dashboard-other-plugins-container{ 541 591 display: flex; 542 592 flex-direction: column; … … 548 598 background: linear-gradient(91.21deg, rgba(120, 48, 170, 0.5) -9.34%, rgba(255, 255, 255, 0) 34.79%, rgba(251, 250, 252, 0.0105472) 81.09%, rgba(89, 36, 126, 0.5) 133.01%); 549 599 } 550 .ewd-ufaq-dashboard-other-plugins-container-title { 600 601 .ewd-ufaq-dashboard-other-plugins-container-title{ 551 602 font-size: 16px; 552 603 font-weight: bold; … … 554 605 margin-bottom: 8px; 555 606 } 556 .ewd-ufaq-dashboard-other-plugins { 607 608 .ewd-ufaq-dashboard-other-plugins{ 557 609 display: flex; 558 610 flex-direction: column; 559 611 margin: 0; 560 612 } 561 .ewd-ufaq-dashboard-other-plugins li { 613 614 .ewd-ufaq-dashboard-other-plugins li{ 562 615 display: flex; 563 616 margin: 28px 0 0; 564 617 } 565 .ewd-ufaq-dashboard-other-plugins li img { 618 619 .ewd-ufaq-dashboard-other-plugins li img{ 566 620 width: 120px; 567 621 height: 120px; 568 622 margin-right: 20px; 569 623 } 570 .ewd-ufaq-dashboard-other-plugins-text { 571 display: flex; 572 flex-direction: column; 573 } 574 .ewd-ufaq-dashboard-other-plugins-title { 624 625 .ewd-ufaq-dashboard-other-plugins-text{ 626 display: flex; 627 flex-direction: column; 628 } 629 630 .ewd-ufaq-dashboard-other-plugins-title{ 575 631 font-size: 16px; 576 632 font-weight: bold; … … 578 634 color: #212427; 579 635 } 580 .ewd-ufaq-dashboard-other-plugins-blurb { 636 637 .ewd-ufaq-dashboard-other-plugins-blurb{ 581 638 font-size: 14px; 582 639 color: #5f5f5f; 583 640 } 584 641 585 .ewd-ufaq-dashboard-testimonials-container {642 .ewd-ufaq-dashboard-testimonials-container{ 586 643 display: flex; 587 644 flex-direction: column; … … 593 650 background: linear-gradient(91.21deg, rgba(120, 48, 170, 0.5) -9.34%, rgba(255, 255, 255, 0) 34.79%, rgba(251, 250, 252, 0.0105472) 81.09%, rgba(89, 36, 126, 0.5) 133.01%); 594 651 } 595 .ewd-ufaq-dashboard-testimonials-container-title { 652 653 .ewd-ufaq-dashboard-testimonials-container-title{ 596 654 font-size: 16px; 597 655 font-weight: bold; … … 599 657 margin-bottom: 8px; 600 658 } 601 .ewd-ufaq-dashboard-testimonials { 602 display: flex; 603 flex-direction: column; 604 } 605 .ewd-ufaq-dashboard-testimonials li { 659 660 .ewd-ufaq-dashboard-testimonials{ 661 display: flex; 662 flex-direction: column; 663 } 664 665 .ewd-ufaq-dashboard-testimonials li{ 606 666 text-align: center; 607 667 } 608 .ewd-ufaq-dashboard-testimonials li img { 668 669 .ewd-ufaq-dashboard-testimonials li img{ 609 670 width: 140px; 610 671 height: auto; 611 672 margin-top: 8px; 612 673 } 613 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-title { 674 675 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-title{ 614 676 margin: 28px 0 20px; 615 677 font-size: 30px; … … 618 680 color: #212427; 619 681 } 620 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-author { 682 683 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-author{ 621 684 font-size: 16px; 622 685 color: #5f5f5f; 623 686 } 624 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text { 687 688 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text{ 625 689 padding: 24px 10% 0; 626 690 font-size: 14px; 627 691 color: #5f5f5f; 628 692 } 629 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text a { 693 694 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text a{ 630 695 color: #0acbaa; 631 696 text-decoration: none; 632 697 font-weight: bold; 633 698 } 634 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text a:hover { 699 700 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text a:hover{ 635 701 color: #1CE6C3; 636 702 } 703 637 704 638 705 @media screen and (max-width: 1024px) { 639 #ewd-ufaq-dashboard-content-area{706 #ewd-ufaq-dashboard-content-area{ 640 707 padding: 0 32px 0 22px; 641 708 } 642 .ewd-ufaq-dashboard-support-widgets { 709 710 .ewd-ufaq-dashboard-support-widgets{ 643 711 grid-template-columns: repeat(1, 1fr); 644 712 } 645 .ewd-ufaq-dashboard-get-premium-and-trial.trial-happening { 713 714 .ewd-ufaq-dashboard-get-premium-and-trial.trial-happening{ 646 715 flex-direction: column; 647 716 justify-content: initial; 648 717 } 649 .trial-happening #ewd-ufaq-dashboard-new-footer-one, 650 .trial-happening .ewd-ufaq-dashboard-trial-container { 718 719 .trial-happening #ewd-ufaq-dashboard-new-footer-one, 720 .trial-happening .ewd-ufaq-dashboard-trial-container{ 651 721 width: 100%; 652 722 } 653 .ewd-ufaq-dashboard-new-footer-one-inside { 723 724 .ewd-ufaq-dashboard-new-footer-one-inside{ 654 725 flex-direction: column; 655 726 } 656 .ewd-ufaq-dashboard-new-footer-one-left { 727 728 .ewd-ufaq-dashboard-new-footer-one-left{ 657 729 width: 100%; 658 730 } 659 .ewd-ufaq-dashboard-new-footer-one-title { 731 732 .ewd-ufaq-dashboard-new-footer-one-title{ 660 733 text-align: center; 661 734 } 662 .ewd-ufaq-dashboard-new-footer-one-benefits { 735 736 .ewd-ufaq-dashboard-new-footer-one-benefits{ 663 737 grid-template-columns: repeat(2, 1fr); 664 738 } 665 .ewd-ufaq-dashboard-new-footer-one-buttons { 739 740 .ewd-ufaq-dashboard-new-footer-one-buttons{ 666 741 width: 100%; 667 742 justify-content: center; 668 743 margin-top: 32px; 669 744 } 670 .ewd-ufaq-dashboard-testimonials-and-other-plugins { 745 746 .ewd-ufaq-dashboard-testimonials-and-other-plugins{ 671 747 flex-direction: column; 672 748 justify-content: initial; 673 749 } 674 .ewd-ufaq-dashboard-other-plugins-container, 675 .ewd-ufaq-dashboard-testimonials-container { 750 751 .ewd-ufaq-dashboard-other-plugins-container, 752 .ewd-ufaq-dashboard-testimonials-container{ 676 753 width: 100%; 677 } 678 }754 }} 755 679 756 @media screen and (max-width: 568px) { 680 .ewd-ufaq-dashboard-new-footer-one-benefits,681 .trial-happening .ewd-ufaq-dashboard-new-footer-one-benefits {757 .ewd-ufaq-dashboard-new-footer-one-benefits, 758 .trial-happening .ewd-ufaq-dashboard-new-footer-one-benefits{ 682 759 grid-template-columns: repeat(1, 1fr); 683 } 684 } 685 686 687 /* FOOTER */ 688 689 #ewd-ufaq-dashboard-new-footer-two { 760 }} 761 762 #ewd-ufaq-dashboard-new-footer-two{ 690 763 display: flex; 691 764 margin: 40px 0 0 -20px; … … 695 768 box-sizing: border-box; 696 769 } 697 #ewd-ufaq-dashboard-new-footer-two * { 770 771 #ewd-ufaq-dashboard-new-footer-two *{ 698 772 box-sizing: border-box; 699 773 } 700 .ewd-ufaq-dashboard-new-footer-two-inside { 774 775 .ewd-ufaq-dashboard-new-footer-two-inside{ 701 776 display: flex; 702 777 flex-wrap: wrap; … … 704 779 padding: 48px 96px; 705 780 } 706 .ewd-ufaq-dashboard-new-footer-two-icon { 781 782 .ewd-ufaq-dashboard-new-footer-two-icon{ 707 783 width: 110px; 708 784 height: 105px; 709 785 margin-right: 40px; 710 786 } 711 .ewd-ufaq-dashboard-new-footer-two-blurb { 787 788 .ewd-ufaq-dashboard-new-footer-two-blurb{ 712 789 width: 300px; 713 790 line-height: 1.7; 714 791 font-size: 12px; 715 792 } 716 .ewd-ufaq-dashboard-new-footer-two-menu { 793 794 .ewd-ufaq-dashboard-new-footer-two-menu{ 717 795 width: 150px; 718 796 margin: 0; … … 722 800 flex-direction: column; 723 801 } 724 .ewd-ufaq-dashboard-new-footer-two-menu:first-of-type { 802 803 .ewd-ufaq-dashboard-new-footer-two-menu:first-of-type{ 725 804 margin-left: auto; 726 805 } 727 .ewd-ufaq-dashboard-new-footer-two-menu li { 806 807 .ewd-ufaq-dashboard-new-footer-two-menu li{ 728 808 font-weight: bold; 729 809 margin-bottom: 4px; … … 731 811 font-size: 14px; 732 812 } 733 .ewd-ufaq-dashboard-new-footer-two-menu li:first-of-type { 813 814 .ewd-ufaq-dashboard-new-footer-two-menu li:first-of-type{ 734 815 margin-bottom: 9px; 735 816 } 736 .ewd-ufaq-dashboard-new-footer-two-menu li:last-of-type { 817 818 .ewd-ufaq-dashboard-new-footer-two-menu li:last-of-type{ 737 819 margin-bottom: 0; 738 820 } 739 .ewd-ufaq-dashboard-new-footer-two-menu li a { 821 822 .ewd-ufaq-dashboard-new-footer-two-menu li a{ 740 823 font-weight: normal; 741 824 color: #D3DFF5; … … 743 826 font-size: 14px; 744 827 } 745 .ewd-ufaq-dashboard-new-footer-two-menu li a:hover { 828 829 .ewd-ufaq-dashboard-new-footer-two-menu li a:hover{ 746 830 color: #fff; 747 831 } 748 832 833 749 834 @media screen and (max-width: 1024px) { 750 .ewd-ufaq-dashboard-new-footer-two-inside{835 .ewd-ufaq-dashboard-new-footer-two-inside{ 751 836 flex-direction: column; 752 837 flex-wrap: nowrap; 753 838 align-items: center; 754 } 755 .ewd-ufaq-dashboard-new-footer-two-icon { 839 } 840 841 .ewd-ufaq-dashboard-new-footer-two-icon{ 756 842 margin-right: 0; 757 843 } 758 .ewd-ufaq-dashboard-new-footer-two-blurb { 844 845 .ewd-ufaq-dashboard-new-footer-two-blurb{ 759 846 display: none; 760 847 } 761 .ewd-ufaq-dashboard-new-footer-two-menu, 762 .ewd-ufaq-dashboard-new-footer-two-menu:first-of-type { 848 849 .ewd-ufaq-dashboard-new-footer-two-menu, 850 .ewd-ufaq-dashboard-new-footer-two-menu:first-of-type{ 763 851 margin: 32px 0 0; 764 852 } 765 .ewd-ufaq-dashboard-new-footer-two-menu li { 853 854 .ewd-ufaq-dashboard-new-footer-two-menu li{ 766 855 text-align: center; 767 856 margin-bottom: 4px; 768 857 font-size: 14px; 769 858 } 770 .ewd-ufaq-dashboard-new-footer-two-menu li:first-of-type { 859 860 .ewd-ufaq-dashboard-new-footer-two-menu li:first-of-type{ 771 861 margin-bottom: 9px; 772 862 } 773 .ewd-ufaq-dashboard-new-footer-two-menu li:last-of-type { 863 864 .ewd-ufaq-dashboard-new-footer-two-menu li:last-of-type{ 774 865 margin-bottom: 0; 775 866 } 776 .ewd-ufaq-dashboard-new-footer-two-menu li a { 867 868 .ewd-ufaq-dashboard-new-footer-two-menu li a{ 777 869 font-size: 14px; 778 } 779 } 780 781 782 /* SETTINGS PREVIEW */ 783 784 .ewd-ufaq-settings-preview { 870 }} 871 872 .ewd-ufaq-settings-preview{ 785 873 display: flex; 786 874 flex-direction: column; … … 788 876 padding: 24px 96px 0 96px; 789 877 } 790 .ewd-ufaq-settings-preview h2 { 878 879 .ewd-ufaq-settings-preview h2{ 791 880 display: block !important; 792 881 font-size: 28px !important; 793 882 padding: 0 !important; 794 883 } 795 .ewd-ufaq-settings-preview h2 span { 884 885 .ewd-ufaq-settings-preview h2 span{ 796 886 position: absolute; 797 887 margin-left: 16px; … … 802 892 padding: 2px 8px; 803 893 text-transform: uppercase; 804 } 805 .ewd-ufaq-settings-preview p { 894 } 895 896 .ewd-ufaq-settings-preview p{ 806 897 margin: 40px 0 16px; 807 898 font-size: 16px; 808 899 color: #5f5f5f; 809 } 810 .ewd-ufaq-settings-preview-images { 900 } 901 902 .ewd-ufaq-settings-preview-images{ 811 903 display: flex; 812 904 justify-content: space-between; 813 905 width: 100%; 814 906 } 815 .ewd-ufaq-settings-preview-images img { 907 908 .ewd-ufaq-settings-preview-images img{ 816 909 width: calc(50% - 12px); 817 910 border: 1px solid #ddd; … … 820 913 } 821 914 822 .ewd-ufaq-settings-preview-other-features {915 .ewd-ufaq-settings-preview-other-features{ 823 916 display: flex; 824 917 flex-direction: column; … … 826 919 } 827 920 921 828 922 @media screen and (max-width: 1024px) { 829 .ewd-ufaq-settings-preview{923 .ewd-ufaq-settings-preview{ 830 924 padding: 24px 32px 0 42px; 831 } 832 } 925 }} 926 833 927 @media screen and (max-width: 768px) { 834 .ewd-ufaq-settings-preview-images{928 .ewd-ufaq-settings-preview-images{ 835 929 flex-direction: column; 836 930 justify-content: initial; 837 931 } 838 .ewd-ufaq-settings-preview-images img { 932 933 .ewd-ufaq-settings-preview-images img{ 839 934 width: 100%; 840 } 841 } 842 843 844 /******************************** 845 SEARCH TERMS TABLE IN SETTINGS 846 ********************************/ 847 848 .ewd-ufaq-search-terms-box, 849 .ewd-ufaq-search-terms-box * { 850 box-sizing: border-box; 851 } 852 .ewd-ufaq-search-terms-box { 853 position: relative; 854 display: flex; 855 flex-direction: column; 856 width: 100%; 857 max-width: 400px; 858 border: 1px solid #ccc; 859 border-radius: 14px; 860 margin: 21px 0 0; 861 } 862 .ewd-ufaq-search-term-each { 863 display: flex; 864 flex-basis: 100%; 865 border-bottom: 1px solid #ccc; 866 } 867 .ewd-ufaq-search-term-each:last-of-type { 868 border-bottom: none; 869 } 870 .ewd-ufaq-search-term-each-label, 871 .ewd-ufaq-search-term-each-value { 872 padding: 10px 16px; 873 } 874 .ewd-ufaq-search-term-each-label { 875 border-right: 1px solid #ccc; 876 font-weight: bold; 877 flex-basis: 80%; 878 } 879 .ewd-ufaq-search-term-each-value { 880 flex-basis: 20%; 881 text-align: center; 882 } 883 .ewd-ufaq-settings-reset-search-terms { 935 }} 936 937 .ewd-ufaq-settings-reset-search-terms{ 884 938 position: relative; 885 939 float: left; … … 896 950 transition: background .35s; 897 951 } 898 .ewd-ufaq-settings-reset-search-terms:hover { 952 953 .ewd-ufaq-settings-reset-search-terms:hover{ 899 954 background: #894ae1; 900 955 } 901 956 902 903 /************ 904 EXTRA 905 ************/ 906 907 #ewd-ufaq-custom-fields-table select { 908 width: 100% !important; 909 } 910 #ewd-ufaq-custom-fields-table th { 911 padding: 20px 10px 20px 10px !important; 912 } 913 914 .ewd-ufaq-import-export-container { 915 position: relative; 916 float: left; 917 margin-left: 32px; 918 width: calc(100% - 32px); 919 } 920 921 input[name="ewd_ufaq_export_pdf"] { 957 input[name="ewd_ufaq_export_pdf"]{ 922 958 margin-top: 8px !important; 923 959 } 924 960 925 .ewd-ufaq-meta-field label {961 .ewd-ufaq-meta-field label{ 926 962 display: inline-block; 927 963 width: 150px; 928 964 margin: 12px 0; 929 965 } 966 930 967 931 968 … … 947 984 } 948 985 949 .ewd-ufaq-toggle-symbol {986 .ewd-ufaq-toggle-symbol{ 950 987 font-family: 'ewd-toggle-icon'; 951 988 letter-spacing: 6px; … … 953 990 } 954 991 955 input[name=toggle_symbol] {992 input[name=toggle_symbol]{ 956 993 margin-right: 10px; 957 994 } 958 995 959 960 /**************** 961 ORDER TABLE 962 ****************/ 963 #ewd-ufaq-ordering-table-container { 964 width: 100%; 965 } 966 #ewd-ufaq-ordering-table-explanation { 967 font-size: 16px; 968 color: #212427; 969 margin-bottom: 28px; 970 } 971 .ewd-ufaq-ordering-table thead tr, 972 .ewd-ufaq-ordering-table tfoot tr { 973 background: #F8F4FF; 974 } 975 .ewd-ufaq-ordering-table th { 976 padding: 12px 10px; 977 } 978 .ewd-ufaq-ordering-table td { 979 padding: 8px 10px; 980 } 981 .ewd-ufaq-ordering-table tbody tr:nth-of-type(2n+2) { 982 background: #F8F4FF; 983 } 984 985 986 /* 987 ============================================== 988 About Us page 989 ============================================== 990 */ 991 992 .ufaq_page_ewd-ufaq-about-us #wpcontent { 996 .ufaq_page_ewd-ufaq-about-us #wpcontent{ 993 997 background: #fff; 994 998 } 995 999 996 .ewd-ufaq-about-us-logo {1000 .ewd-ufaq-about-us-logo{ 997 1001 display: flex; 998 1002 width: 100%; 999 1003 padding: 24px 0 0 32px; 1000 1004 } 1001 .ewd-ufaq-about-us-logo img { 1005 1006 .ewd-ufaq-about-us-logo img{ 1002 1007 width: 300px; 1003 1008 height: auto; … … 1007 1012 #ewd-ufaq-about-us-tabs-menu *, 1008 1013 .ewd-ufaq-about-us-tab, 1009 .ewd-ufaq-about-us-tab * {1014 .ewd-ufaq-about-us-tab *{ 1010 1015 box-sizing: border-box; 1011 1016 } 1012 1017 1013 .ewd-ufaq-about-us-tabs {1018 .ewd-ufaq-about-us-tabs{ 1014 1019 display: flex; 1015 1020 flex-direction: column; … … 1021 1026 } 1022 1027 1023 #ewd-ufaq-about-us-tabs-menu {1028 #ewd-ufaq-about-us-tabs-menu{ 1024 1029 display: flex; 1025 1030 justify-content: space-between; … … 1029 1034 margin: 0; 1030 1035 } 1031 .ewd-ufaq-about-us-tab-menu-item { 1036 1037 .ewd-ufaq-about-us-tab-menu-item{ 1032 1038 width: 25%; 1033 1039 background: #f3f3f3; … … 1042 1048 transition: background .35s; 1043 1049 } 1044 .ewd-ufaq-about-us-tab-menu-item:hover { 1050 1051 .ewd-ufaq-about-us-tab-menu-item:hover{ 1045 1052 background: #fff; 1046 1053 color: #000; 1047 1054 } 1048 .ewd-ufaq-about-us-tab-menu-item.ewd-ufaq-tab-selected { 1055 1056 .ewd-ufaq-about-us-tab-menu-item.ewd-ufaq-tab-selected{ 1049 1057 background: #fff; 1050 1058 color: #000; 1051 1059 border-bottom: none; 1052 1060 } 1053 .ewd-ufaq-about-us-tab-menu-item:first-of-type { 1061 1062 .ewd-ufaq-about-us-tab-menu-item:first-of-type{ 1054 1063 border-left: none; 1055 1064 } 1056 1065 1057 .ewd-ufaq-about-us-tab {1066 .ewd-ufaq-about-us-tab{ 1058 1067 display: flex; 1059 1068 flex-direction: column; … … 1062 1071 width: 100%; 1063 1072 } 1064 .ewd-ufaq-about-us-tab p { 1073 1074 .ewd-ufaq-about-us-tab p{ 1065 1075 color: #555; 1066 1076 } 1077 1067 1078 .ewd-ufaq-about-us-feature-suggestion input, 1068 .ewd-ufaq-about-us-feature-suggestion textarea {1079 .ewd-ufaq-about-us-feature-suggestion textarea{ 1069 1080 width: 100%; 1070 1081 max-width: 400px; … … 1077 1088 font-weight: normal; 1078 1089 } 1079 .ewd-ufaq-about-us-feature-suggestion textarea { 1090 1091 .ewd-ufaq-about-us-feature-suggestion textarea{ 1080 1092 min-height: 160px; 1081 1093 } 1082 1094 1083 .ewd-ufaq-about-us-tab-button {1095 .ewd-ufaq-about-us-tab-button{ 1084 1096 display: flex; 1085 1097 margin-top: 12px; … … 1092 1104 transition: background .35s; 1093 1105 } 1094 .ewd-ufaq-about-us-tab-button-purchase { 1106 1107 .ewd-ufaq-about-us-tab-button-purchase{ 1095 1108 background: #6026B4; 1096 1109 color: #fff; 1097 1110 margin-top: 24px; 1098 1111 } 1099 .ewd-ufaq-about-us-tab-button-purchase:hover { 1112 1113 .ewd-ufaq-about-us-tab-button-purchase:hover{ 1100 1114 background: #7a40cb; 1101 1115 color: #fff; 1102 1116 } 1103 .ewd-ufaq-about-us-tab-button-walkthrough { 1117 1118 .ewd-ufaq-about-us-tab-button-walkthrough{ 1104 1119 background: #6026B4; 1105 1120 color: #fff; 1106 1121 margin-bottom: 24px; 1107 1122 } 1108 .ewd-ufaq-about-us-tab-button-walkthrough:hover { 1123 1124 .ewd-ufaq-about-us-tab-button-walkthrough:hover{ 1109 1125 background: #7a40cb; 1110 1126 color: #fff; 1111 1127 } 1112 .ewd-ufaq-about-us-tab-button-youtube { 1128 1129 .ewd-ufaq-about-us-tab-button-youtube{ 1113 1130 background: #f00; 1114 1131 color: #fff; 1115 1132 } 1116 .ewd-ufaq-about-us-tab-button-youtube:hover { 1133 1134 .ewd-ufaq-about-us-tab-button-youtube:hover{ 1117 1135 background: #fe4c4c; 1118 1136 color: #fff; 1119 1137 } 1120 .ewd-ufaq-about-us-send-feature-suggestion { 1138 1139 .ewd-ufaq-about-us-send-feature-suggestion{ 1121 1140 background: #6026B4; 1122 1141 color: #fff; 1123 1142 } 1124 .ewd-ufaq-about-us-send-feature-suggestion:hover { 1143 1144 .ewd-ufaq-about-us-send-feature-suggestion:hover{ 1125 1145 background: #7a40cb; 1126 1146 color: #fff; 1127 1147 } 1128 1148 1129 .ewd-ufaq-about-us-premium-table {1149 .ewd-ufaq-about-us-premium-table{ 1130 1150 display: flex; 1131 1151 flex-direction: column; … … 1137 1157 overflow: hidden; 1138 1158 } 1159 1139 1160 .ewd-ufaq-about-us-premium-table-head, 1140 .ewd-ufaq-about-us-premium-table-body {1161 .ewd-ufaq-about-us-premium-table-body{ 1141 1162 display: flex; 1142 1163 justify-content: space-between; 1143 1164 } 1144 .ewd-ufaq-about-us-premium-table-cell { 1165 1166 .ewd-ufaq-about-us-premium-table-cell{ 1145 1167 display: flex; 1146 1168 align-items: center; … … 1150 1172 padding: 8px 16px; 1151 1173 } 1152 .ewd-ufaq-about-us-premium-table-cell:first-of-type { 1174 1175 .ewd-ufaq-about-us-premium-table-cell:first-of-type{ 1153 1176 border-left: none; 1154 1177 } 1155 .ewd-ufaq-about-us-premium-table-cell:last-of-type { 1178 1179 .ewd-ufaq-about-us-premium-table-cell:last-of-type{ 1156 1180 background: #f8f1ff; 1157 1181 } 1158 1182 1159 .ewd-ufaq-about-us-premium-table-head .ewd-ufaq-about-us-premium-table-cell {1183 .ewd-ufaq-about-us-premium-table-head .ewd-ufaq-about-us-premium-table-cell{ 1160 1184 font-weight: bold; 1161 1185 border-top: none; 1162 1186 } 1163 .ewd-ufaq-about-us-premium-table-cell img { 1187 1188 .ewd-ufaq-about-us-premium-table-cell img{ 1164 1189 width: 16px; 1165 1190 height: auto; 1166 1191 } 1167 1192 1193 1168 1194 @media screen and (max-width: 668px) { 1169 #ewd-ufaq-about-us-tabs-menu {1195 #ewd-ufaq-about-us-tabs-menu{ 1170 1196 flex-wrap: wrap; 1171 1197 } 1172 .ewd-ufaq-about-us-tab-menu-item { 1198 1199 .ewd-ufaq-about-us-tab-menu-item{ 1173 1200 width: 100%; 1174 1201 border-left: none; 1175 1202 } 1176 .ewd-ufaq-about-us-tab-menu-item.ewd-ufaq-tab-selected { 1203 1204 .ewd-ufaq-about-us-tab-menu-item.ewd-ufaq-tab-selected{ 1177 1205 background: #fff; 1178 1206 color: #000; 1179 1207 border-bottom: 1px solid #ddd; 1180 } 1181 } 1182 1183 1184 /* OVERWRITING EWDPH STYLING */ 1185 1186 .ewd-premium-helper-dashboard-new-widget-box { 1208 }} 1209 1210 .ewd-premium-helper-dashboard-new-widget-box{ 1187 1211 float: none !important; 1188 1212 background: transparent !important; … … 1190 1214 margin: 48px 0 -8px !important; 1191 1215 } 1192 .ewd-premium-helper-dashboard-new-widget-box-top { 1216 1217 .ewd-premium-helper-dashboard-new-widget-box-top{ 1193 1218 font-weight: normal !important; 1194 1219 color: #5f5f5f !important; … … 1201 1226 padding: 32px !important; 1202 1227 } 1203 .ewd-premium-helper-dashboard-key-widget { 1228 1229 .ewd-premium-helper-dashboard-key-widget{ 1204 1230 display: flex; 1205 1231 flex-wrap: wrap; … … 1214 1240 background-repeat: no-repeat; 1215 1241 } 1216 .ewd-premium-helper-dashboard-key-widget-input { 1242 1243 .ewd-premium-helper-dashboard-key-widget-input{ 1217 1244 float: none !important; 1218 1245 display: flex; … … 1228 1255 color: #737373 !important 1229 1256 } 1230 .ewd-premium-helper-dashboard-key-widget-input::placeholder { 1257 1258 .ewd-premium-helper-dashboard-key-widget-input::placeholder{ 1231 1259 color: #bbb; 1232 1260 } 1233 .ewd-premium-helper-dashboard-key-widget-submit { 1261 1262 .ewd-premium-helper-dashboard-key-widget-submit{ 1234 1263 float: none !important; 1235 1264 display: flex; … … 1250 1279 text-transform: uppercase; 1251 1280 } 1252 .ewd-premium-helper-dashboard-key-widget-submit:hover { 1281 1282 .ewd-premium-helper-dashboard-key-widget-submit:hover{ 1253 1283 background: #F2BD49; 1254 1284 } 1255 .ewd-premium-helper-dashboard-key-widget-text { 1285 1286 .ewd-premium-helper-dashboard-key-widget-text{ 1256 1287 float: none !important; 1257 1288 width: 100%; … … 1262 1293 font-weight: normal; 1263 1294 } 1264 .ewd-premium-helper-dashboard-key-widget-text a { 1295 1296 .ewd-premium-helper-dashboard-key-widget-text a{ 1265 1297 color: #0acbaa; 1266 1298 text-decoration: none; 1267 1299 font-weight: bold; 1268 1300 } 1269 .ewd-premium-helper-dashboard-key-widget-text a:hover { 1301 1302 .ewd-premium-helper-dashboard-key-widget-text a:hover{ 1270 1303 color: #1CE6C3; 1271 1304 text-decoration: none; 1272 1305 } 1273 1306 1274 .ewd-ufaq-dashboard-trial-container .ewd-premium-helper-dashboard-new-widget-box-bottom {1307 .ewd-ufaq-dashboard-trial-container .ewd-premium-helper-dashboard-new-widget-box-bottom{ 1275 1308 float: none !important; 1276 1309 width: 100% !important; … … 1280 1313 } 1281 1314 1315 1282 1316 @media screen and (max-width: 768px) { 1283 .ewd-premium-helper-dashboard-key-widget{1317 .ewd-premium-helper-dashboard-key-widget{ 1284 1318 padding: 0 !important; 1285 1319 background-image: none !important; 1286 1320 } 1287 .ewd-premium-helper-dashboard-key-widget-input { 1321 1322 .ewd-premium-helper-dashboard-key-widget-input{ 1288 1323 width: 100% !important; 1289 1324 border-radius: 8px !important; … … 1291 1326 border-bottom-right-radius: 0 !important; 1292 1327 } 1293 .ewd-premium-helper-dashboard-key-widget-submit { 1328 1329 .ewd-premium-helper-dashboard-key-widget-submit{ 1294 1330 width: 100% !important; 1295 1331 border-radius: 8px !important; 1296 1332 border-top-left-radius: 0 !important; 1297 1333 border-top-right-radius: 0 !important; 1298 } 1299 } 1300 1301 1302 .ewd-ufaq-hidden { 1334 }} 1335 1336 .ewd-ufaq-hidden{ 1303 1337 display: none !important; 1304 1338 } 1339 1340 1341 /****************************************/ 1342 /** FAQ ORDERING SCREEN FILTERING AREA **/ 1343 /****************************************/ 1344 1345 .ewd-ufaq-order-toolbar legend { 1346 margin: 16px 0; 1347 padding-left: 0; 1348 font-size: 20px; 1349 } 1350 .ewd-ufaq-order-rows td span { 1351 display: block; 1352 } -
ultimate-faqs/tags/2.7.0/assets/css/ewd-ufaq.css
r3399160 r3821169 1 .ewd-ufaq-hidden { 1 2 .ewd-ufaq-hidden{ 2 3 display:none; 3 4 } 4 5 5 .ewd-ufaq-faq-category-title-toggle {6 cursor: pointer; 7 } 8 9 .ewd-ufaq-faq-category-body-hidden {6 .ewd-ufaq-faq-category-title-toggle{ 7 cursor: pointer; 8 } 9 10 .ewd-ufaq-faq-category-body-hidden{ 10 11 display: none; 11 12 } 12 13 13 .ewd-ufaq-clear {14 .ewd-ufaq-clear{ 14 15 clear:both; 15 16 } 16 17 17 .ewd-ufaq-permalink {18 .ewd-ufaq-permalink{ 18 19 margin: 24px 0; 19 20 } 20 .ewd-ufaq-permalink-image { 21 22 .ewd-ufaq-permalink-image{ 21 23 background: url("../img/insert_link.png"); 22 24 height: 21px; … … 26 28 } 27 29 28 29 .ewd-ufaq-author { 30 .ewd-ufaq-author{ 30 31 font-weight: 600; 31 32 } 32 .ewd-ufaq-date { 33 34 .ewd-ufaq-date{ 33 35 font-weight: 600; 34 36 } 35 37 36 .ewd-ufaq-faq-category-title {38 .ewd-ufaq-faq-category-title{ 37 39 width: 100%; 38 40 clear: both; … … 46 48 } 47 49 48 .ewd-ufaq-faq-category-inner {50 .ewd-ufaq-faq-category-inner{ 49 51 margin-bottom: 48px; 50 52 } 51 53 52 .ewd-ufaq-faq-body {54 .ewd-ufaq-faq-body{ 53 55 padding:10px 25px; 54 56 padding-left: 55px; 55 57 } 58 56 59 .ewd-ufaq-faq-search{ 57 60 margin:5px 0 !important; 58 61 } 59 .ewd-ufaq-highlight-search-term { 60 background: #f7ff00; 61 } 62 .ewd-ufaq-no-results-found { 62 63 .ewd-ufaq-no-results-found{ 63 64 margin-top: 16px; 64 65 } … … 67 68 width: auto !important; 68 69 } 69 .ewd-ufaq-text-input { 70 71 .ewd-ufaq-text-input{ 70 72 border-radius: 0 !important; 71 73 margin:15px !important; 72 74 } 73 .ewd-ufaq-submit{ 74 border-radius: 0 !important; 75 } 76 .ewd-ufaq-faq-header{ 77 margin:10px; 78 } 79 .ewd-ufaq-faq-header a:hover{ 80 text-decoration: none; 81 } 75 82 76 div.ewd-ufaq-faq-title div.ewd-ufaq-post-margin{ 83 77 text-decoration: none; 84 78 } 79 85 80 div.ewd-ufaq-faq-title div.ewd-ufaq-post-margin-symbol{ 86 81 text-decoration: none; … … 97 92 border-width: 0; 98 93 } 94 99 95 .ewd-ufaq-faq-title .ewd-ufaq-post-margin-symbol span{ 100 96 display: inline-block; … … 102 98 margin: 0 auto; 103 99 } 104 .ewd-ufaq-faq-title-text { 100 101 .ewd-ufaq-faq-title-text{ 105 102 float: left; 106 103 width: 85%; 107 104 } 105 108 106 .ewd-ufaq-faq-title h1, 109 107 .ewd-ufaq-faq-title h2, … … 111 109 .ewd-ufaq-faq-title h4, 112 110 .ewd-ufaq-faq-title h5, 113 .ewd-ufaq-faq-title h6 {111 .ewd-ufaq-faq-title h6{ 114 112 display:inline-block; 115 113 margin:5px !important; 116 114 } 117 115 118 119 120 121 .ewd-ufaq-custom-field-label, .ewd-ufaq-custom-field-value { 122 position: relative; 123 float: left; 124 margin-top: 14px; 125 } 126 .ewd-ufaq-custom-field-label { 127 font-weight: normal; 128 } 129 130 .ewd-ufaq-faq-body .comment-respond { 116 .ewd-ufaq-faq-body .comment-respond{ 131 117 margin-top: 24px; 132 118 } 133 .ewd-ufaq-faq-body li.comment { 119 120 .ewd-ufaq-faq-body li.comment{ 134 121 list-style-type: none; 135 122 } 136 .ewd-ufaq-faq-body textarea { 123 124 .ewd-ufaq-faq-body textarea{ 137 125 clear: both; 138 126 display: block; … … 141 129 height: 100px; 142 130 } 143 .ewd-ufaq-faq-body .comment-form-comment label { 131 132 .ewd-ufaq-faq-body .comment-form-comment label{ 144 133 clear: both; 145 134 display: block; … … 147 136 width: 100%; 148 137 } 149 .ewd-ufaq-faq-body .submit { 138 139 .ewd-ufaq-faq-body .submit{ 150 140 width: auto; 151 141 background: transparent; … … 154 144 margin-bottom: 20px; 155 145 } 156 .ewd-ufaq-faq-body .submit:hover { 146 147 .ewd-ufaq-faq-body .submit:hover{ 157 148 background: #111; 158 149 color: #fff; 159 150 } 160 .ewd-ufaq-faq-body .comment-author img { 151 152 .ewd-ufaq-faq-body .comment-author img{ 161 153 margin-right: 8px; 162 154 } 163 .ewd-ufaq-faq-body .comment-body p { 155 156 .ewd-ufaq-faq-body .comment-body p{ 164 157 margin: 10px 0; 165 158 margin-top: 10px !important; 166 159 } 167 .ewd-ufaq-faq-body .reply { 160 161 .ewd-ufaq-faq-body .reply{ 168 162 text-transform: uppercase; 169 163 } 170 164 171 .ewd-ufaq-faq-body .ewd-ufaq-back-to-top-link { 172 cursor: pointer; 173 } 174 175 .ewd-ufaq-ratings { 176 padding: 14px 0 0; 177 display: inline-block; 178 width: 100%; 179 margin-bottom: 20px; 180 } 181 .ewd-ufaq-down-vote { 182 background-position: 0px 8px !important; 183 height: 50px !important; 184 } 185 186 187 /*********************** 188 * Pagination 189 ***********************/ 190 .ewd-ufaq-bottom { 191 clear: both; 192 } 193 .ewd-ufaq-previous-faqs h4 { 194 float: left; 195 padding-left: 12px; 196 cursor: pointer; 197 font-weight: 600; 198 } 199 .ewd-ufaq-next-faqs h4 { 200 float: right; 201 padding-right: 12px; 202 cursor: pointer; 203 font-weight: 600; 204 } 205 .ewd-ufaq-load-more h4 { 206 text-align: center; 207 cursor: pointer; 208 font-weight: 600; 209 } 210 211 212 /*********************** 213 * Columns 214 ***********************/ 215 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-two { 216 width: 48%; 217 margin-right: 2%; 218 float: left; 219 clear: none; 220 } 221 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-three { 222 width: 31%; 223 margin-right: 2%; 224 float: left; 225 clear: none; 226 } 227 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-four { 228 width: 23%; 229 margin-right: 2%; 230 float: left; 231 clear: none; 232 } 233 234 @media only screen and (max-width: 960px) { 235 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-three.ewd-ufaq-faq-responsive-columns-1, 236 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-four.ewd-ufaq-faq-responsive-columns-1 { 237 width: 48%; 238 margin-right: 2%; 239 } 240 } 241 @media only screen and (max-width: 520px) { 242 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-two.ewd-ufaq-faq-responsive-columns-1, 243 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-three.ewd-ufaq-faq-responsive-columns-1, 244 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-four.ewd-ufaq-faq-responsive-columns-1 { 245 width: 100%; 246 margin-right: none; 247 } 248 } 249 250 /*********************** 251 Color Block Style 252 ***********************/ 253 .ewd-ufaq-faq-display-style-color_block .ewd-ufaq-post-margin-symbol { 254 background-color: #1188cc; 255 color: #ffffff; 256 } 257 258 .ewd-ufaq-Circle { 259 border-radius: 18px; 260 } 261 262 .ewd-ufaq-Square { 263 border-radius: 0px; 264 } 265 266 267 /*********************** 268 Block Style 269 ***********************/ 270 .ewd-ufaq-faq-div { 165 .ewd-ufaq-faq-body .ewd-ufaq-back-to-top-link{ 166 cursor: pointer; 167 } 168 169 .ewd-ufaq-faq-div{ 271 170 margin: 2px 0; 272 171 padding:2px 0; 273 172 clear: both; 274 173 } 174 275 175 .ewd-ufaq-faq-toggle:hover, .ewd-ufaq-faq-toggle a:hover{ 276 176 cursor: pointer; … … 278 178 text-decoration: none; 279 179 } 280 .ewd-ufaq-faq-display-style-block a, .ewd-ufaq-faq-display-style-block a:visited, .ewd-ufaq-faq-display-style-block a:active{ 281 text-decoration: none; 282 } 283 .ewd-ufaq-faq-display-style-block:hover, 284 .ewd-ufaq-faq-display-style-block:hover a, 285 .ewd-ufaq-faq-display-style-block:hover h1, 286 .ewd-ufaq-faq-display-style-block:hover h2, 287 .ewd-ufaq-faq-display-style-block:hover h3, 288 .ewd-ufaq-faq-display-style-block:hover h4, 289 .ewd-ufaq-faq-display-style-block:hover h5, 290 .ewd-ufaq-faq-display-style-block:hover h6 { 291 text-decoration: none !important; 292 color:#fff; 293 background: #1188cc; 294 } 295 .ewd-ufaq-faq-display-style-block.ewd-ufaq-post-active, .ewd-ufaq-faq-display-style-block.ewd-ufaq-post-active a{ 296 color:#fff; 297 background: #1188cc; 298 } 299 300 301 /*********************** 302 List Style 303 ***********************/ 304 .ewd-ufaq-faq-header-title a { 305 display: inline-block; 306 } 307 308 309 /*********************** 310 Border Block Style 311 ***********************/ 312 .ewd-ufaq-faq-div { 180 181 .ewd-ufaq-faq-div{ 313 182 margin: 2px 0; 314 183 padding:2px 0; 315 184 clear: both; 316 185 } 186 317 187 .ewd-ufaq-faq-toggle:hover, .ewd-ufaq-faq-toggle a:hover{ 318 188 cursor: pointer; … … 320 190 text-decoration: none; 321 191 } 322 .ewd-ufaq-faq-display-style-border_block a, .ewd-ufaq-faq-display-style-border_block a:visited, .ewd-ufaq-faq-display-style-border_block a:active{ 323 text-decoration: none; 324 } 325 .ewd-ufaq-faq-display-style-border_block:hover, 326 .ewd-ufaq-faq-display-style-border_block:hover a, 327 .ewd-ufaq-faq-display-style-border_block:hover h1, 328 .ewd-ufaq-faq-display-style-border_block:hover h2, 329 .ewd-ufaq-faq-display-style-border_block:hover h3, 330 .ewd-ufaq-faq-display-style-border_block:hover h4, 331 .ewd-ufaq-faq-display-style-border_block:hover h5, 332 .ewd-ufaq-faq-display-style-border_block:hover h6 { 333 text-decoration: none !important; 334 color:#fff; 335 background: #1188cc; 336 } 337 .ewd-ufaq-faq-display-style-border_block.ewd-ufaq-post-active, .ewd-ufaq-faq-display-style-border_block.ewd-ufaq-post-active a{ 338 color:#fff !important; 339 background: #1188cc; 340 } 341 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-faq-body { 342 color:#555 !important; 343 background: #fff; 344 border: 3px solid #1188cc; 345 border-bottom: 2px solid #1188cc; 346 } 347 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-faq-body a { 348 color:#000 !important; 349 background: transparent; 350 } 351 352 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-faq-tags, .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-social-links { 353 margin-top: 4px; 354 } 355 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-social-links ul { 356 float: left; 357 margin-bottom: 14px; 358 position: relative; 359 width: auto; 360 } 361 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-permalink { 362 margin: 24px 0; 363 } 364 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-permalink-image { 365 margin-top: -32px; 366 margin-left: 112px; 367 } 368 369 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-author-date { 370 margin-bottom: 14px; 371 } 372 373 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-faq-categories { 374 margin: 14px 0; 375 } 376 377 .ewd-ufaq-faq-display-style-border_block.ewd-ufaq-post-active .ewd-ufaq-faq-title-text { 378 color: #fff !important; 379 } 380 381 .ewd-ufaq-faq-display-style-border_block .comment-reply-title { 382 background: transparent !important; 383 color: #000 !important; 384 } 385 .ewd-ufaq-faq-display-style-border_block:hover .comment-reply-title { 386 color: #000 !important; 387 } 388 389 390 391 /*********************** 392 Contemporary Style 393 ***********************/ 394 .ewd-ufaq-faq-display-style-contemporary { 395 border-bottom: 1px solid #ccc; 396 padding: 0; 397 margin: 0; 398 } 399 .ewd-ufaq-faq-display-style-contemporary:first-of-type { 400 border-top: 1px solid #ccc; 401 } 402 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-faq-title { 403 background: #f7f7f7; 404 padding: 8px 0 8px 4px; 405 } 406 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-post-margin-symbol { 407 float: right; 408 height: auto; 409 } 410 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-faq-body { 411 padding: 20px 25px 10px; 412 padding-left: 40px; 413 } 414 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-faq-tags, .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-social-links { 415 margin-top: 4px; 416 } 417 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-social-links ul { 418 float: left; 419 margin-bottom: 14px; 420 position: relative; 421 width: auto; 422 } 423 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-permalink { 424 margin-left: 0; 425 margin-bottom: 10px; 426 } 427 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-back-to-top { 428 margin-bottom: 14px; 429 } 430 431 .ewd-ufaq-social-links-label { 432 float: left; 433 margin-right: 8px; 434 position: relative; 435 top: 3px; 436 } 437 438 439 440 441 /*********************** 442 Ratings 443 ***********************/ 444 .ewd-ufaq-rating-button { 445 position: relative; 446 float: left; 447 width: 60px; 448 height: 48px; 449 margin-right: 12px; 450 line-height: 48px; 451 font-weight: 600; 452 cursor: pointer; 453 454 } 455 .ewd-ufaq-rating-button img { 456 position: absolute; 457 top: 0; 458 left: 0; 459 width: 75%; 460 height: auto; 461 } 462 .ewd-ufaq-rating-button span { 463 text-align: right; 464 width: 100%; 465 display: block; 466 } 467 .ewd-ufaq-up-vote { 468 background: transparent; 469 background-repeat: no-repeat; 470 } 471 .ewd-ufaq-down-vote { 472 background: transparent; 473 background-repeat: no-repeat; 474 } 475 .ewd-ufaq-ratings-custom-image { 476 background: transparent; 477 } 478 .ewd-ufaq-rating-button.ewd-ufaq-rating-button-custom-up-image, 479 .ewd-ufaq-rating-button.ewd-ufaq-rating-button-custom-down-image { 480 background: none; 481 padding-left: 0; 482 } 483 .ewd-ufaq-rating-button.ewd-ufaq-rating-button-custom-up-image img, 484 .ewd-ufaq-rating-button.ewd-ufaq-rating-button-custom-down-image img { 485 position: relative; 486 float: left; 487 width: 48px; 488 height: auto; 489 margin-right: 4px; 490 } 491 492 493 /************************ 494 * Expand/Collapse 495 ************************/ 192 496 193 .ewd-ufaq-expand-all, 497 .ewd-ufaq-collapse-all {194 .ewd-ufaq-collapse-all{ 498 195 text-decoration: none; 499 196 cursor: pointer; 500 197 font-size: 0.9em; 501 198 } 199 200 502 201 503 202 /* … … 520 219 .ewd-ufaq-faq-title .ewd-ufaq-post-margin-symbol, 521 220 .ewd-ufaq-faq-category-title .ewd-ufaq-category-post-margin-symbol, 522 .ewd-ufaq-toggle-all-symbol {221 .ewd-ufaq-toggle-all-symbol{ 523 222 font-family: 'ewd-toggle-icon'; 524 }525 526 527 /*528 ==============================================529 PChanges530 ==============================================531 */532 533 .ewd-ufaq-question-update{534 font-size: 1.2em;535 margin-bottom: 20px;536 }537 .ewd-ufaq-question-form .form-field {538 margin-bottom: 20px;539 }540 541 .rrssb-buttons li a .rrssb-text {542 color: #fff;543 margin-left: 5px;544 }545 546 .ewd-ufaq-social-links .rrssb-buttons li {547 margin-bottom: 5px;548 223 } 549 224 … … 551 226 clear: both; 552 227 } 228 229 553 230 @media only screen and (max-width: 810px) { 554 555 .ewd-ufaq-faq-title-text { 231 .ewd-ufaq-faq-title-text{ 556 232 width: 80%; 557 } 558 559 } 560 561 562 563 /* 564 ============================================== 565 Pagination 566 ============================================== 567 */ 568 .ewd-ufaq-previous-faqs, .ewd-ufaq-next-faqs { 569 margin-top: 16px; 570 } 571 .ewd-ufaq-previous-faqs { 572 float: left; 573 } 574 .ewd-ufaq-next-faqs { 575 float: right; 576 } 577 578 /* clears the 'X' from Internet Explorer */ 579 #ewd-ufaq-jquery-ajax-search input[type=search]::-ms-clear { 580 display: none; width : 0; height: 0; 581 } 582 #ewd-ufaq-jquery-ajax-search input[type=search]::-ms-reveal { 583 display: none; width : 0; height: 0; 584 } 585 586 /* clears the 'X' from Chrome */ 587 #ewd-ufaq-jquery-ajax-search input[type="search"]::-webkit-search-decoration, 588 #ewd-ufaq-jquery-ajax-search input[type="search"]::-webkit-search-cancel-button, 589 #ewd-ufaq-jquery-ajax-search input[type="search"]::-webkit-search-results-button, 590 #ewd-ufaq-jquery-ajax-search input[type="search"]::-webkit-search-results-decoration { 591 -webkit-appearance: none; 592 } 593 594 #ewd-ufaq-jquery-ajax-search * { 595 vertical-align: middle; 596 } 597 #ewd-ufaq-jquery-ajax-search .search-field { 598 display: inline-block; 599 margin: 15px; 600 position: relative; 601 } 602 #ewd-ufaq-jquery-ajax-search .search-field .ewd-ufaq-text-input { 603 margin: 0 !important; 604 padding: 8px 30px 8px 12px !important; 605 } 606 #ewd-ufaq-jquery-ajax-search .clear-field { 607 display: inline; 608 padding: 0; 609 margin: 0; 610 height: 100%; 611 background: transparent; 612 position: absolute; 613 top: 0; 614 right: 0; 615 color: black; 616 transition: width 0.35s, opacity 0.25s; 617 transform: translateX(15px); 618 opacity: 0; 619 width: 0; 620 } 621 #ewd-ufaq-jquery-ajax-search .clear-field.slide-in { 622 opacity: 1; 623 width: 30px; 624 animation: slide-in-right 0.5s forwards; 625 -webkit-animation: slide-in-right 0.5s forwards; 626 } 627 #ewd-ufaq-jquery-ajax-search .clear-field.slide-out { 628 opacity: 0; 629 width: 0; 630 animation: slide-out-right 0.5s forwards; 631 -webkit-animation: slide-out-right 0.5s forwards; 632 } 633 #ewd-ufaq-jquery-ajax-search .clear-field:hover, 634 #ewd-ufaq-jquery-ajax-search .clear-field:focus { 635 border-radius: 0; 636 } 637 @keyframes slide-in-right { 638 100% { 639 transform: translateX(0px); 640 } 641 } 642 @keyframes slide-out-right { 643 0% { 644 transform: translateX(0px); 645 } 646 100% { 647 transform: translateX(15px); 648 } 649 } 650 651 652 /*************** 653 BLOCK PATTERNS 654 ***************/ 233 }} 234 655 235 .ewd-ufaq-pattern-faqs, 656 236 .ewd-ufaq-pattern-featured-faqs, 657 237 .ewd-ufaq-pattern-search, 658 .ewd-ufaq-pattern-submit {238 .ewd-ufaq-pattern-submit{ 659 239 width: 100%; 660 240 } 661 241 662 /*************** 663 CATEGORY TABS 664 ***************/ 665 .ewd-ufaq-category-tabs-1 .ewd-ufaq-faqs { 666 display: flex; 667 width: 100%; 668 position: relative; 669 } 670 .ewd-ufaq-category-tabs-1 .ewd-ufaq-faq-category { 671 display: flex; 672 flex-direction: column; 673 margin-right: 40px; 674 } 675 .ewd-ufaq-category-tabs-1 .ewd-ufaq-category-tab-selected h3 { 676 font-weight: bold; 677 text-decoration: underline; 678 } 679 .ewd-ufaq-category-tabs-1 .ewd-ufaq-faq-category-inner { 680 position: absolute; 681 left: 0; 682 top: 72px; 683 width: 100%; 684 } 685 .ewd-ufaq-category-tabs-1 .ewd-ufaq-faq-category .ewd-ufaq-faq-category { 686 position: relative; 687 margin-right: 0; 688 margin-top: 24px; 689 width: 100%; 690 clear: both; 691 display: flex; 692 flex-direction: column; 693 } 694 695 .ewd-ufaq-faq-category-body-hidden { 242 .ewd-ufaq-faq-category-body-hidden{ 696 243 display: none; 697 244 } 698 245 699 700 /**********************/701 /** NEW META BUBBLES **/702 /**********************/703 704 246 .ewd-ufaq-faq-categories, 705 .ewd-ufaq-faq-tags {247 .ewd-ufaq-faq-tags{ 706 248 margin: 14px 0; 707 249 display: flex; … … 711 253 color: #212427; 712 254 } 255 713 256 .ewd-ufaq-faq-categories a, 714 .ewd-ufaq-faq-tags a {257 .ewd-ufaq-faq-tags a{ 715 258 text-decoration: none; 716 259 padding: 4px 12px; … … 719 262 border-radius: 100px; 720 263 } 721 .ewd-ufaq-faq-custom-fields { 722 margin-bottom: 14px; 723 } 724 .ewd-ufaq-custom-field-label { 725 color: #212427; 726 } 727 728 /**********************/ 729 /**** COMPACT META ****/ 730 /**********************/ 731 732 .ewd-ufaq-compact-faq-meta { 733 display: flex; 734 width: 100%; 735 flex-wrap: wrap; 736 justify-content: right; 737 align-items: center; 738 gap: 0; 739 } 740 .ewd-ufaq-compact-faq-meta > div { 741 width: 100%; 742 } 743 .ewd-ufaq-compact-faq-meta .ewd-ufaq-permalink { 744 width: auto; 745 order: 25; 746 } 747 .ewd-ufaq-compact-faq-meta .ewd-ufaq-permalink a { 748 font-size: 16px; 749 color: #7a7a7a; 750 font-weight: normal; 751 text-decoration: none; 752 } 753 .ewd-ufaq-compact-faq-meta .ewd-ufaq-permalink-image { 754 display: none; 755 } 756 .ewd-ufaq-compact-faq-meta .ewd-ufaq-social-links { 757 width: auto; 758 order: 26; 759 } 760 .ewd-ufaq-compact-faq-meta .ewd-ufaq-social-links-label { 761 display: none; 762 } 763 .ewd-ufaq-compact-faq-meta .rrssb-buttons { 764 height: auto; 765 display: flex; 766 align-items: center; 767 margin: 0; 768 float: none; 769 gap: 4px; 770 } 771 .ewd-ufaq-compact-faq-meta .rrssb-buttons li { 772 float: none; 773 height: auto; 774 line-height: initial; 775 padding: 0; 776 margin: 0; 777 } 778 .ewd-ufaq-compact-faq-meta .rrssb-buttons li a { 779 height: auto; 780 padding: 0; 781 font-weight: normal; 782 font-size: 16px; 783 text-align: left; 784 width: auto; 785 border-radius: 0; 786 } 787 .ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-facebook a, 788 .ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-twitter a, 789 .ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-linkedin a, 790 .ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-pinterest a, 791 .ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-email a { 792 background-color: transparent; 793 } 794 .ewd-ufaq-compact-faq-meta .rrssb-buttons li a .rrssb-icon, 795 .ewd-ufaq-compact-faq-meta .rrssb-buttons li a .rrssb-text { 796 display: none; 797 } 798 .ewd-ufaq-compact-faq-meta .ewd-ufaq-ratings { 799 width: auto; 800 order: 27; 801 padding: 0; 802 margin: 0; 803 display: flex; 804 align-items: center; 805 } 806 .ewd-ufaq-compact-faq-meta .ewd-ufaq-rating-button { 807 float: none; 808 width: auto; 809 height: auto; 810 margin: 0; 811 line-height: initial; 812 font-weight: normal; 813 display: flex; 814 } 815 .ewd-ufaq-compact-faq-meta .ewd-ufaq-rating-button img { 816 display: none !important; 817 } 818 .ewd-ufaq-compact-faq-meta .ewd-ufaq-rating-button span { 819 width: auto; 820 margin-left: 2px; 821 } 822 .ewd-ufaq-compact-faq-meta .ewd-ufaq-down-vote { 823 height: auto !important; 824 margin-left: 4px; 825 } 826 .ewd-ufaq-compact-faq-meta .ewd-ufaq-ratings-label { 827 display: none; 828 } 829 830 .ewd-ufaq-hidden { 264 265 .ewd-ufaq-hidden{ 831 266 display: none; 832 267 } -
ultimate-faqs/tags/2.7.0/assets/js/ewd-ufaq-admin.js
r3507393 r3821169 64 64 } ); 65 65 66 jQuery(document).ready(function($) { 67 68 $( '.ewd-ufaq-list' ).sortable({ 69 items: '.ewd-ufaq-item', 70 opacity: 0.6, 71 cursor: 'move', 72 axis: 'y', 73 update: function() { 74 var order = jQuery( this ).sortable( 'serialize' ) 75 + '&action=ewd_ufaq_update_faq_order' 76 + '&nonce='+ewd_ufaq_php_data.nonce; 77 jQuery.post( ajaxurl, order, function( response ) {} ); 78 } 79 }); 80 81 if ( jQuery( 'input[name="taxonomy"]' ).length && jQuery( 'input[name="taxonomy"]' ).val() == 'ufaq-category' ) { 82 83 jQuery( 'table.wp-list-table tbody' ).sortable({ 84 items: 'tr.level-0', 85 opacity: 0.6, 86 cursor: 'move', 87 update: function() { 88 89 var params = { 90 nonce: ewd_ufaq_php_data.nonce, 91 action: 'ewd_ufaq_update_category_order' 92 }; 93 94 var query_string = jQuery( this ).sortable('serialize'); 95 var data = jQuery.param( params ) + '&' + query_string; 96 97 jQuery.post( ajaxurl, data, function( response ) {}); 98 } 99 }) 100 } 101 }); 66 // Helper owns explicit one-record order edits; partial sortable lists are never submitted. 102 67 103 68 jQuery(document).ready(function($) { … … 108 73 }); 109 74 110 jQuery(document).ready(function($){ 111 112 $( '.sap-new-admin-add-button' ).on( 'click', function() { 113 114 setTimeout( ewd_ufaq_field_added_handler, 500); 115 }); 116 }); 117 118 function ewd_ufaq_field_added_handler() { 119 120 var highest = 0; 121 jQuery( '.sap-infinite-table input[data-name="id"]' ).each( function() { 122 highest = Math.max( highest, this.value ); 123 }); 124 125 jQuery( '.sap-infinite-table tbody tr:last-of-type span.sap-infinite-table-hidden-value' ).html( highest + 1 ); 126 jQuery( '.sap-infinite-table tbody tr:last-of-type input[data-name="id"]' ).val( highest + 1 ); 127 } 75 // Helper owns custom-field input behavior. 128 76 129 77 // Reset button for search term statistics -
ultimate-faqs/tags/2.7.0/assets/js/ewd-ufaq-managed-editor.js
r3744649 r3821169 363 363 } 364 364 365 function moveFaq( id, offset ) {366 if ( busy || isSaving || trashRequests.current[ id ] ) { return; }367 var from = selectedIds.indexOf( id );368 var to = from + offset;369 if ( from < 0 || to < 0 || to >= selectedIds.length ) { return; }370 var next = selectedIds.slice();371 next.splice( from, 1 ); next.splice( to, 0, id ); setIds( next );372 }373 365 374 366 var selected = selectedIds.map( function( id, index ) { … … 387 379 el( Button, { isSecondary: true, disabled: busy || isSaving, onClick: function() { retryCategories( id ); } }, __( 'Retry category assignment', 'ultimate-faqs' ) ) ) : null, 388 380 el( 'div', { className: 'ewd-ufaq-managed-actions' }, 389 config.canOrderFaqs ? el( Button, { isSmall: true, disabled: busy || isSaving || trashing[ id ] || index === 0, onClick: function() { moveFaq( id, -1 ); } }, __( 'Up', 'ultimate-faqs' ) ) : null, 390 config.canOrderFaqs ? el( Button, { isSmall: true, disabled: busy || isSaving || trashing[ id ] || index === selectedIds.length - 1, onClick: function() { moveFaq( id, 1 ); } }, __( 'Down', 'ultimate-faqs' ) ) : null, 381 typeof window.ewdUfaqManagedOrderControls === 'function' ? window.ewdUfaqManagedOrderControls( { id: id, index: index, ids: selectedIds, setIds: setIds, disabled: busy || isSaving || trashing[id] } ) : null, 391 382 el( Button, { isSmall: true, disabled: busy || isSaving || trashing[ id ], onClick: function() { removeFaq( id ); } }, __( 'Remove', 'ultimate-faqs' ) ), 392 383 record && record.can_delete ? el( Button, { isSmall: true, isDestructive: true, disabled: busy || isSaving || trashing[ id ], onClick: function() { setTrashId( id ); } }, trashing[ id ] ? __( 'Moving FAQ to Trash…', 'ultimate-faqs' ) : __( 'Move FAQ to Trash', 'ultimate-faqs' ) ) : null -
ultimate-faqs/tags/2.7.0/assets/js/ewd-ufaq.js
r3704732 r3821169 1 var filtering_running = false; 2 var wpforms_search_running = 'No'; 3 4 var ajax_ctrlr = { 5 6 last_run: new Date(), 7 srch_str: '', 8 schdl_to_run_state: false, 9 schdl_to_run_delay: 250, 10 search_save_schdl_to_run_delay: 3000, 11 schdl_to_run_cntr: 0, 12 schdl_to_run_hndl: null, 13 search_save_schdl_to_run_hndl: null, 14 15 schedule_to_run: function() { 16 ajax_ctrlr.schdl_to_run_cntr++; 17 18 if(ajax_ctrlr.schdl_to_run_cntr % 5 == 0) { 19 ajax_ctrlr.schdl_to_run_delay += 250; 20 ajax_ctrlr.schdl_to_run_reset(); 21 } 22 23 if( ! ajax_ctrlr.schdl_to_run_state) { 24 return; 25 } 26 27 let crnt_run = new Date(); 28 29 if(crnt_run - ajax_ctrlr.last_run > ajax_ctrlr.schdl_to_run_delay) { 30 ajax_ctrlr.schdl_to_run_state = false; 31 ajax_ctrlr.schdl_to_run_cntr = 0; 32 ajax_ctrlr.last_run = new Date(); 33 34 ewd_ufaq_ajax_reload(); 35 36 ajax_ctrlr.save_search_schdl_to_run_reset(); 37 } 38 }, 39 schdl_to_run_reset: function () { 40 clearInterval(ajax_ctrlr.schdl_to_run_hndl); 41 ajax_ctrlr.schdl_to_run_hndl = setInterval(ajax_ctrlr.schedule_to_run, ajax_ctrlr.schdl_to_run_delay); 42 }, 43 run_search_ajax: function( elm ) { 44 ajax_ctrlr.clear_field( elm ); 45 46 let srch_str = jQuery(elm).val(); 47 48 if( ajax_ctrlr.schdl_to_run_delay > 250 ) { 49 ajax_ctrlr.schdl_to_run_delay = 250; 50 ajax_ctrlr.schdl_to_run_reset(); 51 } 52 53 if(srch_str != ajax_ctrlr.srch_str) { 54 ajax_ctrlr.srch_str = srch_str; 55 ajax_ctrlr.schdl_to_run_state = true; 56 ajax_ctrlr.last_run = new Date(); 57 } 58 }, 59 save_search_term: function() { 60 var params = {}; 61 62 params.nonce = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.nonce : ''; 63 params.search_term = ajax_ctrlr.srch_str; 64 params.action = 'ewd_ufaq_record_search_term'; 65 66 var data = jQuery.param( params ); 67 jQuery.post(ajaxurl, data, function(response) {}); 68 }, 69 save_search_schdl_to_run_reset: function() { 70 71 if ( typeof ewd_ufaq_php_data == 'undefined' || ! ewd_ufaq_php_data.save_search_terms ) { return false; } 72 73 clearTimeout(ajax_ctrlr.search_save_schdl_to_run_hndl); 74 ajax_ctrlr.search_save_schdl_to_run_hndl = setTimeout(ajax_ctrlr.save_search_term, ajax_ctrlr.search_save_schdl_to_run_delay); 75 }, 76 clear_field: function ( srch_elm ) { 77 let cf = jQuery(srch_elm).parent('.search-field').find('.clear-field').eq(0); 78 if( 0 < jQuery(srch_elm).val().length ) { 79 if( 'hidden' == cf.data('state') ) { 80 cf.data('state', 'visible'); 81 cf.removeClass('slide-out').addClass('slide-in'); 82 } 83 } 84 else { 85 cf.data('state', 'hidden'); 86 cf.removeClass('slide-in').addClass('slide-out'); 87 } 88 } 89 }; 90 91 jQuery(function(){ //DOM Ready 92 ufaqSetClickHandlers(); 93 UFAQSetAutoCompleteClickHandlers(); 94 UFAQSetRatingHandlers(); 95 UFAQSetExpandCollapseHandlers(); 96 UFAQSetPaginationHandlers(); 97 98 UFAQWPFormsHandler(); 99 }); 100 101 function ewd_ufaq_run_effect( display, faq_element ) { 102 103 var selected_effect = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.reveal_effect : 'none'; 104 105 // most effect types need no options passed by default 106 var options = {}; 107 108 // some effects have required parameters 109 if ( selected_effect === 'size' ) { 110 111 options = { to: { width: 200, height: 60 } }; 112 } 113 114 // run the effect 115 if ( display == 'show' ) { faq_element.find( '.ewd-ufaq-faq-body' ).show( selected_effect, options, 500, ewd_ufaq_toggle_hidden_class( faq_element ) ); } 116 if ( display == 'hide' ) { faq_element.find( '.ewd-ufaq-faq-body' ).hide( selected_effect, options, 500, ewd_ufaq_toggle_hidden_class( faq_element ) ); } 117 }; 1 jQuery(function() { ufaqSetClickHandlers(); UFAQSetExpandCollapseHandlers(); }); 2 3 118 4 119 5 // callback function to bring a hidden box back 120 function ewd_ufaq_toggle_hidden_class( faq_element ) { 121 122 setTimeout( function() { faq_element.find( '.ewd-ufaq-faq-body' ).toggleClass( 'ewd-ufaq-hidden' ); }, 500 ); 123 }; 6 124 7 125 8 function ufaqSetClickHandlers( context ) { 126 9 127 10 var interaction_scope = context ? jQuery( context ) : jQuery( document ); 11 UFAQSetExpandCollapseHandlers( context ); 128 12 129 13 interaction_scope.find( '.ewd-ufaq-faq-toggle' ).off( 'click' ).on( 'click', function( event ) { … … 135 19 event.preventDefault(); 136 20 137 faq = jQuery( this ).parent();21 var faq = jQuery( this ).parent(); 138 22 139 23 if ( faq.find( '.ewd-ufaq-faq-body' ).hasClass( 'ewd-ufaq-hidden' ) ) { … … 141 25 EWD_UFAQ_Reveal_FAQ( faq ); 142 26 143 if ( typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.faq_scroll ) { jQuery( 'html, body').animate({scrollTop: jQuery(this).offset().top -80}, 100); }27 if ( typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.faq_scroll ) { jQuery( this.ownerDocument ).find('html, body').animate({scrollTop: jQuery(this).offset().top -80}, 100); } 144 28 } 145 29 else { … … 152 36 153 37 var category_title = jQuery( this ); 38 var context_document = jQuery( this.ownerDocument ); 154 39 var category = category_title.parent(); 155 40 var category_inner = category.find( '.ewd-ufaq-faq-category-inner' ).first(); 156 var category_inner_height = category_inner.outerHeight( true );157 var faqs_list = category_inner.parent();158 var faqs_list_height = faqs_list.outerHeight( true );159 var total_faqs_height = category_inner_height + faqs_list_height;160 161 jQuery( '.ewd-ufaq-category-tabs-1' ).css( 'height', total_faqs_height + 'px' );162 41 163 42 jQuery( this ).toggleClass( 'ewd-ufaq-category-tab-selected' ); … … 167 46 if ( typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.category_accordion ) { 168 47 169 jQuery( '.ewd-ufaq-faq-category-inner' ).each( function( index, object ) {48 context_document.find( '.ewd-ufaq-faq-category-inner' ).each( function( index, object ) { 170 49 171 50 if ( object != category_inner.get( 0 ) ) { jQuery( this ).addClass( 'ewd-ufaq-faq-category-body-hidden' ); } 172 51 }); 173 52 174 jQuery( '.ewd-ufaq-faq-category-title-toggle' ).each (function() {175 176 if ( jQuery( this ) != category_title) { jQuery( this ).removeClass( 'ewd-ufaq-category-tab-selected' ); }53 context_document.find( '.ewd-ufaq-faq-category-title-toggle' ).each (function() { 54 55 if ( this !== category_title[0] ) { jQuery( this ).removeClass( 'ewd-ufaq-category-tab-selected' ); } 177 56 }); 178 57 } 179 58 180 jQuery( '.ewd-ufaq-faq-category-title-toggle' ).each( function() {59 context_document.find( '.ewd-ufaq-faq-category-title-toggle' ).each( function() { 181 60 var span = jQuery( this ).find( '.ewd-ufaq-category-post-margin-symbol span' ); 182 61 183 62 if ( jQuery( this).hasClass( 'ewd-ufaq-category-tab-selected' ) ) { 184 span. html( span.html().toUpperCase() );63 span.text( span.text().toUpperCase() ); 185 64 } 186 65 else { 187 span. html( span.html().toLowerCase() );66 span.text( span.text().toLowerCase() ); 188 67 } 189 68 } ); 69 if ( typeof window.ewdUfaqCategoryLayout === 'function' ) { window.ewdUfaqCategoryLayout( category_title ); } 190 70 }); 191 71 … … 193 73 event.preventDefault(); 194 74 195 jQuery( 'html, body' ).animate( { scrollTop: jQuery( '#ewd-ufaq-faq-list' ).offset().top -80 }, 100 ); 75 var context_document = jQuery( this.ownerDocument ); 76 var list = jQuery( this ).closest( '#ewd-ufaq-faq-list' ); 77 if ( list.length ) { context_document.find( 'html, body' ).animate( { scrollTop: list.offset().top -80 }, 100 ); } 196 78 }); 197 79 … … 200 82 201 83 var faq_id = jQuery( this ).data( 'postid' ); 202 var faq = jQuery( '#ewd-ufaq-post-' + faq_id ).first(); 84 var context_document = jQuery( this.ownerDocument ); 85 var faq = context_document.find( '#ewd-ufaq-post-' + faq_id ).first(); 86 if ( ! faq.length ) { return; } 203 87 204 88 if ( faq.find( '.ewd-ufaq-faq-body' ).hasClass( 'ewd-ufaq-hidden' ) ) { … … 207 91 } 208 92 209 jQuery( 'html, body' ).animate( { scrollTop: faq.offset().top - 20 }, 100 ); 210 }); 211 } 212 213 function UFAQSetAutoCompleteClickHandlers() { 214 215 jQuery( '.ewd-ufaq-text-auto-complete' ).on( 'keyup', function() { 216 217 jQuery( '.ewd-ufaq-text-auto-complete' ).autocomplete({ 218 219 source: typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.question_titles : '', 220 minLength: 3, 221 appendTo: '#ewd-ufaq-jquery-ajax-search', 222 select: function( event, ui ) { 223 jQuery( this ).val( ui.item.value ); 224 ewd_ufaq_ajax_reload(); 225 } 226 }); 227 228 jQuery( '.ewd-ufaq-text-auto-complete' ).autocomplete( 'enable' ); 229 }); 230 } 93 context_document.find( 'html, body' ).animate( { scrollTop: faq.offset().top - 20 }, 100 ); 94 }); 95 } 96 97 231 98 232 99 function EWD_UFAQ_Reveal_FAQ( faq_element ) { 100 if ( ! faq_element || ! faq_element.length ) { return; } 233 101 234 102 var post_id = faq_element.data( 'post_id' ); … … 243 111 jQuery.post(ajaxurl, data, function(response) {}); 244 112 245 faq_element.find( '.ewd-ufaq-post-margin-symbol' ). html( faq_element.find( '.ewd-ufaq-post-margin-symbol' ).html().toUpperCase());113 faq_element.find( '.ewd-ufaq-post-margin-symbol' ).each( function() { jQuery( this ).text( jQuery( this ).text().toUpperCase() ); } ); 246 114 247 115 faq_element.find( '.ewd-ufaq-faq-excerpt' ).addClass( 'ewd-ufaq-hidden' ); 248 116 249 if ( typeof ewd_ufaq_ php_data != 'undefined'&& ewd_ufaq_php_data.reveal_effect != 'none' ) { ewd_ufaq_run_effect( 'show', faq_element ); }117 if ( typeof ewd_ufaq_run_effect === 'function' && typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.reveal_effect && ewd_ufaq_php_data.reveal_effect != 'none' ) { ewd_ufaq_run_effect( 'show', faq_element ); } 250 118 else { faq_element.find( '.ewd-ufaq-faq-body' ).removeClass( 'ewd-ufaq-hidden' ); } 251 119 252 120 if ( typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.faq_accordion ) { 253 121 254 jQuery( '.ewd-ufaq-faq-div' ).each( function() {122 jQuery( faq_element[0].ownerDocument ).find( '.ewd-ufaq-faq-div' ).each( function() { 255 123 256 124 if ( jQuery( this ).prop( 'id' ) != faq_element.prop( 'id' ) ) { … … 271 139 272 140 function EWD_UFAQ_Hide_FAQ( faq_element ) { 141 if ( ! faq_element || ! faq_element.length ) { return; } 273 142 274 143 var post_id = faq_element.data( 'post_id' ); … … 276 145 faq_element.find( '.ewd-ufaq-faq-excerpt' ).removeClass( 'ewd-ufaq-hidden' ); 277 146 278 if ( typeof ewd_ufaq_ php_data != 'undefined'&& ewd_ufaq_php_data.reveal_effect != 'none' && ! faq_element.find( '.ewd-ufaq-faq-body' ).hasClass( 'ewd-ufaq-hidden' ) ) { ewd_ufaq_run_effect( 'hide', faq_element ); }147 if ( typeof ewd_ufaq_run_effect === 'function' && typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.reveal_effect && ewd_ufaq_php_data.reveal_effect != 'none' && ! faq_element.find( '.ewd-ufaq-faq-body' ).hasClass( 'ewd-ufaq-hidden' ) ) { ewd_ufaq_run_effect( 'hide', faq_element ); } 279 148 else { faq_element.find( '.ewd-ufaq-faq-body' ).addClass( 'ewd-ufaq-hidden' ); } 280 149 281 150 faq_element.removeClass( 'ewd-ufaq-post-active' ); 282 faq_element.find( '.ewd-ufaq-post-margin-symbol' ). html( faq_element.find( '.ewd-ufaq-post-margin-symbol' ).html().toLowerCase());151 faq_element.find( '.ewd-ufaq-post-margin-symbol' ).each( function() { jQuery( this ).text( jQuery( this ).text().toLowerCase() ); } ); 283 152 } 284 153 285 154 jQuery(document).ready(function() { 286 287 if( 0 < jQuery( '#ewd-ufaq-jquery-ajax-search .ewd-ufaq-text-input' ).eq(0).length ) {288 ajax_ctrlr.schdl_to_run_hndl = setInterval(ajax_ctrlr.schedule_to_run, ajax_ctrlr.schdl_to_run_delay);289 }290 291 jQuery( '#ewd-ufaq-ajax-search-submit' ).click( function() {292 jQuery( '.ewd-ufaq-bottom' ).data( 'current_page', 1 );293 let elm = jQuery( '#ewd-ufaq-jquery-ajax-search .ewd-ufaq-text-input' ).eq(0);294 ajax_ctrlr.run_search_ajax( elm[0] );295 });296 297 jQuery( '#ewd-ufaq-jquery-ajax-search' ).on( 'keyup', '.ewd-ufaq-text-input', function() {298 ajax_ctrlr.run_search_ajax( this );299 });300 301 // clear search field302 jQuery( '#ewd-ufaq-jquery-ajax-search' ).on( 'click', '.clear-field', function() {303 let elm = jQuery( '#ewd-ufaq-jquery-ajax-search .ewd-ufaq-text-input' ).eq(0);304 jQuery(elm).val('');305 ajax_ctrlr.run_search_ajax( elm[0] );306 });307 308 jQuery( '.ewd-ufaq-text-input ' ).on( 'search', function() {309 ajax_ctrlr.run_search_ajax( this );310 });311 312 155 if ( typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.display_faq > 0 ) { 313 156 … … 322 165 }); 323 166 324 var request_count = 0; 325 function ewd_ufaq_ajax_reload( pagination, append_results, search_string ) { 326 327 filtering_running = true; 328 329 var search_string = search_string ? search_string : jQuery( '.ewd-ufaq-text-input' ).val(); 330 var include_cat = jQuery( '#ewd-ufaq-include-category' ).val(); 331 var exclude_cat = jQuery( '#ewd-ufaq-exclude-category' ).val(); 332 var orderby = jQuery( '#ewd-ufaq-orderby' ).val(); 333 var order = jQuery( '#ewd-ufaq-order' ).val(); 334 var post_count = jQuery( '#ewd-ufaq-post-count' ).val(); 335 var current_url = jQuery( '#ewd-ufaq-current-url' ).val(); 336 var show_on_load = jQuery( '#ewd-ufaq-show-on-load' ).val(); 337 338 if ( search_string == undefined ) { search_string = ''; } 339 340 if ( pagination == 'Yes' ) { 341 342 var faqs_only = 'Yes'; 343 var faq_page = jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ); 344 } 345 else { 346 347 var retrieving_results = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.retrieving_results : 'Retrieving Results'; 348 349 jQuery( '.ewd-ufaq-search .ewd-ufaq-faqs' ).html( '<h3>' + retrieving_results + '</h3>' ); 350 351 var faqs_only = 'No'; 352 var faq_page = 0; 353 jQuery( '.ewd-ufaq-bottom' ).remove(); 354 } 355 356 request_count = request_count + 1; 357 358 if ( jQuery( '.ewd-ufaq-text-input' ).length && 'yes' != show_on_load.toLocaleLowerCase() && search_string.length == 0 ) { 359 jQuery( '.ewd-ufaq-search .ewd-ufaq-faqs' ).html(''); 360 return; 361 } 362 363 var params = {}; 364 365 params.search_string = search_string; 366 params.include_category = include_cat; 367 params.exclude_category = exclude_cat; 368 params.orderby = orderby; 369 params.order = order; 370 params.post_count = post_count; 371 params.request_count = request_count; 372 params.current_url = current_url; 373 params.faqs_only = faqs_only; 374 params.faq_page = faq_page; 375 params.show_on_load = show_on_load; 376 params.action = 'ewd_ufaq_search'; 377 params.nonce = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.nonce : ''; 378 379 var data = jQuery.param( params ); 380 381 jQuery.post( ajaxurl, data, function( response ) { 382 383 if ( ! response || ! response.success || ! response.data ) { return; } 384 if ( response.data.analytics && response.data.analytics.endpoint && response.data.analytics.token ) { 385 try { 386 var analyticsKey = 'ewdUfaqAnalytics:' + response.data.analytics.storage_key; 387 if ( ! window.sessionStorage.getItem( analyticsKey ) ) { 388 window.sessionStorage.setItem( analyticsKey, '1' ); 389 window.fetch( response.data.analytics.endpoint, { method: 'POST', credentials: 'omit', keepalive: true, headers: { 'Content-Type': 'application/json' }, body: JSON.stringify( { event: response.data.analytics.event, token: response.data.analytics.token } ) } ).catch( function() {} ); 390 } 391 } catch ( analyticsError ) {} 392 } 393 394 if ( response.data.request_count == request_count ) { 395 396 var data_output_selector = search_string || jQuery( '.ewd-ufaq-faq-list' ).prev().is( '#ewd-ufaq-jquery-ajax-search' ) ? '#ewd-ufaq-jquery-ajax-search + .ewd-ufaq-faq-list .ewd-ufaq-faqs' : '.ewd-ufaq-faqs:not(#ewd-ufaq-jquery-ajax-search + .ewd-ufaq-faq-list .ewd-ufaq-faqs)'; 397 398 if ( ! jQuery( data_output_selector ).length ) { data_output_selector = '.ewd-ufaq-faqs'; } 399 400 if ( append_results == 'Yes' ) { 401 jQuery( data_output_selector ).append( response.data.output ); 402 } 403 else { 404 jQuery( data_output_selector ).html( response.data.output ); 405 if( '' != response.data.pagination ) { 406 jQuery('.ewd-ufaq-faq-list .ewd-ufaq-bottom').remove(); 407 jQuery('.ewd-ufaq-faq-list').append(response.data.pagination); 408 } 409 } 410 411 jQuery( '.ewd-ufaq-bottom' ).data( 'max_page', response.data.max_page ); 412 413 jQuery( '.ewd-ufaq-expand-all' ).removeClass( 'ewd-ufaq-hidden' ); 414 jQuery( '.ewd-ufaq-collapse-all' ).addClass( 'ewd-ufaq-hidden' ); 415 416 ufaqSetClickHandlers(); 417 UFAQSetRatingHandlers(); 418 UFAQSetPaginationHandlers(); 419 UFAQUpdatePaginationButtons(); 420 UFAQSetExpandCollapseHandlers(); 421 422 filtering_running = false; 423 } 424 }); 425 } 426 427 function UFAQSetRatingHandlers() { 428 429 jQuery( '.ewd-ufaq-rating-button' ).off( 'click' ).on( 'click', function() { 430 431 var faq_id = jQuery( this ).data( 'faq_id' ); 432 jQuery( '*[data-faq_id="' + faq_id + '"]' ).off( 'click' ); 433 434 var current_count = jQuery( this ).find( 'span' ).html(); 435 current_count++; 436 jQuery( this ).find( 'span' ).html( current_count ); 437 438 if ( jQuery( this ).hasClass( 'ewd-ufaq-up-vote' ) ) { vote_type = 'up'; } 439 else { vote_type = 'down'; } 440 441 var params = {}; 442 443 params.action = 'ewd_ufaq_update_rating'; 444 params.nonce = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.nonce : ''; 445 params.faq_id = faq_id; 446 params.vote_type = vote_type; 447 448 var data = jQuery.param( params ); 449 jQuery.post( ajaxurl, data ); 450 }); 451 } 452 453 function UFAQSetExpandCollapseHandlers() { 454 455 jQuery('.ewd-ufaq-expand-all').off('click').on('click', function() { 167 168 169 170 171 function UFAQSetExpandCollapseHandlers( context ) { 172 var interaction_scope = context ? jQuery( context ) : jQuery( document ); 173 174 interaction_scope.find('.ewd-ufaq-expand-all').off('click').on('click', function() { 175 var context_document = jQuery( this.ownerDocument ); 456 176 457 177 var accordion_setting = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.faq_accordion : false; 458 ewd_ufaq_php_data.faq_accordion = false;// turn FAQ accordion off while expanding all459 460 jQuery( '.ewd-ufaq-faq-toggle' ).each( function() {178 if ( typeof ewd_ufaq_php_data != 'undefined' ) { ewd_ufaq_php_data.faq_accordion = false; } // turn FAQ accordion off while expanding all 179 180 context_document.find( '.ewd-ufaq-faq-toggle' ).each( function() { 461 181 462 182 var faq = jQuery(this).parent(); … … 469 189 if ( typeof ewd_ufaq_php_data != 'undefined' ) { ewd_ufaq_php_data.faq_accordion = accordion_setting; } //reset FAQ accordion setting 470 190 471 jQuery('.ewd-ufaq-faq-category-inner').removeClass('ewd-ufaq-faq-category-body-hidden'); 472 jQuery('.ewd-ufaq-collapse-all').removeClass('ewd-ufaq-hidden'); 473 jQuery('.ewd-ufaq-expand-all').addClass('ewd-ufaq-hidden'); 474 475 jQuery( '.ewd-ufaq-faq-category-title-toggle' ).addClass( 'ewd-ufaq-category-tab-selected' ); 476 jQuery( '.ewd-ufaq-category-post-margin-symbol span' ).each( function() { 477 jQuery( this ).html().toUpperCase(); 478 }); 479 }); 480 481 jQuery('.ewd-ufaq-collapse-all').off('click').on('click', function() { 482 483 jQuery('.ewd-ufaq-faq-toggle').each(function() { 191 context_document.find('.ewd-ufaq-faq-category-inner').removeClass('ewd-ufaq-faq-category-body-hidden'); 192 context_document.find('.ewd-ufaq-collapse-all').removeClass('ewd-ufaq-hidden'); 193 context_document.find('.ewd-ufaq-expand-all').addClass('ewd-ufaq-hidden'); 194 195 context_document.find( '.ewd-ufaq-faq-category-title-toggle' ).addClass( 'ewd-ufaq-category-tab-selected' ); 196 context_document.find( '.ewd-ufaq-category-post-margin-symbol span' ).each( function() { 197 jQuery( this ).text( jQuery( this ).text().toUpperCase() ); 198 }); 199 }); 200 201 interaction_scope.find('.ewd-ufaq-collapse-all').off('click').on('click', function() { 202 var context_document = jQuery( this.ownerDocument ); 203 204 context_document.find('.ewd-ufaq-faq-toggle').each(function() { 484 205 485 206 var faq = jQuery(this).parent(); … … 490 211 }); 491 212 492 jQuery( '.ewd-ufaq-faq-category-inner' ).addClass( 'ewd-ufaq-faq-category-body-hidden' ); 493 jQuery( '.ewd-ufaq-faq-category-title-toggle' ).removeClass( 'ewd-ufaq-category-tab-selected' ); 494 495 jQuery( '.ewd-ufaq-category-post-margin-symbol span' ).each( function() { 496 jQuery( this ).html().toLowerCase(); 497 }); 498 499 jQuery('.ewd-ufaq-expand-all').removeClass('ewd-ufaq-hidden'); 500 jQuery('.ewd-ufaq-collapse-all').addClass('ewd-ufaq-hidden'); 501 }); 502 } 503 504 function UFAQSetPaginationHandlers() { 505 506 jQuery('.ewd-ufaq-previous-faqs').off( 'click' ).on('click', function() { 507 508 var current_page = jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ); 509 510 jQuery( '.ewd-ufaq-bottom' ).data( 'current_page', Math.max( current_page - 1, 0 ) ); 511 jQuery( '.ewd-ufaq-max-faqs-not-reached' ).remove(); 512 513 ewd_ufaq_ajax_reload( 'Yes', 'No' ); 514 }); 515 516 jQuery('.ewd-ufaq-next-faqs').off( 'click' ).on('click', function() { 517 518 var current_page = jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ); 519 520 jQuery( '.ewd-ufaq-bottom' ).data( 'current_page', current_page + 1 ); 521 jQuery( '.ewd-ufaq-max-faqs-not-reached' ).remove(); 522 523 ewd_ufaq_ajax_reload( 'Yes', 'No' ); 524 }); 525 526 jQuery( '.ewd-ufaq-load-more' ).off( 'click' ).on( 'click', function() { 527 528 var current_page = jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ); 529 530 jQuery( '.ewd-ufaq-bottom' ).data( 'current_page', current_page + 1 ); 531 jQuery( '.ewd-ufaq-max-faqs-not-reached' ).remove(); 532 533 ewd_ufaq_ajax_reload( 'Yes', 'Yes' ); 534 }); 535 536 if ( jQuery( '.ewd-ufaq-pagination-infinite_scroll' ).length ) { 537 538 jQuery( window ).scroll( function() { 539 540 var infinite_pos = jQuery( '.ewd-ufaq-pagination-infinite_scroll').position(); 541 542 if ( infinite_pos != undefined && jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ) != jQuery( '.ewd-ufaq-bottom' ).data( 'max_page' ) ) { 543 544 if ( ( jQuery( window ).height() + jQuery( window ).scrollTop() > infinite_pos.top ) && filtering_running == false ) { 545 546 jQuery( '.ewd-ufaq-bottom' ).data( 'current_page', jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ) + 1 ); 547 548 ewd_ufaq_ajax_reload( 'Yes', 'Yes' ); 549 } 550 } 551 }); 552 } 553 } 554 555 function UFAQUpdatePaginationButtons() { 556 557 jQuery('.ewd-ufaq-bottom').first().appendTo('.ewd-ufaq-faq-list'); 558 559 if ( jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ) < jQuery( '.ewd-ufaq-bottom' ).data( 'max_page' ) ) { 560 561 jQuery( '.ewd-ufaq-load-more, .ewd-ufaq-next-faqs' ).removeClass( 'ewd-ufaq-hidden' ); 562 } 563 else { jQuery( '.ewd-ufaq-load-more, .ewd-ufaq-next-faqs' ).addClass( 'ewd-ufaq-hidden' ); } 564 565 if ( jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ) <= 1 ) { 566 567 jQuery( '.ewd-ufaq-previous-faqs' ).addClass( 'ewd-ufaq-hidden' ); 568 } 569 else { jQuery( '.ewd-ufaq-previous-faqs' ).removeClass( 'ewd-ufaq-hidden' ); } 570 } 571 572 function UFAQWPFormsHandler() { 573 574 if ( typeof wpforms_integration === 'undefined' || wpforms_integration === null ) { return; } 575 576 if ( wpforms_integration.ufaq_enabled == 'disabled' ) { return; } 577 578 var target_field = wpforms_integration.ufaq_selected_field; 579 580 jQuery( '#wpforms-' + wpforms_integration.form_id + '-field_' + wpforms_integration.ufaq_selected_field ).on( 'keyup', function() { 581 582 var search_string = jQuery( this ).val(); 583 584 if ( search_string.length >= wpforms_integration.ufaq_minimum_characters ) { 585 586 jQuery( '.ewd-ufaq-wpforms-faq-results' ).removeClass( 'ewd-ufaq-hidden' ); 587 jQuery( '.ewd-ufaq-wpforms-label' ).removeClass( 'ewd-ufaq-hidden' ); 588 589 ewd_ufaq_ajax_reload( 'No', 'No', search_string ); 590 } 591 else if ( ! filtering_running ) { 592 593 jQuery( '.ewd-ufaq-faqs' ).html( ' ' ); 594 jQuery( '.ewd-ufaq-wpforms-faq-results' ).addClass( 'ewd-ufaq-hidden' ); 595 jQuery( '.ewd-ufaq-wpforms-label' ).addClass( 'ewd-ufaq-hidden' ); 596 } 597 598 }); 599 } 213 context_document.find( '.ewd-ufaq-faq-category-inner' ).addClass( 'ewd-ufaq-faq-category-body-hidden' ); 214 context_document.find( '.ewd-ufaq-faq-category-title-toggle' ).removeClass( 'ewd-ufaq-category-tab-selected' ); 215 216 context_document.find( '.ewd-ufaq-category-post-margin-symbol span' ).each( function() { 217 jQuery( this ).text( jQuery( this ).text().toLowerCase() ); 218 }); 219 220 context_document.find('.ewd-ufaq-expand-all').removeClass('ewd-ufaq-hidden'); 221 context_document.find('.ewd-ufaq-collapse-all').addClass('ewd-ufaq-hidden'); 222 }); 223 } 224 225 226 227 228 229 600 230 601 231 /*jQuery(document).ready(function() { … … 626 256 });*/ 627 257 628 jQuery( document ).ready( function() {629 630 jQuery( '.ewd-ufaq-compact-faq-meta .ewd-ufaq-permalink a' ).html( '<span class="dashicons dashicons-admin-links"></span>' );631 jQuery( '.ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-facebook a' ).html( '<span class="dashicons dashicons-facebook-alt"></span>' );632 jQuery( '.ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-twitter a' ).html( '<span class="dashicons dashicons-twitter-alt"></span>' );633 jQuery( '.ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-linkedin a' ).html( '<span class="dashicons dashicons-linkedin"></span>' );634 jQuery( '.ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-pinterest a' ).html( '<span class="dashicons dashicons-pinterest"></span>' );635 jQuery( '.ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-email a' ).html( '<span class="dashicons dashicons-email-alt"></span>' );636 jQuery( '.ewd-ufaq-compact-faq-meta .ewd-ufaq-up-vote' ).prepend( '<span class="dashicons dashicons-thumbs-up"></span>' );637 jQuery( '.ewd-ufaq-compact-faq-meta .ewd-ufaq-down-vote' ).prepend( '<span class="dashicons dashicons-thumbs-down"></span>' );638 } ); -
ultimate-faqs/tags/2.7.0/ewd-ufaq-templates/faq.php
r3352283 r3821169 7 7 <?php $this->maybe_print_faq_preview(); ?> 8 8 9 <div class='ewd-ufaq-faq-body<?php echo ( ! $this->display_all_answers ? ' ewd-ufaq-hidden' : '' ); ?><?php echo ( $ewd_ufaq_controller->settings->get_setting( 'compact-faq-meta' ) ? ' ewd-ufaq-compact-faq-meta' : '' ); ?>'>9 <div <?php echo ewd_format_classes( $this->get_body_classes() ); ?>> 10 10 11 11 <?php foreach ( $this->get_order_elements() as $element => $label ) { ?> -
ultimate-faqs/tags/2.7.0/ewd-ufaq-templates/faqs-search-submit.php
r2643489 r3821169 1 < label for='ewd-ufaq-search-submit'></label>2 3 <input type='button' id='ewd-ufaq-ajax-search-submit' name='Search' value='<?php echo esc_html( $this->get_label( 'label-search' ) ); ?>'> 1 <?php 2 // Compatibility template identity; Helper supplies advanced-search controls. 3 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'advanced_search_submit', $this ); -
ultimate-faqs/tags/2.7.0/ewd-ufaq-templates/faqs-search.php
r2830708 r3821169 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 7 <?php $this->maybe_print_shortcode_args(); ?> 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' ) ); ?>' 15 value='<?php echo ( isset( $_GET['faq_search_term'] ) ? esc_attr( $_GET['faq_search_term'] ) : '' ); ?>' /> 16 <button type="button" class="clear-field" data-state="hidden">x</button> 17 </div> 18 19 <?php $this->maybe_print_search_submit(); ?> 20 21 </div> 1 <?php 2 // Compatibility template identity. Free's ordinary GET form is owned by BasicSearch. 3 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'advanced_search_form', $this ); -
ultimate-faqs/tags/2.7.0/includes/AIAssist.class.php
r3704732 r3821169 9 9 if ( !class_exists( 'ewdufaqAIAssist' ) ) { 10 10 class ewdufaqAIAssist { 11 public static function limits( $operation ) { 12 $defaults = array( 'sources' => 1, 'faqs' => 1 ); 13 $limits = apply_filters( 'ewd_ufaq_legacy_ai_limits', $defaults, $operation ); 14 foreach ( $defaults as $key => $value ) { if ( ! is_array( $limits ) || ! isset( $limits[ $key ] ) || ! is_int( $limits[ $key ] ) || $limits[ $key ] < 1 ) { return $defaults; } } 15 return array_intersect_key( $limits, $defaults ); 16 } 11 17 12 18 public function __construct() { … … 41 47 42 48 if ( ! isset( $post_type ) or $post_type != EWD_UFAQ_FAQ_POST_TYPE ) { return; } 49 $limits = self::limits( 'render' ); 43 50 44 51 $args = array( … … 96 103 <select id='ewd-ufaq-ai-faqs-count'> 97 104 98 <?php for ( $i = 1; $i <= ( ! $ewd_ufaq_controller->permissions->check_permission( 'premium' ) ? 1 : 20 ); $i++ ) { ?>105 <?php for ( $i = 1; $i <= $limits['faqs']; $i++ ) { ?> 99 106 100 107 <option value='<?php echo $i; ?>'> … … 106 113 </select> 107 114 108 <?php if ( ! $ewd_ufaq_controller->permissions->check_permission( 'premium' )) { ?>115 <?php if ( 1 === $limits['faqs'] ) { ?> 109 116 110 117 <div class='ewd-ufaq-ai-no-premium-explanation'> … … 122 129 </label> 123 130 124 <select id='ewd-ufaq-ai-faqs-content' <?php echo ( $ewd_ufaq_controller->permissions->check_permission( 'premium' ) ? 'multiple=\'multiple\'' : '' ); ?>>131 <select id='ewd-ufaq-ai-faqs-content' <?php echo $limits['sources'] > 1 ? 'multiple="multiple"' : ''; ?>> 125 132 126 133 <?php foreach ( $content_options as $post_type => $posts ){ ?> … … 232 239 } 233 240 234 $ is_premium = $ewd_ufaq_controller->permissions->check_permission( 'premium' );241 $limits = self::limits( 'retrieve' ); 235 242 $selected_posts = array_values( array_unique( array_filter( array_map( 'absint', $selected_raw ) ) ) ); 236 $selected_posts = array_slice( $selected_posts, 0, $ is_premium ? 20 : 1);237 $faq_count = min( max( 1, isset( $_POST['faq_count'] ) ? absint( $_POST['faq_count'] ) : 1 ), $ is_premium ? 20 : 1);243 $selected_posts = array_slice( $selected_posts, 0, $limits['sources'] ); 244 $faq_count = min( max( 1, isset( $_POST['faq_count'] ) ? absint( $_POST['faq_count'] ) : 1 ), $limits['faqs'] ); 238 245 $set_categories = isset( $_POST['set_categories'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['set_categories'] ) ); 239 246 … … 399 406 } 400 407 401 $limit = $ewd_ufaq_controller->permissions->check_permission( 'premium' ) ? 20 : 1; 408 $limits = self::limits( 'publish' ); 409 $limit = $limits['faqs']; 402 410 $faqs = array_slice( $this->sanitize_faqs( $faqs_raw ), 0, $limit ); 403 411 foreach ( $faqs as $faq ) { -
ultimate-faqs/tags/2.7.0/includes/Ajax.class.php
r3744649 r3821169 10 10 class ewdufaqAJAX { 11 11 12 public function __construct() { 12 public function __construct( $register = true ) { 13 if ( ! $register ) { return; } 13 14 14 add_action( 'wp_ajax_ewd_ufaq_search', array( $this, 'return_search_results' ) );15 add_action( 'wp_ajax_nopriv_ewd_ufaq_search', array( $this, 'return_search_results' ) );16 17 add_action( 'wp_ajax_ewd_ufaq_record_search_term', array( $this, 'save_search_term' ) );18 add_action( 'wp_ajax_nopriv_ewd_ufaq_record_search_term', array( $this, 'save_search_term' ) );19 15 20 16 add_action( 'wp_ajax_ewd_ufaq_reset_saved_search_terms', array( $this, 'reset_saved_search_term' ) ); … … 23 19 add_action( 'wp_ajax_nopriv_ewd_ufaq_record_view', array( $this, 'record_view' ) ); 24 20 25 add_action( 'wp_ajax_ewd_ufaq_update_rating', array( $this, 'update_rating' ) );26 add_action( 'wp_ajax_nopriv_ewd_ufaq_update_rating', array( $this, 'update_rating' ) );27 21 28 add_action( 'wp_ajax_ewd_ufaq_update_faq_order', array( $this, 'update_faq_order' ) );29 30 add_action( 'wp_ajax_ewd_ufaq_update_category_order', array( $this, 'update_category_order' ) );31 22 } 32 23 … … 36 27 */ 37 28 public function return_search_results() { 38 global $ewd_ufaq_controller; 39 if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) { 40 ewdufaqHelper::bad_nonce_ajax(); 41 } 42 43 if ( $ewd_ufaq_controller->helper_compatibility->get_state() !== 'compatible' 44 || ! $ewd_ufaq_controller->permissions->check_permission( 'search' ) ) { 45 46 wp_send_json_error( array( 'code' => 'advanced_search_unavailable' ), 403 ); 47 } 48 $faq_atts = array( 49 'is_search' => 1, 50 'search_string' => '', 51 'post__in' => '', 52 'post__in_string' => '', 53 'include_tag' => '', 54 'include_category' => isset( $_POST['include_category'] ) ? sanitize_text_field( $_POST['include_category'] ) : '', //so that only the matching category is displayed 55 'exclude_category' => '', 56 'include_category_ids' => '', 57 'exclude_category_ids' => '', 58 'include_category_children' => '', 59 'no_comments' => '', 60 'orderby' => '', 61 'order' => '', 62 'display_all_answers' => '', 63 'faq_page' => 1, 64 'post_count' => -1 65 ); 66 67 $query = new ewdufaqQuery( $faq_atts ); 68 69 $query->parse_request_args(); 70 $query->prepare_args(); 71 72 $faq_atts['search_string'] = isset( $_REQUEST['search_string'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['search_string'] ) ) : ''; 73 $faqs = new ewdufaqViewFAQs( $faq_atts ); 74 75 $faqs->set_request_parameters(); 76 77 $faqs->set_faqs( $query->get_faqs() ); 78 79 $faqs->set_faqs_options(); 80 81 $faqs->create_faq_data(); 82 83 $faqs->set_faq_properties(); 84 85 ob_start(); 86 87 $ewd_ufaq_controller->shortcode_printing = true; 88 89 $faqs->print_faqs(); 90 91 $ewd_ufaq_controller->shortcode_printing = false; 92 93 $output = ob_get_clean(); 94 95 $pagination = ''; 96 if('yes' != $faqs->show_on_load && 2 > $faqs->faq_page) { 97 ob_start(); 98 $faqs->maybe_print_pagination(); 99 $pagination = ob_get_clean(); 100 } 101 102 $output = $output ? $output : '<div class="ewd-ufaq-no-results-found">' . sprintf( $ewd_ufaq_controller->settings->get_setting( 'label-no-results-found' ), $query->args['search_string'] ) . '</div>'; 103 104 do_action( 'ewd_ufaq_advanced_search_completed', $query->args['search_string'], count( $faqs->displayed_faqs ), $faq_atts ); 105 $analytics = apply_filters( 'ewd_ufaq_advanced_search_analytics', array(), $query->args['search_string'], count( $faqs->displayed_faqs ), $faq_atts ); 106 wp_send_json_success( 107 array( 108 'output' => $output, 109 'pagination' => $pagination, 110 'faq_count' => $faqs->faq_count, 111 'max_page' => $faqs->max_page, 112 'request_count' => intval( $_POST['request_count'] ), 113 'analytics' => $analytics, 114 ) 115 ); 116 117 die(); 29 if ( class_exists( 'ewdufaqEWDPHSearch', false ) ) { return ( new ewdufaqEWDPHSearch( false ) )->return_search_results(); } 30 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 118 31 } 119 32 … … 144 57 */ 145 58 public function update_rating() { 146 global $ewd_ufaq_controller; 147 if ( ! $ewd_ufaq_controller->permissions->check_permission( 'premium' ) ) { 148 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 149 } 150 151 if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) { 152 ewdufaqHelper::bad_nonce_ajax(); 153 } 154 155 $faq_id = isset( $_POST['faq_id'] ) ? absint( $_POST['faq_id'] ) : 0; 156 $vote_type = isset( $_POST['vote_type'] ) ? sanitize_key( wp_unslash( $_POST['vote_type'] ) ) : ''; 157 158 if ( ! $this->is_public_faq( $faq_id ) || ! in_array( $vote_type, array( 'up', 'down' ), true ) ) { 159 160 wp_send_json_error( array( 'code' => 'invalid_rating' ), 400 ); 161 } 162 163 if ( ! $this->allow_public_event( 'rating', $faq_id, DAY_IN_SECONDS ) ) { wp_send_json_success( array( 'duplicate' => true ) ); } 164 165 if ( 'up' === $vote_type ) { 166 167 $this->increment_post_meta( $faq_id, 'FAQ_Up_Votes', 1 ); 168 $this->increment_post_meta( $faq_id, 'FAQ_Total_Score', 1 ); 169 } 170 else { 171 172 $this->increment_post_meta( $faq_id, 'FAQ_Down_Votes', 1 ); 173 $this->increment_post_meta( $faq_id, 'FAQ_Total_Score', -1 ); 174 } 175 176 do_action( 'ewd_ufaq_public_faq_helpfulness', $faq_id, $vote_type ); 177 178 wp_send_json_success(); 59 if ( class_exists( 'ewdufaqEWDPHPaidAjax', false ) ) { return ewdufaqEWDPHPaidAjax::update_rating( $this ); } 60 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 179 61 } 180 62 … … 184 66 */ 185 67 public function update_faq_order() { 186 global $ewd_ufaq_controller; 187 188 if ( 189 ! check_ajax_referer( 'ewd-ufaq-admin-js', 'nonce' ) 190 || 191 ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) ) 192 ) { 193 ewdufaqHelper::admin_nopriv_ajax(); 194 } 195 196 if ( ! is_array( $_POST['ewd-ufaq-item'] ) or ! $ewd_ufaq_controller->permissions->check_permission( 'ordering' ) ) { return; } 197 198 foreach ( $_POST['ewd-ufaq-item'] as $key => $id ) { 199 200 update_post_meta( intval( $id ), 'ufaq_order', intval( $key ) + 1 ); 201 } 202 203 die(); 68 if ( class_exists( 'ewdufaqEWDPHOrdering', false ) ) { return ewdufaqEWDPHOrdering::save_faq(); } 69 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 204 70 } 205 71 … … 209 75 */ 210 76 public function update_category_order() { 211 global $ewd_ufaq_controller; 212 if ( ! $ewd_ufaq_controller->permissions->check_permission( 'ordering' ) ) { 213 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 214 } 215 216 // Authenticate request 217 if ( 218 ! check_ajax_referer( 'ewd-ufaq-admin-js', 'nonce' ) 219 || 220 ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) ) 221 ) { 222 ewdufaqHelper::admin_nopriv_ajax(); 223 } 224 225 $ids = is_array( $_POST['tag'] ) ? array_map( 'intval', $_POST['tag'] ) : array(); 226 227 foreach ( $ids as $order => $term_id ) { 228 229 update_term_meta( $term_id, 'ufaq_category_order', $order ); 230 } 77 if ( class_exists( 'ewdufaqEWDPHOrdering', false ) ) { return ewdufaqEWDPHOrdering::save_category(); } 78 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 231 79 } 232 80 … … 236 84 */ 237 85 public function save_search_term() { 238 global $ewd_ufaq_controller; 239 if ( ! $ewd_ufaq_controller->permissions->check_permission( 'search' ) ) { 240 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 241 } 242 243 if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) { 244 ewdufaqHelper::bad_nonce_ajax(); 245 } 246 247 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'save-search-terms' ) ) ) { return; } 248 249 $search_term = isset( $_POST['search_term'] ) ? sanitize_text_field( wp_unslash( $_POST['search_term'] ) ) : ''; 250 $search_term = function_exists( 'mb_substr' ) ? mb_substr( $search_term, 0, 200 ) : substr( $search_term, 0, 200 ); 251 if ( empty( $search_term ) or strlen( $search_term ) < 2 ) { die(); } 252 253 $search_terms = get_option( 'ewd-ufaq-search-data', array() ); 254 255 if ( isset( $search_terms[ $search_term ] ) ) { 256 257 $search_terms[ $search_term ]++; 258 } 259 elseif ( count( $search_terms ) < 1000 ) { 260 261 $search_terms[ $search_term ] = 1; 262 } 263 update_option( 'ewd-ufaq-search-data', $search_terms ); 264 265 die(); 86 if ( class_exists( 'ewdufaqEWDPHSearch', false ) ) { return ( new ewdufaqEWDPHSearch( false ) )->save_search_term(); } 87 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 266 88 } 267 89 -
ultimate-faqs/tags/2.7.0/includes/AnalyticsBridge.class.php
r3704732 r3821169 1 1 <?php 2 /** 3 * Common analytics event bridge. Free registers no analytics storage or public route. 4 */ 5 6 if ( ! defined( 'ABSPATH' ) ) { 7 exit; 8 } 9 10 if ( ! class_exists( 'ewdufaqAnalyticsBridge' ) ) { 11 class ewdufaqAnalyticsBridge { 12 13 private $contexts = array(); 14 private $assets_enqueued = false; 15 16 public function __construct() { 17 18 add_action( 'ewd_ufaq_basic_search_rendered', array( $this, 'register_search' ), 10, 5 ); 19 add_action( 'ewd_ufaq_faq_rendered', array( $this, 'register_faq' ), 10, 2 ); 20 add_filter( 'ewd_ufaq_advanced_search_analytics', array( $this, 'advanced_search_context' ), 10, 4 ); 21 add_action( 'wp_footer', array( $this, 'print_contexts' ), 5 ); 22 } 23 24 public function advanced_search_context( $context, $term, $result_count, $args ) { 25 26 $term = trim( sanitize_text_field( $term ) ); 27 if ( '' === $term ) { 28 return $context; } 29 $payload = array( 30 'event' => 'search', 31 'display_hash' => hash( 'sha256', 'advanced|' . wp_json_encode( $args ) ), 32 'locale' => determine_locale(), 33 'search_text' => $term, 34 'query_hash' => hash( 'sha256', determine_locale() . '|' . $term ), 35 'result_count' => absint( $result_count ), 36 ); 37 $token = apply_filters( 'ewd_ufaq_analytics_sign_event_context', '', $payload ); 38 $endpoint = apply_filters( 'ewd_ufaq_analytics_endpoint', '' ); 39 if ( ! is_string( $token ) || '' === $token || ! is_string( $endpoint ) || '' === $endpoint ) { 40 return $context; } 41 return array( 42 'event' => 'search', 43 'endpoint' => $endpoint, 44 'token' => $token, 45 'storage_key' => substr( hash( 'sha256', $payload['query_hash'] . '|' . $payload['display_hash'] . '|' . absint( $result_count ) ), 0, 32 ), 46 ); 47 } 48 49 public function register_search( $identity, $term, $result_count, $args, $faq_ids = array() ) { 50 51 $display_hash = hash( 'sha256', $identity . '|' . wp_json_encode( $args ) ); 52 $this->register_context( 53 array( 54 'event' => 'search', 55 'display_hash' => $display_hash, 56 'locale' => determine_locale(), 57 'search_text' => $term, 58 'query_hash' => hash( 'sha256', determine_locale() . '|' . $term ), 59 'result_count' => absint( $result_count ), 60 'faq_ids' => array_slice( array_values( array_unique( array_map( 'absint', $faq_ids ) ) ), 0, 20 ), 61 ) 62 ); 63 } 64 65 public function register_faq( $faq_id, $view ) { 66 67 $faq_id = absint( $faq_id ); 68 69 if ( ! $faq_id ) { 70 return; } 71 72 $display_hash = hash( 'sha256', get_queried_object_id() . '|faq|' . $faq_id ); 73 74 foreach ( array( 'open', 'helpful_yes', 'helpful_no' ) as $event ) { 75 76 $this->register_context( 77 array( 78 'event' => $event, 79 'display_hash' => $display_hash, 80 'locale' => determine_locale(), 81 'faq_id' => $faq_id, 82 'search_text' => ! empty( $view->search_string ) ? $view->search_string : '', 83 'query_hash' => ! empty( $view->search_string ) ? hash( 'sha256', determine_locale() . '|' . $view->search_string ) : '', 84 ) 85 ); 86 } 87 } 88 89 private function register_context( $payload ) { 90 91 if ( count( $this->contexts ) >= 100 ) { 92 return; } 93 94 $token = apply_filters( 'ewd_ufaq_analytics_sign_event_context', '', $payload ); 95 $endpoint = apply_filters( 'ewd_ufaq_analytics_endpoint', '' ); 96 97 if ( ! is_string( $token ) || '' === $token || ! is_string( $endpoint ) || '' === $endpoint ) { 98 return; } 99 100 $storage_key = substr( hash( 'sha256', $payload['event'] . '|' . ( isset( $payload['faq_id'] ) ? absint( $payload['faq_id'] ) : 0 ) . '|' . ( isset( $payload['query_hash'] ) ? $payload['query_hash'] : '' ) . '|' . $payload['display_hash'] ), 0, 32 ); 101 foreach ( $this->contexts as $existing ) { 102 if ( $existing['storage_key'] === $storage_key ) { 103 return; } 104 } 105 106 $this->contexts[] = array( 107 'event' => $payload['event'], 108 'faq_id' => isset( $payload['faq_id'] ) ? absint( $payload['faq_id'] ) : 0, 109 'token' => $token, 110 'storage_key' => $storage_key, 111 ); 112 113 if ( ! $this->assets_enqueued ) { 114 115 wp_enqueue_script( 'ewd-ufaq-analytics', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq-analytics.js', array(), EWD_UFAQ_VERSION, true ); 116 $this->assets_enqueued = true; 117 } 118 } 119 120 public function print_contexts() { 121 122 if ( empty( $this->contexts ) ) { 123 return; } 124 125 wp_add_inline_script( 126 'ewd-ufaq-analytics', 127 'window.ewdUfaqAnalytics=' . wp_json_encode( 128 array( 129 'endpoint' => apply_filters( 'ewd_ufaq_analytics_endpoint', '' ), 130 'contexts' => $this->contexts, 131 ) 132 ) . ';', 133 'before' 134 ); 135 } 2 /** Compatibility facade. Core render/search events do not collect analytics in Free. */ 3 if ( ! defined( 'ABSPATH' ) ) { exit; } 4 class ewdufaqAnalyticsBridge { 5 public function __construct() {} 6 public function advanced_search_context( $context, $term, $count, $args ) { 7 return class_exists( 'ewdufaqEWDPHAnalyticsBridge', false ) ? ewdufaqEWDPHAnalyticsBridge::instance()->advanced_search_context( $context, $term, $count, $args ) : $context; 8 } 9 public function register_search( $identity, $term, $count, $args, $ids = array() ) { 10 if ( class_exists( 'ewdufaqEWDPHAnalyticsBridge', false ) ) { ewdufaqEWDPHAnalyticsBridge::instance()->register_search( $identity, $term, $count, $args, $ids ); } 11 } 12 public function register_faq( $id, $view ) { 13 if ( class_exists( 'ewdufaqEWDPHAnalyticsBridge', false ) ) { ewdufaqEWDPHAnalyticsBridge::instance()->register_faq( $id, $view ); } 14 } 15 public function print_contexts() { 16 if ( class_exists( 'ewdufaqEWDPHAnalyticsBridge', false ) ) { ewdufaqEWDPHAnalyticsBridge::instance()->print_contexts(); } 136 17 } 137 18 } -
ultimate-faqs/tags/2.7.0/includes/Blocks.class.php
r3744649 r3821169 131 131 wp_enqueue_style( 'ewd-ufaq-css' ); 132 132 wp_enqueue_style( 'ewd-ufaq-blocks-css' ); 133 wp_enqueue_style( 'ewd-ufaq-rrssb' ); 134 wp_enqueue_style( 'ewd-ufaq-jquery-ui' ); 135 if ( 'minimalist' === $ewd_ufaq_controller->settings->get_setting( 'display-style' ) ) { 136 wp_enqueue_style( 'ewd-ufaq-minimalist' ); 133 $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null; 134 if ( $screen && ( $screen->is_block_editor() || 'widgets' === $screen->id ) ) { 135 wp_enqueue_script( 'ewd-ufaq-js' ); 136 $args = array( 'nonce' => wp_create_nonce( 'ewd-ufaq-js' ), 'faq_accordion' => $ewd_ufaq_controller->settings->get_setting( 'faq-accordion' ), 'category_accordion' => $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ), 'faq_scroll' => false ); 137 wp_add_inline_script( 'ewd-ufaq-js', 'window.ajaxurl=' . wp_json_encode( admin_url( 'admin-ajax.php' ) ) . ';window.ewd_ufaq_php_data=' . wp_json_encode( apply_filters( 'ewd_ufaq_js_localize_data', $args, null ) ) . ';', 'before' ); 137 138 } 138 139 } -
ultimate-faqs/tags/2.7.0/includes/CustomPostTypes.class.php
r3704732 r3821169 37 37 38 38 // Possibly notify FAQ submitted if user-submitted 39 add_action( 'pre_post_update', array( $this, 'maybe_notify_author_on_update' ), 10, 2 );40 39 41 40 // Sort taxonomy tables by custom ordering, if no other ordering set … … 215 214 $faq_author = $faq_author ? $faq_author : $user->display_name; 216 215 217 218 $up_votes = get_post_meta( $post->ID, 'FAQ_Up_Votes', true );219 $down_votes = get_post_meta( $post->ID, 'FAQ_Down_Votes', true );220 221 216 ?> 222 217 … … 230 225 </div> 231 226 232 <?php if ( $ewd_ufaq_controller->settings->get_setting( 'faq-ratings' ) ) { ?> 233 234 <div class='ewd-ufaq-meta-field'> 235 <label class='ewd-ufaq-meta-label' for='review_karma'> 236 <?php _e( 'Up Votes:', 'ultimate-faqs' ); ?> 237 </label> 238 <input type='text' id='ewd-ufaq-review-karma' name='up_votes' value='<?php echo esc_attr( $up_votes ); ?>' size='25' /> 239 <label class='ewd-ufaq-meta-label' for='review_karma'> 240 <?php _e( 'Down Votes:', 'ultimate-faqs' ); ?> 241 </label> 242 <input type='text' id='ewd-ufaq-review-karma' name='down_votes' value='<?php echo esc_attr( $down_votes ); ?>' size='25' /> 243 </div> 244 245 <?php } ?> 246 247 <?php $custom_fields = ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); ?> 248 249 <?php foreach ( $custom_fields as $faq_field ) { ?> 250 251 <?php $field_value = get_post_meta( $post->ID, "Custom_Field_" . $faq_field->id, true ); ?> 252 253 <div class='ewd-ufaq-meta-field'> 254 <label class='ewd-ufaq-score-label' for='<?php echo esc_attr( $faq_field->name ); ?>'> 255 <?php echo esc_html( $faq_field->name ) ?> 256 </label> 257 258 <?php $options = explode( ',', $faq_field->options ); ?> 259 260 <?php if ( $faq_field->type == 'textarea' ) { ?> 261 262 <textarea id='ewd-ufaq-<?php echo esc_attr( $faq_field->name ); ?>' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>'> 263 <?php echo esc_html( $field_value ); ?> 264 </textarea> 265 266 <?php } elseif ( $faq_field->type == 'select' ) { ?> 267 <?php if ( ! empty( $options ) ) { ?> 268 269 <select name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>'> 270 <?php foreach ( $options as $option ) { ?> 271 272 <option value='<?php echo esc_attr( $option ); ?>' <?php echo ( $option == $field_value ? 'selected' : '' ); ?> > 273 <?php echo esc_html( $option ); ?> 274 </option> 275 <?php } ?> 276 </select> 277 278 <?php } ?> 279 <?php } elseif ( $faq_field->type == 'checkbox' ) { ?> 280 <?php $field_value = is_array( $field_value ) ? $field_value : array(); ?> 281 <?php if ( ! empty( $options ) ) { ?> 282 283 <div class='ewd-ufaq-fields-page-radio-checkbox-container'> 284 <?php foreach ( $options as $option ) { ?> 285 286 <div class='ewd-ufaq-fields-page-radio-checkbox-each'> 287 <input type='checkbox' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>[]' value='<?php echo esc_attr( $option ); ?>' <?php echo ( in_array( $option, $field_value ) ? 'checked' : '' ); ?> /> 288 <?php echo esc_html( $option ); ?> 289 </div> 290 <?php } ?> 291 </div> 292 293 <?php } ?> 294 <?php } elseif ( $faq_field->type == 'radio' ) { ?> 295 <?php if ( ! empty( $options ) ) { ?> 296 297 <div class='ewd-ufaq-fields-page-radio-checkbox-container'> 298 <?php foreach ( $options as $option ) { ?> 299 300 <div class='ewd-ufaq-fields-page-radio-checkbox-each'> 301 <input type='radio' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>' value='<?php echo esc_attr( $option ); ?>' <?php echo ( $option == $field_value ? 'checked' : '' ); ?> /> 302 <?php echo esc_html( $option ); ?> 303 </div> 304 <?php } ?> 305 </div> 306 307 <?php } ?> 308 <?php } elseif ( $faq_field->type == 'date' ) { ?> 309 310 <input type='date' class='ewd-ufaq-jquery-datepicker' id='ewd-ufaq-<?php echo esc_attr( $faq_field->name ); ?>' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>' value='<?php echo esc_attr( $field_value ); ?>' /> 311 312 <?php } elseif ( $faq_field->type == 'datetime' ) { ?> 313 314 <input type='datetime-local' id='ewd-ufaq-<?php echo esc_attr( $faq_field->name ); ?>' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>' value='<?php echo esc_attr( $field_value ); ?>' /> 315 316 <?php } elseif ( $faq_field->type == 'file' ) { ?> 317 318 <div class='ewd-ufaq-fields-page-file-preview'> 319 320 <span> 321 <?php _e( 'Current File:', 'ultimate-faqs' ); ?> <?php echo ! empty( $field_value ) ? esc_html( basename( $field_value ) ) : ''; ?> 322 </span> 323 324 </div> 325 326 <input type='file' id='ewd-ufaq-<?php echo esc_attr( $faq_field->name ); ?>' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>' /> 327 328 <?php } else { ?> 329 330 <input type='text' id='ewd-ufaq-<?php echo esc_attr( $faq_field->name ); ?>' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>' value='<?php echo esc_attr( $field_value ); ?>' size='25' /> 331 332 <?php } ?> 333 334 </div> 335 336 <?php 337 } 338 } 227 <?php do_action( 'ewd_ufaq_admin_meta_fields', $post ); 228 } 339 229 340 230 /** … … 357 247 public function save_meta( $post_id ) { 358 248 global $ewd_ufaq_controller; 249 if ( EWD_UFAQ_FAQ_POST_TYPE !== get_post_type( $post_id ) ) { return $post_id; } 359 250 360 251 // Verify nonce … … 376 267 return $post_id; 377 268 } 378 379 if ( ! get_post_meta( $post_id, 'ufaq_order', true ) ) { update_post_meta( $post_id, 'ufaq_order', 9999 ); } 380 381 if ( isset( $_POST['faq_author'] ) ) { update_post_meta( $post_id, 'EWD_UFAQ_Post_Author', sanitize_text_field( $_POST['faq_author'] ) ); } 382 if ( isset( $_POST['up_votes'] ) ) { update_post_meta( $post_id, 'FAQ_Up_Votes', sanitize_text_field( $_POST['up_votes'] ) ); } 383 if ( isset( $_POST['down_votes'] ) ) { update_post_meta( $post_id, 'FAQ_Down_Votes', sanitize_text_field( $_POST['down_votes'] ) ); } 384 385 $custom_fields = ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); 386 387 foreach ( $custom_fields as $faq_field ) { 388 389 $input_name = 'EWD_UFAQ_Custom_Field_' . $faq_field->id; 390 391 if ( $faq_field->type == 'file' ) { 392 393 if ( empty( $_FILES[ $input_name ]['name'] ) ) { continue; } 394 395 $uploaded_file = wp_handle_upload( $_FILES[ $input_name ], array( 'test_form' => false ) ); 396 $field_value = $uploaded_file['url']; 397 } 398 elseif ( $faq_field->type == 'checkbox' ) { 399 400 $field_value = ( isset( $_POST[ $input_name ] ) and is_array( $_POST[ $input_name ] ) ) ? array_map( 'sanitize_text_field', $_POST[ $input_name ] ) : array(); 401 } 402 else { 403 404 $field_value = sanitize_text_field( $_POST[ $input_name ] ); 405 } 406 407 update_post_meta( $post_id, 'Custom_Field_' . $faq_field->id, $field_value ); 408 } 269 if ( isset( $_POST['faq_author'] ) ) { update_post_meta( $post_id, 'EWD_UFAQ_Post_Author', sanitize_text_field( $_POST['faq_author'] ) ); } 270 do_action( 'ewd_ufaq_save_admin_fields', $post_id ); 409 271 } 410 272 … … 613 475 */ 614 476 public function sort_categories_by_order( $clauses, $taxonomies ) { 615 global $wpdb; 616 617 if ( ! in_array( EWD_UFAQ_FAQ_CATEGORY_TAXONOMY, $taxonomies ) ) { return $clauses; } 618 if ( ! empty( $clauses['orderby'] ) and $clauses['orderby'] != 'ORDER BY t.name' ) { return $clauses; } 619 620 $clauses['join'] .= ' INNER JOIN ' . $wpdb->prefix . 'termmeta AS tm ON t.term_id = tm.term_id'; 621 622 $clauses['where'] .= ' AND tm.meta_key = "ufaq_category_order"'; 623 624 $clauses['orderby'] = 'ORDER BY tm.meta_value+0'; 625 626 return $clauses; 477 return class_exists( 'ewdufaqEWDPHOrdering', false ) ? ewdufaqEWDPHOrdering::sort_categories_by_order( $clauses, $taxonomies ) : $clauses; 627 478 } 628 479 … … 632 483 */ 633 484 public function maybe_notify_author_on_update( $post_id, $data ) { 634 global $ewd_ufaq_controller; 635 636 if ( get_post_type( $post_id ) != EWD_UFAQ_FAQ_POST_TYPE ) { return; } 637 638 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'submit-faq-updates' ) ) ) { return; } 639 640 remove_action( 'pre_post_update', array( $this, 'maybe_notify_author_on_update' ) ); 641 642 $post = get_post( $post_id ); 643 644 if ( $ewd_ufaq_controller->settings->get_setting( 'submit-faq-updates' ) == 'first_answer' and ! empty( $post->post_content ) ) { return; } 645 646 $faq = new ewdufaqFAQ(); 647 648 $faq->load_post( $post ); 649 650 $ewd_ufaq_controller->notifications->user_question_updated( $faq ); 485 if ( class_exists( 'ewdufaqEWDPHSubmissionNotifications', false ) ) { return ewdufaqEWDPHSubmissionNotifications::maybe_notify_author_on_update( $post_id, $data ); } 651 486 } 652 487 } -
ultimate-faqs/tags/2.7.0/includes/EditorFAQWorkflow.class.php
r3744649 r3821169 212 212 213 213 $this->send_error( 'create_failed', __( 'WordPress did not publish the new FAQ.', 'ultimate-faqs' ), 500 ); 214 }215 216 if ( false === update_post_meta( $post_id, 'ufaq_order', 9999 ) ) {217 218 wp_delete_post( $post_id, true );219 $this->send_error( 'create_failed', __( 'The new FAQ could not be initialized for display.', 'ultimate-faqs' ), 500 );220 214 } 221 215 -
ultimate-faqs/tags/2.7.0/includes/FAQ.class.php
r3744649 r3821169 67 67 } 68 68 69 if ( get_class( $post ) == 'WP_Post'&& $post->post_type == EWD_UFAQ_FAQ_POST_TYPE ) {69 if ( $post instanceof WP_Post && $post->post_type == EWD_UFAQ_FAQ_POST_TYPE ) { 70 70 $this->load_wp_post( $post ); 71 71 return true; … … 148 148 * @since 2.0.0 149 149 */ 150 public function insert_faq() { 151 global $ewd_ufaq_controller; 152 if ( ! $ewd_ufaq_controller->permissions->check_permission( 'submit-faq' ) ) { 153 return false; 154 } 155 156 // Check if this request has already been processed. If multiple forms 157 // exist on the same page, this prevents a single submission from 158 // being added twice. 159 if ( $this->faq_processed === true ) { 160 return true; 161 } 162 163 $this->faq_processed = true; 164 165 if ( empty( $this->ID ) ) { 166 $action = 'insert'; 167 } else { 168 $action = 'update'; 169 } 170 171 $this->validate_submission(); 172 if ( $this->is_valid_submission() === false ) { 173 return false; 174 } 175 176 if ( $this->insert_post_data() === false ) { 177 return false; 178 } else { 179 $this->faq_inserted = true; 180 } 181 182 do_action( 'ewd_ufaq_' . $action . '_faq', $this ); 183 184 return true; 150 public function insert_faq() { 151 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::insert_faq( $this ) : false; 185 152 } 186 153 … … 189 156 * @since 2.0.0 190 157 */ 191 public function validate_submission() { 192 global $ewd_ufaq_controller; 193 194 $this->validation_errors = array(); 195 196 // NONCE Validation 197 if ( ! isset( $_POST['ewd_ufaq_nonce'] ) || ! wp_verify_nonce( $_POST['ewd_ufaq_nonce'], 'ewd_ufaq_nonce_value' ) ) { 198 199 $this->validation_errors[] = array( 200 'field' => 'nonce', 201 'error_msg' => 'Invalid Nonce', 202 'message' => __( 'Please refresh the page and try submitting again.', 'ultimate-faqs' ), 203 ); 204 205 return false; // End early if nonce validation fails 206 } 207 208 // USER-SUBMITTED FLAG 209 if ( isset( $_POST['user_submitted'] ) and ! empty( $_POST['user_submitted'] ) ) { 210 211 $this->user_submitted = true; 212 } 213 214 // CAPTCHA 215 if ( $ewd_ufaq_controller->settings->get_setting( 'submit-question-captcha' ) ) { 216 217 $modified_code = intval( $_POST['ewd_ufaq_modified_captcha'] ); 218 $user_code = intval( $_POST['ewd_ufaq_captcha'] ); 219 220 if ( empty( $user_code ) ) { 221 222 $this->validation_errors[] = array( 223 'field' => 'captcha', 224 'error_msg' => 'Captcha incorrect', 225 'message' => $ewd_ufaq_controller->settings->get_setting( 'label-captcha-empty' ), 226 ); 227 } 228 elseif ( $user_code != $this->decrypt_modified_code( $modified_code ) ) { 229 230 $this->validation_errors[] = array( 231 'field' => 'captcha', 232 'error_msg' => 'Captcha incorrect', 233 'message' => $ewd_ufaq_controller->settings->get_setting( 'label-captcha-incorrect' ), 234 ); 235 } 236 } 237 238 // QUESTION 239 $this->question = empty( $_POST['faq_question'] ) ? false : sanitize_text_field( $_POST['faq_question'] ); 240 241 if ( ! $this->question ) { 242 243 $this->validation_errors[] = array( 244 'field' => 'faq_question', 245 'error_msg' => 'Question is blank', 246 'message' => $ewd_ufaq_controller->settings->get_setting( 'label-no-question-title-entered' ), 247 ); 248 } 249 250 // AUTHOR 251 $this->faq_author = empty( $_POST['post_author'] ) ? false : sanitize_text_field( $_POST['post_author'] ); 252 253 // AUTHOR EMAIL 254 $this->faq_author_email = empty( $_POST['post_author_email'] ) ? false : sanitize_email( $_POST['post_author_email'] ); 255 256 // ANSWER 257 if ( $ewd_ufaq_controller->settings->get_setting( 'allow-proposed-answer' ) ) { 258 259 $this->answer = empty( $_POST['faq_answer'] ) ? false : sanitize_textarea_field( $_POST['faq_answer'] ); 260 } 261 262 // CATEGORY 263 if ( $ewd_ufaq_controller->settings->get_setting( 'submitted-default-category' ) ) { 264 265 $args = array( 266 'taxonomy' => EWD_UFAQ_FAQ_CATEGORY_TAXONOMY, 267 'hide_empty' => false, 268 'slug' => $ewd_ufaq_controller->settings->get_setting( 'submitted-default-category' ) 269 ); 270 271 $this->categories = get_terms( $args ); 272 } 273 274 // CUSTOM FIELDS 275 $custom_fields = ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); 276 277 foreach ( $custom_fields as $custom_field ) { 278 279 if ( ! $custom_field->id ) { continue; } 280 281 $input_name = 'ewd_ufaq_custom_field_' . $custom_field->id; 282 283 if ( $custom_field->type == 'checkbox' ) { 284 285 $checkbox_values = ( empty( $_POST[ $input_name ] ) or ! is_array( $_POST[ $input_name ] ) ) ? array() : $_POST[ $input_name ]; 286 287 $this->custom_fields[ $custom_field->id ] = array_map( 'sanitize_text_field', $checkbox_values ); 288 } 289 else { $this->custom_fields[ $custom_field->id ] = empty( $_POST[ $input_name ] ) ? false : sanitize_text_field( $_POST[ $input_name ] ); } 290 } 291 292 $this->post_status = 'draft'; 293 294 do_action( 'ewd_ufaq_validate_faq_submission', $this ); 158 public function validate_submission() { 159 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::validate_submission( $this ) : false; 295 160 } 296 161 … … 299 164 * @since 2.0.0 300 165 */ 301 public function decrypt_modified_code( $user_code ) { 302 303 $decrypted_code = ($user_code / 3) - 5; 304 305 return $decrypted_code; 166 public function decrypt_modified_code( $user_code ) { 167 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::decrypt_modified_code( $this, $user_code ) : false; 306 168 } 307 169 … … 311 173 * @since 2.0.0 312 174 */ 313 public function is_valid_submission() { 314 315 if ( !count( $this->validation_errors ) ) { 316 return true; 317 } 318 319 return false; 175 public function is_valid_submission() { 176 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::is_valid_submission( $this ) : false; 320 177 } 321 178 … … 324 181 * @since 2.0.0 325 182 */ 326 public function insert_post_data() { 327 global $ewd_ufaq_controller; 328 if ( ! $ewd_ufaq_controller->permissions->check_permission( 'submit-faq' ) ) { 329 return false; 330 } 331 332 $args = array( 333 'post_type' => EWD_UFAQ_FAQ_POST_TYPE, 334 'post_title' => $this->question, 335 'post_content' => ! empty( $this->answer ) ? $this->answer : '', 336 'post_status' => $this->post_status, 337 ); 338 339 if ( ! empty( $this->ID ) ) { 340 $args['ID'] = $this->ID; 341 } 342 343 $args = apply_filters( 'ewd_ufaq_insert_faq_data', $args, $this ); 344 345 // When updating a FAQ, we need to update the metadata first, so that 346 // notifications hooked to the status changes go out with the new metadata. 347 // If we're inserting a new FAQ, we have to insert it before we can 348 // add metadata, and the default notifications don't fire until it's all done. 349 if ( ! empty( $this->ID ) ) { 350 351 $this->insert_post_meta(); 352 $this->insert_post_categories(); 353 $id = wp_insert_post( $args ); 354 } else { 355 356 $id = wp_insert_post( $args ); 357 if ( $id && ! is_wp_error( $id ) ) { 358 $this->ID = $id; 359 $this->insert_post_meta(); 360 $this->insert_post_categories(); 361 362 $this->clear_post_submission(); 363 } 364 } 365 366 return ! is_wp_error( $id ) && $id !== false; 183 public function insert_post_data() { 184 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::insert_post_data( $this ) : false; 367 185 } 368 186 … … 371 189 * @since 2.0.0 372 190 */ 373 public function insert_post_meta() { 374 global $ewd_ufaq_controller; 375 376 $meta = array(); 377 378 if ( ! empty( $this->faq_author ) ) { 379 380 update_post_meta( $this->ID, 'EWD_UFAQ_Post_Author', $this->faq_author ); 381 } 382 383 if ( ! empty( $this->faq_author_email ) ) { 384 385 update_post_meta( $this->ID, 'EWD_UFAQ_Post_Author_Email', $this->faq_author_email ); 386 } 387 388 $custom_fields = ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); 389 390 foreach ( $custom_fields as $custom_field ) { 391 392 if ( ! empty( $this->custom_fields[ $custom_field->id ] ) ) { 393 394 update_post_meta( $this->ID, 'Custom_Field_' . $custom_field->id, $this->custom_fields[ $custom_field->id ] ); 395 } 396 } 191 public function insert_post_meta() { 192 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::insert_post_meta( $this ) : false; 397 193 } 398 194 … … 401 197 * @since 2.0.0 402 198 */ 403 public function insert_post_categories() { 404 405 if ( empty( $this->categories ) or ! is_array( $this->categories ) ) { return; } 406 407 $submit_categories = array(); 408 foreach ( $this->categories as $category ) { $submit_categories[] = $category->term_id; } 409 410 wp_set_object_terms( $this->ID, $submit_categories, EWD_UFAQ_FAQ_CATEGORY_TAXONOMY ); 199 public function insert_post_categories() { 200 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::insert_post_categories( $this ) : false; 411 201 } 412 202 … … 415 205 * @since 2.0.0 416 206 */ 417 public function clear_post_submission() { 418 global $ewd_ufaq_controller; 419 420 unset( $_POST['faq_question'] ); 421 unset( $_POST['faq_answer'] ); 422 unset( $_POST['post_author'] ); 423 unset( $_POST['post_author_email'] ); 424 425 $custom_fields = ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); 426 427 foreach ( $custom_fields as $custom_field ) { 428 429 unset( $_POST[ 'ewd_ufaq_custom_field_' . $custom_field->id ] ); 430 } 207 public function clear_post_submission() { 208 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::clear_post_submission( $this ) : null; 431 209 } 432 210 -
ultimate-faqs/tags/2.7.0/includes/HelperCompatibility.class.php
r3744649 r3821169 18 18 add_action( 'plugins_loaded', array( $this, 'refresh' ), 100 ); 19 19 add_action( 'admin_notices', array( $this, 'display_admin_notice' ) ); 20 add_action( 'admin_notices', array( $this, 'display_obsolete_package_notice' ) ); 20 21 21 22 $this->refresh(); 23 } 24 /** Detect known remnants only; never execute or automatically delete customer files. */ 25 public function display_obsolete_package_notice() { 26 if ( ! current_user_can( 'manage_options' ) || ! function_exists( 'get_current_screen' ) ) { return; } 27 $screen = get_current_screen(); 28 if ( ! $screen || ( 'plugins' !== $screen->id && EWD_UFAQ_FAQ_POST_TYPE !== $screen->post_type && false === strpos( $screen->id, 'ewd-ufaq' ) ) ) { return; } 29 foreach ( array( 'includes/WooCommerce.class.php', 'includes/WPForms.class.php', 'includes/OrderingTable.class.php', 'views/View.SubmitFAQ.class.php', 'lib/PHPSpreadsheet/vendor/autoload.php', 'lib/FPDF/fpdf.php', 'assets/js/ewd-ufaq-analytics.js', 'assets/js/ewd-ufaq-wc-admin.js', 'assets/css/ewd-ufaq-minimalist.css', 'assets/css/jquery-ui.min.css', 'ewd-ufaq-templates/faq-ratings.php', 'ewd-ufaq-templates/submit-faq.php' ) as $file ) { 30 if ( is_file( EWD_UFAQ_PLUGIN_DIR . '/' . $file ) ) { 31 echo '<div class="notice notice-warning"><p>' . esc_html__( 'Ultimate FAQs contains obsolete files from an earlier version. Back up the site, then replace the complete ultimate-faqs plugin directory with the approved release ZIP instead of merging files. Keep uploads and theme overrides. Ask your host to reset its PHP opcode cache if necessary. No files have been deleted automatically.', 'ultimate-faqs' ) . '</p></div>'; 32 return; 33 } 34 } 22 35 } 23 36 … … 86 99 return array( 'state' => 'active_legacy_no_descriptor' ); 87 100 } 101 foreach ( array( 'api_version', 'supported_free_api_min', 'supported_free_api_max', 'entitlement_contract_version' ) as $field ) { 102 if ( ! isset( $helper_descriptor[ $field ] ) || ! is_int( $helper_descriptor[ $field ] ) || $helper_descriptor[ $field ] < 1 ) { 103 return array( 'state' => 'unsupported_entitlement_contract' ); 104 } 105 } 106 if ( ! isset( $helper_descriptor['plugin_version'] ) || ! is_string( $helper_descriptor['plugin_version'] ) 107 || ! preg_match( '/^[0-9]+\.[0-9]+\.[0-9]+(?:[-+][A-Za-z0-9.-]+)?$/', $helper_descriptor['plugin_version'] ) 108 || $helper_descriptor['supported_free_api_min'] > $helper_descriptor['supported_free_api_max'] ) { 109 return array( 'state' => 'unsupported_entitlement_contract' ); 110 } 88 111 89 112 $helper_version = isset( $helper_descriptor['plugin_version'] ) ? $helper_descriptor['plugin_version'] : '0'; -
ultimate-faqs/tags/2.7.0/includes/Notifications.class.php
r3744649 r3821169 13 13 public function __construct() { 14 14 15 add_action( 'ewd_ufaq_insert_faq', array( $this, 'admin_notification_email' ) ); 16 add_action( 'ewd_ufaq_insert_faq', array( $this, 'user_submission_email' ) ); 15 // Public compatibility facade; Helper owns paid mail hooks and implementation. 17 16 } 18 17 … … 22 21 * @since 2.0.0 23 22 */ 24 public function admin_notification_email( $faq ) { 25 global $ewd_ufaq_controller; 26 27 if ( ! $ewd_ufaq_controller->settings->get_setting( 'admin-question-notification' ) ) { return; } 28 29 $admin_emails = $ewd_ufaq_controller->settings->get_setting( 'admin-notification-email' ) ? explode( ',', $ewd_ufaq_controller->settings->get_setting( 'admin-notification-email' ) ) : (array) get_option( 'admin_email' ); 30 31 $faq_link = site_url() . '/wp-admin/post.php?post=' . $faq->ID . '&action=edit'; 32 33 $subject_line = __( 'New Question Received', 'ultimate-faqs' ); 34 35 $message_body = __( 'Hello Admin,', 'ultimate-faqs' ) . '<br/><br/>'; 36 $message_body .= __( 'You\'ve received a new question titled ', 'ultimate-faqs' ) . $faq->question . '.<br/><br/>'; 37 38 if ( ! empty( $faq->answer ) ) { 39 40 $message_body .= __( 'The answer reads:<br>', 'ultimate-faqs' ); 41 $message_body .= esc_html( $faq->answer ) . '<br><br><br>'; 42 } 43 44 $message_body .= __( 'You can view the question in the admin area by going to the following link:<br>', 'ultimate-faqs' ); 45 $message_body .= '<a href=\'' . $faq_link . '\'>' . __( 'See the FAQ', 'ultimate-faqs' ) . '</a><br/><br/>'; 46 $message_body .= __( 'Have a great day,', 'ultimate-faqs' ) . '<br/><br/>'; 47 $message_body .= __( 'Ultimate FAQs Team', 'ultimate-faqs' ); 48 49 $headers = array( 'Content-Type: text/html; charset=UTF-8' ); 50 51 $success = false; 52 foreach ( $admin_emails as $admin_email ) { 53 54 $success = wp_mail( $admin_email, $subject_line, $message_body, $headers ); 55 } 56 57 return $success; 23 public function admin_notification_email( $faq ) { 24 return class_exists( 'ewdufaqEWDPHSubmissionNotifications', false ) ? ewdufaqEWDPHSubmissionNotifications::admin_notification_email( $this, $faq ) : false; 58 25 } 59 26 … … 63 30 * @since 2.0.0 64 31 */ 65 public function user_submission_email( $faq ) { 66 global $ewd_ufaq_controller; 67 68 if ( ! $ewd_ufaq_controller->settings->get_setting( 'submit-faq-email' ) ) { return; } 69 70 $params = array( 71 'email_id' => $ewd_ufaq_controller->settings->get_setting( 'submit-faq-email' ), 72 'email_address' => $faq->faq_author_email, 73 'post_id' => $faq->ID 74 ); 75 76 if ( function_exists( 'ewd_uwpm_send_email' ) ) { 77 78 ewd_uwpm_send_email( $params ); 79 } 80 else { 81 82 $author_emails = $faq->faq_author_email ? explode( ',', $faq->faq_author_email ) : array(); 83 84 $subject_line = apply_filters( 'ewd_ufaq_user_question_submitted_subject_line', __( 'New Question', 'ultimate-faqs' ) ); 85 86 $message_body = __( 'Hello,', 'ultimate-faqs' ) . '<br/><br/>'; 87 $message_body .= sprintf( __( 'Thank you for submitting your FAQ, %s. ', 'ultimate-faqs' ), $faq->question ) . '<br/><br/>'; 88 $message_body .= get_bloginfo( 'name' ); 89 90 $message_body = apply_filters( 'ewd_ufaq_user_question_submitted_message_body', $message_body ); 91 92 $headers = array( 'Content-Type: text/html; charset=UTF-8' ); 93 94 $success = false; 95 foreach ( $author_emails as $author_email ) { 96 97 if ( ! filter_var( $author_email, FILTER_VALIDATE_EMAIL ) ) { continue;} 98 99 $success = wp_mail( $author_email, $subject_line, $message_body, $headers ); 100 } 101 102 return $success; 103 } 32 public function user_submission_email( $faq ) { 33 return class_exists( 'ewdufaqEWDPHSubmissionNotifications', false ) ? ewdufaqEWDPHSubmissionNotifications::user_submission_email( $this, $faq ) : false; 104 34 } 105 35 … … 109 39 * @since 2.4.0 110 40 */ 111 public function user_question_updated( $faq ) { 112 113 $author_emails = $faq->faq_author_email ? explode( ',', $faq->faq_author_email ) : array(); 114 115 $subject_line = apply_filters( 'ewd_ufaq_user_question_answered_subject_line', __( 'New Question Answer', 'ultimate-faqs' ) ); 116 117 $message_body = __( 'Hello,', 'ultimate-faqs' ) . '<br/><br/>'; 118 $message_body .= sprintf( __( 'Your FAQ, %s, has received a new question answer: ', 'ultimate-faqs' ), $faq->question ) . '<br/><br/>' . $faq->answer . '<br/><br/>'; 119 $message_body .= __( 'Thank You,', 'ultimate-faqs' ) . '<br/><br/>'; 120 121 $message_body = apply_filters( 'ewd_ufaq_user_question_answered_message_body', $message_body, $faq ); 122 123 $headers = array( 'Content-Type: text/html; charset=UTF-8' ); 124 125 $success = false; 126 foreach ( $author_emails as $author_email ) { 127 128 if ( ! filter_var( $author_email, FILTER_VALIDATE_EMAIL ) ) { continue;} 129 130 $success = wp_mail( $author_email, $subject_line, $message_body, $headers ); 131 } 132 133 return $success; 41 public function user_question_updated( $faq ) { 42 return class_exists( 'ewdufaqEWDPHSubmissionNotifications', false ) ? ewdufaqEWDPHSubmissionNotifications::user_question_updated( $this, $faq ) : false; 134 43 } 135 44 } -
ultimate-faqs/tags/2.7.0/includes/Permissions.class.php
r3744649 r3821169 125 125 if ( 'faq-order-by' === $setting && 'set_order' === $value ) { 126 126 $capability = 'ordering'; } 127 if ( 'category-order-by' === $setting && 'manual' === $value ) { 128 $capability = 'ordering'; } 127 129 return '' !== $capability && ! $this->check_permission( $capability ) ? $fallback : $value; 128 130 } -
ultimate-faqs/tags/2.7.0/includes/Query.class.php
r3744649 r3821169 56 56 // Max number of pages of faqs matching the query 57 57 public $max_page; 58 private $prepared = false; 58 59 59 60 /** … … 102 103 103 104 $args = $this->args; 104 if ( isset( $args['orderby'] ) && 'set_order' === $args['orderby']105 && ! $ewd_ufaq_controller->permissions->check_permission( 'ordering' ) ) {106 $args['orderby'] = 'title';107 }108 105 109 106 $args['include_children'] = ( ! empty( $args['include_children'] ) and strtolower( $args['include_children'] ) != 'yes' ) ? false : true; … … 115 112 if ( ! empty( $args['faq_page'] ) ) { $args['paged'] = $args['faq_page']; } 116 113 117 if ( ! empty( $args['post__in'] ) ) { $args['post__in'] = is_array( $args['post__in'] ) ? $args['post__in'] : json_decode( str_replace( array( '[', ']' ), array( '[', ']' ) ) ); } 114 if ( ! empty( $args['post__in'] ) && ! is_array( $args['post__in'] ) ) { 115 $decoded_ids = is_string( $args['post__in'] ) ? json_decode( str_replace( array( '[', ']' ), array( '[', ']' ), $args['post__in'] ), true ) : null; 116 $args['post__in'] = is_array( $decoded_ids ) ? array_values( array_filter( array_map( 'absint', array_filter( $decoded_ids, 'is_scalar' ) ) ) ) : array(); 117 } 118 118 119 119 $explicit_post_ids = ! empty( $args['post__in_string'] ) … … 225 225 if ( empty( $explicit_post_ids ) && ! empty( $args['orderby'] ) ) { 226 226 227 if ( $args['orderby'] == ' rating' or $args['orderby'] == 'popular' ) { $orderby['meta_value_num'] = $args['order']; }227 if ( $args['orderby'] == 'popular' ) { $orderby['meta_value_num'] = $args['order']; } 228 228 elseif ( $args['orderby'] == 'date' ) { $orderby['date'] = $args['order']; } 229 229 elseif ( $args['orderby'] == 'title' ) { $orderby['title'] = $args['order']; } 230 elseif ( $args['orderby'] == 'set_order' ) { $orderby['meta_value_num'] = $args['order']; } 231 } 232 233 if ( empty( $explicit_post_ids ) && $args['orderby'] == 'rating' ) { $args['meta_key'] = 'FAQ_Total_Score'; } 234 elseif ( empty( $explicit_post_ids ) && $args['orderby'] == 'popular' ) { $args['meta_key'] = 'ufaq_view_count'; } 235 elseif ( empty( $explicit_post_ids ) && 'set_order' === $args['orderby'] ) { 236 // Manual ordering must not filter out reusable FAQs which have no rank. 237 $manual_order_query = array( 238 'relation' => 'OR', 239 'ufaq_manual_order' => array( 240 'key' => 'ufaq_order', 241 'compare' => 'EXISTS', 242 'type' => 'NUMERIC', 243 ), 244 'ufaq_unordered' => array( 245 'key' => 'ufaq_order', 246 'compare' => 'NOT EXISTS', 247 ), 248 ); 249 $args['meta_query'] = empty( $args['meta_query'] ) 250 ? $manual_order_query 251 : array( 252 'relation' => 'AND', 253 $args['meta_query'], 254 $manual_order_query, 255 ); 256 unset( $args['meta_key'], $orderby['meta_value_num'] ); 257 $orderby['ufaq_manual_order'] = $args['order']; 258 $orderby['ID'] = $args['order']; 259 } 230 } 231 232 if ( empty( $explicit_post_ids ) && isset( $args['orderby'] ) && $args['orderby'] == 'popular' ) { $args['meta_key'] = 'ufaq_view_count'; } 260 233 261 234 if ( empty( $explicit_post_ids ) && ! empty( $orderby ) ) { $args['orderby'] = $orderby; } 262 235 236 $args = apply_filters( 'ewd_ufaq_query_args', $args, $this->context, $this ); 237 if ( isset( $args['orderby'] ) && in_array( $args['orderby'], array( 'set_order', 'rating' ), true ) ) { $args['orderby'] = array( 'title' => $args['order'] ); } 263 238 $this->args = $args; 239 $this->prepared = true; 264 240 265 241 return $this->args; … … 275 251 $args = array(); 276 252 277 if ( isset( $_REQUEST['faq_page'] ) ) {253 if ( isset( $_REQUEST['faq_page'] ) && is_scalar( $_REQUEST['faq_page'] ) ) { 278 254 279 255 $args['faq_page'] = intval( $_REQUEST['faq_page'] ); 280 256 } 281 257 282 if ( isset( $_REQUEST['search_string'] ) ) {283 284 $args['search_string'] = sanitize_text_field( stripslashes( $_REQUEST['search_string'] ) );285 } 286 287 if ( isset( $_REQUEST['post_count'] ) ) {258 if ( isset( $_REQUEST['search_string'] ) && is_scalar( $_REQUEST['search_string'] ) ) { 259 260 $args['search_string'] = sanitize_text_field( stripslashes( (string) $_REQUEST['search_string'] ) ); 261 } 262 263 if ( isset( $_REQUEST['post_count'] ) && is_scalar( $_REQUEST['post_count'] ) ) { 288 264 289 265 $args['post_count'] = sanitize_text_field( $_REQUEST['post_count'] ); 290 266 } 291 267 292 if ( isset( $_REQUEST['orderby'] ) ) {268 if ( isset( $_REQUEST['orderby'] ) && is_scalar( $_REQUEST['orderby'] ) ) { 293 269 294 270 $args['orderby'] = sanitize_text_field( $_REQUEST['orderby'] ); 295 271 } 296 272 297 if ( isset( $_REQUEST['order'] ) ) {273 if ( isset( $_REQUEST['order'] ) && is_scalar( $_REQUEST['order'] ) ) { 298 274 299 275 $args['order'] = sanitize_text_field( $_REQUEST['order'] ); 300 276 } 301 277 302 if ( isset( $_REQUEST['include_category'] ) ) {278 if ( isset( $_REQUEST['include_category'] ) && is_scalar( $_REQUEST['include_category'] ) ) { 303 279 304 280 $args['include_category'] = sanitize_text_field( $_REQUEST['include_category'] ); 305 281 } 306 282 307 if ( isset( $_REQUEST['exclude_category'] ) ) {283 if ( isset( $_REQUEST['exclude_category'] ) && is_scalar( $_REQUEST['exclude_category'] ) ) { 308 284 309 285 $args['exclude_category'] = sanitize_text_field( $_REQUEST['exclude_category'] ); … … 315 291 } 316 292 317 if ( isset( $_REQUEST['include_tag'] ) ) {293 if ( isset( $_REQUEST['include_tag'] ) && is_scalar( $_REQUEST['include_tag'] ) ) { 318 294 319 295 $args['include_tag'] = sanitize_text_field( $_REQUEST['include_tag'] ); … … 326 302 327 303 $this->args = array_merge( $this->args, $args ); 304 $this->prepared = false; 328 305 } 329 306 … … 337 314 $faqs = array(); 338 315 339 $args = apply_filters( 'ewd_ufaq_query_args', $this->args, $this->context );316 $args = $this->prepared ? $this->args : $this->prepare_args(); 340 317 341 318 $query = new WP_Query( $args ); -
ultimate-faqs/tags/2.7.0/includes/Settings.class.php
r3744649 r3821169 96 96 $raw = ! empty( $this->settings ) ? $this->settings : get_option( 'ewd-ufaq-settings', array() ); 97 97 if ( 'faq-order-by' === $setting && isset( $raw[ $setting ] ) && 'set_order' === $raw[ $setting ] ) { 98 $required = 'ordering'; 99 } 100 if ( 'category-order-by' === $setting && isset( $raw[ $setting ] ) && 'manual' === $raw[ $setting ] ) { 98 101 $required = 'ordering'; 99 102 } -
ultimate-faqs/tags/2.7.0/includes/template-functions.php
r3704732 r3821169 121 121 return ewdufaqBasicSearch::render( $args ); 122 122 } 123 124 $query = new ewdufaqQuery( $args ); 125 $query->parse_request_args(); 126 $query->prepare_args(); 127 128 // Render faqs 129 ewd_ufaq_load_view_files(); 130 131 $faqs = new ewdufaqViewFAQSearch( $args ); 132 133 $faqs->set_faqs( $query->get_faqs() ); 134 135 $ewd_ufaq_controller->shortcode_printing = true; 136 137 $output = $faqs->render(); 138 139 $ewd_ufaq_controller->shortcode_printing = false; 140 141 return $output; 123 return class_exists( 'ewdufaqEWDPHSearch', false ) ? ewdufaqEWDPHSearch::shortcode( $args ) : ewdufaqBasicSearch::render( $args ); 142 124 } 143 125 add_shortcode( 'ultimate-faq-search', 'ewd_ufaq_search_faqs_shortcode' ); … … 166 148 $args = shortcode_atts( $submit_faq_atts, $atts ); 167 149 168 // Handle FAQ submission 169 if ( isset( $_POST['submit_question'] ) ) { 170 171 $args['faq_submitted'] = true; 172 173 $faq = new ewdufaqFAQ(); 174 $success = $faq->insert_faq(); 175 176 if ( $success ) { 177 178 $args['update_message'] = ! empty( $args['success_message'] ) ? $args['success_message'] : $ewd_ufaq_controller->settings->get_setting( 'label-thank-you-submit' ); 179 } 180 else { 181 182 $args['update_message'] = ''; 183 184 foreach ( $faq->validation_errors as $validation_error ) { 185 186 $args['update_message'] .= '<br />' . $validation_error['message']; 187 } 188 } 189 } 190 191 // Render faq 192 ewd_ufaq_load_view_files(); 193 194 $submit_faq = new ewdufaqViewSubmitFAQ( $args ); 195 196 $ewd_ufaq_controller->shortcode_printing = true; 197 198 $output = $submit_faq->render(); 199 200 $ewd_ufaq_controller->shortcode_printing = false; 201 202 return $output; 150 return apply_filters( 'ewd_ufaq_submit_output', '', $args ); 203 151 } 204 152 add_shortcode( 'submit-question', 'ewd_ufaq_submit_faq_shortcode' ); … … 339 287 function ewd_ufaq_validate_captcha() { 340 288 341 $modifiedcode = intval( $_POST['ewd_ufaq_modified_captcha'] ); 342 $usercode = intval( $_POST['ewd_ufaq_captcha'] ); 343 344 $code = ewd_ufaq_decrypt_catpcha_code( $modifiedcode ); 345 346 $validate_captcha = $code == $usercode ? 'Yes' : 'No'; 347 348 return $validate_captcha; 289 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::validate_captcha() : 'No'; 349 290 } 350 291 } … … 353 294 function ewd_ufaq_encrypt_captcha_code( $code ) { 354 295 355 $modifiedcode = ($code + 5) * 3; 356 357 return $modifiedcode; 358 } 359 } 360 361 if ( ! function_exists( 'ewd_ufaq_encrypt_captcha_code' ) ) { 296 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::encrypt_captcha( $code ) : false; 297 } 298 } 299 300 if ( ! function_exists( 'ewd_ufaq_decrypt_catpcha_code' ) ) { 362 301 function ewd_ufaq_decrypt_catpcha_code( $modifiedcode ) { 363 302 364 $code = ($modifiedcode / 3) - 5; 365 366 return $code; 303 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::decrypt_captcha( $modifiedcode ) : false; 367 304 } 368 305 } -
ultimate-faqs/tags/2.7.0/readme.txt
r3744649 r3821169 4 4 Requires at least: 6.0 5 5 Tested up to: 7.1 6 Stable tag: 2. 6.06 Stable tag: 2.7.0 7 7 Requires PHP: 7.4 8 8 License: GPLv3 … … 240 240 == Changelog == 241 241 242 = 2.6.0 (2026-10-12) = 243 - Added the ability to assign FAQ categories when creating FAQs directly in the Display FAQs block. 244 - Added a separate "Move FAQ to Trash" action in the block editor, distinct from removing an FAQ from a page. 245 - Improved FAQ library management and selection for sites with larger numbers of FAQs. 246 - Improved validation, reliability, and error handling for FAQ import/export operations. 247 - Updated Premium license validation and entitlement handling, including improved license status, recovery, and compatibility checks. 248 - Improved preservation of existing FAQ content and settings when Premium access is unavailable. 249 250 = 2.5.0 (2026-09-20) = 251 - <strong>This is a major update with many changes, including some big changes. We suggest testing this update in a staging environment before updating your live environment. Or wait a few days before updating in the event that an issue is identified that requires a fix/new update.</strong> 252 - Added the ability to create and manage FAQs directly in the Display FAQs block. 253 - Added new local analytics functionality that can identify content gaps and use AI to suggest or automatically generate new FAQs to fill the gaps. You need to specify an AI provider in WP Settings > Connectors for this to work. 254 - Updated the search functionality available in the free version. 255 - Hardened public counters and AI Assist privacy, validation, and error handling. 256 - Updated the bundled PhpSpreadsheet runtime to the PHP 7.4-compatible 1.30.6 security release and hardened CSV/XLS/XLSX imports. 242 = 2.7.0 (2026-11-24) = 243 - **If you are using the premium version, please make sure to also update the EWD Premium Helper plugin to version 0.3.1 at the same time.** 244 - Several updates have been made to separate and streamline the functionality of the premium version via the EWD Premium Helper plugin. 245 - The FAQ order table has been revamped to allow for setting an order number and to allow ordering of categories. 246 - WooCommerce FAQ selection: Added paged search and category browsing for large libraries. 247 - TranslatePress compatibility: Prevent language prefixes from incorrectly changing the licensed site identity. 257 248 258 249 [See changelog for all versions](https://www.etoilewebdesign.com/changelogs/ultimate-faqs.txt). … … 260 251 == Upgrade Notice == 261 252 262 = 2. 6.0 =263 This update includes changes to the functionality that lets you create FAQs directly in the block, as well as to the interaction between this plugin and the Premium Helper. If you make use of this functionality in the block or your site uses the Premium Helper, we recommend testing the update on a staging site before updating your production site.253 = 2.7.0 = 254 Several updates have been made to separate and streamline the functionality of the premium version via the EWD Premium Helper plugin. If you are using the premium version, please make sure to also update the EWD Premium Helper plugin to version 0.3.1 at the same time. -
ultimate-faqs/tags/2.7.0/ultimate-faqs.php
r3744649 r3821169 4 4 * Plugin URI: https://www.etoilewebdesign.com/plugins/ultimate-faq/ 5 5 * Description: Full-featured FAQ and accordion plugin with advanced search, simple UI and easy-to-use Gutenberg blocks and shortcodes. 6 * Version: 2. 6.06 * Version: 2.7.0 7 7 * Author: Etoile Web Design 8 8 * Author URI: https://www.etoilewebdesign.com/ … … 14 14 * Requires PHP: 7.4 15 15 * WC requires at least: 7.1 16 * WC tested up to: 11. 216 * WC tested up to: 11.3 17 17 */ 18 18 … … 67 67 define( 'EWD_UFAQ_PLUGIN_FNAME', plugin_basename( __FILE__ ) ); 68 68 define( 'EWD_UFAQ_TEMPLATE_DIR', 'ewd-ufaq-templates' ); 69 define( 'EWD_UFAQ_VERSION', '2. 6.0' );70 define( 'EWD_UFAQ_HELPER_API_VERSION', 2);71 define( 'EWD_UFAQ_MIN_HELPER_VERSION', '0. 2.0' );72 define( 'EWD_UFAQ_MAX_HELPER_API_VERSION', 2);69 define( 'EWD_UFAQ_VERSION', '2.7.0' ); 70 define( 'EWD_UFAQ_HELPER_API_VERSION', 3 ); 71 define( 'EWD_UFAQ_MIN_HELPER_VERSION', '0.3.0' ); 72 define( 'EWD_UFAQ_MAX_HELPER_API_VERSION', 3 ); 73 73 define( 'EWD_UFAQ_ENTITLEMENT_CONTRACT_VERSION', 1 ); 74 74 define( 'EWD_UFAQ_FAQ_POST_TYPE', 'ufaq' ); … … 102 102 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/InstallationWalkthrough.class.php' ); 103 103 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Notifications.class.php' ); 104 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/OrderingTable.class.php' );105 104 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Permissions.class.php' ); 106 105 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Query.class.php' ); 106 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/RetainedData.class.php' ); 107 107 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/ReviewAsk.class.php' ); 108 108 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Settings.class.php' ); … … 111 111 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Upgrades.class.php' ); 112 112 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Widgets.class.php' ); 113 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/WooCommerce.class.php' );114 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/WPForms.class.php' );115 113 } 116 114 … … 133 131 $this->permissions = new ewdufaqPermissions(); 134 132 $this->settings = new ewdufaqSettings(); 133 ewdufaqRetainedData::instance(); 135 134 $this->helper_compatibility = new ewdufaqHelperCompatibility(); 136 135 // Register adapters regardless of initial entitlement; check at execution time. 137 $this->woocommerce = new ewdufaqWooCommerce();138 $this->wpforms = new ewdufaqWPForms();139 136 140 137 new ewdufaqAJAX(); … … 144 141 new ewdufaqEditorFAQWorkflow(); 145 142 if ( function_exists( 'register_block_pattern' ) ) { new ewdufaqPatterns(); } 146 new ewdufaqOrderingTable();147 143 new ewdufaqUltimateWPMail(); 148 144 new ewdufaqUpgrades(); … … 353 349 wp_enqueue_script( 'jquery-ui-sortable' ); 354 350 355 wp_register_script( 'ewd-ufaq-admin-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq-admin.js', array( 'jquery' , 'jquery-ui-sortable'), EWD_UFAQ_VERSION, true );351 wp_register_script( 'ewd-ufaq-admin-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq-admin.js', array( 'jquery' ), EWD_UFAQ_VERSION, true ); 356 352 357 353 $args = array( … … 371 367 public function register_assets() { 372 368 373 wp_register_style( 'ewd-ufaq-rrssb', EWD_UFAQ_PLUGIN_URL . '/assets/css/rrssb-min.css', array(), EWD_UFAQ_VERSION );374 wp_register_style( 'ewd-ufaq-jquery-ui', EWD_UFAQ_PLUGIN_URL . '/assets/css/jquery-ui.min.css', array(), EWD_UFAQ_VERSION );375 376 369 wp_register_style( 'ewd-ufaq-css', EWD_UFAQ_PLUGIN_URL . '/assets/css/ewd-ufaq.css', array(), EWD_UFAQ_VERSION ); 377 wp_register_style( 'ewd-ufaq-minimalist', EWD_UFAQ_PLUGIN_URL . '/assets/css/ewd-ufaq-minimalist.css', array(), EWD_UFAQ_VERSION );378 370 379 371 wp_register_script( 'ewd-ufaq-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq.js', array( 'jquery', 'jquery-ui-core' ), EWD_UFAQ_VERSION, true ); -
ultimate-faqs/tags/2.7.0/views/Base.class.php
r2510277 r3821169 12 12 require_once( EWD_UFAQ_PLUGIN_DIR . '/views/View.FAQs.class.php' ); 13 13 require_once( EWD_UFAQ_PLUGIN_DIR . '/views/View.FAQSearch.class.php' ); 14 require_once( EWD_UFAQ_PLUGIN_DIR . '/views/View.SubmitFAQ.class.php' );15 14 16 15 class ewdufaqBase { -
ultimate-faqs/tags/2.7.0/views/View.FAQ.class.php
r3704732 r3821169 218 218 * @since 2.0.0 219 219 */ 220 public function maybe_print_custom_fields() { 221 global $ewd_ufaq_controller; 222 223 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ) ) { return; } 224 225 $template = $this->find_template( 'faq-custom-fields' ); 226 227 if ( $template ) { 228 include( $template ); 229 } 220 public function maybe_print_custom_fields() { 221 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'maybe_print_custom_fields', $this ); 230 222 } 231 223 … … 269 261 * @since 2.0.0 270 262 */ 271 public function maybe_print_ratings() { 272 global $ewd_ufaq_controller; 273 274 if ( ! $ewd_ufaq_controller->settings->get_setting( 'faq-ratings' ) ) { return; } 275 276 $template = $this->find_template( 'faq-ratings' ); 277 278 if ( $template ) { 279 include( $template ); 280 } 263 public function maybe_print_ratings() { 264 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'maybe_print_ratings', $this ); 281 265 } 282 266 … … 289 273 * @since 2.0.0 290 274 */ 291 public function maybe_print_social_media() { 292 global $ewd_ufaq_controller; 293 294 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { return; } 295 296 if ( ! is_array( $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { return; } 297 298 if ( sizeof( $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) == 1 and in_array( '', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { return; } 299 300 $template = $this->find_template( 'faq-social-media' ); 301 302 if ( $template ) { 303 include( $template ); 304 } 275 public function maybe_print_social_media() { 276 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'maybe_print_social_media', $this ); 305 277 } 306 278 … … 361 333 * @since 2.0.0 362 334 */ 363 public function print_social_media_buttons() { 364 global $ewd_ufaq_controller; 365 366 if ( in_array( 'facebook', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { $this->print_facebook_button(); } 367 if ( in_array( 'twitter', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { $this->print_twitter_button(); } 368 if ( in_array( 'linkedin', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { $this->print_linkedin_button(); } 369 if ( in_array( 'pinterest', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { $this->print_pinterest_button(); } 370 if ( in_array( 'email', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { $this->print_email_button(); } 335 public function print_social_media_buttons() { 336 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_social_media_buttons', $this ); 371 337 } 372 338 … … 376 342 * @since 2.0.0 377 343 */ 378 public function print_facebook_button() { 379 380 $template = $this->find_template( 'faq-social-media-facebook' ); 381 382 if ( $template ) { 383 include( $template ); 384 } 344 public function print_facebook_button() { 345 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_facebook_button', $this ); 385 346 } 386 347 … … 390 351 * @since 2.0.0 391 352 */ 392 public function print_twitter_button() { 393 394 $template = $this->find_template( 'faq-social-media-twitter' ); 395 396 if ( $template ) { 397 include( $template ); 398 } 353 public function print_twitter_button() { 354 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_twitter_button', $this ); 399 355 } 400 356 … … 404 360 * @since 2.0.0 405 361 */ 406 public function print_linkedin_button() { 407 408 $template = $this->find_template( 'faq-social-media-linkedin' ); 409 410 if ( $template ) { 411 include( $template ); 412 } 362 public function print_linkedin_button() { 363 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_linkedin_button', $this ); 413 364 } 414 365 … … 418 369 * @since 2.0.0 419 370 */ 420 public function print_pinterest_button() { 421 422 $template = $this->find_template( 'faq-social-media-pinterest' ); 423 424 if ( $template ) { 425 include( $template ); 426 } 371 public function print_pinterest_button() { 372 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_pinterest_button', $this ); 427 373 } 428 374 … … 432 378 * @since 2.0.0 433 379 */ 434 public function print_email_button() { 435 436 $template = $this->find_template( 'faq-social-media-email' ); 437 438 if ( $template ) { 439 include( $template ); 440 } 380 public function print_email_button() { 381 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_email_button', $this ); 441 382 } 442 383 … … 459 400 global $ewd_ufaq_controller; 460 401 461 return is_array( $ewd_ufaq_controller->settings->get_setting( 'faq-elements-order' ) ) ? $ewd_ufaq_controller->settings->get_setting( 'faq-elements-order' ) : json_decode( $ewd_ufaq_controller->settings->get_setting( 'faq-elements-order' ) ); 402 $elements = array( 'categories' => 'Categories', 'body' => 'Body', 'author_date' => 'Author/Date', 'tags' => 'Tags', 'permalink' => 'Permalink', 'comments' => 'Comments', 'back_to_top' => 'Back to Top' ); 403 return apply_filters( 'ewd_ufaq_faq_elements_order', $elements, $this ); 462 404 } 463 405 … … 467 409 * @since 2.0.0 468 410 */ 469 public function get_color_block_shape() { 470 global $ewd_ufaq_controller; 471 472 return 'ewd-ufaq-' . $ewd_ufaq_controller->settings->get_setting( 'color-block-shape' ); 473 } 411 public function get_color_block_shape() { 412 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_color_block_shape( $this ) : ''; 413 } 474 414 475 415 /** … … 500 440 * @since 2.0.0 501 441 */ 502 public function get_custom_fields() { 503 global $ewd_ufaq_controller; 504 505 return ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); 506 } 442 public function get_custom_fields() { 443 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_custom_fields( $this ) : array(); 444 } 507 445 508 446 /** … … 511 449 * @since 2.0.0 512 450 */ 513 public function get_custom_field_value( $custom_field ) { 514 515 $value = get_post_meta( $this->faq->post->ID, 'Custom_Field_' . $custom_field->id, true ); 516 517 if ( $custom_field->type == 'file' ) { 518 519 return ! empty( $value ) ? '<a href="' . esc_attr( $value ) . '">' . strrpos( $value, '/' ) ? esc_html( substr( $value, strrpos( $value, '/' ) + 1 ) ) : esc_html( $value ) . '</a>' : ''; 520 } 521 elseif ( $custom_field->type == 'link' ) { 522 523 return ! empty( $value ) ? '<a href="' . esc_attr( $value ) . '" target="_blank">' . esc_attr( $value ) . '</a>' : ''; 524 } 525 else { return $value; } 451 public function get_custom_field_value( $custom_field ) { 452 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_custom_field_value( $this, $custom_field ) : ''; 526 453 } 527 454 … … 534 461 global $ewd_ufaq_controller; 535 462 536 return $ewd_ufaq_controller->settings->get_setting( 'label-categories' ) ? $ewd_ufaq_controller->settings->get_setting( 'label-categories' ) : ( sizeOf( $this->faq->categories ) == 1 ? __( 'Category:', 'ultimate-faqs' ) : __( 'Categories:', 'ultimate-faqs' ));463 return apply_filters( 'ewd_ufaq_custom_label', count( $this->faq->categories ) === 1 ? __( 'Category:', 'ultimate-faqs' ) : __( 'Categories:', 'ultimate-faqs' ), 'label-categories', $this ); 537 464 } 538 465 … … 558 485 global $ewd_ufaq_controller; 559 486 560 return $ewd_ufaq_controller->settings->get_setting( 'label-tags' ) ? $ewd_ufaq_controller->settings->get_setting( 'label-tags' ) : ( sizeOf( $this->faq->tags ) == 1 ? __( 'Tag:', 'ultimate-faqs' ) : __( 'Tags:', 'ultimate-faqs' ));487 return apply_filters( 'ewd_ufaq_custom_label', count( $this->faq->tags ) === 1 ? __( 'Tag:', 'ultimate-faqs' ) : __( 'Tags:', 'ultimate-faqs' ), 'label-tags', $this ); 561 488 } 562 489 … … 579 506 * @since 2.0.0 580 507 */ 581 public function get_thumbs_up_image() { 582 global $ewd_ufaq_controller; 583 584 $img_url = ( $ewd_ufaq_controller->settings->get_setting( 'thumbs-up-image' ) and $ewd_ufaq_controller->settings->get_setting( 'thumbs-up-image' ) != 'http://' ) ? $ewd_ufaq_controller->settings->get_setting( 'thumbs-up-image' ) : EWD_UFAQ_PLUGIN_URL . '/assets/img/Thumbs-up-icon.png'; 585 586 return '<img src="' . esc_url( $img_url ) . '" alt="' . __( "Thumbs Up Icon", "ultimate-faqs" ) . '">'; 587 } 508 public function get_thumbs_up_image() { 509 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_thumbs_up_image( $this ) : ''; 510 } 588 511 589 512 /** … … 592 515 * @since 2.0.0 593 516 */ 594 public function get_up_votes() { 595 596 return get_post_meta( $this->faq->post->ID, "FAQ_Up_Votes", true ) ? get_post_meta( $this->faq->post->ID, "FAQ_Up_Votes", true ) : 0; 597 } 517 public function get_up_votes() { 518 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_up_votes( $this ) : 0; 519 } 598 520 599 521 /** … … 602 524 * @since 2.0.0 603 525 */ 604 public function get_thumbs_down_image() { 605 global $ewd_ufaq_controller; 606 607 $img_url = ( $ewd_ufaq_controller->settings->get_setting( 'thumbs-down-image' ) and $ewd_ufaq_controller->settings->get_setting( 'thumbs-down-image' ) != 'http://' ) ? $ewd_ufaq_controller->settings->get_setting( 'thumbs-down-image' ) : EWD_UFAQ_PLUGIN_URL . '/assets/img/Thumbs-down-icon.png'; 608 609 return '<img src="' . esc_url( $img_url ) . '" alt="' . __( "Thumbs Down Icon", "ultimate-faqs" ) . '">'; 610 } 526 public function get_thumbs_down_image() { 527 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_thumbs_down_image( $this ) : ''; 528 } 611 529 612 530 /** … … 615 533 * @since 2.0.0 616 534 */ 617 public function get_down_votes() { 618 619 return get_post_meta( $this->faq->post->ID, "FAQ_Down_Votes", true ) ? get_post_meta( $this->faq->post->ID, "FAQ_Down_Votes", true ) : 0; 620 } 535 public function get_down_votes() { 536 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_down_votes( $this ) : 0; 537 } 621 538 622 539 /** … … 625 542 * @since 2.0.0 626 543 */ 627 public function get_social_twitter_link() { 628 629 $text = __( 'Check out this helpful FAQ', 'ultimate-faqs' ) . ': '; 630 631 return 'https://twitter.com/intent/tweet?text=' . urlencode( $text ) . urlencode( $this->faq->post->post_title ) . urlencode( ' | ' ) . urlencode( $this->permalink ); 632 } 544 public function get_social_twitter_link() { 545 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_social_twitter_link( $this ) : ''; 546 } 633 547 634 548 /** … … 637 551 * @since 2.0.0 638 552 */ 639 public function get_social_linkedin_link() { 640 641 $text = __( 'Check out this helpful FAQ', 'ultimate-faqs' ); 642 643 return 'http://www.linkedin.com/shareArticle?mini=true&url=' . $this->permalink . "&title=" . urlencode( $text ) . "&summary=" . urlencode( $this->faq->post->post_title ); 644 } 553 public function get_social_linkedin_link() { 554 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_social_linkedin_link( $this ) : ''; 555 } 645 556 646 557 /** … … 649 560 * @since 2.0.0 650 561 */ 651 public function get_social_pinterest_link() { 652 653 $text = __( 'Check out this helpful FAQ', 'ultimate-faqs' ) . ': '; 654 655 return 'http://pinterest.com/pin/create/button/?url=' . $this->permalink . "&description=" . urlencode( $text ) . urlencode( $this->faq->post->post_title ); 656 } 562 public function get_social_pinterest_link() { 563 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_social_pinterest_link( $this ) : ''; 564 } 657 565 658 566 /** … … 661 569 * @since 2.0.0 662 570 */ 663 public function get_social_email_mailto_link() { 664 665 $subject = __( 'Check out this helpful FAQ', 'ultimate-faqs' ); 666 667 return 'mailto:?subject=' . urlencode( $subject ) . "&body=" . urlencode( $this->faq->post->post_title ) . urlencode( ' | ' ) . urlencode( $this->permalink ); 668 } 571 public function get_social_email_mailto_link() { 572 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_social_email_mailto_link( $this ) : ''; 573 } 669 574 670 575 /** … … 679 584 array( 680 585 'ewd-ufaq-faq-div', 681 'ewd-ufaq-faq-column-count- ' . $ewd_ufaq_controller->settings->get_setting( 'number-of-columns' ),682 'ewd-ufaq-faq-responsive-columns-' . $ewd_ufaq_controller->settings->get_setting( 'responsive-columns' ),683 'ewd-ufaq-faq-display-style- ' . $ewd_ufaq_controller->settings->get_setting( 'display-style' ),586 'ewd-ufaq-faq-column-count-one', 587 'ewd-ufaq-faq-responsive-columns-', 588 'ewd-ufaq-faq-display-style-default', 684 589 ) 685 590 ); … … 729 634 $this->date = get_the_date( '', $this->faq->post->ID ); 730 635 731 if ( ! empty( $this->search_string ) and $ewd_ufaq_controller->settings->get_setting( 'highlight-search-term' ) ) { 732 733 $this->faq_title = $this->highlight_across_tags( $this->faq_title, $this->search_string ); 734 $this->faq_answer = $this->highlight_across_tags( $this->faq_answer, $this->search_string ); 735 } 636 do_action( 'ewd_ufaq_faq_display_variables', $this ); 736 637 737 638 remove_filter( 'siteorigin_panels_filter_content_enabled', array( $this, 'disable_site_origin_page_builder' ) ); … … 746 647 * @since 2.0.0 747 648 */ 748 public function highlight_across_tags( $html, $term, $class = 'ewd-ufaq-highlight-search-term' ) { 749 750 $term = trim( $term ); 751 if ( $term === '' ) { return $html; } 752 753 $pattern = '/' . preg_quote( $term, '/' ) . '/iu'; 754 755 // Parse HTML 756 $dom = new DOMDocument( '1.0', 'UTF-8' ); 757 libxml_use_internal_errors( true ); 758 $dom->loadHTML( '<?xml encoding="utf-8" ?>' . $html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD ); 759 libxml_clear_errors(); 760 761 $xpath = new DOMXPath( $dom ); 762 763 // Collect all text nodes in document order and build a flat text map 764 $nodes = array(); 765 $full = ''; 766 $offset = 0; 767 768 // Include empty text nodes too (a match might begin/end at their edges) 769 foreach ( $xpath->query( '//text()' ) as $t ) { 770 $text = isset( $t->nodeValue ) ? $t->nodeValue : ''; 771 $len = mb_strlen( $text, 'UTF-8' ); 772 $nodes[] = array( 'node' => $t, 'start' => $offset, 'end' => $offset + $len ); 773 $full .= $text; 774 $offset += $len; 775 } 776 777 if ( $full === '' || empty( $nodes ) ) { 778 // Nothing to do 779 $result = $dom->saveHTML(); 780 return preg_replace( '/^<\?xml.*?\?>/u', '', $result ) ? preg_replace( '/^<\?xml.*?\?>/u', '', $result ) : $html; 781 } 782 783 // Find matches in the flattened text 784 if ( ! preg_match_all( $pattern, $full, $m, PREG_OFFSET_CAPTURE ) ) { 785 $result = $dom->saveHTML(); 786 return preg_replace( '/^<\?xml.*?\?>/u', '', $result ) ? preg_replace( '/^<\?xml.*?\?>/u', '', $result ) : $html; 787 } 788 789 // Build match list (convert byte offsets to Unicode codepoint offsets) 790 $matches = array(); 791 foreach ( $m[0] as $mm ) { 792 $match_text = $mm[0]; 793 $start_byte = $mm[1]; 794 795 $pre = mb_substr( $full, 0, $start_byte, 'UTF-8' ); 796 $start = mb_strlen( $pre, 'UTF-8' ); 797 $length = mb_strlen( $match_text, 'UTF-8' ); 798 799 $matches[] = array( 'start' => $start, 'length' => $length ); 800 } 801 802 if ( empty( $matches ) ) { 803 $result = $dom->saveHTML(); 804 return preg_replace( '/^<\?xml.*?\?>/u', '', $result ) ? preg_replace( '/^<\?xml.*?\?>/u', '', $result ) : $html; 805 } 806 807 // Process matches from right to left so earlier offsets aren't invalidated 808 usort( 809 $matches, 810 function( $a, $b ) { 811 if ( $a['start'] === $b['start'] ) { return 0; } 812 return ( $a['start'] < $b['start'] ) ? 1 : -1; 813 } 814 ); 815 816 foreach ( $matches as $match ) { 817 $m_start = $match['start']; 818 $m_end = $match['start'] + $match['length']; 819 820 // Walk text nodes and wrap overlapping slices 821 foreach ( $nodes as $entry ) { 822 823 /** @var DOMText $text_node */ 824 $text_node = $entry['node']; 825 $n_start = $entry['start']; 826 $n_end = $entry['end']; 827 828 // No overlap? 829 if ( $m_end <= $n_start || $m_start >= $n_end ) { continue; } 830 831 // Local offsets in this node 832 $local_start = max( 0, $m_start - $n_start ); 833 $local_end = min( $n_end, $m_end ) - $n_start; 834 835 // Split into [before][target][after] 836 // Note: DOMText::splitText uses UTF-16 offsets internally but PHP maps by characters. 837 // Using mb_* derived offsets aligns with DOM for BMP; for safety we keep to mb_strlen logic. 838 if ( $local_end < mb_strlen( $text_node->data, 'UTF-8' ) ) { 839 $after_node = $text_node->splitText( $local_end ); 840 } else { 841 $after_node = null; 842 } 843 844 $target_node = $text_node; 845 if ( $local_start > 0 ) { 846 $target_node = $text_node->splitText( $local_start ); 847 } 848 849 // Wrap the target slice 850 $span = $dom->createElement( 'span' ); 851 $span->setAttribute( 'class', $class ); 852 $target_node->parentNode->replaceChild( $span, $target_node ); 853 $span->appendChild( $target_node ); 854 } 855 } 856 857 // Return HTML without the XML declaration we prepended 858 $result = $dom->saveHTML(); 859 $result = preg_replace( '/^<\?xml.*?\?>/u', '', $result ); 860 861 return $result ? $result : $html; 649 public function highlight_across_tags( $html, $term, $class = 'ewd-ufaq-highlight-search-term' ) { 650 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::highlight_across_tags( $this, $html, $term, $class ) : $html; 862 651 } 863 652 … … 1082 871 */ 1083 872 public function enqueue_assets() { 1084 1085 wp_enqueue_style( 'ewd-ufaq-rrssb' ); 1086 wp_enqueue_style( 'ewd-ufaq-jquery-ui' ); 873 global $ewd_ufaq_controller; 874 if ( ! $ewd_ufaq_controller->get_front_end_php_data( 'ewd-ufaq-js', 'ewd_ufaq_php_data' ) ) { 875 $args = array( 'nonce' => wp_create_nonce( 'ewd-ufaq-js' ), 'faq_accordion' => $ewd_ufaq_controller->settings->get_setting( 'faq-accordion' ), 'category_accordion' => $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ), 'faq_scroll' => $ewd_ufaq_controller->settings->get_setting( 'scroll-to-top' ) ); 876 $ewd_ufaq_controller->add_front_end_php_data( 'ewd-ufaq-js', 'ewd_ufaq_php_data', apply_filters( 'ewd_ufaq_js_localize_data', $args, $this ) ); 877 } 878 1087 879 wp_enqueue_style( 'ewd-ufaq-css' ); 1088 880 1089 wp_enqueue_style( 'ewd-ufaq-rrssb' );1090 wp_enqueue_style( 'ewd-ufaq-jquery-ui' );1091 1092 881 wp_enqueue_script( 'ewd-ufaq-js' ); 1093 882 do_action( 'ewd_ufaq_view_assets', $this ); 883 884 } 885 public function get_body_classes() { 886 $classes = array( 'ewd-ufaq-faq-body' ); 887 if ( ! $this->display_all_answers ) { $classes[] = 'ewd-ufaq-hidden'; } 888 return apply_filters( 'ewd_ufaq_faq_body_classes', $classes, $this ); 1094 889 } 1095 890 } -
ultimate-faqs/tags/2.7.0/views/View.FAQSearch.class.php
r3704732 r3821169 26 26 */ 27 27 public function render() { 28 global $ewd_ufaq_controller; 29 30 // Add any dependent stylesheets or javascript 31 $this->enqueue_assets(); 32 33 if ( empty( $this->show_on_load ) ) { 34 $this->faqs = array(); 35 } 36 else { 37 $this->add_schema_data(); 38 } 39 40 $this->set_faqs_options(); 41 42 $this->create_faq_data(); 43 44 // Add css classes to the slider 45 $this->classes = $this->get_classes(); 46 47 ob_start(); 48 49 $this->add_custom_styling(); 50 51 $template = $this->find_template( 'faqs-search' ); 52 if ( $template ) { 53 include( $template ); 54 } 55 56 $template = $this->find_template( 'faqs' ); 57 if ( $template ) { 58 include( $template ); 59 } 60 61 $output = ob_get_clean(); 62 63 if ( $ewd_ufaq_controller->settings->get_setting( 'display-style' ) == 'list' ){ 64 65 $output = $this->replace_list_header( $output ); 66 } 67 68 return apply_filters( 'ewd_ufaq_search_faqs_output', $output, $this ); 28 return class_exists( 'ewdufaqEWDPHSearch', false ) ? ewdufaqEWDPHSearch::render( $this ) : ewdufaqBasicSearch::render( get_object_vars( $this ) ); 69 29 } 70 30 … … 88 48 */ 89 49 public function maybe_print_search_submit() { 90 global $ewd_ufaq_controller; 91 92 if ( $ewd_ufaq_controller->settings->get_setting( 'auto-complete-titles' ) ) { return; } 93 94 $template = $this->find_template( 'faqs-search-submit' ); 95 if ( $template ) { 96 include( $template ); 97 } 50 if ( class_exists( 'ewdufaqEWDPHSearch', false ) ) { ewdufaqEWDPHSearch::maybe_print_search_submit( $this ); } 98 51 } 99 52 … … 109 62 array( 110 63 'ewd-ufaq-faq-list', 111 'ewd-ufaq-page-type- ' . $ewd_ufaq_controller->settings->get_setting( 'page-type' ),112 'ewd-ufaq-category-tabs-' . $ewd_ufaq_controller->settings->get_setting( 'category-tabs' ),64 'ewd-ufaq-page-type-distinct', 65 'ewd-ufaq-category-tabs-', 113 66 'ewd-ufaq-search' 114 67 ) 115 68 ); 116 69 117 if ( $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ) or $ewd_ufaq_controller->settings->get_setting( 'category-tabs' )) {70 if ( $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ) ) { 118 71 $classes[] = 'ewd-ufaq-faq-category-title-accordion'; 119 72 } -
ultimate-faqs/tags/2.7.0/views/View.FAQs.class.php
r3704732 r3821169 134 134 $output = ob_get_clean(); 135 135 136 if ( $ewd_ufaq_controller->settings->get_setting( 'display-style' ) == 'list' ){ 137 138 $output = $this->replace_list_header( $output ); 139 } 136 $output = apply_filters( 'ewd_ufaq_rendered_list_output', $output, $this ); 140 137 141 138 return apply_filters( 'ewd_ufaq_faqs_output', $output, $this ); … … 180 177 * @since 2.0.0 181 178 */ 182 public function maybe_print_header() { 183 global $ewd_ufaq_controller; 184 185 if ( $ewd_ufaq_controller->settings->get_setting( 'display-style' ) != 'list' ) { return; } 186 187 echo '%list_header_placeholder%'; 179 public function maybe_print_header() { 180 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'maybe_print_header', $this ); 188 181 } 189 182 … … 218 211 $args[ 'orderby' ] = $this->category_orderby; 219 212 } 220 elseif ( ! empty( $this->category_orderby ) ) { 221 222 $args[ 'meta_key' ] = 'ufaq_category_order'; 223 $args[ 'orderby' ] = 'meta_value_num'; 224 225 } 213 $args = apply_filters( 'ewd_ufaq_category_query_args', $args, $this ); 226 214 227 215 $categories = get_terms( $args ); … … 418 406 * @since 2.0.0 419 407 */ 420 public function maybe_print_pagination() { 421 422 if ( $this->max_page <= 1 ) { return; } 423 424 $template = $this->find_template( 'faqs-pagination' ); 425 426 if ( $template ) { 427 include( $template ); 428 } 408 public function maybe_print_pagination() { 409 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'maybe_print_pagination', $this ); 429 410 } 430 411 … … 434 415 * @since 2.0.0 435 416 */ 436 public function replace_list_header( $output ) { 437 438 if ( $this->group_by_category ) { $template = $this->find_template( 'faqs-category-list-header' ); } 439 else { $template = $this->find_template( 'faqs-list-header' ); } 440 441 ob_start(); 442 443 if ( $template ) { 444 include( $template ); 445 } 446 447 $list_header = ob_get_clean(); 448 449 return str_replace( '%list_header_placeholder%', $list_header, $output ); 417 public function replace_list_header( $output ) { 418 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::replace_list_header( $this, $output ) : $output; 450 419 } 451 420 … … 503 472 array( 504 473 'ewd-ufaq-faq-list', 505 'ewd-ufaq-page-type- ' . $ewd_ufaq_controller->settings->get_setting( 'page-type' ),506 'ewd-ufaq-category-tabs-' . $ewd_ufaq_controller->settings->get_setting( 'category-tabs' )474 'ewd-ufaq-page-type-distinct', 475 'ewd-ufaq-category-tabs-' 507 476 ) 508 477 ); … … 564 533 $this->max_page = ceil( $this->faq_count / $this->faqs_per_page ); 565 534 566 if ( ! $this->group_by_category and $ewd_ufaq_controller->settings->get_setting( 'display-style' ) != 'list') { return; }535 if ( ! apply_filters( 'ewd_ufaq_needs_category_data', (bool) $this->group_by_category, $this ) ) { return; } 567 536 568 537 $args = array( … … 576 545 $args[ 'orderby' ] = $this->category_orderby; 577 546 } 578 elseif ( ! empty( $this->category_orderby ) ) { 579 580 $args[ 'meta_key' ] = 'ufaq_category_order'; 581 $args[ 'orderby' ] = 'meta_value_num'; 582 583 } 547 $args = apply_filters( 'ewd_ufaq_category_query_args', $args, $this ); 584 548 585 549 $categories = get_terms( $args ); … … 717 681 global $ewd_ufaq_controller; 718 682 719 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-symbol' )) ) { return false; }683 if ( ! $this->get_category_toggle_symbol() ) { return false; } 720 684 721 685 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'faq-category-toggle' ) ) ) { return false; } … … 732 696 global $ewd_ufaq_controller; 733 697 734 return 'ewd-ufaq-' . $ewd_ufaq_controller->settings->get_setting( 'color-block-shape' );698 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_color_block_shape( $this ) : ''; 735 699 } 736 700 … … 740 704 * @since 2.4.3 741 705 */ 742 public function get_category_toggle_symbol() { 743 global $ewd_ufaq_controller; 744 745 return strtolower( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-symbol' ) ); 746 } 706 public function get_category_toggle_symbol() { 707 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_category_toggle_symbol( $this ) : ''; 708 } 747 709 748 710 /** … … 790 752 */ 791 753 public function enqueue_assets() { 792 global $ewd_ufaq_controller, $wp_scripts; 793 794 wp_enqueue_style( 'ewd-ufaq-rrssb' ); 795 wp_enqueue_style( 'ewd-ufaq-jquery-ui' ); 754 global $ewd_ufaq_controller; 796 755 wp_enqueue_style( 'ewd-ufaq-css' ); 797 if ( $ewd_ufaq_controller->settings->get_setting( 'display-style' ) == 'minimalist' ) { 798 wp_enqueue_style( 'ewd-ufaq-minimalist' ); 799 } 800 801 wp_enqueue_style( 'ewd-ufaq-rrssb' ); 802 wp_enqueue_style( 'ewd-ufaq-jquery-ui' ); 803 804 $handle = 'ewd-ufaq-js'; 756 wp_enqueue_script( 'ewd-ufaq-js' ); 805 757 $args = array( 806 'faq_accordion' => isset( $this->faq_accordion ) ? $this->faq_accordion : $ewd_ufaq_controller->settings->get_setting( 'faq-accordion' ), 807 'category_accordion' => isset( $this->category_accordion ) ? $this->category_accordion : $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ), 808 'faq_scroll' => $ewd_ufaq_controller->settings->get_setting( 'scroll-to-top' ), 809 'reveal_effect' => $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ), 810 'retrieving_results' => $ewd_ufaq_controller->settings->get_setting( 'label-retrieving-results' ), 811 'highlight_search_term' => $ewd_ufaq_controller->settings->get_setting( 'highlight-search-term' ), 812 'save_search_terms' => $ewd_ufaq_controller->settings->get_setting( 'save-search-terms' ), 813 'autocomplete_question' => $ewd_ufaq_controller->settings->get_setting( 'auto-complete-titles' ), 814 'question_titles' => $this->get_faq_titles(), 815 'display_faq' => 0, 816 'nonce' => wp_create_nonce( $handle ), 758 'faq_accordion' => isset( $this->faq_accordion ) ? $this->faq_accordion : $ewd_ufaq_controller->settings->get_setting( 'faq-accordion' ), 759 'category_accordion' => isset( $this->category_accordion ) ? $this->category_accordion : $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ), 760 'faq_scroll' => $ewd_ufaq_controller->settings->get_setting( 'scroll-to-top' ), 761 'display_faq' => 0, 762 'nonce' => wp_create_nonce( 'ewd-ufaq-js' ), 817 763 ); 818 819 if ( ! empty( get_query_var( 'single_faq' ) ) ) { 820 764 if ( get_query_var( 'single_faq' ) ) { 821 765 $faq = get_page_by_path( get_query_var( 'single_faq' ), OBJECT, EWD_UFAQ_FAQ_POST_TYPE ); 822 $args['display_faq'] = $faq->ID; 823 } 824 elseif ( isset( $_GET['Display_FAQ'] ) ) { 825 $args['display_faq'] = intval( $_GET['Display_FAQ'] ); 826 } 827 828 // Fetch any existing script data 829 $prev_question_titles = $ewd_ufaq_controller->get_front_end_php_data( $handle, 'question_titles' ); 830 831 if ( ! empty( $prev_question_titles ) ) { 832 $args['question_titles'] = array_merge( $prev_question_titles, $args['question_titles'] ); 833 $args['question_titles'] = array_unique( $args['question_titles'] ); 834 } 835 836 $ewd_ufaq_controller->add_front_end_php_data( $handle, 'question_titles', $args['question_titles'] ); 837 838 wp_enqueue_script( $handle ); 839 840 $ewd_ufaq_controller->add_front_end_php_data( $handle, 'ewd_ufaq_php_data', apply_filters( 'ewd_ufaq_js_localize_data', $args ) ); 841 842 wp_enqueue_script( 'jquery-ui-core' ); 843 844 if ( $ewd_ufaq_controller->settings->get_setting( 'auto-complete-titles' ) ) { 845 846 wp_enqueue_script( 'jquery-ui-autocomplete' ); 847 } 848 849 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) != 'none' ) { 850 851 wp_enqueue_script( 'jquery-effects-core' ); 852 wp_enqueue_script( 'jquery-ui-autocomplete' ); 853 854 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'blind' ) { wp_enqueue_script( 'jquery-effects-blind' ); } 855 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'bounce' ) { wp_enqueue_script( 'jquery-effects-bounce' ); } 856 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'clip' ) { wp_enqueue_script( 'jquery-effects-clip' ); } 857 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'drop' ) { wp_enqueue_script( 'jquery-effects-drop' ); } 858 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'explode' ) { wp_enqueue_script( 'jquery-effects-explode' ); } 859 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'fade' ) { wp_enqueue_script( 'jquery-effects-fade' ); } 860 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'fold' ) { wp_enqueue_script( 'jquery-effects-fold' ); } 861 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'highlight' ) { wp_enqueue_script( 'jquery-effects-highlight' ); } 862 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'pulsate' ) { wp_enqueue_script( 'jquery-effects-pulsate' ); } 863 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'shake' ) { wp_enqueue_script( 'jquery-effects-shake' ); } 864 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'slide' ) { wp_enqueue_script( 'jquery-effects-slide' ); } 865 } 866 766 $args['display_faq'] = $faq instanceof WP_Post ? $faq->ID : 0; 767 } elseif ( isset( $_GET['Display_FAQ'] ) && is_scalar( $_GET['Display_FAQ'] ) ) { 768 $args['display_faq'] = absint( $_GET['Display_FAQ'] ); 769 } 770 $ewd_ufaq_controller->add_front_end_php_data( 'ewd-ufaq-js', 'ewd_ufaq_php_data', apply_filters( 'ewd_ufaq_js_localize_data', $args, $this ) ); 771 do_action( 'ewd_ufaq_view_assets', $this ); 867 772 } 868 773 } -
ultimate-faqs/tags/2.7.0/views/View.class.php
r3744649 r3821169 71 71 */ 72 72 function find_template( $template ) { 73 global $ewd_ufaq_controller; 74 $paid = array( 75 'faq-custom-fields' => 'fields', 76 'faq-ratings' => 'premium', 77 'faq-social-media' => 'premium', 78 'faq-social-media-email' => 'premium', 79 'faq-social-media-facebook' => 'premium', 80 'faq-social-media-linkedin' => 'premium', 81 'faq-social-media-pinterest' => 'premium', 82 'faq-social-media-twitter' => 'premium', 83 'faqs-pagination' => 'premium', 84 'faqs-list-header' => 'premium', 85 'faqs-category-list-header' => 'premium', 86 'faqs-search' => 'search', 87 'faqs-search-submit' => 'search', 88 'submit-faq' => 'submit-faq', 89 'submit-faq-captcha' => 'submit-faq', 90 'submit-faq-custom-field-checkbox' => 'submit-faq', 91 'submit-faq-custom-field-date' => 'submit-faq', 92 'submit-faq-custom-field-datetime' => 'submit-faq', 93 'submit-faq-custom-field-radio' => 'submit-faq', 94 'submit-faq-custom-field-select' => 'submit-faq', 95 'submit-faq-custom-field-text' => 'submit-faq', 96 'submit-faq-custom-field-textarea' => 'submit-faq', 97 'submit-faq-field-author-email' => 'submit-faq', 98 'submit-faq-field-author' => 'submit-faq', 99 'submit-faq-field-faq-answer' => 'submit-faq', 100 'submit-faq-field-faq-question' => 'submit-faq', 101 'submit-faq-submitted-faq-message' => 'submit-faq', 102 ); 103 if ( ! is_string( $template ) || ( 0 === strpos( $template, 'submit-faq' ) && ! isset( $paid[ $template ] ) ) ) { return false; } 104 $capability = isset( $paid[ $template ] ) ? $paid[ $template ] : ''; 105 if ( $capability && ( ! isset( $ewd_ufaq_controller->permissions ) || ! $ewd_ufaq_controller->permissions->check_permission( $capability ) ) ) { 106 return false; 107 } 73 108 74 109 $this->template_dirs = array( … … 78 113 ); 79 114 80 $this->template_dirs = apply_filters( 'ewd_ufaq_template_directories', $this->template_dirs );115 $this->template_dirs = apply_filters( 'ewd_ufaq_template_directories', $this->template_dirs, $template, $this ); 81 116 82 117 foreach ( $this->template_dirs as $dir ) { 118 // Never execute an obsolete paid default left by a merge-style update. 119 // Child/parent and explicitly supplied integration directories still work. 120 if ( $capability && rtrim( wp_normalize_path( $dir ), '/' ) === wp_normalize_path( EWD_UFAQ_PLUGIN_DIR . '/' . EWD_UFAQ_TEMPLATE_DIR ) ) { continue; } 83 121 if ( file_exists( $dir . $template . '.php' ) ) { 84 122 return $dir . $template . '.php'; … … 86 124 } 87 125 126 if ( $capability ) { do_action( 'ewd_ufaq_missing_paid_template', $template ); } 88 127 return false; 89 128 } … … 110 149 if ( empty( $this->label_defaults ) ) { $this->set_label_defaults(); } 111 150 112 return ! empty( $ewd_ufaq_controller->settings->get_setting( $label_name ) ) ? $ewd_ufaq_controller->settings->get_setting( $label_name ) : $this->label_defaults[ $label_name ]; 151 $default = isset( $this->label_defaults[ $label_name ] ) ? $this->label_defaults[ $label_name ] : ''; 152 return apply_filters( 'ewd_ufaq_custom_label', $default, $label_name, $this ); 113 153 } 114 154 … … 150 190 151 191 public function add_custom_styling() { 152 global $ewd_ufaq_controller; 153 154 $heading_type = $ewd_ufaq_controller->settings->get_setting( 'styling-faq-heading-type' ); 155 $category_heading_type = $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-type' ); 156 157 $css = ''; 158 159 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-background-color' ) != '' ) { $css .= '.ewd-ufaq-post-margin-symbol { background-color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-background-color' ) . ' !important; }'; } 160 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-font-color' ) != '' ) { $css .= '.ewd-ufaq-post-margin-symbol { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-font-color' ) . ' !important; }'; } 161 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-size' ) != '' ) { $css .= '.ewd-ufaq-post-margin-symbol { border-width: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-size' ) . ' !important; }'; } 162 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-color' ) != '' ) { $css .= '.ewd-ufaq-post-margin-symbol { border-color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-color' ) . ' !important; }'; } 163 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-radius' ) != '' ) { $css .= '.ewd-ufaq-post-margin-symbol { border-radius: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-radius' ) . ' !important; }'; } 164 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-symbol-size' ) != '' ) { $css .= '.ewd-ufaq-faq-title .ewd-ufaq-post-margin-symbol span { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-symbol-size' ) . ' !important; }'; } 165 166 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-background-color' ) != '' ) { $css .= '.ewd-ufaq-category-post-margin-symbol { background-color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-background-color' ) . ' !important; }'; } 167 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-font-color' ) != '' ) { $css .= '.ewd-ufaq-category-post-margin-symbol { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-font-color' ) . ' !important; }'; } 168 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-size' ) != '' ) { $css .= '.ewd-ufaq-category-post-margin-symbol { border-width: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-size' ) . ' !important; }'; } 169 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-color' ) != '' ) { $css .= '.ewd-ufaq-category-post-margin-symbol { border-color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-color' ) . ' !important; }'; } 170 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-radius' ) != '' ) { $css .= '.ewd-ufaq-category-post-margin-symbol { border-radius: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-radius' ) . ' !important; }'; } 171 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-symbol-size' ) != '' ) { $css .= '.ewd-ufaq-faq-category-title .ewd-ufaq-category-post-margin-symbol span { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-symbol-size' ) . ' !important; }'; } 172 173 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-block-background-color' ) != '' ) { 174 175 $css .= ".ewd-ufaq-faq-display-style-block.ewd-ufaq-post-active, .ewd-ufaq-faq-display-style-block.ewd-ufaq-post-active a,.ewd-ufaq-faq-display-style-block:hover, .ewd-ufaq-faq-display-style-block:hover a, .ewd-ufaq-faq-display-style-block:hover $heading_type { background-color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-block-background-color' ) . ' !important; }'; 176 $css .= ".ewd-ufaq-faq-display-style-border_block.ewd-ufaq-post-active, .ewd-ufaq-faq-display-style-border_block:hover, .ewd-ufaq-faq-display-style-border_block:hover $heading_type { background-color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-block-background-color' ) . ' !important; }'; 177 $css .= ".ewd-ufaq-faq-display-style-border_block .ewd-ufaq-faq-body { border-color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-block-background-color' ) . ' !important; }'; 178 $css .= ".ewd-ufaq-faq-display-style-border_block .comment-reply-title, .ewd-ufaq-faq-display-style-border_block:hover .comment-reply-title { background-color: transparent !important; }"; 179 } 180 181 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-block-font-color' ) != '' ) { 182 183 $css .= ".ewd-ufaq-faq-display-style-block:hover .ewd-ufaq-post-margin-symbol, .ewd-ufaq-category-post-margin-symbol, .ewd-ufaq-faq-display-style-block:hover $heading_type { color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-block-font-color' ) . ' !important; }'; 184 $css .= ".ewd-ufaq-faq-display-style-border_block:hover .ewd-ufaq-post-margin-symbol, .ewd-ufaq-category-post-margin-symbol, .ewd-ufaq-faq-display-style-border_block:hover $heading_type { color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-block-font-color' ) . ' !important; }'; 185 } 186 187 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-list-font' ) != '' ) { $css .= '.ewd-ufaq-faq-header-title a { font-family: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-list-font' ) . ' !important; }'; } 188 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-list-font-size' ) != '' ) { $css .= '.ewd-ufaq-faq-header-title a { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-list-font-size' ) . ' !important; }'; } 189 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-list-font-color' ) != '' ) { $css .= '.ewd-ufaq-faq-header-title a { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-list-font-color' ) . ' !important; }'; } 190 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-list-margin' ) != '' ) { $css .= '.ewd-ufaq-faq-header-title a { margin: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-list-margin' ) . ' !important; }'; } 191 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-list-padding' ) != '' ) { $css .= '.ewd-ufaq-faq-header-title a { padding: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-list-padding' ) . ' !important; }'; } 192 193 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-font' ) != '' ) { $css .= "div.ewd-ufaq-faq-title $heading_type { font-family: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-font' ) . ' !important; }'; } 194 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-font-size' ) != '' ) { $css .= "div.ewd-ufaq-faq-title $heading_type { font-size: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-font-size' ) . ' !important; }'; } 195 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-font-color' ) != '' ) { $css .= "div.ewd-ufaq-faq-title $heading_type { color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-font-color' ) . ' !important; }'; } 196 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-margin' ) != '' ) { $css .= "div.ewd-ufaq-faq-title $heading_type { margin: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-margin' ) . ' !important; }'; } 197 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-padding' ) != '' ) { $css .= "div.ewd-ufaq-faq-title $heading_type { padding: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-padding' ) . ' !important; }'; } 198 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-icon-top-margin' ) != '' ) { $css .= ".ewd-ufaq-post-margin-symbol { margin-top: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-icon-top-margin' ) . ' !important; }'; } 199 200 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font' ) != '' ) { $css .= 'div.ewd-ufaq-faq-post p { font-family: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font' ) . ' !important; }'; } 201 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font-size' ) != '' ) { $css .= 'div.ewd-ufaq-faq-post p { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font-size' ) . ' !important; }'; } 202 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font-color' ) != '' ) { $css .= 'div.ewd-ufaq-faq-post p { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font-color' ) . ' !important; }'; } 203 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-answer-margin' ) != '' ) { $css .= 'div.ewd-ufaq-faq-post p { margin: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-answer-margin' ) . ' !important; }'; } 204 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-answer-padding' ) != '' ) { $css .= 'div.ewd-ufaq-faq-post p { padding: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-answer-padding' ) . ' !important; }'; } 205 206 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font' ) != '' ) { $css .= 'div.ewd-ufaq-author-date { font-family: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font' ) . ' !important; }'; } 207 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font-size' ) != '' ) { $css .= 'div.ewd-ufaq-author-date { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font-size' ) . ' !important; }'; } 208 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font-color' ) != '' ) { $css .= 'div.ewd-ufaq-author-date { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font-color' ) . ' !important; }'; } 209 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-margin' ) != '' ) { $css .= 'div.ewd-ufaq-author-date { margin: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-margin' ) . ' !important; }'; } 210 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-padding' ) != '' ) { $css .= 'div.ewd-ufaq-author-date { padding: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-padding' ) . ' !important; }'; } 211 212 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font' ) != '' ) { $css .= "div.ewd-ufaq-faq-category-title $category_heading_type { font-family: " . $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font' ) . ' !important; }'; } 213 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font-size' ) != '' ) { $css .= "div.ewd-ufaq-faq-category-title $category_heading_type { font-size: " . $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font-size' ) . ' !important; }'; } 214 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font-color' ) != '' ) { $css .= "div.ewd-ufaq-faq-category-title $category_heading_type { color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font-color' ) . ' !important; }'; } 215 216 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-font' ) != '' ) { $css .= 'div.ewd-ufaq-faq-categories, div.ewd-ufaq-faq-tags { font-family: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-font' ) . ' !important; }'; } 217 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-font-size' ) != '' ) { $css .= 'div.ewd-ufaq-faq-categories, div.ewd-ufaq-faq-tags { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-font-size' ) . ' !important; }'; } 218 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-font-color' ) != '' ) { $css .= 'div.ewd-ufaq-faq-categories, div.ewd-ufaq-faq-tags { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-font-color' ) . ' !important; }'; } 219 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-margin' ) != '' ) { $css .= 'div.ewd-ufaq-faq-categories, div.ewd-ufaq-faq-tags { margin: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-margin' ) . ' !important; }'; } 220 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-padding' ) != '' ) { $css .= 'div.ewd-ufaq-faq-categories, div.ewd-ufaq-faq-tags { padding: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-padding' ) . ' !important; }'; } 221 222 $css .= $ewd_ufaq_controller->settings->get_setting( 'custom-css' ); 223 224 if( ! empty( $css ) ) { 225 echo '<style>'; 226 echo $css; 227 echo '</style>'; 192 // The Basic settings Custom CSS box is a Free feature, distinct from paid 193 // per-element styling controls. Keep it effective without Helper or rights. 194 $css = $this->get_option( 'custom-css' ); 195 $css = apply_filters( 'ewd_ufaq_custom_styles', is_string( $css ) ? $css : '', $this ); 196 if ( is_string( $css ) && '' !== $css ) { 197 echo '<style>' . str_ireplace( '</style', '', $css ) . '</style>'; 228 198 } 229 199 } -
ultimate-faqs/trunk/assets/css/ewd-ufaq-admin.css
r3744649 r3821169 1 .ewd-ufaq-clear { 1 2 .ewd-ufaq-clear{ 2 3 clear: both; 3 }4 .ewd-ufaq-item {5 cursor: move;6 4 } 7 5 8 6 .ufaq_page_ewd-ufaq-dashboard, 9 7 .ufaq_page_ewd-ufaq-settings, 10 .post-type-ufaq, 11 .ufaq_page_ewd-ufaq-ordering-table { 8 .post-type-ufaq{ 12 9 background: #fff; 13 10 } 11 14 12 .ufaq_page_ewd-ufaq-settings .wrap, 15 .post-type-ufaq .wrap, 16 .ufaq_page_ewd-ufaq-ordering-table .wrap { 13 .post-type-ufaq .wrap{ 17 14 margin: 10px 0 0 -20px; 18 15 box-sizing: border-box; 19 16 } 17 20 18 .ufaq_page_ewd-ufaq-settings .wrap *, 21 .post-type-ufaq .wrap *, 22 .ufaq_page_ewd-ufaq-ordering-table .wrap * { 19 .post-type-ufaq .wrap *{ 23 20 box-sizing: border-box; 24 21 } 25 22 26 27 /* BANNER */ 28 29 .ewd-ufaq-dashboard-new-upgrade-banner { 23 .ewd-ufaq-dashboard-new-upgrade-banner{ 30 24 position: relative; 31 25 display: flex; … … 36 30 box-sizing: border-box; 37 31 } 38 .ewd-ufaq-dashboard-new-upgrade-banner * { 32 33 .ewd-ufaq-dashboard-new-upgrade-banner *{ 39 34 box-sizing: border-box; 40 35 } 41 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon { 36 37 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{ 42 38 position: absolute; 43 39 height: 112px; … … 48 44 background-size: 112px 112px; 49 45 } 50 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons { 46 47 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons{ 51 48 position: absolute; 52 49 height: 112px; … … 55 52 top: 84px; 56 53 } 57 .ewd-ufaq-dashboard-new-upgrade-button { 54 55 .ewd-ufaq-dashboard-new-upgrade-button{ 58 56 display: flex; 59 57 justify-content: center; … … 72 70 transition: background .25s, color .25s, border-color .25s; 73 71 } 74 .ewd-ufaq-dashboard-new-upgrade-button:hover { 72 73 .ewd-ufaq-dashboard-new-upgrade-button:hover{ 75 74 background: #915add; 76 75 border-color: #915add; 77 76 color: #fff; 78 77 } 79 .ewd-ufaq-dashboard-new-upgrade-button.ewd-ufaq-dashboard-new-trial-button { 78 79 .ewd-ufaq-dashboard-new-upgrade-button.ewd-ufaq-dashboard-new-trial-button{ 80 80 background-color: transparent; 81 81 border: 1px solid #0acbaa; 82 82 color: #0acbaa; 83 83 } 84 .ewd-ufaq-dashboard-new-upgrade-button.ewd-ufaq-dashboard-new-trial-button:hover { 84 85 .ewd-ufaq-dashboard-new-upgrade-button.ewd-ufaq-dashboard-new-trial-button:hover{ 85 86 background-color: #0acbaa; 86 87 border-color: #0acbaa; 87 88 color: #fff; 88 89 } 89 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text { 90 91 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text{ 90 92 position: absolute; 91 93 display: flex; … … 97 99 color: #fff; 98 100 } 99 .ewd-ufaq-dashboard-banner-title { 101 102 .ewd-ufaq-dashboard-banner-title{ 100 103 font-size: 29px; 101 104 line-height: 32px; 102 105 font-weight: bold; 103 106 } 104 .ewd-ufaq-dashboard-banner-brief { 107 108 .ewd-ufaq-dashboard-banner-brief{ 105 109 margin-top: 14px; 106 110 font-size: 14px; 107 111 } 108 112 113 109 114 @media screen and (min-width: 1700px) { 110 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{115 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{ 111 116 left: 272px; 112 117 } 113 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons { 118 119 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons{ 114 120 right: 228px; 115 121 } 116 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text { 122 123 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text{ 117 124 width: calc(100% - 880px); 118 125 left: 420px; 119 } 120 } 126 }} 127 121 128 @media screen and (max-width: 1200px) { 122 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{129 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{ 123 130 left: 54px; 124 131 } 125 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons { 132 133 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons{ 126 134 right: 32px; 127 135 } 128 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text { 136 137 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text{ 129 138 width: calc(100% - 466px); 130 139 left: 202px; 131 } 132 } 140 }} 141 133 142 @media screen and (max-width: 800px) { 134 .ewd-ufaq-dashboard-new-upgrade-banner{143 .ewd-ufaq-dashboard-new-upgrade-banner{ 135 144 height: 512px; 136 145 height: 300px; 137 146 } 138 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon { 147 148 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-icon{ 139 149 left: calc(50% - 56px); 140 150 top: 48px; 141 151 display: none; 142 152 } 143 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text { 153 154 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-text{ 144 155 width: 80%; 145 156 left: 10%; … … 150 161 top: 42px; 151 162 } 152 .ewd-ufaq-dashboard-banner-brief { 163 164 .ewd-ufaq-dashboard-banner-brief{ 153 165 display: none; 154 } 155 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons { 166 } 167 168 .ewd-ufaq-dashboard-new-upgrade-banner .ewd-ufaq-dashboard-banner-buttons{ 156 169 right: calc(50% - 96px); 157 170 top: 368px; 158 171 top: 172px; 159 } 160 } 161 162 163 /* MENU */ 164 165 .ewd-ufaq-admin-header-menu { 172 }} 173 174 .ewd-ufaq-admin-header-menu{ 166 175 margin: 48px 96px 0 76px; 167 176 } 168 .ewd-ufaq-admin-header-menu .nav-tab-wrapper { 177 178 .ewd-ufaq-admin-header-menu .nav-tab-wrapper{ 169 179 border: 0; 170 180 margin: 0; … … 174 184 border-bottom: 1px solid #e9e9e9; 175 185 } 176 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab { 186 187 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab{ 177 188 border: 0; 178 189 margin: 0 28px -1px 0; … … 183 194 font-size: 20px; 184 195 } 196 185 197 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab:nth-of-type(1n+2):hover, 186 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab.nav-tab-active {198 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab.nav-tab-active{ 187 199 color: #7B31AF; 188 200 border-bottom-color: #7B31AF; 189 201 } 190 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open { 202 203 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open{ 191 204 display: none; 192 205 align-items: center; 193 206 } 194 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open .dashicons { 207 208 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open .dashicons{ 195 209 display: flex; 196 210 justify-content: center; … … 204 218 width: 32px; 205 219 } 220 206 221 #ewd-ufaq-dash-mobile-menu-up-caret, 207 #ewd-ufaq-dash-mobile-menu-down-caret {222 #ewd-ufaq-dash-mobile-menu-down-caret{ 208 223 display: none; 209 224 } 210 225 211 226 227 212 228 @media screen and (max-width: 1600px) { 213 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab{229 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab{ 214 230 font-size: 18px; 215 } 216 } 231 }} 232 217 233 @media screen and (max-width: 1024px) { 218 .ewd-ufaq-admin-header-menu{234 .ewd-ufaq-admin-header-menu{ 219 235 margin: 40px 32px 0 22px; 220 236 } 221 .ewd-ufaq-admin-header-menu .nav-tab-wrapper { 237 238 .ewd-ufaq-admin-header-menu .nav-tab-wrapper{ 222 239 border-bottom: none; 223 240 } 224 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open { 241 242 .ewd-ufaq-admin-header-menu .nav-tab#ewd-ufaq-dash-mobile-menu-open{ 225 243 display: flex; 226 244 } 227 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab { 245 246 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab{ 228 247 font-size: 22px; 229 248 } 230 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab:nth-of-type(1) { 249 250 .ewd-ufaq-admin-header-menu .nav-tab-wrapper .nav-tab:nth-of-type(1){ 231 251 width: 100%; 232 252 font-size: 28px; 233 253 margin-bottom: 16px; 234 } 235 } 236 237 238 /* PAGE GLOBALS */ 239 240 .post-type-ufaq .wrap, 241 .ufaq_page_ewd-ufaq-ordering-table .wrap { 254 }} 255 256 .post-type-ufaq .wrap{ 242 257 padding: 0 96px; 243 258 } 244 .ufaq_page_ewd-ufaq-settings .wrap { 259 260 .ufaq_page_ewd-ufaq-settings .wrap{ 245 261 padding: 0; 246 262 } 247 .wrap h1 { 263 264 .wrap h1{ 248 265 display: inline-block; 249 266 width: 100%; … … 253 270 color: #212427; 254 271 } 272 255 273 @media screen and (max-width: 1024px) { 256 .post-type-ufaq .wrap, 257 .ufaq_page_ewd-ufaq-ordering-table .wrap { 274 .post-type-ufaq .wrap{ 258 275 padding: 0 32px 0 42px; 259 276 } 260 .ufaq_page_ewd-ufaq-settings .wrap { 277 278 .ufaq_page_ewd-ufaq-settings .wrap{ 261 279 padding: 0; 262 } 263 } 264 265 266 /* DASHBOARD */ 267 268 #ewd-ufaq-dashboard-content-area { 280 }} 281 282 #ewd-ufaq-dashboard-content-area{ 269 283 display: flex; 270 284 flex-direction: column; … … 274 288 box-sizing: border-box; 275 289 } 276 #ewd-ufaq-dashboard-content-area * { 290 291 #ewd-ufaq-dashboard-content-area *{ 277 292 box-sizing: border-box; 278 293 } 279 294 280 .ewd-ufaq-dashboard-visit-our-site {295 .ewd-ufaq-dashboard-visit-our-site{ 281 296 display: block; 282 297 text-align: center; … … 289 304 font-size: 16px; 290 305 } 306 291 307 .ewd-ufaq-dashboard-visit-our-site a, 292 .ewd-ufaq-dashboard-visit-our-site a:hover {308 .ewd-ufaq-dashboard-visit-our-site a:hover{ 293 309 color: #fff; 294 310 } 295 311 296 .ewd-ufaq-dashboard-support-widgets {312 .ewd-ufaq-dashboard-support-widgets{ 297 313 display: grid; 298 314 grid-template-columns: repeat(2, 1fr); … … 301 317 margin: 48px 0 0; 302 318 } 303 .ewd-ufaq-dashboard-support-widgets li { 319 320 .ewd-ufaq-dashboard-support-widgets li{ 304 321 display: flex; 305 322 flex-direction: column; … … 311 328 justify-content: space-between; 312 329 } 313 .ewd-ufaq-dashboard-support-widgets-title { 330 331 .ewd-ufaq-dashboard-support-widgets-title{ 314 332 font-size: 16px; 315 333 font-weight: bold; 316 334 color: #212427; 317 335 } 318 .ewd-ufaq-dashboard-support-widgets-text-and-link { 336 337 .ewd-ufaq-dashboard-support-widgets-text-and-link{ 319 338 display: flex; 320 339 justify-content: space-between; 321 340 align-items: center; 322 341 } 323 .ewd-ufaq-dashboard-support-widgets-text { 342 343 .ewd-ufaq-dashboard-support-widgets-text{ 324 344 font-size: 16px; 325 345 color: #5f5f5f; 326 346 } 327 .ewd-ufaq-dashboard-support-widgets-text span { 347 348 .ewd-ufaq-dashboard-support-widgets-text span{ 328 349 margin-right: 12px; 329 350 } 330 .ewd-ufaq-dashboard-support-widgets-link { 351 352 .ewd-ufaq-dashboard-support-widgets-link{ 331 353 display: flex; 332 354 justify-content: center; … … 344 366 transition: background .25s, color .25s, border-color .25s; 345 367 } 346 .ewd-ufaq-dashboard-support-widgets-link:hover { 368 369 .ewd-ufaq-dashboard-support-widgets-link:hover{ 347 370 background: #915add; 348 371 border-color: #915add; … … 350 373 } 351 374 352 .ewd-ufaq-dashboard-catalogs {375 .ewd-ufaq-dashboard-catalogs{ 353 376 display: flex; 354 377 flex-direction: column; … … 358 381 margin: 40px 0 0; 359 382 } 360 .ewd-ufaq-dashboard-catalogs-title { 383 384 .ewd-ufaq-dashboard-catalogs-title{ 361 385 font-size: 16px; 362 386 font-weight: bold; … … 365 389 } 366 390 367 .ewd-ufaq-license-status summary {391 .ewd-ufaq-license-status summary{ 368 392 cursor: pointer; 369 393 } 370 .ewd-ufaq-license-status form { 394 395 .ewd-ufaq-license-status form{ 371 396 margin-top: 16px; 372 397 display: flex; … … 375 400 gap: 12px; 376 401 } 377 .ewd-ufaq-license-status form:first-of-type { 402 403 .ewd-ufaq-license-status form:first-of-type{ 378 404 margin-bottom: 32px; 379 405 } 380 .ewd-ufaq-license-status input[type="text"] { 406 407 .ewd-ufaq-license-status input[type="text"]{ 381 408 min-height: 30px; 382 409 height: 30px; … … 384 411 margin: 0; 385 412 } 386 .ewd-ufaq-license-status input[name="key"], .ewd-ufaq-license-status button[name="ewd_upgrade_to_full"] { 413 414 .ewd-ufaq-license-status input[name="key"], .ewd-ufaq-license-status button[name="ewd_upgrade_to_full"]{ 387 415 height: 40px; 388 416 } 389 417 390 .ewd-ufaq-dashboard-get-premium-and-trial { 391 display: flex; 392 flex-direction: column; 393 } 394 .ewd-ufaq-dashboard-get-premium-and-trial.trial-happening { 418 .ewd-ufaq-dashboard-get-premium-and-trial{ 419 display: flex; 420 flex-direction: column; 421 } 422 423 .ewd-ufaq-dashboard-get-premium-and-trial.trial-happening{ 395 424 flex-direction: row; 396 425 justify-content: space-between; 397 426 } 398 427 399 #ewd-ufaq-dashboard-new-footer-one {428 #ewd-ufaq-dashboard-new-footer-one{ 400 429 display: flex; 401 430 flex-direction: column; … … 406 435 background: #7B31AF; 407 436 } 408 .ewd-ufaq-dashboard-new-footer-one-inside { 437 438 .ewd-ufaq-dashboard-new-footer-one-inside{ 409 439 display: flex; 410 440 justify-content: space-between; … … 412 442 width: 100%; 413 443 } 414 .ewd-ufaq-dashboard-new-footer-one-left { 444 445 .ewd-ufaq-dashboard-new-footer-one-left{ 415 446 display: flex; 416 447 flex-direction: column; … … 418 449 margin-bottom: 32px; 419 450 } 420 .ewd-ufaq-dashboard-new-footer-one-title { 451 452 .ewd-ufaq-dashboard-new-footer-one-title{ 421 453 font-size: 16px; 422 454 font-weight: bold; … … 424 456 line-height: 1.2; 425 457 } 426 .ewd-ufaq-dashboard-new-footer-one-benefits { 458 459 .ewd-ufaq-dashboard-new-footer-one-benefits{ 427 460 width: 100%; 428 461 margin-top: 32px; … … 433 466 margin: 40px 0 0; 434 467 } 435 .ewd-ufaq-dashboard-new-footer-one-benefits li { 468 469 .ewd-ufaq-dashboard-new-footer-one-benefits li{ 436 470 margin: 0; 437 471 padding-left: 36px; … … 444 478 color: #fbfbfb 445 479 } 446 .ewd-ufaq-dashboard-new-footer-one-buttons { 480 481 .ewd-ufaq-dashboard-new-footer-one-buttons{ 447 482 display: flex; 448 483 flex-direction: column; 449 484 width: 192px; 450 485 } 451 .ewd-ufaq-dashboard-new-footer-one-buttons .ewd-ufaq-dashboard-new-upgrade-button { 486 487 .ewd-ufaq-dashboard-new-footer-one-buttons .ewd-ufaq-dashboard-new-upgrade-button{ 452 488 background: #fff; 453 489 border: 1px solid #fff; … … 456 492 transition: background .25s, color .25s, border-color .25s; 457 493 } 458 .ewd-ufaq-dashboard-new-footer-one-buttons .ewd-ufaq-dashboard-new-upgrade-button:hover { 494 495 .ewd-ufaq-dashboard-new-footer-one-buttons .ewd-ufaq-dashboard-new-upgrade-button:hover{ 459 496 background: #ece2f3; 460 497 border-color: #ece2f3; 461 498 color: #212427; 462 499 } 463 .ewd-premium-helper-dashboard-get-premium-widget-button { 500 501 .ewd-premium-helper-dashboard-get-premium-widget-button{ 464 502 background: transparent !important; 465 503 border: 1px solid #fff !important; 466 504 color: #fff !important; 467 505 } 468 .ewd-premium-helper-dashboard-get-premium-widget-button:hover { 506 507 .ewd-premium-helper-dashboard-get-premium-widget-button:hover{ 469 508 background: #fff !important; 470 509 border-color: #fff !important; 471 510 color: #212427 !important; 472 511 } 473 .trial-happening #ewd-ufaq-dashboard-new-footer-one { 512 513 .trial-happening #ewd-ufaq-dashboard-new-footer-one{ 474 514 width: calc(70% - 12px); 475 515 } 476 .trial-happening .ewd-ufaq-dashboard-new-footer-one-inside { 477 flex-direction: column; 478 } 479 .trial-happening .ewd-ufaq-dashboard-new-footer-one-left { 516 517 .trial-happening .ewd-ufaq-dashboard-new-footer-one-inside{ 518 flex-direction: column; 519 } 520 521 .trial-happening .ewd-ufaq-dashboard-new-footer-one-left{ 480 522 width: 100%; 481 523 } 482 .trial-happening .ewd-ufaq-dashboard-new-footer-one-title { 524 525 .trial-happening .ewd-ufaq-dashboard-new-footer-one-title{ 483 526 text-align: center; 484 527 } 485 .trial-happening .ewd-ufaq-dashboard-new-footer-one-benefits { 528 529 .trial-happening .ewd-ufaq-dashboard-new-footer-one-benefits{ 486 530 grid-template-columns: repeat(2, 1fr); 487 531 } 488 .trial-happening .ewd-ufaq-dashboard-new-footer-one-buttons { 532 533 .trial-happening .ewd-ufaq-dashboard-new-footer-one-buttons{ 489 534 width: 100%; 490 535 justify-content: center; … … 492 537 } 493 538 494 .ewd-ufaq-dashboard-trial-container {539 .ewd-ufaq-dashboard-trial-container{ 495 540 display: flex; 496 541 flex-direction: column; … … 500 545 margin: 40px 0 0; 501 546 } 502 .trial-happening .ewd-ufaq-dashboard-trial-container { 547 548 .trial-happening .ewd-ufaq-dashboard-trial-container{ 503 549 width: calc(30% - 12px); 504 550 } 505 551 506 .ewd-ufaq-dashboard-guarantee {552 .ewd-ufaq-dashboard-guarantee{ 507 553 display: flex; 508 554 align-items: center; … … 512 558 color: #5f5f5f; 513 559 } 514 .ewd-ufaq-dashboard-guarantee img { 560 561 .ewd-ufaq-dashboard-guarantee img{ 515 562 width: 128px; 516 563 height: auto; 517 564 margin-right: 32px; 518 565 } 519 .ewd-ufaq-dashboard-guarantee-title-and-text { 520 display: flex; 521 flex-direction: column; 522 } 523 .ewd-ufaq-dashboard-guarantee-title { 566 567 .ewd-ufaq-dashboard-guarantee-title-and-text{ 568 display: flex; 569 flex-direction: column; 570 } 571 572 .ewd-ufaq-dashboard-guarantee-title{ 524 573 font-size: 24px; 525 574 font-weight: bold; … … 528 577 color: #212427 529 578 } 530 .ewd-ufaq-dashboard-guarantee-text { 579 580 .ewd-ufaq-dashboard-guarantee-text{ 531 581 font-size: 14px; 532 582 font-weight: normal; 533 583 } 534 535 .ewd-ufaq-dashboard-testimonials-and-other-plugins {584 585 .ewd-ufaq-dashboard-testimonials-and-other-plugins{ 536 586 display: flex; 537 587 justify-content: space-between; 538 588 } 539 589 540 .ewd-ufaq-dashboard-other-plugins-container {590 .ewd-ufaq-dashboard-other-plugins-container{ 541 591 display: flex; 542 592 flex-direction: column; … … 548 598 background: linear-gradient(91.21deg, rgba(120, 48, 170, 0.5) -9.34%, rgba(255, 255, 255, 0) 34.79%, rgba(251, 250, 252, 0.0105472) 81.09%, rgba(89, 36, 126, 0.5) 133.01%); 549 599 } 550 .ewd-ufaq-dashboard-other-plugins-container-title { 600 601 .ewd-ufaq-dashboard-other-plugins-container-title{ 551 602 font-size: 16px; 552 603 font-weight: bold; … … 554 605 margin-bottom: 8px; 555 606 } 556 .ewd-ufaq-dashboard-other-plugins { 607 608 .ewd-ufaq-dashboard-other-plugins{ 557 609 display: flex; 558 610 flex-direction: column; 559 611 margin: 0; 560 612 } 561 .ewd-ufaq-dashboard-other-plugins li { 613 614 .ewd-ufaq-dashboard-other-plugins li{ 562 615 display: flex; 563 616 margin: 28px 0 0; 564 617 } 565 .ewd-ufaq-dashboard-other-plugins li img { 618 619 .ewd-ufaq-dashboard-other-plugins li img{ 566 620 width: 120px; 567 621 height: 120px; 568 622 margin-right: 20px; 569 623 } 570 .ewd-ufaq-dashboard-other-plugins-text { 571 display: flex; 572 flex-direction: column; 573 } 574 .ewd-ufaq-dashboard-other-plugins-title { 624 625 .ewd-ufaq-dashboard-other-plugins-text{ 626 display: flex; 627 flex-direction: column; 628 } 629 630 .ewd-ufaq-dashboard-other-plugins-title{ 575 631 font-size: 16px; 576 632 font-weight: bold; … … 578 634 color: #212427; 579 635 } 580 .ewd-ufaq-dashboard-other-plugins-blurb { 636 637 .ewd-ufaq-dashboard-other-plugins-blurb{ 581 638 font-size: 14px; 582 639 color: #5f5f5f; 583 640 } 584 641 585 .ewd-ufaq-dashboard-testimonials-container {642 .ewd-ufaq-dashboard-testimonials-container{ 586 643 display: flex; 587 644 flex-direction: column; … … 593 650 background: linear-gradient(91.21deg, rgba(120, 48, 170, 0.5) -9.34%, rgba(255, 255, 255, 0) 34.79%, rgba(251, 250, 252, 0.0105472) 81.09%, rgba(89, 36, 126, 0.5) 133.01%); 594 651 } 595 .ewd-ufaq-dashboard-testimonials-container-title { 652 653 .ewd-ufaq-dashboard-testimonials-container-title{ 596 654 font-size: 16px; 597 655 font-weight: bold; … … 599 657 margin-bottom: 8px; 600 658 } 601 .ewd-ufaq-dashboard-testimonials { 602 display: flex; 603 flex-direction: column; 604 } 605 .ewd-ufaq-dashboard-testimonials li { 659 660 .ewd-ufaq-dashboard-testimonials{ 661 display: flex; 662 flex-direction: column; 663 } 664 665 .ewd-ufaq-dashboard-testimonials li{ 606 666 text-align: center; 607 667 } 608 .ewd-ufaq-dashboard-testimonials li img { 668 669 .ewd-ufaq-dashboard-testimonials li img{ 609 670 width: 140px; 610 671 height: auto; 611 672 margin-top: 8px; 612 673 } 613 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-title { 674 675 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-title{ 614 676 margin: 28px 0 20px; 615 677 font-size: 30px; … … 618 680 color: #212427; 619 681 } 620 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-author { 682 683 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-author{ 621 684 font-size: 16px; 622 685 color: #5f5f5f; 623 686 } 624 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text { 687 688 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text{ 625 689 padding: 24px 10% 0; 626 690 font-size: 14px; 627 691 color: #5f5f5f; 628 692 } 629 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text a { 693 694 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text a{ 630 695 color: #0acbaa; 631 696 text-decoration: none; 632 697 font-weight: bold; 633 698 } 634 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text a:hover { 699 700 .ewd-ufaq-dashboard-testimonials li .ewd-ufaq-dashboard-testimonial-text a:hover{ 635 701 color: #1CE6C3; 636 702 } 703 637 704 638 705 @media screen and (max-width: 1024px) { 639 #ewd-ufaq-dashboard-content-area{706 #ewd-ufaq-dashboard-content-area{ 640 707 padding: 0 32px 0 22px; 641 708 } 642 .ewd-ufaq-dashboard-support-widgets { 709 710 .ewd-ufaq-dashboard-support-widgets{ 643 711 grid-template-columns: repeat(1, 1fr); 644 712 } 645 .ewd-ufaq-dashboard-get-premium-and-trial.trial-happening { 713 714 .ewd-ufaq-dashboard-get-premium-and-trial.trial-happening{ 646 715 flex-direction: column; 647 716 justify-content: initial; 648 717 } 649 .trial-happening #ewd-ufaq-dashboard-new-footer-one, 650 .trial-happening .ewd-ufaq-dashboard-trial-container { 718 719 .trial-happening #ewd-ufaq-dashboard-new-footer-one, 720 .trial-happening .ewd-ufaq-dashboard-trial-container{ 651 721 width: 100%; 652 722 } 653 .ewd-ufaq-dashboard-new-footer-one-inside { 723 724 .ewd-ufaq-dashboard-new-footer-one-inside{ 654 725 flex-direction: column; 655 726 } 656 .ewd-ufaq-dashboard-new-footer-one-left { 727 728 .ewd-ufaq-dashboard-new-footer-one-left{ 657 729 width: 100%; 658 730 } 659 .ewd-ufaq-dashboard-new-footer-one-title { 731 732 .ewd-ufaq-dashboard-new-footer-one-title{ 660 733 text-align: center; 661 734 } 662 .ewd-ufaq-dashboard-new-footer-one-benefits { 735 736 .ewd-ufaq-dashboard-new-footer-one-benefits{ 663 737 grid-template-columns: repeat(2, 1fr); 664 738 } 665 .ewd-ufaq-dashboard-new-footer-one-buttons { 739 740 .ewd-ufaq-dashboard-new-footer-one-buttons{ 666 741 width: 100%; 667 742 justify-content: center; 668 743 margin-top: 32px; 669 744 } 670 .ewd-ufaq-dashboard-testimonials-and-other-plugins { 745 746 .ewd-ufaq-dashboard-testimonials-and-other-plugins{ 671 747 flex-direction: column; 672 748 justify-content: initial; 673 749 } 674 .ewd-ufaq-dashboard-other-plugins-container, 675 .ewd-ufaq-dashboard-testimonials-container { 750 751 .ewd-ufaq-dashboard-other-plugins-container, 752 .ewd-ufaq-dashboard-testimonials-container{ 676 753 width: 100%; 677 } 678 }754 }} 755 679 756 @media screen and (max-width: 568px) { 680 .ewd-ufaq-dashboard-new-footer-one-benefits,681 .trial-happening .ewd-ufaq-dashboard-new-footer-one-benefits {757 .ewd-ufaq-dashboard-new-footer-one-benefits, 758 .trial-happening .ewd-ufaq-dashboard-new-footer-one-benefits{ 682 759 grid-template-columns: repeat(1, 1fr); 683 } 684 } 685 686 687 /* FOOTER */ 688 689 #ewd-ufaq-dashboard-new-footer-two { 760 }} 761 762 #ewd-ufaq-dashboard-new-footer-two{ 690 763 display: flex; 691 764 margin: 40px 0 0 -20px; … … 695 768 box-sizing: border-box; 696 769 } 697 #ewd-ufaq-dashboard-new-footer-two * { 770 771 #ewd-ufaq-dashboard-new-footer-two *{ 698 772 box-sizing: border-box; 699 773 } 700 .ewd-ufaq-dashboard-new-footer-two-inside { 774 775 .ewd-ufaq-dashboard-new-footer-two-inside{ 701 776 display: flex; 702 777 flex-wrap: wrap; … … 704 779 padding: 48px 96px; 705 780 } 706 .ewd-ufaq-dashboard-new-footer-two-icon { 781 782 .ewd-ufaq-dashboard-new-footer-two-icon{ 707 783 width: 110px; 708 784 height: 105px; 709 785 margin-right: 40px; 710 786 } 711 .ewd-ufaq-dashboard-new-footer-two-blurb { 787 788 .ewd-ufaq-dashboard-new-footer-two-blurb{ 712 789 width: 300px; 713 790 line-height: 1.7; 714 791 font-size: 12px; 715 792 } 716 .ewd-ufaq-dashboard-new-footer-two-menu { 793 794 .ewd-ufaq-dashboard-new-footer-two-menu{ 717 795 width: 150px; 718 796 margin: 0; … … 722 800 flex-direction: column; 723 801 } 724 .ewd-ufaq-dashboard-new-footer-two-menu:first-of-type { 802 803 .ewd-ufaq-dashboard-new-footer-two-menu:first-of-type{ 725 804 margin-left: auto; 726 805 } 727 .ewd-ufaq-dashboard-new-footer-two-menu li { 806 807 .ewd-ufaq-dashboard-new-footer-two-menu li{ 728 808 font-weight: bold; 729 809 margin-bottom: 4px; … … 731 811 font-size: 14px; 732 812 } 733 .ewd-ufaq-dashboard-new-footer-two-menu li:first-of-type { 813 814 .ewd-ufaq-dashboard-new-footer-two-menu li:first-of-type{ 734 815 margin-bottom: 9px; 735 816 } 736 .ewd-ufaq-dashboard-new-footer-two-menu li:last-of-type { 817 818 .ewd-ufaq-dashboard-new-footer-two-menu li:last-of-type{ 737 819 margin-bottom: 0; 738 820 } 739 .ewd-ufaq-dashboard-new-footer-two-menu li a { 821 822 .ewd-ufaq-dashboard-new-footer-two-menu li a{ 740 823 font-weight: normal; 741 824 color: #D3DFF5; … … 743 826 font-size: 14px; 744 827 } 745 .ewd-ufaq-dashboard-new-footer-two-menu li a:hover { 828 829 .ewd-ufaq-dashboard-new-footer-two-menu li a:hover{ 746 830 color: #fff; 747 831 } 748 832 833 749 834 @media screen and (max-width: 1024px) { 750 .ewd-ufaq-dashboard-new-footer-two-inside{835 .ewd-ufaq-dashboard-new-footer-two-inside{ 751 836 flex-direction: column; 752 837 flex-wrap: nowrap; 753 838 align-items: center; 754 } 755 .ewd-ufaq-dashboard-new-footer-two-icon { 839 } 840 841 .ewd-ufaq-dashboard-new-footer-two-icon{ 756 842 margin-right: 0; 757 843 } 758 .ewd-ufaq-dashboard-new-footer-two-blurb { 844 845 .ewd-ufaq-dashboard-new-footer-two-blurb{ 759 846 display: none; 760 847 } 761 .ewd-ufaq-dashboard-new-footer-two-menu, 762 .ewd-ufaq-dashboard-new-footer-two-menu:first-of-type { 848 849 .ewd-ufaq-dashboard-new-footer-two-menu, 850 .ewd-ufaq-dashboard-new-footer-two-menu:first-of-type{ 763 851 margin: 32px 0 0; 764 852 } 765 .ewd-ufaq-dashboard-new-footer-two-menu li { 853 854 .ewd-ufaq-dashboard-new-footer-two-menu li{ 766 855 text-align: center; 767 856 margin-bottom: 4px; 768 857 font-size: 14px; 769 858 } 770 .ewd-ufaq-dashboard-new-footer-two-menu li:first-of-type { 859 860 .ewd-ufaq-dashboard-new-footer-two-menu li:first-of-type{ 771 861 margin-bottom: 9px; 772 862 } 773 .ewd-ufaq-dashboard-new-footer-two-menu li:last-of-type { 863 864 .ewd-ufaq-dashboard-new-footer-two-menu li:last-of-type{ 774 865 margin-bottom: 0; 775 866 } 776 .ewd-ufaq-dashboard-new-footer-two-menu li a { 867 868 .ewd-ufaq-dashboard-new-footer-two-menu li a{ 777 869 font-size: 14px; 778 } 779 } 780 781 782 /* SETTINGS PREVIEW */ 783 784 .ewd-ufaq-settings-preview { 870 }} 871 872 .ewd-ufaq-settings-preview{ 785 873 display: flex; 786 874 flex-direction: column; … … 788 876 padding: 24px 96px 0 96px; 789 877 } 790 .ewd-ufaq-settings-preview h2 { 878 879 .ewd-ufaq-settings-preview h2{ 791 880 display: block !important; 792 881 font-size: 28px !important; 793 882 padding: 0 !important; 794 883 } 795 .ewd-ufaq-settings-preview h2 span { 884 885 .ewd-ufaq-settings-preview h2 span{ 796 886 position: absolute; 797 887 margin-left: 16px; … … 802 892 padding: 2px 8px; 803 893 text-transform: uppercase; 804 } 805 .ewd-ufaq-settings-preview p { 894 } 895 896 .ewd-ufaq-settings-preview p{ 806 897 margin: 40px 0 16px; 807 898 font-size: 16px; 808 899 color: #5f5f5f; 809 } 810 .ewd-ufaq-settings-preview-images { 900 } 901 902 .ewd-ufaq-settings-preview-images{ 811 903 display: flex; 812 904 justify-content: space-between; 813 905 width: 100%; 814 906 } 815 .ewd-ufaq-settings-preview-images img { 907 908 .ewd-ufaq-settings-preview-images img{ 816 909 width: calc(50% - 12px); 817 910 border: 1px solid #ddd; … … 820 913 } 821 914 822 .ewd-ufaq-settings-preview-other-features {915 .ewd-ufaq-settings-preview-other-features{ 823 916 display: flex; 824 917 flex-direction: column; … … 826 919 } 827 920 921 828 922 @media screen and (max-width: 1024px) { 829 .ewd-ufaq-settings-preview{923 .ewd-ufaq-settings-preview{ 830 924 padding: 24px 32px 0 42px; 831 } 832 } 925 }} 926 833 927 @media screen and (max-width: 768px) { 834 .ewd-ufaq-settings-preview-images{928 .ewd-ufaq-settings-preview-images{ 835 929 flex-direction: column; 836 930 justify-content: initial; 837 931 } 838 .ewd-ufaq-settings-preview-images img { 932 933 .ewd-ufaq-settings-preview-images img{ 839 934 width: 100%; 840 } 841 } 842 843 844 /******************************** 845 SEARCH TERMS TABLE IN SETTINGS 846 ********************************/ 847 848 .ewd-ufaq-search-terms-box, 849 .ewd-ufaq-search-terms-box * { 850 box-sizing: border-box; 851 } 852 .ewd-ufaq-search-terms-box { 853 position: relative; 854 display: flex; 855 flex-direction: column; 856 width: 100%; 857 max-width: 400px; 858 border: 1px solid #ccc; 859 border-radius: 14px; 860 margin: 21px 0 0; 861 } 862 .ewd-ufaq-search-term-each { 863 display: flex; 864 flex-basis: 100%; 865 border-bottom: 1px solid #ccc; 866 } 867 .ewd-ufaq-search-term-each:last-of-type { 868 border-bottom: none; 869 } 870 .ewd-ufaq-search-term-each-label, 871 .ewd-ufaq-search-term-each-value { 872 padding: 10px 16px; 873 } 874 .ewd-ufaq-search-term-each-label { 875 border-right: 1px solid #ccc; 876 font-weight: bold; 877 flex-basis: 80%; 878 } 879 .ewd-ufaq-search-term-each-value { 880 flex-basis: 20%; 881 text-align: center; 882 } 883 .ewd-ufaq-settings-reset-search-terms { 935 }} 936 937 .ewd-ufaq-settings-reset-search-terms{ 884 938 position: relative; 885 939 float: left; … … 896 950 transition: background .35s; 897 951 } 898 .ewd-ufaq-settings-reset-search-terms:hover { 952 953 .ewd-ufaq-settings-reset-search-terms:hover{ 899 954 background: #894ae1; 900 955 } 901 956 902 903 /************ 904 EXTRA 905 ************/ 906 907 #ewd-ufaq-custom-fields-table select { 908 width: 100% !important; 909 } 910 #ewd-ufaq-custom-fields-table th { 911 padding: 20px 10px 20px 10px !important; 912 } 913 914 .ewd-ufaq-import-export-container { 915 position: relative; 916 float: left; 917 margin-left: 32px; 918 width: calc(100% - 32px); 919 } 920 921 input[name="ewd_ufaq_export_pdf"] { 957 input[name="ewd_ufaq_export_pdf"]{ 922 958 margin-top: 8px !important; 923 959 } 924 960 925 .ewd-ufaq-meta-field label {961 .ewd-ufaq-meta-field label{ 926 962 display: inline-block; 927 963 width: 150px; 928 964 margin: 12px 0; 929 965 } 966 930 967 931 968 … … 947 984 } 948 985 949 .ewd-ufaq-toggle-symbol {986 .ewd-ufaq-toggle-symbol{ 950 987 font-family: 'ewd-toggle-icon'; 951 988 letter-spacing: 6px; … … 953 990 } 954 991 955 input[name=toggle_symbol] {992 input[name=toggle_symbol]{ 956 993 margin-right: 10px; 957 994 } 958 995 959 960 /**************** 961 ORDER TABLE 962 ****************/ 963 #ewd-ufaq-ordering-table-container { 964 width: 100%; 965 } 966 #ewd-ufaq-ordering-table-explanation { 967 font-size: 16px; 968 color: #212427; 969 margin-bottom: 28px; 970 } 971 .ewd-ufaq-ordering-table thead tr, 972 .ewd-ufaq-ordering-table tfoot tr { 973 background: #F8F4FF; 974 } 975 .ewd-ufaq-ordering-table th { 976 padding: 12px 10px; 977 } 978 .ewd-ufaq-ordering-table td { 979 padding: 8px 10px; 980 } 981 .ewd-ufaq-ordering-table tbody tr:nth-of-type(2n+2) { 982 background: #F8F4FF; 983 } 984 985 986 /* 987 ============================================== 988 About Us page 989 ============================================== 990 */ 991 992 .ufaq_page_ewd-ufaq-about-us #wpcontent { 996 .ufaq_page_ewd-ufaq-about-us #wpcontent{ 993 997 background: #fff; 994 998 } 995 999 996 .ewd-ufaq-about-us-logo {1000 .ewd-ufaq-about-us-logo{ 997 1001 display: flex; 998 1002 width: 100%; 999 1003 padding: 24px 0 0 32px; 1000 1004 } 1001 .ewd-ufaq-about-us-logo img { 1005 1006 .ewd-ufaq-about-us-logo img{ 1002 1007 width: 300px; 1003 1008 height: auto; … … 1007 1012 #ewd-ufaq-about-us-tabs-menu *, 1008 1013 .ewd-ufaq-about-us-tab, 1009 .ewd-ufaq-about-us-tab * {1014 .ewd-ufaq-about-us-tab *{ 1010 1015 box-sizing: border-box; 1011 1016 } 1012 1017 1013 .ewd-ufaq-about-us-tabs {1018 .ewd-ufaq-about-us-tabs{ 1014 1019 display: flex; 1015 1020 flex-direction: column; … … 1021 1026 } 1022 1027 1023 #ewd-ufaq-about-us-tabs-menu {1028 #ewd-ufaq-about-us-tabs-menu{ 1024 1029 display: flex; 1025 1030 justify-content: space-between; … … 1029 1034 margin: 0; 1030 1035 } 1031 .ewd-ufaq-about-us-tab-menu-item { 1036 1037 .ewd-ufaq-about-us-tab-menu-item{ 1032 1038 width: 25%; 1033 1039 background: #f3f3f3; … … 1042 1048 transition: background .35s; 1043 1049 } 1044 .ewd-ufaq-about-us-tab-menu-item:hover { 1050 1051 .ewd-ufaq-about-us-tab-menu-item:hover{ 1045 1052 background: #fff; 1046 1053 color: #000; 1047 1054 } 1048 .ewd-ufaq-about-us-tab-menu-item.ewd-ufaq-tab-selected { 1055 1056 .ewd-ufaq-about-us-tab-menu-item.ewd-ufaq-tab-selected{ 1049 1057 background: #fff; 1050 1058 color: #000; 1051 1059 border-bottom: none; 1052 1060 } 1053 .ewd-ufaq-about-us-tab-menu-item:first-of-type { 1061 1062 .ewd-ufaq-about-us-tab-menu-item:first-of-type{ 1054 1063 border-left: none; 1055 1064 } 1056 1065 1057 .ewd-ufaq-about-us-tab {1066 .ewd-ufaq-about-us-tab{ 1058 1067 display: flex; 1059 1068 flex-direction: column; … … 1062 1071 width: 100%; 1063 1072 } 1064 .ewd-ufaq-about-us-tab p { 1073 1074 .ewd-ufaq-about-us-tab p{ 1065 1075 color: #555; 1066 1076 } 1077 1067 1078 .ewd-ufaq-about-us-feature-suggestion input, 1068 .ewd-ufaq-about-us-feature-suggestion textarea {1079 .ewd-ufaq-about-us-feature-suggestion textarea{ 1069 1080 width: 100%; 1070 1081 max-width: 400px; … … 1077 1088 font-weight: normal; 1078 1089 } 1079 .ewd-ufaq-about-us-feature-suggestion textarea { 1090 1091 .ewd-ufaq-about-us-feature-suggestion textarea{ 1080 1092 min-height: 160px; 1081 1093 } 1082 1094 1083 .ewd-ufaq-about-us-tab-button {1095 .ewd-ufaq-about-us-tab-button{ 1084 1096 display: flex; 1085 1097 margin-top: 12px; … … 1092 1104 transition: background .35s; 1093 1105 } 1094 .ewd-ufaq-about-us-tab-button-purchase { 1106 1107 .ewd-ufaq-about-us-tab-button-purchase{ 1095 1108 background: #6026B4; 1096 1109 color: #fff; 1097 1110 margin-top: 24px; 1098 1111 } 1099 .ewd-ufaq-about-us-tab-button-purchase:hover { 1112 1113 .ewd-ufaq-about-us-tab-button-purchase:hover{ 1100 1114 background: #7a40cb; 1101 1115 color: #fff; 1102 1116 } 1103 .ewd-ufaq-about-us-tab-button-walkthrough { 1117 1118 .ewd-ufaq-about-us-tab-button-walkthrough{ 1104 1119 background: #6026B4; 1105 1120 color: #fff; 1106 1121 margin-bottom: 24px; 1107 1122 } 1108 .ewd-ufaq-about-us-tab-button-walkthrough:hover { 1123 1124 .ewd-ufaq-about-us-tab-button-walkthrough:hover{ 1109 1125 background: #7a40cb; 1110 1126 color: #fff; 1111 1127 } 1112 .ewd-ufaq-about-us-tab-button-youtube { 1128 1129 .ewd-ufaq-about-us-tab-button-youtube{ 1113 1130 background: #f00; 1114 1131 color: #fff; 1115 1132 } 1116 .ewd-ufaq-about-us-tab-button-youtube:hover { 1133 1134 .ewd-ufaq-about-us-tab-button-youtube:hover{ 1117 1135 background: #fe4c4c; 1118 1136 color: #fff; 1119 1137 } 1120 .ewd-ufaq-about-us-send-feature-suggestion { 1138 1139 .ewd-ufaq-about-us-send-feature-suggestion{ 1121 1140 background: #6026B4; 1122 1141 color: #fff; 1123 1142 } 1124 .ewd-ufaq-about-us-send-feature-suggestion:hover { 1143 1144 .ewd-ufaq-about-us-send-feature-suggestion:hover{ 1125 1145 background: #7a40cb; 1126 1146 color: #fff; 1127 1147 } 1128 1148 1129 .ewd-ufaq-about-us-premium-table {1149 .ewd-ufaq-about-us-premium-table{ 1130 1150 display: flex; 1131 1151 flex-direction: column; … … 1137 1157 overflow: hidden; 1138 1158 } 1159 1139 1160 .ewd-ufaq-about-us-premium-table-head, 1140 .ewd-ufaq-about-us-premium-table-body {1161 .ewd-ufaq-about-us-premium-table-body{ 1141 1162 display: flex; 1142 1163 justify-content: space-between; 1143 1164 } 1144 .ewd-ufaq-about-us-premium-table-cell { 1165 1166 .ewd-ufaq-about-us-premium-table-cell{ 1145 1167 display: flex; 1146 1168 align-items: center; … … 1150 1172 padding: 8px 16px; 1151 1173 } 1152 .ewd-ufaq-about-us-premium-table-cell:first-of-type { 1174 1175 .ewd-ufaq-about-us-premium-table-cell:first-of-type{ 1153 1176 border-left: none; 1154 1177 } 1155 .ewd-ufaq-about-us-premium-table-cell:last-of-type { 1178 1179 .ewd-ufaq-about-us-premium-table-cell:last-of-type{ 1156 1180 background: #f8f1ff; 1157 1181 } 1158 1182 1159 .ewd-ufaq-about-us-premium-table-head .ewd-ufaq-about-us-premium-table-cell {1183 .ewd-ufaq-about-us-premium-table-head .ewd-ufaq-about-us-premium-table-cell{ 1160 1184 font-weight: bold; 1161 1185 border-top: none; 1162 1186 } 1163 .ewd-ufaq-about-us-premium-table-cell img { 1187 1188 .ewd-ufaq-about-us-premium-table-cell img{ 1164 1189 width: 16px; 1165 1190 height: auto; 1166 1191 } 1167 1192 1193 1168 1194 @media screen and (max-width: 668px) { 1169 #ewd-ufaq-about-us-tabs-menu {1195 #ewd-ufaq-about-us-tabs-menu{ 1170 1196 flex-wrap: wrap; 1171 1197 } 1172 .ewd-ufaq-about-us-tab-menu-item { 1198 1199 .ewd-ufaq-about-us-tab-menu-item{ 1173 1200 width: 100%; 1174 1201 border-left: none; 1175 1202 } 1176 .ewd-ufaq-about-us-tab-menu-item.ewd-ufaq-tab-selected { 1203 1204 .ewd-ufaq-about-us-tab-menu-item.ewd-ufaq-tab-selected{ 1177 1205 background: #fff; 1178 1206 color: #000; 1179 1207 border-bottom: 1px solid #ddd; 1180 } 1181 } 1182 1183 1184 /* OVERWRITING EWDPH STYLING */ 1185 1186 .ewd-premium-helper-dashboard-new-widget-box { 1208 }} 1209 1210 .ewd-premium-helper-dashboard-new-widget-box{ 1187 1211 float: none !important; 1188 1212 background: transparent !important; … … 1190 1214 margin: 48px 0 -8px !important; 1191 1215 } 1192 .ewd-premium-helper-dashboard-new-widget-box-top { 1216 1217 .ewd-premium-helper-dashboard-new-widget-box-top{ 1193 1218 font-weight: normal !important; 1194 1219 color: #5f5f5f !important; … … 1201 1226 padding: 32px !important; 1202 1227 } 1203 .ewd-premium-helper-dashboard-key-widget { 1228 1229 .ewd-premium-helper-dashboard-key-widget{ 1204 1230 display: flex; 1205 1231 flex-wrap: wrap; … … 1214 1240 background-repeat: no-repeat; 1215 1241 } 1216 .ewd-premium-helper-dashboard-key-widget-input { 1242 1243 .ewd-premium-helper-dashboard-key-widget-input{ 1217 1244 float: none !important; 1218 1245 display: flex; … … 1228 1255 color: #737373 !important 1229 1256 } 1230 .ewd-premium-helper-dashboard-key-widget-input::placeholder { 1257 1258 .ewd-premium-helper-dashboard-key-widget-input::placeholder{ 1231 1259 color: #bbb; 1232 1260 } 1233 .ewd-premium-helper-dashboard-key-widget-submit { 1261 1262 .ewd-premium-helper-dashboard-key-widget-submit{ 1234 1263 float: none !important; 1235 1264 display: flex; … … 1250 1279 text-transform: uppercase; 1251 1280 } 1252 .ewd-premium-helper-dashboard-key-widget-submit:hover { 1281 1282 .ewd-premium-helper-dashboard-key-widget-submit:hover{ 1253 1283 background: #F2BD49; 1254 1284 } 1255 .ewd-premium-helper-dashboard-key-widget-text { 1285 1286 .ewd-premium-helper-dashboard-key-widget-text{ 1256 1287 float: none !important; 1257 1288 width: 100%; … … 1262 1293 font-weight: normal; 1263 1294 } 1264 .ewd-premium-helper-dashboard-key-widget-text a { 1295 1296 .ewd-premium-helper-dashboard-key-widget-text a{ 1265 1297 color: #0acbaa; 1266 1298 text-decoration: none; 1267 1299 font-weight: bold; 1268 1300 } 1269 .ewd-premium-helper-dashboard-key-widget-text a:hover { 1301 1302 .ewd-premium-helper-dashboard-key-widget-text a:hover{ 1270 1303 color: #1CE6C3; 1271 1304 text-decoration: none; 1272 1305 } 1273 1306 1274 .ewd-ufaq-dashboard-trial-container .ewd-premium-helper-dashboard-new-widget-box-bottom {1307 .ewd-ufaq-dashboard-trial-container .ewd-premium-helper-dashboard-new-widget-box-bottom{ 1275 1308 float: none !important; 1276 1309 width: 100% !important; … … 1280 1313 } 1281 1314 1315 1282 1316 @media screen and (max-width: 768px) { 1283 .ewd-premium-helper-dashboard-key-widget{1317 .ewd-premium-helper-dashboard-key-widget{ 1284 1318 padding: 0 !important; 1285 1319 background-image: none !important; 1286 1320 } 1287 .ewd-premium-helper-dashboard-key-widget-input { 1321 1322 .ewd-premium-helper-dashboard-key-widget-input{ 1288 1323 width: 100% !important; 1289 1324 border-radius: 8px !important; … … 1291 1326 border-bottom-right-radius: 0 !important; 1292 1327 } 1293 .ewd-premium-helper-dashboard-key-widget-submit { 1328 1329 .ewd-premium-helper-dashboard-key-widget-submit{ 1294 1330 width: 100% !important; 1295 1331 border-radius: 8px !important; 1296 1332 border-top-left-radius: 0 !important; 1297 1333 border-top-right-radius: 0 !important; 1298 } 1299 } 1300 1301 1302 .ewd-ufaq-hidden { 1334 }} 1335 1336 .ewd-ufaq-hidden{ 1303 1337 display: none !important; 1304 1338 } 1339 1340 1341 /****************************************/ 1342 /** FAQ ORDERING SCREEN FILTERING AREA **/ 1343 /****************************************/ 1344 1345 .ewd-ufaq-order-toolbar legend { 1346 margin: 16px 0; 1347 padding-left: 0; 1348 font-size: 20px; 1349 } 1350 .ewd-ufaq-order-rows td span { 1351 display: block; 1352 } -
ultimate-faqs/trunk/assets/css/ewd-ufaq.css
r3399160 r3821169 1 .ewd-ufaq-hidden { 1 2 .ewd-ufaq-hidden{ 2 3 display:none; 3 4 } 4 5 5 .ewd-ufaq-faq-category-title-toggle {6 cursor: pointer; 7 } 8 9 .ewd-ufaq-faq-category-body-hidden {6 .ewd-ufaq-faq-category-title-toggle{ 7 cursor: pointer; 8 } 9 10 .ewd-ufaq-faq-category-body-hidden{ 10 11 display: none; 11 12 } 12 13 13 .ewd-ufaq-clear {14 .ewd-ufaq-clear{ 14 15 clear:both; 15 16 } 16 17 17 .ewd-ufaq-permalink {18 .ewd-ufaq-permalink{ 18 19 margin: 24px 0; 19 20 } 20 .ewd-ufaq-permalink-image { 21 22 .ewd-ufaq-permalink-image{ 21 23 background: url("../img/insert_link.png"); 22 24 height: 21px; … … 26 28 } 27 29 28 29 .ewd-ufaq-author { 30 .ewd-ufaq-author{ 30 31 font-weight: 600; 31 32 } 32 .ewd-ufaq-date { 33 34 .ewd-ufaq-date{ 33 35 font-weight: 600; 34 36 } 35 37 36 .ewd-ufaq-faq-category-title {38 .ewd-ufaq-faq-category-title{ 37 39 width: 100%; 38 40 clear: both; … … 46 48 } 47 49 48 .ewd-ufaq-faq-category-inner {50 .ewd-ufaq-faq-category-inner{ 49 51 margin-bottom: 48px; 50 52 } 51 53 52 .ewd-ufaq-faq-body {54 .ewd-ufaq-faq-body{ 53 55 padding:10px 25px; 54 56 padding-left: 55px; 55 57 } 58 56 59 .ewd-ufaq-faq-search{ 57 60 margin:5px 0 !important; 58 61 } 59 .ewd-ufaq-highlight-search-term { 60 background: #f7ff00; 61 } 62 .ewd-ufaq-no-results-found { 62 63 .ewd-ufaq-no-results-found{ 63 64 margin-top: 16px; 64 65 } … … 67 68 width: auto !important; 68 69 } 69 .ewd-ufaq-text-input { 70 71 .ewd-ufaq-text-input{ 70 72 border-radius: 0 !important; 71 73 margin:15px !important; 72 74 } 73 .ewd-ufaq-submit{ 74 border-radius: 0 !important; 75 } 76 .ewd-ufaq-faq-header{ 77 margin:10px; 78 } 79 .ewd-ufaq-faq-header a:hover{ 80 text-decoration: none; 81 } 75 82 76 div.ewd-ufaq-faq-title div.ewd-ufaq-post-margin{ 83 77 text-decoration: none; 84 78 } 79 85 80 div.ewd-ufaq-faq-title div.ewd-ufaq-post-margin-symbol{ 86 81 text-decoration: none; … … 97 92 border-width: 0; 98 93 } 94 99 95 .ewd-ufaq-faq-title .ewd-ufaq-post-margin-symbol span{ 100 96 display: inline-block; … … 102 98 margin: 0 auto; 103 99 } 104 .ewd-ufaq-faq-title-text { 100 101 .ewd-ufaq-faq-title-text{ 105 102 float: left; 106 103 width: 85%; 107 104 } 105 108 106 .ewd-ufaq-faq-title h1, 109 107 .ewd-ufaq-faq-title h2, … … 111 109 .ewd-ufaq-faq-title h4, 112 110 .ewd-ufaq-faq-title h5, 113 .ewd-ufaq-faq-title h6 {111 .ewd-ufaq-faq-title h6{ 114 112 display:inline-block; 115 113 margin:5px !important; 116 114 } 117 115 118 119 120 121 .ewd-ufaq-custom-field-label, .ewd-ufaq-custom-field-value { 122 position: relative; 123 float: left; 124 margin-top: 14px; 125 } 126 .ewd-ufaq-custom-field-label { 127 font-weight: normal; 128 } 129 130 .ewd-ufaq-faq-body .comment-respond { 116 .ewd-ufaq-faq-body .comment-respond{ 131 117 margin-top: 24px; 132 118 } 133 .ewd-ufaq-faq-body li.comment { 119 120 .ewd-ufaq-faq-body li.comment{ 134 121 list-style-type: none; 135 122 } 136 .ewd-ufaq-faq-body textarea { 123 124 .ewd-ufaq-faq-body textarea{ 137 125 clear: both; 138 126 display: block; … … 141 129 height: 100px; 142 130 } 143 .ewd-ufaq-faq-body .comment-form-comment label { 131 132 .ewd-ufaq-faq-body .comment-form-comment label{ 144 133 clear: both; 145 134 display: block; … … 147 136 width: 100%; 148 137 } 149 .ewd-ufaq-faq-body .submit { 138 139 .ewd-ufaq-faq-body .submit{ 150 140 width: auto; 151 141 background: transparent; … … 154 144 margin-bottom: 20px; 155 145 } 156 .ewd-ufaq-faq-body .submit:hover { 146 147 .ewd-ufaq-faq-body .submit:hover{ 157 148 background: #111; 158 149 color: #fff; 159 150 } 160 .ewd-ufaq-faq-body .comment-author img { 151 152 .ewd-ufaq-faq-body .comment-author img{ 161 153 margin-right: 8px; 162 154 } 163 .ewd-ufaq-faq-body .comment-body p { 155 156 .ewd-ufaq-faq-body .comment-body p{ 164 157 margin: 10px 0; 165 158 margin-top: 10px !important; 166 159 } 167 .ewd-ufaq-faq-body .reply { 160 161 .ewd-ufaq-faq-body .reply{ 168 162 text-transform: uppercase; 169 163 } 170 164 171 .ewd-ufaq-faq-body .ewd-ufaq-back-to-top-link { 172 cursor: pointer; 173 } 174 175 .ewd-ufaq-ratings { 176 padding: 14px 0 0; 177 display: inline-block; 178 width: 100%; 179 margin-bottom: 20px; 180 } 181 .ewd-ufaq-down-vote { 182 background-position: 0px 8px !important; 183 height: 50px !important; 184 } 185 186 187 /*********************** 188 * Pagination 189 ***********************/ 190 .ewd-ufaq-bottom { 191 clear: both; 192 } 193 .ewd-ufaq-previous-faqs h4 { 194 float: left; 195 padding-left: 12px; 196 cursor: pointer; 197 font-weight: 600; 198 } 199 .ewd-ufaq-next-faqs h4 { 200 float: right; 201 padding-right: 12px; 202 cursor: pointer; 203 font-weight: 600; 204 } 205 .ewd-ufaq-load-more h4 { 206 text-align: center; 207 cursor: pointer; 208 font-weight: 600; 209 } 210 211 212 /*********************** 213 * Columns 214 ***********************/ 215 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-two { 216 width: 48%; 217 margin-right: 2%; 218 float: left; 219 clear: none; 220 } 221 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-three { 222 width: 31%; 223 margin-right: 2%; 224 float: left; 225 clear: none; 226 } 227 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-four { 228 width: 23%; 229 margin-right: 2%; 230 float: left; 231 clear: none; 232 } 233 234 @media only screen and (max-width: 960px) { 235 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-three.ewd-ufaq-faq-responsive-columns-1, 236 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-four.ewd-ufaq-faq-responsive-columns-1 { 237 width: 48%; 238 margin-right: 2%; 239 } 240 } 241 @media only screen and (max-width: 520px) { 242 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-two.ewd-ufaq-faq-responsive-columns-1, 243 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-three.ewd-ufaq-faq-responsive-columns-1, 244 .ewd-ufaq-faq-div.ewd-ufaq-faq-column-count-four.ewd-ufaq-faq-responsive-columns-1 { 245 width: 100%; 246 margin-right: none; 247 } 248 } 249 250 /*********************** 251 Color Block Style 252 ***********************/ 253 .ewd-ufaq-faq-display-style-color_block .ewd-ufaq-post-margin-symbol { 254 background-color: #1188cc; 255 color: #ffffff; 256 } 257 258 .ewd-ufaq-Circle { 259 border-radius: 18px; 260 } 261 262 .ewd-ufaq-Square { 263 border-radius: 0px; 264 } 265 266 267 /*********************** 268 Block Style 269 ***********************/ 270 .ewd-ufaq-faq-div { 165 .ewd-ufaq-faq-body .ewd-ufaq-back-to-top-link{ 166 cursor: pointer; 167 } 168 169 .ewd-ufaq-faq-div{ 271 170 margin: 2px 0; 272 171 padding:2px 0; 273 172 clear: both; 274 173 } 174 275 175 .ewd-ufaq-faq-toggle:hover, .ewd-ufaq-faq-toggle a:hover{ 276 176 cursor: pointer; … … 278 178 text-decoration: none; 279 179 } 280 .ewd-ufaq-faq-display-style-block a, .ewd-ufaq-faq-display-style-block a:visited, .ewd-ufaq-faq-display-style-block a:active{ 281 text-decoration: none; 282 } 283 .ewd-ufaq-faq-display-style-block:hover, 284 .ewd-ufaq-faq-display-style-block:hover a, 285 .ewd-ufaq-faq-display-style-block:hover h1, 286 .ewd-ufaq-faq-display-style-block:hover h2, 287 .ewd-ufaq-faq-display-style-block:hover h3, 288 .ewd-ufaq-faq-display-style-block:hover h4, 289 .ewd-ufaq-faq-display-style-block:hover h5, 290 .ewd-ufaq-faq-display-style-block:hover h6 { 291 text-decoration: none !important; 292 color:#fff; 293 background: #1188cc; 294 } 295 .ewd-ufaq-faq-display-style-block.ewd-ufaq-post-active, .ewd-ufaq-faq-display-style-block.ewd-ufaq-post-active a{ 296 color:#fff; 297 background: #1188cc; 298 } 299 300 301 /*********************** 302 List Style 303 ***********************/ 304 .ewd-ufaq-faq-header-title a { 305 display: inline-block; 306 } 307 308 309 /*********************** 310 Border Block Style 311 ***********************/ 312 .ewd-ufaq-faq-div { 180 181 .ewd-ufaq-faq-div{ 313 182 margin: 2px 0; 314 183 padding:2px 0; 315 184 clear: both; 316 185 } 186 317 187 .ewd-ufaq-faq-toggle:hover, .ewd-ufaq-faq-toggle a:hover{ 318 188 cursor: pointer; … … 320 190 text-decoration: none; 321 191 } 322 .ewd-ufaq-faq-display-style-border_block a, .ewd-ufaq-faq-display-style-border_block a:visited, .ewd-ufaq-faq-display-style-border_block a:active{ 323 text-decoration: none; 324 } 325 .ewd-ufaq-faq-display-style-border_block:hover, 326 .ewd-ufaq-faq-display-style-border_block:hover a, 327 .ewd-ufaq-faq-display-style-border_block:hover h1, 328 .ewd-ufaq-faq-display-style-border_block:hover h2, 329 .ewd-ufaq-faq-display-style-border_block:hover h3, 330 .ewd-ufaq-faq-display-style-border_block:hover h4, 331 .ewd-ufaq-faq-display-style-border_block:hover h5, 332 .ewd-ufaq-faq-display-style-border_block:hover h6 { 333 text-decoration: none !important; 334 color:#fff; 335 background: #1188cc; 336 } 337 .ewd-ufaq-faq-display-style-border_block.ewd-ufaq-post-active, .ewd-ufaq-faq-display-style-border_block.ewd-ufaq-post-active a{ 338 color:#fff !important; 339 background: #1188cc; 340 } 341 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-faq-body { 342 color:#555 !important; 343 background: #fff; 344 border: 3px solid #1188cc; 345 border-bottom: 2px solid #1188cc; 346 } 347 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-faq-body a { 348 color:#000 !important; 349 background: transparent; 350 } 351 352 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-faq-tags, .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-social-links { 353 margin-top: 4px; 354 } 355 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-social-links ul { 356 float: left; 357 margin-bottom: 14px; 358 position: relative; 359 width: auto; 360 } 361 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-permalink { 362 margin: 24px 0; 363 } 364 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-permalink-image { 365 margin-top: -32px; 366 margin-left: 112px; 367 } 368 369 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-author-date { 370 margin-bottom: 14px; 371 } 372 373 .ewd-ufaq-faq-display-style-border_block .ewd-ufaq-faq-categories { 374 margin: 14px 0; 375 } 376 377 .ewd-ufaq-faq-display-style-border_block.ewd-ufaq-post-active .ewd-ufaq-faq-title-text { 378 color: #fff !important; 379 } 380 381 .ewd-ufaq-faq-display-style-border_block .comment-reply-title { 382 background: transparent !important; 383 color: #000 !important; 384 } 385 .ewd-ufaq-faq-display-style-border_block:hover .comment-reply-title { 386 color: #000 !important; 387 } 388 389 390 391 /*********************** 392 Contemporary Style 393 ***********************/ 394 .ewd-ufaq-faq-display-style-contemporary { 395 border-bottom: 1px solid #ccc; 396 padding: 0; 397 margin: 0; 398 } 399 .ewd-ufaq-faq-display-style-contemporary:first-of-type { 400 border-top: 1px solid #ccc; 401 } 402 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-faq-title { 403 background: #f7f7f7; 404 padding: 8px 0 8px 4px; 405 } 406 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-post-margin-symbol { 407 float: right; 408 height: auto; 409 } 410 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-faq-body { 411 padding: 20px 25px 10px; 412 padding-left: 40px; 413 } 414 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-faq-tags, .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-social-links { 415 margin-top: 4px; 416 } 417 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-social-links ul { 418 float: left; 419 margin-bottom: 14px; 420 position: relative; 421 width: auto; 422 } 423 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-permalink { 424 margin-left: 0; 425 margin-bottom: 10px; 426 } 427 .ewd-ufaq-faq-display-style-contemporary .ewd-ufaq-back-to-top { 428 margin-bottom: 14px; 429 } 430 431 .ewd-ufaq-social-links-label { 432 float: left; 433 margin-right: 8px; 434 position: relative; 435 top: 3px; 436 } 437 438 439 440 441 /*********************** 442 Ratings 443 ***********************/ 444 .ewd-ufaq-rating-button { 445 position: relative; 446 float: left; 447 width: 60px; 448 height: 48px; 449 margin-right: 12px; 450 line-height: 48px; 451 font-weight: 600; 452 cursor: pointer; 453 454 } 455 .ewd-ufaq-rating-button img { 456 position: absolute; 457 top: 0; 458 left: 0; 459 width: 75%; 460 height: auto; 461 } 462 .ewd-ufaq-rating-button span { 463 text-align: right; 464 width: 100%; 465 display: block; 466 } 467 .ewd-ufaq-up-vote { 468 background: transparent; 469 background-repeat: no-repeat; 470 } 471 .ewd-ufaq-down-vote { 472 background: transparent; 473 background-repeat: no-repeat; 474 } 475 .ewd-ufaq-ratings-custom-image { 476 background: transparent; 477 } 478 .ewd-ufaq-rating-button.ewd-ufaq-rating-button-custom-up-image, 479 .ewd-ufaq-rating-button.ewd-ufaq-rating-button-custom-down-image { 480 background: none; 481 padding-left: 0; 482 } 483 .ewd-ufaq-rating-button.ewd-ufaq-rating-button-custom-up-image img, 484 .ewd-ufaq-rating-button.ewd-ufaq-rating-button-custom-down-image img { 485 position: relative; 486 float: left; 487 width: 48px; 488 height: auto; 489 margin-right: 4px; 490 } 491 492 493 /************************ 494 * Expand/Collapse 495 ************************/ 192 496 193 .ewd-ufaq-expand-all, 497 .ewd-ufaq-collapse-all {194 .ewd-ufaq-collapse-all{ 498 195 text-decoration: none; 499 196 cursor: pointer; 500 197 font-size: 0.9em; 501 198 } 199 200 502 201 503 202 /* … … 520 219 .ewd-ufaq-faq-title .ewd-ufaq-post-margin-symbol, 521 220 .ewd-ufaq-faq-category-title .ewd-ufaq-category-post-margin-symbol, 522 .ewd-ufaq-toggle-all-symbol {221 .ewd-ufaq-toggle-all-symbol{ 523 222 font-family: 'ewd-toggle-icon'; 524 }525 526 527 /*528 ==============================================529 PChanges530 ==============================================531 */532 533 .ewd-ufaq-question-update{534 font-size: 1.2em;535 margin-bottom: 20px;536 }537 .ewd-ufaq-question-form .form-field {538 margin-bottom: 20px;539 }540 541 .rrssb-buttons li a .rrssb-text {542 color: #fff;543 margin-left: 5px;544 }545 546 .ewd-ufaq-social-links .rrssb-buttons li {547 margin-bottom: 5px;548 223 } 549 224 … … 551 226 clear: both; 552 227 } 228 229 553 230 @media only screen and (max-width: 810px) { 554 555 .ewd-ufaq-faq-title-text { 231 .ewd-ufaq-faq-title-text{ 556 232 width: 80%; 557 } 558 559 } 560 561 562 563 /* 564 ============================================== 565 Pagination 566 ============================================== 567 */ 568 .ewd-ufaq-previous-faqs, .ewd-ufaq-next-faqs { 569 margin-top: 16px; 570 } 571 .ewd-ufaq-previous-faqs { 572 float: left; 573 } 574 .ewd-ufaq-next-faqs { 575 float: right; 576 } 577 578 /* clears the 'X' from Internet Explorer */ 579 #ewd-ufaq-jquery-ajax-search input[type=search]::-ms-clear { 580 display: none; width : 0; height: 0; 581 } 582 #ewd-ufaq-jquery-ajax-search input[type=search]::-ms-reveal { 583 display: none; width : 0; height: 0; 584 } 585 586 /* clears the 'X' from Chrome */ 587 #ewd-ufaq-jquery-ajax-search input[type="search"]::-webkit-search-decoration, 588 #ewd-ufaq-jquery-ajax-search input[type="search"]::-webkit-search-cancel-button, 589 #ewd-ufaq-jquery-ajax-search input[type="search"]::-webkit-search-results-button, 590 #ewd-ufaq-jquery-ajax-search input[type="search"]::-webkit-search-results-decoration { 591 -webkit-appearance: none; 592 } 593 594 #ewd-ufaq-jquery-ajax-search * { 595 vertical-align: middle; 596 } 597 #ewd-ufaq-jquery-ajax-search .search-field { 598 display: inline-block; 599 margin: 15px; 600 position: relative; 601 } 602 #ewd-ufaq-jquery-ajax-search .search-field .ewd-ufaq-text-input { 603 margin: 0 !important; 604 padding: 8px 30px 8px 12px !important; 605 } 606 #ewd-ufaq-jquery-ajax-search .clear-field { 607 display: inline; 608 padding: 0; 609 margin: 0; 610 height: 100%; 611 background: transparent; 612 position: absolute; 613 top: 0; 614 right: 0; 615 color: black; 616 transition: width 0.35s, opacity 0.25s; 617 transform: translateX(15px); 618 opacity: 0; 619 width: 0; 620 } 621 #ewd-ufaq-jquery-ajax-search .clear-field.slide-in { 622 opacity: 1; 623 width: 30px; 624 animation: slide-in-right 0.5s forwards; 625 -webkit-animation: slide-in-right 0.5s forwards; 626 } 627 #ewd-ufaq-jquery-ajax-search .clear-field.slide-out { 628 opacity: 0; 629 width: 0; 630 animation: slide-out-right 0.5s forwards; 631 -webkit-animation: slide-out-right 0.5s forwards; 632 } 633 #ewd-ufaq-jquery-ajax-search .clear-field:hover, 634 #ewd-ufaq-jquery-ajax-search .clear-field:focus { 635 border-radius: 0; 636 } 637 @keyframes slide-in-right { 638 100% { 639 transform: translateX(0px); 640 } 641 } 642 @keyframes slide-out-right { 643 0% { 644 transform: translateX(0px); 645 } 646 100% { 647 transform: translateX(15px); 648 } 649 } 650 651 652 /*************** 653 BLOCK PATTERNS 654 ***************/ 233 }} 234 655 235 .ewd-ufaq-pattern-faqs, 656 236 .ewd-ufaq-pattern-featured-faqs, 657 237 .ewd-ufaq-pattern-search, 658 .ewd-ufaq-pattern-submit {238 .ewd-ufaq-pattern-submit{ 659 239 width: 100%; 660 240 } 661 241 662 /*************** 663 CATEGORY TABS 664 ***************/ 665 .ewd-ufaq-category-tabs-1 .ewd-ufaq-faqs { 666 display: flex; 667 width: 100%; 668 position: relative; 669 } 670 .ewd-ufaq-category-tabs-1 .ewd-ufaq-faq-category { 671 display: flex; 672 flex-direction: column; 673 margin-right: 40px; 674 } 675 .ewd-ufaq-category-tabs-1 .ewd-ufaq-category-tab-selected h3 { 676 font-weight: bold; 677 text-decoration: underline; 678 } 679 .ewd-ufaq-category-tabs-1 .ewd-ufaq-faq-category-inner { 680 position: absolute; 681 left: 0; 682 top: 72px; 683 width: 100%; 684 } 685 .ewd-ufaq-category-tabs-1 .ewd-ufaq-faq-category .ewd-ufaq-faq-category { 686 position: relative; 687 margin-right: 0; 688 margin-top: 24px; 689 width: 100%; 690 clear: both; 691 display: flex; 692 flex-direction: column; 693 } 694 695 .ewd-ufaq-faq-category-body-hidden { 242 .ewd-ufaq-faq-category-body-hidden{ 696 243 display: none; 697 244 } 698 245 699 700 /**********************/701 /** NEW META BUBBLES **/702 /**********************/703 704 246 .ewd-ufaq-faq-categories, 705 .ewd-ufaq-faq-tags {247 .ewd-ufaq-faq-tags{ 706 248 margin: 14px 0; 707 249 display: flex; … … 711 253 color: #212427; 712 254 } 255 713 256 .ewd-ufaq-faq-categories a, 714 .ewd-ufaq-faq-tags a {257 .ewd-ufaq-faq-tags a{ 715 258 text-decoration: none; 716 259 padding: 4px 12px; … … 719 262 border-radius: 100px; 720 263 } 721 .ewd-ufaq-faq-custom-fields { 722 margin-bottom: 14px; 723 } 724 .ewd-ufaq-custom-field-label { 725 color: #212427; 726 } 727 728 /**********************/ 729 /**** COMPACT META ****/ 730 /**********************/ 731 732 .ewd-ufaq-compact-faq-meta { 733 display: flex; 734 width: 100%; 735 flex-wrap: wrap; 736 justify-content: right; 737 align-items: center; 738 gap: 0; 739 } 740 .ewd-ufaq-compact-faq-meta > div { 741 width: 100%; 742 } 743 .ewd-ufaq-compact-faq-meta .ewd-ufaq-permalink { 744 width: auto; 745 order: 25; 746 } 747 .ewd-ufaq-compact-faq-meta .ewd-ufaq-permalink a { 748 font-size: 16px; 749 color: #7a7a7a; 750 font-weight: normal; 751 text-decoration: none; 752 } 753 .ewd-ufaq-compact-faq-meta .ewd-ufaq-permalink-image { 754 display: none; 755 } 756 .ewd-ufaq-compact-faq-meta .ewd-ufaq-social-links { 757 width: auto; 758 order: 26; 759 } 760 .ewd-ufaq-compact-faq-meta .ewd-ufaq-social-links-label { 761 display: none; 762 } 763 .ewd-ufaq-compact-faq-meta .rrssb-buttons { 764 height: auto; 765 display: flex; 766 align-items: center; 767 margin: 0; 768 float: none; 769 gap: 4px; 770 } 771 .ewd-ufaq-compact-faq-meta .rrssb-buttons li { 772 float: none; 773 height: auto; 774 line-height: initial; 775 padding: 0; 776 margin: 0; 777 } 778 .ewd-ufaq-compact-faq-meta .rrssb-buttons li a { 779 height: auto; 780 padding: 0; 781 font-weight: normal; 782 font-size: 16px; 783 text-align: left; 784 width: auto; 785 border-radius: 0; 786 } 787 .ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-facebook a, 788 .ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-twitter a, 789 .ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-linkedin a, 790 .ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-pinterest a, 791 .ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-email a { 792 background-color: transparent; 793 } 794 .ewd-ufaq-compact-faq-meta .rrssb-buttons li a .rrssb-icon, 795 .ewd-ufaq-compact-faq-meta .rrssb-buttons li a .rrssb-text { 796 display: none; 797 } 798 .ewd-ufaq-compact-faq-meta .ewd-ufaq-ratings { 799 width: auto; 800 order: 27; 801 padding: 0; 802 margin: 0; 803 display: flex; 804 align-items: center; 805 } 806 .ewd-ufaq-compact-faq-meta .ewd-ufaq-rating-button { 807 float: none; 808 width: auto; 809 height: auto; 810 margin: 0; 811 line-height: initial; 812 font-weight: normal; 813 display: flex; 814 } 815 .ewd-ufaq-compact-faq-meta .ewd-ufaq-rating-button img { 816 display: none !important; 817 } 818 .ewd-ufaq-compact-faq-meta .ewd-ufaq-rating-button span { 819 width: auto; 820 margin-left: 2px; 821 } 822 .ewd-ufaq-compact-faq-meta .ewd-ufaq-down-vote { 823 height: auto !important; 824 margin-left: 4px; 825 } 826 .ewd-ufaq-compact-faq-meta .ewd-ufaq-ratings-label { 827 display: none; 828 } 829 830 .ewd-ufaq-hidden { 264 265 .ewd-ufaq-hidden{ 831 266 display: none; 832 267 } -
ultimate-faqs/trunk/assets/js/ewd-ufaq-admin.js
r3507393 r3821169 64 64 } ); 65 65 66 jQuery(document).ready(function($) { 67 68 $( '.ewd-ufaq-list' ).sortable({ 69 items: '.ewd-ufaq-item', 70 opacity: 0.6, 71 cursor: 'move', 72 axis: 'y', 73 update: function() { 74 var order = jQuery( this ).sortable( 'serialize' ) 75 + '&action=ewd_ufaq_update_faq_order' 76 + '&nonce='+ewd_ufaq_php_data.nonce; 77 jQuery.post( ajaxurl, order, function( response ) {} ); 78 } 79 }); 80 81 if ( jQuery( 'input[name="taxonomy"]' ).length && jQuery( 'input[name="taxonomy"]' ).val() == 'ufaq-category' ) { 82 83 jQuery( 'table.wp-list-table tbody' ).sortable({ 84 items: 'tr.level-0', 85 opacity: 0.6, 86 cursor: 'move', 87 update: function() { 88 89 var params = { 90 nonce: ewd_ufaq_php_data.nonce, 91 action: 'ewd_ufaq_update_category_order' 92 }; 93 94 var query_string = jQuery( this ).sortable('serialize'); 95 var data = jQuery.param( params ) + '&' + query_string; 96 97 jQuery.post( ajaxurl, data, function( response ) {}); 98 } 99 }) 100 } 101 }); 66 // Helper owns explicit one-record order edits; partial sortable lists are never submitted. 102 67 103 68 jQuery(document).ready(function($) { … … 108 73 }); 109 74 110 jQuery(document).ready(function($){ 111 112 $( '.sap-new-admin-add-button' ).on( 'click', function() { 113 114 setTimeout( ewd_ufaq_field_added_handler, 500); 115 }); 116 }); 117 118 function ewd_ufaq_field_added_handler() { 119 120 var highest = 0; 121 jQuery( '.sap-infinite-table input[data-name="id"]' ).each( function() { 122 highest = Math.max( highest, this.value ); 123 }); 124 125 jQuery( '.sap-infinite-table tbody tr:last-of-type span.sap-infinite-table-hidden-value' ).html( highest + 1 ); 126 jQuery( '.sap-infinite-table tbody tr:last-of-type input[data-name="id"]' ).val( highest + 1 ); 127 } 75 // Helper owns custom-field input behavior. 128 76 129 77 // Reset button for search term statistics -
ultimate-faqs/trunk/assets/js/ewd-ufaq-managed-editor.js
r3744649 r3821169 363 363 } 364 364 365 function moveFaq( id, offset ) {366 if ( busy || isSaving || trashRequests.current[ id ] ) { return; }367 var from = selectedIds.indexOf( id );368 var to = from + offset;369 if ( from < 0 || to < 0 || to >= selectedIds.length ) { return; }370 var next = selectedIds.slice();371 next.splice( from, 1 ); next.splice( to, 0, id ); setIds( next );372 }373 365 374 366 var selected = selectedIds.map( function( id, index ) { … … 387 379 el( Button, { isSecondary: true, disabled: busy || isSaving, onClick: function() { retryCategories( id ); } }, __( 'Retry category assignment', 'ultimate-faqs' ) ) ) : null, 388 380 el( 'div', { className: 'ewd-ufaq-managed-actions' }, 389 config.canOrderFaqs ? el( Button, { isSmall: true, disabled: busy || isSaving || trashing[ id ] || index === 0, onClick: function() { moveFaq( id, -1 ); } }, __( 'Up', 'ultimate-faqs' ) ) : null, 390 config.canOrderFaqs ? el( Button, { isSmall: true, disabled: busy || isSaving || trashing[ id ] || index === selectedIds.length - 1, onClick: function() { moveFaq( id, 1 ); } }, __( 'Down', 'ultimate-faqs' ) ) : null, 381 typeof window.ewdUfaqManagedOrderControls === 'function' ? window.ewdUfaqManagedOrderControls( { id: id, index: index, ids: selectedIds, setIds: setIds, disabled: busy || isSaving || trashing[id] } ) : null, 391 382 el( Button, { isSmall: true, disabled: busy || isSaving || trashing[ id ], onClick: function() { removeFaq( id ); } }, __( 'Remove', 'ultimate-faqs' ) ), 392 383 record && record.can_delete ? el( Button, { isSmall: true, isDestructive: true, disabled: busy || isSaving || trashing[ id ], onClick: function() { setTrashId( id ); } }, trashing[ id ] ? __( 'Moving FAQ to Trash…', 'ultimate-faqs' ) : __( 'Move FAQ to Trash', 'ultimate-faqs' ) ) : null -
ultimate-faqs/trunk/assets/js/ewd-ufaq.js
r3704732 r3821169 1 var filtering_running = false; 2 var wpforms_search_running = 'No'; 3 4 var ajax_ctrlr = { 5 6 last_run: new Date(), 7 srch_str: '', 8 schdl_to_run_state: false, 9 schdl_to_run_delay: 250, 10 search_save_schdl_to_run_delay: 3000, 11 schdl_to_run_cntr: 0, 12 schdl_to_run_hndl: null, 13 search_save_schdl_to_run_hndl: null, 14 15 schedule_to_run: function() { 16 ajax_ctrlr.schdl_to_run_cntr++; 17 18 if(ajax_ctrlr.schdl_to_run_cntr % 5 == 0) { 19 ajax_ctrlr.schdl_to_run_delay += 250; 20 ajax_ctrlr.schdl_to_run_reset(); 21 } 22 23 if( ! ajax_ctrlr.schdl_to_run_state) { 24 return; 25 } 26 27 let crnt_run = new Date(); 28 29 if(crnt_run - ajax_ctrlr.last_run > ajax_ctrlr.schdl_to_run_delay) { 30 ajax_ctrlr.schdl_to_run_state = false; 31 ajax_ctrlr.schdl_to_run_cntr = 0; 32 ajax_ctrlr.last_run = new Date(); 33 34 ewd_ufaq_ajax_reload(); 35 36 ajax_ctrlr.save_search_schdl_to_run_reset(); 37 } 38 }, 39 schdl_to_run_reset: function () { 40 clearInterval(ajax_ctrlr.schdl_to_run_hndl); 41 ajax_ctrlr.schdl_to_run_hndl = setInterval(ajax_ctrlr.schedule_to_run, ajax_ctrlr.schdl_to_run_delay); 42 }, 43 run_search_ajax: function( elm ) { 44 ajax_ctrlr.clear_field( elm ); 45 46 let srch_str = jQuery(elm).val(); 47 48 if( ajax_ctrlr.schdl_to_run_delay > 250 ) { 49 ajax_ctrlr.schdl_to_run_delay = 250; 50 ajax_ctrlr.schdl_to_run_reset(); 51 } 52 53 if(srch_str != ajax_ctrlr.srch_str) { 54 ajax_ctrlr.srch_str = srch_str; 55 ajax_ctrlr.schdl_to_run_state = true; 56 ajax_ctrlr.last_run = new Date(); 57 } 58 }, 59 save_search_term: function() { 60 var params = {}; 61 62 params.nonce = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.nonce : ''; 63 params.search_term = ajax_ctrlr.srch_str; 64 params.action = 'ewd_ufaq_record_search_term'; 65 66 var data = jQuery.param( params ); 67 jQuery.post(ajaxurl, data, function(response) {}); 68 }, 69 save_search_schdl_to_run_reset: function() { 70 71 if ( typeof ewd_ufaq_php_data == 'undefined' || ! ewd_ufaq_php_data.save_search_terms ) { return false; } 72 73 clearTimeout(ajax_ctrlr.search_save_schdl_to_run_hndl); 74 ajax_ctrlr.search_save_schdl_to_run_hndl = setTimeout(ajax_ctrlr.save_search_term, ajax_ctrlr.search_save_schdl_to_run_delay); 75 }, 76 clear_field: function ( srch_elm ) { 77 let cf = jQuery(srch_elm).parent('.search-field').find('.clear-field').eq(0); 78 if( 0 < jQuery(srch_elm).val().length ) { 79 if( 'hidden' == cf.data('state') ) { 80 cf.data('state', 'visible'); 81 cf.removeClass('slide-out').addClass('slide-in'); 82 } 83 } 84 else { 85 cf.data('state', 'hidden'); 86 cf.removeClass('slide-in').addClass('slide-out'); 87 } 88 } 89 }; 90 91 jQuery(function(){ //DOM Ready 92 ufaqSetClickHandlers(); 93 UFAQSetAutoCompleteClickHandlers(); 94 UFAQSetRatingHandlers(); 95 UFAQSetExpandCollapseHandlers(); 96 UFAQSetPaginationHandlers(); 97 98 UFAQWPFormsHandler(); 99 }); 100 101 function ewd_ufaq_run_effect( display, faq_element ) { 102 103 var selected_effect = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.reveal_effect : 'none'; 104 105 // most effect types need no options passed by default 106 var options = {}; 107 108 // some effects have required parameters 109 if ( selected_effect === 'size' ) { 110 111 options = { to: { width: 200, height: 60 } }; 112 } 113 114 // run the effect 115 if ( display == 'show' ) { faq_element.find( '.ewd-ufaq-faq-body' ).show( selected_effect, options, 500, ewd_ufaq_toggle_hidden_class( faq_element ) ); } 116 if ( display == 'hide' ) { faq_element.find( '.ewd-ufaq-faq-body' ).hide( selected_effect, options, 500, ewd_ufaq_toggle_hidden_class( faq_element ) ); } 117 }; 1 jQuery(function() { ufaqSetClickHandlers(); UFAQSetExpandCollapseHandlers(); }); 2 3 118 4 119 5 // callback function to bring a hidden box back 120 function ewd_ufaq_toggle_hidden_class( faq_element ) { 121 122 setTimeout( function() { faq_element.find( '.ewd-ufaq-faq-body' ).toggleClass( 'ewd-ufaq-hidden' ); }, 500 ); 123 }; 6 124 7 125 8 function ufaqSetClickHandlers( context ) { 126 9 127 10 var interaction_scope = context ? jQuery( context ) : jQuery( document ); 11 UFAQSetExpandCollapseHandlers( context ); 128 12 129 13 interaction_scope.find( '.ewd-ufaq-faq-toggle' ).off( 'click' ).on( 'click', function( event ) { … … 135 19 event.preventDefault(); 136 20 137 faq = jQuery( this ).parent();21 var faq = jQuery( this ).parent(); 138 22 139 23 if ( faq.find( '.ewd-ufaq-faq-body' ).hasClass( 'ewd-ufaq-hidden' ) ) { … … 141 25 EWD_UFAQ_Reveal_FAQ( faq ); 142 26 143 if ( typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.faq_scroll ) { jQuery( 'html, body').animate({scrollTop: jQuery(this).offset().top -80}, 100); }27 if ( typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.faq_scroll ) { jQuery( this.ownerDocument ).find('html, body').animate({scrollTop: jQuery(this).offset().top -80}, 100); } 144 28 } 145 29 else { … … 152 36 153 37 var category_title = jQuery( this ); 38 var context_document = jQuery( this.ownerDocument ); 154 39 var category = category_title.parent(); 155 40 var category_inner = category.find( '.ewd-ufaq-faq-category-inner' ).first(); 156 var category_inner_height = category_inner.outerHeight( true );157 var faqs_list = category_inner.parent();158 var faqs_list_height = faqs_list.outerHeight( true );159 var total_faqs_height = category_inner_height + faqs_list_height;160 161 jQuery( '.ewd-ufaq-category-tabs-1' ).css( 'height', total_faqs_height + 'px' );162 41 163 42 jQuery( this ).toggleClass( 'ewd-ufaq-category-tab-selected' ); … … 167 46 if ( typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.category_accordion ) { 168 47 169 jQuery( '.ewd-ufaq-faq-category-inner' ).each( function( index, object ) {48 context_document.find( '.ewd-ufaq-faq-category-inner' ).each( function( index, object ) { 170 49 171 50 if ( object != category_inner.get( 0 ) ) { jQuery( this ).addClass( 'ewd-ufaq-faq-category-body-hidden' ); } 172 51 }); 173 52 174 jQuery( '.ewd-ufaq-faq-category-title-toggle' ).each (function() {175 176 if ( jQuery( this ) != category_title) { jQuery( this ).removeClass( 'ewd-ufaq-category-tab-selected' ); }53 context_document.find( '.ewd-ufaq-faq-category-title-toggle' ).each (function() { 54 55 if ( this !== category_title[0] ) { jQuery( this ).removeClass( 'ewd-ufaq-category-tab-selected' ); } 177 56 }); 178 57 } 179 58 180 jQuery( '.ewd-ufaq-faq-category-title-toggle' ).each( function() {59 context_document.find( '.ewd-ufaq-faq-category-title-toggle' ).each( function() { 181 60 var span = jQuery( this ).find( '.ewd-ufaq-category-post-margin-symbol span' ); 182 61 183 62 if ( jQuery( this).hasClass( 'ewd-ufaq-category-tab-selected' ) ) { 184 span. html( span.html().toUpperCase() );63 span.text( span.text().toUpperCase() ); 185 64 } 186 65 else { 187 span. html( span.html().toLowerCase() );66 span.text( span.text().toLowerCase() ); 188 67 } 189 68 } ); 69 if ( typeof window.ewdUfaqCategoryLayout === 'function' ) { window.ewdUfaqCategoryLayout( category_title ); } 190 70 }); 191 71 … … 193 73 event.preventDefault(); 194 74 195 jQuery( 'html, body' ).animate( { scrollTop: jQuery( '#ewd-ufaq-faq-list' ).offset().top -80 }, 100 ); 75 var context_document = jQuery( this.ownerDocument ); 76 var list = jQuery( this ).closest( '#ewd-ufaq-faq-list' ); 77 if ( list.length ) { context_document.find( 'html, body' ).animate( { scrollTop: list.offset().top -80 }, 100 ); } 196 78 }); 197 79 … … 200 82 201 83 var faq_id = jQuery( this ).data( 'postid' ); 202 var faq = jQuery( '#ewd-ufaq-post-' + faq_id ).first(); 84 var context_document = jQuery( this.ownerDocument ); 85 var faq = context_document.find( '#ewd-ufaq-post-' + faq_id ).first(); 86 if ( ! faq.length ) { return; } 203 87 204 88 if ( faq.find( '.ewd-ufaq-faq-body' ).hasClass( 'ewd-ufaq-hidden' ) ) { … … 207 91 } 208 92 209 jQuery( 'html, body' ).animate( { scrollTop: faq.offset().top - 20 }, 100 ); 210 }); 211 } 212 213 function UFAQSetAutoCompleteClickHandlers() { 214 215 jQuery( '.ewd-ufaq-text-auto-complete' ).on( 'keyup', function() { 216 217 jQuery( '.ewd-ufaq-text-auto-complete' ).autocomplete({ 218 219 source: typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.question_titles : '', 220 minLength: 3, 221 appendTo: '#ewd-ufaq-jquery-ajax-search', 222 select: function( event, ui ) { 223 jQuery( this ).val( ui.item.value ); 224 ewd_ufaq_ajax_reload(); 225 } 226 }); 227 228 jQuery( '.ewd-ufaq-text-auto-complete' ).autocomplete( 'enable' ); 229 }); 230 } 93 context_document.find( 'html, body' ).animate( { scrollTop: faq.offset().top - 20 }, 100 ); 94 }); 95 } 96 97 231 98 232 99 function EWD_UFAQ_Reveal_FAQ( faq_element ) { 100 if ( ! faq_element || ! faq_element.length ) { return; } 233 101 234 102 var post_id = faq_element.data( 'post_id' ); … … 243 111 jQuery.post(ajaxurl, data, function(response) {}); 244 112 245 faq_element.find( '.ewd-ufaq-post-margin-symbol' ). html( faq_element.find( '.ewd-ufaq-post-margin-symbol' ).html().toUpperCase());113 faq_element.find( '.ewd-ufaq-post-margin-symbol' ).each( function() { jQuery( this ).text( jQuery( this ).text().toUpperCase() ); } ); 246 114 247 115 faq_element.find( '.ewd-ufaq-faq-excerpt' ).addClass( 'ewd-ufaq-hidden' ); 248 116 249 if ( typeof ewd_ufaq_ php_data != 'undefined'&& ewd_ufaq_php_data.reveal_effect != 'none' ) { ewd_ufaq_run_effect( 'show', faq_element ); }117 if ( typeof ewd_ufaq_run_effect === 'function' && typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.reveal_effect && ewd_ufaq_php_data.reveal_effect != 'none' ) { ewd_ufaq_run_effect( 'show', faq_element ); } 250 118 else { faq_element.find( '.ewd-ufaq-faq-body' ).removeClass( 'ewd-ufaq-hidden' ); } 251 119 252 120 if ( typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.faq_accordion ) { 253 121 254 jQuery( '.ewd-ufaq-faq-div' ).each( function() {122 jQuery( faq_element[0].ownerDocument ).find( '.ewd-ufaq-faq-div' ).each( function() { 255 123 256 124 if ( jQuery( this ).prop( 'id' ) != faq_element.prop( 'id' ) ) { … … 271 139 272 140 function EWD_UFAQ_Hide_FAQ( faq_element ) { 141 if ( ! faq_element || ! faq_element.length ) { return; } 273 142 274 143 var post_id = faq_element.data( 'post_id' ); … … 276 145 faq_element.find( '.ewd-ufaq-faq-excerpt' ).removeClass( 'ewd-ufaq-hidden' ); 277 146 278 if ( typeof ewd_ufaq_ php_data != 'undefined'&& ewd_ufaq_php_data.reveal_effect != 'none' && ! faq_element.find( '.ewd-ufaq-faq-body' ).hasClass( 'ewd-ufaq-hidden' ) ) { ewd_ufaq_run_effect( 'hide', faq_element ); }147 if ( typeof ewd_ufaq_run_effect === 'function' && typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.reveal_effect && ewd_ufaq_php_data.reveal_effect != 'none' && ! faq_element.find( '.ewd-ufaq-faq-body' ).hasClass( 'ewd-ufaq-hidden' ) ) { ewd_ufaq_run_effect( 'hide', faq_element ); } 279 148 else { faq_element.find( '.ewd-ufaq-faq-body' ).addClass( 'ewd-ufaq-hidden' ); } 280 149 281 150 faq_element.removeClass( 'ewd-ufaq-post-active' ); 282 faq_element.find( '.ewd-ufaq-post-margin-symbol' ). html( faq_element.find( '.ewd-ufaq-post-margin-symbol' ).html().toLowerCase());151 faq_element.find( '.ewd-ufaq-post-margin-symbol' ).each( function() { jQuery( this ).text( jQuery( this ).text().toLowerCase() ); } ); 283 152 } 284 153 285 154 jQuery(document).ready(function() { 286 287 if( 0 < jQuery( '#ewd-ufaq-jquery-ajax-search .ewd-ufaq-text-input' ).eq(0).length ) {288 ajax_ctrlr.schdl_to_run_hndl = setInterval(ajax_ctrlr.schedule_to_run, ajax_ctrlr.schdl_to_run_delay);289 }290 291 jQuery( '#ewd-ufaq-ajax-search-submit' ).click( function() {292 jQuery( '.ewd-ufaq-bottom' ).data( 'current_page', 1 );293 let elm = jQuery( '#ewd-ufaq-jquery-ajax-search .ewd-ufaq-text-input' ).eq(0);294 ajax_ctrlr.run_search_ajax( elm[0] );295 });296 297 jQuery( '#ewd-ufaq-jquery-ajax-search' ).on( 'keyup', '.ewd-ufaq-text-input', function() {298 ajax_ctrlr.run_search_ajax( this );299 });300 301 // clear search field302 jQuery( '#ewd-ufaq-jquery-ajax-search' ).on( 'click', '.clear-field', function() {303 let elm = jQuery( '#ewd-ufaq-jquery-ajax-search .ewd-ufaq-text-input' ).eq(0);304 jQuery(elm).val('');305 ajax_ctrlr.run_search_ajax( elm[0] );306 });307 308 jQuery( '.ewd-ufaq-text-input ' ).on( 'search', function() {309 ajax_ctrlr.run_search_ajax( this );310 });311 312 155 if ( typeof ewd_ufaq_php_data != 'undefined' && ewd_ufaq_php_data.display_faq > 0 ) { 313 156 … … 322 165 }); 323 166 324 var request_count = 0; 325 function ewd_ufaq_ajax_reload( pagination, append_results, search_string ) { 326 327 filtering_running = true; 328 329 var search_string = search_string ? search_string : jQuery( '.ewd-ufaq-text-input' ).val(); 330 var include_cat = jQuery( '#ewd-ufaq-include-category' ).val(); 331 var exclude_cat = jQuery( '#ewd-ufaq-exclude-category' ).val(); 332 var orderby = jQuery( '#ewd-ufaq-orderby' ).val(); 333 var order = jQuery( '#ewd-ufaq-order' ).val(); 334 var post_count = jQuery( '#ewd-ufaq-post-count' ).val(); 335 var current_url = jQuery( '#ewd-ufaq-current-url' ).val(); 336 var show_on_load = jQuery( '#ewd-ufaq-show-on-load' ).val(); 337 338 if ( search_string == undefined ) { search_string = ''; } 339 340 if ( pagination == 'Yes' ) { 341 342 var faqs_only = 'Yes'; 343 var faq_page = jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ); 344 } 345 else { 346 347 var retrieving_results = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.retrieving_results : 'Retrieving Results'; 348 349 jQuery( '.ewd-ufaq-search .ewd-ufaq-faqs' ).html( '<h3>' + retrieving_results + '</h3>' ); 350 351 var faqs_only = 'No'; 352 var faq_page = 0; 353 jQuery( '.ewd-ufaq-bottom' ).remove(); 354 } 355 356 request_count = request_count + 1; 357 358 if ( jQuery( '.ewd-ufaq-text-input' ).length && 'yes' != show_on_load.toLocaleLowerCase() && search_string.length == 0 ) { 359 jQuery( '.ewd-ufaq-search .ewd-ufaq-faqs' ).html(''); 360 return; 361 } 362 363 var params = {}; 364 365 params.search_string = search_string; 366 params.include_category = include_cat; 367 params.exclude_category = exclude_cat; 368 params.orderby = orderby; 369 params.order = order; 370 params.post_count = post_count; 371 params.request_count = request_count; 372 params.current_url = current_url; 373 params.faqs_only = faqs_only; 374 params.faq_page = faq_page; 375 params.show_on_load = show_on_load; 376 params.action = 'ewd_ufaq_search'; 377 params.nonce = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.nonce : ''; 378 379 var data = jQuery.param( params ); 380 381 jQuery.post( ajaxurl, data, function( response ) { 382 383 if ( ! response || ! response.success || ! response.data ) { return; } 384 if ( response.data.analytics && response.data.analytics.endpoint && response.data.analytics.token ) { 385 try { 386 var analyticsKey = 'ewdUfaqAnalytics:' + response.data.analytics.storage_key; 387 if ( ! window.sessionStorage.getItem( analyticsKey ) ) { 388 window.sessionStorage.setItem( analyticsKey, '1' ); 389 window.fetch( response.data.analytics.endpoint, { method: 'POST', credentials: 'omit', keepalive: true, headers: { 'Content-Type': 'application/json' }, body: JSON.stringify( { event: response.data.analytics.event, token: response.data.analytics.token } ) } ).catch( function() {} ); 390 } 391 } catch ( analyticsError ) {} 392 } 393 394 if ( response.data.request_count == request_count ) { 395 396 var data_output_selector = search_string || jQuery( '.ewd-ufaq-faq-list' ).prev().is( '#ewd-ufaq-jquery-ajax-search' ) ? '#ewd-ufaq-jquery-ajax-search + .ewd-ufaq-faq-list .ewd-ufaq-faqs' : '.ewd-ufaq-faqs:not(#ewd-ufaq-jquery-ajax-search + .ewd-ufaq-faq-list .ewd-ufaq-faqs)'; 397 398 if ( ! jQuery( data_output_selector ).length ) { data_output_selector = '.ewd-ufaq-faqs'; } 399 400 if ( append_results == 'Yes' ) { 401 jQuery( data_output_selector ).append( response.data.output ); 402 } 403 else { 404 jQuery( data_output_selector ).html( response.data.output ); 405 if( '' != response.data.pagination ) { 406 jQuery('.ewd-ufaq-faq-list .ewd-ufaq-bottom').remove(); 407 jQuery('.ewd-ufaq-faq-list').append(response.data.pagination); 408 } 409 } 410 411 jQuery( '.ewd-ufaq-bottom' ).data( 'max_page', response.data.max_page ); 412 413 jQuery( '.ewd-ufaq-expand-all' ).removeClass( 'ewd-ufaq-hidden' ); 414 jQuery( '.ewd-ufaq-collapse-all' ).addClass( 'ewd-ufaq-hidden' ); 415 416 ufaqSetClickHandlers(); 417 UFAQSetRatingHandlers(); 418 UFAQSetPaginationHandlers(); 419 UFAQUpdatePaginationButtons(); 420 UFAQSetExpandCollapseHandlers(); 421 422 filtering_running = false; 423 } 424 }); 425 } 426 427 function UFAQSetRatingHandlers() { 428 429 jQuery( '.ewd-ufaq-rating-button' ).off( 'click' ).on( 'click', function() { 430 431 var faq_id = jQuery( this ).data( 'faq_id' ); 432 jQuery( '*[data-faq_id="' + faq_id + '"]' ).off( 'click' ); 433 434 var current_count = jQuery( this ).find( 'span' ).html(); 435 current_count++; 436 jQuery( this ).find( 'span' ).html( current_count ); 437 438 if ( jQuery( this ).hasClass( 'ewd-ufaq-up-vote' ) ) { vote_type = 'up'; } 439 else { vote_type = 'down'; } 440 441 var params = {}; 442 443 params.action = 'ewd_ufaq_update_rating'; 444 params.nonce = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.nonce : ''; 445 params.faq_id = faq_id; 446 params.vote_type = vote_type; 447 448 var data = jQuery.param( params ); 449 jQuery.post( ajaxurl, data ); 450 }); 451 } 452 453 function UFAQSetExpandCollapseHandlers() { 454 455 jQuery('.ewd-ufaq-expand-all').off('click').on('click', function() { 167 168 169 170 171 function UFAQSetExpandCollapseHandlers( context ) { 172 var interaction_scope = context ? jQuery( context ) : jQuery( document ); 173 174 interaction_scope.find('.ewd-ufaq-expand-all').off('click').on('click', function() { 175 var context_document = jQuery( this.ownerDocument ); 456 176 457 177 var accordion_setting = typeof ewd_ufaq_php_data != 'undefined' ? ewd_ufaq_php_data.faq_accordion : false; 458 ewd_ufaq_php_data.faq_accordion = false;// turn FAQ accordion off while expanding all459 460 jQuery( '.ewd-ufaq-faq-toggle' ).each( function() {178 if ( typeof ewd_ufaq_php_data != 'undefined' ) { ewd_ufaq_php_data.faq_accordion = false; } // turn FAQ accordion off while expanding all 179 180 context_document.find( '.ewd-ufaq-faq-toggle' ).each( function() { 461 181 462 182 var faq = jQuery(this).parent(); … … 469 189 if ( typeof ewd_ufaq_php_data != 'undefined' ) { ewd_ufaq_php_data.faq_accordion = accordion_setting; } //reset FAQ accordion setting 470 190 471 jQuery('.ewd-ufaq-faq-category-inner').removeClass('ewd-ufaq-faq-category-body-hidden'); 472 jQuery('.ewd-ufaq-collapse-all').removeClass('ewd-ufaq-hidden'); 473 jQuery('.ewd-ufaq-expand-all').addClass('ewd-ufaq-hidden'); 474 475 jQuery( '.ewd-ufaq-faq-category-title-toggle' ).addClass( 'ewd-ufaq-category-tab-selected' ); 476 jQuery( '.ewd-ufaq-category-post-margin-symbol span' ).each( function() { 477 jQuery( this ).html().toUpperCase(); 478 }); 479 }); 480 481 jQuery('.ewd-ufaq-collapse-all').off('click').on('click', function() { 482 483 jQuery('.ewd-ufaq-faq-toggle').each(function() { 191 context_document.find('.ewd-ufaq-faq-category-inner').removeClass('ewd-ufaq-faq-category-body-hidden'); 192 context_document.find('.ewd-ufaq-collapse-all').removeClass('ewd-ufaq-hidden'); 193 context_document.find('.ewd-ufaq-expand-all').addClass('ewd-ufaq-hidden'); 194 195 context_document.find( '.ewd-ufaq-faq-category-title-toggle' ).addClass( 'ewd-ufaq-category-tab-selected' ); 196 context_document.find( '.ewd-ufaq-category-post-margin-symbol span' ).each( function() { 197 jQuery( this ).text( jQuery( this ).text().toUpperCase() ); 198 }); 199 }); 200 201 interaction_scope.find('.ewd-ufaq-collapse-all').off('click').on('click', function() { 202 var context_document = jQuery( this.ownerDocument ); 203 204 context_document.find('.ewd-ufaq-faq-toggle').each(function() { 484 205 485 206 var faq = jQuery(this).parent(); … … 490 211 }); 491 212 492 jQuery( '.ewd-ufaq-faq-category-inner' ).addClass( 'ewd-ufaq-faq-category-body-hidden' ); 493 jQuery( '.ewd-ufaq-faq-category-title-toggle' ).removeClass( 'ewd-ufaq-category-tab-selected' ); 494 495 jQuery( '.ewd-ufaq-category-post-margin-symbol span' ).each( function() { 496 jQuery( this ).html().toLowerCase(); 497 }); 498 499 jQuery('.ewd-ufaq-expand-all').removeClass('ewd-ufaq-hidden'); 500 jQuery('.ewd-ufaq-collapse-all').addClass('ewd-ufaq-hidden'); 501 }); 502 } 503 504 function UFAQSetPaginationHandlers() { 505 506 jQuery('.ewd-ufaq-previous-faqs').off( 'click' ).on('click', function() { 507 508 var current_page = jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ); 509 510 jQuery( '.ewd-ufaq-bottom' ).data( 'current_page', Math.max( current_page - 1, 0 ) ); 511 jQuery( '.ewd-ufaq-max-faqs-not-reached' ).remove(); 512 513 ewd_ufaq_ajax_reload( 'Yes', 'No' ); 514 }); 515 516 jQuery('.ewd-ufaq-next-faqs').off( 'click' ).on('click', function() { 517 518 var current_page = jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ); 519 520 jQuery( '.ewd-ufaq-bottom' ).data( 'current_page', current_page + 1 ); 521 jQuery( '.ewd-ufaq-max-faqs-not-reached' ).remove(); 522 523 ewd_ufaq_ajax_reload( 'Yes', 'No' ); 524 }); 525 526 jQuery( '.ewd-ufaq-load-more' ).off( 'click' ).on( 'click', function() { 527 528 var current_page = jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ); 529 530 jQuery( '.ewd-ufaq-bottom' ).data( 'current_page', current_page + 1 ); 531 jQuery( '.ewd-ufaq-max-faqs-not-reached' ).remove(); 532 533 ewd_ufaq_ajax_reload( 'Yes', 'Yes' ); 534 }); 535 536 if ( jQuery( '.ewd-ufaq-pagination-infinite_scroll' ).length ) { 537 538 jQuery( window ).scroll( function() { 539 540 var infinite_pos = jQuery( '.ewd-ufaq-pagination-infinite_scroll').position(); 541 542 if ( infinite_pos != undefined && jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ) != jQuery( '.ewd-ufaq-bottom' ).data( 'max_page' ) ) { 543 544 if ( ( jQuery( window ).height() + jQuery( window ).scrollTop() > infinite_pos.top ) && filtering_running == false ) { 545 546 jQuery( '.ewd-ufaq-bottom' ).data( 'current_page', jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ) + 1 ); 547 548 ewd_ufaq_ajax_reload( 'Yes', 'Yes' ); 549 } 550 } 551 }); 552 } 553 } 554 555 function UFAQUpdatePaginationButtons() { 556 557 jQuery('.ewd-ufaq-bottom').first().appendTo('.ewd-ufaq-faq-list'); 558 559 if ( jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ) < jQuery( '.ewd-ufaq-bottom' ).data( 'max_page' ) ) { 560 561 jQuery( '.ewd-ufaq-load-more, .ewd-ufaq-next-faqs' ).removeClass( 'ewd-ufaq-hidden' ); 562 } 563 else { jQuery( '.ewd-ufaq-load-more, .ewd-ufaq-next-faqs' ).addClass( 'ewd-ufaq-hidden' ); } 564 565 if ( jQuery( '.ewd-ufaq-bottom' ).data( 'current_page' ) <= 1 ) { 566 567 jQuery( '.ewd-ufaq-previous-faqs' ).addClass( 'ewd-ufaq-hidden' ); 568 } 569 else { jQuery( '.ewd-ufaq-previous-faqs' ).removeClass( 'ewd-ufaq-hidden' ); } 570 } 571 572 function UFAQWPFormsHandler() { 573 574 if ( typeof wpforms_integration === 'undefined' || wpforms_integration === null ) { return; } 575 576 if ( wpforms_integration.ufaq_enabled == 'disabled' ) { return; } 577 578 var target_field = wpforms_integration.ufaq_selected_field; 579 580 jQuery( '#wpforms-' + wpforms_integration.form_id + '-field_' + wpforms_integration.ufaq_selected_field ).on( 'keyup', function() { 581 582 var search_string = jQuery( this ).val(); 583 584 if ( search_string.length >= wpforms_integration.ufaq_minimum_characters ) { 585 586 jQuery( '.ewd-ufaq-wpforms-faq-results' ).removeClass( 'ewd-ufaq-hidden' ); 587 jQuery( '.ewd-ufaq-wpforms-label' ).removeClass( 'ewd-ufaq-hidden' ); 588 589 ewd_ufaq_ajax_reload( 'No', 'No', search_string ); 590 } 591 else if ( ! filtering_running ) { 592 593 jQuery( '.ewd-ufaq-faqs' ).html( ' ' ); 594 jQuery( '.ewd-ufaq-wpforms-faq-results' ).addClass( 'ewd-ufaq-hidden' ); 595 jQuery( '.ewd-ufaq-wpforms-label' ).addClass( 'ewd-ufaq-hidden' ); 596 } 597 598 }); 599 } 213 context_document.find( '.ewd-ufaq-faq-category-inner' ).addClass( 'ewd-ufaq-faq-category-body-hidden' ); 214 context_document.find( '.ewd-ufaq-faq-category-title-toggle' ).removeClass( 'ewd-ufaq-category-tab-selected' ); 215 216 context_document.find( '.ewd-ufaq-category-post-margin-symbol span' ).each( function() { 217 jQuery( this ).text( jQuery( this ).text().toLowerCase() ); 218 }); 219 220 context_document.find('.ewd-ufaq-expand-all').removeClass('ewd-ufaq-hidden'); 221 context_document.find('.ewd-ufaq-collapse-all').addClass('ewd-ufaq-hidden'); 222 }); 223 } 224 225 226 227 228 229 600 230 601 231 /*jQuery(document).ready(function() { … … 626 256 });*/ 627 257 628 jQuery( document ).ready( function() {629 630 jQuery( '.ewd-ufaq-compact-faq-meta .ewd-ufaq-permalink a' ).html( '<span class="dashicons dashicons-admin-links"></span>' );631 jQuery( '.ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-facebook a' ).html( '<span class="dashicons dashicons-facebook-alt"></span>' );632 jQuery( '.ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-twitter a' ).html( '<span class="dashicons dashicons-twitter-alt"></span>' );633 jQuery( '.ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-linkedin a' ).html( '<span class="dashicons dashicons-linkedin"></span>' );634 jQuery( '.ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-pinterest a' ).html( '<span class="dashicons dashicons-pinterest"></span>' );635 jQuery( '.ewd-ufaq-compact-faq-meta .rrssb-buttons li.rrssb-email a' ).html( '<span class="dashicons dashicons-email-alt"></span>' );636 jQuery( '.ewd-ufaq-compact-faq-meta .ewd-ufaq-up-vote' ).prepend( '<span class="dashicons dashicons-thumbs-up"></span>' );637 jQuery( '.ewd-ufaq-compact-faq-meta .ewd-ufaq-down-vote' ).prepend( '<span class="dashicons dashicons-thumbs-down"></span>' );638 } ); -
ultimate-faqs/trunk/ewd-ufaq-templates/faq.php
r3352283 r3821169 7 7 <?php $this->maybe_print_faq_preview(); ?> 8 8 9 <div class='ewd-ufaq-faq-body<?php echo ( ! $this->display_all_answers ? ' ewd-ufaq-hidden' : '' ); ?><?php echo ( $ewd_ufaq_controller->settings->get_setting( 'compact-faq-meta' ) ? ' ewd-ufaq-compact-faq-meta' : '' ); ?>'>9 <div <?php echo ewd_format_classes( $this->get_body_classes() ); ?>> 10 10 11 11 <?php foreach ( $this->get_order_elements() as $element => $label ) { ?> -
ultimate-faqs/trunk/ewd-ufaq-templates/faqs-search-submit.php
r2643489 r3821169 1 < label for='ewd-ufaq-search-submit'></label>2 3 <input type='button' id='ewd-ufaq-ajax-search-submit' name='Search' value='<?php echo esc_html( $this->get_label( 'label-search' ) ); ?>'> 1 <?php 2 // Compatibility template identity; Helper supplies advanced-search controls. 3 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'advanced_search_submit', $this ); -
ultimate-faqs/trunk/ewd-ufaq-templates/faqs-search.php
r2830708 r3821169 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 7 <?php $this->maybe_print_shortcode_args(); ?> 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' ) ); ?>' 15 value='<?php echo ( isset( $_GET['faq_search_term'] ) ? esc_attr( $_GET['faq_search_term'] ) : '' ); ?>' /> 16 <button type="button" class="clear-field" data-state="hidden">x</button> 17 </div> 18 19 <?php $this->maybe_print_search_submit(); ?> 20 21 </div> 1 <?php 2 // Compatibility template identity. Free's ordinary GET form is owned by BasicSearch. 3 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'advanced_search_form', $this ); -
ultimate-faqs/trunk/includes/AIAssist.class.php
r3704732 r3821169 9 9 if ( !class_exists( 'ewdufaqAIAssist' ) ) { 10 10 class ewdufaqAIAssist { 11 public static function limits( $operation ) { 12 $defaults = array( 'sources' => 1, 'faqs' => 1 ); 13 $limits = apply_filters( 'ewd_ufaq_legacy_ai_limits', $defaults, $operation ); 14 foreach ( $defaults as $key => $value ) { if ( ! is_array( $limits ) || ! isset( $limits[ $key ] ) || ! is_int( $limits[ $key ] ) || $limits[ $key ] < 1 ) { return $defaults; } } 15 return array_intersect_key( $limits, $defaults ); 16 } 11 17 12 18 public function __construct() { … … 41 47 42 48 if ( ! isset( $post_type ) or $post_type != EWD_UFAQ_FAQ_POST_TYPE ) { return; } 49 $limits = self::limits( 'render' ); 43 50 44 51 $args = array( … … 96 103 <select id='ewd-ufaq-ai-faqs-count'> 97 104 98 <?php for ( $i = 1; $i <= ( ! $ewd_ufaq_controller->permissions->check_permission( 'premium' ) ? 1 : 20 ); $i++ ) { ?>105 <?php for ( $i = 1; $i <= $limits['faqs']; $i++ ) { ?> 99 106 100 107 <option value='<?php echo $i; ?>'> … … 106 113 </select> 107 114 108 <?php if ( ! $ewd_ufaq_controller->permissions->check_permission( 'premium' )) { ?>115 <?php if ( 1 === $limits['faqs'] ) { ?> 109 116 110 117 <div class='ewd-ufaq-ai-no-premium-explanation'> … … 122 129 </label> 123 130 124 <select id='ewd-ufaq-ai-faqs-content' <?php echo ( $ewd_ufaq_controller->permissions->check_permission( 'premium' ) ? 'multiple=\'multiple\'' : '' ); ?>>131 <select id='ewd-ufaq-ai-faqs-content' <?php echo $limits['sources'] > 1 ? 'multiple="multiple"' : ''; ?>> 125 132 126 133 <?php foreach ( $content_options as $post_type => $posts ){ ?> … … 232 239 } 233 240 234 $ is_premium = $ewd_ufaq_controller->permissions->check_permission( 'premium' );241 $limits = self::limits( 'retrieve' ); 235 242 $selected_posts = array_values( array_unique( array_filter( array_map( 'absint', $selected_raw ) ) ) ); 236 $selected_posts = array_slice( $selected_posts, 0, $ is_premium ? 20 : 1);237 $faq_count = min( max( 1, isset( $_POST['faq_count'] ) ? absint( $_POST['faq_count'] ) : 1 ), $ is_premium ? 20 : 1);243 $selected_posts = array_slice( $selected_posts, 0, $limits['sources'] ); 244 $faq_count = min( max( 1, isset( $_POST['faq_count'] ) ? absint( $_POST['faq_count'] ) : 1 ), $limits['faqs'] ); 238 245 $set_categories = isset( $_POST['set_categories'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['set_categories'] ) ); 239 246 … … 399 406 } 400 407 401 $limit = $ewd_ufaq_controller->permissions->check_permission( 'premium' ) ? 20 : 1; 408 $limits = self::limits( 'publish' ); 409 $limit = $limits['faqs']; 402 410 $faqs = array_slice( $this->sanitize_faqs( $faqs_raw ), 0, $limit ); 403 411 foreach ( $faqs as $faq ) { -
ultimate-faqs/trunk/includes/Ajax.class.php
r3744649 r3821169 10 10 class ewdufaqAJAX { 11 11 12 public function __construct() { 12 public function __construct( $register = true ) { 13 if ( ! $register ) { return; } 13 14 14 add_action( 'wp_ajax_ewd_ufaq_search', array( $this, 'return_search_results' ) );15 add_action( 'wp_ajax_nopriv_ewd_ufaq_search', array( $this, 'return_search_results' ) );16 17 add_action( 'wp_ajax_ewd_ufaq_record_search_term', array( $this, 'save_search_term' ) );18 add_action( 'wp_ajax_nopriv_ewd_ufaq_record_search_term', array( $this, 'save_search_term' ) );19 15 20 16 add_action( 'wp_ajax_ewd_ufaq_reset_saved_search_terms', array( $this, 'reset_saved_search_term' ) ); … … 23 19 add_action( 'wp_ajax_nopriv_ewd_ufaq_record_view', array( $this, 'record_view' ) ); 24 20 25 add_action( 'wp_ajax_ewd_ufaq_update_rating', array( $this, 'update_rating' ) );26 add_action( 'wp_ajax_nopriv_ewd_ufaq_update_rating', array( $this, 'update_rating' ) );27 21 28 add_action( 'wp_ajax_ewd_ufaq_update_faq_order', array( $this, 'update_faq_order' ) );29 30 add_action( 'wp_ajax_ewd_ufaq_update_category_order', array( $this, 'update_category_order' ) );31 22 } 32 23 … … 36 27 */ 37 28 public function return_search_results() { 38 global $ewd_ufaq_controller; 39 if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) { 40 ewdufaqHelper::bad_nonce_ajax(); 41 } 42 43 if ( $ewd_ufaq_controller->helper_compatibility->get_state() !== 'compatible' 44 || ! $ewd_ufaq_controller->permissions->check_permission( 'search' ) ) { 45 46 wp_send_json_error( array( 'code' => 'advanced_search_unavailable' ), 403 ); 47 } 48 $faq_atts = array( 49 'is_search' => 1, 50 'search_string' => '', 51 'post__in' => '', 52 'post__in_string' => '', 53 'include_tag' => '', 54 'include_category' => isset( $_POST['include_category'] ) ? sanitize_text_field( $_POST['include_category'] ) : '', //so that only the matching category is displayed 55 'exclude_category' => '', 56 'include_category_ids' => '', 57 'exclude_category_ids' => '', 58 'include_category_children' => '', 59 'no_comments' => '', 60 'orderby' => '', 61 'order' => '', 62 'display_all_answers' => '', 63 'faq_page' => 1, 64 'post_count' => -1 65 ); 66 67 $query = new ewdufaqQuery( $faq_atts ); 68 69 $query->parse_request_args(); 70 $query->prepare_args(); 71 72 $faq_atts['search_string'] = isset( $_REQUEST['search_string'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['search_string'] ) ) : ''; 73 $faqs = new ewdufaqViewFAQs( $faq_atts ); 74 75 $faqs->set_request_parameters(); 76 77 $faqs->set_faqs( $query->get_faqs() ); 78 79 $faqs->set_faqs_options(); 80 81 $faqs->create_faq_data(); 82 83 $faqs->set_faq_properties(); 84 85 ob_start(); 86 87 $ewd_ufaq_controller->shortcode_printing = true; 88 89 $faqs->print_faqs(); 90 91 $ewd_ufaq_controller->shortcode_printing = false; 92 93 $output = ob_get_clean(); 94 95 $pagination = ''; 96 if('yes' != $faqs->show_on_load && 2 > $faqs->faq_page) { 97 ob_start(); 98 $faqs->maybe_print_pagination(); 99 $pagination = ob_get_clean(); 100 } 101 102 $output = $output ? $output : '<div class="ewd-ufaq-no-results-found">' . sprintf( $ewd_ufaq_controller->settings->get_setting( 'label-no-results-found' ), $query->args['search_string'] ) . '</div>'; 103 104 do_action( 'ewd_ufaq_advanced_search_completed', $query->args['search_string'], count( $faqs->displayed_faqs ), $faq_atts ); 105 $analytics = apply_filters( 'ewd_ufaq_advanced_search_analytics', array(), $query->args['search_string'], count( $faqs->displayed_faqs ), $faq_atts ); 106 wp_send_json_success( 107 array( 108 'output' => $output, 109 'pagination' => $pagination, 110 'faq_count' => $faqs->faq_count, 111 'max_page' => $faqs->max_page, 112 'request_count' => intval( $_POST['request_count'] ), 113 'analytics' => $analytics, 114 ) 115 ); 116 117 die(); 29 if ( class_exists( 'ewdufaqEWDPHSearch', false ) ) { return ( new ewdufaqEWDPHSearch( false ) )->return_search_results(); } 30 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 118 31 } 119 32 … … 144 57 */ 145 58 public function update_rating() { 146 global $ewd_ufaq_controller; 147 if ( ! $ewd_ufaq_controller->permissions->check_permission( 'premium' ) ) { 148 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 149 } 150 151 if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) { 152 ewdufaqHelper::bad_nonce_ajax(); 153 } 154 155 $faq_id = isset( $_POST['faq_id'] ) ? absint( $_POST['faq_id'] ) : 0; 156 $vote_type = isset( $_POST['vote_type'] ) ? sanitize_key( wp_unslash( $_POST['vote_type'] ) ) : ''; 157 158 if ( ! $this->is_public_faq( $faq_id ) || ! in_array( $vote_type, array( 'up', 'down' ), true ) ) { 159 160 wp_send_json_error( array( 'code' => 'invalid_rating' ), 400 ); 161 } 162 163 if ( ! $this->allow_public_event( 'rating', $faq_id, DAY_IN_SECONDS ) ) { wp_send_json_success( array( 'duplicate' => true ) ); } 164 165 if ( 'up' === $vote_type ) { 166 167 $this->increment_post_meta( $faq_id, 'FAQ_Up_Votes', 1 ); 168 $this->increment_post_meta( $faq_id, 'FAQ_Total_Score', 1 ); 169 } 170 else { 171 172 $this->increment_post_meta( $faq_id, 'FAQ_Down_Votes', 1 ); 173 $this->increment_post_meta( $faq_id, 'FAQ_Total_Score', -1 ); 174 } 175 176 do_action( 'ewd_ufaq_public_faq_helpfulness', $faq_id, $vote_type ); 177 178 wp_send_json_success(); 59 if ( class_exists( 'ewdufaqEWDPHPaidAjax', false ) ) { return ewdufaqEWDPHPaidAjax::update_rating( $this ); } 60 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 179 61 } 180 62 … … 184 66 */ 185 67 public function update_faq_order() { 186 global $ewd_ufaq_controller; 187 188 if ( 189 ! check_ajax_referer( 'ewd-ufaq-admin-js', 'nonce' ) 190 || 191 ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) ) 192 ) { 193 ewdufaqHelper::admin_nopriv_ajax(); 194 } 195 196 if ( ! is_array( $_POST['ewd-ufaq-item'] ) or ! $ewd_ufaq_controller->permissions->check_permission( 'ordering' ) ) { return; } 197 198 foreach ( $_POST['ewd-ufaq-item'] as $key => $id ) { 199 200 update_post_meta( intval( $id ), 'ufaq_order', intval( $key ) + 1 ); 201 } 202 203 die(); 68 if ( class_exists( 'ewdufaqEWDPHOrdering', false ) ) { return ewdufaqEWDPHOrdering::save_faq(); } 69 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 204 70 } 205 71 … … 209 75 */ 210 76 public function update_category_order() { 211 global $ewd_ufaq_controller; 212 if ( ! $ewd_ufaq_controller->permissions->check_permission( 'ordering' ) ) { 213 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 214 } 215 216 // Authenticate request 217 if ( 218 ! check_ajax_referer( 'ewd-ufaq-admin-js', 'nonce' ) 219 || 220 ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) ) 221 ) { 222 ewdufaqHelper::admin_nopriv_ajax(); 223 } 224 225 $ids = is_array( $_POST['tag'] ) ? array_map( 'intval', $_POST['tag'] ) : array(); 226 227 foreach ( $ids as $order => $term_id ) { 228 229 update_term_meta( $term_id, 'ufaq_category_order', $order ); 230 } 77 if ( class_exists( 'ewdufaqEWDPHOrdering', false ) ) { return ewdufaqEWDPHOrdering::save_category(); } 78 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 231 79 } 232 80 … … 236 84 */ 237 85 public function save_search_term() { 238 global $ewd_ufaq_controller; 239 if ( ! $ewd_ufaq_controller->permissions->check_permission( 'search' ) ) { 240 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 241 } 242 243 if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) { 244 ewdufaqHelper::bad_nonce_ajax(); 245 } 246 247 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'save-search-terms' ) ) ) { return; } 248 249 $search_term = isset( $_POST['search_term'] ) ? sanitize_text_field( wp_unslash( $_POST['search_term'] ) ) : ''; 250 $search_term = function_exists( 'mb_substr' ) ? mb_substr( $search_term, 0, 200 ) : substr( $search_term, 0, 200 ); 251 if ( empty( $search_term ) or strlen( $search_term ) < 2 ) { die(); } 252 253 $search_terms = get_option( 'ewd-ufaq-search-data', array() ); 254 255 if ( isset( $search_terms[ $search_term ] ) ) { 256 257 $search_terms[ $search_term ]++; 258 } 259 elseif ( count( $search_terms ) < 1000 ) { 260 261 $search_terms[ $search_term ] = 1; 262 } 263 update_option( 'ewd-ufaq-search-data', $search_terms ); 264 265 die(); 86 if ( class_exists( 'ewdufaqEWDPHSearch', false ) ) { return ( new ewdufaqEWDPHSearch( false ) )->save_search_term(); } 87 wp_send_json_error( array( 'code' => 'premium_unavailable' ), 403 ); 266 88 } 267 89 -
ultimate-faqs/trunk/includes/AnalyticsBridge.class.php
r3704732 r3821169 1 1 <?php 2 /** 3 * Common analytics event bridge. Free registers no analytics storage or public route. 4 */ 5 6 if ( ! defined( 'ABSPATH' ) ) { 7 exit; 8 } 9 10 if ( ! class_exists( 'ewdufaqAnalyticsBridge' ) ) { 11 class ewdufaqAnalyticsBridge { 12 13 private $contexts = array(); 14 private $assets_enqueued = false; 15 16 public function __construct() { 17 18 add_action( 'ewd_ufaq_basic_search_rendered', array( $this, 'register_search' ), 10, 5 ); 19 add_action( 'ewd_ufaq_faq_rendered', array( $this, 'register_faq' ), 10, 2 ); 20 add_filter( 'ewd_ufaq_advanced_search_analytics', array( $this, 'advanced_search_context' ), 10, 4 ); 21 add_action( 'wp_footer', array( $this, 'print_contexts' ), 5 ); 22 } 23 24 public function advanced_search_context( $context, $term, $result_count, $args ) { 25 26 $term = trim( sanitize_text_field( $term ) ); 27 if ( '' === $term ) { 28 return $context; } 29 $payload = array( 30 'event' => 'search', 31 'display_hash' => hash( 'sha256', 'advanced|' . wp_json_encode( $args ) ), 32 'locale' => determine_locale(), 33 'search_text' => $term, 34 'query_hash' => hash( 'sha256', determine_locale() . '|' . $term ), 35 'result_count' => absint( $result_count ), 36 ); 37 $token = apply_filters( 'ewd_ufaq_analytics_sign_event_context', '', $payload ); 38 $endpoint = apply_filters( 'ewd_ufaq_analytics_endpoint', '' ); 39 if ( ! is_string( $token ) || '' === $token || ! is_string( $endpoint ) || '' === $endpoint ) { 40 return $context; } 41 return array( 42 'event' => 'search', 43 'endpoint' => $endpoint, 44 'token' => $token, 45 'storage_key' => substr( hash( 'sha256', $payload['query_hash'] . '|' . $payload['display_hash'] . '|' . absint( $result_count ) ), 0, 32 ), 46 ); 47 } 48 49 public function register_search( $identity, $term, $result_count, $args, $faq_ids = array() ) { 50 51 $display_hash = hash( 'sha256', $identity . '|' . wp_json_encode( $args ) ); 52 $this->register_context( 53 array( 54 'event' => 'search', 55 'display_hash' => $display_hash, 56 'locale' => determine_locale(), 57 'search_text' => $term, 58 'query_hash' => hash( 'sha256', determine_locale() . '|' . $term ), 59 'result_count' => absint( $result_count ), 60 'faq_ids' => array_slice( array_values( array_unique( array_map( 'absint', $faq_ids ) ) ), 0, 20 ), 61 ) 62 ); 63 } 64 65 public function register_faq( $faq_id, $view ) { 66 67 $faq_id = absint( $faq_id ); 68 69 if ( ! $faq_id ) { 70 return; } 71 72 $display_hash = hash( 'sha256', get_queried_object_id() . '|faq|' . $faq_id ); 73 74 foreach ( array( 'open', 'helpful_yes', 'helpful_no' ) as $event ) { 75 76 $this->register_context( 77 array( 78 'event' => $event, 79 'display_hash' => $display_hash, 80 'locale' => determine_locale(), 81 'faq_id' => $faq_id, 82 'search_text' => ! empty( $view->search_string ) ? $view->search_string : '', 83 'query_hash' => ! empty( $view->search_string ) ? hash( 'sha256', determine_locale() . '|' . $view->search_string ) : '', 84 ) 85 ); 86 } 87 } 88 89 private function register_context( $payload ) { 90 91 if ( count( $this->contexts ) >= 100 ) { 92 return; } 93 94 $token = apply_filters( 'ewd_ufaq_analytics_sign_event_context', '', $payload ); 95 $endpoint = apply_filters( 'ewd_ufaq_analytics_endpoint', '' ); 96 97 if ( ! is_string( $token ) || '' === $token || ! is_string( $endpoint ) || '' === $endpoint ) { 98 return; } 99 100 $storage_key = substr( hash( 'sha256', $payload['event'] . '|' . ( isset( $payload['faq_id'] ) ? absint( $payload['faq_id'] ) : 0 ) . '|' . ( isset( $payload['query_hash'] ) ? $payload['query_hash'] : '' ) . '|' . $payload['display_hash'] ), 0, 32 ); 101 foreach ( $this->contexts as $existing ) { 102 if ( $existing['storage_key'] === $storage_key ) { 103 return; } 104 } 105 106 $this->contexts[] = array( 107 'event' => $payload['event'], 108 'faq_id' => isset( $payload['faq_id'] ) ? absint( $payload['faq_id'] ) : 0, 109 'token' => $token, 110 'storage_key' => $storage_key, 111 ); 112 113 if ( ! $this->assets_enqueued ) { 114 115 wp_enqueue_script( 'ewd-ufaq-analytics', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq-analytics.js', array(), EWD_UFAQ_VERSION, true ); 116 $this->assets_enqueued = true; 117 } 118 } 119 120 public function print_contexts() { 121 122 if ( empty( $this->contexts ) ) { 123 return; } 124 125 wp_add_inline_script( 126 'ewd-ufaq-analytics', 127 'window.ewdUfaqAnalytics=' . wp_json_encode( 128 array( 129 'endpoint' => apply_filters( 'ewd_ufaq_analytics_endpoint', '' ), 130 'contexts' => $this->contexts, 131 ) 132 ) . ';', 133 'before' 134 ); 135 } 2 /** Compatibility facade. Core render/search events do not collect analytics in Free. */ 3 if ( ! defined( 'ABSPATH' ) ) { exit; } 4 class ewdufaqAnalyticsBridge { 5 public function __construct() {} 6 public function advanced_search_context( $context, $term, $count, $args ) { 7 return class_exists( 'ewdufaqEWDPHAnalyticsBridge', false ) ? ewdufaqEWDPHAnalyticsBridge::instance()->advanced_search_context( $context, $term, $count, $args ) : $context; 8 } 9 public function register_search( $identity, $term, $count, $args, $ids = array() ) { 10 if ( class_exists( 'ewdufaqEWDPHAnalyticsBridge', false ) ) { ewdufaqEWDPHAnalyticsBridge::instance()->register_search( $identity, $term, $count, $args, $ids ); } 11 } 12 public function register_faq( $id, $view ) { 13 if ( class_exists( 'ewdufaqEWDPHAnalyticsBridge', false ) ) { ewdufaqEWDPHAnalyticsBridge::instance()->register_faq( $id, $view ); } 14 } 15 public function print_contexts() { 16 if ( class_exists( 'ewdufaqEWDPHAnalyticsBridge', false ) ) { ewdufaqEWDPHAnalyticsBridge::instance()->print_contexts(); } 136 17 } 137 18 } -
ultimate-faqs/trunk/includes/Blocks.class.php
r3744649 r3821169 131 131 wp_enqueue_style( 'ewd-ufaq-css' ); 132 132 wp_enqueue_style( 'ewd-ufaq-blocks-css' ); 133 wp_enqueue_style( 'ewd-ufaq-rrssb' ); 134 wp_enqueue_style( 'ewd-ufaq-jquery-ui' ); 135 if ( 'minimalist' === $ewd_ufaq_controller->settings->get_setting( 'display-style' ) ) { 136 wp_enqueue_style( 'ewd-ufaq-minimalist' ); 133 $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null; 134 if ( $screen && ( $screen->is_block_editor() || 'widgets' === $screen->id ) ) { 135 wp_enqueue_script( 'ewd-ufaq-js' ); 136 $args = array( 'nonce' => wp_create_nonce( 'ewd-ufaq-js' ), 'faq_accordion' => $ewd_ufaq_controller->settings->get_setting( 'faq-accordion' ), 'category_accordion' => $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ), 'faq_scroll' => false ); 137 wp_add_inline_script( 'ewd-ufaq-js', 'window.ajaxurl=' . wp_json_encode( admin_url( 'admin-ajax.php' ) ) . ';window.ewd_ufaq_php_data=' . wp_json_encode( apply_filters( 'ewd_ufaq_js_localize_data', $args, null ) ) . ';', 'before' ); 137 138 } 138 139 } -
ultimate-faqs/trunk/includes/CustomPostTypes.class.php
r3704732 r3821169 37 37 38 38 // Possibly notify FAQ submitted if user-submitted 39 add_action( 'pre_post_update', array( $this, 'maybe_notify_author_on_update' ), 10, 2 );40 39 41 40 // Sort taxonomy tables by custom ordering, if no other ordering set … … 215 214 $faq_author = $faq_author ? $faq_author : $user->display_name; 216 215 217 218 $up_votes = get_post_meta( $post->ID, 'FAQ_Up_Votes', true );219 $down_votes = get_post_meta( $post->ID, 'FAQ_Down_Votes', true );220 221 216 ?> 222 217 … … 230 225 </div> 231 226 232 <?php if ( $ewd_ufaq_controller->settings->get_setting( 'faq-ratings' ) ) { ?> 233 234 <div class='ewd-ufaq-meta-field'> 235 <label class='ewd-ufaq-meta-label' for='review_karma'> 236 <?php _e( 'Up Votes:', 'ultimate-faqs' ); ?> 237 </label> 238 <input type='text' id='ewd-ufaq-review-karma' name='up_votes' value='<?php echo esc_attr( $up_votes ); ?>' size='25' /> 239 <label class='ewd-ufaq-meta-label' for='review_karma'> 240 <?php _e( 'Down Votes:', 'ultimate-faqs' ); ?> 241 </label> 242 <input type='text' id='ewd-ufaq-review-karma' name='down_votes' value='<?php echo esc_attr( $down_votes ); ?>' size='25' /> 243 </div> 244 245 <?php } ?> 246 247 <?php $custom_fields = ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); ?> 248 249 <?php foreach ( $custom_fields as $faq_field ) { ?> 250 251 <?php $field_value = get_post_meta( $post->ID, "Custom_Field_" . $faq_field->id, true ); ?> 252 253 <div class='ewd-ufaq-meta-field'> 254 <label class='ewd-ufaq-score-label' for='<?php echo esc_attr( $faq_field->name ); ?>'> 255 <?php echo esc_html( $faq_field->name ) ?> 256 </label> 257 258 <?php $options = explode( ',', $faq_field->options ); ?> 259 260 <?php if ( $faq_field->type == 'textarea' ) { ?> 261 262 <textarea id='ewd-ufaq-<?php echo esc_attr( $faq_field->name ); ?>' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>'> 263 <?php echo esc_html( $field_value ); ?> 264 </textarea> 265 266 <?php } elseif ( $faq_field->type == 'select' ) { ?> 267 <?php if ( ! empty( $options ) ) { ?> 268 269 <select name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>'> 270 <?php foreach ( $options as $option ) { ?> 271 272 <option value='<?php echo esc_attr( $option ); ?>' <?php echo ( $option == $field_value ? 'selected' : '' ); ?> > 273 <?php echo esc_html( $option ); ?> 274 </option> 275 <?php } ?> 276 </select> 277 278 <?php } ?> 279 <?php } elseif ( $faq_field->type == 'checkbox' ) { ?> 280 <?php $field_value = is_array( $field_value ) ? $field_value : array(); ?> 281 <?php if ( ! empty( $options ) ) { ?> 282 283 <div class='ewd-ufaq-fields-page-radio-checkbox-container'> 284 <?php foreach ( $options as $option ) { ?> 285 286 <div class='ewd-ufaq-fields-page-radio-checkbox-each'> 287 <input type='checkbox' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>[]' value='<?php echo esc_attr( $option ); ?>' <?php echo ( in_array( $option, $field_value ) ? 'checked' : '' ); ?> /> 288 <?php echo esc_html( $option ); ?> 289 </div> 290 <?php } ?> 291 </div> 292 293 <?php } ?> 294 <?php } elseif ( $faq_field->type == 'radio' ) { ?> 295 <?php if ( ! empty( $options ) ) { ?> 296 297 <div class='ewd-ufaq-fields-page-radio-checkbox-container'> 298 <?php foreach ( $options as $option ) { ?> 299 300 <div class='ewd-ufaq-fields-page-radio-checkbox-each'> 301 <input type='radio' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>' value='<?php echo esc_attr( $option ); ?>' <?php echo ( $option == $field_value ? 'checked' : '' ); ?> /> 302 <?php echo esc_html( $option ); ?> 303 </div> 304 <?php } ?> 305 </div> 306 307 <?php } ?> 308 <?php } elseif ( $faq_field->type == 'date' ) { ?> 309 310 <input type='date' class='ewd-ufaq-jquery-datepicker' id='ewd-ufaq-<?php echo esc_attr( $faq_field->name ); ?>' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>' value='<?php echo esc_attr( $field_value ); ?>' /> 311 312 <?php } elseif ( $faq_field->type == 'datetime' ) { ?> 313 314 <input type='datetime-local' id='ewd-ufaq-<?php echo esc_attr( $faq_field->name ); ?>' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>' value='<?php echo esc_attr( $field_value ); ?>' /> 315 316 <?php } elseif ( $faq_field->type == 'file' ) { ?> 317 318 <div class='ewd-ufaq-fields-page-file-preview'> 319 320 <span> 321 <?php _e( 'Current File:', 'ultimate-faqs' ); ?> <?php echo ! empty( $field_value ) ? esc_html( basename( $field_value ) ) : ''; ?> 322 </span> 323 324 </div> 325 326 <input type='file' id='ewd-ufaq-<?php echo esc_attr( $faq_field->name ); ?>' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>' /> 327 328 <?php } else { ?> 329 330 <input type='text' id='ewd-ufaq-<?php echo esc_attr( $faq_field->name ); ?>' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>' value='<?php echo esc_attr( $field_value ); ?>' size='25' /> 331 332 <?php } ?> 333 334 </div> 335 336 <?php 337 } 338 } 227 <?php do_action( 'ewd_ufaq_admin_meta_fields', $post ); 228 } 339 229 340 230 /** … … 357 247 public function save_meta( $post_id ) { 358 248 global $ewd_ufaq_controller; 249 if ( EWD_UFAQ_FAQ_POST_TYPE !== get_post_type( $post_id ) ) { return $post_id; } 359 250 360 251 // Verify nonce … … 376 267 return $post_id; 377 268 } 378 379 if ( ! get_post_meta( $post_id, 'ufaq_order', true ) ) { update_post_meta( $post_id, 'ufaq_order', 9999 ); } 380 381 if ( isset( $_POST['faq_author'] ) ) { update_post_meta( $post_id, 'EWD_UFAQ_Post_Author', sanitize_text_field( $_POST['faq_author'] ) ); } 382 if ( isset( $_POST['up_votes'] ) ) { update_post_meta( $post_id, 'FAQ_Up_Votes', sanitize_text_field( $_POST['up_votes'] ) ); } 383 if ( isset( $_POST['down_votes'] ) ) { update_post_meta( $post_id, 'FAQ_Down_Votes', sanitize_text_field( $_POST['down_votes'] ) ); } 384 385 $custom_fields = ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); 386 387 foreach ( $custom_fields as $faq_field ) { 388 389 $input_name = 'EWD_UFAQ_Custom_Field_' . $faq_field->id; 390 391 if ( $faq_field->type == 'file' ) { 392 393 if ( empty( $_FILES[ $input_name ]['name'] ) ) { continue; } 394 395 $uploaded_file = wp_handle_upload( $_FILES[ $input_name ], array( 'test_form' => false ) ); 396 $field_value = $uploaded_file['url']; 397 } 398 elseif ( $faq_field->type == 'checkbox' ) { 399 400 $field_value = ( isset( $_POST[ $input_name ] ) and is_array( $_POST[ $input_name ] ) ) ? array_map( 'sanitize_text_field', $_POST[ $input_name ] ) : array(); 401 } 402 else { 403 404 $field_value = sanitize_text_field( $_POST[ $input_name ] ); 405 } 406 407 update_post_meta( $post_id, 'Custom_Field_' . $faq_field->id, $field_value ); 408 } 269 if ( isset( $_POST['faq_author'] ) ) { update_post_meta( $post_id, 'EWD_UFAQ_Post_Author', sanitize_text_field( $_POST['faq_author'] ) ); } 270 do_action( 'ewd_ufaq_save_admin_fields', $post_id ); 409 271 } 410 272 … … 613 475 */ 614 476 public function sort_categories_by_order( $clauses, $taxonomies ) { 615 global $wpdb; 616 617 if ( ! in_array( EWD_UFAQ_FAQ_CATEGORY_TAXONOMY, $taxonomies ) ) { return $clauses; } 618 if ( ! empty( $clauses['orderby'] ) and $clauses['orderby'] != 'ORDER BY t.name' ) { return $clauses; } 619 620 $clauses['join'] .= ' INNER JOIN ' . $wpdb->prefix . 'termmeta AS tm ON t.term_id = tm.term_id'; 621 622 $clauses['where'] .= ' AND tm.meta_key = "ufaq_category_order"'; 623 624 $clauses['orderby'] = 'ORDER BY tm.meta_value+0'; 625 626 return $clauses; 477 return class_exists( 'ewdufaqEWDPHOrdering', false ) ? ewdufaqEWDPHOrdering::sort_categories_by_order( $clauses, $taxonomies ) : $clauses; 627 478 } 628 479 … … 632 483 */ 633 484 public function maybe_notify_author_on_update( $post_id, $data ) { 634 global $ewd_ufaq_controller; 635 636 if ( get_post_type( $post_id ) != EWD_UFAQ_FAQ_POST_TYPE ) { return; } 637 638 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'submit-faq-updates' ) ) ) { return; } 639 640 remove_action( 'pre_post_update', array( $this, 'maybe_notify_author_on_update' ) ); 641 642 $post = get_post( $post_id ); 643 644 if ( $ewd_ufaq_controller->settings->get_setting( 'submit-faq-updates' ) == 'first_answer' and ! empty( $post->post_content ) ) { return; } 645 646 $faq = new ewdufaqFAQ(); 647 648 $faq->load_post( $post ); 649 650 $ewd_ufaq_controller->notifications->user_question_updated( $faq ); 485 if ( class_exists( 'ewdufaqEWDPHSubmissionNotifications', false ) ) { return ewdufaqEWDPHSubmissionNotifications::maybe_notify_author_on_update( $post_id, $data ); } 651 486 } 652 487 } -
ultimate-faqs/trunk/includes/EditorFAQWorkflow.class.php
r3744649 r3821169 212 212 213 213 $this->send_error( 'create_failed', __( 'WordPress did not publish the new FAQ.', 'ultimate-faqs' ), 500 ); 214 }215 216 if ( false === update_post_meta( $post_id, 'ufaq_order', 9999 ) ) {217 218 wp_delete_post( $post_id, true );219 $this->send_error( 'create_failed', __( 'The new FAQ could not be initialized for display.', 'ultimate-faqs' ), 500 );220 214 } 221 215 -
ultimate-faqs/trunk/includes/FAQ.class.php
r3744649 r3821169 67 67 } 68 68 69 if ( get_class( $post ) == 'WP_Post'&& $post->post_type == EWD_UFAQ_FAQ_POST_TYPE ) {69 if ( $post instanceof WP_Post && $post->post_type == EWD_UFAQ_FAQ_POST_TYPE ) { 70 70 $this->load_wp_post( $post ); 71 71 return true; … … 148 148 * @since 2.0.0 149 149 */ 150 public function insert_faq() { 151 global $ewd_ufaq_controller; 152 if ( ! $ewd_ufaq_controller->permissions->check_permission( 'submit-faq' ) ) { 153 return false; 154 } 155 156 // Check if this request has already been processed. If multiple forms 157 // exist on the same page, this prevents a single submission from 158 // being added twice. 159 if ( $this->faq_processed === true ) { 160 return true; 161 } 162 163 $this->faq_processed = true; 164 165 if ( empty( $this->ID ) ) { 166 $action = 'insert'; 167 } else { 168 $action = 'update'; 169 } 170 171 $this->validate_submission(); 172 if ( $this->is_valid_submission() === false ) { 173 return false; 174 } 175 176 if ( $this->insert_post_data() === false ) { 177 return false; 178 } else { 179 $this->faq_inserted = true; 180 } 181 182 do_action( 'ewd_ufaq_' . $action . '_faq', $this ); 183 184 return true; 150 public function insert_faq() { 151 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::insert_faq( $this ) : false; 185 152 } 186 153 … … 189 156 * @since 2.0.0 190 157 */ 191 public function validate_submission() { 192 global $ewd_ufaq_controller; 193 194 $this->validation_errors = array(); 195 196 // NONCE Validation 197 if ( ! isset( $_POST['ewd_ufaq_nonce'] ) || ! wp_verify_nonce( $_POST['ewd_ufaq_nonce'], 'ewd_ufaq_nonce_value' ) ) { 198 199 $this->validation_errors[] = array( 200 'field' => 'nonce', 201 'error_msg' => 'Invalid Nonce', 202 'message' => __( 'Please refresh the page and try submitting again.', 'ultimate-faqs' ), 203 ); 204 205 return false; // End early if nonce validation fails 206 } 207 208 // USER-SUBMITTED FLAG 209 if ( isset( $_POST['user_submitted'] ) and ! empty( $_POST['user_submitted'] ) ) { 210 211 $this->user_submitted = true; 212 } 213 214 // CAPTCHA 215 if ( $ewd_ufaq_controller->settings->get_setting( 'submit-question-captcha' ) ) { 216 217 $modified_code = intval( $_POST['ewd_ufaq_modified_captcha'] ); 218 $user_code = intval( $_POST['ewd_ufaq_captcha'] ); 219 220 if ( empty( $user_code ) ) { 221 222 $this->validation_errors[] = array( 223 'field' => 'captcha', 224 'error_msg' => 'Captcha incorrect', 225 'message' => $ewd_ufaq_controller->settings->get_setting( 'label-captcha-empty' ), 226 ); 227 } 228 elseif ( $user_code != $this->decrypt_modified_code( $modified_code ) ) { 229 230 $this->validation_errors[] = array( 231 'field' => 'captcha', 232 'error_msg' => 'Captcha incorrect', 233 'message' => $ewd_ufaq_controller->settings->get_setting( 'label-captcha-incorrect' ), 234 ); 235 } 236 } 237 238 // QUESTION 239 $this->question = empty( $_POST['faq_question'] ) ? false : sanitize_text_field( $_POST['faq_question'] ); 240 241 if ( ! $this->question ) { 242 243 $this->validation_errors[] = array( 244 'field' => 'faq_question', 245 'error_msg' => 'Question is blank', 246 'message' => $ewd_ufaq_controller->settings->get_setting( 'label-no-question-title-entered' ), 247 ); 248 } 249 250 // AUTHOR 251 $this->faq_author = empty( $_POST['post_author'] ) ? false : sanitize_text_field( $_POST['post_author'] ); 252 253 // AUTHOR EMAIL 254 $this->faq_author_email = empty( $_POST['post_author_email'] ) ? false : sanitize_email( $_POST['post_author_email'] ); 255 256 // ANSWER 257 if ( $ewd_ufaq_controller->settings->get_setting( 'allow-proposed-answer' ) ) { 258 259 $this->answer = empty( $_POST['faq_answer'] ) ? false : sanitize_textarea_field( $_POST['faq_answer'] ); 260 } 261 262 // CATEGORY 263 if ( $ewd_ufaq_controller->settings->get_setting( 'submitted-default-category' ) ) { 264 265 $args = array( 266 'taxonomy' => EWD_UFAQ_FAQ_CATEGORY_TAXONOMY, 267 'hide_empty' => false, 268 'slug' => $ewd_ufaq_controller->settings->get_setting( 'submitted-default-category' ) 269 ); 270 271 $this->categories = get_terms( $args ); 272 } 273 274 // CUSTOM FIELDS 275 $custom_fields = ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); 276 277 foreach ( $custom_fields as $custom_field ) { 278 279 if ( ! $custom_field->id ) { continue; } 280 281 $input_name = 'ewd_ufaq_custom_field_' . $custom_field->id; 282 283 if ( $custom_field->type == 'checkbox' ) { 284 285 $checkbox_values = ( empty( $_POST[ $input_name ] ) or ! is_array( $_POST[ $input_name ] ) ) ? array() : $_POST[ $input_name ]; 286 287 $this->custom_fields[ $custom_field->id ] = array_map( 'sanitize_text_field', $checkbox_values ); 288 } 289 else { $this->custom_fields[ $custom_field->id ] = empty( $_POST[ $input_name ] ) ? false : sanitize_text_field( $_POST[ $input_name ] ); } 290 } 291 292 $this->post_status = 'draft'; 293 294 do_action( 'ewd_ufaq_validate_faq_submission', $this ); 158 public function validate_submission() { 159 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::validate_submission( $this ) : false; 295 160 } 296 161 … … 299 164 * @since 2.0.0 300 165 */ 301 public function decrypt_modified_code( $user_code ) { 302 303 $decrypted_code = ($user_code / 3) - 5; 304 305 return $decrypted_code; 166 public function decrypt_modified_code( $user_code ) { 167 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::decrypt_modified_code( $this, $user_code ) : false; 306 168 } 307 169 … … 311 173 * @since 2.0.0 312 174 */ 313 public function is_valid_submission() { 314 315 if ( !count( $this->validation_errors ) ) { 316 return true; 317 } 318 319 return false; 175 public function is_valid_submission() { 176 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::is_valid_submission( $this ) : false; 320 177 } 321 178 … … 324 181 * @since 2.0.0 325 182 */ 326 public function insert_post_data() { 327 global $ewd_ufaq_controller; 328 if ( ! $ewd_ufaq_controller->permissions->check_permission( 'submit-faq' ) ) { 329 return false; 330 } 331 332 $args = array( 333 'post_type' => EWD_UFAQ_FAQ_POST_TYPE, 334 'post_title' => $this->question, 335 'post_content' => ! empty( $this->answer ) ? $this->answer : '', 336 'post_status' => $this->post_status, 337 ); 338 339 if ( ! empty( $this->ID ) ) { 340 $args['ID'] = $this->ID; 341 } 342 343 $args = apply_filters( 'ewd_ufaq_insert_faq_data', $args, $this ); 344 345 // When updating a FAQ, we need to update the metadata first, so that 346 // notifications hooked to the status changes go out with the new metadata. 347 // If we're inserting a new FAQ, we have to insert it before we can 348 // add metadata, and the default notifications don't fire until it's all done. 349 if ( ! empty( $this->ID ) ) { 350 351 $this->insert_post_meta(); 352 $this->insert_post_categories(); 353 $id = wp_insert_post( $args ); 354 } else { 355 356 $id = wp_insert_post( $args ); 357 if ( $id && ! is_wp_error( $id ) ) { 358 $this->ID = $id; 359 $this->insert_post_meta(); 360 $this->insert_post_categories(); 361 362 $this->clear_post_submission(); 363 } 364 } 365 366 return ! is_wp_error( $id ) && $id !== false; 183 public function insert_post_data() { 184 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::insert_post_data( $this ) : false; 367 185 } 368 186 … … 371 189 * @since 2.0.0 372 190 */ 373 public function insert_post_meta() { 374 global $ewd_ufaq_controller; 375 376 $meta = array(); 377 378 if ( ! empty( $this->faq_author ) ) { 379 380 update_post_meta( $this->ID, 'EWD_UFAQ_Post_Author', $this->faq_author ); 381 } 382 383 if ( ! empty( $this->faq_author_email ) ) { 384 385 update_post_meta( $this->ID, 'EWD_UFAQ_Post_Author_Email', $this->faq_author_email ); 386 } 387 388 $custom_fields = ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); 389 390 foreach ( $custom_fields as $custom_field ) { 391 392 if ( ! empty( $this->custom_fields[ $custom_field->id ] ) ) { 393 394 update_post_meta( $this->ID, 'Custom_Field_' . $custom_field->id, $this->custom_fields[ $custom_field->id ] ); 395 } 396 } 191 public function insert_post_meta() { 192 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::insert_post_meta( $this ) : false; 397 193 } 398 194 … … 401 197 * @since 2.0.0 402 198 */ 403 public function insert_post_categories() { 404 405 if ( empty( $this->categories ) or ! is_array( $this->categories ) ) { return; } 406 407 $submit_categories = array(); 408 foreach ( $this->categories as $category ) { $submit_categories[] = $category->term_id; } 409 410 wp_set_object_terms( $this->ID, $submit_categories, EWD_UFAQ_FAQ_CATEGORY_TAXONOMY ); 199 public function insert_post_categories() { 200 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::insert_post_categories( $this ) : false; 411 201 } 412 202 … … 415 205 * @since 2.0.0 416 206 */ 417 public function clear_post_submission() { 418 global $ewd_ufaq_controller; 419 420 unset( $_POST['faq_question'] ); 421 unset( $_POST['faq_answer'] ); 422 unset( $_POST['post_author'] ); 423 unset( $_POST['post_author_email'] ); 424 425 $custom_fields = ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); 426 427 foreach ( $custom_fields as $custom_field ) { 428 429 unset( $_POST[ 'ewd_ufaq_custom_field_' . $custom_field->id ] ); 430 } 207 public function clear_post_submission() { 208 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::clear_post_submission( $this ) : null; 431 209 } 432 210 -
ultimate-faqs/trunk/includes/HelperCompatibility.class.php
r3744649 r3821169 18 18 add_action( 'plugins_loaded', array( $this, 'refresh' ), 100 ); 19 19 add_action( 'admin_notices', array( $this, 'display_admin_notice' ) ); 20 add_action( 'admin_notices', array( $this, 'display_obsolete_package_notice' ) ); 20 21 21 22 $this->refresh(); 23 } 24 /** Detect known remnants only; never execute or automatically delete customer files. */ 25 public function display_obsolete_package_notice() { 26 if ( ! current_user_can( 'manage_options' ) || ! function_exists( 'get_current_screen' ) ) { return; } 27 $screen = get_current_screen(); 28 if ( ! $screen || ( 'plugins' !== $screen->id && EWD_UFAQ_FAQ_POST_TYPE !== $screen->post_type && false === strpos( $screen->id, 'ewd-ufaq' ) ) ) { return; } 29 foreach ( array( 'includes/WooCommerce.class.php', 'includes/WPForms.class.php', 'includes/OrderingTable.class.php', 'views/View.SubmitFAQ.class.php', 'lib/PHPSpreadsheet/vendor/autoload.php', 'lib/FPDF/fpdf.php', 'assets/js/ewd-ufaq-analytics.js', 'assets/js/ewd-ufaq-wc-admin.js', 'assets/css/ewd-ufaq-minimalist.css', 'assets/css/jquery-ui.min.css', 'ewd-ufaq-templates/faq-ratings.php', 'ewd-ufaq-templates/submit-faq.php' ) as $file ) { 30 if ( is_file( EWD_UFAQ_PLUGIN_DIR . '/' . $file ) ) { 31 echo '<div class="notice notice-warning"><p>' . esc_html__( 'Ultimate FAQs contains obsolete files from an earlier version. Back up the site, then replace the complete ultimate-faqs plugin directory with the approved release ZIP instead of merging files. Keep uploads and theme overrides. Ask your host to reset its PHP opcode cache if necessary. No files have been deleted automatically.', 'ultimate-faqs' ) . '</p></div>'; 32 return; 33 } 34 } 22 35 } 23 36 … … 86 99 return array( 'state' => 'active_legacy_no_descriptor' ); 87 100 } 101 foreach ( array( 'api_version', 'supported_free_api_min', 'supported_free_api_max', 'entitlement_contract_version' ) as $field ) { 102 if ( ! isset( $helper_descriptor[ $field ] ) || ! is_int( $helper_descriptor[ $field ] ) || $helper_descriptor[ $field ] < 1 ) { 103 return array( 'state' => 'unsupported_entitlement_contract' ); 104 } 105 } 106 if ( ! isset( $helper_descriptor['plugin_version'] ) || ! is_string( $helper_descriptor['plugin_version'] ) 107 || ! preg_match( '/^[0-9]+\.[0-9]+\.[0-9]+(?:[-+][A-Za-z0-9.-]+)?$/', $helper_descriptor['plugin_version'] ) 108 || $helper_descriptor['supported_free_api_min'] > $helper_descriptor['supported_free_api_max'] ) { 109 return array( 'state' => 'unsupported_entitlement_contract' ); 110 } 88 111 89 112 $helper_version = isset( $helper_descriptor['plugin_version'] ) ? $helper_descriptor['plugin_version'] : '0'; -
ultimate-faqs/trunk/includes/Notifications.class.php
r3744649 r3821169 13 13 public function __construct() { 14 14 15 add_action( 'ewd_ufaq_insert_faq', array( $this, 'admin_notification_email' ) ); 16 add_action( 'ewd_ufaq_insert_faq', array( $this, 'user_submission_email' ) ); 15 // Public compatibility facade; Helper owns paid mail hooks and implementation. 17 16 } 18 17 … … 22 21 * @since 2.0.0 23 22 */ 24 public function admin_notification_email( $faq ) { 25 global $ewd_ufaq_controller; 26 27 if ( ! $ewd_ufaq_controller->settings->get_setting( 'admin-question-notification' ) ) { return; } 28 29 $admin_emails = $ewd_ufaq_controller->settings->get_setting( 'admin-notification-email' ) ? explode( ',', $ewd_ufaq_controller->settings->get_setting( 'admin-notification-email' ) ) : (array) get_option( 'admin_email' ); 30 31 $faq_link = site_url() . '/wp-admin/post.php?post=' . $faq->ID . '&action=edit'; 32 33 $subject_line = __( 'New Question Received', 'ultimate-faqs' ); 34 35 $message_body = __( 'Hello Admin,', 'ultimate-faqs' ) . '<br/><br/>'; 36 $message_body .= __( 'You\'ve received a new question titled ', 'ultimate-faqs' ) . $faq->question . '.<br/><br/>'; 37 38 if ( ! empty( $faq->answer ) ) { 39 40 $message_body .= __( 'The answer reads:<br>', 'ultimate-faqs' ); 41 $message_body .= esc_html( $faq->answer ) . '<br><br><br>'; 42 } 43 44 $message_body .= __( 'You can view the question in the admin area by going to the following link:<br>', 'ultimate-faqs' ); 45 $message_body .= '<a href=\'' . $faq_link . '\'>' . __( 'See the FAQ', 'ultimate-faqs' ) . '</a><br/><br/>'; 46 $message_body .= __( 'Have a great day,', 'ultimate-faqs' ) . '<br/><br/>'; 47 $message_body .= __( 'Ultimate FAQs Team', 'ultimate-faqs' ); 48 49 $headers = array( 'Content-Type: text/html; charset=UTF-8' ); 50 51 $success = false; 52 foreach ( $admin_emails as $admin_email ) { 53 54 $success = wp_mail( $admin_email, $subject_line, $message_body, $headers ); 55 } 56 57 return $success; 23 public function admin_notification_email( $faq ) { 24 return class_exists( 'ewdufaqEWDPHSubmissionNotifications', false ) ? ewdufaqEWDPHSubmissionNotifications::admin_notification_email( $this, $faq ) : false; 58 25 } 59 26 … … 63 30 * @since 2.0.0 64 31 */ 65 public function user_submission_email( $faq ) { 66 global $ewd_ufaq_controller; 67 68 if ( ! $ewd_ufaq_controller->settings->get_setting( 'submit-faq-email' ) ) { return; } 69 70 $params = array( 71 'email_id' => $ewd_ufaq_controller->settings->get_setting( 'submit-faq-email' ), 72 'email_address' => $faq->faq_author_email, 73 'post_id' => $faq->ID 74 ); 75 76 if ( function_exists( 'ewd_uwpm_send_email' ) ) { 77 78 ewd_uwpm_send_email( $params ); 79 } 80 else { 81 82 $author_emails = $faq->faq_author_email ? explode( ',', $faq->faq_author_email ) : array(); 83 84 $subject_line = apply_filters( 'ewd_ufaq_user_question_submitted_subject_line', __( 'New Question', 'ultimate-faqs' ) ); 85 86 $message_body = __( 'Hello,', 'ultimate-faqs' ) . '<br/><br/>'; 87 $message_body .= sprintf( __( 'Thank you for submitting your FAQ, %s. ', 'ultimate-faqs' ), $faq->question ) . '<br/><br/>'; 88 $message_body .= get_bloginfo( 'name' ); 89 90 $message_body = apply_filters( 'ewd_ufaq_user_question_submitted_message_body', $message_body ); 91 92 $headers = array( 'Content-Type: text/html; charset=UTF-8' ); 93 94 $success = false; 95 foreach ( $author_emails as $author_email ) { 96 97 if ( ! filter_var( $author_email, FILTER_VALIDATE_EMAIL ) ) { continue;} 98 99 $success = wp_mail( $author_email, $subject_line, $message_body, $headers ); 100 } 101 102 return $success; 103 } 32 public function user_submission_email( $faq ) { 33 return class_exists( 'ewdufaqEWDPHSubmissionNotifications', false ) ? ewdufaqEWDPHSubmissionNotifications::user_submission_email( $this, $faq ) : false; 104 34 } 105 35 … … 109 39 * @since 2.4.0 110 40 */ 111 public function user_question_updated( $faq ) { 112 113 $author_emails = $faq->faq_author_email ? explode( ',', $faq->faq_author_email ) : array(); 114 115 $subject_line = apply_filters( 'ewd_ufaq_user_question_answered_subject_line', __( 'New Question Answer', 'ultimate-faqs' ) ); 116 117 $message_body = __( 'Hello,', 'ultimate-faqs' ) . '<br/><br/>'; 118 $message_body .= sprintf( __( 'Your FAQ, %s, has received a new question answer: ', 'ultimate-faqs' ), $faq->question ) . '<br/><br/>' . $faq->answer . '<br/><br/>'; 119 $message_body .= __( 'Thank You,', 'ultimate-faqs' ) . '<br/><br/>'; 120 121 $message_body = apply_filters( 'ewd_ufaq_user_question_answered_message_body', $message_body, $faq ); 122 123 $headers = array( 'Content-Type: text/html; charset=UTF-8' ); 124 125 $success = false; 126 foreach ( $author_emails as $author_email ) { 127 128 if ( ! filter_var( $author_email, FILTER_VALIDATE_EMAIL ) ) { continue;} 129 130 $success = wp_mail( $author_email, $subject_line, $message_body, $headers ); 131 } 132 133 return $success; 41 public function user_question_updated( $faq ) { 42 return class_exists( 'ewdufaqEWDPHSubmissionNotifications', false ) ? ewdufaqEWDPHSubmissionNotifications::user_question_updated( $this, $faq ) : false; 134 43 } 135 44 } -
ultimate-faqs/trunk/includes/Permissions.class.php
r3744649 r3821169 125 125 if ( 'faq-order-by' === $setting && 'set_order' === $value ) { 126 126 $capability = 'ordering'; } 127 if ( 'category-order-by' === $setting && 'manual' === $value ) { 128 $capability = 'ordering'; } 127 129 return '' !== $capability && ! $this->check_permission( $capability ) ? $fallback : $value; 128 130 } -
ultimate-faqs/trunk/includes/Query.class.php
r3744649 r3821169 56 56 // Max number of pages of faqs matching the query 57 57 public $max_page; 58 private $prepared = false; 58 59 59 60 /** … … 102 103 103 104 $args = $this->args; 104 if ( isset( $args['orderby'] ) && 'set_order' === $args['orderby']105 && ! $ewd_ufaq_controller->permissions->check_permission( 'ordering' ) ) {106 $args['orderby'] = 'title';107 }108 105 109 106 $args['include_children'] = ( ! empty( $args['include_children'] ) and strtolower( $args['include_children'] ) != 'yes' ) ? false : true; … … 115 112 if ( ! empty( $args['faq_page'] ) ) { $args['paged'] = $args['faq_page']; } 116 113 117 if ( ! empty( $args['post__in'] ) ) { $args['post__in'] = is_array( $args['post__in'] ) ? $args['post__in'] : json_decode( str_replace( array( '[', ']' ), array( '[', ']' ) ) ); } 114 if ( ! empty( $args['post__in'] ) && ! is_array( $args['post__in'] ) ) { 115 $decoded_ids = is_string( $args['post__in'] ) ? json_decode( str_replace( array( '[', ']' ), array( '[', ']' ), $args['post__in'] ), true ) : null; 116 $args['post__in'] = is_array( $decoded_ids ) ? array_values( array_filter( array_map( 'absint', array_filter( $decoded_ids, 'is_scalar' ) ) ) ) : array(); 117 } 118 118 119 119 $explicit_post_ids = ! empty( $args['post__in_string'] ) … … 225 225 if ( empty( $explicit_post_ids ) && ! empty( $args['orderby'] ) ) { 226 226 227 if ( $args['orderby'] == ' rating' or $args['orderby'] == 'popular' ) { $orderby['meta_value_num'] = $args['order']; }227 if ( $args['orderby'] == 'popular' ) { $orderby['meta_value_num'] = $args['order']; } 228 228 elseif ( $args['orderby'] == 'date' ) { $orderby['date'] = $args['order']; } 229 229 elseif ( $args['orderby'] == 'title' ) { $orderby['title'] = $args['order']; } 230 elseif ( $args['orderby'] == 'set_order' ) { $orderby['meta_value_num'] = $args['order']; } 231 } 232 233 if ( empty( $explicit_post_ids ) && $args['orderby'] == 'rating' ) { $args['meta_key'] = 'FAQ_Total_Score'; } 234 elseif ( empty( $explicit_post_ids ) && $args['orderby'] == 'popular' ) { $args['meta_key'] = 'ufaq_view_count'; } 235 elseif ( empty( $explicit_post_ids ) && 'set_order' === $args['orderby'] ) { 236 // Manual ordering must not filter out reusable FAQs which have no rank. 237 $manual_order_query = array( 238 'relation' => 'OR', 239 'ufaq_manual_order' => array( 240 'key' => 'ufaq_order', 241 'compare' => 'EXISTS', 242 'type' => 'NUMERIC', 243 ), 244 'ufaq_unordered' => array( 245 'key' => 'ufaq_order', 246 'compare' => 'NOT EXISTS', 247 ), 248 ); 249 $args['meta_query'] = empty( $args['meta_query'] ) 250 ? $manual_order_query 251 : array( 252 'relation' => 'AND', 253 $args['meta_query'], 254 $manual_order_query, 255 ); 256 unset( $args['meta_key'], $orderby['meta_value_num'] ); 257 $orderby['ufaq_manual_order'] = $args['order']; 258 $orderby['ID'] = $args['order']; 259 } 230 } 231 232 if ( empty( $explicit_post_ids ) && isset( $args['orderby'] ) && $args['orderby'] == 'popular' ) { $args['meta_key'] = 'ufaq_view_count'; } 260 233 261 234 if ( empty( $explicit_post_ids ) && ! empty( $orderby ) ) { $args['orderby'] = $orderby; } 262 235 236 $args = apply_filters( 'ewd_ufaq_query_args', $args, $this->context, $this ); 237 if ( isset( $args['orderby'] ) && in_array( $args['orderby'], array( 'set_order', 'rating' ), true ) ) { $args['orderby'] = array( 'title' => $args['order'] ); } 263 238 $this->args = $args; 239 $this->prepared = true; 264 240 265 241 return $this->args; … … 275 251 $args = array(); 276 252 277 if ( isset( $_REQUEST['faq_page'] ) ) {253 if ( isset( $_REQUEST['faq_page'] ) && is_scalar( $_REQUEST['faq_page'] ) ) { 278 254 279 255 $args['faq_page'] = intval( $_REQUEST['faq_page'] ); 280 256 } 281 257 282 if ( isset( $_REQUEST['search_string'] ) ) {283 284 $args['search_string'] = sanitize_text_field( stripslashes( $_REQUEST['search_string'] ) );285 } 286 287 if ( isset( $_REQUEST['post_count'] ) ) {258 if ( isset( $_REQUEST['search_string'] ) && is_scalar( $_REQUEST['search_string'] ) ) { 259 260 $args['search_string'] = sanitize_text_field( stripslashes( (string) $_REQUEST['search_string'] ) ); 261 } 262 263 if ( isset( $_REQUEST['post_count'] ) && is_scalar( $_REQUEST['post_count'] ) ) { 288 264 289 265 $args['post_count'] = sanitize_text_field( $_REQUEST['post_count'] ); 290 266 } 291 267 292 if ( isset( $_REQUEST['orderby'] ) ) {268 if ( isset( $_REQUEST['orderby'] ) && is_scalar( $_REQUEST['orderby'] ) ) { 293 269 294 270 $args['orderby'] = sanitize_text_field( $_REQUEST['orderby'] ); 295 271 } 296 272 297 if ( isset( $_REQUEST['order'] ) ) {273 if ( isset( $_REQUEST['order'] ) && is_scalar( $_REQUEST['order'] ) ) { 298 274 299 275 $args['order'] = sanitize_text_field( $_REQUEST['order'] ); 300 276 } 301 277 302 if ( isset( $_REQUEST['include_category'] ) ) {278 if ( isset( $_REQUEST['include_category'] ) && is_scalar( $_REQUEST['include_category'] ) ) { 303 279 304 280 $args['include_category'] = sanitize_text_field( $_REQUEST['include_category'] ); 305 281 } 306 282 307 if ( isset( $_REQUEST['exclude_category'] ) ) {283 if ( isset( $_REQUEST['exclude_category'] ) && is_scalar( $_REQUEST['exclude_category'] ) ) { 308 284 309 285 $args['exclude_category'] = sanitize_text_field( $_REQUEST['exclude_category'] ); … … 315 291 } 316 292 317 if ( isset( $_REQUEST['include_tag'] ) ) {293 if ( isset( $_REQUEST['include_tag'] ) && is_scalar( $_REQUEST['include_tag'] ) ) { 318 294 319 295 $args['include_tag'] = sanitize_text_field( $_REQUEST['include_tag'] ); … … 326 302 327 303 $this->args = array_merge( $this->args, $args ); 304 $this->prepared = false; 328 305 } 329 306 … … 337 314 $faqs = array(); 338 315 339 $args = apply_filters( 'ewd_ufaq_query_args', $this->args, $this->context );316 $args = $this->prepared ? $this->args : $this->prepare_args(); 340 317 341 318 $query = new WP_Query( $args ); -
ultimate-faqs/trunk/includes/Settings.class.php
r3744649 r3821169 96 96 $raw = ! empty( $this->settings ) ? $this->settings : get_option( 'ewd-ufaq-settings', array() ); 97 97 if ( 'faq-order-by' === $setting && isset( $raw[ $setting ] ) && 'set_order' === $raw[ $setting ] ) { 98 $required = 'ordering'; 99 } 100 if ( 'category-order-by' === $setting && isset( $raw[ $setting ] ) && 'manual' === $raw[ $setting ] ) { 98 101 $required = 'ordering'; 99 102 } -
ultimate-faqs/trunk/includes/template-functions.php
r3704732 r3821169 121 121 return ewdufaqBasicSearch::render( $args ); 122 122 } 123 124 $query = new ewdufaqQuery( $args ); 125 $query->parse_request_args(); 126 $query->prepare_args(); 127 128 // Render faqs 129 ewd_ufaq_load_view_files(); 130 131 $faqs = new ewdufaqViewFAQSearch( $args ); 132 133 $faqs->set_faqs( $query->get_faqs() ); 134 135 $ewd_ufaq_controller->shortcode_printing = true; 136 137 $output = $faqs->render(); 138 139 $ewd_ufaq_controller->shortcode_printing = false; 140 141 return $output; 123 return class_exists( 'ewdufaqEWDPHSearch', false ) ? ewdufaqEWDPHSearch::shortcode( $args ) : ewdufaqBasicSearch::render( $args ); 142 124 } 143 125 add_shortcode( 'ultimate-faq-search', 'ewd_ufaq_search_faqs_shortcode' ); … … 166 148 $args = shortcode_atts( $submit_faq_atts, $atts ); 167 149 168 // Handle FAQ submission 169 if ( isset( $_POST['submit_question'] ) ) { 170 171 $args['faq_submitted'] = true; 172 173 $faq = new ewdufaqFAQ(); 174 $success = $faq->insert_faq(); 175 176 if ( $success ) { 177 178 $args['update_message'] = ! empty( $args['success_message'] ) ? $args['success_message'] : $ewd_ufaq_controller->settings->get_setting( 'label-thank-you-submit' ); 179 } 180 else { 181 182 $args['update_message'] = ''; 183 184 foreach ( $faq->validation_errors as $validation_error ) { 185 186 $args['update_message'] .= '<br />' . $validation_error['message']; 187 } 188 } 189 } 190 191 // Render faq 192 ewd_ufaq_load_view_files(); 193 194 $submit_faq = new ewdufaqViewSubmitFAQ( $args ); 195 196 $ewd_ufaq_controller->shortcode_printing = true; 197 198 $output = $submit_faq->render(); 199 200 $ewd_ufaq_controller->shortcode_printing = false; 201 202 return $output; 150 return apply_filters( 'ewd_ufaq_submit_output', '', $args ); 203 151 } 204 152 add_shortcode( 'submit-question', 'ewd_ufaq_submit_faq_shortcode' ); … … 339 287 function ewd_ufaq_validate_captcha() { 340 288 341 $modifiedcode = intval( $_POST['ewd_ufaq_modified_captcha'] ); 342 $usercode = intval( $_POST['ewd_ufaq_captcha'] ); 343 344 $code = ewd_ufaq_decrypt_catpcha_code( $modifiedcode ); 345 346 $validate_captcha = $code == $usercode ? 'Yes' : 'No'; 347 348 return $validate_captcha; 289 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::validate_captcha() : 'No'; 349 290 } 350 291 } … … 353 294 function ewd_ufaq_encrypt_captcha_code( $code ) { 354 295 355 $modifiedcode = ($code + 5) * 3; 356 357 return $modifiedcode; 358 } 359 } 360 361 if ( ! function_exists( 'ewd_ufaq_encrypt_captcha_code' ) ) { 296 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::encrypt_captcha( $code ) : false; 297 } 298 } 299 300 if ( ! function_exists( 'ewd_ufaq_decrypt_catpcha_code' ) ) { 362 301 function ewd_ufaq_decrypt_catpcha_code( $modifiedcode ) { 363 302 364 $code = ($modifiedcode / 3) - 5; 365 366 return $code; 303 return class_exists( 'ewdufaqEWDPHSubmission', false ) ? ewdufaqEWDPHSubmission::decrypt_captcha( $modifiedcode ) : false; 367 304 } 368 305 } -
ultimate-faqs/trunk/readme.txt
r3744649 r3821169 4 4 Requires at least: 6.0 5 5 Tested up to: 7.1 6 Stable tag: 2. 6.06 Stable tag: 2.7.0 7 7 Requires PHP: 7.4 8 8 License: GPLv3 … … 240 240 == Changelog == 241 241 242 = 2.6.0 (2026-10-12) = 243 - Added the ability to assign FAQ categories when creating FAQs directly in the Display FAQs block. 244 - Added a separate "Move FAQ to Trash" action in the block editor, distinct from removing an FAQ from a page. 245 - Improved FAQ library management and selection for sites with larger numbers of FAQs. 246 - Improved validation, reliability, and error handling for FAQ import/export operations. 247 - Updated Premium license validation and entitlement handling, including improved license status, recovery, and compatibility checks. 248 - Improved preservation of existing FAQ content and settings when Premium access is unavailable. 249 250 = 2.5.0 (2026-09-20) = 251 - <strong>This is a major update with many changes, including some big changes. We suggest testing this update in a staging environment before updating your live environment. Or wait a few days before updating in the event that an issue is identified that requires a fix/new update.</strong> 252 - Added the ability to create and manage FAQs directly in the Display FAQs block. 253 - Added new local analytics functionality that can identify content gaps and use AI to suggest or automatically generate new FAQs to fill the gaps. You need to specify an AI provider in WP Settings > Connectors for this to work. 254 - Updated the search functionality available in the free version. 255 - Hardened public counters and AI Assist privacy, validation, and error handling. 256 - Updated the bundled PhpSpreadsheet runtime to the PHP 7.4-compatible 1.30.6 security release and hardened CSV/XLS/XLSX imports. 242 = 2.7.0 (2026-11-24) = 243 - **If you are using the premium version, please make sure to also update the EWD Premium Helper plugin to version 0.3.1 at the same time.** 244 - Several updates have been made to separate and streamline the functionality of the premium version via the EWD Premium Helper plugin. 245 - The FAQ order table has been revamped to allow for setting an order number and to allow ordering of categories. 246 - WooCommerce FAQ selection: Added paged search and category browsing for large libraries. 247 - TranslatePress compatibility: Prevent language prefixes from incorrectly changing the licensed site identity. 257 248 258 249 [See changelog for all versions](https://www.etoilewebdesign.com/changelogs/ultimate-faqs.txt). … … 260 251 == Upgrade Notice == 261 252 262 = 2. 6.0 =263 This update includes changes to the functionality that lets you create FAQs directly in the block, as well as to the interaction between this plugin and the Premium Helper. If you make use of this functionality in the block or your site uses the Premium Helper, we recommend testing the update on a staging site before updating your production site.253 = 2.7.0 = 254 Several updates have been made to separate and streamline the functionality of the premium version via the EWD Premium Helper plugin. If you are using the premium version, please make sure to also update the EWD Premium Helper plugin to version 0.3.1 at the same time. -
ultimate-faqs/trunk/ultimate-faqs.php
r3744649 r3821169 4 4 * Plugin URI: https://www.etoilewebdesign.com/plugins/ultimate-faq/ 5 5 * Description: Full-featured FAQ and accordion plugin with advanced search, simple UI and easy-to-use Gutenberg blocks and shortcodes. 6 * Version: 2. 6.06 * Version: 2.7.0 7 7 * Author: Etoile Web Design 8 8 * Author URI: https://www.etoilewebdesign.com/ … … 14 14 * Requires PHP: 7.4 15 15 * WC requires at least: 7.1 16 * WC tested up to: 11. 216 * WC tested up to: 11.3 17 17 */ 18 18 … … 67 67 define( 'EWD_UFAQ_PLUGIN_FNAME', plugin_basename( __FILE__ ) ); 68 68 define( 'EWD_UFAQ_TEMPLATE_DIR', 'ewd-ufaq-templates' ); 69 define( 'EWD_UFAQ_VERSION', '2. 6.0' );70 define( 'EWD_UFAQ_HELPER_API_VERSION', 2);71 define( 'EWD_UFAQ_MIN_HELPER_VERSION', '0. 2.0' );72 define( 'EWD_UFAQ_MAX_HELPER_API_VERSION', 2);69 define( 'EWD_UFAQ_VERSION', '2.7.0' ); 70 define( 'EWD_UFAQ_HELPER_API_VERSION', 3 ); 71 define( 'EWD_UFAQ_MIN_HELPER_VERSION', '0.3.0' ); 72 define( 'EWD_UFAQ_MAX_HELPER_API_VERSION', 3 ); 73 73 define( 'EWD_UFAQ_ENTITLEMENT_CONTRACT_VERSION', 1 ); 74 74 define( 'EWD_UFAQ_FAQ_POST_TYPE', 'ufaq' ); … … 102 102 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/InstallationWalkthrough.class.php' ); 103 103 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Notifications.class.php' ); 104 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/OrderingTable.class.php' );105 104 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Permissions.class.php' ); 106 105 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Query.class.php' ); 106 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/RetainedData.class.php' ); 107 107 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/ReviewAsk.class.php' ); 108 108 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Settings.class.php' ); … … 111 111 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Upgrades.class.php' ); 112 112 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Widgets.class.php' ); 113 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/WooCommerce.class.php' );114 require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/WPForms.class.php' );115 113 } 116 114 … … 133 131 $this->permissions = new ewdufaqPermissions(); 134 132 $this->settings = new ewdufaqSettings(); 133 ewdufaqRetainedData::instance(); 135 134 $this->helper_compatibility = new ewdufaqHelperCompatibility(); 136 135 // Register adapters regardless of initial entitlement; check at execution time. 137 $this->woocommerce = new ewdufaqWooCommerce();138 $this->wpforms = new ewdufaqWPForms();139 136 140 137 new ewdufaqAJAX(); … … 144 141 new ewdufaqEditorFAQWorkflow(); 145 142 if ( function_exists( 'register_block_pattern' ) ) { new ewdufaqPatterns(); } 146 new ewdufaqOrderingTable();147 143 new ewdufaqUltimateWPMail(); 148 144 new ewdufaqUpgrades(); … … 353 349 wp_enqueue_script( 'jquery-ui-sortable' ); 354 350 355 wp_register_script( 'ewd-ufaq-admin-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq-admin.js', array( 'jquery' , 'jquery-ui-sortable'), EWD_UFAQ_VERSION, true );351 wp_register_script( 'ewd-ufaq-admin-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq-admin.js', array( 'jquery' ), EWD_UFAQ_VERSION, true ); 356 352 357 353 $args = array( … … 371 367 public function register_assets() { 372 368 373 wp_register_style( 'ewd-ufaq-rrssb', EWD_UFAQ_PLUGIN_URL . '/assets/css/rrssb-min.css', array(), EWD_UFAQ_VERSION );374 wp_register_style( 'ewd-ufaq-jquery-ui', EWD_UFAQ_PLUGIN_URL . '/assets/css/jquery-ui.min.css', array(), EWD_UFAQ_VERSION );375 376 369 wp_register_style( 'ewd-ufaq-css', EWD_UFAQ_PLUGIN_URL . '/assets/css/ewd-ufaq.css', array(), EWD_UFAQ_VERSION ); 377 wp_register_style( 'ewd-ufaq-minimalist', EWD_UFAQ_PLUGIN_URL . '/assets/css/ewd-ufaq-minimalist.css', array(), EWD_UFAQ_VERSION );378 370 379 371 wp_register_script( 'ewd-ufaq-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq.js', array( 'jquery', 'jquery-ui-core' ), EWD_UFAQ_VERSION, true ); -
ultimate-faqs/trunk/views/Base.class.php
r2510277 r3821169 12 12 require_once( EWD_UFAQ_PLUGIN_DIR . '/views/View.FAQs.class.php' ); 13 13 require_once( EWD_UFAQ_PLUGIN_DIR . '/views/View.FAQSearch.class.php' ); 14 require_once( EWD_UFAQ_PLUGIN_DIR . '/views/View.SubmitFAQ.class.php' );15 14 16 15 class ewdufaqBase { -
ultimate-faqs/trunk/views/View.FAQ.class.php
r3704732 r3821169 218 218 * @since 2.0.0 219 219 */ 220 public function maybe_print_custom_fields() { 221 global $ewd_ufaq_controller; 222 223 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ) ) { return; } 224 225 $template = $this->find_template( 'faq-custom-fields' ); 226 227 if ( $template ) { 228 include( $template ); 229 } 220 public function maybe_print_custom_fields() { 221 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'maybe_print_custom_fields', $this ); 230 222 } 231 223 … … 269 261 * @since 2.0.0 270 262 */ 271 public function maybe_print_ratings() { 272 global $ewd_ufaq_controller; 273 274 if ( ! $ewd_ufaq_controller->settings->get_setting( 'faq-ratings' ) ) { return; } 275 276 $template = $this->find_template( 'faq-ratings' ); 277 278 if ( $template ) { 279 include( $template ); 280 } 263 public function maybe_print_ratings() { 264 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'maybe_print_ratings', $this ); 281 265 } 282 266 … … 289 273 * @since 2.0.0 290 274 */ 291 public function maybe_print_social_media() { 292 global $ewd_ufaq_controller; 293 294 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { return; } 295 296 if ( ! is_array( $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { return; } 297 298 if ( sizeof( $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) == 1 and in_array( '', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { return; } 299 300 $template = $this->find_template( 'faq-social-media' ); 301 302 if ( $template ) { 303 include( $template ); 304 } 275 public function maybe_print_social_media() { 276 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'maybe_print_social_media', $this ); 305 277 } 306 278 … … 361 333 * @since 2.0.0 362 334 */ 363 public function print_social_media_buttons() { 364 global $ewd_ufaq_controller; 365 366 if ( in_array( 'facebook', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { $this->print_facebook_button(); } 367 if ( in_array( 'twitter', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { $this->print_twitter_button(); } 368 if ( in_array( 'linkedin', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { $this->print_linkedin_button(); } 369 if ( in_array( 'pinterest', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { $this->print_pinterest_button(); } 370 if ( in_array( 'email', $ewd_ufaq_controller->settings->get_setting( 'social-media' ) ) ) { $this->print_email_button(); } 335 public function print_social_media_buttons() { 336 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_social_media_buttons', $this ); 371 337 } 372 338 … … 376 342 * @since 2.0.0 377 343 */ 378 public function print_facebook_button() { 379 380 $template = $this->find_template( 'faq-social-media-facebook' ); 381 382 if ( $template ) { 383 include( $template ); 384 } 344 public function print_facebook_button() { 345 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_facebook_button', $this ); 385 346 } 386 347 … … 390 351 * @since 2.0.0 391 352 */ 392 public function print_twitter_button() { 393 394 $template = $this->find_template( 'faq-social-media-twitter' ); 395 396 if ( $template ) { 397 include( $template ); 398 } 353 public function print_twitter_button() { 354 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_twitter_button', $this ); 399 355 } 400 356 … … 404 360 * @since 2.0.0 405 361 */ 406 public function print_linkedin_button() { 407 408 $template = $this->find_template( 'faq-social-media-linkedin' ); 409 410 if ( $template ) { 411 include( $template ); 412 } 362 public function print_linkedin_button() { 363 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_linkedin_button', $this ); 413 364 } 414 365 … … 418 369 * @since 2.0.0 419 370 */ 420 public function print_pinterest_button() { 421 422 $template = $this->find_template( 'faq-social-media-pinterest' ); 423 424 if ( $template ) { 425 include( $template ); 426 } 371 public function print_pinterest_button() { 372 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_pinterest_button', $this ); 427 373 } 428 374 … … 432 378 * @since 2.0.0 433 379 */ 434 public function print_email_button() { 435 436 $template = $this->find_template( 'faq-social-media-email' ); 437 438 if ( $template ) { 439 include( $template ); 440 } 380 public function print_email_button() { 381 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'print_email_button', $this ); 441 382 } 442 383 … … 459 400 global $ewd_ufaq_controller; 460 401 461 return is_array( $ewd_ufaq_controller->settings->get_setting( 'faq-elements-order' ) ) ? $ewd_ufaq_controller->settings->get_setting( 'faq-elements-order' ) : json_decode( $ewd_ufaq_controller->settings->get_setting( 'faq-elements-order' ) ); 402 $elements = array( 'categories' => 'Categories', 'body' => 'Body', 'author_date' => 'Author/Date', 'tags' => 'Tags', 'permalink' => 'Permalink', 'comments' => 'Comments', 'back_to_top' => 'Back to Top' ); 403 return apply_filters( 'ewd_ufaq_faq_elements_order', $elements, $this ); 462 404 } 463 405 … … 467 409 * @since 2.0.0 468 410 */ 469 public function get_color_block_shape() { 470 global $ewd_ufaq_controller; 471 472 return 'ewd-ufaq-' . $ewd_ufaq_controller->settings->get_setting( 'color-block-shape' ); 473 } 411 public function get_color_block_shape() { 412 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_color_block_shape( $this ) : ''; 413 } 474 414 475 415 /** … … 500 440 * @since 2.0.0 501 441 */ 502 public function get_custom_fields() { 503 global $ewd_ufaq_controller; 504 505 return ewd_ufaq_decode_infinite_table_setting( $ewd_ufaq_controller->settings->get_setting( 'faq-fields' ) ); 506 } 442 public function get_custom_fields() { 443 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_custom_fields( $this ) : array(); 444 } 507 445 508 446 /** … … 511 449 * @since 2.0.0 512 450 */ 513 public function get_custom_field_value( $custom_field ) { 514 515 $value = get_post_meta( $this->faq->post->ID, 'Custom_Field_' . $custom_field->id, true ); 516 517 if ( $custom_field->type == 'file' ) { 518 519 return ! empty( $value ) ? '<a href="' . esc_attr( $value ) . '">' . strrpos( $value, '/' ) ? esc_html( substr( $value, strrpos( $value, '/' ) + 1 ) ) : esc_html( $value ) . '</a>' : ''; 520 } 521 elseif ( $custom_field->type == 'link' ) { 522 523 return ! empty( $value ) ? '<a href="' . esc_attr( $value ) . '" target="_blank">' . esc_attr( $value ) . '</a>' : ''; 524 } 525 else { return $value; } 451 public function get_custom_field_value( $custom_field ) { 452 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_custom_field_value( $this, $custom_field ) : ''; 526 453 } 527 454 … … 534 461 global $ewd_ufaq_controller; 535 462 536 return $ewd_ufaq_controller->settings->get_setting( 'label-categories' ) ? $ewd_ufaq_controller->settings->get_setting( 'label-categories' ) : ( sizeOf( $this->faq->categories ) == 1 ? __( 'Category:', 'ultimate-faqs' ) : __( 'Categories:', 'ultimate-faqs' ));463 return apply_filters( 'ewd_ufaq_custom_label', count( $this->faq->categories ) === 1 ? __( 'Category:', 'ultimate-faqs' ) : __( 'Categories:', 'ultimate-faqs' ), 'label-categories', $this ); 537 464 } 538 465 … … 558 485 global $ewd_ufaq_controller; 559 486 560 return $ewd_ufaq_controller->settings->get_setting( 'label-tags' ) ? $ewd_ufaq_controller->settings->get_setting( 'label-tags' ) : ( sizeOf( $this->faq->tags ) == 1 ? __( 'Tag:', 'ultimate-faqs' ) : __( 'Tags:', 'ultimate-faqs' ));487 return apply_filters( 'ewd_ufaq_custom_label', count( $this->faq->tags ) === 1 ? __( 'Tag:', 'ultimate-faqs' ) : __( 'Tags:', 'ultimate-faqs' ), 'label-tags', $this ); 561 488 } 562 489 … … 579 506 * @since 2.0.0 580 507 */ 581 public function get_thumbs_up_image() { 582 global $ewd_ufaq_controller; 583 584 $img_url = ( $ewd_ufaq_controller->settings->get_setting( 'thumbs-up-image' ) and $ewd_ufaq_controller->settings->get_setting( 'thumbs-up-image' ) != 'http://' ) ? $ewd_ufaq_controller->settings->get_setting( 'thumbs-up-image' ) : EWD_UFAQ_PLUGIN_URL . '/assets/img/Thumbs-up-icon.png'; 585 586 return '<img src="' . esc_url( $img_url ) . '" alt="' . __( "Thumbs Up Icon", "ultimate-faqs" ) . '">'; 587 } 508 public function get_thumbs_up_image() { 509 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_thumbs_up_image( $this ) : ''; 510 } 588 511 589 512 /** … … 592 515 * @since 2.0.0 593 516 */ 594 public function get_up_votes() { 595 596 return get_post_meta( $this->faq->post->ID, "FAQ_Up_Votes", true ) ? get_post_meta( $this->faq->post->ID, "FAQ_Up_Votes", true ) : 0; 597 } 517 public function get_up_votes() { 518 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_up_votes( $this ) : 0; 519 } 598 520 599 521 /** … … 602 524 * @since 2.0.0 603 525 */ 604 public function get_thumbs_down_image() { 605 global $ewd_ufaq_controller; 606 607 $img_url = ( $ewd_ufaq_controller->settings->get_setting( 'thumbs-down-image' ) and $ewd_ufaq_controller->settings->get_setting( 'thumbs-down-image' ) != 'http://' ) ? $ewd_ufaq_controller->settings->get_setting( 'thumbs-down-image' ) : EWD_UFAQ_PLUGIN_URL . '/assets/img/Thumbs-down-icon.png'; 608 609 return '<img src="' . esc_url( $img_url ) . '" alt="' . __( "Thumbs Down Icon", "ultimate-faqs" ) . '">'; 610 } 526 public function get_thumbs_down_image() { 527 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_thumbs_down_image( $this ) : ''; 528 } 611 529 612 530 /** … … 615 533 * @since 2.0.0 616 534 */ 617 public function get_down_votes() { 618 619 return get_post_meta( $this->faq->post->ID, "FAQ_Down_Votes", true ) ? get_post_meta( $this->faq->post->ID, "FAQ_Down_Votes", true ) : 0; 620 } 535 public function get_down_votes() { 536 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_down_votes( $this ) : 0; 537 } 621 538 622 539 /** … … 625 542 * @since 2.0.0 626 543 */ 627 public function get_social_twitter_link() { 628 629 $text = __( 'Check out this helpful FAQ', 'ultimate-faqs' ) . ': '; 630 631 return 'https://twitter.com/intent/tweet?text=' . urlencode( $text ) . urlencode( $this->faq->post->post_title ) . urlencode( ' | ' ) . urlencode( $this->permalink ); 632 } 544 public function get_social_twitter_link() { 545 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_social_twitter_link( $this ) : ''; 546 } 633 547 634 548 /** … … 637 551 * @since 2.0.0 638 552 */ 639 public function get_social_linkedin_link() { 640 641 $text = __( 'Check out this helpful FAQ', 'ultimate-faqs' ); 642 643 return 'http://www.linkedin.com/shareArticle?mini=true&url=' . $this->permalink . "&title=" . urlencode( $text ) . "&summary=" . urlencode( $this->faq->post->post_title ); 644 } 553 public function get_social_linkedin_link() { 554 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_social_linkedin_link( $this ) : ''; 555 } 645 556 646 557 /** … … 649 560 * @since 2.0.0 650 561 */ 651 public function get_social_pinterest_link() { 652 653 $text = __( 'Check out this helpful FAQ', 'ultimate-faqs' ) . ': '; 654 655 return 'http://pinterest.com/pin/create/button/?url=' . $this->permalink . "&description=" . urlencode( $text ) . urlencode( $this->faq->post->post_title ); 656 } 562 public function get_social_pinterest_link() { 563 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_social_pinterest_link( $this ) : ''; 564 } 657 565 658 566 /** … … 661 569 * @since 2.0.0 662 570 */ 663 public function get_social_email_mailto_link() { 664 665 $subject = __( 'Check out this helpful FAQ', 'ultimate-faqs' ); 666 667 return 'mailto:?subject=' . urlencode( $subject ) . "&body=" . urlencode( $this->faq->post->post_title ) . urlencode( ' | ' ) . urlencode( $this->permalink ); 668 } 571 public function get_social_email_mailto_link() { 572 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_social_email_mailto_link( $this ) : ''; 573 } 669 574 670 575 /** … … 679 584 array( 680 585 'ewd-ufaq-faq-div', 681 'ewd-ufaq-faq-column-count- ' . $ewd_ufaq_controller->settings->get_setting( 'number-of-columns' ),682 'ewd-ufaq-faq-responsive-columns-' . $ewd_ufaq_controller->settings->get_setting( 'responsive-columns' ),683 'ewd-ufaq-faq-display-style- ' . $ewd_ufaq_controller->settings->get_setting( 'display-style' ),586 'ewd-ufaq-faq-column-count-one', 587 'ewd-ufaq-faq-responsive-columns-', 588 'ewd-ufaq-faq-display-style-default', 684 589 ) 685 590 ); … … 729 634 $this->date = get_the_date( '', $this->faq->post->ID ); 730 635 731 if ( ! empty( $this->search_string ) and $ewd_ufaq_controller->settings->get_setting( 'highlight-search-term' ) ) { 732 733 $this->faq_title = $this->highlight_across_tags( $this->faq_title, $this->search_string ); 734 $this->faq_answer = $this->highlight_across_tags( $this->faq_answer, $this->search_string ); 735 } 636 do_action( 'ewd_ufaq_faq_display_variables', $this ); 736 637 737 638 remove_filter( 'siteorigin_panels_filter_content_enabled', array( $this, 'disable_site_origin_page_builder' ) ); … … 746 647 * @since 2.0.0 747 648 */ 748 public function highlight_across_tags( $html, $term, $class = 'ewd-ufaq-highlight-search-term' ) { 749 750 $term = trim( $term ); 751 if ( $term === '' ) { return $html; } 752 753 $pattern = '/' . preg_quote( $term, '/' ) . '/iu'; 754 755 // Parse HTML 756 $dom = new DOMDocument( '1.0', 'UTF-8' ); 757 libxml_use_internal_errors( true ); 758 $dom->loadHTML( '<?xml encoding="utf-8" ?>' . $html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD ); 759 libxml_clear_errors(); 760 761 $xpath = new DOMXPath( $dom ); 762 763 // Collect all text nodes in document order and build a flat text map 764 $nodes = array(); 765 $full = ''; 766 $offset = 0; 767 768 // Include empty text nodes too (a match might begin/end at their edges) 769 foreach ( $xpath->query( '//text()' ) as $t ) { 770 $text = isset( $t->nodeValue ) ? $t->nodeValue : ''; 771 $len = mb_strlen( $text, 'UTF-8' ); 772 $nodes[] = array( 'node' => $t, 'start' => $offset, 'end' => $offset + $len ); 773 $full .= $text; 774 $offset += $len; 775 } 776 777 if ( $full === '' || empty( $nodes ) ) { 778 // Nothing to do 779 $result = $dom->saveHTML(); 780 return preg_replace( '/^<\?xml.*?\?>/u', '', $result ) ? preg_replace( '/^<\?xml.*?\?>/u', '', $result ) : $html; 781 } 782 783 // Find matches in the flattened text 784 if ( ! preg_match_all( $pattern, $full, $m, PREG_OFFSET_CAPTURE ) ) { 785 $result = $dom->saveHTML(); 786 return preg_replace( '/^<\?xml.*?\?>/u', '', $result ) ? preg_replace( '/^<\?xml.*?\?>/u', '', $result ) : $html; 787 } 788 789 // Build match list (convert byte offsets to Unicode codepoint offsets) 790 $matches = array(); 791 foreach ( $m[0] as $mm ) { 792 $match_text = $mm[0]; 793 $start_byte = $mm[1]; 794 795 $pre = mb_substr( $full, 0, $start_byte, 'UTF-8' ); 796 $start = mb_strlen( $pre, 'UTF-8' ); 797 $length = mb_strlen( $match_text, 'UTF-8' ); 798 799 $matches[] = array( 'start' => $start, 'length' => $length ); 800 } 801 802 if ( empty( $matches ) ) { 803 $result = $dom->saveHTML(); 804 return preg_replace( '/^<\?xml.*?\?>/u', '', $result ) ? preg_replace( '/^<\?xml.*?\?>/u', '', $result ) : $html; 805 } 806 807 // Process matches from right to left so earlier offsets aren't invalidated 808 usort( 809 $matches, 810 function( $a, $b ) { 811 if ( $a['start'] === $b['start'] ) { return 0; } 812 return ( $a['start'] < $b['start'] ) ? 1 : -1; 813 } 814 ); 815 816 foreach ( $matches as $match ) { 817 $m_start = $match['start']; 818 $m_end = $match['start'] + $match['length']; 819 820 // Walk text nodes and wrap overlapping slices 821 foreach ( $nodes as $entry ) { 822 823 /** @var DOMText $text_node */ 824 $text_node = $entry['node']; 825 $n_start = $entry['start']; 826 $n_end = $entry['end']; 827 828 // No overlap? 829 if ( $m_end <= $n_start || $m_start >= $n_end ) { continue; } 830 831 // Local offsets in this node 832 $local_start = max( 0, $m_start - $n_start ); 833 $local_end = min( $n_end, $m_end ) - $n_start; 834 835 // Split into [before][target][after] 836 // Note: DOMText::splitText uses UTF-16 offsets internally but PHP maps by characters. 837 // Using mb_* derived offsets aligns with DOM for BMP; for safety we keep to mb_strlen logic. 838 if ( $local_end < mb_strlen( $text_node->data, 'UTF-8' ) ) { 839 $after_node = $text_node->splitText( $local_end ); 840 } else { 841 $after_node = null; 842 } 843 844 $target_node = $text_node; 845 if ( $local_start > 0 ) { 846 $target_node = $text_node->splitText( $local_start ); 847 } 848 849 // Wrap the target slice 850 $span = $dom->createElement( 'span' ); 851 $span->setAttribute( 'class', $class ); 852 $target_node->parentNode->replaceChild( $span, $target_node ); 853 $span->appendChild( $target_node ); 854 } 855 } 856 857 // Return HTML without the XML declaration we prepended 858 $result = $dom->saveHTML(); 859 $result = preg_replace( '/^<\?xml.*?\?>/u', '', $result ); 860 861 return $result ? $result : $html; 649 public function highlight_across_tags( $html, $term, $class = 'ewd-ufaq-highlight-search-term' ) { 650 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::highlight_across_tags( $this, $html, $term, $class ) : $html; 862 651 } 863 652 … … 1082 871 */ 1083 872 public function enqueue_assets() { 1084 1085 wp_enqueue_style( 'ewd-ufaq-rrssb' ); 1086 wp_enqueue_style( 'ewd-ufaq-jquery-ui' ); 873 global $ewd_ufaq_controller; 874 if ( ! $ewd_ufaq_controller->get_front_end_php_data( 'ewd-ufaq-js', 'ewd_ufaq_php_data' ) ) { 875 $args = array( 'nonce' => wp_create_nonce( 'ewd-ufaq-js' ), 'faq_accordion' => $ewd_ufaq_controller->settings->get_setting( 'faq-accordion' ), 'category_accordion' => $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ), 'faq_scroll' => $ewd_ufaq_controller->settings->get_setting( 'scroll-to-top' ) ); 876 $ewd_ufaq_controller->add_front_end_php_data( 'ewd-ufaq-js', 'ewd_ufaq_php_data', apply_filters( 'ewd_ufaq_js_localize_data', $args, $this ) ); 877 } 878 1087 879 wp_enqueue_style( 'ewd-ufaq-css' ); 1088 880 1089 wp_enqueue_style( 'ewd-ufaq-rrssb' );1090 wp_enqueue_style( 'ewd-ufaq-jquery-ui' );1091 1092 881 wp_enqueue_script( 'ewd-ufaq-js' ); 1093 882 do_action( 'ewd_ufaq_view_assets', $this ); 883 884 } 885 public function get_body_classes() { 886 $classes = array( 'ewd-ufaq-faq-body' ); 887 if ( ! $this->display_all_answers ) { $classes[] = 'ewd-ufaq-hidden'; } 888 return apply_filters( 'ewd_ufaq_faq_body_classes', $classes, $this ); 1094 889 } 1095 890 } -
ultimate-faqs/trunk/views/View.FAQSearch.class.php
r3704732 r3821169 26 26 */ 27 27 public function render() { 28 global $ewd_ufaq_controller; 29 30 // Add any dependent stylesheets or javascript 31 $this->enqueue_assets(); 32 33 if ( empty( $this->show_on_load ) ) { 34 $this->faqs = array(); 35 } 36 else { 37 $this->add_schema_data(); 38 } 39 40 $this->set_faqs_options(); 41 42 $this->create_faq_data(); 43 44 // Add css classes to the slider 45 $this->classes = $this->get_classes(); 46 47 ob_start(); 48 49 $this->add_custom_styling(); 50 51 $template = $this->find_template( 'faqs-search' ); 52 if ( $template ) { 53 include( $template ); 54 } 55 56 $template = $this->find_template( 'faqs' ); 57 if ( $template ) { 58 include( $template ); 59 } 60 61 $output = ob_get_clean(); 62 63 if ( $ewd_ufaq_controller->settings->get_setting( 'display-style' ) == 'list' ){ 64 65 $output = $this->replace_list_header( $output ); 66 } 67 68 return apply_filters( 'ewd_ufaq_search_faqs_output', $output, $this ); 28 return class_exists( 'ewdufaqEWDPHSearch', false ) ? ewdufaqEWDPHSearch::render( $this ) : ewdufaqBasicSearch::render( get_object_vars( $this ) ); 69 29 } 70 30 … … 88 48 */ 89 49 public function maybe_print_search_submit() { 90 global $ewd_ufaq_controller; 91 92 if ( $ewd_ufaq_controller->settings->get_setting( 'auto-complete-titles' ) ) { return; } 93 94 $template = $this->find_template( 'faqs-search-submit' ); 95 if ( $template ) { 96 include( $template ); 97 } 50 if ( class_exists( 'ewdufaqEWDPHSearch', false ) ) { ewdufaqEWDPHSearch::maybe_print_search_submit( $this ); } 98 51 } 99 52 … … 109 62 array( 110 63 'ewd-ufaq-faq-list', 111 'ewd-ufaq-page-type- ' . $ewd_ufaq_controller->settings->get_setting( 'page-type' ),112 'ewd-ufaq-category-tabs-' . $ewd_ufaq_controller->settings->get_setting( 'category-tabs' ),64 'ewd-ufaq-page-type-distinct', 65 'ewd-ufaq-category-tabs-', 113 66 'ewd-ufaq-search' 114 67 ) 115 68 ); 116 69 117 if ( $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ) or $ewd_ufaq_controller->settings->get_setting( 'category-tabs' )) {70 if ( $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ) ) { 118 71 $classes[] = 'ewd-ufaq-faq-category-title-accordion'; 119 72 } -
ultimate-faqs/trunk/views/View.FAQs.class.php
r3704732 r3821169 134 134 $output = ob_get_clean(); 135 135 136 if ( $ewd_ufaq_controller->settings->get_setting( 'display-style' ) == 'list' ){ 137 138 $output = $this->replace_list_header( $output ); 139 } 136 $output = apply_filters( 'ewd_ufaq_rendered_list_output', $output, $this ); 140 137 141 138 return apply_filters( 'ewd_ufaq_faqs_output', $output, $this ); … … 180 177 * @since 2.0.0 181 178 */ 182 public function maybe_print_header() { 183 global $ewd_ufaq_controller; 184 185 if ( $ewd_ufaq_controller->settings->get_setting( 'display-style' ) != 'list' ) { return; } 186 187 echo '%list_header_placeholder%'; 179 public function maybe_print_header() { 180 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'maybe_print_header', $this ); 188 181 } 189 182 … … 218 211 $args[ 'orderby' ] = $this->category_orderby; 219 212 } 220 elseif ( ! empty( $this->category_orderby ) ) { 221 222 $args[ 'meta_key' ] = 'ufaq_category_order'; 223 $args[ 'orderby' ] = 'meta_value_num'; 224 225 } 213 $args = apply_filters( 'ewd_ufaq_category_query_args', $args, $this ); 226 214 227 215 $categories = get_terms( $args ); … … 418 406 * @since 2.0.0 419 407 */ 420 public function maybe_print_pagination() { 421 422 if ( $this->max_page <= 1 ) { return; } 423 424 $template = $this->find_template( 'faqs-pagination' ); 425 426 if ( $template ) { 427 include( $template ); 428 } 408 public function maybe_print_pagination() { 409 echo apply_filters( 'ewd_ufaq_render_paid_element', '', 'maybe_print_pagination', $this ); 429 410 } 430 411 … … 434 415 * @since 2.0.0 435 416 */ 436 public function replace_list_header( $output ) { 437 438 if ( $this->group_by_category ) { $template = $this->find_template( 'faqs-category-list-header' ); } 439 else { $template = $this->find_template( 'faqs-list-header' ); } 440 441 ob_start(); 442 443 if ( $template ) { 444 include( $template ); 445 } 446 447 $list_header = ob_get_clean(); 448 449 return str_replace( '%list_header_placeholder%', $list_header, $output ); 417 public function replace_list_header( $output ) { 418 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::replace_list_header( $this, $output ) : $output; 450 419 } 451 420 … … 503 472 array( 504 473 'ewd-ufaq-faq-list', 505 'ewd-ufaq-page-type- ' . $ewd_ufaq_controller->settings->get_setting( 'page-type' ),506 'ewd-ufaq-category-tabs-' . $ewd_ufaq_controller->settings->get_setting( 'category-tabs' )474 'ewd-ufaq-page-type-distinct', 475 'ewd-ufaq-category-tabs-' 507 476 ) 508 477 ); … … 564 533 $this->max_page = ceil( $this->faq_count / $this->faqs_per_page ); 565 534 566 if ( ! $this->group_by_category and $ewd_ufaq_controller->settings->get_setting( 'display-style' ) != 'list') { return; }535 if ( ! apply_filters( 'ewd_ufaq_needs_category_data', (bool) $this->group_by_category, $this ) ) { return; } 567 536 568 537 $args = array( … … 576 545 $args[ 'orderby' ] = $this->category_orderby; 577 546 } 578 elseif ( ! empty( $this->category_orderby ) ) { 579 580 $args[ 'meta_key' ] = 'ufaq_category_order'; 581 $args[ 'orderby' ] = 'meta_value_num'; 582 583 } 547 $args = apply_filters( 'ewd_ufaq_category_query_args', $args, $this ); 584 548 585 549 $categories = get_terms( $args ); … … 717 681 global $ewd_ufaq_controller; 718 682 719 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-symbol' )) ) { return false; }683 if ( ! $this->get_category_toggle_symbol() ) { return false; } 720 684 721 685 if ( empty( $ewd_ufaq_controller->settings->get_setting( 'faq-category-toggle' ) ) ) { return false; } … … 732 696 global $ewd_ufaq_controller; 733 697 734 return 'ewd-ufaq-' . $ewd_ufaq_controller->settings->get_setting( 'color-block-shape' );698 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_color_block_shape( $this ) : ''; 735 699 } 736 700 … … 740 704 * @since 2.4.3 741 705 */ 742 public function get_category_toggle_symbol() { 743 global $ewd_ufaq_controller; 744 745 return strtolower( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-symbol' ) ); 746 } 706 public function get_category_toggle_symbol() { 707 return class_exists( 'ewdufaqEWDPHPresentation', false ) ? ewdufaqEWDPHPresentation::get_category_toggle_symbol( $this ) : ''; 708 } 747 709 748 710 /** … … 790 752 */ 791 753 public function enqueue_assets() { 792 global $ewd_ufaq_controller, $wp_scripts; 793 794 wp_enqueue_style( 'ewd-ufaq-rrssb' ); 795 wp_enqueue_style( 'ewd-ufaq-jquery-ui' ); 754 global $ewd_ufaq_controller; 796 755 wp_enqueue_style( 'ewd-ufaq-css' ); 797 if ( $ewd_ufaq_controller->settings->get_setting( 'display-style' ) == 'minimalist' ) { 798 wp_enqueue_style( 'ewd-ufaq-minimalist' ); 799 } 800 801 wp_enqueue_style( 'ewd-ufaq-rrssb' ); 802 wp_enqueue_style( 'ewd-ufaq-jquery-ui' ); 803 804 $handle = 'ewd-ufaq-js'; 756 wp_enqueue_script( 'ewd-ufaq-js' ); 805 757 $args = array( 806 'faq_accordion' => isset( $this->faq_accordion ) ? $this->faq_accordion : $ewd_ufaq_controller->settings->get_setting( 'faq-accordion' ), 807 'category_accordion' => isset( $this->category_accordion ) ? $this->category_accordion : $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ), 808 'faq_scroll' => $ewd_ufaq_controller->settings->get_setting( 'scroll-to-top' ), 809 'reveal_effect' => $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ), 810 'retrieving_results' => $ewd_ufaq_controller->settings->get_setting( 'label-retrieving-results' ), 811 'highlight_search_term' => $ewd_ufaq_controller->settings->get_setting( 'highlight-search-term' ), 812 'save_search_terms' => $ewd_ufaq_controller->settings->get_setting( 'save-search-terms' ), 813 'autocomplete_question' => $ewd_ufaq_controller->settings->get_setting( 'auto-complete-titles' ), 814 'question_titles' => $this->get_faq_titles(), 815 'display_faq' => 0, 816 'nonce' => wp_create_nonce( $handle ), 758 'faq_accordion' => isset( $this->faq_accordion ) ? $this->faq_accordion : $ewd_ufaq_controller->settings->get_setting( 'faq-accordion' ), 759 'category_accordion' => isset( $this->category_accordion ) ? $this->category_accordion : $ewd_ufaq_controller->settings->get_setting( 'faq-category-accordion' ), 760 'faq_scroll' => $ewd_ufaq_controller->settings->get_setting( 'scroll-to-top' ), 761 'display_faq' => 0, 762 'nonce' => wp_create_nonce( 'ewd-ufaq-js' ), 817 763 ); 818 819 if ( ! empty( get_query_var( 'single_faq' ) ) ) { 820 764 if ( get_query_var( 'single_faq' ) ) { 821 765 $faq = get_page_by_path( get_query_var( 'single_faq' ), OBJECT, EWD_UFAQ_FAQ_POST_TYPE ); 822 $args['display_faq'] = $faq->ID; 823 } 824 elseif ( isset( $_GET['Display_FAQ'] ) ) { 825 $args['display_faq'] = intval( $_GET['Display_FAQ'] ); 826 } 827 828 // Fetch any existing script data 829 $prev_question_titles = $ewd_ufaq_controller->get_front_end_php_data( $handle, 'question_titles' ); 830 831 if ( ! empty( $prev_question_titles ) ) { 832 $args['question_titles'] = array_merge( $prev_question_titles, $args['question_titles'] ); 833 $args['question_titles'] = array_unique( $args['question_titles'] ); 834 } 835 836 $ewd_ufaq_controller->add_front_end_php_data( $handle, 'question_titles', $args['question_titles'] ); 837 838 wp_enqueue_script( $handle ); 839 840 $ewd_ufaq_controller->add_front_end_php_data( $handle, 'ewd_ufaq_php_data', apply_filters( 'ewd_ufaq_js_localize_data', $args ) ); 841 842 wp_enqueue_script( 'jquery-ui-core' ); 843 844 if ( $ewd_ufaq_controller->settings->get_setting( 'auto-complete-titles' ) ) { 845 846 wp_enqueue_script( 'jquery-ui-autocomplete' ); 847 } 848 849 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) != 'none' ) { 850 851 wp_enqueue_script( 'jquery-effects-core' ); 852 wp_enqueue_script( 'jquery-ui-autocomplete' ); 853 854 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'blind' ) { wp_enqueue_script( 'jquery-effects-blind' ); } 855 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'bounce' ) { wp_enqueue_script( 'jquery-effects-bounce' ); } 856 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'clip' ) { wp_enqueue_script( 'jquery-effects-clip' ); } 857 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'drop' ) { wp_enqueue_script( 'jquery-effects-drop' ); } 858 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'explode' ) { wp_enqueue_script( 'jquery-effects-explode' ); } 859 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'fade' ) { wp_enqueue_script( 'jquery-effects-fade' ); } 860 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'fold' ) { wp_enqueue_script( 'jquery-effects-fold' ); } 861 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'highlight' ) { wp_enqueue_script( 'jquery-effects-highlight' ); } 862 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'pulsate' ) { wp_enqueue_script( 'jquery-effects-pulsate' ); } 863 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'shake' ) { wp_enqueue_script( 'jquery-effects-shake' ); } 864 if ( $ewd_ufaq_controller->settings->get_setting( 'reveal-effect' ) == 'slide' ) { wp_enqueue_script( 'jquery-effects-slide' ); } 865 } 866 766 $args['display_faq'] = $faq instanceof WP_Post ? $faq->ID : 0; 767 } elseif ( isset( $_GET['Display_FAQ'] ) && is_scalar( $_GET['Display_FAQ'] ) ) { 768 $args['display_faq'] = absint( $_GET['Display_FAQ'] ); 769 } 770 $ewd_ufaq_controller->add_front_end_php_data( 'ewd-ufaq-js', 'ewd_ufaq_php_data', apply_filters( 'ewd_ufaq_js_localize_data', $args, $this ) ); 771 do_action( 'ewd_ufaq_view_assets', $this ); 867 772 } 868 773 } -
ultimate-faqs/trunk/views/View.class.php
r3744649 r3821169 71 71 */ 72 72 function find_template( $template ) { 73 global $ewd_ufaq_controller; 74 $paid = array( 75 'faq-custom-fields' => 'fields', 76 'faq-ratings' => 'premium', 77 'faq-social-media' => 'premium', 78 'faq-social-media-email' => 'premium', 79 'faq-social-media-facebook' => 'premium', 80 'faq-social-media-linkedin' => 'premium', 81 'faq-social-media-pinterest' => 'premium', 82 'faq-social-media-twitter' => 'premium', 83 'faqs-pagination' => 'premium', 84 'faqs-list-header' => 'premium', 85 'faqs-category-list-header' => 'premium', 86 'faqs-search' => 'search', 87 'faqs-search-submit' => 'search', 88 'submit-faq' => 'submit-faq', 89 'submit-faq-captcha' => 'submit-faq', 90 'submit-faq-custom-field-checkbox' => 'submit-faq', 91 'submit-faq-custom-field-date' => 'submit-faq', 92 'submit-faq-custom-field-datetime' => 'submit-faq', 93 'submit-faq-custom-field-radio' => 'submit-faq', 94 'submit-faq-custom-field-select' => 'submit-faq', 95 'submit-faq-custom-field-text' => 'submit-faq', 96 'submit-faq-custom-field-textarea' => 'submit-faq', 97 'submit-faq-field-author-email' => 'submit-faq', 98 'submit-faq-field-author' => 'submit-faq', 99 'submit-faq-field-faq-answer' => 'submit-faq', 100 'submit-faq-field-faq-question' => 'submit-faq', 101 'submit-faq-submitted-faq-message' => 'submit-faq', 102 ); 103 if ( ! is_string( $template ) || ( 0 === strpos( $template, 'submit-faq' ) && ! isset( $paid[ $template ] ) ) ) { return false; } 104 $capability = isset( $paid[ $template ] ) ? $paid[ $template ] : ''; 105 if ( $capability && ( ! isset( $ewd_ufaq_controller->permissions ) || ! $ewd_ufaq_controller->permissions->check_permission( $capability ) ) ) { 106 return false; 107 } 73 108 74 109 $this->template_dirs = array( … … 78 113 ); 79 114 80 $this->template_dirs = apply_filters( 'ewd_ufaq_template_directories', $this->template_dirs );115 $this->template_dirs = apply_filters( 'ewd_ufaq_template_directories', $this->template_dirs, $template, $this ); 81 116 82 117 foreach ( $this->template_dirs as $dir ) { 118 // Never execute an obsolete paid default left by a merge-style update. 119 // Child/parent and explicitly supplied integration directories still work. 120 if ( $capability && rtrim( wp_normalize_path( $dir ), '/' ) === wp_normalize_path( EWD_UFAQ_PLUGIN_DIR . '/' . EWD_UFAQ_TEMPLATE_DIR ) ) { continue; } 83 121 if ( file_exists( $dir . $template . '.php' ) ) { 84 122 return $dir . $template . '.php'; … … 86 124 } 87 125 126 if ( $capability ) { do_action( 'ewd_ufaq_missing_paid_template', $template ); } 88 127 return false; 89 128 } … … 110 149 if ( empty( $this->label_defaults ) ) { $this->set_label_defaults(); } 111 150 112 return ! empty( $ewd_ufaq_controller->settings->get_setting( $label_name ) ) ? $ewd_ufaq_controller->settings->get_setting( $label_name ) : $this->label_defaults[ $label_name ]; 151 $default = isset( $this->label_defaults[ $label_name ] ) ? $this->label_defaults[ $label_name ] : ''; 152 return apply_filters( 'ewd_ufaq_custom_label', $default, $label_name, $this ); 113 153 } 114 154 … … 150 190 151 191 public function add_custom_styling() { 152 global $ewd_ufaq_controller; 153 154 $heading_type = $ewd_ufaq_controller->settings->get_setting( 'styling-faq-heading-type' ); 155 $category_heading_type = $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-type' ); 156 157 $css = ''; 158 159 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-background-color' ) != '' ) { $css .= '.ewd-ufaq-post-margin-symbol { background-color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-background-color' ) . ' !important; }'; } 160 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-font-color' ) != '' ) { $css .= '.ewd-ufaq-post-margin-symbol { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-font-color' ) . ' !important; }'; } 161 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-size' ) != '' ) { $css .= '.ewd-ufaq-post-margin-symbol { border-width: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-size' ) . ' !important; }'; } 162 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-color' ) != '' ) { $css .= '.ewd-ufaq-post-margin-symbol { border-color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-color' ) . ' !important; }'; } 163 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-radius' ) != '' ) { $css .= '.ewd-ufaq-post-margin-symbol { border-radius: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-border-radius' ) . ' !important; }'; } 164 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-symbol-size' ) != '' ) { $css .= '.ewd-ufaq-faq-title .ewd-ufaq-post-margin-symbol span { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-toggle-symbol-size' ) . ' !important; }'; } 165 166 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-background-color' ) != '' ) { $css .= '.ewd-ufaq-category-post-margin-symbol { background-color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-background-color' ) . ' !important; }'; } 167 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-font-color' ) != '' ) { $css .= '.ewd-ufaq-category-post-margin-symbol { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-font-color' ) . ' !important; }'; } 168 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-size' ) != '' ) { $css .= '.ewd-ufaq-category-post-margin-symbol { border-width: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-size' ) . ' !important; }'; } 169 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-color' ) != '' ) { $css .= '.ewd-ufaq-category-post-margin-symbol { border-color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-color' ) . ' !important; }'; } 170 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-radius' ) != '' ) { $css .= '.ewd-ufaq-category-post-margin-symbol { border-radius: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-border-radius' ) . ' !important; }'; } 171 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-symbol-size' ) != '' ) { $css .= '.ewd-ufaq-faq-category-title .ewd-ufaq-category-post-margin-symbol span { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-toggle-symbol-size' ) . ' !important; }'; } 172 173 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-block-background-color' ) != '' ) { 174 175 $css .= ".ewd-ufaq-faq-display-style-block.ewd-ufaq-post-active, .ewd-ufaq-faq-display-style-block.ewd-ufaq-post-active a,.ewd-ufaq-faq-display-style-block:hover, .ewd-ufaq-faq-display-style-block:hover a, .ewd-ufaq-faq-display-style-block:hover $heading_type { background-color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-block-background-color' ) . ' !important; }'; 176 $css .= ".ewd-ufaq-faq-display-style-border_block.ewd-ufaq-post-active, .ewd-ufaq-faq-display-style-border_block:hover, .ewd-ufaq-faq-display-style-border_block:hover $heading_type { background-color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-block-background-color' ) . ' !important; }'; 177 $css .= ".ewd-ufaq-faq-display-style-border_block .ewd-ufaq-faq-body { border-color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-block-background-color' ) . ' !important; }'; 178 $css .= ".ewd-ufaq-faq-display-style-border_block .comment-reply-title, .ewd-ufaq-faq-display-style-border_block:hover .comment-reply-title { background-color: transparent !important; }"; 179 } 180 181 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-block-font-color' ) != '' ) { 182 183 $css .= ".ewd-ufaq-faq-display-style-block:hover .ewd-ufaq-post-margin-symbol, .ewd-ufaq-category-post-margin-symbol, .ewd-ufaq-faq-display-style-block:hover $heading_type { color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-block-font-color' ) . ' !important; }'; 184 $css .= ".ewd-ufaq-faq-display-style-border_block:hover .ewd-ufaq-post-margin-symbol, .ewd-ufaq-category-post-margin-symbol, .ewd-ufaq-faq-display-style-border_block:hover $heading_type { color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-block-font-color' ) . ' !important; }'; 185 } 186 187 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-list-font' ) != '' ) { $css .= '.ewd-ufaq-faq-header-title a { font-family: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-list-font' ) . ' !important; }'; } 188 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-list-font-size' ) != '' ) { $css .= '.ewd-ufaq-faq-header-title a { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-list-font-size' ) . ' !important; }'; } 189 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-list-font-color' ) != '' ) { $css .= '.ewd-ufaq-faq-header-title a { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-list-font-color' ) . ' !important; }'; } 190 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-list-margin' ) != '' ) { $css .= '.ewd-ufaq-faq-header-title a { margin: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-list-margin' ) . ' !important; }'; } 191 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-list-padding' ) != '' ) { $css .= '.ewd-ufaq-faq-header-title a { padding: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-list-padding' ) . ' !important; }'; } 192 193 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-font' ) != '' ) { $css .= "div.ewd-ufaq-faq-title $heading_type { font-family: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-font' ) . ' !important; }'; } 194 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-font-size' ) != '' ) { $css .= "div.ewd-ufaq-faq-title $heading_type { font-size: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-font-size' ) . ' !important; }'; } 195 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-font-color' ) != '' ) { $css .= "div.ewd-ufaq-faq-title $heading_type { color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-font-color' ) . ' !important; }'; } 196 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-margin' ) != '' ) { $css .= "div.ewd-ufaq-faq-title $heading_type { margin: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-margin' ) . ' !important; }'; } 197 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-padding' ) != '' ) { $css .= "div.ewd-ufaq-faq-title $heading_type { padding: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-padding' ) . ' !important; }'; } 198 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-question-icon-top-margin' ) != '' ) { $css .= ".ewd-ufaq-post-margin-symbol { margin-top: " . $ewd_ufaq_controller->settings->get_setting( 'styling-question-icon-top-margin' ) . ' !important; }'; } 199 200 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font' ) != '' ) { $css .= 'div.ewd-ufaq-faq-post p { font-family: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font' ) . ' !important; }'; } 201 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font-size' ) != '' ) { $css .= 'div.ewd-ufaq-faq-post p { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font-size' ) . ' !important; }'; } 202 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font-color' ) != '' ) { $css .= 'div.ewd-ufaq-faq-post p { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-answer-font-color' ) . ' !important; }'; } 203 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-answer-margin' ) != '' ) { $css .= 'div.ewd-ufaq-faq-post p { margin: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-answer-margin' ) . ' !important; }'; } 204 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-answer-padding' ) != '' ) { $css .= 'div.ewd-ufaq-faq-post p { padding: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-answer-padding' ) . ' !important; }'; } 205 206 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font' ) != '' ) { $css .= 'div.ewd-ufaq-author-date { font-family: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font' ) . ' !important; }'; } 207 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font-size' ) != '' ) { $css .= 'div.ewd-ufaq-author-date { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font-size' ) . ' !important; }'; } 208 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font-color' ) != '' ) { $css .= 'div.ewd-ufaq-author-date { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-font-color' ) . ' !important; }'; } 209 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-margin' ) != '' ) { $css .= 'div.ewd-ufaq-author-date { margin: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-margin' ) . ' !important; }'; } 210 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-padding' ) != '' ) { $css .= 'div.ewd-ufaq-author-date { padding: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-postdate-padding' ) . ' !important; }'; } 211 212 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font' ) != '' ) { $css .= "div.ewd-ufaq-faq-category-title $category_heading_type { font-family: " . $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font' ) . ' !important; }'; } 213 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font-size' ) != '' ) { $css .= "div.ewd-ufaq-faq-category-title $category_heading_type { font-size: " . $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font-size' ) . ' !important; }'; } 214 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font-color' ) != '' ) { $css .= "div.ewd-ufaq-faq-category-title $category_heading_type { color: " . $ewd_ufaq_controller->settings->get_setting( 'styling-category-heading-font-color' ) . ' !important; }'; } 215 216 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-font' ) != '' ) { $css .= 'div.ewd-ufaq-faq-categories, div.ewd-ufaq-faq-tags { font-family: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-font' ) . ' !important; }'; } 217 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-font-size' ) != '' ) { $css .= 'div.ewd-ufaq-faq-categories, div.ewd-ufaq-faq-tags { font-size: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-font-size' ) . ' !important; }'; } 218 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-font-color' ) != '' ) { $css .= 'div.ewd-ufaq-faq-categories, div.ewd-ufaq-faq-tags { color: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-font-color' ) . ' !important; }'; } 219 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-margin' ) != '' ) { $css .= 'div.ewd-ufaq-faq-categories, div.ewd-ufaq-faq-tags { margin: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-margin' ) . ' !important; }'; } 220 if ( $ewd_ufaq_controller->settings->get_setting( 'styling-category-padding' ) != '' ) { $css .= 'div.ewd-ufaq-faq-categories, div.ewd-ufaq-faq-tags { padding: ' . $ewd_ufaq_controller->settings->get_setting( 'styling-category-padding' ) . ' !important; }'; } 221 222 $css .= $ewd_ufaq_controller->settings->get_setting( 'custom-css' ); 223 224 if( ! empty( $css ) ) { 225 echo '<style>'; 226 echo $css; 227 echo '</style>'; 192 // The Basic settings Custom CSS box is a Free feature, distinct from paid 193 // per-element styling controls. Keep it effective without Helper or rights. 194 $css = $this->get_option( 'custom-css' ); 195 $css = apply_filters( 'ewd_ufaq_custom_styles', is_string( $css ) ? $css : '', $this ); 196 if ( is_string( $css ) && '' !== $css ) { 197 echo '<style>' . str_ireplace( '</style', '', $css ) . '</style>'; 228 198 } 229 199 }
Note:
See TracChangeset
for help on using the changeset viewer.