Merged in feature/MAW-846-sharethis (pull request #52)

Feature/MAW-846 sharethis

* MAW-846: ShareThis social button plugin

* MAW-846: ShareThis social buttons update

* Merged develop into feature/MAW-846-sharethis
This commit is contained in:
SRIRAM RAO TAKKALLAPELLY
2024-05-17 14:24:19 +00:00
parent 5dbb0b284e
commit 4783d97a46
44 changed files with 7815 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,73 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 12C0 6.34315 0 3.51472 1.75736 1.75736C3.51472 0 6.34315 0 12 0C17.6569 0 20.4853 0 22.2426 1.75736C24 3.51472 24 6.34315 24 12C24 17.6569 24 20.4853 22.2426 22.2426C20.4853 24 17.6569 24 12 24C6.34315 24 3.51472 24 1.75736 22.2426C0 20.4853 0 17.6569 0 12Z" fill="white"/>
<path opacity="0.12" d="M0 12C0 6.34315 0 3.51472 1.75736 1.75736C3.51472 0 6.34315 0 12 0C17.6569 0 20.4853 0 22.2426 1.75736C24 3.51472 24 6.34315 24 12C24 17.6569 24 20.4853 22.2426 22.2426C20.4853 24 17.6569 24 12 24C6.34315 24 3.51472 24 1.75736 22.2426C0 20.4853 0 17.6569 0 12Z" fill="url(#paint0_linear_5786_64807)"/>
<path d="M12.0557 3.62639C12.112 3.51972 12.2648 3.51972 12.3211 3.62639L12.5551 4.07005C12.5768 4.11119 12.6164 4.13993 12.6622 4.14786L13.1565 4.23338C13.2754 4.25395 13.3226 4.39924 13.2385 4.48573L12.8889 4.84545C12.8565 4.87881 12.8414 4.92531 12.848 4.97135L12.9194 5.46787C12.9366 5.58725 12.813 5.67704 12.7047 5.62383L12.2546 5.40248C12.2128 5.38196 12.1639 5.38196 12.1222 5.40248L11.6721 5.62383C11.5638 5.67704 11.4402 5.58725 11.4574 5.46787L11.5288 4.97135C11.5354 4.92531 11.5203 4.87881 11.4879 4.84545L11.1383 4.48573C11.0542 4.39924 11.1014 4.25395 11.2203 4.23338L11.7146 4.14786C11.7604 4.13993 11.7999 4.11119 11.8217 4.07005L12.0557 3.62639Z" fill="url(#paint1_linear_5786_64807)"/>
<path d="M17.3057 5.87639C17.362 5.76972 17.5148 5.76972 17.5711 5.87639L17.8051 6.32005C17.8268 6.36119 17.8664 6.38993 17.9122 6.39786L18.4065 6.48338C18.5254 6.50395 18.5726 6.64924 18.4885 6.73573L18.1389 7.09545C18.1065 7.12881 18.0914 7.17531 18.098 7.22135L18.1694 7.71787C18.1866 7.83725 18.063 7.92704 17.9547 7.87383L17.5046 7.65248C17.4628 7.63196 17.4139 7.63196 17.3722 7.65248L16.9221 7.87383C16.8138 7.92704 16.6902 7.83725 16.7074 7.71787L16.7788 7.22135C16.7854 7.17531 16.7703 7.12881 16.7379 7.09545L16.3883 6.73573C16.3042 6.64924 16.3514 6.50395 16.4703 6.48338L16.9646 6.39786C17.0104 6.38993 17.0499 6.36119 17.0717 6.32005L17.3057 5.87639Z" fill="url(#paint2_linear_5786_64807)"/>
<path d="M17.3057 16.7514C17.362 16.6447 17.5148 16.6447 17.5711 16.7514L17.8051 17.1951C17.8268 17.2362 17.8664 17.2649 17.9122 17.2729L18.4065 17.3584C18.5254 17.3789 18.5726 17.5242 18.4885 17.6107L18.1389 17.9705C18.1065 18.0038 18.0914 18.0503 18.098 18.0963L18.1694 18.5929C18.1866 18.7122 18.063 18.802 17.9547 18.7488L17.5046 18.5275C17.4628 18.507 17.4139 18.507 17.3722 18.5275L16.9221 18.7488C16.8138 18.802 16.6902 18.7122 16.7074 18.5929L16.7788 18.0963C16.7854 18.0503 16.7703 18.0038 16.7379 17.9705L16.3883 17.6107C16.3042 17.5242 16.3514 17.3789 16.4703 17.3584L16.9646 17.2729C17.0104 17.2649 17.0499 17.2362 17.0717 17.1951L17.3057 16.7514Z" fill="url(#paint3_linear_5786_64807)"/>
<path d="M6.43073 16.7514C6.48701 16.6447 6.63978 16.6447 6.69606 16.7514L6.93014 17.1951C6.95185 17.2362 6.99141 17.2649 7.03724 17.2729L7.53152 17.3584C7.65036 17.3789 7.69757 17.5242 7.61351 17.6107L7.2639 17.9705C7.23148 18.0038 7.21637 18.0503 7.22299 18.0963L7.2944 18.5929C7.31156 18.7122 7.18797 18.802 7.07974 18.7488L6.62958 18.5275C6.58785 18.507 6.53895 18.507 6.49721 18.5275L6.04706 18.7488C5.93883 18.802 5.81523 18.7122 5.8324 18.5929L5.9038 18.0963C5.91042 18.0503 5.89531 18.0038 5.8629 17.9705L5.51328 17.6107C5.42922 17.5242 5.47643 17.3789 5.59528 17.3584L6.08956 17.2729C6.13539 17.2649 6.17495 17.2362 6.19665 17.1951L6.43073 16.7514Z" fill="url(#paint4_linear_5786_64807)"/>
<path d="M6.43073 5.87639C6.48701 5.76972 6.63978 5.76972 6.69606 5.87639L6.93014 6.32005C6.95185 6.36119 6.99141 6.38993 7.03724 6.39786L7.53152 6.48338C7.65036 6.50395 7.69757 6.64924 7.61351 6.73573L7.2639 7.09545C7.23148 7.12881 7.21637 7.17531 7.22299 7.22135L7.2944 7.71787C7.31156 7.83725 7.18797 7.92704 7.07974 7.87383L6.62958 7.65248C6.58785 7.63196 6.53895 7.63196 6.49721 7.65248L6.04706 7.87383C5.93883 7.92704 5.81523 7.83725 5.8324 7.71787L5.9038 7.22135C5.91042 7.17531 5.89531 7.12881 5.8629 7.09545L5.51328 6.73573C5.42922 6.64924 5.47643 6.50395 5.59528 6.48338L6.08956 6.39786C6.13539 6.38993 6.17495 6.36119 6.19665 6.32005L6.43073 5.87639Z" fill="url(#paint5_linear_5786_64807)"/>
<path d="M12.0557 19.0014C12.112 18.8947 12.2648 18.8947 12.3211 19.0014L12.5551 19.4451C12.5768 19.4862 12.6164 19.5149 12.6622 19.5229L13.1565 19.6084C13.2754 19.6289 13.3226 19.7742 13.2385 19.8607L12.8889 20.2205C12.8565 20.2538 12.8414 20.3003 12.848 20.3463L12.9194 20.8429C12.9366 20.9622 12.813 21.052 12.7047 20.9988L12.2546 20.7775C12.2128 20.757 12.1639 20.757 12.1222 20.7775L11.6721 20.9988C11.5638 21.052 11.4402 20.9622 11.4574 20.8429L11.5288 20.3463C11.5354 20.3003 11.5203 20.2538 11.4879 20.2205L11.1383 19.8607C11.0542 19.7742 11.1014 19.6289 11.2203 19.6084L11.7146 19.5229C11.7604 19.5149 11.7999 19.4862 11.8217 19.4451L12.0557 19.0014Z" fill="url(#paint6_linear_5786_64807)"/>
<path d="M19.5557 11.5014C19.612 11.3947 19.7648 11.3947 19.8211 11.5014L20.0551 11.9451C20.0768 11.9862 20.1164 12.0149 20.1622 12.0229L20.6565 12.1084C20.7754 12.1289 20.8226 12.2742 20.7385 12.3607L20.3889 12.7205C20.3565 12.7538 20.3414 12.8003 20.348 12.8463L20.4194 13.3429C20.4366 13.4622 20.313 13.552 20.2047 13.4988L19.7546 13.2775C19.7128 13.257 19.6639 13.257 19.6222 13.2775L19.1721 13.4988C19.0638 13.552 18.9402 13.4622 18.9574 13.3429L19.0288 12.8463C19.0354 12.8003 19.0203 12.7538 18.9879 12.7205L18.6383 12.3607C18.5542 12.2742 18.6014 12.1289 18.7203 12.1084L19.2146 12.0229C19.2604 12.0149 19.2999 11.9862 19.3217 11.9451L19.5557 11.5014Z" fill="url(#paint7_linear_5786_64807)"/>
<path d="M4.18073 11.5014C4.23701 11.3947 4.38978 11.3947 4.44606 11.5014L4.68014 11.9451C4.70185 11.9862 4.74141 12.0149 4.78724 12.0229L5.28152 12.1084C5.40036 12.1289 5.44757 12.2742 5.36351 12.3607L5.0139 12.7205C4.98148 12.7538 4.96637 12.8003 4.97299 12.8463L5.0444 13.3429C5.06156 13.4622 4.93797 13.552 4.82974 13.4988L4.37958 13.2775C4.33785 13.257 4.28895 13.257 4.24721 13.2775L3.79706 13.4988C3.68883 13.552 3.56523 13.4622 3.5824 13.3429L3.6538 12.8463C3.66042 12.8003 3.64531 12.7538 3.6129 12.7205L3.26328 12.3607C3.17922 12.2742 3.22643 12.1289 3.34528 12.1084L3.83956 12.0229C3.88539 12.0149 3.92495 11.9862 3.94665 11.9451L4.18073 11.5014Z" fill="url(#paint8_linear_5786_64807)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.125 9.375C10.125 8.33947 10.9645 7.5 12 7.5C13.0355 7.5 13.875 8.33947 13.875 9.375V10.1631C14.3625 10.211 14.6907 10.3194 14.9357 10.5643C15.375 11.0037 15.375 11.7108 15.375 13.125V13.5C15.375 14.9142 15.375 15.6213 14.9357 16.0607C14.4963 16.5 13.7892 16.5 12.375 16.5H11.625C10.2108 16.5 9.50368 16.5 9.06434 16.0607C8.625 15.6213 8.625 14.9142 8.625 13.5V13.125C8.625 11.7108 8.625 11.0037 9.06434 10.5643C9.30928 10.3194 9.63746 10.211 10.125 10.1631V9.375ZM11.25 10.1253C11.3692 10.125 11.4941 10.125 11.625 10.125H12.375C12.5059 10.125 12.6308 10.125 12.75 10.1253V9.375C12.75 8.96079 12.4142 8.625 12 8.625C11.5858 8.625 11.25 8.96079 11.25 9.375V10.1253ZM12.375 13.5872C12.5992 13.4575 12.75 13.2151 12.75 12.9375C12.75 12.5233 12.4142 12.1875 12 12.1875C11.5858 12.1875 11.25 12.5233 11.25 12.9375C11.25 13.2151 11.4008 13.4575 11.625 13.5872V14.0625C11.625 14.2696 11.7929 14.4375 12 14.4375C12.2071 14.4375 12.375 14.2696 12.375 14.0625V13.5872Z" fill="url(#paint9_linear_5786_64807)"/>
<defs>
<linearGradient id="paint0_linear_5786_64807" x1="12.8928" y1="24" x2="12.3104" y2="1.42975" gradientUnits="userSpaceOnUse">
<stop stop-color="#3D3D3D" stop-opacity="0.39"/>
<stop offset="0.235469" stop-color="#3D3D3D" stop-opacity="0.4"/>
<stop offset="0.581647" stop-color="#3D3D3D" stop-opacity="0.24"/>
</linearGradient>
<linearGradient id="paint1_linear_5786_64807" x1="12.1885" y1="5.15911" x2="12.1885" y2="5.9976" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFCD2F"/>
<stop offset="0.268" stop-color="#FFBB00"/>
<stop offset="0.659" stop-color="#FFA801"/>
<stop offset="1" stop-color="#FF9102"/>
</linearGradient>
<linearGradient id="paint2_linear_5786_64807" x1="17.4385" y1="7.40911" x2="17.4385" y2="8.2476" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFCD2F"/>
<stop offset="0.268" stop-color="#FFBB00"/>
<stop offset="0.659" stop-color="#FFA801"/>
<stop offset="1" stop-color="#FF9102"/>
</linearGradient>
<linearGradient id="paint3_linear_5786_64807" x1="17.4385" y1="18.2841" x2="17.4385" y2="19.1226" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFCD2F"/>
<stop offset="0.268" stop-color="#FFBB00"/>
<stop offset="0.659" stop-color="#FFA801"/>
<stop offset="1" stop-color="#FF9102"/>
</linearGradient>
<linearGradient id="paint4_linear_5786_64807" x1="6.56352" y1="18.2841" x2="6.56352" y2="19.1226" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFCD2F"/>
<stop offset="0.268" stop-color="#FFBB00"/>
<stop offset="0.659" stop-color="#FFA801"/>
<stop offset="1" stop-color="#FF9102"/>
</linearGradient>
<linearGradient id="paint5_linear_5786_64807" x1="6.56352" y1="7.40911" x2="6.56352" y2="8.2476" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFCD2F"/>
<stop offset="0.268" stop-color="#FFBB00"/>
<stop offset="0.659" stop-color="#FFA801"/>
<stop offset="1" stop-color="#FF9102"/>
</linearGradient>
<linearGradient id="paint6_linear_5786_64807" x1="12.1885" y1="20.5341" x2="12.1885" y2="21.3726" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFCD2F"/>
<stop offset="0.268" stop-color="#FFBB00"/>
<stop offset="0.659" stop-color="#FFA801"/>
<stop offset="1" stop-color="#FF9102"/>
</linearGradient>
<linearGradient id="paint7_linear_5786_64807" x1="19.6885" y1="13.0341" x2="19.6885" y2="13.8726" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFCD2F"/>
<stop offset="0.268" stop-color="#FFBB00"/>
<stop offset="0.659" stop-color="#FFA801"/>
<stop offset="1" stop-color="#FF9102"/>
</linearGradient>
<linearGradient id="paint8_linear_5786_64807" x1="4.31352" y1="13.0341" x2="4.31352" y2="13.8726" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFCD2F"/>
<stop offset="0.268" stop-color="#FFBB00"/>
<stop offset="0.659" stop-color="#FFA801"/>
<stop offset="1" stop-color="#FF9102"/>
</linearGradient>
<linearGradient id="paint9_linear_5786_64807" x1="12" y1="7.5" x2="12" y2="16.125" gradientUnits="userSpaceOnUse">
<stop offset="0.572917" stop-color="#004FC5"/>
<stop offset="0.8125" stop-color="#002DBD"/>
<stop offset="1" stop-color="#0000AC"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -0,0 +1,22 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 12C0 6.34315 0 3.51472 1.75736 1.75736C3.51472 0 6.34315 0 12 0C17.6569 0 20.4853 0 22.2426 1.75736C24 3.51472 24 6.34315 24 12C24 17.6569 24 20.4853 22.2426 22.2426C20.4853 24 17.6569 24 12 24C6.34315 24 3.51472 24 1.75736 22.2426C0 20.4853 0 17.6569 0 12Z" fill="white"/>
<path opacity="0.16" d="M0 12C0 6.34315 0 3.51472 1.75736 1.75736C3.51472 0 6.34315 0 12 0C17.6569 0 20.4853 0 22.2426 1.75736C24 3.51472 24 6.34315 24 12C24 17.6569 24 20.4853 22.2426 22.2426C20.4853 24 17.6569 24 12 24C6.34315 24 3.51472 24 1.75736 22.2426C0 20.4853 0 17.6569 0 12Z" fill="url(#paint0_linear_5786_64791)"/>
<g opacity="0.16">
<path d="M4.78125 14.4375C4.78125 14.0233 5.11704 13.6875 5.53125 13.6875H19.2188C19.633 13.6875 19.9688 14.0233 19.9688 14.4375C19.9688 14.8517 19.633 15.1875 19.2188 15.1875H5.53125C5.11704 15.1875 4.78125 14.8517 4.78125 14.4375Z" fill="#3D3D3D"/>
<path d="M4.78125 3.75C4.78125 3.33579 5.11704 3 5.53125 3H19.2188C19.633 3 19.9688 3.33579 19.9688 3.75C19.9688 4.16421 19.633 4.5 19.2188 4.5H5.53125C5.11704 4.5 4.78125 4.16421 4.78125 3.75Z" fill="#3D3D3D"/>
<path d="M4.78125 17.3438C4.78125 16.9295 5.11704 16.5938 5.53125 16.5938H19.2188C19.633 16.5938 19.9688 16.9295 19.9688 17.3438C19.9688 17.758 19.633 18.0938 19.2188 18.0938H5.53125C5.11704 18.0938 4.78125 17.758 4.78125 17.3438Z" fill="#3D3D3D"/>
<path d="M4.78125 6.75C4.78125 6.33579 5.11704 6 5.53125 6H19.2188C19.633 6 19.9688 6.33579 19.9688 6.75C19.9688 7.16421 19.633 7.5 19.2188 7.5H5.53125C5.11704 7.5 4.78125 7.16421 4.78125 6.75Z" fill="#3D3D3D"/>
<path d="M4.78125 20.25C4.78125 19.8358 5.11704 19.5 5.53125 19.5H19.2188C19.633 19.5 19.9688 19.8358 19.9688 20.25C19.9688 20.6642 19.633 21 19.2188 21H5.53125C5.11704 21 4.78125 20.6642 4.78125 20.25Z" fill="#3D3D3D"/>
</g>
<path d="M2.25 10.5703C2.25 10.2867 2.25 10.1449 2.28785 10.0304C2.36235 9.80487 2.53924 9.62797 2.76474 9.55348C2.87932 9.51562 3.02111 9.51562 3.30469 9.51562H5.83594C6.11951 9.51562 6.2613 9.51562 6.37589 9.55348C6.60138 9.62797 6.77828 9.80487 6.85277 10.0304C6.89062 10.1449 6.89062 10.2867 6.89062 10.5703C6.89062 10.8539 6.89062 10.9957 6.85277 11.1103C6.77828 11.3358 6.60138 11.5127 6.37589 11.5871C6.2613 11.625 6.11951 11.625 5.83594 11.625H3.30469C3.02111 11.625 2.87932 11.625 2.76474 11.5871C2.53924 11.5127 2.36235 11.3358 2.28785 11.1103C2.25 10.9957 2.25 10.8539 2.25 10.5703Z" fill="#FFBA1C"/>
<path d="M17.4375 10.5703C17.4375 10.2867 17.4375 10.1449 17.4754 10.0304C17.5498 9.80487 17.7267 9.62797 17.9522 9.55348C18.0668 9.51562 18.2086 9.51562 18.4922 9.51562H21.0234C21.307 9.51562 21.4488 9.51562 21.5634 9.55348C21.7889 9.62797 21.9658 9.80487 22.0403 10.0304C22.0781 10.1449 22.0781 10.2867 22.0781 10.5703C22.0781 10.8539 22.0781 10.9957 22.0403 11.1103C21.9658 11.3358 21.7889 11.5127 21.5634 11.5871C21.4488 11.625 21.307 11.625 21.0234 11.625H18.4922C18.2086 11.625 18.0668 11.625 17.9522 11.5871C17.7267 11.5127 17.5498 11.3358 17.4754 11.1103C17.4375 10.9957 17.4375 10.8539 17.4375 10.5703Z" fill="#BD081C"/>
<path d="M12.375 10.5703C12.375 10.2867 12.375 10.1449 12.4129 10.0304C12.4873 9.80487 12.6642 9.62797 12.8897 9.55348C13.0043 9.51562 13.1461 9.51562 13.4297 9.51562H15.9609C16.2445 9.51562 16.3863 9.51562 16.5009 9.55348C16.7264 9.62797 16.9033 9.80487 16.9778 10.0304C17.0156 10.1449 17.0156 10.2867 17.0156 10.5703C17.0156 10.8539 17.0156 10.9957 16.9778 11.1103C16.9033 11.3358 16.7264 11.5127 16.5009 11.5871C16.3863 11.625 16.2445 11.625 15.9609 11.625H13.4297C13.1461 11.625 13.0043 11.625 12.8897 11.5871C12.6642 11.5127 12.4873 11.3358 12.4129 11.1103C12.375 10.9957 12.375 10.8539 12.375 10.5703Z" fill="#91D400"/>
<path d="M7.3125 10.5703C7.3125 10.2867 7.3125 10.1449 7.35035 10.0304C7.42485 9.80487 7.60174 9.62797 7.82724 9.55348C7.94182 9.51562 8.08361 9.51562 8.36719 9.51562H10.8984C11.182 9.51562 11.3238 9.51562 11.4384 9.55348C11.6639 9.62797 11.8408 9.80487 11.9153 10.0304C11.9531 10.1449 11.9531 10.2867 11.9531 10.5703C11.9531 10.8539 11.9531 10.9957 11.9153 11.1103C11.8408 11.3358 11.6639 11.5127 11.4384 11.5871C11.3238 11.625 11.182 11.625 10.8984 11.625H8.36719C8.08361 11.625 7.94182 11.625 7.82724 11.5871C7.60174 11.5127 7.42485 11.3358 7.35035 11.1103C7.3125 10.9957 7.3125 10.8539 7.3125 10.5703Z" fill="#00A5F0"/>
<defs>
<linearGradient id="paint0_linear_5786_64791" x1="12.8928" y1="24" x2="12.3104" y2="1.42975" gradientUnits="userSpaceOnUse">
<stop stop-color="#3D3D3D" stop-opacity="0.6"/>
<stop offset="0.235469" stop-color="#3D3D3D" stop-opacity="0.4"/>
<stop offset="0.581647" stop-color="#3D3D3D" stop-opacity="0.24"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@@ -0,0 +1,23 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 12C0 6.34315 0 3.51472 1.75736 1.75736C3.51472 0 6.34315 0 12 0C17.6569 0 20.4853 0 22.2426 1.75736C24 3.51472 24 6.34315 24 12C24 17.6569 24 20.4853 22.2426 22.2426C20.4853 24 17.6569 24 12 24C6.34315 24 3.51472 24 1.75736 22.2426C0 20.4853 0 17.6569 0 12Z" fill="white"/>
<path opacity="0.16" d="M0 12C0 6.34315 0 3.51472 1.75736 1.75736C3.51472 0 6.34315 0 12 0C17.6569 0 20.4853 0 22.2426 1.75736C24 3.51472 24 6.34315 24 12C24 17.6569 24 20.4853 22.2426 22.2426C20.4853 24 17.6569 24 12 24C6.34315 24 3.51472 24 1.75736 22.2426C0 20.4853 0 17.6569 0 12Z" fill="url(#paint0_linear_5786_64799)"/>
<g opacity="0.16">
<path d="M8.625 13.6875C8.625 13.2733 8.96079 12.9375 9.375 12.9375H20.0625C20.4767 12.9375 20.8125 13.2733 20.8125 13.6875C20.8125 14.1017 20.4767 14.4375 20.0625 14.4375H9.375C8.96079 14.4375 8.625 14.1017 8.625 13.6875Z" fill="#3D3D3D"/>
<path d="M8.625 10.6875C8.625 10.2733 8.96079 9.9375 9.375 9.9375H20.0625C20.4767 9.9375 20.8125 10.2733 20.8125 10.6875C20.8125 11.1017 20.4767 11.4375 20.0625 11.4375H9.375C8.96079 11.4375 8.625 11.1017 8.625 10.6875Z" fill="#3D3D3D"/>
<path d="M8.625 4.5C8.625 4.08579 8.96079 3.75 9.375 3.75H20.0625C20.4767 3.75 20.8125 4.08579 20.8125 4.5C20.8125 4.91421 20.4767 5.25 20.0625 5.25H9.375C8.96079 5.25 8.625 4.91421 8.625 4.5Z" fill="#3D3D3D"/>
<path d="M8.625 16.5938C8.625 16.1795 8.96079 15.8438 9.375 15.8438H20.0625C20.4767 15.8438 20.8125 16.1795 20.8125 16.5938C20.8125 17.008 20.4767 17.3438 20.0625 17.3438H9.375C8.96079 17.3438 8.625 17.008 8.625 16.5938Z" fill="#3D3D3D"/>
<path d="M8.625 7.5C8.625 7.08579 8.96079 6.75 9.375 6.75H20.0625C20.4767 6.75 20.8125 7.08579 20.8125 7.5C20.8125 7.91421 20.4767 8.25 20.0625 8.25H9.375C8.96079 8.25 8.625 7.91421 8.625 7.5Z" fill="#3D3D3D"/>
<path d="M8.625 19.5C8.625 19.0858 8.96079 18.75 9.375 18.75H20.0625C20.4767 18.75 20.8125 19.0858 20.8125 19.5C20.8125 19.9142 20.4767 20.25 20.0625 20.25H9.375C8.96079 20.25 8.625 19.9142 8.625 19.5Z" fill="#3D3D3D"/>
</g>
<path d="M2.25 6C2.25 5.29289 2.25 4.93934 2.46967 4.71967C2.68934 4.5 3.04289 4.5 3.75 4.5C4.45711 4.5 4.81066 4.5 5.03033 4.71967C5.25 4.93934 5.25 5.29289 5.25 6C5.25 6.70711 5.25 7.06066 5.03033 7.28033C4.81066 7.5 4.45711 7.5 3.75 7.5C3.04289 7.5 2.68934 7.5 2.46967 7.28033C2.25 7.06066 2.25 6.70711 2.25 6Z" fill="#FFBA1C"/>
<path d="M2.25 9.75C2.25 9.04289 2.25 8.68934 2.46967 8.46967C2.68934 8.25 3.04289 8.25 3.75 8.25C4.45711 8.25 4.81066 8.25 5.03033 8.46967C5.25 8.68934 5.25 9.04289 5.25 9.75C5.25 10.4571 5.25 10.8107 5.03033 11.0303C4.81066 11.25 4.45711 11.25 3.75 11.25C3.04289 11.25 2.68934 11.25 2.46967 11.0303C2.25 10.8107 2.25 10.4571 2.25 9.75Z" fill="#00A5F0"/>
<path d="M2.25 13.5C2.25 12.7929 2.25 12.4393 2.46967 12.2197C2.68934 12 3.04289 12 3.75 12C4.45711 12 4.81066 12 5.03033 12.2197C5.25 12.4393 5.25 12.7929 5.25 13.5C5.25 14.2071 5.25 14.5607 5.03033 14.7803C4.81066 15 4.45711 15 3.75 15C3.04289 15 2.68934 15 2.46967 14.7803C2.25 14.5607 2.25 14.2071 2.25 13.5Z" fill="#91D400"/>
<path d="M2.25 17.25C2.25 16.5429 2.25 16.1893 2.46967 15.9697C2.68934 15.75 3.04289 15.75 3.75 15.75C4.45711 15.75 4.81066 15.75 5.03033 15.9697C5.25 16.1893 5.25 16.5429 5.25 17.25C5.25 17.9571 5.25 18.3107 5.03033 18.5303C4.81066 18.75 4.45711 18.75 3.75 18.75C3.04289 18.75 2.68934 18.75 2.46967 18.5303C2.25 18.3107 2.25 17.9571 2.25 17.25Z" fill="#BD081C"/>
<defs>
<linearGradient id="paint0_linear_5786_64799" x1="12.8928" y1="24" x2="12.3104" y2="1.42975" gradientUnits="userSpaceOnUse">
<stop stop-color="#3D3D3D" stop-opacity="0.6"/>
<stop offset="0.235469" stop-color="#3D3D3D" stop-opacity="0.4"/>
<stop offset="0.581647" stop-color="#3D3D3D" stop-opacity="0.24"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,44 @@
/* Meta boxes */
#sharethis-meta-box .button-check-wrap {
display: block;
margin-bottom: .5rem;
}
#sharethis-meta-box .sharethis-shortcode {
background: #ffffff;
border: 1px solid #b4b9be;
width: 100%;
margin-right: 1rem;
}
#sharethis-meta-box .under-message {
font-style: italic;
color: #979797;
}
#sharethis-meta-box #sticky {
margin-bottom: 1rem;
}
/* Block styles */
.inline-share-button-block img {
max-width: 37px;
margin-right: 10px;
display: inline-block;
vertical-align: middle;
background-color: #a4d94a;
padding: 10px;
}
.inline-share-button-block {
font-size: 20px;
font-family: sans-serif;
border-bottom: 2px solid #93d227;
border-top: 2px solid #93d227;
padding: 10px;
color: #93d227;
text-align: center;
max-width: 400px;
margin: auto;
}

