initial commit

development
Michael Ochmann 3 weeks ago
commit 51d6a5057a
  1. 17
      .gitignore
  2. 45
      css/wp-social-icons.css
  3. 31
      fonts/wp-social-icons/fonts/WP-Social-Icons.svg
  4. BIN
      fonts/wp-social-icons/fonts/WP-Social-Icons.ttf
  5. BIN
      fonts/wp-social-icons/fonts/WP-Social-Icons.woff
  6. 1
      fonts/wp-social-icons/selection.json
  7. 89
      fonts/wp-social-icons/style.css
  8. 42
      javascript/blocks/wpsi-menu/build/block.json
  9. 31
      javascript/blocks/wpsi-menu/build/index-rtl.css
  10. 1
      javascript/blocks/wpsi-menu/build/index.asset.php
  11. 33
      javascript/blocks/wpsi-menu/build/index.css
  12. 1
      javascript/blocks/wpsi-menu/build/index.css.map
  13. 616
      javascript/blocks/wpsi-menu/build/index.js
  14. 1
      javascript/blocks/wpsi-menu/build/index.js.map
  15. 11
      javascript/blocks/wpsi-menu/build/render.php
  16. 36
      javascript/blocks/wpsi-menu/build/style-index-rtl.css
  17. 38
      javascript/blocks/wpsi-menu/build/style-index.css
  18. 1
      javascript/blocks/wpsi-menu/build/style-index.css.map
  19. 19680
      javascript/blocks/wpsi-menu/package-lock.json
  20. 23
      javascript/blocks/wpsi-menu/package.json
  21. 35
      javascript/blocks/wpsi-menu/src/block.json
  22. 94
      javascript/blocks/wpsi-menu/src/edit.js
  23. 28
      javascript/blocks/wpsi-menu/src/editor.css
  24. 1
      javascript/blocks/wpsi-menu/src/editor.css.map
  25. 40
      javascript/blocks/wpsi-menu/src/editor.scss
  26. 10
      javascript/blocks/wpsi-menu/src/index.js
  27. 11
      javascript/blocks/wpsi-menu/src/render.php
  28. 33
      javascript/blocks/wpsi-menu/src/save.js
  29. 33
      javascript/blocks/wpsi-menu/src/style.css
  30. 1
      javascript/blocks/wpsi-menu/src/style.css.map
  31. 42
      javascript/blocks/wpsi-menu/src/style.scss
  32. 42
      javascript/wp-social-icons-admin.js
  33. 23
      src/Backend.php
  34. 26
      src/Blocks.php
  35. 66
      src/Frontend.php
  36. 55
      src/Plugin.php
  37. 82
      src/Settings.php
  38. 23
      src/Template.php
  39. 44
      type
  40. 10
      views/settings.html
  41. 17
      wp-social-icons.php

17
.gitignore vendored

@ -0,0 +1,17 @@
.idea
.vscode
.DS_Store
build/Release
node_modules
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.zip
*.tgz
.env
.eslintcache

@ -0,0 +1,45 @@
:root {
--wpsi-accent-color: orange;
}
.wpsi-icons {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 3rem;
padding: 3rem;
}
.wpsi-icons .icon {
text-align: center;
border: solid 3px #aaa;
border-radius: 12px;
padding: 2rem;
color: #888;
transition: all 0.2s ease-in-out;
background: rgba(255,255,255,0.8);
}
.wpsi-icons .wpsi {
font-size: 3rem;
display: block;
}
.wpsi-icons .name {
margin: 1rem 0;
font-size: 1.2rem;
display: block;
}
.wpsi-icons input {
display: block;
width: 100%;
border: solid 1px #ddd !important;
box-shadow: none !important;
border-radius: 0;
outline: 0 !important;
}
.wpsi-icons input:focus {
border: solid 1px var(--wpsi-accent-color) !important;
}
.wpsi-icons .icon:has(input:not(:placeholder-shown)) {
border-color: var(--wpsi-accent-color);
}
.wpsi-icons .icon:has(input:not(:placeholder-shown)) .wpsi {
color: var(--wpsi-accent-color);
}

