Changeset 3415748
- Timestamp:
- 12/09/2025 07:34:20 PM (4 days ago)
- Location:
- verification-widget-authifyweb
- Files:
-
- 10 added
- 7 edited
-
assets/banner-1544x500.png (modified) (previous)
-
assets/banner-772x250.png (modified) (previous)
-
assets/screenshot-3.png (added)
-
tags/1.0.3 (added)
-
tags/1.0.3/languages (added)
-
tags/1.0.3/languages/verification-widget-authifyweb.pot (added)
-
tags/1.0.3/readme.txt (added)
-
tags/1.0.3/verification-widget-authifyweb.css (added)
-
tags/1.0.3/verification-widget-authifyweb.js (added)
-
tags/1.0.3/verification-widget-authifyweb.php (added)
-
tags/1.0.3/verification-widget-authifyweb_iframe.js (added)
-
trunk/languages/verification-widget-authifyweb.pot (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/verification-widget-authifyweb.css (modified) (1 diff)
-
trunk/verification-widget-authifyweb.js (modified) (1 diff)
-
trunk/verification-widget-authifyweb.php (modified) (8 diffs)
-
trunk/verification-widget-authifyweb_iframe.js (added)
Legend:
- Unmodified
- Added
- Removed
-
verification-widget-authifyweb/trunk/languages/verification-widget-authifyweb.pot
r3300872 r3415748 3 3 msgstr "" 4 4 "Project-Id-Version: \n" 5 "POT-Creation-Date: 2025- 05-26 10:39+0530\n"5 "POT-Creation-Date: 2025-12-09 18:35+0530\n" 6 6 "PO-Revision-Date: 2025-01-30 14:38+0530\n" 7 7 "Last-Translator: \n" … … 11 11 "Content-Type: text/plain; charset=UTF-8\n" 12 12 "Content-Transfer-Encoding: 8bit\n" 13 "X-Generator: Poedit 3. 5\n"13 "X-Generator: Poedit 3.7\n" 14 14 "X-Poedit-Basepath: ..\n" 15 15 "X-Poedit-KeywordsList: __;_e;esc_html__;esc_html_e\n" 16 16 "X-Poedit-SearchPath-0: .\n" 17 17 18 #: 1.0.2/verification-widget-authifyweb.php:2319 #: 1.0.2/verification-widget-authifyweb.php:2420 #: 1.0.2/verification-widget-authifyweb.php:5221 18 #: verification-widget-authifyweb.php:23 verification-widget-authifyweb.php:24 22 19 #: verification-widget-authifyweb.php:52 … … 24 21 msgstr "" 25 22 26 #: 1.0.2/verification-widget-authifyweb.php:3527 23 #: verification-widget-authifyweb.php:35 28 24 msgid "Settings" 29 25 msgstr "" 30 26 31 #: 1.0.2/verification-widget-authifyweb.php:5332 27 #: verification-widget-authifyweb.php:53 33 28 msgid "Current Website Information" 34 29 msgstr "" 35 30 36 #: 1.0.2/verification-widget-authifyweb.php:5437 31 #: verification-widget-authifyweb.php:54 38 32 msgid "Current Website URL:" 39 33 msgstr "" 40 34 41 #: 1.0.2/verification-widget-authifyweb.php:5542 35 #: verification-widget-authifyweb.php:55 43 36 msgid "SSL Status:" 44 37 msgstr "" 45 38 46 #: 1.0.2/verification-widget-authifyweb.php:65 47 #: verification-widget-authifyweb.php:65 39 #: verification-widget-authifyweb.php:57 40 msgid "SSL enabled" 41 msgstr "" 42 43 #: verification-widget-authifyweb.php:58 44 msgid "HTTPS required for proper working" 45 msgstr "" 46 47 #: verification-widget-authifyweb.php:69 48 48 msgid "authifyWeb Profile Link" 49 49 msgstr "" 50 50 51 #: 1.0.2/verification-widget-authifyweb.php:71 52 #: verification-widget-authifyweb.php:71 51 #: verification-widget-authifyweb.php:74 53 52 msgid "Add this link to website head to verify your website?" 54 53 msgstr "" 55 54 56 #: 1.0.2/verification-widget-authifyweb.php:74 57 #: verification-widget-authifyweb.php:74 55 #: verification-widget-authifyweb.php:77 58 56 msgid "Keep this enabled to insert <link> tag to the website's <head> to verify this website. You can skip this, if you'd like to manually insert into the <head> section of your website, with another 3rd party plugin. Adding a <link> is essential inorder to verify your site, whether done here, or manually." 59 57 msgstr "" 60 58 61 #: 1.0.2/verification-widget-authifyweb.php:8562 59 #: verification-widget-authifyweb.php:85 60 msgid "How should the widget open for your visitors?" 61 msgstr "" 62 63 #: verification-widget-authifyweb.php:89 64 msgid "Opens verification page in a new browser tab." 65 msgstr "" 66 67 #: verification-widget-authifyweb.php:92 68 msgid "When someone clicks the verification badge, they’re taken to a new browser tab to view your verified profile. This keeps your site open in the background." 69 msgstr "" 70 71 #: verification-widget-authifyweb.php:97 72 msgid "(New). Show the verification page on the same page" 73 msgstr "" 74 75 #: verification-widget-authifyweb.php:100 76 msgid "The verification badge opens a popup on the same page. Your visitors stay on your site, and can close the popup when done, and continue browsing your site." 77 msgstr "" 78 79 #: verification-widget-authifyweb.php:119 80 msgid "To ensure full compliance with modern privacy practices and transparency, we <strong>highly recommend</strong> adding the following text to your Privacy Policy. This version includes the required link to our policies" 81 msgstr "" 82 83 #: verification-widget-authifyweb.php:125 84 msgid "Privacy Policy Suggestion" 85 msgstr "" 86 87 #: verification-widget-authifyweb.php:131 88 msgid "authifyWeb Policy" 89 msgstr "" 90 91 #: verification-widget-authifyweb.php:150 92 msgid "Manually copy the above text into your Privacy Policy." 93 msgstr "" 94 95 #: verification-widget-authifyweb.php:164 63 96 msgid "Default Verification URL" 64 97 msgstr "" 65 98 66 #: 1.0.2/verification-widget-authifyweb.php:87 67 #: verification-widget-authifyweb.php:87 99 #: verification-widget-authifyweb.php:166 68 100 msgid "Use the below shortcode to display verification widget" 69 101 msgstr "" 70 102 71 #: 1.0.2/verification-widget-authifyweb.php:116 72 #: verification-widget-authifyweb.php:116 103 #: verification-widget-authifyweb.php:206 73 104 msgid "Please configure the authifyWeb link in the plugin settings." 74 105 msgstr "" 75 106 76 #: 1.0.2/verification-widget-authifyweb.php:123 77 #: verification-widget-authifyweb.php:122 107 #: verification-widget-authifyweb.php:212 78 108 msgid "Powered by authifyWeb" 79 109 msgstr "" -
verification-widget-authifyweb/trunk/readme.txt
r3300872 r3415748 2 2 Contributors: webVerts 3 3 Tags: authifyWeb, website verification, authifyBrand, authifyFame 4 Tested up to: 6. 84 Tested up to: 6.9 5 5 Requires at least: 5.8 6 Stable tag: 1.0. 26 Stable tag: 1.0.3 7 7 License: GPLv3 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html … … 22 22 - **Free to use**: This plugin is completely free to use. Though, you should need an active [authifyWeb](https://authifyweb.com/pages/pricing) account. 23 23 - **Widget Placement**: Best advised to use it on footer or on sidebar. 24 - **Add authifyWeb microdata into <head>section**.24 - **Add authifyWeb microdata into head section**. 25 25 - **Create Account**: A valid authifyWeb account is necessary inorder for this free widget to work properly. Claim your account [here](https://authifyweb.com/pages/pricing/) now. 26 26 … … 65 65 1. authifyWeb Widget placed on a footer. 66 66 2. authifyWeb Settings Page 67 3. authifyWeb Widget - Active layer 67 68 68 69 69 70 == Changelog == 71 = 1.0.3 = 72 * Updated for WP 6.9 73 * Advanced Setting Control 74 75 76 70 77 = 1.0.2 = 71 78 * Minor Backend Changes (JS) -
verification-widget-authifyweb/trunk/verification-widget-authifyweb.css
r3236492 r3415748 1 /* --- Styles for Admin Setting --- */ 2 3 .vwfaw-authifyweb-local-notice .vwfaw-copy-box { 4 5 border: 2px solid #ccd0d4 !important; 6 background: #ede3e3 !important; 7 padding: 15px !important; 8 margin-top: 10px !important; 9 border-radius: 4px; 10 11 overflow-x: auto; 12 } 13 14 15 .vwfaw-authifyweb-local-notice .vwfaw-copy-box p { 16 font-size: 16px !important; 17 line-height: 1.6 !important; 18 margin: 0 !important; 19 font-family: Consolas, monospace, sans-serif !important; 20 color: #1a1a1a !important; 21 } 22 23 .vwfaw-authifyweb-local-notice .vwfaw-copy-box strong{ 24 font-size:18px; 25 font-family:monospace; 26 27 } -
verification-widget-authifyweb/trunk/verification-widget-authifyweb.js
r3300872 r3415748 4 4 document.addEventListener('DOMContentLoaded', function () { 5 5 const authifyweb_widgetContainers = document.querySelectorAll('.authifyweb-widget-container'); 6 7 const poweredWidgets = document.querySelectorAll('.authifyweb-powered-widget'); 8 poweredWidgets.forEach(poweredWidget => { 9 10 const existingParagraph = poweredWidget.querySelector('.authifyweb-powered-link'); 11 const existingLink = existingParagraph && existingParagraph.querySelector('a'); 12 13 if (!existingParagraph) { 14 // Create the <p> and <a> from scratch, incase it is removed from frontend. 15 const poweredParagraph = document.createElement('p'); 16 poweredParagraph.className = 'authifyweb-powered-link'; 17 18 const poweredLink = document.createElement('a'); 19 poweredLink.href = 'https://authifyweb.com'; 20 poweredLink.setAttribute('aria-label', 'Visit authifyWeb'); 21 poweredLink.target = '_blank'; 22 poweredLink.rel = 'noopener nofollow noreferrer'; 23 poweredLink.textContent = 'Powered by authifyWeb'; 24 poweredParagraph.appendChild(poweredLink); 25 26 const widgetContainer = poweredWidget.querySelector('.authifyweb-widget-container'); 27 if (widgetContainer) { 28 widgetContainer.insertAdjacentElement('afterend', poweredParagraph); 29 } else { 30 poweredWidget.appendChild(poweredParagraph); 31 } 32 } else if (!existingLink) { 33 // Only add <a>, if <p> exists 34 const poweredLink = document.createElement('a'); 35 poweredLink.href = 'https://authifyweb.com'; 36 poweredLink.setAttribute('aria-label', 'Visit authifyWeb'); 37 poweredLink.target = '_blank'; 38 poweredLink.rel = 'noopener nofollow noreferrer'; 39 poweredLink.textContent = 'Powered by authifyWeb'; 40 existingParagraph.innerHTML = ''; 41 existingParagraph.appendChild(poweredLink); 42 } 43 }); 44 6 45 7 authifyweb_widgetContainers.forEach(authifyweb_container => { 8 // Prevent duplicate widgets 9 if (authifyweb_container.querySelector('.authifyweb-widget')) return; 46 47 if (!document.getElementById('authifyweb-widget-styles')) { 48 const authifyweb_style = document.createElement('style'); 49 authifyweb_style.id = 'authifyweb-widget-styles'; 50 authifyweb_style.innerHTML = ` 51 .authifyweb-widget-container { 52 display: flex; 53 max-width: 150px; 54 max-height: 50px; 55 background-color: black; 56 border-radius: 10px; 57 border: 3px solid #767676; 58 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 59 cursor: pointer; 60 } 61 .authifyweb-widget svg { 62 width: 150px; 63 height: 48px; 64 } 65 .authifyweb-widget a { 66 margin-top: 3px; 67 display: flex; 68 } 69 .authifyweb-powered-link a { 70 //pointer-events: none; 71 text-decoration: none; 72 color: inherit; 73 font: inherit; 74 } 75 .authifyweb-powered-link { 76 margin: 5px 0px 20px 5px; 77 font-family: 'Montserrat','Poppins', 'Rubik', 'Nunito Sans', sans-serif; 78 font-size: 12px; 79 } 80 .authifyweb-powered-widget { 81 font: inherit; 82 line-height: inherit; 83 } 10 84 11 const authifyweb_widgetContainer = document.createElement('div'); 12 authifyweb_widgetContainer.classList.add('authifyweb-widget'); 85 `; 86 document.head.appendChild(authifyweb_style); 87 } 88 89 90 91 authifyweb_widgetContainers.forEach(authifyweb_container => { 13 92 14 const authifyweb_svg = ` 15 <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 545 153"><defs><path id="a" d="M94.312 9.277h296.851v52.567H94.312z"/></defs><text xml:space="preserve" fill="#767676" stroke="#000" font-family="Montserrat" font-size="45.924" letter-spacing="0" style="line-height:125%;-inkscape-font-specification:Montserrat;white-space:pre;shape-inside:url(#a)" transform="translate(-21.462 7.69) scale(.84996)" word-spacing="0"><tspan x="94.313" y="49.647"><tspan stroke="#767676">verify with</tspan></tspan></text><text xml:space="preserve" x="53.789" y="108.717" fill="#767676" stroke="#767676" stroke-width="2.138" font-family="Montserrat" font-size="57.004" letter-spacing="0" style="line-height:125%;-inkscape-font-specification:Montserrat" word-spacing="0"><tspan x="53.789" y="108.717" font-weight="300" style="-inkscape-font-specification:"Montserrat Light""><tspan fill="#ede3e3" stroke="#ede3e3" style="-inkscape-font-specification:"Montserrat Light"">authify</tspan><tspan fill="#a2fb15" stroke="#a2fb15" style="-inkscape-font-specification:"Montserrat Light"">Web</tspan></tspan></text><g stroke="#767676"><path fill="#767676" stroke-width=".023" d="M456.855 106.854a4.195 4.195 0 0 0 0-5.787 4.175 4.175 0 0 0-3.057-1.32 4.173 4.173 0 0 0-3.067 1.326 4.201 4.201 0 0 0 0 5.781 4.18 4.18 0 0 0 3.067 1.32 4.163 4.163 0 0 0 3.06-1.32zm-6.734-2.628h1.445c.02.607.098 1.174.24 1.682a4.782 4.782 0 0 0-.837.419 3.667 3.667 0 0 1-.848-2.101Zm.848-2.625c.26.165.54.307.837.419a7.354 7.354 0 0 0-.24 1.682h-1.445c.053-.775.35-1.507.848-2.101zm6.506 2.097h-1.45a7.394 7.394 0 0 0-.238-1.682c.296-.115.577-.253.834-.422a3.67 3.67 0 0 1 .854 2.104zm-.857 2.632a4.785 4.785 0 0 0-.831-.422 7.304 7.304 0 0 0 .24-1.682h1.448a3.664 3.664 0 0 1-.857 2.104zm-2.563-.782v-1.319h1.445a6.991 6.991 0 0 1-.215 1.514 5.593 5.593 0 0 0-1.23-.198zm1.072.693a4.459 4.459 0 0 1-.171.396c-.254.51-.57.847-.9.966v-1.527c.369.02.725.076 1.071.165zm-1.072-2.543v-1.319a5.603 5.603 0 0 0 1.23-.198c.126.462.198.98.215 1.517zm0-1.846v-1.527c.33.118.647.455.9.963a3.02 3.02 0 0 1 .165.395 5.055 5.055 0 0 1-1.065.165zm-.527 0a5.135 5.135 0 0 1-1.062-.165 4.287 4.287 0 0 1 .171-.396c.254-.508.567-.844.89-.963zm0 .527v1.32h-1.435a6.991 6.991 0 0 1 .215-1.518c.389.112.8.178 1.22.195zm0 1.847v1.32a5.6 5.6 0 0 0-1.22.194 6.876 6.876 0 0 1-.215-1.517zm0 1.847v1.527c-.324-.122-.637-.462-.89-.963a4.076 4.076 0 0 1-.172-.396 5.31 5.31 0 0 1 1.062-.165zm2.097.34c.218.085.429.187.623.306a3.647 3.647 0 0 1-1.154.7c.205-.275.386-.614.528-1.007zm0-4.898a3.967 3.967 0 0 0-.534-1.006c.422.159.811.396 1.154.7a4.013 4.013 0 0 1-.62.306zm-3.66 0a4.346 4.346 0 0 1-.627-.303 3.66 3.66 0 0 1 1.164-.703 3.947 3.947 0 0 0-.537 1.01zm0 4.894c.148.393.33.732.537 1.01a3.657 3.657 0 0 1-1.16-.707 4.78 4.78 0 0 1 .626-.306z"/><path fill="none" stroke-width="8.419" d="m428.161 78.197 14.036 14.038m19.648-22.457 14.038-14.04m-25.267 22.459 14.035 14.038 33.69-36.496"/></g></svg> 16 `; 93 if (authifyweb_container.querySelector('.authifyweb-widget')) return; 17 94 18 const authifyweb_link = document.createElement('a'); 19 authifyweb_link.target = '_blank'; 20 authifyweb_link.rel = 'noopener'; 21 authifyweb_link.setAttribute('aria-label', 'Verify this website with authifyWeb'); 22 authifyweb_link.innerHTML = authifyweb_svg; 95 const widgetDiv = document.createElement('div'); 96 widgetDiv.classList.add('authifyweb-widget'); 23 97 24 // Generate the full link when the user click on widget 25 authifyweb_link.addEventListener('click', function (e) { 26 const baseUrl = authifyweb_container.getAttribute('data-authifyweb-link'); 27 if (!baseUrl) return; 98 const authifyweb_svg = `<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 545 153"><defs><path id="a" d="M94.312 9.277h296.851v52.567H94.312z"/></defs><text xml:space="preserve" fill="#767676" stroke="#000" font-family="Montserrat" font-size="45.924" letter-spacing="0" style="line-height:125%;-inkscape-font-specification:Montserrat;white-space:pre;shape-inside:url(#a)" transform="translate(-21.462 7.69) scale(.84996)" word-spacing="0"><tspan x="94.313" y="49.647"><tspan stroke="#767676">verify with</tspan></tspan></text><text xml:space="preserve" x="53.789" y="108.717" fill="#767676" stroke="#767676" stroke-width="2.138" font-family="Montserrat" font-size="57.004" letter-spacing="0" style="line-height:125%;-inkscape-font-specification:Montserrat" word-spacing="0"><tspan x="53.789" y="108.717" font-weight="300" style="-inkscape-font-specification:"Montserrat Light""><tspan fill="#ede3e3" stroke="#ede3e3" style="-inkscape-font-specification:"Montserrat Light"">authify</tspan><tspan fill="#a2fb15" stroke="#a2fb15" style="-inkscape-font-specification:"Montserrat Light"">Web</tspan></tspan></text><g stroke="#767676"><path fill="#767676" stroke-width=".023" d="M456.855 106.854a4.195 4.195 0 0 0 0-5.787 4.175 4.175 0 0 0-3.057-1.32 4.173 4.173 0 0 0-3.067 1.326 4.201 4.201 0 0 0 0 5.781 4.18 4.18 0 0 0 3.067 1.32 4.163 4.163 0 0 0 3.06-1.32zm-6.734-2.628h1.445c.02.607.098 1.174.24 1.682a4.782 4.782 0 0 0-.837.419 3.667 3.667 0 0 1-.848-2.101Zm.848-2.625c.26.165.54.307.837.419a7.354 7.354 0 0 0-.24 1.682h-1.445c.053-.775.35-1.507.848-2.101zm6.506 2.097h-1.45a7.394 7.394 0 0 0-.238-1.682c.296-.115.577-.253.834-.422a3.67 3.67 0 0 1 .854 2.104zm-.857 2.632a4.785 4.785 0 0 0-.831-.422 7.304 7.304 0 0 0 .24-1.682h1.448a3.664 3.664 0 0 1-.857 2.104zm-2.563-.782v-1.319h1.445a6.991 6.991 0 0 1-.215 1.514 5.593 5.593 0 0 0-1.23-.198zm1.072.693a4.459 4.459 0 0 1-.171.396c-.254.51-.57.847-.9.966v-1.527c.369.02.725.076 1.071.165zm-1.072-2.543v-1.319a5.603 5.603 0 0 0 1.23-.198c.126.462.198.98.215 1.517zm0-1.846v-1.527c.33.118.647.455.9.963a3.02 3.02 0 0 1 .165.395 5.055 5.055 0 0 1-1.065.165zm-.527 0a5.135 5.135 0 0 1-1.062-.165 4.287 4.287 0 0 1 .171-.396c.254-.508.567-.844.89-.963zm0 .527v1.32h-1.435a6.991 6.991 0 0 1 .215-1.518c.389.112.8.178 1.22.195zm0 1.847v1.32a5.6 5.6 0 0 0-1.22.194 6.876 6.876 0 0 1-.215-1.517zm0 1.847v1.527c-.324-.122-.637-.462-.89-.963a4.076 4.076 0 0 1-.172-.396 5.31 5.31 0 0 1 1.062-.165zm2.097.34c.218.085.429.187.623.306a3.647 3.647 0 0 1-1.154.7c.205-.275.386-.614.528-1.007zm0-4.898a3.967 3.967 0 0 0-.534-1.006c.422.159.811.396 1.154.7a4.013 4.013 0 0 1-.62.306zm-3.66 0a4.346 4.346 0 0 1-.627-.303 3.66 3.66 0 0 1 1.164-.703 3.947 3.947 0 0 0-.537 1.01zm0 4.894c.148.393.33.732.537 1.01a3.657 3.657 0 0 1-1.16-.707 4.78 4.78 0 0 1 .626-.306z"/><path fill="none" stroke-width="8.419" d="m428.161 78.197 14.036 14.038m19.648-22.457 14.038-14.04m-25.267 22.459 14.035 14.038 33.69-36.496"/></g></svg>`; 99 100 const authifyweb_link = document.createElement('a'); 101 authifyweb_link.target = '_blank'; 102 authifyweb_link.rel = 'noopener noreferrer'; 103 authifyweb_link.setAttribute('aria-label', 'Verify this website with authifyWeb'); 104 authifyweb_link.innerHTML = authifyweb_svg; 105 106 // Generate the full link only when the user click on widget 107 authifyweb_link.addEventListener('click', function (e) { 108 const baseUrl = authifyweb_container.getAttribute('data-authifyweb-link'); 109 if (!baseUrl) return; 28 110 29 const dynamicLink = `${baseUrl}/verify?url=` + encodeURIComponent(window.location.href);30 authifyweb_link.href = dynamicLink; 111 const dynamicLink = `${baseUrl}/verify?url=` + encodeURIComponent(window.location.href); 112 authifyweb_link.href = dynamicLink; 31 113 }); 32 114 33 authifyweb_widgetContainer.appendChild(authifyweb_link); 34 authifyweb_container.appendChild(authifyweb_widgetContainer); 35 36 37 if (!document.querySelector('style[data-authifyweb-style]')) { 38 const authifyweb_style = document.createElement('style'); 39 authifyweb_style.setAttribute('data-authifyweb-style', 'true'); 40 authifyweb_style.innerHTML = ` 41 .authifyweb-widget-container { 42 display: flex; 43 max-width: 150px; 44 max-height: 50px; 45 background-color: black; 46 border-radius: 10px; 47 border: 3px solid #767676; 48 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 49 cursor: pointer; 50 } 51 .authifyweb-widget svg { 52 width: 150px; 53 height: 48px; 54 } 55 .authifyweb-widget a { 56 margin-top: 3px; 57 } 58 .authifyweb-powered-link a { 59 pointer-events: none; 60 text-decoration: none; 61 color: inherit; 62 font: inherit; 63 } 64 .authifyweb-powered-link { 65 margin: 5px 0px 20px 5px; 66 font-family: 'Montserrat','Poppins', 'Rubik', 'Nunito Sans', sans-serif; 67 font-size: 12px; 68 } 69 #authifyweb-powered-widget { 70 font: inherit; 71 line-height: inherit; 72 } 73 `; 74 document.head.appendChild(authifyweb_style); 75 } 76 77 115 widgetDiv.appendChild(authifyweb_link); 116 authifyweb_container.appendChild(widgetDiv); 78 117 }); 118 79 119 }); -
verification-widget-authifyweb/trunk/verification-widget-authifyweb.php
r3300872 r3415748 4 4 * Plugin URI: https://authifyweb.com/ 5 5 * Description: A minimal WordPress plugin that displays authifyWeb verification widget using shortcode. 6 * Version: 1.0. 26 * Version: 1.0.3 7 7 * Author: webVerts 8 8 * Author URI: https://fame.authifyweb.com/user/na1/ 9 * Tested up to: 6. 89 * Tested up to: 6.9 10 10 * Text Domain: verification-widget-authifyweb 11 11 * Domain Path: /languages/ … … 53 53 <h3><?php esc_html_e( 'Current Website Information', 'verification-widget-authifyweb' ); ?></h3> 54 54 <p><strong><?php esc_html_e( 'Current Website URL:', 'verification-widget-authifyweb' ); ?></strong> <?php echo esc_url( $current_site_url ); ?></p> 55 <p><strong><?php esc_html_e( 'SSL Status:', 'verification-widget-authifyweb' ); ?></strong> <?php echo is_ssl() ? 'SSL enabled' : 'HTTPS required for proper working'; ?></p> 55 <p><strong><?php esc_html_e( 'SSL Status:', 'verification-widget-authifyweb' ); ?></strong> 56 <?php echo is_ssl() 57 ? esc_html__( 'SSL enabled', 'verification-widget-authifyweb' ) 58 : esc_html__( 'HTTPS required for proper working', 'verification-widget-authifyweb' ); ?> 59 </p> 60 56 61 57 62 <form method="post" action="options.php"> 58 <?php 59 settings_fields( 'vwfaw_settings_group' ); 60 do_settings_sections( 'vwfaw_settings' ); 61 ?> 62 <table class="form-table"> 63 <!-- authifyWeb Profile Link --> 64 <tr valign="top"> 65 <th scope="row"><?php esc_html_e( 'authifyWeb Profile Link', 'verification-widget-authifyweb' ); ?></th> 66 <td><input type="url" name="vwfaw_authifyweb_profile_link" value="<?php echo esc_url( $authifyweb_profile_link ); ?>" class="regular-text" required /></td> 67 </tr> 68 69 <!-- Add Link to <head> Checkbox --> 70 <tr valign="top"> 71 <th scope="row"><?php esc_html_e( 'Add this link to website head to verify your website?', 'verification-widget-authifyweb' ); ?></th> 72 <td> 73 <input type="checkbox" id="vwfaw_add_link_to_head" name="vwfaw_add_link_to_head" value="1" <?php checked( $add_link_to_head, 1 ); ?> /> 74 <label for="vwfaw_add_link_to_head"><?php esc_html_e( 'Keep this enabled to insert <link> tag to the website\'s <head> to verify this website. You can skip this, if you\'d like to manually insert into the <head> section of your website, with another 3rd party plugin. Adding a <link> is essential inorder to verify your site, whether done here, or manually.' , 'verification-widget-authifyweb' ); ?></label> 75 </td> 76 </tr> 77 </table> 78 79 <?php submit_button(); ?> 80 </form> 63 <?php 64 settings_fields( 'vwfaw_settings_group' ); 65 do_settings_sections( 'vwfaw_settings' ); 66 ?> 67 <table class="form-table"> 68 <tr valign="top"> 69 <th scope="row"><?php esc_html_e( 'authifyWeb Profile Link', 'verification-widget-authifyweb' ); ?></th> 70 <td><input type="url" name="vwfaw_authifyweb_profile_link" value="<?php echo esc_attr( $authifyweb_profile_link ); ?>" class="regular-text" required /></td> 71 </tr> 72 73 <tr valign="top"> 74 <th scope="row"><?php esc_html_e( 'Add this link to website head to verify your website?', 'verification-widget-authifyweb' ); ?></th> 75 <td> 76 <input type="checkbox" id="vwfaw_add_link_to_head" name="vwfaw_add_link_to_head" value="1" <?php checked( $add_link_to_head, 1 ); ?> /> 77 <label for="vwfaw_add_link_to_head"><?php esc_html_e( 'Keep this enabled to insert <link> tag to the website\'s <head> to verify this website. You can skip this, if you\'d like to manually insert into the <head> section of your website, with another 3rd party plugin. Adding a <link> is essential inorder to verify your site, whether done here, or manually.' , 'verification-widget-authifyweb' ); ?></label> 78 </td> 79 </tr> 80 81 <?php 82 $widget_behavior = get_option( 'vwfaw_widget_behavior', 'new_tab' ); 83 ?> 84 <tr valign="top"> 85 <th scope="row"><?php esc_html_e( 'How should the widget open for your visitors?', 'verification-widget-authifyweb' ); ?></th> 86 <td> 87 <label> 88 <input type="radio" name="vwfaw_widget_behavior" value="new_tab" <?php checked( $widget_behavior, 'new_tab' ); ?> /> 89 <?php esc_html_e( 'Opens verification page in a new browser tab.', 'verification-widget-authifyweb' ); ?> 90 </label> 91 <p class="authifyweb-popup-description"> 92 <?php esc_html_e( 'When someone clicks the verification badge, they’re taken to a new browser tab to view your verified profile. This keeps your site open in the background.', 'verification-widget-authifyweb' ); ?> 93 </p> 94 <br /> 95 <label> 96 <input type="radio" name="vwfaw_widget_behavior" value="layer" <?php checked( $widget_behavior, 'layer' ); ?> /> 97 <?php esc_html_e( '(New). Show the verification page on the same page', 'verification-widget-authifyweb' ); ?> 98 </label> 99 <p class="authifyweb-popup-description"> 100 <?php esc_html_e( 'The verification badge opens a popup on the same page. Your visitors stay on your site, and can close the popup when done, and continue browsing your site.', 'verification-widget-authifyweb' ); ?> 101 </p> 102 </td> 103 </tr> 104 </table> 105 106 <?php 107 // Privacy Policy Suggestion 108 109 $vwfaw_copy_policy_html = ' 110 <p>We partner with, and use, <strong><a href="https://authifyweb.com" target="_blank" rel="noopener noreferrer">authifyWeb website verification service</a></strong> to protect our users from online scams, phishing, and brand impersonation. 111 When you click the verification widget, you acknowledge and agree to the service\'s 112 <strong><a href="https://authifyweb.com/pages/terms" target="_blank" rel="noopener nofollow noreferrer">Terms</a></strong>, 113 <strong><a href="https://authifyweb.com/pages/privacy-policy" target="_blank" rel="noopener nofollow noreferrer">Privacy Policy</a></strong>, and 114 <strong><a href="https://authifyweb.com/pages/disclaimer" target="_blank" rel="noopener nofollow noreferrer">Disclaimer</a></strong>. 115 </p> 116 '; 117 118 $vwfaw_policy_suggestion = __( 119 'To ensure full compliance with modern privacy practices and transparency, we <strong>highly recommend</strong> adding the following text to your Privacy Policy. This version includes the required link to our policies', 120 'verification-widget-authifyweb' 121 ); 122 ?> 123 124 <div class="vwfaw-authifyweb-local-notice notice-info" style="margin-top: 20px;"> 125 <h3><?php esc_html_e( 'Privacy Policy Suggestion', 'verification-widget-authifyweb' ); ?></h3> 126 127 <p><?php echo wp_kses( $vwfaw_policy_suggestion, array( 'strong' => array() ) ); ?></p> 128 129 <!-- Content Box --> 130 <div class="vwfaw-copy-box"> 131 <!-- <strong><?php esc_html_e( 'authifyWeb Policy', 'verification-widget-authifyweb' ); ?></strong> --> 132 <?php 133 134 echo wp_kses( 135 $vwfaw_copy_policy_html, 136 array( 137 'p' => array(), 138 'strong' => array(), 139 'a' => array( 140 'href' => array(), 141 'target' => array(), 142 'rel' => array(), 143 ) 144 ) 145 ); 146 ?> 147 </div> 148 149 <p style="font-size: smaller; font-style: oblique;"> 150 <?php esc_html_e( 'Manually copy the above text into your Privacy Policy.', 'verification-widget-authifyweb' ); ?> 151 </p> 152 </div> 153 154 <?php 155 // Privacy Policy Suggestion ends. 156 ?> 157 158 <?php submit_button(); ?> 159 </form> 81 160 <?php 82 161 // Display the verification link preview once saved … … 87 166 echo '<h3>' . esc_html__( 'Use the below shortcode to display verification widget', 'verification-widget-authifyweb' ) . '</h3>'; 88 167 echo '<h4> [vwfaw_authifyweb-sc-widget] </h4>'; 168 169 89 170 } 90 171 ?> … … 98 179 register_setting('vwfaw_settings_group', 'vwfaw_authifyweb_profile_link', 'vwfaw_sanitize_url'); 99 180 register_setting('vwfaw_settings_group', 'vwfaw_add_link_to_head', 'intval'); 181 register_setting( 'vwfaw_settings_group', 'vwfaw_widget_behavior','vwfaw_sanitize_widget_behavior' ); 182 100 183 } 101 184 add_action( 'admin_init', 'vwfaw_register_settings' ); … … 106 189 return esc_url_raw( $input ); 107 190 } 191 192 //Sanitize RadioButton 193 function vwfaw_sanitize_widget_behavior( $input ) { 194 $allowed = [ 'new_tab', 'layer' ]; 195 return in_array( $input, $allowed, true ) ? $input : 'new_tab'; 196 } 197 108 198 109 199 // Function to handle the shortcode logic … … 118 208 119 209 // Generate the HTML output for the widget with the new structure 120 $output = '<div id="authifyweb-powered-widget">121 <div class="authifyweb-widget-container" data-authifyweb-link="' . esc_url( $authifyweb_profile_link ) . '"></div>122 <p class="authifyweb-powered-link" > <a href="https://authifyweb.com" aria-label="' . esc_attr__( 'Visit authifyWeb', 'verification-widget-authifyweb' ) . '">' . esc_html__( 'Powered by authifyWeb', 'verification-widget-authifyweb' ) . '</a>210 $output = '<div class="authifyweb-powered-widget" > 211 <div class="authifyweb-widget-container" style=" width: 150px; height: 50px;" data-authifyweb-link="' . esc_url( $authifyweb_profile_link ) . '"></div> 212 <p class="authifyweb-powered-link" style="font-size: 11px;"> <a style=" text-decoration: none; color: inherit;" href="https://authifyweb.com" target="_blank" rel="nofollow" aria-label="' . esc_attr__( 'Visit authifyWeb', 'verification-widget-authifyweb' ) . '">' . esc_html__( 'Powered by authifyWeb', 'verification-widget-authifyweb' ) . '</a> 123 213 </p> </div>'; 124 214 … … 152 242 plugin_dir_url( __FILE__ ) . 'verification-widget-authifyweb.css', 153 243 array(), 154 filemtime( plugin_dir_path( __FILE__ ) . 'verification-widget-authifyweb.css' ) // Cache-busting244 filemtime( plugin_dir_path( __FILE__ ) . 'verification-widget-authifyweb.css' ) 155 245 ); 156 246 } 157 add_action( ' wp_enqueue_scripts', 'vwfaw_enqueue_styles' );247 add_action( 'admin_enqueue_scripts', 'vwfaw_enqueue_styles' ); 158 248 159 249 // Enqueue scripts for the widget 160 250 function vwfaw_enqueue_scripts() { 161 wp_enqueue_script( 162 'vwfaw-widget-scripts', 163 plugin_dir_url( __FILE__ ) . 'verification-widget-authifyweb.js', 164 array(), 165 filemtime( plugin_dir_path( __FILE__ ) . 'verification-widget-authifyweb.js' ), // Cache-busting 166 true 167 ); 251 $widget_behavior = get_option( 'vwfaw_widget_behavior', 'new_tab' ); 252 253 if ( $widget_behavior === 'layer' ) { 254 wp_enqueue_script( 255 'vwfaw-widget-scripts-layer', 256 plugin_dir_url( __FILE__ ) . 'verification-widget-authifyweb_iframe.js', 257 array(), 258 filemtime( plugin_dir_path( __FILE__ ) . 'verification-widget-authifyweb_iframe.js' ), 259 true 260 ); 261 } else { 262 wp_enqueue_script( 263 'vwfaw-widget-scripts', 264 plugin_dir_url( __FILE__ ) . 'verification-widget-authifyweb.js', 265 array(), 266 filemtime( plugin_dir_path( __FILE__ ) . 'verification-widget-authifyweb.js' ), 267 true 268 ); 269 } 168 270 } 169 271 add_action( 'wp_enqueue_scripts', 'vwfaw_enqueue_scripts' ); 272 170 273 171 274 … … 192 295 delete_option( 'vwfaw_authifyweb_profile_link' ); 193 296 delete_option( 'vwfaw_add_link_to_head' ); 297 delete_option( 'vwfaw_widget_behavior' ); 194 298 195 299 }
Note: See TracChangeset
for help on using the changeset viewer.