View File

@@ -0,0 +1 @@
/* Hide sticky buttons */

View File

@@ -0,0 +1,29 @@
<?php
/**
* Instantiates the ShareThis Share Buttons plugin
*
* @package ShareThisShareButtons
*/
namespace ShareThisShareButtons;
global $sharethis_share_buttons_plugin;
require_once __DIR__ . '/php/class-plugin-base.php';
require_once __DIR__ . '/php/class-plugin.php';
require_once __DIR__ . '/php/class-button-widget.php';
require_once __DIR__ . '/php/class-minute-control.php';
require_once __DIR__ . '/php/class-share-buttons.php';
$sharethis_share_buttons_plugin = new Plugin();
/**
* ShareThis Share Buttons Plugin Instance
*
* @return Plugin
*/
function get_plugin_instance() {
global $sharethis_share_buttons_plugin;
return $sharethis_share_buttons_plugin;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
// phpcs:ignoreFile
/* global wp:wp */
/**
* This section of code registers the sharethis share buttons blocks.
*/
const shareregisterBlockType = wp.blocks.registerBlockType;
const sharecreateElement = wp.element.createElement;
const shareicon = sharecreateElement('div', { style: {
background: `url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDE2IDE2IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0NC4xICg0MTQ1NSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+RmlsbCAzPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IkRlc2t0b3AtSEQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMC4wMDAwMDAsIC00MzguMDAwMDAwKSIgZmlsbD0iI0ZFRkVGRSI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMy4xNTE2NDMyLDQ0OS4xMDMwMTEgQzIyLjcyNjg4NzcsNDQ5LjEwMzAxMSAyMi4zMzM1MDYyLDQ0OS4yMjg5OSAyMS45OTcwODA2LDQ0OS40Mzc5ODkgQzIxLjk5NTE0OTksNDQ5LjQzNTA5MyAyMS45OTcwODA2LDQ0OS40Mzc5ODkgMjEuOTk3MDgwNiw0NDkuNDM3OTg5IEMyMS44ODA3NTU1LDQ0OS41MDg5NDMgMjEuNzM1NDY5OCw0NDkuNTQ1NjI2IDIxLjU4OTIxODgsNDQ5LjU0NTYyNiBDMjEuNDUzMTA0LDQ0OS41NDU2MjYgMjEuMzE5ODg1Miw0NDkuNTA3NDk0IDIxLjIwODg2OTYsNDQ5LjQ0NTIyOSBMMTQuODczNzM4Myw0NDYuMDM4OTggQzE0Ljc2NDE3MDcsNDQ1Ljk5MDIzIDE0LjY4NzkwNzgsNDQ1Ljg3ODczMSAxNC42ODc5MDc4LDQ0NS43NTEzMDUgQzE0LjY4NzkwNzgsNDQ1LjYyMzM5NSAxNC43NjUxMzYsNDQ1LjUxMTg5NyAxNC44NzQ3MDM2LDQ0NS40NjI2NjQgTDIxLjIwODg2OTYsNDQyLjA1Njg5NyBDMjEuMzE5ODg1Miw0NDEuOTk1MTE1IDIxLjQ1MzEwNCw0NDEuOTU2NTAxIDIxLjU4OTIxODgsNDQxLjk1NjUwMSBDMjEuNzM1NDY5OCw0NDEuOTU2NTAxIDIxLjg4MDc1NTUsNDQxLjk5MzY2NyAyMS45OTcwODA2LDQ0Mi4wNjQ2MiBDMjEuOTk3MDgwNiw0NDIuMDY0NjIgMjEuOTk1MTQ5OSw0NDIuMDY3MDM0IDIxLjk5NzA4MDYsNDQyLjA2NDYyIEMyMi4zMzM1MDYyLDQ0Mi4yNzMxMzcgMjIuNzI2ODg3Nyw0NDIuMzk5MTE1IDIzLjE1MTY0MzIsNDQyLjM5OTExNSBDMjQuMzY2NTQwMyw0NDIuMzk5MTE1IDI1LjM1MTY4MzQsNDQxLjQxNDQ1NSAyNS4zNTE2ODM0LDQ0MC4xOTk1NTggQzI1LjM1MTY4MzQsNDM4Ljk4NDY2IDI0LjM2NjU0MDMsNDM4IDIzLjE1MTY0MzIsNDM4IEMyMi4wMTYzODc2LDQzOCAyMS4wOTMwMjcyLDQzOC44NjMwMjYgMjAuOTc1MjU0MSw0MzkuOTY3MzkgQzIwLjk3MTM5MjYsNDM5Ljk2MzA0NiAyMC45NzUyNTQxLDQzOS45NjczOSAyMC45NzUyNTQxLDQzOS45NjczOSBDMjAuOTUwNjM3NSw0NDAuMjM5MTM3IDIwLjc2OTE1MTEsNDQwLjQ2NzkyNiAyMC41MzYwMTgzLDQ0MC41ODQyNTEgTDE0LjI3OTU2MzMsNDQzLjk0NzU0MiBDMTQuMTY0MjAzNiw0NDQuMDE3MDQ3IDE0LjAyNDIyNzMsNDQ0LjA1NjE0NCAxMy44Nzk0MjQzLDQ0NC4wNTYxNDQgQzEzLjcwODU1NjgsNDQ0LjA1NjE0NCAxMy41NDgzMDgxLDQ0NC4wMDQ0OTggMTMuNDIwODgxNSw0NDMuOTEwMzc2IEMxMy4wNzUyODUsNDQzLjY4NDk2NiAxMi42NjUwMDk4LDQ0My41NTEyNjQgMTIuMjIxOTEyNiw0NDMuNTUxMjY0IEMxMS4wMDcwMTU1LDQ0My41NTEyNjQgMTAuMDIyMzU1MSw0NDQuNTM2NDA3IDEwLjAyMjM1NTEsNDQ1Ljc1MTMwNSBDMTAuMDIyMzU1MSw0NDYuOTY2MjAyIDExLjAwNzAxNTUsNDQ3Ljk1MDg2MiAxMi4yMjE5MTI2LDQ0Ny45NTA4NjIgQzEyLjY2NTAwOTgsNDQ3Ljk1MDg2MiAxMy4wNzUyODUsNDQ3LjgxNzY0MyAxMy40MjA4ODE1LDQ0Ny41OTIyMzMgQzEzLjU0ODMwODEsNDQ3LjQ5NzYyOSAxMy43MDg1NTY4LDQ0Ny40NDY0NjUgMTMuODc5NDI0Myw0NDcuNDQ2NDY1IEMxNC4wMjQyMjczLDQ0Ny40NDY0NjUgMTQuMTY0MjAzNiw0NDcuNDg1MDc5IDE0LjI3OTU2MzMsNDQ3LjU1NDU4NSBMMjAuNTM2MDE4Myw0NTAuOTE4MzU4IEMyMC43Njg2Njg0LDQ1MS4wMzQyMDEgMjAuOTUwNjM3NSw0NTEuMjYzNDcyIDIwLjk3NTI1NDEsNDUxLjUzNTIxOSBDMjAuOTc1MjU0MSw0NTEuNTM1MjE5IDIwLjk3MTM5MjYsNDUxLjUzOTU2MyAyMC45NzUyNTQxLDQ1MS41MzUyMTkgQzIxLjA5MzAyNzIsNDUyLjYzOTEwMSAyMi4wMTYzODc2LDQ1My41MDI2MDkgMjMuMTUxNjQzMiw0NTMuNTAyNjA5IEMyNC4zNjY1NDAzLDQ1My41MDI2MDkgMjUuMzUxNjgzNCw0NTIuNTE3NDY2IDI1LjM1MTY4MzQsNDUxLjMwMjU2OSBDMjUuMzUxNjgzNCw0NTAuMDg3NjcyIDI0LjM2NjU0MDMsNDQ5LjEwMzAxMSAyMy4xNTE2NDMyLDQ0OS4xMDMwMTEiIGlkPSJGaWxsLTMiPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==")`,
width: '24px',
height: '24px',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
backgroundColor: '#93d227'
} } );
/**
* Share Buttons Block
*/
shareregisterBlockType('st/sharebuttons', {
title: 'Inline Share Buttons',
icon: shareicon,
category: 'st-blocks',
edit() {
return (
sharecreateElement(
'div',
{className:'inline-share-button-block'},
sharecreateElement(
'img',
{src:'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDE2IDE2IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0NC4xICg0MTQ1NSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+RmlsbCAzPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IkRlc2t0b3AtSEQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMC4wMDAwMDAsIC00MzguMDAwMDAwKSIgZmlsbD0iI0ZFRkVGRSI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMy4xNTE2NDMyLDQ0OS4xMDMwMTEgQzIyLjcyNjg4NzcsNDQ5LjEwMzAxMSAyMi4zMzM1MDYyLDQ0OS4yMjg5OSAyMS45OTcwODA2LDQ0OS40Mzc5ODkgQzIxLjk5NTE0OTksNDQ5LjQzNTA5MyAyMS45OTcwODA2LDQ0OS40Mzc5ODkgMjEuOTk3MDgwNiw0NDkuNDM3OTg5IEMyMS44ODA3NTU1LDQ0OS41MDg5NDMgMjEuNzM1NDY5OCw0NDkuNTQ1NjI2IDIxLjU4OTIxODgsNDQ5LjU0NTYyNiBDMjEuNDUzMTA0LDQ0OS41NDU2MjYgMjEuMzE5ODg1Miw0NDkuNTA3NDk0IDIxLjIwODg2OTYsNDQ5LjQ0NTIyOSBMMTQuODczNzM4Myw0NDYuMDM4OTggQzE0Ljc2NDE3MDcsNDQ1Ljk5MDIzIDE0LjY4NzkwNzgsNDQ1Ljg3ODczMSAxNC42ODc5MDc4LDQ0NS43NTEzMDUgQzE0LjY4NzkwNzgsNDQ1LjYyMzM5NSAxNC43NjUxMzYsNDQ1LjUxMTg5NyAxNC44NzQ3MDM2LDQ0NS40NjI2NjQgTDIxLjIwODg2OTYsNDQyLjA1Njg5NyBDMjEuMzE5ODg1Miw0NDEuOTk1MTE1IDIxLjQ1MzEwNCw0NDEuOTU2NTAxIDIxLjU4OTIxODgsNDQxLjk1NjUwMSBDMjEuNzM1NDY5OCw0NDEuOTU2NTAxIDIxLjg4MDc1NTUsNDQxLjk5MzY2NyAyMS45OTcwODA2LDQ0Mi4wNjQ2MiBDMjEuOTk3MDgwNiw0NDIuMDY0NjIgMjEuOTk1MTQ5OSw0NDIuMDY3MDM0IDIxLjk5NzA4MDYsNDQyLjA2NDYyIEMyMi4zMzM1MDYyLDQ0Mi4yNzMxMzcgMjIuNzI2ODg3Nyw0NDIuMzk5MTE1IDIzLjE1MTY0MzIsNDQyLjM5OTExNSBDMjQuMzY2NTQwMyw0NDIuMzk5MTE1IDI1LjM1MTY4MzQsNDQxLjQxNDQ1NSAyNS4zNTE2ODM0LDQ0MC4xOTk1NTggQzI1LjM1MTY4MzQsNDM4Ljk4NDY2IDI0LjM2NjU0MDMsNDM4IDIzLjE1MTY0MzIsNDM4IEMyMi4wMTYzODc2LDQzOCAyMS4wOTMwMjcyLDQzOC44NjMwMjYgMjAuOTc1MjU0MSw0MzkuOTY3MzkgQzIwLjk3MTM5MjYsNDM5Ljk2MzA0NiAyMC45NzUyNTQxLDQzOS45NjczOSAyMC45NzUyNTQxLDQzOS45NjczOSBDMjAuOTUwNjM3NSw0NDAuMjM5MTM3IDIwLjc2OTE1MTEsNDQwLjQ2NzkyNiAyMC41MzYwMTgzLDQ0MC41ODQyNTEgTDE0LjI3OTU2MzMsNDQzLjk0NzU0MiBDMTQuMTY0MjAzNiw0NDQuMDE3MDQ3IDE0LjAyNDIyNzMsNDQ0LjA1NjE0NCAxMy44Nzk0MjQzLDQ0NC4wNTYxNDQgQzEzLjcwODU1NjgsNDQ0LjA1NjE0NCAxMy41NDgzMDgxLDQ0NC4wMDQ0OTggMTMuNDIwODgxNSw0NDMuOTEwMzc2IEMxMy4wNzUyODUsNDQzLjY4NDk2NiAxMi42NjUwMDk4LDQ0My41NTEyNjQgMTIuMjIxOTEyNiw0NDMuNTUxMjY0IEMxMS4wMDcwMTU1LDQ0My41NTEyNjQgMTAuMDIyMzU1MSw0NDQuNTM2NDA3IDEwLjAyMjM1NTEsNDQ1Ljc1MTMwNSBDMTAuMDIyMzU1MSw0NDYuOTY2MjAyIDExLjAwNzAxNTUsNDQ3Ljk1MDg2MiAxMi4yMjE5MTI2LDQ0Ny45NTA4NjIgQzEyLjY2NTAwOTgsNDQ3Ljk1MDg2MiAxMy4wNzUyODUsNDQ3LjgxNzY0MyAxMy40MjA4ODE1LDQ0Ny41OTIyMzMgQzEzLjU0ODMwODEsNDQ3LjQ5NzYyOSAxMy43MDg1NTY4LDQ0Ny40NDY0NjUgMTMuODc5NDI0Myw0NDcuNDQ2NDY1IEMxNC4wMjQyMjczLDQ0Ny40NDY0NjUgMTQuMTY0MjAzNiw0NDcuNDg1MDc5IDE0LjI3OTU2MzMsNDQ3LjU1NDU4NSBMMjAuNTM2MDE4Myw0NTAuOTE4MzU4IEMyMC43Njg2Njg0LDQ1MS4wMzQyMDEgMjAuOTUwNjM3NSw0NTEuMjYzNDcyIDIwLjk3NTI1NDEsNDUxLjUzNTIxOSBDMjAuOTc1MjU0MSw0NTEuNTM1MjE5IDIwLjk3MTM5MjYsNDUxLjUzOTU2MyAyMC45NzUyNTQxLDQ1MS41MzUyMTkgQzIxLjA5MzAyNzIsNDUyLjYzOTEwMSAyMi4wMTYzODc2LDQ1My41MDI2MDkgMjMuMTUxNjQzMiw0NTMuNTAyNjA5IEMyNC4zNjY1NDAzLDQ1My41MDI2MDkgMjUuMzUxNjgzNCw0NTIuNTE3NDY2IDI1LjM1MTY4MzQsNDUxLjMwMjU2OSBDMjUuMzUxNjgzNCw0NTAuMDg3NjcyIDI0LjM2NjU0MDMsNDQ5LjEwMzAxMSAyMy4xNTE2NDMyLDQ0OS4xMDMwMTEiIGlkPSJGaWxsLTMiPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=='}
),
'Share Buttons Display Here'
)
);
},
save() {
return (
'[sharethis-inline-buttons]'
);
}
});

View File

@@ -0,0 +1,86 @@
/**
* Minute Control.
*
* @package ShareThisShareButtons
*/
/* exported MinuteControl */
var MinuteControl = ( function( $, wp ) {
'use strict';
return {
/**
* Holds data.
*/
data: {},
/**
* Boot plugin.
*
* @param data
*/
boot: function( data ) {
this.data = data;
$( document ).ready(
function() {
this.init();
}.bind( this )
);
},
/**
* Initialize plugin.
*/
init: function() {
this.$container = $( '#sharethis-meta-box' );
this.listen();
},
/**
* Initiate listeners.
*/
listen: function() {
var self = this;
// When checking an option in the meta box.
this.$container.on(
'click',
'#sharethis-bottom-post, #sharethis-top-post, #sharethis-sticky-show',
function() {
var checked = $( this ).prop( 'checked' ),
type = $( this ).closest( '.button-setting-wrap' ).attr( 'id' ),
placement = $( this ).attr( 'class' );
self.updateList( type, checked, placement );
}
);
},
/**
* Add / remove post to list.
*
* @param type
* @param checked
* @param placement
*/
updateList: function( type, checked, placement ) {
// Update specifide list per checked.
wp.ajax.post(
'update_list',
{
postid: this.data.postid,
type: type,
checked: checked,
placement: placement,
nonce: this.data.nonce
}
).always(
function() {
}
);
}
};
} )( window.jQuery, window.wp );

View File

@@ -0,0 +1,312 @@
/**
* Credentials
*
* @package ShareThisShareButtons
*/
/* exported Credentials */
var Credentials = ( function( $, wp ) {
'use strict';
return {
/**
* Holds data.
*/
data: {},
/**
* Boot plugin.
*
* @param data
*/
boot: function( data ) {
this.data = data;
$( document ).ready(
function() {
this.init();
}.bind( this )
);
},
/**
* Initialize plugin.
*/
init: function() {
const self = this;
// Set default WP config.
wp.ajax.post(
'set_default_settings',
{
type: 'both',
nonce: self.data.nonce
}
).always(
function( link ) {
self.registerAccount( self.data.email, Math.random() + '1_stsb_PW!' );
}.bind( self )
);
},
/**
* Send hash data to credential setting.
*
* @param secret
* @param propertyid
* @param token
* @param type
*/
setCredentials: function( secret, propertyid, token, type ) {
var propSecret = propertyid + '-' + secret;
const self = this;
// If hash exists send it to credential setting.
wp.ajax.post(
'set_credentials',
{
data: propSecret,
token: token,
nonce: this.data.nonce
}
).always(
function( link ) {
// Set default product configs.
const iconfig = {
alignment: 'center',
color: 'social',
enabled: false,
font_size: 11,
labels: 'cta',
min_count: 10,
padding: 8,
radius: 4,
networks: ['facebook', 'twitter', 'email', 'sms', 'sharethis'],
show_total: true,
size: 32,
spacing: 8,
language: 'en',
};
const sconfig = {
alignment: 'left',
color: 'social',
enabled: false,
labels: 'cta',
min_count: 10,
radius: 4,
networks: ['facebook', 'twitter', 'email', 'sms', 'sharethis'],
top: 200,
show_mobile: true,
show_total: true,
show_desktop: true,
show_mobile_buttons: true,
mobile_breakpoint: 1024,
spacing: 0,
language: 'en'
}
const gconfig = {
color: '#2e7d32',
display: 'always',
enabled: false,
language: 'en',
publisher_name: '',
publisher_purposes: [],
scope: 'global'
}
let theiData = {
'token' : token,
'id': propertyid,
'product': 'inline-share-buttons',
'config': iconfig
};
theiData = JSON.stringify( theiData );
// Send new button status value.
$.ajax(
{
url: 'https://platform-api.sharethis.com/v1.0/property/product',
method: 'POST',
async: false,
contentType: 'application/json; charset=utf-8',
data: theiData,
success: function () {
wp.ajax.post(
'set_button_config',
{
button: 'inline',
config: iconfig,
first: true,
nonce: self.data.nonce
}
).always(
function ( results ) {
let thesData = {
'token' : token,
'id': propertyid,
'product': 'sticky-share-buttons',
'config': sconfig
};
thesData = JSON.stringify( thesData );
// Send new button status value.
$.ajax(
{
url: 'https://platform-api.sharethis.com/v1.0/property/product',
method: 'POST',
async: false,
contentType: 'application/json; charset=utf-8',
data: thesData,
success: function () {
wp.ajax.post(
'set_button_config',
{
button: 'sticky',
config: sconfig,
nonce: self.data.nonce
}
).always(
function ( results ) {
let thegData = {
'token' : token,
'id': propertyid,
'product': 'gdpr-compliance-tool-v2',
'config': gconfig
};
thegData = JSON.stringify( thegData );
// Send new button status value.
$.ajax(
{
url: 'https://platform-api.sharethis.com/v1.0/property/product',
method: 'POST',
async: false,
contentType: 'application/json; charset=utf-8',
data: thegData,
success: function () {
wp.ajax.post(
'set_button_config',
{
button: 'gdpr',
config: gconfig,
nonce: self.data.nonce
}
).always(
function ( results ) {
window.location.reload();
}
);
}
}
);
}
);
}
}
);
}
);
}
}
);
}.bind( this )
);
},
/**
* Register new account.
*
* @param email
* @param pw
*/
registerAccount: function( email, pw ) {
var result = null,
self = this,
url = this.data.url,
randomNumber = Math.floor(
(
Math.random() * 10000000000000000
) + 1
),
randomNumber2 = Math.floor(
(
Math.random() * 10000000000000000
) + 1
),
theData = JSON.stringify(
{
email: randomNumber + '@' + randomNumber2 + '.com',
password: pw,
custom: {
onboarding_product: 'inline-share-buttons',
onboarding_domain: url,
is_wordpress: true,
wordpress_email: email,
}
}
);
$.ajax(
{
url: 'https://sso.sharethis.com/register',
method: 'POST',
async: false,
contentType: 'application/json; charset=utf-8',
data: theData,
success: function( results ) {
result = results;
// Create property.
self.createProperty( result, url, '' );
},
}
);
},
/**
* Create property for new account.
*
* @param accountInfo
* @param url
*/
createProperty: function( accountInfo, url, type ) {
var result = null,
self = this,
token = accountInfo.token,
theData;
if ( 'string' === typeof accountInfo ) {
token = accountInfo;
}
theData = JSON.stringify(
{
token: token,
product: 'inline-share-buttons',
domain: url,
is_wordpress: true
}
);
$.ajax(
{
url: 'https://platform-api.sharethis.com/v1.0/property',
method: 'POST',
async: false,
contentType: 'application/json; charset=utf-8',
data: theData,
success: function( results ) {
result = results;
self.setCredentials( result.secret, result._id, token, type );
}
}
);
}
};
} )( window.jQuery, window.wp );

View File

@@ -0,0 +1,87 @@
<?php
/**
* Button Widget.
*
* @package ShareThisShareButtons
*/
namespace ShareThisShareButtons;
/**
* Cart Widget Class
*
* @package ShareThisShareButtons
*/
class Button_Widget extends \WP_Widget {
/**
* Plugin instance.
*
* @var object
*/
public $plugin;
/**
* Class constructor.
*
* @param object $plugin Plugin class.
*/
public function __construct( $plugin ) {
$this->plugin = $plugin;
$widget_options = array(
'classname' => 'st_button_widget',
'description' => esc_html__( 'Add ShareThis share buttons to your sidebar.', 'sharethis-share-buttons' ),
);
parent::__construct(
'st_button_widget',
'ShareThis Buttons',
$widget_options
);
}
/**
* Create the widget output.
*
* @param array $args Widget output arguments.
* @param array $instance The widget instance.
*/
public function widget( $args, $instance ) {
global $post;
$data_url = '';
if ( is_archive() || is_front_page() || is_tag() ) {
$data_url = 'data-url=' . get_permalink( $post->ID );
}
// Add buttons.
?>
<div class="sharethis-inline-share-buttons" <?php echo esc_attr( $data_url ); ?>></div>
<?php
}
/**
* The widget form.
*
* @param array $instance The current widget instance.
*/
public function form( $instance ) {
return '';
}
/**
* Update database with new info
*
* @param array $new_instance The new instance of the widget values.
* @param array $old_instance The old instance of the widget values.
*
* @return array
*/
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
return $instance;
}
}