@ -0,0 +1,31 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="WP-Social-Icons" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe900;" glyph-name="wechat" horiz-adv-x="1170" d="M331.429 687.428c0 31.429-20.571 52-52 52-30.857 0-62.286-20.571-62.286-52 0-30.857 31.429-51.429 62.286-51.429 31.429 0 52 20.571 52 51.429zM756 397.714c0 20.571-20.571 41.143-52 41.143-20.571 0-41.143-20.571-41.143-41.143 0-21.143 20.571-41.714 41.143-41.714 31.429 0 52 20.571 52 41.714zM621.143 687.428c0 31.429-20.571 52-51.429 52-31.429 0-62.286-20.571-62.286-52 0-30.857 30.857-51.429 62.286-51.429 30.857 0 51.429 20.571 51.429 51.429zM984 397.714c0 20.571-21.143 41.143-52 41.143-20.571 0-41.143-20.571-41.143-41.143 0-21.143 20.571-41.714 41.143-41.714 30.857 0 52 20.571 52 41.714zM832 624.571c-13.143 1.714-26.286 2.286-40 2.286-196.571 0-352-146.857-352-327.429 0-30.286 4.571-59.429 13.143-86.857-13.143-1.143-25.714-1.714-38.857-1.714-52 0-93.143 10.286-145.143 20.571l-144.571-72.571 41.143 124.571c-103.429 72.571-165.714 166.286-165.714 280 0 197.143 186.286 352 414.286 352 203.429 0 382.286-124 417.714-290.857zM1170.286 304c0-93.143-61.714-176-145.143-238.286l31.429-103.429-113.714 62.286c-41.714-10.286-83.429-21.143-124.571-21.143-197.143 0-352 134.857-352 300.571s154.857 300.571 352 300.571c186.286 0 352-134.857 352-300.571z" />
<glyph unicode="&#xe901;" glyph-name="snapchat" horiz-adv-x="951" d="M484.571 877.714c102.857 1.143 188-56.571 230.857-149.143 13.143-28 15.429-71.429 15.429-102.286 0-36.571-2.857-72.571-5.143-109.143 4.571-2.286 10.857-4 16-4 20.571 0 37.714 15.429 58.286 15.429 19.429 0 47.429-13.714 47.429-36.571 0-54.857-114.857-44.571-114.857-92.571 0-8.571 3.429-16.571 6.857-24.571 27.429-60 79.429-117.714 141.143-143.429 14.857-6.286 29.714-9.714 45.714-13.143 10.286-2.286 16-9.714 16-20 0-38.857-98.857-54.857-125.143-58.857-11.429-17.714-2.857-59.429-33.143-59.429-23.429 0-46.857 7.429-72 7.429-12 0-24-0.571-35.429-2.857-68-11.429-90.857-84.571-202.286-84.571-107.429 0-133.143 73.143-199.429 84.571-12 2.286-24 2.857-36 2.857-25.714 0-50.286-8.571-70.857-8.571-32 0-22.286 42.286-34.286 60.571-26.286 4-125.143 20-125.143 58.857 0 10.286 5.714 17.714 16 20 16 3.429 30.857 6.857 45.714 13.143 61.143 25.143 114.286 83.429 141.143 143.429 3.429 8 6.857 16 6.857 24.571 0 48-115.429 38.857-115.429 92 0 22.286 26.286 36.571 46.286 36.571 17.714 0 35.429-14.857 57.714-14.857 6.286 0 12.571 1.143 18.286 4-2.286 36-5.143 72-5.143 108.571 0 30.857 2.286 74.857 15.429 102.857 50.286 108.571 135.429 148 249.143 149.143z" />
<glyph unicode="&#xe902;" glyph-name="baidu" d="M183.979 420.267c111.36 23.979 96 157.184 92.843 186.283-5.461 44.8-58.283 123.221-129.877 116.907-90.027-7.936-103.168-138.24-103.168-138.24-12.245-60.16 29.099-188.843 140.203-164.907zM390.699 643.883c61.44 0 111.104 70.827 111.104 158.293 0 87.040-49.493 157.867-110.933 157.867s-111.403-70.443-111.403-157.909 49.92-158.293 111.36-158.293zM655.659 633.387c82.347-11.093 134.912 76.8 145.579 143.36 10.667 66.133-42.667 143.36-100.693 156.587-58.453 13.483-130.56-79.957-137.813-140.8-7.68-74.667 10.667-148.907 92.587-159.445zM981.333 521.216c0 31.829-26.155 127.701-124.16 127.701-97.92 0-111.36-90.453-111.36-154.453 0-61.013 5.035-145.92 127.36-143.36 121.813 2.987 108.501 138.24 108.501 170.24zM857.6 242.347c0 0-127.36 98.56-201.643 204.8-100.693 156.885-243.84 93.013-291.584 13.483-47.787-80.341-122.027-130.645-132.48-144.085-10.667-13.227-153.6-90.453-121.771-231.253 32-140.8 143.36-138.24 143.36-138.24s81.92-8.107 177.493 13.227 177.493-5.12 177.493-5.12 222.165-74.667 283.648 68.693c60.757 143.787-34.56 218.027-34.56 218.027z" />
<glyph unicode="&#xe903;" glyph-name="medium" d="M0 960v-1024h1024v1024zM850.688 717.397l-54.912-52.651c-3.862-2.96-6.327-7.575-6.327-12.766 0-0.947 0.082-1.874 0.239-2.775l-0.014 0.096v-386.859c-0.139-0.794-0.219-1.709-0.219-2.642 0-5.188 2.462-9.8 6.282-12.733l0.038-0.028 53.632-52.651v-11.563h-269.739v11.52l55.552 53.973c5.461 5.461 5.461 7.040 5.461 15.36v312.747l-154.453-392.32h-20.907l-179.883 392.32v-262.955c-0.21-1.465-0.329-3.157-0.329-4.877 0-9.839 3.918-18.762 10.279-25.296l-0.008 0.008 72.277-87.637v-11.563h-204.885v11.52l72.32 87.68c6.063 6.283 9.799 14.847 9.799 24.283 0 2.078-0.181 4.114-0.529 6.092l0.031-0.21v304.043c0.088 0.812 0.138 1.755 0.138 2.708 0 7.838-3.387 14.884-8.776 19.756l-0.023 0.021-64.256 77.397v11.52h199.424l154.155-338.048 135.509 338.091h190.123z" />
<glyph unicode="&#xe904;" glyph-name="discord" d="M862.805 960c59.989 0 108.373-48.512 111.232-105.6v-918.4l-114.219 96.981-62.72 57.088-68.437 59.648 28.587-94.080h-598.955c-59.819 0-108.373 45.44-108.373 105.643v692.907c0 57.088 48.64 105.685 108.587 105.685h704zM601.771 717.525h-1.28l-8.619-8.533c88.448-25.6 131.243-65.579 131.243-65.579-57.003 28.501-108.373 42.752-159.744 48.512-37.12 5.76-74.24 2.731-105.6 0h-8.533c-20.053 0-62.72-8.533-119.893-31.36-19.925-8.661-31.36-14.336-31.36-14.336s42.752 42.752 136.96 65.579l-5.76 5.76c0 0-71.339 2.731-148.352-54.187 0 0-77.013-134.144-77.013-299.52 0 0 42.667-74.24 159.701-77.056 0 0 17.067 22.741 34.347 42.752-65.707 19.968-91.307 59.904-91.307 59.904s5.717-2.816 14.293-8.533h2.56c1.28 0 1.877-0.64 2.56-1.28v-0.256c0.683-0.683 1.28-1.28 2.56-1.28 14.080-5.803 28.16-11.52 39.68-17.067 19.883-8.619 45.44-17.195 76.8-22.869 39.68-5.76 85.163-8.533 136.96 0 25.6 5.76 51.2 11.392 76.8 22.827 16.64 8.533 37.12 17.067 59.605 31.445 0 0-25.6-39.936-94.080-59.904 14.080-19.883 33.92-42.667 33.92-42.667 117.077 2.56 162.56 76.8 165.12 73.643 0 165.12-77.44 299.52-77.44 299.52-69.76 51.797-135.040 53.76-146.56 53.76zM608.939 529.237c29.995 0 54.187-25.6 54.187-56.96 0-31.573-24.32-57.173-54.187-57.173s-54.187 25.6-54.187 56.917c0.085 31.573 24.448 57.088 54.187 57.216zM415.104 529.237c29.867 0 54.016-25.6 54.016-56.96 0-31.573-24.32-57.173-54.187-57.173s-54.187 25.6-54.187 56.917c0 31.573 24.32 57.088 54.357 57.216z" />
<glyph unicode="&#xe905;" glyph-name="teams" d="M394.837 721.237h100.864c26.027 0 47.061-21.077 47.061-47.104v-67.499c81.16 1.581 146.347 67.746 146.347 149.136 0 82.38-66.782 149.163-149.163 149.163s-149.163-66.782-149.163-149.163c0-12.253 1.477-24.161 4.264-35.555l-0.211 1.022zM866.219 606.549h0.085c0.025 0 0.055 0 0.085 0 56.648 0 102.571 45.922 102.571 102.571 0 56.618-45.874 102.522-102.481 102.571h-0.005c-0.038 0-0.083 0-0.128 0-56.648 0-102.571-45.922-102.571-102.571 0-56.603 45.85-102.498 102.436-102.571h0.007zM521.301 221.141v435.072c0 24.021-19.456 43.52-43.477 43.563h-435.157c-23.989-0.073-43.411-19.524-43.435-43.518v-435.159c0.024-24.002 19.475-43.453 43.475-43.477h435.202c23.98 0.073 43.392 19.529 43.392 43.52 0 0 0 0 0 0v0zM372.309 540.715h-85.163v-242.901h-54.187v242.944h-84.736v47.147h224.085zM981.888 550.571h-439.083v-347.307c0-26.027-21.12-47.104-47.104-47.104h-179.968c39.377-97.475 133.224-165 242.843-165 34.634 0 67.693 6.74 97.938 18.981l-1.752-0.627c61.458 24.801 110.193 70.411 138.412 127.913l0.682 1.538c20.827-10.891 45.492-17.28 71.65-17.28 0.071 0 0.141 0 0.211 0h1.141c87.211 0 157.909 70.698 157.909 157.909v0 228.096c0 23.68-19.2 42.88-42.88 42.88z" />
<glyph unicode="&#xe906;" glyph-name="x" d="M778.411 864h141.141l-308.352-352.427 362.752-479.573h-284.032l-222.464 290.859-254.549-290.859h-141.227l329.813 376.96-347.989 455.040h291.243l201.088-265.856zM728.875 116.48h78.208l-504.832 667.477h-83.925z" />
<glyph unicode="&#xe907;" glyph-name="mastodon" d="M989.568 623.829c0 222.123-145.536 287.232-145.536 287.232-73.387 33.707-199.424 47.872-330.283 48.939h-3.243c-130.901-1.067-256.853-15.232-330.24-48.939 0 0-145.536-65.109-145.536-287.232 0-50.859-0.981-111.701 0.64-176.171 5.291-217.259 39.851-431.317 240.683-484.48 92.587-24.491 172.117-29.653 236.16-26.112 116.139 6.4 181.333 41.472 181.333 41.472l-3.84 84.267c0 0-82.987-26.155-176.171-22.997-92.373 3.157-189.824 9.941-204.757 123.349-1.305 9.295-2.050 20.032-2.050 30.944 0 0.296 0.001 0.592 0.002 0.889v-0.046c0 0 90.667-22.187 205.525-27.435 70.229-3.2 136.107 4.139 203.008 12.075 128.299 15.317 240 94.379 254.037 166.613 22.059 113.707 20.267 277.632 20.267 277.632zM817.877 337.579h-106.539v261.077c0 55.040-23.168 82.944-69.461 82.944-51.2 0-76.885-33.109-76.885-98.645v-142.891h-105.941v142.933c0 65.536-25.685 98.645-76.885 98.645-46.293 0-69.461-27.947-69.461-82.944v-261.077h-106.539v268.928c0 54.997 13.995 98.688 42.112 130.987 29.013 32.341 66.944 48.896 114.091 48.896 54.528 0 95.829-20.949 123.136-62.891l26.496-44.501 26.539 44.501c27.307 41.941 68.608 62.891 123.136 62.891 47.104 0 85.077-16.555 114.091-48.896 28.075-32.299 42.069-75.989 42.069-130.987z" />
<glyph unicode="&#xe908;" glyph-name="tiktok" d="M534.613 959.147c55.893 0.853 111.36 0.427 166.827 0.853 3.413-65.28 26.88-131.84 74.667-177.92 47.787-47.36 115.2-69.12 180.907-76.373v-171.947c-61.44 2.133-123.307 14.933-179.2 41.387-24.32 11.093-46.933 25.173-69.12 39.68-0.427-124.587 0.427-249.173-0.853-373.333-3.413-59.733-23.040-119.040-57.6-168.107-55.893-81.92-152.747-135.253-252.16-136.96-61.013-3.413-122.027 13.227-174.080 43.947-86.187 50.773-146.773 143.787-155.733 243.627-0.853 21.333-1.28 42.667-0.427 63.573 7.68 81.067 47.787 158.72 110.080 211.627 70.827 61.44 169.813 90.88 262.4 73.387 0.853-63.147-1.707-126.293-1.707-189.44-42.24 13.653-91.733 9.813-128.853-15.787-26.88-17.493-47.36-44.373-58.027-74.667-8.96-21.76-6.4-45.653-5.973-68.693 10.24-69.973 77.653-128.853 149.333-122.453 47.787 0.427 93.44 28.16 118.187 68.693 8.107 14.080 17.067 28.587 17.493 45.227 4.267 76.373 2.56 152.32 2.987 228.693 0.427 171.947-0.427 343.467 0.853 514.987z" />
<glyph unicode="&#xe909;" glyph-name="whatsapp" d="M873 811.2c-95.8 96-223.2 148.8-359 148.8-279.6 0-507.2-227.6-507.2-507.4 0-89.4 23.4-176.8 67.8-253.6l-72-263 269 70.6c74.2-40.4 157.6-61.8 242.4-61.8h0.2c0 0 0 0 0 0 279.6 0 507.4 227.6 507.4 507.4 0 135.6-52.8 263-148.6 359zM514.2 30.4v0c-75.8 0-150 20.4-214.8 58.8l-15.4 9.2-159.6-41.8 42.6 155.6-10 16c-42.4 67-64.6 144.6-64.6 224.4 0 232.6 189.2 421.8 422 421.8 112.6 0 218.6-44 298.2-123.6 79.6-79.8 123.4-185.6 123.4-298.4-0.2-232.8-189.4-422-421.8-422zM745.4 346.4c-12.6 6.4-75 37-86.6 41.2s-20 6.4-28.6-6.4c-8.4-12.6-32.8-41.2-40.2-49.8-7.4-8.4-14.8-9.6-27.4-3.2s-53.6 19.8-102 63c-37.6 33.6-63.2 75.2-70.6 87.8s-0.8 19.6 5.6 25.8c5.8 5.6 12.6 14.8 19 22.2s8.4 12.6 12.6 21.2c4.2 8.4 2.2 15.8-1 22.2s-28.6 68.8-39 94.2c-10.2 24.8-20.8 21.4-28.6 21.8-7.4 0.4-15.8 0.4-24.2 0.4s-22.2-3.2-33.8-15.8c-11.6-12.6-44.4-43.4-44.4-105.8s45.4-122.6 51.8-131.2c6.4-8.4 89.4-136.6 216.6-191.4 30.2-13 53.8-20.8 72.2-26.8 30.4-9.6 58-8.2 79.8-5 24.4 3.6 75 30.6 85.6 60.2s10.6 55 7.4 60.2c-3 5.6-11.4 8.8-24.2 15.2z" />
<glyph unicode="&#xe90a;" glyph-name="wordpress" d="M128 448.008c0-148.026 88.322-275.968 216.43-336.578l-183.178 488.784c-21.308-46.508-33.252-97.982-33.252-152.206zM771.228 466.872c0 46.234-17.054 78.236-31.654 103.142-19.458 30.82-37.72 56.894-37.72 87.716 0 34.374 26.766 66.376 64.486 66.376 1.704 0 3.32-0.204 4.976-0.302-68.316 60.97-159.34 98.196-259.308 98.196-134.16 0-252.186-67.046-320.844-168.568 9.010-0.282 17.506-0.454 24.712-0.454 40.154 0 102.34 4.752 102.34 4.752 20.69 1.182 23.132-28.434 2.458-30.822 0 0-20.81-2.368-43.952-3.55l139.834-405.106 84.044 245.456-59.822 159.65c-20.688 1.184-40.278 3.55-40.278 3.55-20.702 1.192-18.272 32.002 2.438 30.822 0 0 63.4-4.752 101.134-4.752 40.146 0 102.35 4.752 102.35 4.752 20.702 1.182 23.14-28.434 2.446-30.822 0 0-20.834-2.372-43.948-3.55l138.78-402.018 38.312 124.632c16.58 51.75 29.216 88.9 29.216 120.9zM518.742 415.296l-115.226-326.058c34.416-9.858 70.794-15.238 108.488-15.238 44.716 0 87.604 7.518 127.518 21.2-1.018 1.602-1.974 3.304-2.75 5.154l-118.030 314.942zM848.962 627.428c1.652-11.91 2.588-24.686 2.588-38.458 0-37.93-7.292-80.596-29.202-133.95l-117.286-330.272c114.162 64.828 190.938 185.288 190.938 323.258 0 65.030-17.060 126.16-47.038 179.422zM512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 0c-247.424 0-448 200.576-448 448s200.576 448 448 448 448-200.576 448-448-200.576-448-448-448z" />
<glyph unicode="&#xe90b;" glyph-name="tumblr" d="M576.032 512l-0.002-234.184c0-59.418-0.77-93.656 5.53-110.5 6.25-16.754 21.918-34.146 38.99-44.202 22.684-13.588 48.542-20.376 77.708-20.376 51.854 0 82.478 6.848 133.742 40.54v-153.944c-43.7-20.552-81.866-32.594-117.324-40.922-35.5-8.242-73.86-12.406-115.064-12.406-46.828 0-74.456 5.886-110.41 17.656-35.958 11.868-66.66 28.806-92.020 50.54-25.45 21.922-43.022 45.208-52.848 69.832-9.826 24.636-14.716 60.414-14.716 107.244v359.1h-137.426v145.006c40.208 13.042 85.164 31.788 113.78 56.152 28.754 24.45 51.766 53.706 69.106 87.944 17.392 34.146 29.348 77.712 35.872 130.516h165.084l-0.002-255.996h255.968v-192h-255.968z" />
<glyph unicode="&#xe90c;" glyph-name="twitch" d="M96 960l-96-160v-736h256v-128h128l128 128h160l288 288v608h-864zM832 416l-160-160h-160l-128-128v128h-192v576h640v-416zM608 704h96v-256h-96v256zM416 704h96v-256h-96v256z" />
<glyph unicode="&#xe90d;" glyph-name="reddit" d="M256 320c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM640 320c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM643.112 183.222c16.482 12.986 40.376 10.154 53.364-6.332s10.152-40.378-6.334-53.366c-45.896-36.158-115.822-59.524-178.142-59.524-62.322 0-132.248 23.366-178.144 59.522-16.486 12.99-19.32 36.882-6.332 53.368 12.99 16.482 36.882 19.318 53.366 6.332 26.422-20.818 78.722-43.222 131.11-43.222s104.688 22.404 131.112 43.222zM1024 448c0 70.692-57.308 128-128 128-48.116 0-89.992-26.57-111.852-65.82-65.792 35.994-145.952 59.246-233.28 64.608l76.382 171.526 146.194-42.2c13.152-37.342 48.718-64.114 90.556-64.114 53.020 0 96 42.98 96 96s-42.98 96-96 96c-36.56 0-68.342-20.442-84.554-50.514l-162.906 47.024c-18.224 5.258-37.538-3.722-45.252-21.052l-103.77-233.026c-85.138-5.996-163.262-29.022-227.636-64.236-21.864 39.25-63.766 65.804-111.882 65.804-70.692 0-128-57.308-128-128 0-52.312 31.402-97.254 76.372-117.102-8.070-24.028-12.372-49.104-12.372-74.898 0-176.73 200.576-320 448-320 247.422 0 448 143.27 448 320 0 25.792-4.3 50.862-12.368 74.886 44.97 19.85 76.368 64.802 76.368 117.114zM864 772c19.882 0 36-16.118 36-36s-16.118-36-36-36-36 16.118-36 36 16.118 36 36 36zM64 448c0 35.29 28.71 64 64 64 25.508 0 47.572-15.004 57.846-36.646-33.448-25.366-61.166-54.626-81.666-86.738-23.524 9.47-40.18 32.512-40.18 59.384zM512 12c-205.45 0-372 109.242-372 244s166.55 244 372 244c205.45 0 372-109.242 372-244s-166.55-244-372-244zM919.82 388.616c-20.5 32.112-48.218 61.372-81.666 86.738 10.276 21.642 32.338 36.646 57.846 36.646 35.29 0 64-28.71 64-64 0-26.872-16.656-49.914-40.18-59.384z" />
<glyph unicode="&#xe90e;" glyph-name="spotify" d="M512 960c-281.6 0-512-230.4-512-512s230.4-512 512-512 512 230.4 512 512-227.8 512-512 512zM747.6 220.2c-10.2-15.4-28.2-20.4-43.6-10.2-120.4 74.2-271.4 89.6-450.6 48.6-18-5.2-33.2 7.6-38.4 23-5.2 18 7.6 33.2 23 38.4 194.6 43.6 363.6 25.6 496.6-56.4 18-7.6 20.6-28 13-43.4zM809 361c-12.8-18-35.8-25.6-53.8-12.8-138.2 84.4-348.2 110-509.4 58.8-20.4-5.2-43.6 5.2-48.6 25.6-5.2 20.4 5.2 43.6 25.6 48.6 186.8 56.4 417.2 28.2 576-69.2 15.2-7.6 23-33.2 10.2-51zM814 504.4c-163.8 97.2-437.8 107.6-594 58.8-25.6-7.6-51.2 7.6-58.8 30.8-7.6 25.6 7.6 51.2 30.8 58.8 181.8 53.8 481.2 43.6 670.8-69.2 23-12.8 30.8-43.6 18-66.6-13-17.8-43.6-25.4-66.8-12.6z" />
<glyph unicode="&#xe90f;" glyph-name="telegram" d="M512 960c-282.8 0-512-229.2-512-512s229.2-512 512-512 512 229.2 512 512-229.2 512-512 512zM763.6 609l-84-395.8c-5.8-28.2-22.8-34.8-46.4-21.8l-128 94.6-61.4-59.8c-7.2-7-12.8-12.8-25.6-12.8-16.6 0-13.8 6.2-19.4 22l-43.6 143.2-126.6 39.4c-27.4 8.4-27.6 27.2 6.2 40.6l493.2 190.4c22.4 10.2 44.2-5.4 35.6-40z" />
<glyph unicode="&#xe910;" glyph-name="pinterest" d="M512 891.6c-245 0-443.6-198.6-443.6-443.6 0-188 117-348.4 282-413-3.8 35-7.4 89 1.6 127.2 8 34.6 52 220.4 52 220.4s-13.2 26.6-13.2 65.8c0 61.6 35.8 107.8 80.2 107.8 37.8 0 56.2-28.4 56.2-62.4 0-38-24.2-95-36.8-147.6-10.6-44.2 22-80.2 65.6-80.2 78.8 0 139.4 83.2 139.4 203.2 0 106.2-76.4 180.4-185.2 180.4-126.2 0-200.2-94.6-200.2-192.6 0-38.2 14.6-79 33-101.2 3.6-4.4 4.2-8.2 3-12.8-3.4-14-10.8-44.2-12.4-50.4-2-8.2-6.4-9.8-14.8-6-55.4 25.8-90 106.8-90 171.8 0 140 101.6 268.4 293 268.4 153.8 0 273.4-109.6 273.4-256.2 0-152.8-96.4-276-230.2-276-45 0-87.2 23.4-101.6 51 0 0-22.2-84.6-27.6-105.4-10-38.6-37-86.8-55.2-116.2 41.6-12.8 85.6-19.8 131.4-19.8 245 0 443.6 198.6 443.6 443.6 0 245.2-198.6 443.8-443.6 443.8z" />
<glyph unicode="&#xe911;" glyph-name="youtube" d="M1013.8 652.8c0 0-10 70.6-40.8 101.6-39 40.8-82.6 41-102.6 43.4-143.2 10.4-358.2 10.4-358.2 10.4h-0.4c0 0-215 0-358.2-10.4-20-2.4-63.6-2.6-102.6-43.4-30.8-31-40.6-101.6-40.6-101.6s-10.2-82.8-10.2-165.8v-77.6c0-82.8 10.2-165.8 10.2-165.8s10-70.6 40.6-101.6c39-40.8 90.2-39.4 113-43.8 82-7.8 348.2-10.2 348.2-10.2s215.2 0.4 358.4 10.6c20 2.4 63.6 2.6 102.6 43.4 30.8 31 40.8 101.6 40.8 101.6s10.2 82.8 10.2 165.8v77.6c-0.2 82.8-10.4 165.8-10.4 165.8zM406.2 315.2v287.8l276.6-144.4-276.6-143.4z" />
<glyph unicode="&#xe912;" glyph-name="xing" d="M928 960h-832c-52.8 0-96-43.2-96-96v-832c0-52.8 43.2-96 96-96h832c52.8 0 96 43.2 96 96v832c0 52.8-43.2 96-96 96zM312.6 294h-110.6c-6.6 0-11.6 3-14.4 7.6-3 4.8-3 10.8 0 17l117.6 207.6c0.2 0.2 0.2 0.4 0 0.6l-74.8 129.6c-3 6.2-3.6 12.2-0.6 17 2.8 4.6 8.4 7 15.2 7h110.8c17 0 25.4-11 30.8-20.8 0 0 75.6-132 76.2-132.8-4.4-8-119.6-211.4-119.6-211.4-6-10.4-14-21.4-30.6-21.4zM836.4 807.8l-245.2-433.6c-0.2-0.2-0.2-0.6 0-0.8l156.2-285.2c3-6.2 3.2-12.4 0.2-17.2-2.8-4.6-8-7-14.8-7h-110.6c-17 0-25.4 11.2-31 21 0 0-157 288-157.4 288.8 7.8 13.8 246.4 437 246.4 437 6 10.6 13.2 21 29.6 21h112.2c6.6 0 12-2.6 14.8-7 2.8-4.6 2.8-10.8-0.4-17z" />
<glyph unicode="&#xe913;" glyph-name="instagram" d="M512 867.8c136.8 0 153-0.6 206.8-3 50-2.2 77-10.6 95-17.6 23.8-9.2 41-20.4 58.8-38.2 18-18 29-35 38.4-58.8 7-18 15.4-45.2 17.6-95 2.4-54 3-70.2 3-206.8s-0.6-153-3-206.8c-2.2-50-10.6-77-17.6-95-9.2-23.8-20.4-41-38.2-58.8-18-18-35-29-58.8-38.4-18-7-45.2-15.4-95-17.6-54-2.4-70.2-3-206.8-3s-153 0.6-206.8 3c-50 2.2-77 10.6-95 17.6-23.8 9.2-41 20.4-58.8 38.2-18 18-29 35-38.4 58.8-7 18-15.4 45.2-17.6 95-2.4 54-3 70.2-3 206.8s0.6 153 3 206.8c2.2 50 10.6 77 17.6 95 9.2 23.8 20.4 41 38.2 58.8 18 18 35 29 58.8 38.4 18 7 45.2 15.4 95 17.6 53.8 2.4 70 3 206.8 3zM512 960c-139 0-156.4-0.6-211-3-54.4-2.4-91.8-11.2-124.2-23.8-33.8-13.2-62.4-30.6-90.8-59.2-28.6-28.4-46-57-59.2-90.6-12.6-32.6-21.4-69.8-23.8-124.2-2.4-54.8-3-72.2-3-211.2s0.6-156.4 3-211c2.4-54.4 11.2-91.8 23.8-124.2 13.2-33.8 30.6-62.4 59.2-90.8 28.4-28.4 57-46 90.6-59 32.6-12.6 69.8-21.4 124.2-23.8 54.6-2.4 72-3 211-3s156.4 0.6 211 3c54.4 2.4 91.8 11.2 124.2 23.8 33.6 13 62.2 30.6 90.6 59s46 57 59 90.6c12.6 32.6 21.4 69.8 23.8 124.2 2.4 54.6 3 72 3 211s-0.6 156.4-3 211c-2.4 54.4-11.2 91.8-23.8 124.2-12.6 34-30 62.6-58.6 91-28.4 28.4-57 46-90.6 59-32.6 12.6-69.8 21.4-124.2 23.8-54.8 2.6-72.2 3.2-211.2 3.2v0zM512 711c-145.2 0-263-117.8-263-263s117.8-263 263-263 263 117.8 263 263c0 145.2-117.8 263-263 263zM512 277.4c-94.2 0-170.6 76.4-170.6 170.6s76.4 170.6 170.6 170.6c94.2 0 170.6-76.4 170.6-170.6s-76.4-170.6-170.6-170.6zM846.8 721.4c0-33.91-27.49-61.4-61.4-61.4s-61.4 27.49-61.4 61.4c0 33.91 27.49 61.4 61.4 61.4s61.4-27.49 61.4-61.4z" />
<glyph unicode="&#xe914;" glyph-name="facebook" d="M928 960h-832c-52.8 0-96-43.2-96-96v-832c0-52.8 43.2-96 96-96h416v448h-128v128h128v64c0 105.8 86.2 192 192 192h128v-128h-128c-35.2 0-64-28.8-64-64v-64h192l-32-128h-160v-448h288c52.8 0 96 43.2 96 96v832c0 52.8-43.2 96-96 96z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because one or more lines are too long