View File

@@ -0,0 +1,518 @@
<?php
/**
* Minute Control.
*
* @package ShareThisShareButtons
*/
namespace ShareThisShareButtons;
/**
* Minute Control Class
*
* @package ShareThisShareButtons
*/
class Minute_Control {
/**
* Plugin instance.
*
* @var object
*/
public $plugin;
/**
* Class constructor.
*
* @param object $plugin Plugin class.
*/
public function __construct( $plugin ) {
$this->plugin = $plugin;
}
/**
* Register the new share buttons metabox.
*
* @action add_meta_boxes
*/
public function share_buttons_metabox() {
// Get all post types available.
$post_types = array( 'post', 'page' );
// Add the Share Buttons meta box to editor pages.
add_meta_box( 'sharethis_share_buttons', esc_html__( 'Share Buttons', 'sharethis-share-buttons' ), array( $this, 'share_buttons_custom_box' ), $post_types, 'side', 'high' );
}
/**
* Enqueue admin assets.
*
* @action admin_enqueue_scripts
* @param string $hook The page hook name.
*/
public function enqueue_admin_assets( $hook ) {
global $post;
// Enqueue the assets on editor pages.
if ( in_array( $hook, array( 'post.php', 'post-new.php' ), true ) ) {
wp_enqueue_style( "{$this->plugin->assets_prefix}-meta-box" );
wp_enqueue_script( "{$this->plugin->assets_prefix}-meta-box" );
wp_add_inline_script(
"{$this->plugin->assets_prefix}-meta-box",
sprintf(
'MinuteControl.boot( %s );',
wp_json_encode(
array(
'postid' => $post->ID,
'nonce' => wp_create_nonce( $this->plugin->meta_prefix ),
)
)
)
);
}
}
/**
* Call back function for the share buttons metabox.
*/
public function share_buttons_custom_box() {
global $post_type;
switch ( $post_type ) {
case 'post':
$iptype = 'post_';
$sptype = 'posts';
break;
case 'page':
$iptype = 'page_';
$sptype = 'pages';
break;
default:
$iptype = 'post_';
$sptype = 'posts';
break;
}
// Get all needed options for meta boxes.
$inline_options = get_option( 'sharethis_inline_settings' );
$sticky_options = get_option( 'sharethis_sticky_settings' );
$inline_enable = get_option( 'sharethis_inline' );
$sticky_enable = get_option( 'sharethis_sticky' );
// Include the meta box template.
include_once "{$this->plugin->dir_path}/templates/minute-control/meta-box.php";
}
/**
* AJAX Call back function to add a post / page to ommit / show list.
*
* @action wp_ajax_update_list
*/
public function update_list() {
check_ajax_referer( $this->plugin->meta_prefix, 'nonce' );
if ( ! isset( $_POST['type'], $_POST['checked'], $_POST['placement'], $_POST['postid'] ) || '' === $_POST['type'] ) { // WPCS: input var okay.
wp_send_json_error( 'Add to list failed.' );
}
// Set and sanitize post values.
$type = sanitize_text_field( wp_unslash( $_POST['type'] ) ); // WPCS: input var okay.
$onoff = 'true' === sanitize_text_field( wp_unslash( $_POST['checked'] ) ) ? 'on' : 'off'; // WPCS: input var okay.
$opposite = 'true' === sanitize_text_field( wp_unslash( $_POST['checked'] ) ) ? 'off' : 'on'; // WPCS: input var okay.
$placement = '' !== sanitize_text_field( wp_unslash( $_POST['placement'] ) ) ? '_' . sanitize_text_field( wp_unslash( $_POST['placement'] ) ) : ''; // WPCS: input var okay.
$postid = intval( wp_unslash( $_POST['postid'] ) ); // WPCS: input var okay.
// Create remaining variables needed for list placement.
$post_info = get_post( $postid );
$post_type = $post_info->post_type;
$option = 'sharethis_' . $type . '_' . $post_type . $placement . '_' . $onoff;
$oppose = 'sharethis_' . $type . '_' . $post_type . $placement . '_' . $opposite;
$title = $post_info->post_title;
// Get current list and opposing list options.
$current_list = get_option( $option );
$current_oppose = get_option( $oppose );
$current_list = isset( $current_list ) && null !== $current_list && false !== $current_list ? $current_list : '';
$current_oppose = isset( $current_oppose ) && null !== $current_oppose && false !== $current_oppose ? $current_oppose : '';
// Add post id and title to current list.
if ( is_array( $current_list ) && array() !== $current_list ) {
$current_list[ $title ] = (int) $postid;
} else {
$current_list = array(
$title => (int) $postid,
);
}
// Remove item from opposing list.
if ( is_array( $current_oppose ) && array() !== $current_oppose && in_array( (int) $postid, array_map( 'intval', $current_oppose ), true ) ) {
unset( $current_oppose[ $title ] );
delete_option( $oppose );
}
// Update both list options.
update_option( $option, $current_list );
update_option( $oppose, $current_oppose );
}
/**
* Helper function to determine whether to check box or not.
*
* @param string $type The type of button.
* @param string $placement The position of the button in question.
*/
private function is_box_checked( $type, $placement = '' ) {
global $post, $post_type;
$options = array(
'true' => 'sharethis_' . $type . '_' . $post_type . $placement . '_on',
'false' => 'sharethis_' . $type . '_' . $post_type . $placement . '_off',
);
$default_option = get_option( 'sharethis_' . $type . '_settings' );
$default_option = isset( $default_option ) && null !== $default_option && false !== $default_option ? $default_option : '';
$default = $default_option[ "sharethis_{$type}_{$post_type}{$placement}" ];
foreach ( $options as $answer => $option ) {
$current_list = get_option( $option );
$current_list = isset( $current_list ) && null !== $current_list && false !== $current_list ? $current_list : '';
$answer_minute = (
is_array( $current_list )
&&
in_array( (int) $post->ID, array_map( 'intval', $current_list ), true )
);
if ( $answer_minute ) {
return $answer;
}
}
return $default;
}
/**
* Register the inline share button shortcode
*
* @shortcode sharethis-inline-buttons
* @param array $atts The shortcode attributes.
*
* @return string
*/
public function inline_shortcode( $atts ) {
global $post;
$data_url = isset( $atts['url'] ) ? esc_attr( 'data-url="' . $atts['url'] . '"' ) : '';
if ( is_archive() || is_front_page() || is_tag() ) {
$data_url = esc_attr( 'data-url=' . get_permalink( $post->ID ) );
}
// Build container.
return '<div class="sharethis-inline-share-buttons" ' . $data_url . '></div>';
}
/**
* Set inline container based on plugin config.
*
* @param string $content The post's content.
*
* @filter the_content
*
* @return string
*/
public function set_inline_content( $content ) {
global $post;
// Get inline settings.
$inline_settings = get_option( 'sharethis_inline_settings' );
$excerpt = null !== $inline_settings && false !== $inline_settings && 'true' === $inline_settings['sharethis_excerpt'] ? true : false;
if ( $excerpt && is_archive() || $excerpt && is_home() ) {
return $content . $this->get_inline_container( $inline_settings, 'sharethis_excerpt', $post );
}
if ( null !== $inline_settings && false !== $inline_settings && is_array( $inline_settings ) ) {
foreach ( $inline_settings as $type => $value ) {
$position = $this->get_position( $type, $value );
$container = $this->get_inline_container( $inline_settings, $type );
if ( '' !== $position ) {
switch ( $position ) {
case 'top':
$content = $container . $content;
break;
case 'bottom':
$content = $content . $container;
break;
}
}
}
}
return $content;
}
/**
* Helper function to determine the inline button container.
*
* @param array $settings The current inline settings.
* @param string $type The type of button setting.
* @param object $post The current post object.
*
* @return string
*/
private function get_inline_container( $settings, $type, $post = '' ) {
$data_url = 'sharethis_excerpt' === $type && '' !== $post ? esc_attr( 'data-url=' . get_permalink( $post->ID ) ) : '';
$margin_t = isset( $settings[ "{$type}_margin_top" ] ) ? $settings[ "{$type}_margin_top" ] . 'px' : '';
$margin_b = isset( $settings[ "{$type}_margin_bottom" ] ) ? $settings[ "{$type}_margin_bottom" ] . 'px' : '';
$margin = '';
if ( ! in_array( '', array( $margin_t, $margin_b ), true ) ) {
$margin = 'margin-top: ' . $margin_t . '; margin-bottom: ' . $margin_b . ';';
}
return '<div style="' . esc_attr( $margin ) . '" class="sharethis-inline-share-buttons" ' . $data_url . '></div>';
}
/**
* Hide sticky if configured.
*
* @action wp_enqueue_scripts
*/
public function set_sticky_visibility() {
// Enqueue the blank style sheet.
wp_enqueue_style( "{$this->plugin->assets_prefix}-sticky" );
// Get sticky settings.
$settings = get_option( 'sharethis_sticky_settings' );
$settings = null !== $settings && false !== $settings && is_array( $settings ) ? $settings : array();
$hide_sticky = '.st-sticky-share-buttons{ display: none!important; }';
// Get hide status.
foreach ( $settings as $type => $value ) {
$hide = $this->get_hide_status( $type, $value );
if ( $hide ) {
wp_add_inline_style( "{$this->plugin->assets_prefix}-sticky", $hide_sticky );
}
}
}
/**
* Helper function to get the hide status for sticky buttons.
*
* @param string $type The button setting.
* @param string $value The setting value.
*
* @return bool
*/
private function get_hide_status( $type, $value ) {
global $post;
if ( ! isset( $post->ID ) ) {
return false;
}
// The non post id dependant types.
$alternate_types = array( 'sharethis_sticky_home', 'sharethis_sticky_category', 'sharethis_sticky_tags', 'sharethis_sticky_author', 'sharethis_sticky_custom_posts' );
$alternate_pages = (
! is_front_page()
&&
! is_archive()
&&
! is_author()
&&
! is_tag()
);
if ( in_array( $type, $alternate_types, true ) ) {
return $this->get_alternate_hide( $type, $value );
}
$page_option_on = get_option( $type . '_on' );
$page_option_off = get_option( $type . '_off' );
if ( ! is_array( $page_option_off ) &&
! is_array( $page_option_on ) &&
'false' === $value &&
$alternate_pages &&
in_array( $post->post_type, explode( '_', $type ), true )
) {
$hide = true;
} elseif ( isset( $post->ID ) ) {
$hide = (
is_array( $page_option_on )
&&
'false' === $value
&&
! in_array( (int) $post->ID, array_map( 'intval', $page_option_on ), true )
&&
$alternate_pages
&&
in_array( $post->post_type, explode( '_', $type ), true )
||
is_array( $page_option_off )
&&
in_array( (int) $post->ID, array_map( 'intval', $page_option_off ), true )
&&
$alternate_pages
&&
in_array( $post->post_type, explode( '_', $type ), true )
);
}
return $hide;
}
/**
* Get the hide values for the non post or page types.
*
* @param string $type The setting type.
* @param string $value The value of the option.
*
* @return bool
*/
private function get_alternate_hide( $type, $value ) {
$value = 'true' === $value ? false : true;
switch ( $type ) {
case 'sharethis_sticky_home':
if ( is_front_page() ) {
return $value;
}
break;
case 'sharethis_sticky_category':
$current_cats = get_option( 'sharethis_sticky_category_off' );
$current_cats = is_array( $current_cats ) ? $current_cats : array();
$queried_object = get_queried_object();
if ( true === is_archive()
&& true === is_object( $queried_object )
&& true === property_exists( $queried_object, 'term_id' )
) {
if ( false === in_array( (string) $queried_object->term_id, array_values( $current_cats ), true ) ) {
return $value;
} else {
return true;
}
}
break;
case 'sharethis_sticky_author':
if ( is_author() ) {
return $value;
}
break;
case 'sharethis_sticky_tags':
if ( is_tag() ) {
return $value;
}
break;
case 'sharethis_sticky_custom_posts':
if ( ! is_singular( array( 'post', 'page' ) ) ) {
return $value;
}
break;
}
return false;
}
/**
* Set inline container based on plugin config.
*
* @param string $excerpt The excerpt of the post.
*
* @filter get_the_excerpt
*
* @return string
*/
public function set_inline_excerpt( $excerpt ) {
global $post;
if ( is_admin() && ! wp_doing_ajax() ) {
return;
}
// Get inline settings.
$inline_settings = get_option( 'sharethis_inline_settings' );
$container = $this->get_inline_container( $inline_settings, 'sharethis_excerpt', $post );
if ( null === $inline_settings || false === $inline_settings || ! is_array( $inline_settings ) ) {
return $excerpt;
}
$excerpt = isset( $inline_settings['sharethis_excerpt'] ) && 'true' === $inline_settings['sharethis_excerpt'] ? $excerpt . $container : $excerpt;
return $excerpt;
}
/**
* Determine the position of the inline buttons.
*
* @param string $type The button type.
* @param string $value The value of the button.
*
* @return string
*/
private function get_position( $type, $value ) {
global $post;
if ( ! isset( $post->ID ) ) {
return;
}
$page_option_on = get_option( $type . '_on' );
$page_option_off = get_option( $type . '_off' );
$page_option_on = is_array( $page_option_on ) ? array_values( $page_option_on ) : array();
$page_option_off = is_array( $page_option_off ) ? array_values( $page_option_off ) : array();
$type_array = explode( '_', $type );
$position = '';
$show = (
'true' === $value
&&
! in_array( (int) $post->ID, $page_option_off, true )
||
in_array( (int) $post->ID, $page_option_on, true ) );
if ( in_array( 'top', $type_array, true ) && in_array( $post->post_type, $type_array, true ) ) {
$position = 'top';
} elseif ( in_array( 'bottom', explode( '_', $type ), true ) && in_array( $post->post_type, $type_array, true ) ) {
$position = 'bottom';
}
if ( $show ) {
return $position;
}
return '';
}
/**
* Enqueue the custom gutenberg block script.
*
* @action enqueue_block_editor_assets
*/
public function enqueue_custom_blocks() {
wp_enqueue_script( "{$this->plugin->assets_prefix}-blocks", "{$this->plugin->dir_url}js/blocks.js", array( 'wp-blocks', 'wp-editor', 'wp-element', 'wp-components' ), time(), true );
}
/**
* Register new block category for share buttons.
*
* @param array $categories The current block categories.
* @param \WP_Post $post Post object.
*
* @filter block_categories_all
*/
public function st_block_category( $categories, $post ) {
return array_merge(
$categories,
array(
array(
'slug' => 'st-blocks',
'title' => __( 'ShareThis Blocks', 'sharethis-share-buttons' ),
),
)
);
}
}

View File

@@ -0,0 +1,288 @@
<?php
/**
* Class Plugin_Base
*
* @package ShareThisShareButtons
*/
namespace ShareThisShareButtons;
/**
* Class Plugin_Base
*
* @package ShareThisShareButtons
*/
abstract class Plugin_Base {
/**
* Plugin config.
*
* @var array
*/
public $config = array();
/**
* Plugin slug.
*
* @var string
*/
public $slug;
/**
* Plugin directory path.
*
* @var string
*/
public $dir_path;
/**
* Plugin directory URL.
*
* @var string
*/
public $dir_url;
/**
* Directory in plugin containing autoloaded classes.
*
* @var string
*/
protected $autoload_class_dir = 'php';
/**
* Autoload matches cache.
*
* @var array
*/
protected $autoload_matches_cache = array();
/**
* Required instead of a static variable inside the add_doc_hooks method
* for the sake of unit testing.
*
* @var array
*/
protected $called_doc_hooks = array();
/**
* Plugin_Base constructor.
*/
public function __construct() {
$location = $this->locate_plugin();
$this->slug = $location['dir_basename'];
$this->dir_path = $location['dir_path'];
$this->dir_url = $location['dir_url'];
spl_autoload_register( array( $this, 'autoload' ) );
$this->add_doc_hooks();
}
/**
* Plugin_Base destructor.
*/
public function __destruct() {
$this->remove_doc_hooks();
}
/**
* Get reflection object for this class.
*
* @return \ReflectionObject
*/
public function get_object_reflection() {
static $reflection;
if ( empty( $reflection ) ) {
$reflection = new \ReflectionObject( $this );
}
return $reflection;
}
/**
* Autoload for classes that are in the same namespace as $this.
*
* @param string $class Class name.
* @return void
*/
public function autoload( $class ) {
if ( ! isset( $this->autoload_matches_cache[ $class ] ) ) {
if ( ! preg_match( '/^(?P<namespace>.+)\\\\(?P<class>[^\\\\]+)$/', $class, $matches ) ) {
$matches = false;
}
$this->autoload_matches_cache[ $class ] = $matches;
} else {
$matches = $this->autoload_matches_cache[ $class ];
}
if ( empty( $matches ) ) {
return;
}
if ( $this->get_object_reflection()->getNamespaceName() !== $matches['namespace'] ) {
return;
}
$class_name = $matches['class'];
$class_path = \trailingslashit( $this->dir_path );
if ( $this->autoload_class_dir ) {
$class_path .= \trailingslashit( $this->autoload_class_dir );
}
$class_path .= sprintf( 'class-%s.php', strtolower( str_replace( '_', '-', $class_name ) ) );
if ( is_readable( $class_path ) ) {
require_once $class_path;
}
}
/**
* Version of plugin_dir_url() which works for plugins installed in the plugins directory,
* and for plugins bundled with themes.
*
* @return array
*/
public function locate_plugin() {
$dir_url = trailingslashit( substr( plugins_url( '', __FILE__ ), 0, - 4 ) );
$dir_path = trailingslashit( substr( __DIR__, 0, - 4 ) );
$dir_basename = basename( $dir_path );
return compact( 'dir_url', 'dir_path', 'dir_basename' );
}
/**
* Hooks a function on to a specific filter.
*
* @param string $name The hook name.
* @param array $callback The class object and method.
* @param array $args An array with priority and arg_count.
*
* @return mixed
*/
public function add_filter( $name, $callback, $args = array() ) {
// Merge defaults.
$args = array_merge(
array(
'priority' => 10,
'arg_count' => PHP_INT_MAX,
),
$args
);
return $this->add_hook( 'filter', $name, $callback, $args );
}
/**
* Hooks a function on to a specific action.
*
* @param string $name The hook name.
* @param array $callback The class object and method.
* @param array $args An array with priority and arg_count.
*
* @return mixed
*/
public function add_action( $name, $callback, $args = array() ) {
// Merge defaults.
$args = array_merge(
array(
'priority' => 1,
'arg_count' => PHP_INT_MAX,
),
$args
);
return $this->add_hook( 'action', $name, $callback, $args );
}
/**
* Hooks a function on to a specific shortcode.
*
* @param string $name The shortcode name.
* @param array $callback The class object and method.
*
* @return mixed
*/
public function add_shortcode( $name, $callback ) {
return $this->add_hook( 'shortcode', $name, $callback );
}
/**
* Hooks a function on to a specific action/filter.
*
* @param string $type The hook type. Options are action/filter.
* @param string $name The hook name.
* @param array $callback The class object and method.
* @param array $args An array with priority and arg_count.
*
* @return mixed
*/
protected function add_hook( $type, $name, $callback, $args = array() ) {
$priority = isset( $args['priority'] ) ? $args['priority'] : 10;
$arg_count = isset( $args['arg_count'] ) ? $args['arg_count'] : PHP_INT_MAX;
$fn = sprintf( '\add_%s', $type );
$retval = \call_user_func( $fn, $name, $callback, $priority, $arg_count );
return $retval;
}
/**
* Add actions/filters/shortcodes from the methods of a class based on DocBlocks.
*
* @param object $object The class object.
*/
public function add_doc_hooks( $object = null ) {
if ( is_null( $object ) ) {
$object = $this;
}
$class_name = get_class( $object );
if ( isset( $this->called_doc_hooks[ $class_name ] ) ) {
$notice = sprintf( 'The add_doc_hooks method was already called on %s. Note that the Plugin_Base constructor automatically calls this method.', $class_name );
// @codingStandardsIgnoreStart
trigger_error( esc_html( $notice ), \E_USER_NOTICE );
// @codingStandardsIgnoreEnd
return;
}
$this->called_doc_hooks[ $class_name ] = true;
$reflector = new \ReflectionObject( $object );
foreach ( $reflector->getMethods() as $method ) {
$doc = $method->getDocComment();
$arg_count = $method->getNumberOfParameters();
if ( preg_match_all( '#\* @(?P<type>filter|action|shortcode)\s+(?P<name>[a-z0-9\-\._]+)(?:,\s+(?P<priority>\d+))?#', $doc, $matches, PREG_SET_ORDER ) ) {
foreach ( $matches as $match ) {
$type = $match['type'];
$name = $match['name'];
$priority = empty( $match['priority'] ) ? 10 : intval( $match['priority'] );
$callback = array( $object, $method->getName() );
call_user_func( array( $this, "add_{$type}" ), $name, $callback, compact( 'priority', 'arg_count' ) );
}
}
}
}
/**
* Removes the added DocBlock hooks.
*
* @param object $object The class object.
*/
public function remove_doc_hooks( $object = null ) {
if ( is_null( $object ) ) {
$object = $this;
}
$class_name = get_class( $object );
$reflector = new \ReflectionObject( $object );
foreach ( $reflector->getMethods() as $method ) {
$doc = $method->getDocComment();
if ( preg_match_all( '#\* @(?P<type>filter|action|shortcode)\s+(?P<name>[a-z0-9\-\._]+)(?:,\s+(?P<priority>\d+))?#', $doc, $matches, PREG_SET_ORDER ) ) {
foreach ( $matches as $match ) {
$type = $match['type'];
$name = $match['name'];
$priority = empty( $match['priority'] ) ? 10 : intval( $match['priority'] );
$callback = array( $object, $method->getName() );
call_user_func( "remove_{$type}", $name, $callback, $priority );
}
}
}
unset( $this->called_doc_hooks[ $class_name ] );
}
}