@ -0,0 +1,89 @@
@font-face {
font-family: 'WP-Social-Icons';
src:
url('fonts/WP-Social-Icons.ttf?iiiiaj') format('truetype'),
url('fonts/WP-Social-Icons.woff?iiiiaj') format('woff'),
url('fonts/WP-Social-Icons.svg?iiiiaj#WP-Social-Icons') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
[class^="wpsi-"], [class*=" wpsi-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'WP-Social-Icons' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.wpsi-wechat:before {
content: "\e900";
}
.wpsi-snapchat:before {
content: "\e901";
}
.wpsi-baidu:before {
content: "\e902";
}
.wpsi-medium:before {
content: "\e903";
}
.wpsi-discord:before {
content: "\e904";
}
.wpsi-teams:before {
content: "\e905";
}
.wpsi-x:before {
content: "\e906";
}
.wpsi-mastodon:before {
content: "\e907";
}
.wpsi-tiktok:before {
content: "\e908";
}
.wpsi-whatsapp:before {
content: "\e909";
}
.wpsi-wordpress:before {
content: "\e90a";
}
.wpsi-tumblr:before {
content: "\e90b";
}
.wpsi-twitch:before {
content: "\e90c";
}
.wpsi-reddit:before {
content: "\e90d";
}
.wpsi-spotify:before {
content: "\e90e";
}
.wpsi-telegram:before {
content: "\e90f";
}
.wpsi-pinterest:before {
content: "\e910";
}
.wpsi-youtube:before {
content: "\e911";
}
.wpsi-xing:before {
content: "\e912";
}
.wpsi-instagram:before {
content: "\e913";
}
.wpsi-facebook:before {
content: "\e914";
}

@ -0,0 +1,42 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "massivedynamic/wpsi-menu",
"version": "0.0.1",
"title": "WP Social Icons Menu",
"category": "widgets",
"icon": "networking",
"description": "WP Social Icons Menu Block for Gutenberg",
"example": {},
"supports": {
"html": false
},
"attributes": {
"orientation": {
"type": "string",
"enum": [
"horizontal",
"vertical"
],
"default": "horizontal"
},
"alignment": {
"type": "string",
"enum": [
"left",
"center",
"right"
],
"default": "center"
},
"exclude": {
"type": "array",
"default": []
}
},
"textdomain": "wpsi-menu",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"render": "file:./render.php"
}

@ -0,0 +1,31 @@
/*!****************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!
\****************************************************************************************************************************************************************************************************************************************/
.wpsi-menu {
padding: 2rem 0;
}
.wpsi-menu a {
text-decoration: none;
}
.wpsi-menu.align-left {
text-align: right;
}
.wpsi-menu.align-center {
text-align: center;
}
.wpsi-menu.align-right {
text-align: left;
}
.wpsi-menu.horizontal a:not(:last-of-type) {
margin-left: 2rem;
}
.wpsi-menu.vertical a {
display: block;
}
.wpsi-menu.vertical a:not(:last-of-type) {
margin-bottom: 2rem;
}
.wpsi-menu .wpsi {
font-size: 2rem;
color: #333;
}

@ -0,0 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '0f8272dc7fc5d65bc4e2');

@ -0,0 +1,33 @@
/*!****************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!
\****************************************************************************************************************************************************************************************************************************************/
.wpsi-menu {
padding: 2rem 0;
}
.wpsi-menu a {
text-decoration: none;
}
.wpsi-menu.align-left {
text-align: left;
}
.wpsi-menu.align-center {
text-align: center;
}
.wpsi-menu.align-right {
text-align: right;
}
.wpsi-menu.horizontal a:not(:last-of-type) {
margin-right: 2rem;
}
.wpsi-menu.vertical a {
display: block;
}
.wpsi-menu.vertical a:not(:last-of-type) {
margin-bottom: 2rem;
}
.wpsi-menu .wpsi {
font-size: 2rem;
color: #333;
}
/*# sourceMappingURL=index.css.map*/