View File

@@ -0,0 +1,168 @@
<?php
/**
* Bootstraps the ShareThis Share Buttons plugin.
*
* @package ShareThisShareButtons
*/
namespace ShareThisShareButtons;
/**
* Main plugin bootstrap file.
*/
class Plugin extends Plugin_Base {
/**
* Plugin assets prefix.
*
* @var string Lowercased dashed prefix.
*/
public $assets_prefix;
/**
* Plugin meta prefix.
*
* @var string Lowercased underscored prefix.
*/
public $meta_prefix;
/**
* Plugin constructor.
*/
public function __construct() {
parent::__construct();
// Global.
$button_widget = new Button_Widget( $this );
// Initiate classes.
$classes = array(
new Share_Buttons( $this, $button_widget ),
$button_widget,
new Minute_Control( $this ),
);
// Add classes doc hooks.
foreach ( $classes as $instance ) {
$this->add_doc_hooks( $instance );
}
// Define some prefixes to use througout the plugin.
$this->assets_prefix = strtolower( preg_replace( '/\B([A-Z])/', '-$1', __NAMESPACE__ ) );
$this->meta_prefix = strtolower( preg_replace( '/\B([A-Z])/', '_$1', __NAMESPACE__ ) );
}
/**
* Register MU Script
*
* @action wp_enqueue_scripts
*/
public function register_assets() {
$propertyid = get_option( 'sharethis_property_id' );
$propertyid = false !== $propertyid && null !== $propertyid ? explode( '-', $propertyid, 2 ) : array();
$first_prod = get_option( 'sharethis_first_product' );
$first_prod = false !== $first_prod && null !== $first_prod ? $first_prod : '';
if ( is_array( $propertyid ) && array() !== $propertyid ) {
wp_register_script(
"{$this->assets_prefix}-mu",
"//platform-api.sharethis.com/js/sharethis.js#property={$propertyid[0]}&product={$first_prod}-buttons&source=sharethis-share-buttons-wordpress",
array(),
SHARETHIS_SHARE_BUTTONS_VERSION,
false
);
}
// Register style sheet for sticky hiding.
wp_register_style(
"{$this->assets_prefix}-sticky",
"{$this->dir_url}css/mu-style.css",
array(),
filemtime( "{$this->dir_path}css/mu-style.css" )
);
}
/**
* Register admin scripts/styles.
*
* @action admin_enqueue_scripts
*/
public function register_admin_assets() {
wp_register_script(
"{$this->assets_prefix}-mua",
'//platform-api.sharethis.com/js/sharethis.js?product=inline-share-buttons',
array(),
SHARETHIS_SHARE_BUTTONS_VERSION,
false
);
wp_register_script(
"{$this->assets_prefix}-admin",
"{$this->dir_url}js/admin.js",
array( 'jquery', 'jquery-ui-sortable', 'wp-util', 'wp-color-picker' ),
filemtime( "{$this->dir_path}js/admin.js" ),
false
);
wp_register_script(
"{$this->assets_prefix}-meta-box",
"{$this->dir_url}js/meta-box.js",
array( 'jquery', 'wp-util' ),
filemtime( "{$this->dir_path}js/meta-box.js" ),
false
);
wp_register_style(
"{$this->assets_prefix}-admin",
"{$this->dir_url}css/admin.css",
array( 'wp-color-picker' ),
filemtime( "{$this->dir_path}css/admin.css" )
);
wp_register_style(
"{$this->assets_prefix}-meta-box",
"{$this->dir_url}css/meta-box.css",
array(),
filemtime( "{$this->dir_path}css/meta-box.css" )
);
}
/**
* Helper to get the formated network image.
*
* @param string $title The netwokr title.
*
* @return string
*/
public static function getFormattedNetworkImage( $title ) {
return 'https://platform-cdn.sharethis.com/img/' . self::getPlatformName( $title ) . '.svg';
}
/**
* Helper to format network title for image retrieval.
*
* @param string $title The network title.
*
* @return string
*/
public static function getFormattedNetworkTitle( $title ) {
return sanitize_title(
str_replace(
array( ' Share Button', 'Google Bookmarks', 'Yahoo Mail' ),
array( '', 'Bookmarks', 'YahooMail' ),
$title
)
);
}
/**
*
* Strips name to look like platform name.
*
* @param string $title Title string.
*
* @return string Modified title string.
*/
public static function getPlatformName( $title ) {
return str_replace(
array( '-pin', 'facebook-messenger', 'sina-', '-ru', 'yahoo-mail', 'okru' ),
array( '', 'messenger', '', 'ru', 'yahoomail', 'odnoklassniki' ),
$title
);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,210 @@
=== ShareThis Share Buttons ===
Plugin Name: ShareThis Share Buttons
Contributors: sharethis, scottstorebloom, scottmweaver
Tags: social buttons, sharethis, share this, social sharing, share buttons, social media buttons, sharing tools
Author URI: https://sharethis.com/
Author: ShareThis
Requires at least: 5.5
Tested up to: 6.4.1
Stable tag: 2.2.0
Version: 2.2.0
License: GPLv2 or later
Grow your website traffic and engagement by enabling one-click sharing with the free ShareThis Share Buttons plugin. The plugin is free (no upgrades available) and there is no registration is required!
== Description ==
Make it easy for your audience to share your content across 40+ of the most popular social channels including Facebook, WhatsApp, Twitter, and Pinterest.
The free plugin includes the following features:
* Configure your buttons to stay anchored on the sidebar as visitors scroll or inline near your headline or product on the page for ideal visibility
* Customize the design including the alignment, size, and color (unlimited options) to match your brand
* Increase social shares with our responsive, lightweight, code which loads asynchronously and wont slow down your site.
* Select your preferred language from over 15 options (English, German, Spanish, French, Italian, Japanese, Korean, Portuguese, Russian, Chinese, Dutch, Arabic, Bengali, Hindi, Turkish, and Vietnamese).
* Page and post editor controls which give you the power to enable or disable your buttons on specific posts and pages regardless of your default settings.
Start expanding the reach of your content organically and grow the audience of your WordPress website with the ShareThis Share Buttons plugin.
== WordPress Features ==
**Inline Share Buttons**
* Enable or disable inline share buttons at the top and bottom of post and page bodies.
* Pixel perfect placement with top and bottom margin controls.
* Shortcode and PHP snippets.
* Page and post editor controls let you enable or disable inline share buttons on specific posts and pages regardless of your default settings.
**Sticky Share Buttons**
* Enable or disable sticky share buttons on the home page, all pages, all posts, custom posts, author pages, as well as tag and category archives.
* Exclude sticky share buttons on specific pages and category archives with a searchable page exception.
* Page and post editor controls let you enable or disable sticky share buttons on specific posts and pages regardless of your default settings.
== Screenshots ==
1. Inline share button design options.
2. Inline share button settings.
3. Example of Inline share buttons.
4. Sticky share button design options.
5. Sticky share button settings.
6. Example of Sticky share buttons.
7. Share button controls included on post and page editors.
8. Consent management platforom settings.
== Installation ==
Install ShareThis Share Buttons just like any other plugin. Simply download the file directly from this page or search for us in the WordPress directory and click "Install". After you install and activate the plugin, simply configure your buttons and create an account.
If youre already using the new ShareThis buttons, and want to migrate to our WordPress plugin, weve got your back. Install the plugin, then from the first configuration screen click, connect to an existing property. Login, and select your property from the list. Well sync your settings from our platform. Dont forget to remove the hard coded JS, and any hard coded inline share button divs!
== Privacy ==
By creating an account with ShareThis, you agree to our [terms of use](https://sharethis.com/publisher-terms-of-use/) which includes the ability to keep track of user interactions with our buttons. You can read our privacy policy here: [https://www.sharethis.com/privacy/](https://sharethis.com/privacy/)
Questions? Submit an inquiry through our support forum and our team will be happy to assist.
== Frequently Asked Questions ==
**I reconfigured my buttons on the ShareThis platform, but nothing happened on my site. Whats going on here?**
We cache your ShareThis platform button configurations (social networks, button size, labels etc.) to optimize their performance. Sometimes changes you make on the ShareThis platform take a couple minutes to update on your site. Also, if you activate a new button type from the settings page you may experience a similar lag.
== Changelog ==
= 2.2.0 =
* Add new social networks.
= 2.1.11 =
* Remove leading commas for backwards compatibility
= 2.1.10 =
* Remove restapi action.
= 2.1.9 =
* Fix position option saves.
* Fix random enable on update.
= 2.1.8 =
* Fix missing update/reset buttons.
* Fix conflict with other share this menus.
= 2.1.7 =
* Add check for first product use.
= 2.1.6 =
* Test with WordPress 6.1.1.
= 2.1.5 =
* Add source.
= 2.1.4 =
* Add disable/enable tool buttons to gdpr.
* Fix reset if tool is turned off and on.
= 2.1.2 =
* Add disable tool button.s
= 2.1.1 =
* Fix issue with PHP 5.X compatibility.
= 2.1.0 =
* Add smart share buttons.
* Add new social networks options.
= 2.0.0 =
* Remove account registration.
* Add custom share button color options.
* Change UI to tabs.
= 1.5.8 =
* Test with WordPress 6.0.1 and PHP8.
= 1.5.7 =
* Fix critical error.
* Test with WordPress 5.9.2.
* Remove random gif.
= 1.5.6 =
* Sanitize inputs/outputs and improve code quality.
* Test with WordPress 5.9.1.
= 1.5.5 =
* Fix Ajax
* Test with WordPress 5.9.
= 1.5.4 =
* Fix markup for data-url output.
= 1.5.3 =
* Fix jquery attr call and php warning.
* Remove GDPR global scope.
= 1.5.2 =
* Add Snapchat, BLM and Live Journal network options.
= 1.5.1 =
* Fix position config update save.
= 1.5.0 =
* Fix missing update in stick config.
* Fix language selector.
= 1.4.1 =
* Fix GDPR compliance on/off.
= 1.4.0 =
* Added GDPR compliance tool option and config.
= 1.3.0 =
* Fix registration sticky configurations.
* Add DB data removal on deactivate.
* Add new companies to network list.
* Add notice for ad blockers.
= 1.2.10 =
* Fix endpoint update.
= 1.2.9 =
* Add German to language list.
* Remove Native counts.
* Replace api endpoints.
= 1.2.8 =
* Made WordPress 5+ compatible.
* Added new Gutenberg block category and block for adding inline buttons.
* Fixed backwards compatibility for accounts without secrets.
= 1.1.8 =
* Added multi-language options for translating share buttons.
= 1.1.7 =
* Added loading gifs to registration to avoid user double clicks.
* Added new Messenger button to network list.
= 1.1.6 =
* Menu logic for use by future ShareThis plugins.
* Fix button size selector.
= 1.1.5 =
* Create an account and design your share buttons without leaving the plugin!
* Link the plugin and sync buttons settings with an existing property on our Platform.
= 1.0.5 =
* Add a widget for sidebars to include buttons.
= 1.0.4 =
* Added data-url attribute to non the-excerpt filter excerpts.
= 1.0.3 =
* Fixed random share buttons on homepage base issue.
= 1.0.2 =
* Changed first product set function to add if doesn't exist instead of looking at transient.
= 1.0.1 =
* Fixed excerpt filter solving excerpt display issue.
= 1.0.0 =
* Brand new plugin submission.

View File

@@ -0,0 +1,86 @@
<?php
/**
* Plugin Name: ShareThis Share Buttons
* Plugin URI: https://sharethis.com/
* Description: Grow your website traffic with share buttons for 40+ social channels including Facebook, LinkedIn, Twitter, WhatsApp, and more.
* Version: 2.2.0
* Author: ShareThis
* Author URI: https://sharethis.com/
* Text Domain: sharethis-share-buttons
* Domain Path: /languages
* License: GPL v2 or later
*
* Copyright 2022 ShareThis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* @package ShareThisShareButtons
*/
/**
* Plugin version constant.
*/
const SHARETHIS_SHARE_BUTTONS_VERSION = '2.2.0';
if ( version_compare( phpversion(), '5.3', '>=' ) ) {
require_once __DIR__ . '/instance.php';
} else {
if ( defined( 'WP_CLI' ) ) {
WP_CLI::warning( _sharethis_share_buttons_php_version_text() );
} else {
add_action( 'admin_notices', '_sharethis_share_buttons_php_version_error' );
}
}
/**
* Admin notice for incompatible versions of PHP.
*/
function _sharethis_share_buttons_php_version_error() {
printf( '<div class="error"><p>%s</p></div>', esc_html( _sharethis_share_buttons_php_version_text() ) );
}
/**
* String describing the minimum PHP version.
*
* @return string
*/
function _sharethis_share_buttons_php_version_text() {
return __(
'ShareThis Share Buttons plugin error: Your version of PHP is too old to run this plugin. You must be running PHP 5.3 or higher.',
'sharethis-share-buttons'
);
}
/**
* The helper function to insert the proper inline button container.
*
* @return string
*/
function sharethis_inline_buttons() {
return '<div class="sharethis-inline-share-buttons"></div>';
}
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), '_sharethis_share_buttons_add_action_links' );
/**
* Add a link to the settings page.
*
* @param string $links The links shown in the plugin page.
*
* @return array
*/
function _sharethis_share_buttons_add_action_links( $links ) {
$mylinks = array(
'<a href="' . admin_url( 'admin.php?page=sharethis-inline-sticky-share-buttons' ) . '">Settings</a>',
);
return array_merge( $links, $mylinks );
}

View File

@@ -0,0 +1,59 @@
<?php
/**
* Configure tool template for gdpr onboarding
*
* @package ShareThisShareButtons
*/
?>
<div class="vendor-exclusion">
<div class="vendor-table">
<div class="st-box ">
<div class="vendor-table-header">
<div class="vendor-name">
<h3>
<?php esc_html_e( 'Vendor names', 'sharethis-share-buttons' ); ?>
</h3>
<div class="st-input vendor-search">
<input autocomplete="off" id="vendor-search " placeholder="Search for vendor" type="text">
</div>
</div>
</div>
<p class="vendor-info">
<?php esc_html_e( 'Manage third-party vendors asking for consent across your sites.', 'sharethis-share-buttons' ); ?>
</p>
</div>
<div class="vendor-table-body">
<?php foreach ( $vendors as $vendor ) : ?>
<div class="vendor-table-cell">
<a name="<?php echo esc_html( strtolower( $vendor['name'] ) ); ?>"></a>
<a name="<?php echo esc_html( strtolower( explode( ' ', $vendor['name'] )[0] ) ); ?>"></a>
<div class="vendor-table-cell-wrapper switch">
<label>
<input data-id="<?php echo esc_attr( $vendor['id'] ); ?>" type="checkbox" name="vendor[<?php echo esc_attr( $vendor['id'] ); ?>]" value="consent" />
<span class="lever"></span>
<strong><?php echo esc_html( $vendor['name'] ); ?></strong>
</label>
<div class="vendor-accor">
<p>
<strong><?php esc_html_e( 'Privacy Policy: ', 'sharethis-share-buttons' ); ?></strong>
<?php
echo '<a href="' . esc_url( $vendor['policyUrl'] ) . '" target="_blank">' .
esc_html( $vendor['policyUrl'] ) . '</a>';
?>
</p>
<p>
<strong><?php esc_html_e( 'Purposes: ', 'sharethis-share-buttons' ); ?></strong>
<div class="vendor-purpose-list">
<?php foreach ( $vendor['purposes'] as $purpose ) : ?>
<p><?php echo esc_html( $purposes[ $purpose ] ); ?></p>
<?php endforeach; ?>
</div>
</p>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,117 @@
<?php
/**
* Configure tool template for gdpr onboarding
*
* @package ShareThisShareButtons
*/
?>
<div class="gdpr-platform platform-config-wrapper">
<h2>
<?php echo esc_html_e( 'Consent Management Platform', 'sharethis-share-buttons' ); ?>
</h2>
<?php if ( 'Disabled' === $enabled['gdpr'] ) : ?>
<button class="enable-tool" data-button="gdpr-compliance-tool-v2">Enable Tool</button>
<?php endif; ?>
<h4 style="text-align: left; font-size: 15px;">
<?php echo esc_html__( 'Configure', 'sharethis-share-buttons' ); ?>
</h4>
<div class="st-design-message">
<?php
echo esc_html__(
'Use the settings below to configure your GDPR compliance tool popup.',
'sharethis-share-buttons'
);
?>
</div>
<div id="starter-questions">
<label>
<?php
echo esc_html__(
'PUBLISHER NAME * (this will be displayed in the consent tool)',
'sharethis-share-buttons'
);
?>
</label>
<input type="text" id="sharethis-publisher-name" placeholder="Enter your company name">
<label>
<?php
echo esc_html__(
'WHICH USERS SHOULD BE ASKED FOR CONSENT?',
'sharethis-share-buttons'
);
?>
</label>
<select id="sharethis-user-type">
<?php foreach ( $user_types as $user_value => $name ) : ?>
<option value="<?php echo esc_attr( $user_value ); ?>">
<?php echo esc_html( $name ); ?>
</option>
<?php endforeach; ?>
</select>
<label>
<?php echo esc_html__( 'SELECT LANGUAGE', 'sharethis-share-buttons' ); ?>
</label>
<select id="st-language">
<?php foreach ( $languages as $language => $code ) : ?>
<option value="<?php echo esc_attr( $code ); ?>">
<?php echo esc_html( $language ); ?>
</option>
<?php endforeach; ?>
</select>
<p class="form-color">
<label>
<?php
echo esc_html__(
'CHOOSE FORM COLOR',
'gdpr-complianc-tool'
);
?>
</label>
<div id="sharethis-form-color">
<?php foreach ( $colors as $color ) : ?>
<div class="color"
data-value="<?php echo esc_attr( $color ); ?>"
style="max-width: 30px; max-height: 30px; overflow: hidden;">
<span style="content: ' '; background-color:<?php echo esc_html( $color ); ?>; padding: 40px;"></span>
</div>
<?php endforeach; ?>
</div>
</p>
</div>
<div class="accor-wrap switch" id="purposes">
<div class="accor-tab">
<span class="accor-arrow">&#9658;</span>
<?php echo esc_html__( 'WHY ARE YOU COLLECTING CUSTOMER DATA?', 'sharethis-share-buttons' ); ?>
</div>
<div class="accor-content" id="publisher-purpose" class="switch">
<?php require $this->plugin->dir_path . '/templates/general/gdpr/purposes.php'; ?>
</div>
</div>
<?php if ( isset( $vendor_data ) ) : ?>
<div class="accor-wrap restrict-vendors">
<div class="accor-tab">
<span class="accor-arrow">&#9658;</span>
<?php echo esc_html__( 'VENDOR EXCLUSIONS', 'sharethis-share-buttons' ); ?>
</div>
<div class="accor-content">
<div class="well">
<?php include $this->plugin->dir_path . '/templates/general/gdpr/exclusions.php'; ?>
</div>
</div
</div>
<?php endif; ?>
<?php if ( 'Enabled' === $enabled['gdpr'] ) : ?>
<button class="disable-tool" data-button="gdpr-compliance-tool-v2">Disable Tool</button>
<?php endif; ?>
</div>
</div>

View File

@@ -0,0 +1,207 @@
<?php
/**
* GDPR Purposes.
*
* @package ShareThisShareButtons
*/
?>
<div class="empty-choices">
<a id="see-st-choices" class="st-rc-link medium-btn" href="#">See ShareThis Choices</a>
<a id="clear-choices" class="st-rc-link medium-btn" href="#">Clear Choices</a>
</div>
<div class="purpose-item">
<div class="title">
<?php
echo esc_html__(
'1) Store and/or access information on a device (Do you collect information on users on your site through cookies or site identifiers?)',
'gdpr-complianc-tool'
);
?>
</div>
<label>
<?php echo esc_html__( 'Consent', 'sharethis-share-buttons' ); ?>
<input data-id="1" type="checkbox" name="purposes[1]" value="consent" checked/>
<span class="lever"></span>
</label>
</div>
<div class="purpose-item">
<div class="title">
<?php
echo esc_html__(
'2) Select basic ads (Do you serve ads on your site?)',
'gdpr-complianc-tool'
);
?>
</div>
<label>
<?php echo esc_html__( 'Consent', 'sharethis-share-buttons' ); ?>
<input data-id="2" type="radio" name="purposes[2]" value="consent"/>
<span class="lever"></span>
</label>
<label>
<?php echo esc_html__( 'Legitimate Interest', 'sharethis-share-buttons' ); ?>
<input data-id="2" type="radio" name="purposes[2]" value="legitimate"/>
<span class="lever"></span>
</label>
</div>
<div class="purpose-item">
<div class="title">
<?php
echo esc_html__(
'3) Create a personalised ads profile (Do you create personalised advertising profiles associated with users on your site (ie: profiles based on demographic information, location, users activity)?)',
'gdpr-complianc-tool'
);
?>
</div>
<label>
<?php echo esc_html__( 'Consent', 'sharethis-share-buttons' ); ?>
<input data-id="3" type="radio" name="purposes[3]" value="consent" checked/>
<span class="lever"></span>
</label>
<label>
<?php echo esc_html__( 'Legitimate Interest', 'sharethis-share-buttons' ); ?>
<input data-id="3" type="radio" name="purposes[3]" value="legitimate"/>
<span class="lever"></span>
</label>
</div>
<div class="purpose-item">
<div class="title">
<?php
echo esc_html__(
'4) Select personalised ads (Do you show ads to users based on this user profile)',
'gdpr-complianc-tool'
);
?>
</div>
<label>
<?php echo esc_html__( 'Consent', 'sharethis-share-buttons' ); ?>
<input data-id="4" type="radio" name="purposes[4]" value="consent"/>
<span class="lever"></span>
</label>
<label>
<?php echo esc_html__( 'Legitimate Interest', 'sharethis-share-buttons' ); ?>
<input data-id="4" type="radio" name="purposes[4]" value="legitimate"/>
<span class="lever"></span>
</label>
</div>
<div class="purpose-item">
<div class="title">
<?php
echo esc_html__(
'5) Create a personalised content profile (Do you build a personalized content profile associated with users on your site based on the type of content they have viewed?)',
'gdpr-complianc-tool'
);
?>
</div>
<label>
<?php echo esc_html__( 'Consent', 'sharethis-share-buttons' ); ?>
<input data-id="5" type="radio" name="purposes[5]" value="consent" checked />
<span class="lever"></span>
</label>
<label>
<?php echo esc_html__( 'Legitimate Interest', 'sharethis-share-buttons' ); ?>
<input data-id="5" type="radio" name="purposes[5]" value="legitimate"/>
<span class="lever"></span>
</label>
</div>
<div class="purpose-item">
<div class="title">
<?php
echo esc_html__(
'6) Select personalised content (Do you serve content to the user on your site based on your recorded content interests)',
'gdpr-complianc-tool'
);
?>
</div>
<label>
<?php echo esc_html__( 'Consent', 'sharethis-share-buttons' ); ?>
<input data-id="6" type="radio" name="purposes[6]" value="consent" checked />
<span class="lever"></span>
</label>
<label>
<?php echo esc_html__( 'Legitimate Interest', 'sharethis-share-buttons' ); ?>
<input data-id="6" type="radio" name="purposes[6]" value="legitimate"/>
<span class="lever"></span>
</label>
</div>
<div class="purpose-item">
<div class="title">
<?php
echo esc_html__(
'7) Measure ad performance (Do you measure the performance of advertisements on your site)',
'gdpr-complianc-tool'
);
?>
</div>
<label>
<?php echo esc_html__( 'Consent', 'sharethis-share-buttons' ); ?>
<input data-id="7" type="radio" name="purposes[7]" value="consent"/>
<span class="lever"></span>
</label>
<label>
<?php echo esc_html__( 'Legitimate Interest', 'sharethis-share-buttons' ); ?>
<input data-id="7" type="radio" name="purposes[7]" value="legitimate"/>
<span class="lever"></span>
</label>
</div>
<div class="purpose-item">
<div class="title">
<?php
echo esc_html__(
'8) Measure content performance (Do you measure the performance of content served to your site visitors?)',
'gdpr-complianc-tool'
);
?>
</div>
<label>
<?php echo esc_html__( 'Consent', 'sharethis-share-buttons' ); ?>
<input data-id="8" type="radio" name="purposes[8]" value="consent"/>
<span class="lever"></span>
</label>
<label>
<?php echo esc_html__( 'Legitimate Interest', 'sharethis-share-buttons' ); ?>
<input data-id="8" type="radio" name="purposes[8]" value="legitimate"/>
<span class="lever"></span>
</label>
</div>
<div class="purpose-item">
<div class="title">
<?php
echo esc_html__(
'9) Apply market research to generate audience insights (Do you aggregate reporting on the ads or content show to your site visitors to advertisers)',
'gdpr-complianc-tool'
);
?>
</div>
<label>
<?php echo esc_html__( 'Consent', 'sharethis-share-buttons' ); ?>
<input data-id="9" type="radio" name="purposes[9]" value="consent"/>
<span class="lever"></span>
</label>
<label>
<?php echo esc_html__( 'Legitimate Interest', 'sharethis-share-buttons' ); ?>
<input data-id="9" type="radio" name="purposes[9]" value="legitimate" checked />
<span class="lever"></span>
</label>
</div>
<div class="purpose-item">
<div class="title">
<?php
echo esc_html__(
'10) Develop and improve products (Do you use data collected on your site visitors to improve your systems or software or create new products?)',
'gdpr-complianc-tool'
);
?>
</div>
<label>
<?php echo esc_html__( 'Consent', 'sharethis-share-buttons' ); ?>
<input data-id="10" type="radio" name="purposes[10]" value="consent"/>
<span class="lever"></span>
</label>
<label>
<?php echo esc_html__( 'Legitimate Interest', 'sharethis-share-buttons' ); ?>
<input data-id="10" type="radio" name="purposes[10]" value="legitimate" checked/>
<span class="lever"></span>
</label>
</div>

View File

@@ -0,0 +1,58 @@
<?php
/**
* Meta Box Template
*
* The template wrapper for post/page meta box.
*
* @package ShareThisShareButtons
*/
?>
<div id="sharethis-meta-box">
<?php if ( ! in_array( $inline_enable, array( null, false, 'false' ), true ) ) : ?>
<div id="inline" class="button-setting-wrap">
<h3><?php esc_html_e( 'Inline share buttons', 'sharethis-share-buttons' ); ?></h3>
<div class="button-check-wrap">
<input class="top" type="checkbox" id="sharethis-top-post" <?php echo checked( 'true', $this->is_box_checked( 'inline', '_top' ) ); ?>>
<label for="sharethis-top-post">
<?php
// translators: The post type.
printf( esc_html__( 'Include at top of %1$s content', 'sharethis-share-buttons' ), esc_html( $post_type ) );
?>
</label>
</div>
<div class="button-check-wrap">
<input class="bottom" type="checkbox" id="sharethis-bottom-post" <?php echo checked( 'true', $this->is_box_checked( 'inline', '_bottom' ) ); ?>>
<label for="sharethis-bottom-post">
<?php
// translators: The post type.
printf( esc_html__( 'Include at bottom of %1$s content', 'sharethis-share-buttons' ), esc_html( $post_type ) );
?>
</label>
</div>
<input type="text" class="sharethis-shortcode" readonly value="[sharethis-inline-buttons]">
<span class="under-message"><?php esc_html_e( 'Inline share button shortcode.', 'sharethis-share-buttons' ); ?></span>
</div>
<?php endif; ?>
<?php if ( ! in_array( $sticky_enable, array( null, false, 'false' ), true ) ) : ?>
<div id="sticky" class="button-setting-wrap">
<h3><?php esc_html_e( 'Sticky share buttons', 'sharethis-share-buttons' ); ?></h3>
<input class="" type="checkbox" id="sharethis-sticky-show" <?php echo checked( 'true', $this->is_box_checked( 'sticky' ) ); ?>>
<label for="sharethis-sticky-show">
<?php
// translators: The post type.
printf( esc_html__( 'Include on this %1$s', 'sharethis-share-buttons' ), esc_html( $post_type ) );
?>
</label>
</div>
<?php endif; ?>
<a href="<?php echo esc_url( admin_url( 'admin.php?page=sharethis-share-buttons' ) ); ?>">
<?php esc_html_e( 'Update your default settings', 'sharethis-share-buttons' ); ?>
</a>
</div>

View File

@@ -0,0 +1,321 @@
<?php
/**
* Platform button configurations
*
* The template wrapper for the platform button configurations.
*
* @package ShareThisShareButtons
*/
use ShareThisShareButtons\Plugin;
$button = 'share_button_section_2' === $button['id'] ? 'sticky' : 'inline';
$button_title = ucfirst( $button ) . ' Share Buttons';
// Set up classes.
$classes = array();
$classes[] = 'inline' === $button ? 'engage ' : '';
$classes[] = strtolower( $button ) . '-platform platform-config-wrapper';
?>
<div data-enabled="<?php echo esc_attr( $enabled[ $button ] ); ?>" class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
<h2><?php echo esc_html( $button_title ); ?></h2>
<?php if ( 'Disabled' === $enabled[ $button ] ) : ?>
<button class="enable-tool" data-button="<?php echo esc_attr( $button ); ?>">Enable Tool</button>
<?php endif; ?>
<div class="sharethis-selected-networks">
<div id="<?php echo esc_attr( strtolower( $button ) ); ?>-8" class="sharethis-<?php echo esc_attr( $button ); ?>-share-buttons"></div>
</div>
<?php if ( 'inline' === $button ) : ?>
<p class="st-preview-message manual-select engage">
⇧ <?php echo esc_html__( 'Preview: click and drag to reorder' ); ?> ⇧
</p>
<?php
endif;
require 'ssb.php';
?>
<div id="<?php echo esc_attr( strtolower( $button ) ); ?>" class="button-configuration-wrap selected-button">
<h3 class="manual-select engage"><?php echo esc_html__( 'Social networks', 'sharethis-share-buttons' ); ?></h3>
<span class="config-desc manual-select engage">click a network to add or remove it from your preview. We've already included the most popular networks.</span>
<div class="<?php echo esc_attr( $button ); ?>-network-list share-buttons manual-select engage">
<?php
foreach ( $networks as $network_name => $network_info ) :
$social_image = Plugin::getFormattedNetworkImage( $network_name );
$network_name = Plugin::getPlatformName( $network_name );
?>
<div class="share-button" data-color="<?php echo esc_attr( $network_info['color'] ); ?>"
data-selected="<?php echo esc_attr( true === isset( $network_info['selected'] ) ? $network_info['selected'] : '' ); ?>"
data-network="<?php echo esc_attr( str_replace( 'pocket', 'getpocket', $network_name ) ); ?>"
title="<?php echo esc_attr( $network_name ); ?>"
style="background-color: <?php echo esc_attr( $network_info['color'] ); ?>;">
<img alt="<?php echo esc_attr( $network_name ); ?>" src="<?php echo esc_url( $social_image ); ?>" />
</div>
<?php endforeach; ?>
</div>
<span class="manual-select engage">
<div class="notes">
<span style="background: rgb(255, 189, 0); border-radius: 20px; font-size: 20px; margin: 0 .5rem; padding: 6px 0 0 5px;">
<svg fill="#fff" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" viewBox="0 0 40 40">
<g>
<path d="M29.577,23.563 C27.233,23.563 25.935,22.138 25.935,22.138 L27.22,20.283 C27.22,20.283 28.349,21.315 29.605,21.315 C30.108,21.315 30.652,21.12 30.652,20.52 C30.652,19.334 26.158,19.376 26.158,16.306 C26.158,14.464 27.707,13.25 29.688,13.25 C31.839,13.25 32.898,14.38 32.898,14.38 L31.866,16.376 C31.866,16.376 30.861,15.497 29.661,15.497 C29.159,15.497 28.6,15.72 28.6,16.278 C28.6,17.534 33.094,17.311 33.094,20.464 C33.094,22.125 31.824,23.563 29.577,23.563 L29.577,23.563 Z M23.027,23.394 L22.721,18.901 C22.665,18.147 22.721,17.227 22.721,17.227 L22.692,17.227 C22.692,17.227 22.356,18.273 22.134,18.901 L21.088,21.79 L18.994,21.79 L17.947,18.901 C17.724,18.273 17.389,17.227 17.389,17.227 L17.361,17.227 C17.361,17.227 17.417,18.147 17.361,18.901 L17.055,23.394 L14.598,23.394 L15.422,13.417 L18.073,13.417 L19.524,17.631 C19.748,18.273 20.026,19.278 20.026,19.278 L20.055,19.278 C20.055,19.278 20.334,18.273 20.557,17.631 L22.008,13.417 L24.66,13.417 L25.469,23.394 L23.027,23.394 Z M10.548,23.563 C8.204,23.563 6.906,22.138 6.906,22.138 L8.19,20.283 C8.19,20.283 9.32,21.315 10.576,21.315 C11.078,21.315 11.623,21.12 11.623,20.52 C11.623,19.334 7.129,19.376 7.129,16.306 C7.129,14.464 8.678,13.25 10.66,13.25 C12.808,13.25 13.869,14.38 13.869,14.38 L12.836,16.376 C12.836,16.376 11.832,15.497 10.632,15.497 C10.129,15.497 9.571,15.72 9.571,16.278 C9.571,17.534 14.064,17.311 14.064,20.464 C14.064,22.125 12.795,23.563 10.548,23.563 L10.548,23.563 Z M32.814,6 L7.185,6 C5.437,6 4,7.438 4,9.213 L4,28.99 C4,30.756 5.426,32.203 7.185,32.203 L10.61,32.203 L12.445,34.295 C13.086,34.952 14.117,34.949 14.755,34.295 L16.59,32.203 L32.814,32.203 C34.562,32.203 36,30.764 36,28.99 L36,9.213 C36,7.446 34.574,6 32.814,6 L32.814,6 Z"></path>
</g>
</svg>
</span>
<?php echo esc_html__( 'The sms button only appears on mobile devices. It is included in your desktop preview for reference only.', 'sharethis-share-buttons' ); ?>
</div>
</span>
<hr>
<?php if ( 'inline' === $button ) : ?>
<div class="button-alignment">
<h3><?php echo esc_html__( 'Alignment', 'sharethis-share-buttons' ); ?></h3>
<div class="alignment-button" data-alignment="left" data-selected="false">
<div class="top">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
<div class="bottom"><?php echo esc_html__( 'Left', 'sharethis-share-buttons' ); ?></div>
</div>
<div class="alignment-button" data-alignment="center" data-selected="true">
<div class="top">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
<div class="bottom"><?php echo esc_html__( 'Center', 'sharethis-share-buttons' ); ?></div>
</div>
<div class="alignment-button" data-alignment="right" data-selected="false">
<div class="top">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div><div class="bottom"><?php echo esc_html__( 'Right', 'sharethis-share-buttons' ); ?></div>
</div>
<div class="alignment-button" data-alignment="justified" data-selected="false">
<div class="top">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
<div class="bottom"><?php echo esc_html__( 'Justified', 'sharethis-share-buttons' ); ?></div>
</div>
</div>
<hr>
<?php endif; ?>
<div class="row">
<?php if ( 'inline' === $button ) : ?>
<div class="st-radio-config button-config button-size">
<h3><?php echo esc_html__( 'Size', 'sharethis-share-buttons' ); ?></h3>
<div class="item">
<input type="radio" class="with-gap" value="on" checked="checked">
<label id="small"><?php echo esc_html__( 'Small', 'sharethis-share-buttons' ); ?></label>
</div>
<div class="item">
<input type="radio" class="with-gap" value="on">
<label id="medium"><?php echo esc_html__( 'Medium', 'sharethis-share-buttons' ); ?></label>
</div>
<div class="item">
<input type="radio" class="with-gap" value="on">
<label id="large"><?php echo esc_html__( 'Large', 'sharethis-share-buttons' ); ?></label>
</div>
<?php else : ?>
<div class="button-config">
<h3><?php echo esc_html__( 'Alignment', 'sharethis-share-buttons' ); ?></h3>
<div class="item">
<label>
<span><?php echo esc_html__( 'Left', 'sharethis-share-buttons' ); ?></span>
<div class="switch sticky-alignment">
<label>
<input type="checkbox" value="on">
<span class="lever"></span>
</label>
</div>
<span><?php echo esc_html__( 'Right', 'sharethis-share-buttons' ); ?></span>
</label>
</div>
<div class="item">
<span class="lbl"><?php echo esc_html__( 'Vertical Alignment', 'sharethis-share-buttons' ); ?></span>
<input class="vertical-alignment" type="text" value="160">
</div>
<div class="item">
<span class="lbl"><?php echo esc_html__( 'Mobile Breakpoint', 'sharethis-share-buttons' ); ?></span>
<input class="mobile-breakpoint" type="text" value="1024">
</div>
<?php endif; ?>
</div>
<div class="st-radio-config button-config button-labels">
<h3><?php echo esc_html__( 'Labels', 'sharethis-share-buttons' ); ?></h3>
<div class="item">
<input type="radio" class="with-gap" value="on" checked="checked">
<label id="cta"><?php echo esc_html__( 'Call to Action', 'sharethis-share-buttons' ); ?></label>
</div>
<div class="item">
<input type="radio" class="with-gap" value="on">
<label id="counts"><?php echo esc_html__( 'Share Counts', 'sharethis-share-buttons' ); ?></label>
</div>
<div class="item">
<input type="radio" class="with-gap" value="on">
<label id="none"><?php echo esc_html__( 'None', 'sharethis-share-buttons' ); ?></label>
</div>
</div>
<div class="st-radio-config button-config button-color">
<h3><?php esc_html_e( 'Color', 'sharethis-share-buttons' ); ?></h3>
<div class="item">
<input type="radio" class="with-gap" value="on" checked="checked">
<label id="social"><?php esc_html_e( 'Social', 'sharethis-share-buttons' ); ?></label>
</div>
<div class="item">
<input type="radio" class="with-gap" value="on">
<label id="white"><?php esc_html_e( 'White', 'sharethis-share-buttons' ); ?></label>
</div>
<div class="item">
<input type="radio" class="with-gap" value="on">
<label id="black"><?php esc_html_e( 'Black', 'sharethis-share-buttons' ); ?></label>
</div>
<div class="item">
<input type="radio" class="with-gap" value="on">
<label id="gray"><?php esc_html_e( 'Gray', 'sharethis-share-buttons' ); ?></label>
</div>
<div class="item">
<input type="radio" class="with-gap" value="on">
<label style="margin-bottom:1rem" id="custom"><?php esc_html_e( 'Custom', 'sharethis-share-buttons' ); ?></label>
<br>
<label id="background-color">Background</label>
<input type="text" value="#bada55" class="custom-<?php echo 'inline' !== $button ? 'st-' : ''; ?>button-color" />
<br>
<label id="icon-color">Icon</label>
<input type="text" value="#ffffff" class="custom-<?php echo 'inline' !== $button ? 'st-' : ''; ?>icon-color" />
</div>
</div>
<hr>
<div class="button-config">
<h3><?php echo esc_html__( 'Counts', 'sharethis-share-buttons' ); ?></h3>
<div class="item">
<span class="lbl show-total-count"><?php echo esc_html__( 'Show total count', 'sharethis-share-buttons' ); ?></span>
<div class="switch">
<label>
<input type="checkbox" value="on" checked="checked">
<span class="lever"></span>
</label>
</div>
</div>
<div class="item tooltip">
<span class="lbl">
<?php echo esc_html__( 'Minimum Count', 'sharethis-share-buttons' ); ?>
<span class="tooltip-icon tooltipped" data-delay="50" data-position="right" data-tooltip="This is the minimum number of shares a page needs to have before we'll show your share counts." data-tooltip-id="233a37b7-7c96-eb8b-128e-80c62a922f41">
<svg fill="#fff" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" viewBox="0 0 40 40">
<g>
<path d="m23.2 28v5.4q0 0.4-0.3 0.6t-0.6 0.3h-5.3q-0.4 0-0.7-0.3t-0.2-0.6v-5.4q0-0.3 0.2-0.6t0.7-0.3h5.3q0.4 0 0.6 0.3t0.3 0.6z m7.1-13.4q0 1.2-0.4 2.3t-0.8 1.7-1.2 1.3-1.3 1-1.3 0.8q-0.9 0.5-1.6 1.4t-0.6 1.5q0 0.4-0.2 0.8t-0.7 0.3h-5.3q-0.4 0-0.6-0.4t-0.2-0.8v-1q0-1.9 1.4-3.5t3.2-2.5q1.3-0.6 1.9-1.2t0.5-1.7q0-0.9-1-1.7t-2.4-0.7q-1.4 0-2.4 0.7-0.8 0.5-2.4 2.5-0.3 0.4-0.7 0.4-0.2 0-0.5-0.2l-3.7-2.8q-0.3-0.2-0.3-0.5t0.1-0.6q3.5-6 10.3-6 1.8 0 3.6 0.7t3.3 1.9 2.4 2.8 0.9 3.5z"></path>
</g>
</svg>
</span>
<div class="material-tooltip"><span><?php echo esc_html__( 'This is the minimum number of shares a page needs to have before we\'ll show your share counts.', 'sharethis-share-buttons' ); ?></span><div class="backdrop" style="top: -7px; left: 0px; width: 14px; height: 14px; border-radius: 0px 14px 14px 0px; transform-origin: 5% 50% 0px; margin-top: 31px; margin-left: 0px; display: none; opacity: 0; transform: scaleX(1) scaleY(1);"></div></div>
</span>
<input class="minimum-count" type="text" value="10">
</div>
</div>
<div class="button-config">
<h3 class="center"><?php echo esc_html__( 'Corners', 'sharethis-share-buttons' ); ?></h3>
<span><?php echo esc_html__( 'Square', 'sharethis-share-buttons' ); ?></span>
<span class="range-field">
<input type="range" min="0" max="16" value="4" id="radius-selector" style="width: 200px; margin: 5px;">
<span class="thumb">
<span class="value"></span>
</span>
</span>
<span><?php echo esc_html__( 'Rounded', 'sharethis-share-buttons' ); ?></span>
</div>
<div class="button-config">
<h3><?php echo esc_html__( 'Extras', 'sharethis-share-buttons' ); ?></h3>
<?php if ( 'inline' === $button ) : ?>
<div class="item">
<span class="lbl"><?php echo esc_html__( 'Add Spacing', 'sharethis-share-buttons' ); ?></span>
<div class="switch extra-spacing">
<label>
<input type="checkbox" value="on" checked="checked">
<span class="lever"></span>
</label>
</div>
</div>
<?php else : ?>
<div class="item">
<span class="lbl"><?php echo esc_html__( 'Show on mobile', 'sharethis-share-buttons' ); ?></span>
<div class="switch show-on-mobile">
<label>
<input type="checkbox" value="on" checked="checked">
<span class="lever"></span>
</label>
</div>
</div>
<div class="item">
<span class="lbl"><?php echo esc_html__( 'Show on desktop', 'sharethis-share-buttons' ); ?></span>
<div class="switch show-on-desktop">
<label>
<input type="checkbox" value="on" checked="checked">
<span class="lever"></span>
</label>
</div>
</div>
<?php endif; ?>
</div>
<div class="button-config">
<h3 class="center"><?php echo esc_html__( 'Languages', 'sharethis-share-buttons' ); ?></h3>
<span class="select-field">
<select id="st-language-<?php echo esc_attr( $button ); ?>">
<?php foreach ( $languages as $language_name => $code ) : ?>
<option class="language-option" value="<?php echo esc_attr( $code ); ?>">
<?php echo esc_html( $language_name ); ?>
</option>
<?php endforeach; ?>
</select>
</span>
</div>
</div>
</div>
<?php if ( 'Enabled' === $enabled[ $button ] ) : ?>
<button class="disable-tool" data-button="<?php echo esc_attr( $button ); ?>">Disable Tool</button>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,21 @@
<?php
/**
* Enable Button Template
*
* The template wrapper for the enable button settings.
*
* @package ShareThisShareButtons
*/
$option_value = get_option( 'sharethis_' . $id );
?>
<div id="<?php echo esc_attr( ucfirst( $id ) ); ?>" class="enable-buttons">
<label class="share-on">
<input type="radio" id="sharethis_<?php echo esc_attr( $id ); ?>_on" name="sharethis_<?php echo esc_attr( $id ); ?>" value="true" <?php echo esc_attr( checked( 'true', $option_value, false ) ); ?>>
<div class="label-text"><?php esc_html_e( 'On', 'sharethis-share-buttons' ); ?></div>
</label>
<label class="share-off">
<input type="radio" id="sharethis_<?php echo esc_attr( $id ); ?>_off" name="sharethis_<?php echo esc_attr( $id ); ?>" value="false" <?php echo esc_attr( checked( 'false', $option_value, false ) ); ?>>
<div class="label-text"><?php esc_html_e( 'Off', 'sharethis-share-buttons' ); ?></div>
</label>
</div>

View File

@@ -0,0 +1,28 @@
<?php
/**
* List Template
*
* The template wrapper for the list of pages / categories used for exclusion.
*
* @package ShareThisShareButtons
*/
?>
<div class="list-wrapper">
<h4>
<?php
// translators: The list type plural.
printf( esc_html__( 'Exclude specific %1$s', 'sharethis-share-buttons' ), esc_html( $type['multi'] ) );
?>
</h4>
<input id="<?php echo esc_attr( $type['single'] ); ?>-ta" type="text" placeholder="
<?php
// translators: The list type singular.
printf( esc_html__( 'Search for a %1$s', 'sharethis-share-buttons' ), esc_html( $type['single'] ) );
?>
" size="40" autocomplete="off">
<span id="<?php echo esc_attr( $type['single'] ); ?>" class="search-st-icon"></span>
<ul id="<?php echo esc_attr( $type['single'] ); ?>-result-wrapper"></ul>
<ul id="<?php echo esc_attr( $type['single'] ); ?>-current-omit"><?php echo wp_kses( $current_omit, $allowed ); ?></ul>
</div>

View File

@@ -0,0 +1,35 @@
<?php
/**
* On Off Button Template
*
* The template wrapper for the On Off button settings.
*
* @package ShareThisShareButtons
*/
?>
<div class="onoff-buttons">
<label class="share-on">
<input type="radio" id="sharethis_<?php echo esc_attr( $type ); ?>_settings_<?php echo esc_attr( $option ); ?>_on" name="sharethis_<?php echo esc_attr( $type ); ?>_settings[<?php echo esc_attr( $option ); ?>]" value="true" <?php echo false !== $option_value[ $option ] && 'true' === $option_value[ $option ] ? 'checked="checked"' : esc_attr( $default['true'] ); ?>>
<div class="label-text"><?php esc_html_e( 'On', 'sharethis-share-buttons' ); ?></div>
</label>
<label class="share-off">
<input type="radio" id="sharethis_<?php echo esc_attr( $type ); ?>_settings_<?php echo esc_attr( $option ); ?>_off" name="sharethis_<?php echo esc_attr( $type ); ?>_settings[<?php echo esc_attr( $option ); ?>]" value="false" <?php echo false !== $option_value[ $option ] && 'false' === $option_value[ $option ] ? 'checked="checked"' : esc_attr( $default['false'] ); ?>>
<div class="label-text"><?php esc_html_e( 'Off', 'sharethis-share-buttons' ); ?></div>
</label>
<div class="option-title"><?php echo esc_html( $title ); ?></div>
<?php if ( $margin ) : ?>
<button class="margin-control-button<?php echo ' ' . esc_attr( $active['class'] ); ?>" type="button">
<?php esc_html_e( 'margin', 'sharethis-share-buttons' ); ?>
<span class="margin-on-off"><?php echo esc_html( $active['onoff'] ); ?></span>
</button>
<div class="margin-input-fields">
<?php esc_html_e( 'top', 'sharethis-share-buttons' ); ?> <input id="sharethis_<?php echo esc_attr( $type ); ?>_settings_<?php echo esc_attr( $option ); ?>_margin_top" name="sharethis_<?php echo esc_attr( $type ); ?>_settings[<?php echo esc_attr( $option ); ?>_margin_top]" type="number" value="<?php echo intval( $option_value[ $option . '_margin_top' ] ); ?>" min="0"> px
<span class="margin-input-spacer">|</span>
<?php esc_html_e( 'bottom', 'sharethis-share-buttons' ); ?> <input id="sharethis_<?php echo esc_attr( $type ); ?>_settings_<?php echo esc_attr( $option ); ?>_margin_bottom" name="sharethis_<?php echo esc_attr( $type ); ?>_settings[<?php echo esc_attr( $option ); ?>_margin_bottom]" type="number" value="<?php echo intval( $option_value[ $option . '_margin_bottom' ] ); ?>" min="0"> px
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,25 @@
<?php
/**
* Share Button Settings Template
*
* The template wrapper for the share buttons settings page.
*
* @package ShareThisShareButtons
*/
?>
<hr class="wp-header-end" style="display:none;">
<div class="wrap sharethis-wrap">
<?php echo wp_kses_post( $description ); ?>
<div class="tabs-wrap">
<?php require $this->plugin->dir_path . '/templates/share-buttons/tabs.php'; ?>
</div>
<form action="options.php" method="post" id="sharethissharebuttonsform" name="sharethissharebuttonsform">
<?php
settings_fields( $this->menu_slug . '-share-buttons' );
do_settings_sections( $this->menu_slug . '-share-buttons' );
submit_button( esc_html__( 'Update', 'sharethis-share-buttons' ) );
?>
</form>
</div>

View File

@@ -0,0 +1,16 @@
<?php
/**
* Shortcode Template
*
* The template wrapper for inline share button shortcode.
*
* @package ShareThisShareButtons
*/
?>
<textarea id="holdtext" style="display:none;"></textarea>
<div class="readonly-input-field">
<input type="text" id="inline-<?php echo esc_attr( $type['type'] ); ?>" value="<?php echo esc_attr( $type['value'] ); ?>" readonly size="40"/>
<button type="button" id="copy-<?php echo esc_attr( $type['type'] ); ?>"><?php esc_html_e( 'Copy', 'sharethis-share-buttons' ); ?></button>
</div>

View File

@@ -0,0 +1,44 @@
<?php
/**
* Template for ssb selector.
*
* @package ShareThisShareButtons
*/
?>
<p class="st-preview-message ssb-select">
<?php esc_html_e( 'Preview: for reference only', 'sharethis-custom' ); ?>
</p>
<div class="network-select-type-wrap">
<h2 style="text-align: center;"><?php esc_html_e( 'Channels', 'sharethis-custom' ); ?></h2>
<div class="manual-share network-type st-radio-config engage">
<div class="item">
<input name="network-select-type engage" class="with-gap" type="radio" value="manual-share" checked="checked" />
<label>
<?php esc_html_e( 'Choose Buttons Manually', 'sharethis-custom' ); ?>
</label>
<p>
<?php esc_html_e( 'Select your own social networks and customize', 'sharethis-custom' ); ?>
</p>
</div>
</div>
<div class="smart-share network-type st-radio-config">
<div class="item">
<input name="network-select-type" class="with-gap" type="radio" value="smart-share" />
<label>
<?php esc_html_e( 'Smart Share Buttons', 'sharethis-custom' ); ?>
</label>
</div>
<p>
<?php esc_html_e( 'Automatically selects which social channels to display based on each users geolocation and device type', 'sharethis-custom' ); ?>
</p>
<label for="social-service-count">
<?php esc_html_e( 'Select the number or Social Services' ); ?>
<select id="social-service-count" name="social-service-count">
<?php foreach ( array( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ) as $count ) : ?>
<option value="<?php echo esc_html( $count ); ?>" <?php echo selected( 6, $count ); ?>><?php echo esc_html( $count ); ?></option>
<?php endforeach; ?>
</select>
</label>
</div>
</div>

View File

@@ -0,0 +1,23 @@
<?php
/**
* Tabs for product select.
*
* @package ShareThisShareButtons
*/
?>
<div class="button-tab inline engage">
<img src="<?php echo esc_url( $this->plugin->dir_url ) . '/assets/inline-share-buttons.svg'; ?>">
<?php esc_html_e( 'Inline Share Buttons' ); ?>
<span><?php echo esc_html( $enabled['inline'] ); ?></span>
</div>
<div class="button-tab sticky">
<img src="<?php echo esc_url( $this->plugin->dir_url ) . '/assets/sticky-share-buttons.svg'; ?>">
<?php esc_html_e( 'Sticky Share Buttons' ); ?>
<span><?php echo esc_html( $enabled['sticky'] ); ?></span>
</div>
<div class="button-tab gdpr">
<img src="<?php echo esc_url( $this->plugin->dir_url ) . '/assets/consent-management-platform.svg'; ?>">
<?php esc_html_e( 'Consent Management Platform' ); ?>
<span><?php echo esc_html( $enabled['gdpr'] ); ?></span>
</div>

View File

@@ -16,10 +16,14 @@
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'thbusiness' ), __( '1 Comment', 'thbusiness' ), __( '% Comments', 'thbusiness' ) ); ?></span>
<?php endif; ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<?php thbusiness_featured_image(); ?>
<!-- Social Media Share buttons -->
<div id="sharethis" style="margin-bottom:27px;"><?php echo sharethis_inline_buttons(); ?></div>
<div class="entry-content">
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'thbusiness' ),

View File

@@ -30,6 +30,7 @@ get_header(); ?>
</div><!-- #primary -->
</div><!-- .col-xs-12 col-sm-6 col-md-8 -->
<div class="col-xl-8 col-md-9 col-xs-9" style="margin:0px auto;">
</div><!-- .col-xs-12 .col-sm-6 .col-md-4 -->