@ -0,0 +1 @@
{"version":3,"file":"index.css","mappings":";;;AAAA;EACC;AACD;AACC;EACC;AACF;AAEC;EACC;AAAF;AAEC;EACC;AAAF;AAEC;EACC;AAAF;AAKG;EACC;AAHJ;AASE;EACC;AAPH;AASG;EACC;AAPJ;AAYC;EACC;EACA;AAVF,C","sources":["webpack://wpsi-menu/./src/editor.scss"],"sourcesContent":[".wpsi-menu {\n\tpadding: 2rem 0;\n\n\ta {\n\t\ttext-decoration: none;\n\t}\n\n\t&.align-left {\n\t\ttext-align: left;\n\t}\n\t&.align-center {\n\t\ttext-align: center;\n\t}\n\t&.align-right {\n\t\ttext-align: right;\n\t}\n\n\t&.horizontal {\n\t\ta {\n\t\t\t&:not(:last-of-type) {\n\t\t\t\tmargin-right: 2rem;\n\t\t\t}\n\t\t}\n\t}\n\n\t&.vertical {\n\t\ta {\n\t\t\tdisplay: block;\n\t\t\t\n\t\t\t&:not(:last-of-type) {\n\t\t\t\tmargin-bottom: 2rem;\n\t\t\t}\n\t\t}\n\t}\n\n\t.wpsi {\n\t\tfont-size: 2rem;\n\t\tcolor: #333;\n\t}\n}"],"names":[],"sourceRoot":""}

@ -0,0 +1,616 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/@wordpress/icons/build-module/library/align-center.js":
/*!****************************************************************************!*\
!*** ./node_modules/@wordpress/icons/build-module/library/align-center.js ***!
\****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
/**
* WordPress dependencies
*/
const alignCenter = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
d: "M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"
})
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (alignCenter);
//# sourceMappingURL=align-center.js.map
/***/ }),
/***/ "./node_modules/@wordpress/icons/build-module/library/align-left.js":
/*!**************************************************************************!*\
!*** ./node_modules/@wordpress/icons/build-module/library/align-left.js ***!
\**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
/**
* WordPress dependencies
*/
const alignLeft = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
d: "M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"
})
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (alignLeft);
//# sourceMappingURL=align-left.js.map
/***/ }),
/***/ "./node_modules/@wordpress/icons/build-module/library/align-right.js":
/*!***************************************************************************!*\
!*** ./node_modules/@wordpress/icons/build-module/library/align-right.js ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
/**
* WordPress dependencies
*/
const alignRight = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
d: "M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"
})
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (alignRight);
//# sourceMappingURL=align-right.js.map
/***/ }),
/***/ "./node_modules/@wordpress/icons/build-module/library/justify-center-vertical.js":
/*!***************************************************************************************!*\
!*** ./node_modules/@wordpress/icons/build-module/library/justify-center-vertical.js ***!
\***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
/**
* WordPress dependencies
*/
const justifyCenterVertical = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
d: "M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"
})
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (justifyCenterVertical);
//# sourceMappingURL=justify-center-vertical.js.map
/***/ }),
/***/ "./node_modules/@wordpress/icons/build-module/library/justify-center.js":
/*!******************************************************************************!*\
!*** ./node_modules/@wordpress/icons/build-module/library/justify-center.js ***!
\******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
/**
* WordPress dependencies
*/
const justifyCenter = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
d: "M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"
})
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (justifyCenter);
//# sourceMappingURL=justify-center.js.map
/***/ }),
/***/ "./src/block.json":
/*!************************!*\
!*** ./src/block.json ***!
\************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"massivedynamic/wpsi-menu","version":"0.0.1","title":"WP Social Icons Menu","category":"widgets","icon":"networking","description":"WP Social Icons Menu Block for Gutenberg","example":{},"supports":{"html":false},"attributes":{"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal"},"alignment":{"type":"string","enum":["left","center","right"],"default":"center"},"exclude":{"type":"array","default":[]}},"textdomain":"wpsi-menu","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php"}');
/***/ }),
/***/ "./src/edit.js":
/*!*********************!*\
!*** ./src/edit.js ***!
\*********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch");
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/justify-center.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/justify-center-vertical.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/align-left.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/align-center.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/align-right.js");
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./editor.scss */ "./src/editor.scss");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__);
const Edit = ({
attributes,
setAttributes
}) => {
const [items, setItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)([]);
const {
alignment,
orientation,
exclude
} = attributes;
const iterator = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useMemo)(() => {
const out = [];
for (const [key, value] of Object.entries(items)) out.push({
key,
value
});
return out;
}, [items]);
const activeItems = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useMemo)(() => {
return iterator.filter(item => !exclude.includes(item.key));
}, [iterator, exclude]);
const excludeService = service => {
setAttributes({
exclude: exclude.includes(service) ? exclude.filter(item => item !== service) : [...exclude, service]
});
};
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => {
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({
path: "/wp-social-icons/items"
}).then(response => {
setItems(response);
}).catch(error => console.error("ERR", error));
}, []);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("section", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)(),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
title: "Active Services",
initialOpen: true,
children: iterator.map(item => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelRow, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
label: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("span", {
className: `wpsi-${item.key}`,
style: {
fontSize: "1.2rem",
verticalAlign: "middle",
marginRight: "0.5rem"
}
}), " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("span", {
style: {
verticalAlign: "middle"
},
children: item.key
})]
}),
checked: !exclude.includes(item.key),
onChange: () => excludeService(item.key)
})
}))
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToolbarGroup, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToolbarButton, {
isActive: orientation === "horizontal",
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__["default"],
onClick: () => setAttributes({
orientation: "horizontal"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToolbarButton, {
isActive: orientation === "vertical",
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__["default"],
title: "wdwdwd",
onClick: () => setAttributes({
orientation: "vertical"
})
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToolbarGroup, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToolbarButton, {
isActive: alignment === "left",
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"],
title: "align left",
onClick: () => setAttributes({
alignment: "left"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToolbarButton, {
isActive: alignment === "center",
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"],
title: "align center",
onClick: () => setAttributes({
alignment: "center"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToolbarButton, {
isActive: alignment === "right",
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__["default"],
title: "align right",
onClick: () => setAttributes({
alignment: "right"
})
})]
})]
}), activeItems.length < 1 ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("section", {
children: "No elements"
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("nav", {
className: `wpsi-menu ${orientation} align-${alignment}`,
children: activeItems.map(item => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("a", {
href: item.value,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("span", {
className: `wpsi wpsi-${item.key}`
})
}))
})]
});
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Edit);
/***/ }),
/***/ "./src/editor.scss":
/*!*************************!*\
!*** ./src/editor.scss ***!
\*************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/index.js":
/*!**********************!*\
!*** ./src/index.js ***!
\**********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./edit */ "./src/edit.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/block.json");
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ "./src/style.scss");
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_2__.name, {
edit: _edit__WEBPACK_IMPORTED_MODULE_1__["default"]
});
/***/ }),
/***/ "./src/style.scss":
/*!************************!*\
!*** ./src/style.scss ***!
\************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "@wordpress/api-fetch":
/*!**********************************!*\
!*** external ["wp","apiFetch"] ***!
\**********************************/
/***/ ((module) => {
module.exports = window["wp"]["apiFetch"];
/***/ }),
/***/ "@wordpress/block-editor":
/*!*************************************!*\
!*** external ["wp","blockEditor"] ***!
\*************************************/
/***/ ((module) => {
module.exports = window["wp"]["blockEditor"];
/***/ }),
/***/ "@wordpress/blocks":
/*!********************************!*\
!*** external ["wp","blocks"] ***!
\********************************/
/***/ ((module) => {
module.exports = window["wp"]["blocks"];
/***/ }),
/***/ "@wordpress/components":
/*!************************************!*\
!*** external ["wp","components"] ***!
\************************************/
/***/ ((module) => {
module.exports = window["wp"]["components"];
/***/ }),
/***/ "@wordpress/element":
/*!*********************************!*\
!*** external ["wp","element"] ***!
\*********************************/
/***/ ((module) => {
module.exports = window["wp"]["element"];
/***/ }),
/***/ "@wordpress/i18n":
/*!******************************!*\
!*** external ["wp","i18n"] ***!
\******************************/
/***/ ((module) => {
module.exports = window["wp"]["i18n"];
/***/ }),
/***/ "@wordpress/primitives":
/*!************************************!*\
!*** external ["wp","primitives"] ***!
\************************************/
/***/ ((module) => {
module.exports = window["wp"]["primitives"];
/***/ }),
/***/ "react/jsx-runtime":
/*!**********************************!*\
!*** external "ReactJSXRuntime" ***!
\**********************************/
/***/ ((module) => {
module.exports = window["ReactJSXRuntime"];
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "index": 0,
/******/ "./style-index": 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = globalThis["webpackChunkwpsi_menu"] = globalThis["webpackChunkwpsi_menu"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["./style-index"], () => (__webpack_require__("./src/index.js")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

@ -0,0 +1,11 @@
<?php declare(strict_types=1);
use wpsocialicons\Settings;
["exclude" => $exclude, "orientation" => $orientation, "alignment" => $alignment] = $attributes ?? [];
$services = array_filter((array) Settings::Services(), fn ($value, $key) => !in_array($key, $exclude), ARRAY_FILTER_USE_BOTH);
the_wp_social_icons([
"exclude" => $exclude,
"container_class" => "wp-social-icons $orientation align-$alignment",
]);

@ -0,0 +1,36 @@
/*!***************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
\***************************************************************************************************************************************************************************************************************************************/
.wp-block-create-block-wpsi-menu {
background-color: #21759b;
color: #fff;
padding: 2px;
}
nav.wp-social-icons {
display: flex;
padding: 2rem 0;
gap: 2rem;
align-items: center;
}
nav.wp-social-icons > a .wpsi {
font-size: 1.8rem;
}
nav.wp-social-icons.align-center {
justify-content: center;
}
nav.wp-social-icons.align-left {
justify-content: flex-start;
}
nav.wp-social-icons.align-right {
justify-content: flex-end;
}
nav.wp-social-icons.vertical {
flex-direction: column;
}
nav.wp-social-icons.vertical.align-left {
align-items: flex-start;
}
nav.wp-social-icons.vertical.align-right {
align-items: flex-end;
}

@ -0,0 +1,38 @@
/*!***************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
\***************************************************************************************************************************************************************************************************************************************/
.wp-block-create-block-wpsi-menu {
background-color: #21759b;
color: #fff;
padding: 2px;
}
nav.wp-social-icons {
display: flex;
padding: 2rem 0;
gap: 2rem;
align-items: center;
}
nav.wp-social-icons > a .wpsi {
font-size: 1.8rem;
}
nav.wp-social-icons.align-center {
justify-content: center;
}
nav.wp-social-icons.align-left {
justify-content: flex-start;
}
nav.wp-social-icons.align-right {
justify-content: flex-end;
}
nav.wp-social-icons.vertical {
flex-direction: column;
}
nav.wp-social-icons.vertical.align-left {
align-items: flex-start;
}
nav.wp-social-icons.vertical.align-right {
align-items: flex-end;
}
/*# sourceMappingURL=style-index.css.map*/

@ -0,0 +1 @@
{"version":3,"file":"./style-index.css","mappings":";;;AAAA;EACC;EACA;EACA;AACD;;AAEA;EACC;EACA;EACA;EACA;AACD;AAEE;EACC;AAAH;AAIC;EACC;AAFF;AAKC;EACC;AAHF;AAMC;EACC;AAJF;AAOC;EACC;AALF;AAOE;EACC;AALH;AAQE;EACC;AANH,C","sources":["webpack://wpsi-menu/./src/style.scss"],"sourcesContent":[".wp-block-create-block-wpsi-menu {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n\nnav.wp-social-icons {\n\tdisplay: flex;\n\tpadding: 2rem 0;\n\tgap: 2rem;\n\talign-items: center;\n\n\t> a {\n\t\t.wpsi {\n\t\t\tfont-size: 1.8rem;\n\t\t}\n\t}\n\n\t&.align-center {\n\t\tjustify-content: center;\n\t}\n\n\t&.align-left {\n\t\tjustify-content: flex-start;\n\t}\n\n\t&.align-right {\n\t\tjustify-content: flex-end;\n\t}\n\n\t&.vertical {\n\t\tflex-direction: column;\n\n\t\t&.align-left {\n\t\t\talign-items: flex-start;\n\t\t}\n\t\t\n\t\t&.align-right {\n\t\t\talign-items: flex-end;\n\t\t}\n\t}\n}\n"],"names":[],"sourceRoot":""}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,23 @@
{
"name": "wpsi-menu",
"version": "0.0.1",
"description": "WP Social Icons Menu Block for Gutenberg",
"author": "Mike Ochmann <miko@massivedynamic.eu>",
"license": "MIT",
"main": "build/index.js",
"scripts": {
"build": "wp-scripts build",
"format": "wp-scripts format",
"lint:css": "wp-scripts lint-style",
"lint:js": "wp-scripts lint-js",
"packages-update": "wp-scripts packages-update",
"plugin-zip": "wp-scripts plugin-zip",
"start": "wp-scripts start"
},
"devDependencies": {
"@wordpress/scripts": "^30.19.0"
},
"dependencies": {
"@wordpress/icons": "^10.26.0"
}
}

@ -0,0 +1,35 @@
{
"$schema" : "https://schemas.wp.org/trunk/block.json",
"apiVersion" : 3,
"name" : "massivedynamic/wpsi-menu",
"version" : "0.0.1",
"title" : "WP Social Icons Menu",
"category" : "widgets",
"icon" : "networking",
"description" : "WP Social Icons Menu Block for Gutenberg",
"example" : {},
"supports" : {
"html": false
},
"attributes" : {
"orientation" : {
"type" : "string",
"enum" : ["horizontal", "vertical"],
"default" : "horizontal"
},
"alignment" : {
"type" : "string",
"enum" : ["left", "center", "right"],
"default" : "center"
},
"exclude" : {
"type" : "array",
"default" : []
}
},
"textdomain" : "wpsi-menu",
"editorScript" : "file:./index.js",
"editorStyle" : "file:./index.css",
"style" : "file:./style-index.css",
"render" : "file:./render.php"
}

@ -0,0 +1,94 @@
import {__} from "@wordpress/i18n";
import {useBlockProps, BlockControls, InspectorControls} from "@wordpress/block-editor";
import {useState, useEffect, useMemo} from "@wordpress/element";
import apiFetch from "@wordpress/api-fetch";
import {
Spinner,
PanelBody,
PanelRow,
RangeControl,
TextControl,
ToggleControl,
ToolbarButton,
ToolbarGroup,
Modal,
Button,
__experimentalToggleGroupControl as ToggleGroupControl,
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
__experimentalText as Text,
__experimentalHStack as HStack
} from "@wordpress/components";
import {
justifyCenter,
justifyCenterVertical,
alignLeft,
alignCenter,
alignRight
} from '@wordpress/icons';
import "./editor.scss";
const Edit = ({attributes, setAttributes}) => {
const [items, setItems] = useState([]);
const {alignment, orientation, exclude} = attributes;
const iterator = useMemo(() => {
const out = [];
for (const [key, value] of Object.entries(items))
out.push({key, value});
return out;
}, [items]);
const activeItems = useMemo(() => {
return iterator.filter(item => !exclude.includes(item.key));
}, [iterator, exclude]);
const excludeService = service => {
setAttributes({exclude : exclude.includes(service) ? exclude.filter(item => item !== service) : [...exclude, service]});
};
useEffect(() => {
apiFetch({path : "/wp-social-icons/items"}).then(response => {
setItems(response);
}).catch(error => console.error("ERR", error));
}, []);
return (
<section {...useBlockProps()}>
<InspectorControls>
<PanelBody title="Active Services" initialOpen={true}>
{iterator.map(item => (
<PanelRow>
<ToggleControl label={<><span className={`wpsi-${item.key}`} style={{fontSize : "1.2rem", verticalAlign : "middle", marginRight : "0.5rem"}}></span> <span style={{verticalAlign : "middle"}}>{item.key}</span></>} checked={!exclude.includes(item.key)} onChange={() => excludeService(item.key)} />
</PanelRow>
))}
</PanelBody>
</InspectorControls>
<BlockControls>
<ToolbarGroup>
<ToolbarButton isActive={orientation === "horizontal"} icon={justifyCenter} onClick={() => setAttributes({ orientation : "horizontal"})} />
<ToolbarButton isActive={orientation === "vertical"} icon={justifyCenterVertical} title="wdwdwd" onClick={() => setAttributes({orientation : "vertical"})} />
</ToolbarGroup>
<ToolbarGroup>
<ToolbarButton isActive={alignment === "left"} icon={alignLeft} title="align left" onClick={() => setAttributes({alignment : "left"})} />
<ToolbarButton isActive={alignment === "center"} icon={alignCenter} title="align center" onClick={() => setAttributes({alignment : "center"})} />
<ToolbarButton isActive={alignment === "right"} icon={alignRight} title="align right" onClick={() => setAttributes({alignment : "right"})} />
</ToolbarGroup>
</BlockControls>
{activeItems.length < 1 ?
<section>No elements</section> :
<nav className={`wpsi-menu ${orientation} align-${alignment}`}>
{activeItems.map(item => <a href={item.value}><span className={`wpsi wpsi-${item.key}`}></span></a>)}
</nav>
}
</section>
);
};
export default Edit;

@ -0,0 +1,28 @@
.wpsi-menu {
padding: 2rem 0;
}
.wpsi-menu a {
text-decoration: none;
}
.wpsi-menu.align-left {
text-align: left;
}
.wpsi-menu.align-center {
text-align: center;
}
.wpsi-menu.align-right {
text-align: right;
}
.wpsi-menu.horizontal a:not(:last-of-type) {
margin-right: 2rem;
}
.wpsi-menu.vertical a {
display: block;
}
.wpsi-menu.vertical a:not(:last-of-type) {
margin-bottom: 2rem;
}
.wpsi-menu .wpsi {
font-size: 2rem;
color: #333;
}/*# sourceMappingURL=editor.css.map */

@ -0,0 +1 @@
{"version":3,"sources":["editor.scss","editor.css"],"names":[],"mappings":"AAAA;EACC,eAAA;ACCD;ADCC;EACC,qBAAA;ACCF;ADEC;EACC,gBAAA;ACAF;ADEC;EACC,kBAAA;ACAF;ADEC;EACC,iBAAA;ACAF;ADKG;EACC,kBAAA;ACHJ;ADSE;EACC,cAAA;ACPH;ADSG;EACC,mBAAA;ACPJ;ADYC;EACC,eAAA;EACA,WAAA;ACVF","file":"editor.css"}

@ -0,0 +1,40 @@
.wpsi-menu {
padding: 2rem 0;
a {
text-decoration: none;
}
&.align-left {
text-align: left;
}
&.align-center {
text-align: center;
}
&.align-right {
text-align: right;
}
&.horizontal {
a {
&:not(:last-of-type) {
margin-right: 2rem;
}
}
}
&.vertical {
a {
display: block;
&:not(:last-of-type) {
margin-bottom: 2rem;
}
}
}
.wpsi {
font-size: 2rem;
color: #333;
}
}

@ -0,0 +1,10 @@
import {registerBlockType} from "@wordpress/blocks";
import Edit from "./edit";
import metadata from "./block.json";
import "./style.scss";
registerBlockType(metadata.name, {
edit : Edit
} );

@ -0,0 +1,11 @@
<?php declare(strict_types=1);
use wpsocialicons\Settings;
["exclude" => $exclude, "orientation" => $orientation, "alignment" => $alignment] = $attributes ?? [];
$services = array_filter((array) Settings::Services(), fn ($value, $key) => !in_array($key, $exclude), ARRAY_FILTER_USE_BOTH);
the_wp_social_icons([
"exclude" => $exclude,
"container_class" => "wp-social-icons $orientation align-$alignment",
]);

@ -0,0 +1,33 @@
import {useBlockProps} from "@wordpress/block-editor";
import {useState, useEffect, useMemo} from "@wordpress/element";
import apiFetch from "@wordpress/api-fetch";
export default function save({attributes}) {
/*
const [items, setItems] = useState([]);
useEffect(() => {
apiFetch({path : "/wp-social-icons/items"}).then(response => {
console.log("RES", response);
setItems(response);
}).catch(error => console.error("ERR", error));
}, []);
*/
const {orientation, alignment} = attributes;
const props = useBlockProps.save();
console.log("SAVE PROPS", attributes);
return (
<></>
);
return (
<p>
<nav className={`wpsi-menu ${orientation} align-${alignment}`}>
{activeItems.map(item => <a href={item.value}><span className={`wpsi wpsi-${item.key}`}></span></a>)}
</nav>
</p>
);
}

@ -0,0 +1,33 @@
.wp-block-create-block-wpsi-menu {
background-color: #21759b;
color: #fff;
padding: 2px;
}
nav.wp-social-icons {
display: flex;
padding: 2rem 0;
gap: 2rem;
align-items: center;
}
nav.wp-social-icons > a .wpsi {
font-size: 1.8rem;
}
nav.wp-social-icons.align-center {
justify-content: center;
}
nav.wp-social-icons.align-left {
justify-content: flex-start;
}
nav.wp-social-icons.align-right {
justify-content: flex-end;
}
nav.wp-social-icons.vertical {
flex-direction: column;
}
nav.wp-social-icons.vertical.align-left {
align-items: flex-start;
}
nav.wp-social-icons.vertical.align-right {
align-items: flex-end;
}/*# sourceMappingURL=style.css.map */

@ -0,0 +1 @@
{"version":3,"sources":["style.scss","style.css"],"names":[],"mappings":"AAAA;EACC,yBAAA;EACA,WAAA;EACA,YAAA;ACCD;;ADEA;EACC,aAAA;EACA,eAAA;EACA,SAAA;EACA,mBAAA;ACCD;ADEE;EACC,iBAAA;ACAH;ADIC;EACC,uBAAA;ACFF;ADKC;EACC,2BAAA;ACHF;ADMC;EACC,yBAAA;ACJF;ADOC;EACC,sBAAA;ACLF;ADOE;EACC,uBAAA;ACLH;ADQE;EACC,qBAAA;ACNH","file":"style.css"}

@ -0,0 +1,42 @@
.wp-block-create-block-wpsi-menu {
background-color: #21759b;
color: #fff;
padding: 2px;
}
nav.wp-social-icons {
display: flex;
padding: 2rem 0;
gap: 2rem;
align-items: center;
> a {
.wpsi {
font-size: 1.8rem;
}
}
&.align-center {
justify-content: center;
}
&.align-left {
justify-content: flex-start;
}
&.align-right {
justify-content: flex-end;
}
&.vertical {
flex-direction: column;
&.align-left {
align-items: flex-start;
}
&.align-right {
align-items: flex-end;
}
}
}

@ -0,0 +1,42 @@
const $ = selector => {
const elements = document.querySelectorAll(selector);
return elements.length === 1 ? elements[0] : elements;
};
const Services = {};
const SaveServices = () => {
const body = new FormData();
body.append("nonce", wpsi.nonce);
body.append("action", "wpsi-ajax");
body.append("services", JSON.stringify(Services));
fetch(wpsi.adminURL, {
method : "POST",
body
}).catch(error => console.error(error));
};
document.addEventListener("DOMContentLoaded", () => {
inputs = $(".wpsi-icon-selector");
for (const input of inputs) {
if (!(input instanceof HTMLElement))
continue;
const service = input.getAttribute("data-icon");
if (!service || service === "")
continue;
const value = input.value;
if (value && value !== "")
Services[service] = value;
if (value === "")
delete Services[service];
input.addEventListener("change", event => {
Services[service] = event.target.value;
SaveServices();
});
}
});

@ -0,0 +1,23 @@
<?php declare(strict_types=1);
namespace wpsocialicons;
class Backend {
public function __construct() {
add_action("admin_enqueue_scripts", [$this, "loadScripts"]);
}
public function loadScripts() : void {
$folder = trim(plugin_dir_url(dirname(__FILE__)), "/");
wp_enqueue_style("wp-social-icons-font", "$folder/fonts/wp-social-icons/style.css");
wp_enqueue_style("wp-social-icons-admin", "$folder/css/wp-social-icons.css");
wp_enqueue_script("wp-social-icons-admin", "$folder/javascript/wp-social-icons-admin.js", []);
wp_localize_script("wp-social-icons-admin", "wpsi", [
"adminURL" => admin_url("admin-ajax.php"),
"nonce" => wp_create_nonce("wpsi-nonce")
]);
}
}

@ -0,0 +1,26 @@
<?php declare(strict_types=1);
namespace wpsocialicons;
use WP_REST_Request;
class Blocks {
public function __construct(private Settings $settings) {
add_action("init", [$this, "registerBlocks"]);
add_action("rest_api_init", [$this, "registerAPIRoute"]);
}
public function registerBlocks() : void {
register_block_type(dirname(__FILE__)."/../javascript/blocks/wpsi-menu/build");
}
public function registerAPIRoute() : void {
register_rest_route("wp-social-icons", "/items", [
"methods" => "GET",
"permission_callback" => "__return_true",
"callback" => function (WP_REST_Request $_) : ?array {
return (array) $this->settings->get();
}
]);
}
}

@ -0,0 +1,66 @@
<?php declare(strict_types=1);
namespace wpsocialicons {
class Frontend {
private const DEFAULT_ARGS = [
"container_class" => "wp-social-icons",
"container" => "nav",
"before" => "",
"after" => "",
"icon_before" => "",
"icon_after" => "",
"exclude" => []
];
public function __construct(private Settings $settings) {
add_action("wp_enqueue_scripts", [$this, "enqueueFont"]);
}
public function enqueueFont() : void {
wp_enqueue_style("wp-social-icons", plugin_dir_url(dirname(__FILE__))."/fonts/wp-social-icons/style.css");
}
public static function MenuMarkup(array $args = []) : string {
$args = array_merge(self::DEFAULT_ARGS, $args);
$container = $args["container"];
$containerClass = $args["container_class"];
$before = $args["before"];
$after = $args["after"];
$iconBefore = $args["icon_before"];
$iconAfter = $args["icon_after"];
$exclude = $args["exclude"];
$out = "<$container class='$containerClass'>";
$services = Settings::Services();
foreach ($services as $service => $url) {
if (in_array($service, $exclude))
continue;
$out .= sprintf(
"$before<a href='%s' class='wp-social-icon-link'>$iconBefore<span class='wpsi wpsi-%s'></span>$iconAfter</a>$after\n",
$url,
$service
);
}
$out .= "</$container>";
return $out;
}
}
}
namespace {
use wpsocialicons\Frontend;
function get_the_wp_social_icons(array $args = []) : string {
return Frontend::MenuMarkup($args);
}
function the_wp_social_icons(array $args = []) : void {
echo get_the_wp_social_icons($args);
}
}

@ -0,0 +1,55 @@
<?php declare(strict_types=1);
namespace wpsocialicons;
use wpsocialicons\Backend;
use wpsocialicons\Blocks;
use wpsocialicons\Frontend;
use wpsocialicons\Settings;
class Plugin {
const OPTIONS_KEY = "wpsi-services";
private Backend $backend;
private Blocks $blocks;
private Frontend $frontend;
private Settings $settings;
public readonly array $available;
public function __construct() {
spl_autoload_register([$this, "autoload"]);
$this->loadAvailable();
$this->settings = new Settings($this);
$this->backend = new Backend();
$this->blocks = new Blocks($this->settings);
$this->frontend = new Frontend($this->settings);
}
public function autoload(string $className) : void {
$className = str_replace("\\", "/", str_replace("wpsocialicons\\", "", $className));
$src = dirname(__FILE__)."/$className.php";
if (file_exists($src))
require_once($src);
}
private function loadAvailable() : void {
$source = dirname(__FILE__)."/../fonts/wp-social-icons/selection.json";
if (!file_exists($source))
return;
$content = file_get_contents($source);
if (!$content)
return;
$json = json_decode($content);
$available = array_map(fn ($item) => $item->properties->name, $json->icons);
sort($available);
$this->available = $available;
}
}

@ -0,0 +1,82 @@
<?php declare(strict_types=1);
namespace wpsocialicons;
class Settings {
private readonly ?object $currentServices;
public function __construct(private Plugin $root) {
add_action("admin_menu", [$this, "addMenuPage"]);
add_action("wp_ajax_wpsi-ajax", [$this, "ajax"]);
$this->currentServices = self::Services();
}
public function addMenuPage() : void {
add_submenu_page(
"themes.php",
__("Social Icons", "wpsocialicons"),
__("Social Icons", "wpsocialicons"),
"manage_options",
"wp-social-icons",
[$this, "renderSettingsPage"]
);
}
public function renderSettingsPage() : void {
global $_wp_admin_css_colors;
$template = new Template("settings");
$icons = "";
$accentColor = $_wp_admin_css_colors[get_user_option("admin_color")]->colors[2];
printf("
<style>
.wpsi-icons {
--wpsi-accent-color: %s
}
</style>
", $accentColor);
foreach ($this->root->available as $icon) {
$value = $this->currentServices->$icon ?? "";
$icons .= sprintf(
"<article class=icon>
<span class='wpsi wpsi-%s'></span>
<span class=name>%s</span>
<input class=wpsi-icon-selector data-icon=%s placeholder='https://' type=text name=wpsi-link-%s value='%s' />
</article>",
$icon,
ucfirst($icon),
$icon,
$icon,
$value
);
}
echo $template->render([
"icons" => $icons
]);
}
public function get() : ?object {
return $this->currentServices;
}
public function ajax() : void {
if (!wp_verify_nonce($_POST["nonce"], "wpsi-nonce") || !current_user_can("manage_options"))
wp_die("Unauthorized access");
// NOTE: here we pass the result to a filter before saving, in case
// someone needs to do something useful with the information
// submitted. The filter is called
// "wpsi_save_services"
$value = json_decode(html_entity_decode(stripslashes($_POST["services"])));
$services = json_encode(apply_filters("wpsi_save_services", $value));
update_option(Plugin::OPTIONS_KEY, $services);
}
public static function Services() : ?object {
return json_decode(html_entity_decode(stripslashes(get_option(Plugin::OPTIONS_KEY, "{}"))));
}
}

@ -0,0 +1,23 @@
<?php declare(strict_types=1);
namespace wpsocialicons;
class Template {
private string $template;
public function __construct(string $templateName) {
$this->template = file_get_contents(dirname(__FILE__)."/../views/$templateName.html");
}
public function render(array $context, bool $echo = false) : string {
$out = $this->template;
foreach ($context as $key => $value)
$out = str_replace(sprintf("{{%s}}", $key), $value, $out);
if ($echo)
echo $out;
return $out;
}
}

44
type

@ -0,0 +1,44 @@
./.DS_Store
./css/wp-social-icons.css
./.gitignore
./javascript/blocks/wpsi-menu/package-lock.json
./javascript/blocks/wpsi-menu/package.json
./javascript/blocks/wpsi-menu/build/block.json
./javascript/blocks/wpsi-menu/build/index.asset.php
./javascript/blocks/wpsi-menu/build/index.js
./javascript/blocks/wpsi-menu/build/index.css
./javascript/blocks/wpsi-menu/build/style-index.css.map
./javascript/blocks/wpsi-menu/build/index.css.map
./javascript/blocks/wpsi-menu/build/index.js.map
./javascript/blocks/wpsi-menu/build/render.php
./javascript/blocks/wpsi-menu/build/index-rtl.css
./javascript/blocks/wpsi-menu/build/style-index.css
./javascript/blocks/wpsi-menu/build/style-index-rtl.css
./javascript/blocks/wpsi-menu/src/block.json
./javascript/blocks/wpsi-menu/src/editor.css
./javascript/blocks/wpsi-menu/src/edit.js
./javascript/blocks/wpsi-menu/src/style.css.map
./javascript/blocks/wpsi-menu/src/editor.scss
./javascript/blocks/wpsi-menu/src/save.js
./javascript/blocks/wpsi-menu/src/index.js
./javascript/blocks/wpsi-menu/src/style.scss
./javascript/blocks/wpsi-menu/src/style.css
./javascript/blocks/wpsi-menu/src/render.php
./javascript/blocks/wpsi-menu/src/editor.css.map
./javascript/wp-social-icons-admin.js
./fonts/.DS_Store
./fonts/wp-social-icons/.DS_Store
./fonts/wp-social-icons/style.css
./fonts/wp-social-icons/selection.json
./fonts/wp-social-icons/fonts/.DS_Store
./fonts/wp-social-icons/fonts/WP-Social-Icons.ttf
./fonts/wp-social-icons/fonts/WP-Social-Icons.svg
./fonts/wp-social-icons/fonts/WP-Social-Icons.woff
./views/settings.html
./src/Blocks.php
./src/Settings.php
./src/Plugin.php
./src/Backend.php
./src/Template.php
./src/Frontend.php
./wp-social-icons.php

@ -0,0 +1,10 @@
<section class=wrap>
<h1>WP Social Icons</h1>
<p>
Just add the corresponding URL to your social media account to the
field below the service you want to activate.
</p>
<section class="wpsi-icons">
{{icons}}
</section>
</section>

@ -0,0 +1,17 @@
<?php
/*
* Plugin Name: WP Social Icons
* Description: A plugin for displaying social media links with icons on your WordPress website
* Author: Mike Ochmann <miko@massivedynamic.eu>
* Author URI: https://mike-ochmann.de
* License: MIT
* Text Domain: wpsocialicons
* Domain Path: /lang
* Version: 0.0.1
*/
require_once("src/Plugin.php");
use wpsocialicons\Plugin;
new Plugin;
Loading…
Cancel
Save