Google XML Sitemap Generator - Version 2.0.6

Version Description

Release Date: May 12th, 2022 * New : Tested for Wordpress 6.0 * Fix : Added timezone correction to dates. * Fix : Added missing escaping. * Fix : Archives showing with zero posts * Fix : Updated various code quality issues.

Download this release

Release Info

Developer XmlSitemapGenerator
Plugin Icon 128x128 Google XML Sitemap Generator
Version 2.0.6
Comparing to
See all releases

Code changes from version 2.0.5 to 2.0.6

assets/SitemapXMLnews.xsl CHANGED
@@ -16,14 +16,14 @@ xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
16
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
17
  <meta name="robots" content="index,follow" />
18
  <style type="text/css">
19
- body {font-family:Tahoma, Verdana, Arial, sans-serif;font-size:1.0em; line-height:2em;}
20
- #header { padding:0px; margin-top:10px; margin-bottom:20px;}
21
- a {text-decoration:none; color:blue;}
22
- table {margin-bottom:50px; width:100%;}
23
-
24
- th {font-size:0.9em; padding:0.5em; text-align:left; vertical-align:bottom; background-color:#CCCCCC; }
25
- td {font-size:0.9em; padding:0.5em; border-bottom: solid 1px #CCCCCC; }
26
- div.img {float:left;clear:both; width:90%; font-size:0.8em; vertical:top;}
27
  span.imgbox{width:65px; height:55px; background-color:#CCCCCC;float:left; margin:0px 5px 5px 0px; text-align:center;vertical-align: middle; line-height:55px; color:#FFFFFF; weight:bold;}
28
  </style>
29
  </head>
16
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
17
  <meta name="robots" content="index,follow" />
18
  <style type="text/css">
19
+ body {font-family:Tahoma, Verdana, Arial, sans-serif;font-size:1.0em; line-height:2em;}
20
+ #header { padding:0px; margin-top:10px; margin-bottom:20px;}
21
+ a {text-decoration:none; color:blue;}
22
+ table {margin-bottom:50px; width:100%;}
23
+
24
+ th {font-size:0.9em; padding:0.5em; text-align:left; vertical-align:bottom; background-color:#CCCCCC; }
25
+ td {font-size:0.9em; padding:0.5em; border-bottom: solid 1px #CCCCCC; }
26
+ div.img {float:left;clear:both; width:90%; font-size:0.8em; vertical:top;}
27
  span.imgbox{width:65px; height:55px; background-color:#CCCCCC;float:left; margin:0px 5px 5px 0px; text-align:center;vertical-align: middle; line-height:55px; color:#FFFFFF; weight:bold;}
28
  </style>
29
  </head>
assets/buymeacoffee.svg ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width="545" height="153" viewBox="0 0 545 153" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 24.48C0 10.9601 10.9601 0 24.48 0H520.2C533.72 0 544.68 10.9601 544.68 24.48V128.52C544.68 142.04 533.72 153 520.2 153H24.48C10.9601 153 0 142.04 0 128.52V24.48Z" fill="#FFDD00"/>
3
+ <path d="M109.522 50.3178L109.455 50.2783L109.299 50.2308C109.362 50.2836 109.44 50.3142 109.522 50.3178Z" fill="#0D0C22"/>
4
+ <path d="M110.507 57.3134L110.432 57.3344L110.507 57.3134Z" fill="#0D0C22"/>
5
+ <path d="M109.549 50.3062C109.54 50.3051 109.532 50.3031 109.524 50.3003C109.523 50.3058 109.523 50.3113 109.524 50.3168C109.533 50.3156 109.541 50.3119 109.549 50.3062Z" fill="#0D0C22"/>
6
+ <path d="M109.523 50.3205H109.536V50.3127L109.523 50.3205Z" fill="#0D0C22"/>
7
+ <path d="M110.447 57.3006L110.56 57.2361L110.602 57.2123L110.64 57.1715C110.569 57.2025 110.503 57.2462 110.447 57.3006Z" fill="#0D0C22"/>
8
+ <path d="M109.715 50.4713L109.604 50.3659L109.529 50.3251C109.57 50.3963 109.636 50.4488 109.715 50.4713Z" fill="#0D0C22"/>
9
+ <path d="M81.8801 118.353C81.7916 118.391 81.7142 118.451 81.6548 118.527L81.7246 118.482C81.772 118.439 81.8392 118.387 81.8801 118.353Z" fill="#0D0C22"/>
10
+ <path d="M98.0456 115.173C98.0456 115.073 97.9968 115.091 98.0087 115.447C98.0087 115.418 98.0206 115.389 98.0258 115.361C98.0324 115.298 98.0377 115.236 98.0456 115.173Z" fill="#0D0C22"/>
11
+ <path d="M96.3761 118.353C96.2877 118.391 96.2103 118.451 96.1509 118.527L96.2207 118.482C96.2681 118.439 96.3353 118.387 96.3761 118.353Z" fill="#0D0C22"/>
12
+ <path d="M70.4886 119.11C70.4215 119.052 70.3393 119.013 70.2515 118.999C70.3226 119.034 70.3937 119.068 70.4412 119.094L70.4886 119.11Z" fill="#0D0C22"/>
13
+ <path d="M67.9304 116.657C67.92 116.553 67.8881 116.453 67.8369 116.362C67.8732 116.456 67.9035 116.553 67.9278 116.652L67.9304 116.657Z" fill="#0D0C22"/>
14
+ <path d="M85.1368 72.7737C81.6195 74.2794 77.628 75.9866 72.4549 75.9866C70.2908 75.9823 68.1373 75.6854 66.0527 75.104L69.6306 111.838C69.7572 113.373 70.4567 114.805 71.59 115.848C72.7233 116.892 74.2076 117.471 75.7482 117.47C75.7482 117.47 80.8212 117.734 82.514 117.734C84.3358 117.734 89.7988 117.47 89.7988 117.47C91.3391 117.47 92.8231 116.891 93.9562 115.848C95.0892 114.804 95.7885 113.373 95.9151 111.838L99.7472 71.2456C98.0347 70.6607 96.3064 70.2721 94.358 70.2721C90.9883 70.2708 88.2733 71.4313 85.1368 72.7737Z" fill="white"/>
15
+ <path d="M54.9844 57.1021L55.045 57.1587L55.0845 57.1824C55.0541 57.1522 55.0205 57.1252 54.9844 57.1021Z" fill="#0D0C22"/>
16
+ <path d="M116.299 53.7119L115.761 50.9943C115.277 48.5559 114.18 46.2519 111.677 45.3706C110.875 45.0887 109.964 44.9675 109.349 44.384C108.734 43.8004 108.552 42.8941 108.41 42.0536C108.147 40.511 107.899 38.9671 107.629 37.4272C107.396 36.1033 107.211 34.616 106.604 33.4015C105.814 31.7706 104.174 30.8169 102.543 30.1859C101.707 29.8739 100.854 29.61 99.9884 29.3955C95.9139 28.3205 91.63 27.9253 87.4382 27.7001C82.407 27.4225 77.3623 27.5061 72.343 27.9504C68.6071 28.2902 64.6723 28.7013 61.1221 29.9935C59.8245 30.4665 58.4875 31.0342 57.5008 32.0367C56.2902 33.2684 55.895 35.1733 56.7789 36.7092C57.4073 37.8 58.4717 38.5706 59.6006 39.0804C61.0711 39.7373 62.6068 40.2371 64.1822 40.5716C68.5689 41.5412 73.1124 41.9219 77.5939 42.0839C82.561 42.2844 87.5362 42.1219 92.4796 41.5978C93.7021 41.4635 94.9224 41.3023 96.1405 41.1144C97.575 40.8944 98.4958 39.0185 98.073 37.7117C97.5671 36.1494 96.2077 35.5434 94.6703 35.7792C94.4438 35.8148 94.2185 35.8477 93.9919 35.8807L93.8286 35.9044C93.3078 35.9702 92.787 36.0317 92.2662 36.0888C91.1904 36.2047 90.112 36.2996 89.0309 36.3733C86.6097 36.5419 84.1818 36.6197 81.7553 36.6236C79.371 36.6236 76.9853 36.5564 74.6062 36.3997C73.5207 36.3285 72.4379 36.2381 71.3577 36.1283C70.8663 36.0769 70.3763 36.0229 69.8862 35.9623L69.4199 35.903L69.3185 35.8886L68.835 35.8187C67.847 35.6699 66.859 35.4986 65.8816 35.2918C65.783 35.2699 65.6947 35.2151 65.6315 35.1363C65.5683 35.0575 65.5338 34.9594 65.5338 34.8584C65.5338 34.7574 65.5683 34.6594 65.6315 34.5806C65.6947 34.5018 65.783 34.4469 65.8816 34.425H65.9C66.7471 34.2445 67.6007 34.0904 68.4569 33.956C68.7424 33.9113 69.0287 33.8673 69.3158 33.8243H69.3237C69.8599 33.7887 70.3987 33.6926 70.9322 33.6293C75.574 33.1465 80.2434 32.9819 84.9077 33.1367C87.1721 33.2025 89.4353 33.3356 91.6892 33.5648C92.174 33.6149 92.6562 33.6676 93.1383 33.7268C93.3227 33.7492 93.5085 33.7756 93.6942 33.798L94.0683 33.852C95.1591 34.0144 96.2441 34.2116 97.3234 34.4435C98.9227 34.7912 100.976 34.9045 101.688 36.6566C101.914 37.2125 102.017 37.8303 102.142 38.4139L102.302 39.1581C102.306 39.1715 102.309 39.1852 102.311 39.199C102.688 40.9554 103.065 42.7118 103.442 44.4683C103.47 44.598 103.471 44.7321 103.444 44.8621C103.418 44.9921 103.365 45.1153 103.289 45.2239C103.213 45.3326 103.115 45.4244 103.002 45.4936C102.889 45.5628 102.762 45.6079 102.631 45.6262H102.62L102.39 45.6578L102.162 45.6881C101.44 45.7821 100.717 45.8699 99.9936 45.9516C98.5683 46.114 97.1408 46.2546 95.711 46.3731C92.87 46.6094 90.0233 46.7644 87.1708 46.8381C85.7174 46.8768 84.2644 46.8948 82.8118 46.8921C77.0301 46.8876 71.2534 46.5516 65.5101 45.8857C64.8883 45.8119 64.2666 45.7329 63.6448 45.6525C64.1269 45.7145 63.2944 45.6051 63.1258 45.5814C62.7306 45.5261 62.3354 45.4686 61.9402 45.4088C60.6136 45.2099 59.295 44.9649 57.9711 44.7502C56.3705 44.4867 54.8398 44.6185 53.3921 45.4088C52.2037 46.0591 51.2419 47.0564 50.6349 48.2674C50.0105 49.5584 49.8248 50.964 49.5455 52.3511C49.2662 53.7383 48.8315 55.2308 48.9962 56.6548C49.3505 59.7281 51.4991 62.2258 54.5895 62.7843C57.4968 63.3112 60.42 63.7381 63.351 64.1016C74.8648 65.5118 86.4968 65.6805 98.0466 64.6049C98.9872 64.517 99.9265 64.4213 100.864 64.3177C101.157 64.2855 101.454 64.3192 101.732 64.4165C102.01 64.5137 102.263 64.6719 102.472 64.8795C102.681 65.0872 102.842 65.339 102.941 65.6165C103.04 65.894 103.076 66.1902 103.046 66.4834L102.753 69.3261C102.164 75.0705 101.575 80.8145 100.986 86.558C100.371 92.5896 99.7521 98.6208 99.1295 104.651C98.9538 106.35 98.7782 108.048 98.6025 109.746C98.4339 111.417 98.4102 113.142 98.0927 114.794C97.5922 117.391 95.8335 118.987 93.2674 119.57C90.9164 120.105 88.5148 120.386 86.1038 120.408C83.431 120.422 80.7594 120.304 78.0866 120.318C75.2333 120.334 71.7384 120.071 69.5358 117.947C67.6007 116.082 67.3333 113.161 67.0698 110.636C66.7185 107.293 66.3703 103.95 66.0252 100.607L64.0887 82.0212L62.8359 69.9953C62.8149 69.7964 62.7938 69.6001 62.774 69.3999C62.6239 67.9654 61.6082 66.5611 60.0077 66.6335C58.6376 66.6941 57.0806 67.8586 57.2413 69.3999L58.17 78.3155L60.0906 96.7581C60.6378 101.997 61.1836 107.236 61.7281 112.476C61.8335 113.48 61.9323 114.487 62.0429 115.49C62.6449 120.976 66.834 123.932 72.0216 124.764C75.0515 125.252 78.1551 125.352 81.2297 125.402C85.1711 125.465 89.1521 125.617 93.029 124.903C98.7738 123.849 103.084 120.013 103.699 114.062C103.875 112.345 104.051 110.626 104.226 108.908C104.81 103.224 105.393 97.5397 105.976 91.855L107.88 73.2807L108.754 64.7682C108.797 64.3461 108.976 63.9492 109.262 63.6363C109.549 63.3234 109.929 63.111 110.345 63.0307C111.988 62.7105 113.558 62.1639 114.727 60.9137C116.587 58.9232 116.957 56.3281 116.299 53.7119ZM54.5052 55.5483C54.5302 55.5364 54.4841 55.7511 54.4644 55.8513C54.4604 55.6998 54.4683 55.5654 54.5052 55.5483ZM54.6646 56.7813C54.6778 56.7721 54.7173 56.8248 54.7581 56.888C54.6962 56.83 54.6567 56.7866 54.6633 56.7813H54.6646ZM54.8214 56.9881C54.878 57.0843 54.9083 57.1449 54.8214 56.9881V56.9881ZM55.1362 57.2437H55.1441C55.1441 57.2529 55.1586 57.2621 55.1639 57.2713C55.1551 57.2612 55.1454 57.2519 55.1349 57.2437H55.1362ZM110.269 56.8616C109.679 57.4228 108.789 57.6837 107.911 57.8141C98.0572 59.2763 88.06 60.0166 78.0984 59.6899C70.9691 59.4462 63.9148 58.6545 56.8566 57.6573C56.165 57.5598 55.4155 57.4334 54.9399 56.9236C54.0441 55.9619 54.4841 54.0254 54.7173 52.8636C54.9307 51.7992 55.3391 50.3804 56.605 50.2289C58.581 49.9971 60.8758 50.8309 62.8307 51.1273C65.1843 51.4865 67.5467 51.7741 69.9179 51.9902C80.0375 52.9123 90.3271 52.7687 100.402 51.4198C102.238 51.173 104.068 50.8863 105.891 50.5596C107.516 50.2684 109.316 49.7218 110.298 51.404C110.971 52.55 111.06 54.0834 110.956 55.3783C110.924 55.9425 110.678 56.4732 110.267 56.8616H110.269Z" fill="#0D0C22"/>
17
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M170.036 84.2397C169.461 85.3378 168.67 86.2942 167.663 87.1057C166.656 87.9178 165.482 88.579 164.139 89.0881C162.797 89.5984 161.446 89.9408 160.088 90.1153C158.729 90.2905 157.41 90.2753 156.133 90.0674C154.854 89.8608 153.766 89.439 152.872 88.8014L153.88 78.3397C154.806 78.0216 155.972 77.6949 157.379 77.3604C158.785 77.0264 160.231 76.787 161.718 76.644C163.205 76.5004 164.61 76.5173 165.937 76.6919C167.263 76.867 168.31 77.2888 169.077 77.9579C169.493 78.3397 169.845 78.7537 170.132 79.1997C170.42 79.6458 170.595 80.1076 170.66 80.5852C170.819 81.9227 170.612 83.1409 170.036 84.2397ZM155.413 61.9545C156.084 61.5406 156.892 61.1739 157.834 60.8551C158.777 60.5376 159.744 60.3139 160.735 60.1867C161.725 60.06 162.692 60.043 163.636 60.1388C164.578 60.2345 165.41 60.497 166.129 60.9267C166.848 61.357 167.383 61.9782 167.735 62.7897C168.086 63.6024 168.182 64.6296 168.022 65.8714C167.895 66.8587 167.502 67.695 166.848 68.3793C166.193 69.0647 165.393 69.6374 164.451 70.0993C163.508 70.5617 162.509 70.9277 161.455 71.1974C160.399 71.4689 159.384 71.6683 158.41 71.795C157.435 71.9229 156.588 72.0029 155.869 72.0338C155.15 72.0659 154.678 72.0816 154.454 72.0816L155.413 61.9545ZM175.214 77.4798C174.703 76.3658 174.016 75.3864 173.153 74.5416C172.29 73.698 171.266 73.0853 170.084 72.7029C170.595 72.2889 171.099 71.6362 171.595 70.7441C172.09 69.8532 172.513 68.8811 172.865 67.8302C173.216 66.7787 173.457 65.7205 173.584 64.6533C173.711 63.5866 173.663 62.6709 173.441 61.906C172.896 59.9958 172.042 58.4988 170.875 57.4158C169.708 56.3334 168.35 55.5849 166.8 55.1704C165.249 54.7577 163.54 54.6692 161.67 54.908C159.8 55.1467 157.89 55.6164 155.941 56.317C155.941 56.1582 155.957 55.991 155.989 55.8158C156.02 55.6413 156.036 55.4576 156.036 55.2661C156.036 54.7886 155.797 54.3752 155.317 54.0243C154.838 53.674 154.287 53.4674 153.664 53.4031C153.04 53.3401 152.433 53.4746 151.841 53.8092C151.25 54.1437 150.842 54.7577 150.619 55.6479C150.363 58.5146 150.107 61.4927 149.852 64.5812C149.596 67.6708 149.324 70.792 149.037 73.9453C148.749 77.0979 148.461 80.227 148.174 83.3318C147.886 86.4372 147.598 89.4226 147.311 92.2886C147.407 93.1486 147.646 93.8177 148.03 94.2953C148.413 94.7734 148.861 95.0601 149.372 95.1553C149.883 95.251 150.419 95.1625 150.978 94.8922C151.537 94.6225 152.025 94.1516 152.441 93.4832C153.719 94.1838 155.158 94.6377 156.756 94.845C158.354 95.0516 159.975 95.0516 161.623 94.845C163.268 94.6377 164.89 94.248 166.488 93.6741C168.086 93.1013 169.541 92.3844 170.851 91.525C172.162 90.665 173.264 89.685 174.16 88.5869C175.054 87.4875 175.646 86.3014 175.933 85.0281C176.221 83.7221 176.301 82.4167 176.173 81.1106C176.045 79.8052 175.725 78.5955 175.214 77.4798Z" fill="#0D0C23"/>
18
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M221.989 102.702C221.814 103.753 221.565 104.86 221.246 106.023C220.926 107.184 220.551 108.244 220.12 109.2C219.688 110.155 219.209 110.926 218.682 111.516C218.154 112.105 217.586 112.352 216.979 112.257C216.5 112.192 216.196 111.89 216.069 111.349C215.94 110.807 215.94 110.138 216.069 109.343C216.196 108.546 216.443 107.646 216.811 106.643C217.179 105.64 217.627 104.644 218.154 103.658C218.682 102.67 219.281 101.723 219.952 100.815C220.623 99.9082 221.326 99.1512 222.061 98.5464C222.221 98.7373 222.293 99.2149 222.277 99.9797C222.26 100.744 222.165 101.652 221.989 102.702ZM238.243 81.9697C237.811 81.4921 237.284 81.2218 236.66 81.1576C236.037 81.0939 235.405 81.4442 234.767 82.2085C234.351 82.9727 233.823 83.7054 233.184 84.406C232.545 85.1072 231.882 85.7436 231.195 86.3169C230.507 86.8896 229.852 87.3841 229.229 87.7975C228.606 88.212 228.118 88.5144 227.767 88.7053C227.639 87.6866 227.566 86.5878 227.551 85.409C227.534 84.2308 227.559 83.0369 227.623 81.8266C227.718 80.1067 227.918 78.3715 228.222 76.6194C228.526 74.868 228.965 73.148 229.541 71.4595C229.541 70.5686 229.332 69.8438 228.917 69.2862C228.501 68.7293 227.998 68.3784 227.407 68.2353C226.815 68.0923 226.209 68.1717 225.585 68.4741C224.962 68.7771 224.427 69.3268 223.979 70.122C223.596 71.1735 223.156 72.3516 222.661 73.6571C222.165 74.9631 221.606 76.2928 220.983 77.6461C220.359 79.0006 219.664 80.3139 218.897 81.5873C218.13 82.8618 217.291 83.9927 216.38 84.9793C215.469 85.9666 214.478 86.7393 213.408 87.2963C212.336 87.8538 211.179 88.1005 209.932 88.0369C209.356 87.8775 208.94 87.4478 208.685 86.7466C208.429 86.0466 208.277 85.1702 208.23 84.1193C208.182 83.0684 208.23 81.9139 208.373 80.6557C208.517 79.3982 208.709 78.1479 208.949 76.9061C209.188 75.6637 209.452 74.4855 209.739 73.371C210.027 72.2565 210.298 71.3165 210.554 70.5523C210.938 69.6292 210.938 68.8559 210.554 68.2353C210.171 67.6141 209.644 67.2008 208.973 66.9929C208.302 66.7863 207.598 66.7947 206.863 67.0172C206.128 67.2402 205.6 67.7335 205.281 68.4977C204.737 69.8044 204.241 71.2686 203.794 72.8928C203.347 74.5171 202.987 76.1976 202.716 77.9328C202.444 79.6691 202.291 81.3891 202.26 83.0927C202.258 83.2036 202.263 83.309 202.263 83.4193C201.566 85.2708 200.902 86.6702 200.271 87.6066C199.456 88.8174 198.536 89.3429 197.514 89.1829C197.065 88.992 196.771 88.5465 196.627 87.8453C196.482 87.1453 196.435 86.2854 196.482 85.2654C196.531 84.2472 196.651 83.0927 196.842 81.8024C197.035 80.5127 197.273 79.1752 197.561 77.7897C197.849 76.4037 198.153 75.0116 198.472 73.6098C198.792 72.2086 199.079 70.8868 199.336 69.6444C199.304 68.5299 198.976 67.6784 198.352 67.0887C197.73 66.5002 196.858 66.2693 195.74 66.396C194.973 66.7147 194.405 67.1293 194.038 67.6384C193.67 68.1474 193.374 68.8008 193.151 69.5965C193.022 70.0111 192.831 70.8389 192.575 72.0813C192.319 73.3225 191.992 74.7486 191.592 76.3564C191.193 77.9655 190.721 79.6449 190.178 81.3963C189.635 83.1478 189.027 84.7333 188.357 86.1496C187.685 87.5666 186.95 88.7053 186.151 89.5653C185.352 90.4247 184.489 90.7756 183.562 90.6162C183.05 90.5205 182.723 89.995 182.579 89.0399C182.435 88.0841 182.412 86.9066 182.507 85.5048C182.603 84.1036 182.795 82.5666 183.082 80.8951C183.37 79.223 183.665 77.6388 183.969 76.1413C184.273 74.6449 184.553 73.3225 184.809 72.1765C185.064 71.0298 185.24 70.2656 185.336 69.8838C185.336 68.9602 185.127 68.2202 184.713 67.662C184.297 67.1056 183.794 66.7547 183.202 66.6111C182.61 66.4681 182.003 66.5475 181.381 66.8499C180.757 67.1529 180.222 67.7026 179.774 68.4977C179.614 69.3577 179.406 70.3535 179.151 71.4838C178.895 72.614 178.648 73.7765 178.408 74.971C178.168 76.1655 177.944 77.3358 177.737 78.4824C177.529 79.6291 177.377 80.6321 177.281 81.4921C177.217 82.1606 177.145 82.9812 177.066 83.9521C176.985 84.9242 176.945 85.9508 176.945 87.0332C176.945 88.1169 177.025 89.1914 177.186 90.258C177.345 91.3253 177.633 92.3047 178.048 93.1956C178.463 94.0877 179.047 94.8198 179.799 95.3931C180.549 95.9664 181.5 96.2846 182.651 96.3489C183.833 96.4119 184.864 96.3252 185.744 96.0858C186.622 95.847 187.421 95.4725 188.141 94.9628C188.86 94.4543 189.515 93.8489 190.107 93.1477C190.697 92.4477 191.281 91.6835 191.856 90.855C192.4 92.0659 193.103 93.0047 193.966 93.6737C194.829 94.3422 195.74 94.741 196.699 94.8677C197.657 94.9943 198.633 94.8604 199.624 94.4616C200.614 94.064 201.509 93.3871 202.308 92.4313C202.835 91.8453 203.331 91.1792 203.797 90.4429C203.995 90.7877 204.205 91.1204 204.442 91.4277C205.225 92.4477 206.288 93.1477 207.631 93.5301C209.069 93.9125 210.474 93.9768 211.849 93.7216C213.223 93.4671 214.534 93.0047 215.78 92.3362C217.027 91.6671 218.185 90.8635 219.257 89.9235C220.327 88.9841 221.262 88.0053 222.061 86.9854C222.029 87.7181 222.013 88.4114 222.013 89.0635C222.013 89.7168 221.997 90.4247 221.966 91.1895C220.367 92.3047 218.857 93.6422 217.435 95.2022C216.012 96.7622 214.765 98.4264 213.695 100.194C212.624 101.961 211.785 103.753 211.179 105.568C210.571 107.384 210.275 109.08 210.291 110.657C210.307 112.233 210.682 113.61 211.418 114.788C212.152 115.967 213.351 116.81 215.013 117.32C216.74 117.862 218.257 117.877 219.569 117.368C220.879 116.858 222.021 116.014 222.996 114.836C223.971 113.658 224.77 112.233 225.394 110.561C226.017 108.889 226.512 107.145 226.88 105.33C227.247 103.515 227.479 101.73 227.575 99.9797C227.671 98.2276 227.671 96.6664 227.575 95.2974C230.324 94.1513 232.577 92.7022 234.335 90.9501C236.093 89.1999 237.547 87.352 238.698 85.409C239.049 84.9314 239.169 84.3581 239.058 83.6896C238.945 83.0206 238.674 82.4472 238.243 81.9697Z" fill="#0D0C23"/>
19
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M298.724 78.9135C298.82 78.1814 298.964 77.4087 299.155 76.5966C299.347 75.7845 299.587 74.996 299.875 74.2318C300.162 73.4676 300.498 72.807 300.882 72.2494C301.265 71.6924 301.673 71.2943 302.104 71.0549C302.536 70.8167 302.974 70.8403 303.423 71.1264C303.902 71.4137 304.197 72.0185 304.31 72.9415C304.421 73.8663 304.31 74.853 303.974 75.9039C303.638 76.9554 303.039 77.942 302.176 78.8657C301.313 79.7899 300.146 80.3941 298.676 80.6808C298.612 80.236 298.628 79.6463 298.724 78.9135ZM315.336 80.8717C314.809 80.7135 314.306 80.6972 313.826 80.8244C313.347 80.9517 313.043 81.2862 312.916 81.8281C312.659 82.8468 312.251 83.8898 311.692 84.9565C311.133 86.0238 310.446 87.0346 309.632 87.9904C308.817 88.9455 307.897 89.7898 306.875 90.5219C305.851 91.2546 304.781 91.78 303.662 92.0982C302.543 92.4491 301.616 92.4885 300.882 92.2176C300.146 91.9479 299.563 91.4855 299.132 90.8328C298.7 90.1801 298.388 89.3916 298.197 88.468C298.005 87.5443 297.893 86.5892 297.861 85.6013C299.683 85.7292 301.305 85.4032 302.728 84.622C304.149 83.8426 305.356 82.8068 306.347 81.5171C307.337 80.2275 308.089 78.7784 308.6 77.1699C309.111 75.5621 309.399 73.9615 309.463 72.3688C309.495 70.8718 309.272 69.6064 308.792 68.5713C308.313 67.5367 307.665 66.7313 306.85 66.1586C306.036 65.5853 305.1 65.2507 304.046 65.1556C302.992 65.0598 301.92 65.2034 300.833 65.5853C299.522 66.0313 298.412 66.7555 297.501 67.7592C296.59 68.7622 295.831 69.9252 295.224 71.2464C294.617 72.5682 294.137 73.993 293.786 75.5215C293.434 77.0505 293.178 78.5554 293.019 80.0366C292.875 81.3656 292.798 82.6365 292.771 83.8632C292.702 84.0189 292.636 84.1686 292.563 84.3353C292.067 85.4668 291.491 86.5734 290.837 87.6558C290.182 88.7389 289.454 89.6467 288.656 90.3788C287.857 91.1116 287.026 91.3661 286.163 91.1431C285.651 91.0164 285.372 90.4261 285.324 89.3758C285.276 88.3243 285.331 87.0189 285.491 85.4583C285.651 83.8983 285.835 82.2093 286.043 80.3941C286.25 78.579 286.354 76.8439 286.354 75.1875C286.354 73.7542 286.082 72.3773 285.539 71.0549C284.995 69.7343 284.252 68.6349 283.31 67.7592C282.367 66.8828 281.272 66.3016 280.026 66.0156C278.779 65.7283 277.437 65.9198 275.999 66.5883C274.56 67.2574 273.417 68.1967 272.571 69.407C271.723 70.6179 270.948 71.8912 270.245 73.2288C269.989 72.2094 269.614 71.2628 269.118 70.3864C268.623 69.5107 268.016 68.7464 267.297 68.0931C266.577 67.441 265.769 66.9313 264.876 66.5646C263.981 66.1992 263.037 66.0156 262.046 66.0156C261.088 66.0156 260.201 66.1992 259.386 66.5646C258.571 66.9313 257.828 67.4004 257.156 67.9737C256.485 68.5476 255.878 69.1919 255.334 69.9088C254.791 70.6252 254.311 71.3343 253.896 72.0343C253.831 71.2064 253.76 70.4822 253.681 69.8603C253.6 69.2398 253.456 68.7143 253.249 68.2846C253.041 67.8543 252.746 67.5283 252.362 67.3052C251.978 67.0828 251.435 66.9707 250.732 66.9707C250.38 66.9707 250.028 67.0422 249.677 67.1852C249.325 67.3289 249.013 67.5283 248.742 67.7828C248.47 68.0386 248.263 68.3482 248.119 68.7143C247.975 69.0804 247.936 69.5028 247.999 69.9803C248.031 70.3312 248.119 70.7525 248.263 71.2464C248.406 71.7403 248.542 72.3858 248.67 73.1809C248.798 73.9773 248.902 74.9409 248.982 76.0712C249.062 77.2021 249.085 78.5875 249.054 80.2275C249.021 81.8681 248.902 83.7862 248.694 85.9837C248.486 88.1813 248.158 90.7291 247.711 93.6267C247.647 94.2957 247.903 94.8376 248.479 95.2515C249.054 95.6648 249.709 95.9036 250.444 95.9678C251.179 96.0315 251.875 95.9036 252.53 95.586C253.185 95.2666 253.561 94.7097 253.656 93.9139C253.752 92.417 253.936 90.8249 254.208 89.1364C254.479 87.4492 254.815 85.7771 255.215 84.1207C255.614 82.465 256.069 80.8887 256.581 79.3911C257.092 77.8942 257.66 76.573 258.283 75.4263C258.907 74.2797 259.554 73.3645 260.225 72.6797C260.896 71.9949 261.599 71.6524 262.335 71.6524C263.229 71.6524 263.924 72.0579 264.42 72.87C264.915 73.6827 265.266 74.7263 265.475 75.999C265.682 77.2736 265.778 78.6675 265.763 80.1796C265.746 81.6923 265.682 83.1492 265.571 84.5504C265.459 85.9522 265.331 87.2019 265.187 88.3007C265.043 89.3995 264.939 90.1564 264.876 90.5697C264.876 91.3025 265.155 91.8831 265.714 92.3134C266.273 92.743 266.896 92.9982 267.584 93.0776C268.272 93.1576 268.918 93.0297 269.526 92.6952C270.133 92.3606 270.485 91.7964 270.581 90.9994C270.9 88.7067 271.34 86.4062 271.899 84.0971C272.458 81.7881 273.098 79.7184 273.817 77.8869C274.536 76.0554 275.335 74.5585 276.214 73.3961C277.093 72.2343 278.028 71.6524 279.019 71.6524C279.53 71.6524 279.922 72.0033 280.193 72.7033C280.465 73.4039 280.601 74.3591 280.601 75.5694C280.601 76.4615 280.529 77.3772 280.386 78.3166C280.241 79.256 280.074 80.2275 279.882 81.2305C279.69 82.2341 279.522 83.2608 279.378 84.3117C279.235 85.3632 279.163 86.4613 279.163 87.608C279.163 88.4043 279.243 89.3279 279.403 90.3788C279.562 91.4291 279.865 92.4255 280.313 93.3642C280.761 94.3042 281.376 95.1 282.16 95.7527C282.943 96.4054 283.941 96.7321 285.155 96.7321C286.978 96.7321 288.591 96.3418 289.998 95.5618C291.404 94.7818 292.611 93.763 293.618 92.5049C293.67 92.4388 293.718 92.3685 293.769 92.3031C293.846 92.4891 293.914 92.6861 294.001 92.863C294.688 94.2642 295.623 95.3466 296.806 96.1115C297.988 96.8757 299.379 97.2975 300.978 97.3775C302.575 97.4563 304.317 97.1618 306.204 96.4933C307.609 95.9836 308.832 95.3466 309.871 94.5824C310.909 93.8182 311.844 92.8867 312.675 91.7879C313.507 90.6891 314.265 89.4231 314.953 87.9904C315.641 86.5565 316.335 84.9171 317.038 83.0692C317.166 82.5608 317.046 82.1068 316.679 81.7081C316.311 81.3105 315.864 81.0317 315.336 80.8717Z" fill="#0D0C23"/>
20
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M341.393 75.5432C341.233 76.4832 341.018 77.5189 340.746 78.6486C340.474 79.7795 340.131 80.9498 339.715 82.1601C339.3 83.3703 338.788 84.4612 338.181 85.4321C337.574 86.4042 336.878 87.1757 336.096 87.7491C335.312 88.3224 334.41 88.5612 333.387 88.4654C332.875 88.4024 332.483 88.0521 332.212 87.4145C331.94 86.7782 331.797 85.9655 331.78 84.9782C331.764 83.9915 331.852 82.9085 332.044 81.7298C332.236 80.5522 332.531 79.3971 332.932 78.2662C333.331 77.1365 333.818 76.0929 334.393 75.1371C334.969 74.182 335.632 73.4414 336.383 72.916C337.134 72.3905 337.958 72.1445 338.852 72.1754C339.747 72.2075 340.706 72.6529 341.729 73.5129C341.664 73.9275 341.553 74.6044 341.393 75.5432ZM358.437 79.1977C357.941 78.9431 357.43 78.888 356.903 79.031C356.376 79.174 356 79.6601 355.777 80.488C355.649 81.3801 355.361 82.4304 354.914 83.6406C354.466 84.8509 353.914 85.9982 353.26 87.08C352.604 88.163 351.853 89.063 351.006 89.7793C350.159 90.4963 349.256 90.823 348.298 90.7581C347.498 90.6951 346.938 90.289 346.62 89.5406C346.299 88.7921 346.132 87.8533 346.116 86.7218C346.099 85.5921 346.212 84.3182 346.451 82.9007C346.691 81.4837 346.979 80.0746 347.314 78.6722C347.65 77.2716 347.994 75.9256 348.346 74.6359C348.697 73.3463 348.984 72.2554 349.209 71.3639C349.464 70.5675 349.384 69.8912 348.969 69.333C348.553 68.7766 348.034 68.3778 347.411 68.1391C346.787 67.9003 346.155 67.8366 345.516 67.9481C344.877 68.0597 344.462 68.4021 344.27 68.9748C342.384 67.3506 340.57 66.4748 338.829 66.3476C337.086 66.2203 335.48 66.6027 334.01 67.4942C332.539 68.3857 331.237 69.6754 330.103 71.3639C328.968 73.0523 328.049 74.8911 327.345 76.8814C326.642 78.8716 326.203 80.9025 326.027 82.9722C325.851 85.0424 325.987 86.9297 326.435 88.6333C326.883 90.3369 327.673 91.7308 328.808 92.8126C329.942 93.8956 331.485 94.4375 333.435 94.4375C334.298 94.4375 335.129 94.2623 335.928 93.912C336.726 93.5611 337.462 93.1472 338.133 92.6696C338.804 92.192 339.395 91.6902 339.908 91.1648C340.418 90.6393 340.818 90.2018 341.106 89.8509C341.329 90.9975 341.697 91.9696 342.209 92.7654C342.719 93.5611 343.303 94.215 343.958 94.7235C344.613 95.2326 345.301 95.6071 346.02 95.8465C346.739 96.0853 347.435 96.2047 348.105 96.2047C349.608 96.2047 351.013 95.695 352.325 94.6756C353.635 93.6575 354.81 92.4066 355.849 90.926C356.887 89.4448 357.743 87.8848 358.413 86.2442C359.085 84.6043 359.532 83.1473 359.756 81.8728C359.98 81.3952 359.939 80.894 359.636 80.3686C359.332 79.8431 358.933 79.4534 358.437 79.1977Z" fill="#0D0C23"/>
21
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M444.738 105.571C444.467 106.653 444.043 107.57 443.467 108.318C442.892 109.066 442.173 109.456 441.31 109.489C440.767 109.52 440.351 109.233 440.063 108.629C439.776 108.023 439.576 107.243 439.464 106.288C439.352 105.332 439.304 104.265 439.32 103.087C439.336 101.909 439.384 100.746 439.464 99.5996C439.543 98.4536 439.64 97.3857 439.752 96.3991C439.863 95.4112 439.951 94.6482 440.015 94.1064C441.102 94.2336 442.006 94.7027 442.724 95.5154C443.443 96.3275 443.995 97.2906 444.378 98.4057C444.762 99.5202 444.985 100.723 445.05 102.012C445.113 103.302 445.009 104.488 444.738 105.571ZM427.382 105.571C427.111 106.653 426.687 107.57 426.112 108.318C425.537 109.066 424.817 109.456 423.954 109.489C423.411 109.52 422.996 109.233 422.708 108.629C422.42 108.023 422.22 107.243 422.109 106.288C421.996 105.332 421.948 104.265 421.965 103.087C421.98 101.909 422.028 100.746 422.109 99.5996C422.188 98.4536 422.284 97.3857 422.396 96.3991C422.508 95.4112 422.595 94.6482 422.66 94.1064C423.746 94.2336 424.65 94.7027 425.368 95.5154C426.088 96.3275 426.639 97.2906 427.023 98.4057C427.407 99.5202 427.63 100.723 427.694 102.012C427.757 103.302 427.653 104.488 427.382 105.571ZM409.572 78.4375C409.539 79.2011 409.467 79.8781 409.355 80.4672C409.243 81.0575 409.092 81.4308 408.9 81.5902C408.548 81.3987 408.116 80.906 407.605 80.109C407.094 79.3133 406.695 78.4127 406.406 77.4096C406.119 76.4066 406.03 75.42 406.143 74.4479C406.254 73.477 406.758 72.7212 407.653 72.1788C408.004 71.9879 408.308 72.0594 408.564 72.394C408.82 72.7285 409.027 73.2139 409.188 73.8509C409.347 74.4885 409.458 75.2206 409.523 76.0485C409.587 76.8769 409.603 77.6727 409.572 78.4375ZM405.328 87.9677C404.832 88.4925 404.28 88.9464 403.674 89.3289C403.066 89.7113 402.443 89.9979 401.804 90.1889C401.164 90.3804 400.589 90.4276 400.078 90.3319C398.64 90.0458 397.537 89.424 396.77 88.4689C396.003 87.5137 395.515 86.3913 395.308 85.1017C395.1 83.8114 395.123 82.4338 395.38 80.969C395.635 79.5042 396.066 78.143 396.674 76.8848C397.281 75.6266 398.017 74.5436 398.879 73.6364C399.742 72.7285 400.685 72.1637 401.708 71.94C401.324 73.5642 401.197 75.2448 401.324 76.98C401.452 78.7157 401.868 80.3478 402.571 81.8762C403.018 82.8011 403.554 83.6441 404.177 84.4083C404.801 85.1732 405.56 85.8259 406.455 86.3671C406.199 86.9089 405.823 87.4422 405.328 87.9677ZM458.378 78.9151C458.474 78.183 458.617 77.4096 458.81 76.5975C459.001 75.786 459.241 74.9976 459.528 74.2333C459.816 73.4685 460.152 72.8079 460.536 72.2509C460.92 71.694 461.326 71.2952 461.758 71.0564C462.19 70.8176 462.629 70.8413 463.076 71.1279C463.556 71.4152 463.851 72.02 463.963 72.943C464.075 73.8673 463.963 74.8539 463.628 75.9054C463.292 76.9563 462.693 77.9436 461.83 78.8666C460.968 79.7914 459.8 80.3957 458.33 80.6823C458.266 80.2369 458.282 79.6478 458.378 78.9151ZM477.7 78.9151C477.796 78.183 477.939 77.4096 478.131 76.5975C478.323 75.786 478.563 74.9976 478.851 74.2333C479.138 73.4685 479.473 72.8079 479.857 72.2509C480.241 71.694 480.649 71.2952 481.08 71.0564C481.512 70.8176 481.951 70.8413 482.398 71.1279C482.878 71.4152 483.173 72.02 483.285 72.943C483.397 73.8673 483.285 74.8539 482.95 75.9054C482.614 76.9563 482.015 77.9436 481.152 78.8666C480.289 79.7914 479.122 80.3957 477.652 80.6823C477.588 80.2369 477.604 79.6478 477.7 78.9151ZM495.655 81.7096C495.287 81.312 494.84 81.0332 494.313 80.8732C493.785 80.7144 493.282 80.6987 492.802 80.826C492.323 80.9532 492.018 81.2878 491.891 81.829C491.635 82.8484 491.228 83.8914 490.669 84.9574C490.109 86.0253 489.422 87.0362 488.607 87.9913C487.792 88.9464 486.873 89.7913 485.851 90.5234C484.827 91.2561 483.757 91.7816 482.639 92.0991C481.519 92.4506 480.592 92.49 479.857 92.2191C479.122 91.9488 478.539 91.487 478.107 90.8343C477.676 90.181 477.365 89.3931 477.172 88.4689C476.981 87.5459 476.868 86.5907 476.837 85.6029C478.659 85.7307 480.281 85.4047 481.703 84.6235C483.125 83.8435 484.332 82.8077 485.324 81.5181C486.314 80.229 487.065 78.7799 487.576 77.1715C488.087 75.563 488.375 73.963 488.44 72.3703C488.471 70.8734 488.247 69.6073 487.768 68.5722C487.289 67.5377 486.642 66.7328 485.827 66.1601C485.011 65.5862 484.077 65.2522 483.021 65.1565C481.967 65.0607 480.896 65.205 479.809 65.5862C478.498 66.0328 477.388 66.7571 476.478 67.7601C475.567 68.7637 474.807 69.9267 474.2 71.2473C473.592 72.5697 473.113 73.9939 472.761 75.523C472.409 77.0515 472.154 78.5569 471.995 80.0375C471.839 81.4744 471.755 82.8496 471.736 84.1659C471.615 84.4283 471.486 84.692 471.347 84.9574C470.787 86.0253 470.1 87.0362 469.285 87.9913C468.471 88.9464 467.551 89.7913 466.529 90.5234C465.506 91.2561 464.435 91.7816 463.317 92.0991C462.197 92.4506 461.271 92.49 460.536 92.2191C459.8 91.9488 459.217 91.487 458.786 90.8343C458.355 90.181 458.043 89.3931 457.851 88.4689C457.659 87.5459 457.547 86.5907 457.515 85.6029C459.337 85.7307 460.959 85.4047 462.382 84.6235C463.803 83.8435 465.01 82.8077 466.001 81.5181C466.992 80.229 467.743 78.7799 468.254 77.1715C468.765 75.563 469.054 73.963 469.117 72.3703C469.149 70.8734 468.926 69.6073 468.447 68.5722C467.967 67.5377 467.319 66.7328 466.504 66.1601C465.689 65.5862 464.755 65.2522 463.7 65.1565C462.645 65.0607 461.574 65.205 460.488 65.5862C459.176 66.0328 458.066 66.7571 457.156 67.7601C456.245 68.7637 455.485 69.9267 454.878 71.2473C454.271 72.5697 453.792 73.9939 453.44 75.523C453.088 77.0515 452.832 78.5569 452.673 80.0375C452.582 80.8726 452.522 81.6823 452.477 82.4774C452.168 82.7393 451.867 83.0029 451.546 83.2617C450.444 84.1538 449.284 84.9574 448.07 85.6744C446.855 86.3913 445.592 86.9804 444.283 87.4422C442.971 87.904 441.629 88.1828 440.255 88.278L443.228 56.5578C443.42 55.8887 443.324 55.3003 442.94 54.7906C442.557 54.2809 442.061 53.9306 441.454 53.7397C440.847 53.5482 440.199 53.5645 439.512 53.787C438.824 54.0106 438.258 54.5203 437.81 55.3154C437.586 56.5263 437.354 58.182 437.115 60.2838C436.875 62.3856 436.635 64.6789 436.396 67.1631C436.156 69.6473 435.916 72.2109 435.677 74.8539C435.437 77.4981 435.229 79.966 435.053 82.2587C435.045 82.3605 435.039 82.4526 435.031 82.5532C434.751 82.7896 434.48 83.0277 434.19 83.2617C433.088 84.1538 431.928 84.9574 430.714 85.6744C429.499 86.3913 428.237 86.9804 426.927 87.4422C425.616 87.904 424.273 88.1828 422.899 88.278L425.872 56.5578C426.064 55.8887 425.968 55.3003 425.585 54.7906C425.201 54.2809 424.705 53.9306 424.098 53.7397C423.491 53.5482 422.843 53.5645 422.156 53.787C421.469 54.0106 420.902 54.5203 420.454 55.3154C420.23 56.5263 419.999 58.182 419.76 60.2838C419.519 62.3856 419.28 64.6789 419.04 67.1631C418.8 69.6473 418.561 72.2109 418.321 74.8539C418.082 77.4981 417.873 79.966 417.698 82.2587C417.694 82.3047 417.691 82.3465 417.687 82.3926C417.185 82.6247 416.638 82.8284 416.043 82.9993C415.436 83.175 414.749 83.2786 413.982 83.3102C414.11 82.7362 414.213 82.0993 414.293 81.3987C414.373 80.6987 414.438 79.966 414.486 79.2011C414.534 78.4375 414.549 77.6727 414.534 76.9084C414.517 76.1436 414.477 75.4436 414.414 74.806C414.253 73.4376 413.958 72.1394 413.527 70.9128C413.095 69.6873 412.512 68.6607 411.777 67.8316C411.041 67.0037 410.123 66.4462 409.019 66.1601C407.917 65.8734 406.63 65.9686 405.161 66.4462C402.986 66.1601 401.029 66.3595 399.287 67.0437C397.545 67.7292 396.034 68.7237 394.756 70.0291C393.478 71.3358 392.431 72.8715 391.616 74.6394C390.801 76.4066 390.257 78.2224 389.986 80.0848C389.871 80.8744 389.815 81.6605 389.798 82.4447C389.303 83.4544 388.761 84.3368 388.164 85.0774C387.317 86.1283 386.438 86.9883 385.527 87.6568C384.616 88.3258 383.713 88.8355 382.819 89.1858C381.923 89.5367 381.124 89.7755 380.421 89.9022C379.59 90.0616 378.791 90.0779 378.024 89.9501C377.257 89.8234 376.553 89.4567 375.915 88.8513C375.403 88.4058 375.011 87.6889 374.74 86.7016C374.468 85.7144 374.309 84.5926 374.261 83.3338C374.213 82.0756 374.261 80.7617 374.404 79.3926C374.548 78.0236 374.795 76.7254 375.147 75.4994C375.499 74.2733 375.945 73.1746 376.49 72.2024C377.032 71.2322 377.672 70.5388 378.408 70.1249C378.822 70.1891 379.079 70.4352 379.175 70.8649C379.271 71.2952 379.294 71.8049 379.246 72.394C379.199 72.9836 379.127 73.5885 379.031 74.2091C378.935 74.8303 378.887 75.3485 378.887 75.7618C379.047 76.6218 379.358 77.2909 379.822 77.7684C380.285 78.246 380.805 78.5254 381.38 78.6042C381.955 78.6842 382.522 78.549 383.083 78.1981C383.641 77.8484 384.096 77.2909 384.449 76.526C384.48 76.5581 384.528 76.5739 384.592 76.5739L385.264 70.5073C385.455 69.6788 385.327 68.9467 384.88 68.3098C384.432 67.6728 383.841 67.3062 383.106 67.211C382.179 65.8734 380.924 65.165 379.342 65.085C377.76 65.0056 376.138 65.5231 374.476 66.6377C373.453 67.371 372.55 68.3813 371.767 69.671C370.983 70.9613 370.345 72.394 369.85 73.9703C369.353 75.5466 369.002 77.2115 368.795 78.963C368.587 80.7144 368.547 82.4187 368.674 84.0738C368.802 85.7307 369.098 87.2913 369.562 88.7555C370.025 90.221 370.672 91.447 371.504 92.4337C372.207 93.2937 373.005 93.9233 373.9 94.3215C374.795 94.7197 375.73 94.9658 376.705 95.0615C377.68 95.1567 378.647 95.1167 379.606 94.9421C380.565 94.7676 381.476 94.5209 382.339 94.2015C383.457 93.7882 384.609 93.2621 385.791 92.6252C386.973 91.9888 388.108 91.224 389.195 90.3319C389.767 89.8628 390.317 89.3513 390.849 88.8028C391.091 89.4016 391.362 89.981 391.688 90.5234C392.551 91.9561 393.717 93.1191 395.188 94.0106C396.657 94.9021 398.464 95.3312 400.605 95.3003C402.907 95.2682 405.032 94.6876 406.982 93.5567C408.932 92.427 410.53 90.7616 411.777 88.5646C413.644 88.5646 415.481 88.258 417.287 87.6489C417.272 87.8416 417.256 88.0446 417.242 88.2307C417.115 89.9186 417.05 91.0646 417.05 91.67C417.019 92.7209 416.947 94.0185 416.835 95.5627C416.723 97.1075 416.651 98.7318 416.619 100.435C416.588 102.139 416.651 103.859 416.811 105.595C416.971 107.33 417.306 108.907 417.818 110.325C418.328 111.741 419.055 112.944 419.999 113.932C420.941 114.918 422.18 115.508 423.715 115.699C425.345 115.921 426.751 115.635 427.934 114.839C429.116 114.042 430.075 112.952 430.811 111.567C431.546 110.181 432.064 108.581 432.369 106.766C432.672 104.95 432.76 103.127 432.633 101.295C432.504 99.4639 432.168 97.7366 431.625 96.113C431.082 94.4882 430.33 93.1506 429.372 92.0991C429.948 91.9409 430.634 91.6385 431.434 91.1919C432.232 90.7464 433.055 90.2446 433.903 89.687C434.111 89.5501 434.316 89.4058 434.524 89.2652C434.446 90.3937 434.406 91.1985 434.406 91.67C434.375 92.7209 434.303 94.0185 434.19 95.5627C434.079 97.1075 434.007 98.7318 433.975 100.435C433.943 102.139 434.007 103.859 434.167 105.595C434.326 107.33 434.662 108.907 435.173 110.325C435.684 111.741 436.412 112.944 437.354 113.932C438.297 114.918 439.536 115.508 441.071 115.699C442.7 115.921 444.106 115.635 445.289 114.839C446.472 114.042 447.431 112.952 448.166 111.567C448.901 110.181 449.42 108.581 449.724 106.766C450.028 104.95 450.115 103.127 449.988 101.295C449.86 99.4639 449.524 97.7366 448.982 96.113C448.437 94.4882 447.687 93.1506 446.727 92.0991C447.303 91.9409 447.99 91.6385 448.789 91.1919C449.588 90.7464 450.411 90.2446 451.259 89.687C451.699 89.3974 452.136 89.0986 452.573 88.7913C452.737 90.3488 453.091 91.7149 453.655 92.864C454.343 94.2658 455.277 95.3482 456.46 96.113C457.642 96.8766 459.033 97.299 460.632 97.3784C462.23 97.4572 463.971 97.1633 465.858 96.4942C467.264 95.9851 468.486 95.3482 469.525 94.5839C470.563 93.8191 471.498 92.8876 472.33 91.7894C472.378 91.7258 472.423 91.6567 472.47 91.5925C472.618 92.0385 472.782 92.467 472.977 92.864C473.665 94.2658 474.6 95.3482 475.782 96.113C476.964 96.8766 478.355 97.299 479.953 97.3784C481.551 97.4572 483.293 97.1633 485.179 96.4942C486.586 95.9851 487.808 95.3482 488.847 94.5839C489.885 93.8191 490.82 92.8876 491.652 91.7894C492.483 90.6901 493.241 89.424 493.929 87.9913C494.616 86.558 495.311 84.9186 496.015 83.0708C496.142 82.5617 496.022 82.1078 495.655 81.7096Z" fill="#0D0C23"/>
22
+ </svg>
assets/paypal.png ADDED
Binary file
assets/paypal.svg ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ aria-label="PayPal" role="img"
3
+ viewBox="0 0 512 512"><rect
4
+ width="512" height="512"
5
+ rx="15%"
6
+ fill="#fff"/><path fill="#002c8a" d="M377 184.8L180.7 399h-72c-5 0-9-5-8-10l48-304c1-7 7-12 14-12h122c84 3 107 46 92 112z"/>
7
+ <path fill="#009be1" d="M380.2 165c30 16 37 46 27 86-13 59-52 84-109 85l-16 1c-6 0-10 4-11 10l-13 79c-1 7-7 12-14 12h-60c-5 0-9-5-8-10l22-143c1-5 182-120 182-120z"/>
8
+ <path fill="#001f6b" d="M197 292l20-127a14 14 0 0 1 13-11h96c23 0 40 4 54 11-5 44-26 115-128 117h-44c-5 0-10 4-11 10z"/></svg>
assets/svg.xml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
5
+
6
+
7
+
8
+ <svg id="paypal">
9
+ <path d="M14.06 3.713c.12-1.071-.093-1.832-.702-2.526C12.628.356 11.312 0 9.626 0H4.734a.7.7 0 0 0-.691.59L2.005 13.509a.42.42 0 0 0 .415.486h2.756l-.202 1.28a.628.628 0 0 0 .62.726H8.14c.429 0 .793-.31.862-.731l.025-.13.48-3.043.03-.164.001-.007a.351.351 0 0 1 .348-.297h.38c1.266 0 2.425-.256 3.345-.91.379-.27.712-.603.993-1.005a4.942 4.942 0 0 0 .88-2.195c.242-1.246.13-2.356-.57-3.154a2.687 2.687 0 0 0-.76-.59l-.094-.061ZM6.543 8.82a.695.695 0 0 1 .321-.079H8.3c2.82 0 5.027-1.144 5.672-4.456l.003-.016c.217.124.4.27.548.438.546.623.679 1.535.45 2.71-.272 1.397-.866 2.307-1.663 2.874-.802.57-1.842.815-3.043.815h-.38a.873.873 0 0 0-.863.734l-.03.164-.48 3.043-.024.13-.001.004a.352.352 0 0 1-.348.296H5.595a.106.106 0 0 1-.105-.123l.208-1.32.845-5.214Z"/>
10
+ </svg>
11
+
12
+ <svg id="buymeacoffee">
13
+ <path d="M791.109 297.518L790.231 297.002L788.201 296.383C789.018 297.072 790.04 297.472 791.109 297.518V297.518Z" fill="#0D0C22"/>
14
+ <path d="M803.896 388.891L802.916 389.166L803.896 388.891Z" fill="#0D0C22"/>
15
+ <path d="M791.484 297.377C791.359 297.361 791.237 297.332 791.118 297.29C791.111 297.371 791.111 297.453 791.118 297.534C791.252 297.516 791.379 297.462 791.484 297.377V297.377Z" fill="#0D0C22"/>
16
+ <path d="M791.113 297.529H791.244V297.447L791.113 297.529Z" fill="#0D0C22"/>
17
+ <path d="M803.111 388.726L804.591 387.883L805.142 387.573L805.641 387.04C804.702 387.444 803.846 388.016 803.111 388.726V388.726Z" fill="#0D0C22"/>
18
+ <path d="M793.669 299.515L792.223 298.138L791.243 297.605C791.77 298.535 792.641 299.221 793.669 299.515V299.515Z" fill="#0D0C22"/>
19
+ <path d="M430.019 1186.18C428.864 1186.68 427.852 1187.46 427.076 1188.45L427.988 1187.87C428.608 1187.3 429.485 1186.63 430.019 1186.18Z" fill="#0D0C22"/>
20
+ <path d="M641.187 1144.63C641.187 1143.33 640.551 1143.57 640.705 1148.21C640.705 1147.84 640.86 1147.46 640.929 1147.1C641.015 1146.27 641.084 1145.46 641.187 1144.63Z" fill="#0D0C22"/>
21
+ <path d="M619.284 1186.18C618.129 1186.68 617.118 1187.46 616.342 1188.45L617.254 1187.87C617.873 1187.3 618.751 1186.63 619.284 1186.18Z" fill="#0D0C22"/>
22
+ <path d="M281.304 1196.06C280.427 1195.3 279.354 1194.8 278.207 1194.61C279.136 1195.06 280.065 1195.51 280.684 1195.85L281.304 1196.06Z" fill="#0D0C22"/>
23
+ <path d="M247.841 1164.01C247.704 1162.66 247.288 1161.35 246.619 1160.16C247.093 1161.39 247.489 1162.66 247.806 1163.94L247.841 1164.01Z" fill="#0D0C22"/>
24
+ <path d="M472.623 590.836C426.682 610.503 374.546 632.802 306.976 632.802C278.71 632.746 250.58 628.868 223.353 621.274L270.086 1101.08C271.74 1121.13 280.876 1139.83 295.679 1153.46C310.482 1167.09 329.87 1174.65 349.992 1174.65C349.992 1174.65 416.254 1178.09 438.365 1178.09C462.161 1178.09 533.516 1174.65 533.516 1174.65C553.636 1174.65 573.019 1167.08 587.819 1153.45C602.619 1139.82 611.752 1121.13 613.406 1101.08L663.459 570.876C641.091 563.237 618.516 558.161 593.068 558.161C549.054 558.144 513.591 573.303 472.623 590.836Z" fill="#FFDD00"/>
25
+ <path d="M78.6885 386.132L79.4799 386.872L79.9962 387.182C79.5987 386.787 79.1603 386.435 78.6885 386.132V386.132Z" fill="#0D0C22"/>
26
+ <path d="M879.567 341.849L872.53 306.352C866.215 274.503 851.882 244.409 819.19 232.898C808.711 229.215 796.821 227.633 788.786 220.01C780.751 212.388 778.376 200.55 776.518 189.572C773.076 169.423 769.842 149.257 766.314 129.143C763.269 111.85 760.86 92.4243 752.928 76.56C742.604 55.2584 721.182 42.8009 699.88 34.559C688.965 30.4844 677.826 27.0375 666.517 24.2352C613.297 10.1947 557.342 5.03277 502.591 2.09047C436.875 -1.53577 370.983 -0.443234 305.422 5.35968C256.625 9.79894 205.229 15.1674 158.858 32.0469C141.91 38.224 124.445 45.6399 111.558 58.7341C95.7448 74.8221 90.5829 99.7026 102.128 119.765C110.336 134.012 124.239 144.078 138.985 150.737C158.192 159.317 178.251 165.846 198.829 170.215C256.126 182.879 315.471 187.851 374.007 189.968C438.887 192.586 503.87 190.464 568.44 183.618C584.408 181.863 600.347 179.758 616.257 177.304C634.995 174.43 647.022 149.928 641.499 132.859C634.891 112.453 617.134 104.538 597.055 107.618C594.095 108.082 591.153 108.512 588.193 108.942L586.06 109.252C579.257 110.113 572.455 110.915 565.653 111.661C551.601 113.175 537.515 114.414 523.394 115.378C491.768 117.58 460.057 118.595 428.363 118.647C397.219 118.647 366.058 117.769 334.983 115.722C320.805 114.793 306.661 113.611 292.552 112.177C286.134 111.506 279.733 110.801 273.333 110.009L267.241 109.235L265.917 109.046L259.602 108.134C246.697 106.189 233.792 103.953 221.025 101.251C219.737 100.965 218.584 100.249 217.758 99.2193C216.932 98.1901 216.482 96.9099 216.482 95.5903C216.482 94.2706 216.932 92.9904 217.758 91.9612C218.584 90.9319 219.737 90.2152 221.025 89.9293H221.266C232.33 87.5721 243.479 85.5589 254.663 83.8038C258.392 83.2188 262.131 82.6453 265.882 82.0832H265.985C272.988 81.6186 280.026 80.3625 286.994 79.5366C347.624 73.2302 408.614 71.0801 469.538 73.1014C499.115 73.9618 528.676 75.6996 558.116 78.6935C564.448 79.3474 570.746 80.0357 577.043 80.8099C579.452 81.1025 581.878 81.4465 584.305 81.7391L589.191 82.4445C603.438 84.5667 617.61 87.1419 631.708 90.1703C652.597 94.7128 679.422 96.1925 688.713 119.077C691.673 126.338 693.015 134.408 694.649 142.03L696.731 151.752C696.786 151.926 696.826 152.105 696.852 152.285C701.773 175.227 706.7 198.169 711.632 221.111C711.994 222.806 712.002 224.557 711.657 226.255C711.312 227.954 710.621 229.562 709.626 230.982C708.632 232.401 707.355 233.6 705.877 234.504C704.398 235.408 702.75 235.997 701.033 236.236H700.895L697.884 236.649L694.908 237.044C685.478 238.272 676.038 239.419 666.586 240.486C647.968 242.608 629.322 244.443 610.648 245.992C573.539 249.077 536.356 251.102 499.098 252.066C480.114 252.57 461.135 252.806 442.162 252.771C366.643 252.712 291.189 248.322 216.173 239.625C208.051 238.662 199.93 237.629 191.808 236.58C198.106 237.389 187.231 235.96 185.029 235.651C179.867 234.928 174.705 234.177 169.543 233.397C152.216 230.798 134.993 227.598 117.7 224.793C96.7944 221.352 76.8005 223.073 57.8906 233.397C42.3685 241.891 29.8055 254.916 21.8776 270.735C13.7217 287.597 11.2956 305.956 7.64786 324.075C4.00009 342.193 -1.67805 361.688 0.472751 380.288C5.10128 420.431 33.165 453.054 73.5313 460.35C111.506 467.232 149.687 472.807 187.971 477.556C338.361 495.975 490.294 498.178 641.155 484.129C653.44 482.982 665.708 481.732 677.959 480.378C681.786 479.958 685.658 480.398 689.292 481.668C692.926 482.938 696.23 485.005 698.962 487.717C701.694 490.429 703.784 493.718 705.08 497.342C706.377 500.967 706.846 504.836 706.453 508.665L702.633 545.797C694.936 620.828 687.239 695.854 679.542 770.874C671.513 849.657 663.431 928.434 655.298 1007.2C653.004 1029.39 650.71 1051.57 648.416 1073.74C646.213 1095.58 645.904 1118.1 641.757 1139.68C635.218 1173.61 612.248 1194.45 578.73 1202.07C548.022 1209.06 516.652 1212.73 485.161 1213.01C450.249 1213.2 415.355 1211.65 380.443 1211.84C343.173 1212.05 297.525 1208.61 268.756 1180.87C243.479 1156.51 239.986 1118.36 236.545 1085.37C231.957 1041.7 227.409 998.039 222.9 954.381L197.607 711.615L181.244 554.538C180.968 551.94 180.693 549.376 180.435 546.76C178.473 528.023 165.207 509.681 144.301 510.627C126.407 511.418 106.069 526.629 108.168 546.76L120.298 663.214L145.385 904.104C152.532 972.528 159.661 1040.96 166.773 1109.41C168.15 1122.52 169.44 1135.67 170.885 1148.78C178.749 1220.43 233.465 1259.04 301.224 1269.91C340.799 1276.28 381.337 1277.59 421.497 1278.24C472.979 1279.07 524.977 1281.05 575.615 1271.72C650.653 1257.95 706.952 1207.85 714.987 1130.13C717.282 1107.69 719.576 1085.25 721.87 1062.8C729.498 988.559 737.115 914.313 744.72 840.061L769.601 597.451L781.009 486.263C781.577 480.749 783.905 475.565 787.649 471.478C791.392 467.391 796.352 464.617 801.794 463.567C823.25 459.386 843.761 452.245 859.023 435.916C883.318 409.918 888.153 376.021 879.567 341.849ZM72.4301 365.835C72.757 365.68 72.1548 368.484 71.8967 369.792C71.8451 367.813 71.9483 366.058 72.4301 365.835ZM74.5121 381.94C74.6842 381.819 75.2003 382.508 75.7337 383.334C74.925 382.576 74.4089 382.009 74.4949 381.94H74.5121ZM76.5597 384.641C77.2996 385.897 77.6953 386.689 76.5597 384.641V384.641ZM80.672 387.979H80.7752C80.7752 388.1 80.9645 388.22 81.0333 388.341C80.9192 388.208 80.7925 388.087 80.6548 387.979H80.672ZM800.796 382.989C793.088 390.319 781.473 393.726 769.996 395.43C641.292 414.529 510.713 424.199 380.597 419.932C287.476 416.749 195.336 406.407 103.144 393.382C94.1102 392.109 84.3197 390.457 78.1082 383.798C66.4078 371.237 72.1548 345.944 75.2003 330.768C77.9878 316.865 83.3218 298.334 99.8572 296.355C125.667 293.327 155.64 304.218 181.175 308.09C211.917 312.781 242.774 316.538 273.745 319.36C405.925 331.405 540.325 329.529 671.92 311.91C695.905 308.686 719.805 304.941 743.619 300.674C764.835 296.871 788.356 289.731 801.175 311.703C809.967 326.673 811.137 346.701 809.778 363.615C809.359 370.984 806.139 377.915 800.779 382.989H800.796Z" fill="#0D0C22"/>
27
+ </svg>
28
+
29
+
30
+
31
+
32
+ </svg>
code/authorMetaData.php CHANGED
@@ -4,7 +4,7 @@ namespace xmlSitemapGenerator;
4
  include_once 'dataAccess.php';
5
  include_once 'helpers.php';
6
 
7
- class authorMetaData
8
  {
9
 
10
  public static function addHooks()
@@ -19,25 +19,23 @@ class authorMetaData
19
  static function save_metaData($userId ) {
20
 
21
  /* Verify the nonce before proceeding. */
22
- if ( !isset( $_POST['wpXSG_meta_nonce'] ) || !wp_verify_nonce( $_POST['wpXSG_meta_nonce'], basename( __FILE__ ) ) )
23
- return ;
24
 
25
  /* Check if the current user has permission to edit the post. */
26
- if ( !current_user_can( 'edit_user') )
27
- return $userId;
28
 
29
 
30
- $settings = new metaSettings();
31
 
32
  $settings->id = helpers::getFieldValue('wpXSG-metaId' , '0' );
33
  $settings->itemId = $userId ;
34
  $settings->itemType = "author";
35
- $settings->exclude = helpers::getFieldValue('wpXSG-Exclude' , '0' );
36
- $settings->priority = helpers::getFieldValue('wpXSG-Priority' , 'default' );
37
- $settings->frequency = helpers::getFieldValue('wpXSG-Frequency' , 'default' );
38
- $settings->inherit = helpers::getFieldValue('wpXSG-Inherit' , 0 );
39
 
40
- dataAccess::saveMetaItem($settings );
41
 
42
 
43
  }
@@ -50,7 +48,7 @@ class authorMetaData
50
  $userId = $WP_User->ID;
51
  self::addHooks();
52
 
53
- $settings = dataAccess::getMetaItem($userId , "author");
54
 
55
 
56
  wp_nonce_field( basename( __FILE__ ), 'wpXSG_meta_nonce' );
@@ -62,7 +60,7 @@ class authorMetaData
62
 
63
 
64
 
65
- <table class="form-table">
66
  <tbody><tr class="form-field form-required term-name-wrap">
67
  <th scope="row"><label for="name">Sitemap inclusion</label></th>
68
  <td>
4
  include_once 'dataAccess.php';
5
  include_once 'helpers.php';
6
 
7
+ class AuthorMetaData
8
  {
9
 
10
  public static function addHooks()
19
  static function save_metaData($userId ) {
20
 
21
  /* Verify the nonce before proceeding. */
22
+ if ( !isset( $_POST['wpXSG_meta_nonce'] ) || !wp_verify_nonce( $_POST['wpXSG_meta_nonce'], basename( __FILE__ ) ) ) {return ;}
 
23
 
24
  /* Check if the current user has permission to edit the post. */
25
+ if ( !current_user_can( 'edit_user') ){return ;}
 
26
 
27
 
28
+ $settings = new MetaSettings();
29
 
30
  $settings->id = helpers::getFieldValue('wpXSG-metaId' , '0' );
31
  $settings->itemId = $userId ;
32
  $settings->itemType = "author";
33
+ $settings->exclude = Helpers::getFieldValue('wpXSG-Exclude' , '0' );
34
+ $settings->priority = Helpers::getFieldValue('wpXSG-Priority' , 'default' );
35
+ $settings->frequency = Helpers::getFieldValue('wpXSG-Frequency' , 'default' );
36
+ $settings->inherit = Helpers::getFieldValue('wpXSG-Inherit' , 0 );
37
 
38
+ DataAccess::saveMetaItem($settings );
39
 
40
 
41
  }
48
  $userId = $WP_User->ID;
49
  self::addHooks();
50
 
51
+ $settings = DataAccess::getMetaItem($userId , "author");
52
 
53
 
54
  wp_nonce_field( basename( __FILE__ ), 'wpXSG_meta_nonce' );
60
 
61
 
62
 
63
+ <table class="form-table" aria-label="Sitemap settings">
64
  <tbody><tr class="form-field form-required term-name-wrap">
65
  <th scope="row"><label for="name">Sitemap inclusion</label></th>
66
  <td>
code/categoryMetaData.php CHANGED
@@ -3,42 +3,40 @@ namespace xmlSitemapGenerator;
3
 
4
  include_once 'dataAccess.php';
5
 
6
- class categoryMetaData
7
  {
8
 
9
  public static function addHooks()
10
  {
11
- $taxonomy = helpers::getRequestValue('taxonomy', '0' );
12
  add_action($taxonomy . '_edit_form', array( __CLASS__, 'renderEdit' ) );
13
- add_action($taxonomy . '_add_form_fields', array( __CLASS__, 'renderAdd' ) );
14
  add_action( 'created_' . $taxonomy, array( __CLASS__, 'save_metaData' ), 10, 2);
15
  add_action( 'edited_' . $taxonomy , array( __CLASS__, 'save_metaData' ), 10, 2);
16
 
17
  }
18
 
19
 
20
- static function save_metaData( $term_id, $ttId ) {
21
 
22
  /* Verify the nonce before proceeding. */
23
- if ( !isset( $_POST['wpXSG_meta_nonce'] ) || !wp_verify_nonce( $_POST['wpXSG_meta_nonce'], basename( __FILE__ ) ) )
24
- return ;
25
 
26
 
27
  /* Check if the current user has permission to edit the post. */
28
- if ( !current_user_can( 'manage_categories') )
29
- return $term_id;
30
 
31
- $settings = new metaSettings();
32
 
33
- $settings->id = helpers::getFieldValue('wpXSG-metaId' , '0' );
34
  $settings->itemId = $term_id ;
35
  $settings->itemType = "taxonomy";
36
- $settings->exclude = helpers::getFieldValue('wpXSG-Exclude' , '0' );
37
- $settings->priority = helpers::getFieldValue('wpXSG-Priority' , 'default' );
38
- $settings->frequency = helpers::getFieldValue('wpXSG-Frequency', 'default' );
39
- $settings->inherit =helpers::getFieldValue('wpXSG-Inherit', 0 );
40
- $settings->news =helpers::getFieldValue('wpXSG-News', 0 );
41
- dataAccess::saveMetaItem($settings );
42
 
43
  }
44
 
@@ -48,8 +46,8 @@ class categoryMetaData
48
  {
49
  self::addHooks();
50
 
51
- $settings = new metaSettings(1,1,1,0);
52
- $globalSettings = core::getGlobalSettings();
53
 
54
  wp_nonce_field( basename( __FILE__ ), 'wpXSG_meta_nonce' );
55
  ?>
@@ -110,14 +108,17 @@ class categoryMetaData
110
  $term_id = $tag->term_id;
111
  self::addHooks();
112
 
113
- $settings = dataAccess::getMetaItem($term_id , "taxonomy");
114
- $globalSettings = core::getGlobalSettings();
115
 
116
  wp_nonce_field( basename( __FILE__ ), 'wpXSG_meta_nonce' );
117
  ?>
118
 
119
 
120
  <h3>Sitemap settings : </h3>
 
 
 
121
 
122
  <table class="form-table">
123
  <tbody><tr class="form-field form-required term-name-wrap">
3
 
4
  include_once 'dataAccess.php';
5
 
6
+ class CategoryMetaData
7
  {
8
 
9
  public static function addHooks()
10
  {
11
+ $taxonomy = Helpers::getRequestValue('taxonomy','0' );
12
  add_action($taxonomy . '_edit_form', array( __CLASS__, 'renderEdit' ) );
13
+ add_action($taxonomy . '_add_form_fields', array( __CLASS__, 'renderAdd' ) );
14
  add_action( 'created_' . $taxonomy, array( __CLASS__, 'save_metaData' ), 10, 2);
15
  add_action( 'edited_' . $taxonomy , array( __CLASS__, 'save_metaData' ), 10, 2);
16
 
17
  }
18
 
19
 
20
+ static function save_metaData( $term_id) {
21
 
22
  /* Verify the nonce before proceeding. */
23
+ if ( !isset( $_POST['wpXSG_meta_nonce'] ) || !wp_verify_nonce( $_POST['wpXSG_meta_nonce'], basename( __FILE__ ) ) ) { return ;}
 
24
 
25
 
26
  /* Check if the current user has permission to edit the post. */
27
+ if ( !current_user_can( 'manage_categories') ) {return ;}
 
28
 
29
+ $settings = new MetaSettings();
30
 
31
+ $settings->id = Helpers::getFieldValue('wpXSG-metaId' , '0' );
32
  $settings->itemId = $term_id ;
33
  $settings->itemType = "taxonomy";
34
+ $settings->exclude = Helpers::getFieldValue('wpXSG-Exclude' , '0' );
35
+ $settings->priority = Helpers::getFieldValue('wpXSG-Priority' , 'default' );
36
+ $settings->frequency = Helpers::getFieldValue('wpXSG-Frequency', 'default' );
37
+ $settings->inherit =Helpers::getFieldValue('wpXSG-Inherit', 0 );
38
+ $settings->news =Helpers::getFieldValue('wpXSG-News', 0 );
39
+ DataAccess::saveMetaItem($settings );
40
 
41
  }
42
 
46
  {
47
  self::addHooks();
48
 
49
+ $settings = new MetaSettings(1,1,1,0);
50
+ $globalSettings = Core::getGlobalSettings();
51
 
52
  wp_nonce_field( basename( __FILE__ ), 'wpXSG_meta_nonce' );
53
  ?>
108
  $term_id = $tag->term_id;
109
  self::addHooks();
110
 
111
+ $settings = DataAccess::getMetaItem($term_id , "taxonomy");
112
+ $globalSettings = Core::getGlobalSettings();
113
 
114
  wp_nonce_field( basename( __FILE__ ), 'wpXSG_meta_nonce' );
115
  ?>
116
 
117
 
118
  <h3>Sitemap settings : </h3>
119
+
120
+
121
+
122
 
123
  <table class="form-table">
124
  <tbody><tr class="form-field form-required term-name-wrap">
code/core.php CHANGED
@@ -16,7 +16,7 @@ include_once 'helpers.php';
16
 
17
 
18
 
19
- class core {
20
 
21
  public static function pluginFilename() {
22
  return plugin_basename(myPluginFile());
@@ -31,14 +31,14 @@ class core {
31
 
32
  public static function getGlobalSettings()
33
  {
34
- $globalSettings = get_option( "wpXSG_global" , new globalSettings() );
35
 
36
  // ensure when we read the global settings we have urls assigned
37
- $globalSettings->urlXmlSitemap = helpers::safeRead2($globalSettings,"urlXmlSitemap","xmlsitemap.xml");
38
- $globalSettings->urlNewsSitemap = helpers::safeRead2($globalSettings,"urlNewsSitemap","newssitemap.xml");
39
- $globalSettings->urlRssSitemap = helpers::safeRead2($globalSettings,"urlRssSitemap","rsssitemap.xml");
40
- $globalSettings->urlRssLatest = helpers::safeRead2($globalSettings,"urlRssLatest","rsslatest.xml");
41
- $globalSettings->urlHtmlSitemap = helpers::safeRead2($globalSettings,"urlHtmlSitemap","htmlsitemap.htm");
42
 
43
  return $globalSettings;
44
  }
@@ -47,7 +47,7 @@ class core {
47
  public static function doSiteActivation()
48
  {
49
  self::addDatabaseTable();
50
- upgrader::doUpgrade();
51
 
52
  if ( is_multisite() && ms_is_switched() ) {
53
  delete_option( 'rewrite_rules' );
@@ -69,7 +69,7 @@ class core {
69
 
70
  if ( is_multisite() && $network_wide ) {
71
 
72
- if ( false == is_super_admin() ) {
73
  return;
74
  }
75
 
@@ -103,10 +103,6 @@ class core {
103
  }
104
  }
105
 
106
- public static function deactivatePlugin() {
107
-
108
- }
109
-
110
  public static function adminScripts() {
111
  wp_enqueue_script( 'xsgScripts', xsgPluginPath() . 'assets/scripts.js' , false );
112
  }
@@ -138,9 +134,9 @@ class core {
138
  include_once 'authorMetaData.php';
139
 
140
  settings::addHooks();
141
- categoryMetaData::addHooks();
142
- postMetaData::addHooks();
143
- authorMetaData::addHooks();
144
 
145
  add_action('admin_notices', array(__CLASS__, 'showWarnings'));
146
  }
@@ -215,8 +211,8 @@ class core {
215
 
216
  if ($globalSettings->pingSitemap == true)
217
  {
218
- $sitemapDefaults = get_option( "wpXSG_sitemapDefaults" , new sitemapDefaults() );$sitemapDefaults = get_option( "wpXSG_sitemapDefaults" , new sitemapDefaults() );
219
- pinger::doAutoPings($sitemapDefaults->dateField);
220
  }
221
 
222
  }
@@ -226,12 +222,12 @@ class core {
226
  try
227
  {
228
 
229
- dataAccess::createMetaTable();
230
  update_option( "wpXSG_databaseUpgraded" , 1 , false);
231
  }
232
  catch (Exception $e)
233
  {
234
-
235
  }
236
  }
237
 
@@ -271,13 +267,12 @@ class core {
271
 
272
  public static function render($format, $provider, $type, $page)
273
  {
274
- $startTime = microtime(true) ;
275
 
276
- include_once 'renderers/coreRenderer.php';
277
- include_once 'providers/coreProvider.php';
278
 
279
- $providerInstance = sitemapProvider::getInstance($provider);
280
- $renderer = sitemapRenderer::getInstance($format);
281
 
282
  if ($providerInstance == null ||$renderer == null)
283
  {
@@ -294,7 +289,7 @@ class core {
294
  else
295
  {$renderer->renderPages($urls);}
296
 
297
- $time = core::getTimeBand($startTime);
298
 
299
  }
300
 
@@ -307,19 +302,20 @@ class core {
307
  $base = trailingslashit( get_bloginfo( 'url' ) );
308
  echo "\nSitemap: " . esc_url_raw($base . self::getGlobalProperty("urlXmlSitemap")) . "\n";
309
 
310
- echo "\nAllow: /" . esc_url_raw(self::getGlobalProperty("urlRssSitemap"));
311
- echo "\nAllow: /" . esc_url_raw(self::getGlobalProperty("urlRssLatest"));
312
- echo "\nAllow: /" . esc_url_raw(self::getGlobalProperty("urlHtmlSitemap"));
 
313
 
314
  }
315
  echo "\n\n";
316
- echo esc_html(helpers::safeRead($globalSettings,"robotEntries"));
317
 
318
  }
319
  public static function addRssLink()
320
  {
321
  $globalSettings = self::getGlobalSettings();
322
- if($globalSettings->addRssToHead == true)
323
  {
324
  $base = trailingslashit( get_bloginfo( 'url' ) );
325
  $url = $base . "rsslatest.xml";
@@ -331,8 +327,7 @@ class core {
331
  public static function getGlobalProperty($property)
332
  {
333
  $globalSettings = self::getGlobalSettings();
334
- $value = helpers::safeRead( $globalSettings, $property);
335
- return $value;
336
  }
337
 
338
 
@@ -341,7 +336,7 @@ class core {
341
  $plugin = self::pluginFilename();
342
  if ($file == $plugin)
343
  {
344
- $url = Helpers::getServerValue('REQUEST_URI' ,'');
345
  if (strpos( $url, "network") == false) {
346
  $new_links = array('<a href="options-general.php?page=' . XSG_PLUGIN_NAME . '">settings</a>');
347
  $links = array_merge( $links, $new_links );
@@ -413,24 +408,6 @@ class core {
413
  }
414
  return substr($response['body'],0,200);
415
  }
416
-
417
- public static function getTimeBand($startTime)
418
- {
419
- $time = round(microtime(true) - $startTime);
420
-
421
- if( $time = 0) {$timeBand = "0";}
422
- else if( $time <= 10) {$timeBand = "1 to 10";}
423
- else if( $time <= 30) {$timeBand = "11 to 30";}
424
- else if ($time <= 60) {$timeBand = "31 to 60";}
425
- else if ($time <= 180) {$timeBand = "61 to 180";}
426
- else if ($time <= 300) {$timeBand = "181 to 300";}
427
- else if ($time <= 600) {$timeBand = "301 to 600";}
428
- else if ($time <= 1200) {$timeBand = "601 to 1200";}
429
- else if ($time <= 1800) {$timeBand = "1201 to 1800";}
430
- else {$timeBand = "> 1801";}
431
-
432
- return $timeBand;
433
- }
434
 
435
  }
436
 
16
 
17
 
18
 
19
+ class Core {
20
 
21
  public static function pluginFilename() {
22
  return plugin_basename(myPluginFile());
31
 
32
  public static function getGlobalSettings()
33
  {
34
+ $globalSettings = get_option( "wpXSG_global" , new GlobalSettings() );
35
 
36
  // ensure when we read the global settings we have urls assigned
37
+ $globalSettings->urlXmlSitemap = Helpers::safeRead2($globalSettings,"urlXmlSitemap","xmlsitemap.xml");
38
+ $globalSettings->urlNewsSitemap = Helpers::safeRead2($globalSettings,"urlNewsSitemap","newssitemap.xml");
39
+ $globalSettings->urlRssSitemap = Helpers::safeRead2($globalSettings,"urlRssSitemap","rsssitemap.xml");
40
+ $globalSettings->urlRssLatest = Helpers::safeRead2($globalSettings,"urlRssLatest","rsslatest.xml");
41
+ $globalSettings->urlHtmlSitemap = Helpers::safeRead2($globalSettings,"urlHtmlSitemap","htmlsitemap.htm");
42
 
43
  return $globalSettings;
44
  }
47
  public static function doSiteActivation()
48
  {
49
  self::addDatabaseTable();
50
+ Upgrader::doUpgrade();
51
 
52
  if ( is_multisite() && ms_is_switched() ) {
53
  delete_option( 'rewrite_rules' );
69
 
70
  if ( is_multisite() && $network_wide ) {
71
 
72
+ if ( !is_super_admin() ) {
73
  return;
74
  }
75
 
103
  }
104
  }
105
 
 
 
 
 
106
  public static function adminScripts() {
107
  wp_enqueue_script( 'xsgScripts', xsgPluginPath() . 'assets/scripts.js' , false );
108
  }
134
  include_once 'authorMetaData.php';
135
 
136
  settings::addHooks();
137
+ CategoryMetaData::addHooks();
138
+ PostMetaData::addHooks();
139
+ AuthorMetaData::addHooks();
140
 
141
  add_action('admin_notices', array(__CLASS__, 'showWarnings'));
142
  }
211
 
212
  if ($globalSettings->pingSitemap == true)
213
  {
214
+ $sitemapDefaults = get_option( "wpXSG_sitemapDefaults" , new SitemapDefaults() );
215
+ Pinger::doAutoPings($sitemapDefaults->dateField);
216
  }
217
 
218
  }
222
  try
223
  {
224
 
225
+ DataAccess::createMetaTable();
226
  update_option( "wpXSG_databaseUpgraded" , 1 , false);
227
  }
228
  catch (Exception $e)
229
  {
230
+
231
  }
232
  }
233
 
267
 
268
  public static function render($format, $provider, $type, $page)
269
  {
 
270
 
271
+ include_once 'renderers/CoreRenderer.php';
272
+ include_once 'providers/CoreProvider.php';
273
 
274
+ $providerInstance = SitemapProvider::getInstance($provider);
275
+ $renderer = SitemapRenderer::getInstance($format);
276
 
277
  if ($providerInstance == null ||$renderer == null)
278
  {
289
  else
290
  {$renderer->renderPages($urls);}
291
 
292
+
293
 
294
  }
295
 
302
  $base = trailingslashit( get_bloginfo( 'url' ) );
303
  echo "\nSitemap: " . esc_url_raw($base . self::getGlobalProperty("urlXmlSitemap")) . "\n";
304
 
305
+ $allowString = "\nAllow: /";
306
+ echo $allowString . esc_url_raw(self::getGlobalProperty("urlRssSitemap"));
307
+ echo $allowString . esc_url_raw(self::getGlobalProperty("urlRssLatest"));
308
+ echo $allowString . esc_url_raw(self::getGlobalProperty("urlHtmlSitemap"));
309
 
310
  }
311
  echo "\n\n";
312
+ echo esc_html(Helpers::safeRead($globalSettings,"robotEntries"));
313
 
314
  }
315
  public static function addRssLink()
316
  {
317
  $globalSettings = self::getGlobalSettings();
318
+ if($globalSettings->addRssToHead)
319
  {
320
  $base = trailingslashit( get_bloginfo( 'url' ) );
321
  $url = $base . "rsslatest.xml";
327
  public static function getGlobalProperty($property)
328
  {
329
  $globalSettings = self::getGlobalSettings();
330
+ return Helpers::safeRead( $globalSettings, $property);
 
331
  }
332
 
333
 
336
  $plugin = self::pluginFilename();
337
  if ($file == $plugin)
338
  {
339
+ $url = Helpers::geServerValue('REQUEST_URI','');
340
  if (strpos( $url, "network") == false) {
341
  $new_links = array('<a href="options-general.php?page=' . XSG_PLUGIN_NAME . '">settings</a>');
342
  $links = array_merge( $links, $new_links );
408
  }
409
  return substr($response['body'],0,200);
410
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
 
412
  }
413
 
code/dataAccess.php CHANGED
@@ -6,21 +6,13 @@ namespace xmlSitemapGenerator;
6
 
7
 
8
 
9
- class dataAccess {
10
 
11
-
12
-
13
- function __construct()
14
- {
15
 
16
- }
17
-
18
  static function execute($cmd)
19
  {
20
  global $wpdb;
21
- $results = $wpdb->get_results($cmd, OBJECT );
22
-
23
- return $results;
24
  }
25
 
26
  static function getDateField($name)
@@ -68,11 +60,11 @@ class dataAccess {
68
 
69
  if ($settings)
70
  {
71
- $settings->news = helpers::safeRead2($settings, "news",0); // for older version that didnt have this property.
72
  }
73
  else
74
  {
75
- return new metaSettings();
76
 
77
  }
78
 
@@ -101,7 +93,7 @@ class dataAccess {
101
 
102
  $cmd = $wpdb->prepare($cmd, $itemId, $itemType, $exclude, $priority , $frequency,$inherit, $news);
103
 
104
- $settings = $wpdb->query($cmd);
105
 
106
  }
107
 
@@ -119,41 +111,9 @@ class dataAccess {
119
  FROM {$wpdb->posts} as posts
120
  WHERE post_status = 'publish'";
121
 
122
- $date = $wpdb->get_var($cmd);
123
-
124
- return $date;
125
- }
126
-
127
-
128
- public static function getPostCountBand()
129
- {
130
-
131
- global $wpdb;
132
-
133
-
134
- $cmd = "SELECT COUNT(*)
135
- FROM {$wpdb->posts} as posts
136
- WHERE post_status = 'publish'";
137
-
138
- $postCount = (int)$wpdb->get_var($cmd);
139
-
140
- if( $postCount = 0) {$postCountLabel = "0";}
141
- else if( $postCount <= 10) {$postCountLabel = "1 to 10";}
142
- else if( $postCount <= 25) {$postCountLabel = "11 to 25";}
143
- else if ($postCount <= 50) {$postCountLabel = "26 to 50";}
144
- else if ($postCount <= 100) {$postCountLabel = "51 to 100";}
145
- else if ($postCount <= 500) {$postCountLabel = "101 to 500";}
146
- else if ($postCount <= 500) {$postCountLabel = "501 to 1000";}
147
- else if($postCount < 10000) {$postCountLabel = round($postCount / 1000) * 1000;}
148
- else if($postCount < 100000) {$postCountLabel = round($postCount / 10000) * 10000;}
149
- else {$postCountLabel = round($postCount / 100000) * 100000;}
150
-
151
- return $postCountLabel;
152
-
153
- }
154
-
155
-
156
 
 
157
 
158
 
159
 
6
 
7
 
8
 
9
+ class DataAccess {
10
 
 
 
 
 
11
 
 
 
12
  static function execute($cmd)
13
  {
14
  global $wpdb;
15
+ return $wpdb->get_results($cmd, OBJECT );
 
 
16
  }
17
 
18
  static function getDateField($name)
60
 
61
  if ($settings)
62
  {
63
+ $settings->news = Helpers::safeRead2($settings, "news",0); // for older version that didnt have this property.
64
  }
65
  else
66
  {
67
+ return new MetaSettings();
68
 
69
  }
70
 
93
 
94
  $cmd = $wpdb->prepare($cmd, $itemId, $itemType, $exclude, $priority , $frequency,$inherit, $news);
95
 
96
+ $wpdb->query($cmd);
97
 
98
  }
99
 
111
  FROM {$wpdb->posts} as posts
112
  WHERE post_status = 'publish'";
113
 
114
+ return $wpdb->get_var($cmd);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
 
116
+ }
117
 
118
 
119
 
code/helpers.php CHANGED
@@ -2,44 +2,43 @@
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
- class helpers {
6
 
7
  // used for reading object properties with a default
8
  public static function safeRead2($object, $property, $default) {
9
- if (isset( $object->{$property} )) return esc_attr($object->{$property});
10
  return $default;
11
  }
12
 
13
-
 
 
 
 
14
  static function getRequestValue($field, $default) {
15
- if (isset( $_REQUEST[$field])) return sanitize_text_field( $_REQUEST[$field]);
16
  return $default;
17
  }
18
 
19
- static function getServerValue($field, $default) {
20
- if (isset( $_SERVER[$field])) return sanitize_text_field( $_SERVER[$field]);
21
  return $default;
22
  }
23
 
24
- // read object property without a default
25
- public static function safeRead($object,$property) {
26
- return self::safeRead2($object,$property, "");
27
- }
28
-
29
  // used for reading post variables
30
  static function getFieldValue($field, $default) {
31
- if (isset( $_POST[$field])) return sanitize_text_field( $_POST[$field]);
32
  return $default;
33
  }
34
 
35
  // used for reading post variables (text area)
36
  static function getTextAreaValue($field, $default){
37
- if (isset( $_POST[$field])) return sanitize_textarea_field($_POST[$field]);
38
  return $default;
39
  }
40
  // used for reading post variables (text area)
41
  static function getEmailValue($field, $default){
42
- if (isset( $_POST[$field])) return sanitize_email($_POST[$field]);
43
  return $default;
44
  }
45
 
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
+ class Helpers {
6
 
7
  // used for reading object properties with a default
8
  public static function safeRead2($object, $property, $default) {
9
+ if (isset( $object->{$property} )) {return esc_attr($object->{$property});}
10
  return $default;
11
  }
12
 
13
+ // read object property without a default
14
+ public static function safeRead($object,$property) {
15
+ return self::safeRead2($object,$property, "");
16
+ }
17
+
18
  static function getRequestValue($field, $default) {
19
+ if (isset( $_REQUEST[$field])) { return sanitize_text_field( $_REQUEST[$field]); }
20
  return $default;
21
  }
22
 
23
+ static function geServerValue($field, $default) {
24
+ if (isset( $_SERVER[$field])) {return sanitize_text_field( $_SERVER[$field]); }
25
  return $default;
26
  }
27
 
 
 
 
 
 
28
  // used for reading post variables
29
  static function getFieldValue($field, $default) {
30
+ if (isset( $_POST[$field])) {return sanitize_text_field( $_POST[$field]);}
31
  return $default;
32
  }
33
 
34
  // used for reading post variables (text area)
35
  static function getTextAreaValue($field, $default){
36
+ if (isset( $_POST[$field])) {return sanitize_textarea_field($_POST[$field]);}
37
  return $default;
38
  }
39
  // used for reading post variables (text area)
40
  static function getEmailValue($field, $default){
41
+ if (isset( $_POST[$field])) {return sanitize_email($_POST[$field]);}
42
  return $default;
43
  }
44
 
code/pinger.php CHANGED
@@ -4,34 +4,33 @@ namespace xmlSitemapGenerator;
4
 
5
  include_once 'dataAccess.php';
6
 
7
- class pinger
8
  {
9
 
10
  public static function doPing($tag = "manual")
11
  {
12
  $sitemapUrl = urlencode( get_bloginfo( 'url' ) . '/xmlsitemap.xml');
13
  $url = "http://www.google.com/webmasters/sitemaps/ping?sitemap=" . $sitemapUrl;
14
- $response = core::doRequest($url);
15
- core::statusUpdate("Google {$tag} ping - {$response}");
16
 
17
  $url = "http://www.bing.com/ping?sitemap=" . $sitemapUrl;
18
- $response = core::doRequest($url);
19
- core::statusUpdate("Bing {$tag} ping - {$response}");
20
 
21
  update_option('xmsg_LastPing', time());
22
  }
23
 
24
  public static function doManualPing()
25
  {
26
- $startTime = microtime(true) ;
27
  self::doPing("Manual");
28
- $time = core::getTimeBand($startTime);
29
 
30
  }
31
  public static function doAutoPings($date)
32
  {
33
- $startTime = microtime(true) ;
34
- $lasModified = dataAccess::getLastModified($date);
35
  $lastPing = get_option('xmsg_LastPing',0);
36
  // using UNIX times
37
  if ($lastPing < $lasModified )
@@ -41,10 +40,8 @@ class pinger
41
  }
42
  else
43
  {
44
- core::statusUpdate("Auto ping skipped. No modified posts");
45
  }
46
- $time = core::getTimeBand($startTime);
47
-
48
  }
49
 
50
 
4
 
5
  include_once 'dataAccess.php';
6
 
7
+ class Pinger
8
  {
9
 
10
  public static function doPing($tag = "manual")
11
  {
12
  $sitemapUrl = urlencode( get_bloginfo( 'url' ) . '/xmlsitemap.xml');
13
  $url = "http://www.google.com/webmasters/sitemaps/ping?sitemap=" . $sitemapUrl;
14
+ $response = Core::doRequest($url);
15
+ Core::statusUpdate("Google {$tag} ping - {$response}");
16
 
17
  $url = "http://www.bing.com/ping?sitemap=" . $sitemapUrl;
18
+ $response = Core::doRequest($url);
19
+ Core::statusUpdate("Bing {$tag} ping - {$response}");
20
 
21
  update_option('xmsg_LastPing', time());
22
  }
23
 
24
  public static function doManualPing()
25
  {
26
+
27
  self::doPing("Manual");
28
+
29
 
30
  }
31
  public static function doAutoPings($date)
32
  {
33
+ $lasModified = DataAccess::getLastModified($date);
 
34
  $lastPing = get_option('xmsg_LastPing',0);
35
  // using UNIX times
36
  if ($lastPing < $lasModified )
40
  }
41
  else
42
  {
43
+ Core::statusUpdate("Auto ping skipped. No modified posts");
44
  }
 
 
45
  }
46
 
47
 
code/postMetaData.php CHANGED
@@ -4,10 +4,11 @@ namespace xmlSitemapGenerator;
4
  include_once 'dataAccess.php';
5
  include_once 'helpers.php';
6
 
7
- class postMetaData
8
  {
9
 
10
 
 
11
  public static function addHooks() {
12
 
13
  add_action('save_post', array(__CLASS__, 'handlePostBack' ) , 10, 2 );
@@ -28,35 +29,32 @@ class postMetaData
28
  static function handlePostBack( $post_id , $post) {
29
 
30
  /* Verify the nonce before proceeding. */
31
- if ( !isset( $_POST['wpXSG_meta_nonce'] ) || !wp_verify_nonce( $_POST['wpXSG_meta_nonce'], basename( __FILE__ ) ) )
32
- return ;
33
 
34
 
35
  /* Get the post type object. */
36
  $post_type = get_post_type_object( $post->post_type );
37
  /* Check if the current user has permission to edit the post. */
38
- if ( !current_user_can( $post_type->cap->edit_post, $post_id ) )
39
- return $post_id;
40
 
41
- if ( $parent_id = wp_is_post_revision( $post_id ) )
42
- $post_id = $parent_id;
43
 
44
- $settings = new metaSettings();
45
  $settings->itemId = $post_id;
46
  $settings->itemType = "post";
47
- $settings->exclude = helpers::getFieldValue('wpXSG-Exclude', '0' );
48
- $settings->priority = helpers::getFieldValue('wpXSG-Priority', 'default' );
49
- $settings->frequency = helpers::getFieldValue('wpXSG-Frequency', 'default' );
50
  $settings->news = 0 ;
51
 
52
- dataAccess::saveMetaItem($settings);
53
 
54
  return $post_id;
55
 
56
  }
57
 
58
 
59
- static function render( $post, $metabox )
60
  {
61
 
62
 
4
  include_once 'dataAccess.php';
5
  include_once 'helpers.php';
6
 
7
+ class PostMetaData
8
  {
9
 
10
 
11
+
12
  public static function addHooks() {
13
 
14
  add_action('save_post', array(__CLASS__, 'handlePostBack' ) , 10, 2 );
29
  static function handlePostBack( $post_id , $post) {
30
 
31
  /* Verify the nonce before proceeding. */
32
+ if ( !isset( $_POST['wpXSG_meta_nonce'] ) || !wp_verify_nonce( $_POST['wpXSG_meta_nonce'], basename( __FILE__ ) ) ) {return ;}
 
33
 
34
 
35
  /* Get the post type object. */
36
  $post_type = get_post_type_object( $post->post_type );
37
  /* Check if the current user has permission to edit the post. */
38
+ if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) {return $post_id;}
 
39
 
40
+ if ( $parent_id = wp_is_post_revision( $post_id ) ) {$post_id = $parent_id;}
 
41
 
42
+ $settings = new MetaSettings();
43
  $settings->itemId = $post_id;
44
  $settings->itemType = "post";
45
+ $settings->exclude = Helpers::getFieldValue('wpXSG-Exclude', '0' );
46
+ $settings->priority = Helpers::getFieldValue('wpXSG-Priority', 'default' );
47
+ $settings->frequency = Helpers::getFieldValue('wpXSG-Frequency', 'default' );
48
  $settings->news = 0 ;
49
 
50
+ DataAccess::saveMetaItem($settings);
51
 
52
  return $post_id;
53
 
54
  }
55
 
56
 
57
+ static function render( $post )
58
  {
59
 
60
 
code/providers/{archiveProvider.php → ArchiveProvider.php} RENAMED
@@ -2,29 +2,47 @@
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
- class archiveProvider extends providerCore implements iSitemapProvider
6
  {
7
 
8
- public $maxPageSize = -1;
9
 
10
  public function getSuppportedTypes()
11
  {
12
- $types = array( "recentarchive" , "oldarchive");
13
-
14
- return $types;
15
  }
16
 
17
  public function getPageCount($type)
18
  {
19
  if ($this->exclude($type)) {return 0;}
20
- return 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  }
23
 
24
  public function getPage($type,$page)
25
  {
26
 
27
- if ($this->exclude($type)) {return;}
28
 
29
  if ($type == 'recentarchive') {
30
  $clause = " >= now() - interval 30 DAY";
@@ -62,7 +80,6 @@ namespace xmlSitemapGenerator;
62
 
63
  foreach( $results as $result ) {
64
 
65
- $now = getdate();
66
 
67
  if($result->month == date("n") && $result->year == date("Y"))
68
  {
@@ -74,18 +91,14 @@ namespace xmlSitemapGenerator;
74
  }
75
 
76
  $exclude = $defaults->exclude ;
77
- $posts = $result->posts;
78
-
79
  $pageUrl = get_month_link( $result->year , $result->month) ;
80
 
81
 
82
- if ($exclude != 2)
83
  {
84
-
85
- if ($this->isIncluded($pageUrl,$this->sitemapDefaults->excludeRules ))
86
- {
87
-
88
- $url = new mapItem();
89
  $url->location = $pageUrl;
90
  $url->title = date('F', strtotime("2012-$result->month-01")) . " | " . $result->year ;
91
  $url->description = "";
@@ -94,8 +107,7 @@ namespace xmlSitemapGenerator;
94
  $url->frequency = $defaults->frequency ;
95
 
96
  $this->addUrls($result->posts, $url);
97
-
98
- }
99
  }
100
 
101
  }
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
+ class ArchiveProvider extends ProviderCore implements ISitemapProvider
6
  {
7
 
8
+ public $maxPageSize = 10000;
9
 
10
  public function getSuppportedTypes()
11
  {
12
+ return array( "recentarchive" , "oldarchive");
 
 
13
  }
14
 
15
  public function getPageCount($type)
16
  {
17
  if ($this->exclude($type)) {return 0;}
18
+
19
+ global $wpdb;
20
+
21
+ if ($type == 'recentarchive') {
22
+ $clause = " >= now() - interval 30 DAY";
23
+ }
24
+ else {
25
+ $clause = " < now() - interval 30 DAY";
26
+ }
27
+
28
+ $sql = "SELECT Count(*)
29
+ FROM {$wpdb->posts} as posts
30
+ WHERE post_status = 'publish' AND post_type = 'post' AND posts.post_password = '' AND post_date {$clause}
31
+
32
+ GROUP BY YEAR(post_date), MONTH(post_date)
33
+ ORDER BY YEAR(post_date) ,MONTH(post_date)";
34
+
35
+ $cmd = $wpdb->prepare($sql, $type ) ;
36
+
37
+ if ($wpdb->get_var($cmd) > 0 ) return 1;
38
+ return 0;
39
 
40
  }
41
 
42
  public function getPage($type,$page)
43
  {
44
 
45
+ if ($this->exclude($type)) {return [];}
46
 
47
  if ($type == 'recentarchive') {
48
  $clause = " >= now() - interval 30 DAY";
80
 
81
  foreach( $results as $result ) {
82
 
 
83
 
84
  if($result->month == date("n") && $result->year == date("Y"))
85
  {
91
  }
92
 
93
  $exclude = $defaults->exclude ;
94
+
 
95
  $pageUrl = get_month_link( $result->year , $result->month) ;
96
 
97
 
98
+ if ($exclude != 2 && $this->isIncluded($pageUrl,$this->sitemapDefaults->excludeRules))
99
  {
100
+
101
+ $url = new MapItem();
 
 
 
102
  $url->location = $pageUrl;
103
  $url->title = date('F', strtotime("2012-$result->month-01")) . " | " . $result->year ;
104
  $url->description = "";
107
  $url->frequency = $defaults->frequency ;
108
 
109
  $this->addUrls($result->posts, $url);
110
+
 
111
  }
112
 
113
  }
code/providers/{authorsProvider.php → AuthorsProvider.php} RENAMED
@@ -2,16 +2,14 @@
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
- class authorsProvider extends providerCore implements iSitemapProvider
6
  {
7
 
8
  public $maxPageSize = -1;
9
 
10
  public function getSuppportedTypes()
11
  {
12
- $types = array( "authors");
13
-
14
- return $types;
15
  }
16
 
17
 
@@ -25,7 +23,7 @@ namespace xmlSitemapGenerator;
25
  public function getPage($type,$page)
26
  {
27
 
28
- if ($this->exclude()) {return ;}
29
 
30
  global $wpdb;
31
 
@@ -55,8 +53,6 @@ namespace xmlSitemapGenerator;
55
  {
56
  foreach( $results as $result ) {
57
 
58
- // wp_cache_add($result ->ID, $result , 'posts');
59
-
60
  $defaults = $this->sitemapDefaults->authors;
61
 
62
  $exclude = $this->getMetaValue(null, $result->exclude, $defaults->exclude) ;
@@ -68,7 +64,7 @@ namespace xmlSitemapGenerator;
68
  if ($this->isIncluded($pageUrl,$this->sitemapDefaults->excludeRules ))
69
  {
70
 
71
- $url = new mapItem();
72
  $url->location = $pageUrl;
73
  $url->title = $result->display_name ;
74
  $url->description = "";
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
+ class AuthorsProvider extends ProviderCore implements ISitemapProvider
6
  {
7
 
8
  public $maxPageSize = -1;
9
 
10
  public function getSuppportedTypes()
11
  {
12
+ return array( "authors");
 
 
13
  }
14
 
15
 
23
  public function getPage($type,$page)
24
  {
25
 
26
+ if ($this->exclude()) {return [];}
27
 
28
  global $wpdb;
29
 
53
  {
54
  foreach( $results as $result ) {
55
 
 
 
56
  $defaults = $this->sitemapDefaults->authors;
57
 
58
  $exclude = $this->getMetaValue(null, $result->exclude, $defaults->exclude) ;
64
  if ($this->isIncluded($pageUrl,$this->sitemapDefaults->excludeRules ))
65
  {
66
 
67
+ $url = new MapItem();
68
  $url->location = $pageUrl;
69
  $url->title = $result->display_name ;
70
  $url->description = "";
code/providers/{coreProvider.php → CoreProvider.php} RENAMED
@@ -2,9 +2,8 @@
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
- class mapItem
6
  {
7
- function __construct() {}
8
  public $location ;
9
  public $title ;
10
  public $description ;
@@ -14,9 +13,8 @@ namespace xmlSitemapGenerator;
14
  public $images = null;
15
  }
16
 
17
- class mediaItem
18
  {
19
- function __construct() {}
20
  public $location ;
21
  public $title ;
22
  public $caption ;
@@ -24,16 +22,15 @@ namespace xmlSitemapGenerator;
24
 
25
  }
26
 
27
- interface iSitemapProvider
28
  {
29
-
30
  public function getSuppportedTypes(); // returns a list of the types supported by this provider
31
  public function setFormat($format); // sets the base file url for the sitemap
32
  public function getPageCount($type); // returns the number of sitemap pages for this type.
33
  public function getPage($type, $page); //
34
  }
35
 
36
- class sitemapProvider
37
  {
38
 
39
  static function getProviderList()
@@ -55,7 +52,7 @@ namespace xmlSitemapGenerator;
55
  static function getInstance($type)
56
  {
57
  self::validate($type);
58
-
59
  $file = $type . 'Provider.php';
60
  if (@include_once($file))
61
  {
@@ -70,7 +67,7 @@ namespace xmlSitemapGenerator;
70
  }
71
  }
72
 
73
- class providerCore
74
  {
75
 
76
 
@@ -92,8 +89,8 @@ namespace xmlSitemapGenerator;
92
  $this->siteName = get_option('blogname');
93
  $this->blogUrl = get_bloginfo( 'url' );
94
  $this->tablemeta = $wpdb->prefix . 'xsg_sitemap_meta';
95
- $this->sitemapDefaults = get_option( "wpXSG_sitemapDefaults" , new sitemapDefaults() );
96
- $this->globalSettings = core::getGlobalSettings();
97
 
98
  }
99
 
@@ -114,7 +111,7 @@ namespace xmlSitemapGenerator;
114
  {
115
  if ( !empty($result->imageUrl) )
116
  {
117
- $new = new mediaItem();
118
  $new->title = $result->imageTitle;
119
  $new->caption = $result->imageCaption;
120
  $new->location = $result->imageUrl;
@@ -135,7 +132,7 @@ namespace xmlSitemapGenerator;
135
  //remove any resizing. -1024x682.
136
 
137
 
138
- $new = new mediaItem();
139
  $new->title = $this->getAttribute("title",$match);
140
  $new->caption = $this->getAttribute("alt",$match);
141
  $new->location = $url;
@@ -190,27 +187,15 @@ namespace xmlSitemapGenerator;
190
  }
191
  function isExcluded($value)
192
  {
193
- if (isset($value))
194
- {
195
- if ($value==2) {return true;}
196
- }
197
  return false;
198
  }
199
 
200
  function getMetaValue($postValue,$tagValue,$default)
201
  {
202
 
203
- if (isset($postValue))
204
- {
205
-
206
- if ( $postValue != 1) { return $postValue; }
207
- }
208
-
209
- if (isset($tagValue))
210
- {
211
- if ( $tagValue != 1) {return $tagValue; }
212
- }
213
-
214
  return $default;
215
 
216
  }
@@ -223,9 +208,7 @@ namespace xmlSitemapGenerator;
223
  {
224
  $pages = ceil($postCount / $this->blogPageSize);
225
  }
226
-
227
-
228
- $mapItem->title = $mapItem->title;
229
  array_push($this->urlsList, $mapItem); // first page
230
  for ($x = 2; $x <= $pages; $x++)
231
  {
@@ -238,15 +221,13 @@ namespace xmlSitemapGenerator;
238
  }
239
 
240
 
241
- function getPageLink($url, $pagenum = 1 ) {
242
  global $wp_rewrite;
243
 
244
  $pagenum = (int) $pagenum;
245
 
246
  $home_root = preg_quote( home_url(), '|' );
247
- $request = $url;
248
 
249
-
250
  $request = preg_replace('|^'. $home_root . '|i', '', $request);
251
  $request = preg_replace('|^/+|', '', $request);
252
 
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
+ class MapItem
6
  {
 
7
  public $location ;
8
  public $title ;
9
  public $description ;
13
  public $images = null;
14
  }
15
 
16
+ class MediaItem
17
  {
 
18
  public $location ;
19
  public $title ;
20
  public $caption ;
22
 
23
  }
24
 
25
+ interface ISitemapProvider
26
  {
 
27
  public function getSuppportedTypes(); // returns a list of the types supported by this provider
28
  public function setFormat($format); // sets the base file url for the sitemap
29
  public function getPageCount($type); // returns the number of sitemap pages for this type.
30
  public function getPage($type, $page); //
31
  }
32
 
33
+ class SitemapProvider
34
  {
35
 
36
  static function getProviderList()
52
  static function getInstance($type)
53
  {
54
  self::validate($type);
55
+ $type = ucwords($type);
56
  $file = $type . 'Provider.php';
57
  if (@include_once($file))
58
  {
67
  }
68
  }
69
 
70
+ class ProviderCore
71
  {
72
 
73
 
89
  $this->siteName = get_option('blogname');
90
  $this->blogUrl = get_bloginfo( 'url' );
91
  $this->tablemeta = $wpdb->prefix . 'xsg_sitemap_meta';
92
+ $this->sitemapDefaults = get_option( "wpXSG_sitemapDefaults" , new SitemapDefaults() );
93
+ $this->globalSettings = Core::getGlobalSettings();
94
 
95
  }
96
 
111
  {
112
  if ( !empty($result->imageUrl) )
113
  {
114
+ $new = new MediaItem();
115
  $new->title = $result->imageTitle;
116
  $new->caption = $result->imageCaption;
117
  $new->location = $result->imageUrl;
132
  //remove any resizing. -1024x682.
133
 
134
 
135
+ $new = new MediaItem();
136
  $new->title = $this->getAttribute("title",$match);
137
  $new->caption = $this->getAttribute("alt",$match);
138
  $new->location = $url;
187
  }
188
  function isExcluded($value)
189
  {
190
+ if (isset($value) && $value==2) {return true;}
 
 
 
191
  return false;
192
  }
193
 
194
  function getMetaValue($postValue,$tagValue,$default)
195
  {
196
 
197
+ if (isset($postValue) && $postValue != 1) { return $postValue; }
198
+ if (isset($tagValue) && $tagValue != 1) {return $tagValue; }
 
 
 
 
 
 
 
 
 
199
  return $default;
200
 
201
  }
208
  {
209
  $pages = ceil($postCount / $this->blogPageSize);
210
  }
211
+
 
 
212
  array_push($this->urlsList, $mapItem); // first page
213
  for ($x = 2; $x <= $pages; $x++)
214
  {
221
  }
222
 
223
 
224
+ function getPageLink($request, $pagenum = 1 ) {
225
  global $wp_rewrite;
226
 
227
  $pagenum = (int) $pagenum;
228
 
229
  $home_root = preg_quote( home_url(), '|' );
 
230
 
 
231
  $request = preg_replace('|^'. $home_root . '|i', '', $request);
232
  $request = preg_replace('|^/+|', '', $request);
233
 
code/providers/{indexProvider.php → IndexProvider.php} RENAMED
@@ -2,7 +2,7 @@
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
- class indexProvider extends providerCore implements iSitemapProvider
6
  {
7
 
8
  public $maxPageSize = -1;
@@ -24,53 +24,41 @@ namespace xmlSitemapGenerator;
24
 
25
  private function addRssLatest()
26
  {
27
- $providers = sitemapProvider::getProviderList();
28
- $globalSettings = core::getGlobalSettings();
29
- $url = new mapItem();
30
  $url->location = $this->blogUrl . "/" . $globalSettings->urlRssLatest;
31
  $url->title = "Latest posts sitemap.";
32
  $this->addUrls(0, $url);
33
  }
34
  private function addNews()
35
  {
36
- $providers = sitemapProvider::getProviderList();
37
- $globalSettings = core::getGlobalSettings();
38
  if (strlen($globalSettings->urlNewsSitemap) > 0) {
39
- $url = new mapItem();
40
  $url->location = $this->blogUrl . "/" . $globalSettings->urlNewsSitemap;
41
  $url->title = "News sitemap.";
42
  $this->addUrls(0, $url);
43
  }
44
-
45
  }
46
 
47
  public function getPage($type, $page)
48
  {
49
 
50
- $providers = sitemapProvider::getProviderList();
51
- $globalSettings = core::getGlobalSettings();
52
 
53
- if ($this->format == "xml")
54
- {
55
- if ($globalSettings->newsMode > 0 )
56
- {
57
- $this->addNews();
58
- }
59
- }
60
- elseif ($this->format == "rss")
61
- {
62
- $this->addRssLatest();
63
- }
64
 
65
-
66
-
67
  foreach($providers as $providerName)
68
  {
69
 
70
  if ($providerName == "news" || $providerName == "index") {continue;}
71
  if ($this->format == "xml" && $providerName == "latest" ) {continue ;}
72
 
73
- $provider = sitemapProvider::getInstance($providerName);
74
  $types = $provider->getSuppportedTypes();
75
 
76
  foreach($types as $typeName)
@@ -89,7 +77,6 @@ namespace xmlSitemapGenerator;
89
 
90
  private function doPopulate($provider, $type, $pages)
91
  {
92
- $urls = array();
93
  $blogUrl = get_bloginfo( 'url' );
94
 
95
  $providerT = ucfirst($provider);
@@ -99,11 +86,9 @@ namespace xmlSitemapGenerator;
99
  {
100
  $pageUrl = $blogUrl . "/sitemap-files/{$this->format}/{$provider}/{$type}/{$i}/" ;
101
 
102
- $url = new mapItem();
103
  $url->location = $pageUrl;
104
 
105
-
106
-
107
  if ($provider == $type)
108
  {$url->title = "{$providerT} sitemap. Page {$i}.";}
109
  else
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
+ class IndexProvider extends ProviderCore implements ISitemapProvider
6
  {
7
 
8
  public $maxPageSize = -1;
24
 
25
  private function addRssLatest()
26
  {
27
+ $globalSettings = Core::getGlobalSettings();
28
+ $url = new MapItem();
 
29
  $url->location = $this->blogUrl . "/" . $globalSettings->urlRssLatest;
30
  $url->title = "Latest posts sitemap.";
31
  $this->addUrls(0, $url);
32
  }
33
  private function addNews()
34
  {
35
+ $globalSettings = Core::getGlobalSettings();
 
36
  if (strlen($globalSettings->urlNewsSitemap) > 0) {
37
+ $url = new MapItem();
38
  $url->location = $this->blogUrl . "/" . $globalSettings->urlNewsSitemap;
39
  $url->title = "News sitemap.";
40
  $this->addUrls(0, $url);
41
  }
 
42
  }
43
 
44
  public function getPage($type, $page)
45
  {
46
 
47
+ $providers = SitemapProvider::getProviderList();
48
+ $globalSettings = Core::getGlobalSettings();
49
 
50
+ // for XML sitemaps with news enabled add the news feed
51
+ // or if RSS add the RSS latest feed
52
+ if ($this->format == "xml" && $globalSettings->newsMode > 0 ) {$this->addNews(); }
53
+ elseif ($this->format == "rss") {$this->addRssLatest();}
 
 
 
 
 
 
 
54
 
 
 
55
  foreach($providers as $providerName)
56
  {
57
 
58
  if ($providerName == "news" || $providerName == "index") {continue;}
59
  if ($this->format == "xml" && $providerName == "latest" ) {continue ;}
60
 
61
+ $provider = SitemapProvider::getInstance($providerName);
62
  $types = $provider->getSuppportedTypes();
63
 
64
  foreach($types as $typeName)
77
 
78
  private function doPopulate($provider, $type, $pages)
79
  {
 
80
  $blogUrl = get_bloginfo( 'url' );
81
 
82
  $providerT = ucfirst($provider);
86
  {
87
  $pageUrl = $blogUrl . "/sitemap-files/{$this->format}/{$provider}/{$type}/{$i}/" ;
88
 
89
+ $url = new MapItem();
90
  $url->location = $pageUrl;
91
 
 
 
92
  if ($provider == $type)
93
  {$url->title = "{$providerT} sitemap. Page {$i}.";}
94
  else
code/providers/{latestProvider.php → LatestProvider.php} RENAMED
@@ -2,7 +2,7 @@
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
- class latestProvider extends providerCore implements iSitemapProvider
6
  {
7
 
8
 
@@ -10,13 +10,12 @@ namespace xmlSitemapGenerator;
10
 
11
  public function getSuppportedTypes()
12
  {
13
- $types = array( "archive");
14
-
15
- return $types;
16
  }
17
 
18
  public function getPageCount($type)
19
  {
 
20
  return 1;
21
 
22
  }
@@ -29,7 +28,8 @@ namespace xmlSitemapGenerator;
29
  $postTypes = self::getPostTypes();
30
  $frontPageId = get_option( 'page_on_front' );
31
 
32
- $pageSize = 50;
 
33
  $offset = 0;
34
 
35
  $cmd = "SELECT posts.*, UNIX_TIMESTAMP({$date}) as sitemapDate
@@ -38,7 +38,7 @@ namespace xmlSitemapGenerator;
38
  WHERE (post_status = 'publish' ) AND ( post_type = 'post' {$postTypes})
39
  AND posts.post_password = '' AND posts.ID <> {$frontPageId}
40
  ORDER BY {$date} DESC
41
- LIMIT {$offset}, {$pageSize} ";
42
 
43
 
44
  $results = $wpdb->get_results($cmd);
@@ -78,27 +78,20 @@ namespace xmlSitemapGenerator;
78
  {
79
  foreach( $results as $result ) {
80
 
81
-
82
- // wp_cache_add($result ->ID, $result , 'posts');
83
  $defaults = self::postTypeDefault($this->sitemapDefaults,$result->post_type );
84
-
85
- // $exclude = $this->getMetaValue($result->exclude, $result->tagExclude, $defaults->exclude) ;
86
-
87
- // if ($exclude == 2) {$temp = $temp . " - excluded"; continue;}
88
  if ( $result->post_status =='future' && $defaults->scheduled == 0) { continue;}
89
 
90
  $pageUrl = get_permalink($result);
91
 
92
  if (!($this->isIncluded($pageUrl,$this->sitemapDefaults->excludeRules ))) {continue;}
93
 
94
- $url = new mapItem();
95
  $url->location = $pageUrl ;
96
- $url->title = get_the_title( $result ); //$result->post_title;
97
  $url->description = $result->post_excerpt;
98
  $url->modified = $result->sitemapDate ;
99
- // $url->priority = $this->getMetaValue($result->priority,$result->tagPriority, $defaults->priority) ;
100
- // $url->frequency = $this->getMetaValue($result->frequency,$result->tagFrequency,$defaults->frequency) ;
101
-
102
  $this->addUrls(0, $url);
103
 
104
  }
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
+ class LatestProvider extends ProviderCore implements ISitemapProvider
6
  {
7
 
8
 
10
 
11
  public function getSuppportedTypes()
12
  {
13
+ return array( "archive");
 
 
14
  }
15
 
16
  public function getPageCount($type)
17
  {
18
+
19
  return 1;
20
 
21
  }
28
  $postTypes = self::getPostTypes();
29
  $frontPageId = get_option( 'page_on_front' );
30
 
31
+ // for latest we havea fixed page only.
32
+ $thisPageSize = 50;
33
  $offset = 0;
34
 
35
  $cmd = "SELECT posts.*, UNIX_TIMESTAMP({$date}) as sitemapDate
38
  WHERE (post_status = 'publish' ) AND ( post_type = 'post' {$postTypes})
39
  AND posts.post_password = '' AND posts.ID <> {$frontPageId}
40
  ORDER BY {$date} DESC
41
+ LIMIT {$offset}, {$thisPageSize} ";
42
 
43
 
44
  $results = $wpdb->get_results($cmd);
78
  {
79
  foreach( $results as $result ) {
80
 
 
 
81
  $defaults = self::postTypeDefault($this->sitemapDefaults,$result->post_type );
82
+
 
 
 
83
  if ( $result->post_status =='future' && $defaults->scheduled == 0) { continue;}
84
 
85
  $pageUrl = get_permalink($result);
86
 
87
  if (!($this->isIncluded($pageUrl,$this->sitemapDefaults->excludeRules ))) {continue;}
88
 
89
+ $url = new MapItem();
90
  $url->location = $pageUrl ;
91
+ $url->title = get_the_title( $result );
92
  $url->description = $result->post_excerpt;
93
  $url->modified = $result->sitemapDate ;
94
+
 
 
95
  $this->addUrls(0, $url);
96
 
97
  }
code/providers/{newsProvider.php → NewsProvider.php} RENAMED
@@ -2,7 +2,7 @@
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
- class newsProvider extends providerCore implements iSitemapProvider
6
  {
7
 
8
 
@@ -10,14 +10,12 @@ namespace xmlSitemapGenerator;
10
 
11
  public function getSuppportedTypes()
12
  {
13
- $types = array( "news");
14
-
15
- return $types;
16
  }
17
 
18
  public function getPageCount($type)
19
  {
20
- $globalSettings = core::getGlobalSettings();
21
  if ($globalSettings->newsMode == '0')
22
  {
23
  return 0;
@@ -32,8 +30,8 @@ namespace xmlSitemapGenerator;
32
  {
33
  global $wpdb;
34
 
35
- $globalSettings = core::getGlobalSettings();
36
- if ($globalSettings->newsMode == '0') {return;}
37
 
38
 
39
  $cmdSelect = "SELECT posts.*, UNIX_TIMESTAMP(posts.post_date) as sitemapDate ";
@@ -77,7 +75,6 @@ namespace xmlSitemapGenerator;
77
  $cmd .= " ORDER BY posts.post_date DESC
78
  LIMIT 1000 ";
79
 
80
- // $cmd = $wpdb->prepare($cmd) ;
81
 
82
  $results = $wpdb->get_results($cmd);
83
  if ($results )
@@ -95,7 +92,7 @@ namespace xmlSitemapGenerator;
95
 
96
  $pageUrl = get_permalink($result);
97
 
98
- $url = new mapItem();
99
  $url->location = $pageUrl ;
100
  $url->title = $result->post_title;
101
  $url->description = $result->post_excerpt;
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
+ class NewsProvider extends ProviderCore implements ISitemapProvider
6
  {
7
 
8
 
10
 
11
  public function getSuppportedTypes()
12
  {
13
+ return array( "news");
 
 
14
  }
15
 
16
  public function getPageCount($type)
17
  {
18
+ $globalSettings = Core::getGlobalSettings();
19
  if ($globalSettings->newsMode == '0')
20
  {
21
  return 0;
30
  {
31
  global $wpdb;
32
 
33
+ $globalSettings = Core::getGlobalSettings();
34
+ if ($globalSettings->newsMode == '0') {return [];}
35
 
36
 
37
  $cmdSelect = "SELECT posts.*, UNIX_TIMESTAMP(posts.post_date) as sitemapDate ";
75
  $cmd .= " ORDER BY posts.post_date DESC
76
  LIMIT 1000 ";
77
 
 
78
 
79
  $results = $wpdb->get_results($cmd);
80
  if ($results )
92
 
93
  $pageUrl = get_permalink($result);
94
 
95
+ $url = new MapItem();
96
  $url->location = $pageUrl ;
97
  $url->title = $result->post_title;
98
  $url->description = $result->post_excerpt;
code/providers/{postsProvider.php → PostsProvider.php} RENAMED
@@ -2,11 +2,9 @@
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
- class postsProvider extends providerCore implements iSitemapProvider
6
  {
7
- function __construct() {
8
- parent::__construct();
9
- }
10
 
11
  public $maxPageSize = 2500;
12
 
@@ -45,7 +43,7 @@ namespace xmlSitemapGenerator;
45
  public function getPage($type, $page)
46
  {
47
 
48
- if ($this->exclude($type)) {return;}
49
 
50
  global $wpdb;
51
 
@@ -125,11 +123,11 @@ namespace xmlSitemapGenerator;
125
  if ($this->isIncluded($pageUrl,$this->sitemapDefaults->excludeRules ))
126
  {
127
 
128
- $url = new mapItem();
129
  $url->location = $pageUrl;
130
  $url->title = "Home page" ;
131
  $url->description = get_option( 'blogdescription');;
132
- $url->modified = dataAccess::getLastModified() ;
133
  $url->priority = $defaults->priority ;
134
  $url->frequency = $defaults->frequency ;
135
 
@@ -146,19 +144,18 @@ namespace xmlSitemapGenerator;
146
  {
147
  foreach( $results as $result ) {
148
 
149
- // wp_cache_add($result ->ID, $result , 'posts');
150
  $defaults = $this->postTypeDefault( $result->post_type );
151
  $exclude = $this->getMetaValue($result->exclude, $result->tagExclude, $defaults->exclude) ;
152
 
153
  if ($exclude == 2) { continue;}
154
  if ( $result->post_status =='future' && $defaults->scheduled == 0) { continue;}
155
- // if (!($this->isIncluded($pageUrl,$this->sitemapDefaults->excludeRules ))) {continue;}
156
-
157
  $pageUrl = get_permalink($result);
158
 
159
- $url = new mapItem();
160
  $url->location = $pageUrl ;
161
- $url->title = get_the_title( $result ); //$result->post_title;
162
  $url->description = $result->post_excerpt;
163
  $url->modified = $result->sitemapDate ;
164
  $url->priority = $this->getMetaValue($result->priority,$result->tagPriority, $defaults->priority) ;
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
+ class PostsProvider extends ProviderCore implements ISitemapProvider
6
  {
7
+
 
 
8
 
9
  public $maxPageSize = 2500;
10
 
43
  public function getPage($type, $page)
44
  {
45
 
46
+ if ($this->exclude($type)) {return [];}
47
 
48
  global $wpdb;
49
 
123
  if ($this->isIncluded($pageUrl,$this->sitemapDefaults->excludeRules ))
124
  {
125
 
126
+ $url = new MapItem();
127
  $url->location = $pageUrl;
128
  $url->title = "Home page" ;
129
  $url->description = get_option( 'blogdescription');;
130
+ $url->modified = DataAccess::getLastModified() ;
131
  $url->priority = $defaults->priority ;
132
  $url->frequency = $defaults->frequency ;
133
 
144
  {
145
  foreach( $results as $result ) {
146
 
147
+
148
  $defaults = $this->postTypeDefault( $result->post_type );
149
  $exclude = $this->getMetaValue($result->exclude, $result->tagExclude, $defaults->exclude) ;
150
 
151
  if ($exclude == 2) { continue;}
152
  if ( $result->post_status =='future' && $defaults->scheduled == 0) { continue;}
153
+
 
154
  $pageUrl = get_permalink($result);
155
 
156
+ $url = new MapItem();
157
  $url->location = $pageUrl ;
158
+ $url->title = get_the_title( $result );
159
  $url->description = $result->post_excerpt;
160
  $url->modified = $result->sitemapDate ;
161
  $url->priority = $this->getMetaValue($result->priority,$result->tagPriority, $defaults->priority) ;
code/providers/{termsProvider.php → TermsProvider.php} RENAMED
@@ -2,7 +2,7 @@
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
- class termsProvider extends providerCore implements iSitemapProvider
6
  {
7
 
8
 
@@ -10,9 +10,7 @@ namespace xmlSitemapGenerator;
10
 
11
  public function getSuppportedTypes()
12
  {
13
- $types = get_taxonomies(array( "public" => "1", "show_ui" =>"1" ), 'names' ,'and');
14
-
15
- return $types;
16
  }
17
 
18
  public function getPageCount($type)
@@ -35,7 +33,7 @@ namespace xmlSitemapGenerator;
35
  public function getPage($type, $page)
36
  {
37
 
38
- if ($this->exclude($type)) {return;}
39
 
40
  global $wpdb;
41
 
@@ -91,7 +89,7 @@ namespace xmlSitemapGenerator;
91
  if ($this->isIncluded($pageUrl,$this->sitemapDefaults->excludeRules ))
92
  {
93
 
94
- $url = new mapItem();
95
  $url->location = $pageUrl;
96
  $url->title = $result->name;
97
  $url->description = $result->description;
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
+ class TermsProvider extends ProviderCore implements ISitemapProvider
6
  {
7
 
8
 
10
 
11
  public function getSuppportedTypes()
12
  {
13
+ return get_taxonomies(array( "public" => "1", "show_ui" =>"1" ), 'names' ,'and');
 
 
14
  }
15
 
16
  public function getPageCount($type)
33
  public function getPage($type, $page)
34
  {
35
 
36
+ if ($this->exclude($type)) {return [];}
37
 
38
  global $wpdb;
39
 
89
  if ($this->isIncluded($pageUrl,$this->sitemapDefaults->excludeRules ))
90
  {
91
 
92
+ $url = new MapItem();
93
  $url->location = $pageUrl;
94
  $url->title = $result->name;
95
  $url->description = $result->description;
code/renderers/{coreRenderer.php → CoreRenderer.php} RENAMED
@@ -2,7 +2,7 @@
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
- interface iSitemapRenderer
6
  {
7
  public function renderIndex($page);
8
  public function renderPages($urls);
@@ -10,7 +10,7 @@ namespace xmlSitemapGenerator;
10
 
11
 
12
 
13
- class sitemapRenderer
14
  {
15
 
16
  // returns a list of the core provider types
@@ -31,7 +31,7 @@ namespace xmlSitemapGenerator;
31
  static function getInstance($type)
32
  {
33
  self::validate($type);
34
-
35
  $file = $type . 'Renderer.php';
36
  if (@include_once($file))
37
  {
@@ -47,12 +47,28 @@ namespace xmlSitemapGenerator;
47
 
48
  }
49
 
50
- class rendererCore
51
  {
 
 
 
 
 
 
 
 
52
  public static function renderComment()
53
  {
54
  echo "<!-- Created using XmlSitemapGenerator.org WordPress Plugin - Free HTML, RSS and XML sitemap generator -->";
55
  }
 
 
 
 
 
 
 
 
56
 
57
  }
58
 
2
 
3
  namespace xmlSitemapGenerator;
4
 
5
+ interface ISitemapRenderer
6
  {
7
  public function renderIndex($page);
8
  public function renderPages($urls);
10
 
11
 
12
 
13
+ class SitemapRenderer
14
  {
15
 
16
  // returns a list of the core provider types
31
  static function getInstance($type)
32
  {
33
  self::validate($type);
34
+ $type = ucwords($type);
35
  $file = $type . 'Renderer.php';
36
  if (@include_once($file))
37
  {
47
 
48
  }
49
 
50
+ class RendererCore
51
  {
52
+
53
+ public $timeZone;
54
+
55
+ function __construct()
56
+ {
57
+ $this->timeZone = wp_timezone();
58
+ }
59
+
60
  public static function renderComment()
61
  {
62
  echo "<!-- Created using XmlSitemapGenerator.org WordPress Plugin - Free HTML, RSS and XML sitemap generator -->";
63
  }
64
+
65
+ public function getDateString($dt, $format ) {
66
+ $date = new \DateTime();
67
+ $date->setTimestamp($dt);
68
+ $date->setTimezone($this->timeZone);
69
+
70
+ return esc_attr($date->format($format));
71
+ }
72
 
73
  }
74
 
code/renderers/{htmRenderer.php → HtmRenderer.php} RENAMED
@@ -4,7 +4,7 @@ namespace xmlSitemapGenerator;
4
 
5
 
6
 
7
- class htmRenderer extends rendererCore implements iSitemapRenderer
8
  {
9
 
10
 
4
 
5
 
6
 
7
+ class HtmRenderer extends RendererCore implements ISitemapRenderer
8
  {
9
 
10
 
code/renderers/{newsRenderer.php → NewsRenderer.php} RENAMED
@@ -3,7 +3,7 @@
3
  namespace xmlSitemapGenerator;
4
 
5
 
6
- class newsRenderer extends rendererCore implements iSitemapRenderer
7
  {
8
 
9
  private function renderImages($images)
@@ -29,7 +29,7 @@ namespace xmlSitemapGenerator;
29
  echo '<news:name>' . esc_attr($siteName) . '</news:name>';
30
  echo '<news:language>' . substr( esc_attr(get_bloginfo ( 'language' )), 0, 2 ) . '</news:language>';
31
  echo '</news:publication>';
32
- echo '<news:publication_date>' . date('Y-m-d\TH:i:s+00:00', $url->modified) . '</news:publication_date>';
33
  echo '<news:title>' . esc_attr($url->title) . '</news:title>';
34
  echo '</news:news>';
35
 
3
  namespace xmlSitemapGenerator;
4
 
5
 
6
+ class NewsRenderer extends rendererCore implements ISitemapRenderer
7
  {
8
 
9
  private function renderImages($images)
29
  echo '<news:name>' . esc_attr($siteName) . '</news:name>';
30
  echo '<news:language>' . substr( esc_attr(get_bloginfo ( 'language' )), 0, 2 ) . '</news:language>';
31
  echo '</news:publication>';
32
+ echo '<news:publication_date>' . $this->getDateString($url->modified, \DateTime::ISO8601) . '</news:publication_date>';
33
  echo '<news:title>' . esc_attr($url->title) . '</news:title>';
34
  echo '</news:news>';
35
 
code/renderers/{rssRenderer.php → RssRenderer.php} RENAMED
@@ -3,7 +3,7 @@
3
  namespace xmlSitemapGenerator;
4
 
5
 
6
- class rssRenderer extends rendererCore implements iSitemapRenderer
7
  {
8
 
9
  function renderItem( $url, $isIndex)
@@ -17,7 +17,8 @@ namespace xmlSitemapGenerator;
17
 
18
  if(!$isIndex)
19
  {
20
- echo '<pubDate>' . date(DATE_RSS, $url->modified) . '</pubDate>';
 
21
  }
22
 
23
  echo "</item>\n" ;
3
  namespace xmlSitemapGenerator;
4
 
5
 
6
+ class RssRenderer extends RendererCore implements ISitemapRenderer
7
  {
8
 
9
  function renderItem( $url, $isIndex)
17
 
18
  if(!$isIndex)
19
  {
20
+
21
+ echo '<pubDate>' . $this->getDateString($url->modified, \DateTime::RSS) . '</pubDate>';
22
  }
23
 
24
  echo "</item>\n" ;
code/renderers/{xmlRenderer.php → XmlRenderer.php} RENAMED
@@ -3,8 +3,9 @@
3
  namespace xmlSitemapGenerator;
4
 
5
 
6
- class xmlRenderer extends rendererCore implements iSitemapRenderer
7
  {
 
8
  private function getFrequency($value)
9
  {
10
  switch ($value) {
@@ -102,12 +103,17 @@ namespace xmlSitemapGenerator;
102
 
103
  }
104
 
 
 
 
 
105
  private function renderItem( $url)
106
  {
107
 
108
  echo '<url>' ;
109
  echo '<loc>' . esc_url($url->location) . '</loc>';
110
- echo '<lastmod>' . date('Y-m-d\TH:i:s+00:00',$url->modified) . '</lastmod>';
 
111
 
112
  if (!$url->frequency==0) {
113
  echo '<changefreq>' . esc_attr($this->getFrequency($url->frequency) ). '</changefreq>';
3
  namespace xmlSitemapGenerator;
4
 
5
 
6
+ class XmlRenderer extends RendererCore implements ISitemapRenderer
7
  {
8
+
9
  private function getFrequency($value)
10
  {
11
  switch ($value) {
103
 
104
  }
105
 
106
+
107
+
108
+
109
+
110
  private function renderItem( $url)
111
  {
112
 
113
  echo '<url>' ;
114
  echo '<loc>' . esc_url($url->location) . '</loc>';
115
+
116
+ echo '<lastmod>' . $this->getDateString($url->modified, \DateTime::ISO8601) . '</lastmod>';
117
 
118
  if (!$url->frequency==0) {
119
  echo '<changefreq>' . esc_attr($this->getFrequency($url->frequency) ). '</changefreq>';
code/settings.php CHANGED
@@ -5,7 +5,7 @@ namespace xmlSitemapGenerator;
5
  // settings for generating a map
6
 
7
 
8
- class settings
9
  {
10
 
11
  public static function addHooks()
@@ -16,7 +16,7 @@ class settings
16
 
17
  public static function admin_menu()
18
  {
19
- add_options_page( 'XML Sitemap Settings','XML Sitemap','manage_options', XSG_PLUGIN_NAME , array( __CLASS__ , 'render' ) );
20
  }
21
 
22
  public static function register_settings()
@@ -34,9 +34,8 @@ class settings
34
  $output = 'names'; // 'names' or 'objects' (default: 'names')
35
  $operator = 'and'; // 'and' or 'or' (default: 'and')
36
 
37
- $post_types = get_post_types( $args, $output, $operator );
38
-
39
- return $post_types;
40
  }
41
 
42
  static function postTypeDefault($sitemapDefaults,$name)
@@ -47,12 +46,12 @@ class settings
47
 
48
  static function getDefaults($name){
49
 
50
- $settings = new metaSettings();
51
 
52
- $settings->exclude = helpers::getFieldValue($name . 'Exclude', 0);
53
- $settings->priority = helpers::getFieldValue($name . 'Priority' , 0);
54
- $settings->frequency = helpers::getFieldValue($name . 'Frequency', 0);
55
- $settings->scheduled = helpers::getFieldValue($name . 'Scheduled', 0);
56
 
57
  return $settings;
58
  }
@@ -61,44 +60,43 @@ class settings
61
 
62
  static function handlePostBack(){
63
 
64
- if (strtoupper(helpers::getServerValue('REQUEST_METHOD', '') != 'POST')){ return; }
65
 
66
  /* Verify the nonce before proceeding. */
67
- if ( !isset( $_POST['wpXSG_meta_nonce'] ) || !wp_verify_nonce( $_POST['wpXSG_meta_nonce'], basename( __FILE__ ) ) )
68
- return ;
69
 
70
 
71
  if ( !current_user_can( 'manage_options') ) {return;}
72
 
73
 
74
- $globalSettings = new globalSettings();
75
 
76
- $register = helpers::getFieldValue('register', 0);
77
 
78
- $globalSettings->newsMode = helpers::getFieldValue('newsMode', 0);
79
- $globalSettings->enableImages = helpers::getFieldValue('enableImages', 0);
80
- $globalSettings->addRssToHead = helpers::getFieldValue('addRssToHead', 0);
81
- $globalSettings->pingSitemap = helpers::getFieldValue('pingSitemap', 0 );
82
- $globalSettings->addToRobots = helpers::getFieldValue('addToRobots', 0 );
83
- $globalSettings->sendStats = helpers::getFieldValue('sendStats', 0 );
84
- $globalSettings->smallCredit = helpers::getFieldValue('smallCredit', 0 );
85
- $globalSettings->robotEntries = helpers::getTextAreaValue('robotEntries', "" );
86
- $globalSettings->registerEmail = helpers::getEmailValue('registerEmail', "" );
87
 
88
- $globalSettings->urlXmlSitemap = helpers::getFieldValue('urlXmlSitemap' , "xmlsitemap.xml");
89
- $globalSettings->urlNewsSitemap = helpers::getFieldValue('urlNewsSitemap', "newssitemap.xml");
90
- $globalSettings->urlRssSitemap = helpers::getFieldValue('urlRssSitemap' , "rsssitemap.xml");
91
- $globalSettings->urlRssLatest = helpers::getFieldValue('urlRssLatest', "rsslatest.xml");
92
- $globalSettings->urlHtmlSitemap = helpers::getFieldValue('urlHtmlSitemap', "htmlsitemap.htm");
93
 
94
- $globalSettings->register = $register;
95
 
96
 
97
  // if new registration status then .....
98
  if ($register != get_option('wpXSG_registered'))
99
  {
100
  $postData = array(
101
- 'email' => $globalSettings->registerEmail,
102
  'website' => get_bloginfo( 'url' ),
103
  'register' => $register,
104
  'id' => get_option('wpXSG_MapId')
@@ -124,18 +122,18 @@ class settings
124
 
125
  }
126
 
127
- update_option( "wpXSG_global" , $globalSettings , true);
128
  update_option( "wpXSG_registered" , $register , true);
129
 
130
 
131
- core::add_rewrite_rules();
132
  flush_rewrite_rules();
133
 
134
 
135
 
136
- $sitemapDefaults = new sitemapDefaults();
137
 
138
- $sitemapDefaults->dateField = helpers::getFieldValue('dateField', $sitemapDefaults->dateField );
139
  $sitemapDefaults->homepage = self::getDefaults("homepage");
140
  $sitemapDefaults->pages = self::getDefaults("pages");
141
  $sitemapDefaults->posts = self::getDefaults("posts");
@@ -146,7 +144,7 @@ class settings
146
  $sitemapDefaults->oldArchive = self::getDefaults("oldArchive");
147
  $sitemapDefaults->authors = self::getDefaults("authors");
148
 
149
- $sitemapDefaults->excludeRules = helpers::getFieldValue('excludeRules',"" );
150
 
151
  foreach ( self::getPostTypes() as $post_type )
152
  {
@@ -162,17 +160,17 @@ class settings
162
  ?>
163
 
164
  <tr>
165
- <td scope="col"><?php echo esc_attr($title); ?></td>
166
- <td scope="col"><select name="<?php echo esc_attr($name); ?>Exclude" id="<?php echo esc_attr($name); ?>Exclude" ></select> </td>
167
- <td scope="col"><select name="<?php echo esc_attr($name); ?>Priority" id="<?php echo esc_attr($name); ?>Priority" ></select> </td>
168
- <td scope="col"><select name="<?php echo esc_attr($name); ?>Frequency" id="<?php echo esc_attr($name); ?>Frequency" ></select> </td>
169
  <?php if ($scheduled) { ?>
170
- <td scope="col"><input type="checkbox" name="<?php echo esc_attr($name); ?>Scheduled" id="<?php echo esc_attr($name); ?>Scheduled"
171
  <?php if ($defaults->scheduled) { echo 'checked="checked"';} ?>
172
  ></input> </td>
173
  <?php }
174
  else
175
- { echo '<td scope="col"></td>';}
176
  ?>
177
  </tr>
178
  <script>
@@ -186,9 +184,9 @@ class settings
186
 
187
  }
188
 
189
- public static function renderSitemapLink($globalSettings, $property, $name) {
190
  $blogUrl = get_bloginfo( 'url' ) ;
191
- $fileUrl = helpers::safeRead($globalSettings,$property) ;
192
  if (strlen($fileUrl) > 0 ) {
193
  echo '<li><a target="_blank" href="' . esc_url($blogUrl .'/' . $fileUrl) . '">' . esc_attr($name) . '</a></li>';
194
  }
@@ -204,8 +202,8 @@ class settings
204
 
205
  self::handlePostBack();
206
 
207
- $globalSettings = core::getGlobalSettings();
208
- $sitemapDefaults = get_option( "wpXSG_sitemapDefaults" , new sitemapDefaults() );
209
 
210
 
211
  ?>
@@ -227,7 +225,7 @@ class settings
227
 
228
 
229
  <p>Here you can edit your admin settings and defaults. You can override categories, tags, pages and posts when adding and editing them.</p>
230
- <p>Please support us with a <a target="_blank" href="<?php echo (XSG_DONATE_URL) ?>">small donation</a>. If you have any comments, questions,
231
  suggestions and bugs please <a target="_blank" href="https://xmlsitemapgenerator.org/contact.aspx">contact us</a>.</strong></p>
232
 
233
  <div id="poststuff" class="metabox-holder has-right-sidebar">
@@ -241,10 +239,10 @@ class settings
241
  <p>Pages that are created or modified by Xml Sitemap Generator</p>
242
  <ul>
243
  <?php
244
- self::renderSitemapLink($globalSettings,"urlXmlSitemap", "XML Sitemap");
245
- self::renderSitemapLink($globalSettings,"urlRssSitemap", "RSS Sitemap");
246
- self::renderSitemapLink($globalSettings,"urlRssLatest", "RSS New Pages");
247
- self::renderSitemapLink($globalSettings,"urlHtmlSitemap", "HTML Sitemap");
248
 
249
  ?>
250
 
@@ -253,17 +251,6 @@ class settings
253
  </div>
254
  </div>
255
 
256
- <div class="postbox">
257
- <h3 class="hndle"><span>Please support us</span></h3>
258
- <div class="inside">
259
- <p>We take time out of our personal lives to develop and support our sitemap tools and cover costs out of our own pockets. </p>
260
- <p>Please support us with a <a target="_blank" href="<?php echo XSG_DONATE_URL ?>">small donation</a>.</p>
261
- <p>Please feel free to <a target="_blank" href="https://xmlsitemapgenerator.org/contact.aspx">contact us</a> with any comments,
262
- questions, suggestions and bugs.</strong></p>
263
-
264
- </div>
265
-
266
- </div>
267
 
268
 
269
  <div class="postbox">
@@ -307,8 +294,7 @@ class settings
307
 
308
  <div class="meta-box-sortabless">
309
 
310
-
311
-
312
 
313
  <div class="postbox" <?php if (!get_option('wpXSG_registered')) {echo 'style="border-left:solid 4px #dc3232;"';} ?>">
314
  <h3 class="hndle"><span>Register for important updates</span></h3>
@@ -319,12 +305,12 @@ class settings
319
 
320
 
321
  <p>
322
- <input type="checkbox" name="register" id="register" value="1" <?php checked($globalSettings->register, '1'); ?> /> Recieve important news and updates about the plugin. <a href="https://xmlsitemapgenerator.org/help/privacy.aspx" target="_blank" rel="nofollow">Privacy Policy</a>.
323
  </p>
324
  <table><tr><td>
325
  <p>
326
  <label for="email" >Email address</label><br />
327
- <input type="text" name="registerEmail" size="40" value="<?php echo helpers::safeRead2($globalSettings,"registerEmail",get_option( 'admin_email' ) ); ?>" />
328
  </p>
329
  </td><td>&nbsp;</td><td>
330
  <p>
@@ -335,6 +321,53 @@ class settings
335
  </div>
336
  </div>
337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
 
339
  <div class="postbox">
340
  <h3 class="hndle"><span>Output urls</span></h3>
@@ -344,25 +377,25 @@ class settings
344
  <table><tr><td>
345
  <p>
346
  <label for="email" >XML Sitemap URL</label><br />
347
- <input type="text" name="urlXmlSitemap" size="40" value="<?php echo helpers::safeRead($globalSettings,"urlXmlSitemap"); ?>" />
348
  </p>
349
 
350
  <p>
351
  <label for="email" >RSS Sitemap URL</label><br />
352
- <input type="text" name="urlRssSitemap" size="40" value="<?php echo helpers::safeRead($globalSettings,"urlRssSitemap"); ?>" />
353
  </p>
354
  <p>
355
  <label for="email" >HTML Sitemap URL</label><br />
356
- <input type="text" name="urlHtmlSitemap" size="40" value="<?php echo helpers::safeRead($globalSettings,"urlHtmlSitemap"); ?>" />
357
  </p>
358
  </td><td>&nbsp;</td><td style="vertical-align:top">
359
  <p>
360
  <label for="email" >XML News Sitemap URL</label><br />
361
- <input type="text" name="urlNewsSitemap" size="40" value="<?php echo helpers::safeRead($globalSettings,"urlNewsSitemap"); ?>" />
362
  </p>
363
  <p>
364
  <label for="email" >RSS Latest URLs</label><br />
365
- <input type="text" name="urlRssLatest" size="40" value="<?php echo helpers::safeRead($globalSettings,"urlRssLatest"); ?>" />
366
  </p>
367
 
368
 
@@ -377,32 +410,29 @@ class settings
377
 
378
  <ul class="defaultsList">
379
 
380
- <li>News sitemap : <input type="radio" name="newsMode" value="0" <?php checked($globalSettings->newsMode, '0'); ?> >
381
- Disabled &nbsp;<input type="radio" name="newsMode" value="1" <?php checked($globalSettings->newsMode, '1'); ?> >
382
- Include all posts &nbsp;<input type="radio" name="newsMode" value="2" <?php checked($globalSettings->newsMode, '2'); ?> > Selected tags / categories
383
  </li>
384
 
385
  <li>
386
- <input type="checkbox" name="enableImages" id="enableImages" value="1" <?php checked($globalSettings->enableImages, '1'); ?> />
387
  <label for="sm_b_ping">Enable images in sitemap</label><br>
388
  </li>
389
 
390
  <li>
391
- <input type="checkbox" name="pingSitemap" id="pingSitemap" value="1" <?php checked($globalSettings->pingSitemap, '1'); ?> />
392
  <label for="sm_b_ping">Automatically ping Google / Bing (MSN & Yahoo) daily</label><br>
393
  </li>
394
  <li>
395
- <input type="checkbox" name="addRssToHead" id=""addRssToHead" value="1" <?php checked($globalSettings->addRssToHead, '1'); ?> />
396
  <label for="sm_b_ping">Add latest pages / post RSS feed to head tag</label><br>
397
  </li>
398
  <li>
399
- <input type="checkbox" name="addToRobots" id="addToRobots" value="1" <?php checked($globalSettings->addToRobots, '1'); ?> />
400
  <label for="sm_b_ping">Add sitemap links to your robots.txt file</label><br>
401
  </li>
402
- <li>
403
- <input type="checkbox" name="sendStats" id="sendStats" value="1" <?php checked($globalSettings->sendStats, '1'); ?> />
404
- <label for="sm_b_ping">Help us improve by allowing basic usage stats (Page count, PHP Version, feature usage, etc.)</label><br>
405
- </li>
406
  </ul>
407
  </div>
408
  </div>
@@ -429,7 +459,7 @@ class settings
429
 
430
  <p>You can override the sitemap default settings for taxonomy items (categories, tags, etc), pages and posts when adding and editing them.</p>
431
 
432
- <table class="wp-list-table widefat fixed striped tags" style="clear:none;">
433
  <thead>
434
  <tr>
435
  <th scope="col">Page / area</th>
@@ -457,7 +487,7 @@ class settings
457
  </table>
458
 
459
  <p>Custom post types<p/>
460
- <table class="wp-list-table widefat fixed striped tags" style="clear:none;">
461
  <thead>
462
  <tr>
463
  <th scope="col">Page / area</th>
@@ -487,7 +517,7 @@ class settings
487
  <h3 class="hndle"><span>Robots.txt</span></h3>
488
  <div class="inside">
489
  <p>Add custom entries to your robots.txt file.</p>
490
- <textarea name="robotEntries" id="robotEntries" rows="10" style="width:98%;"><?php echo helpers::safeRead($globalSettings,"robotEntries"); ?></textarea>
491
 
492
  </div>
493
  </div>
@@ -499,7 +529,7 @@ class settings
499
  <h3 class="hndle"><span>Log</span></h3>
500
  <div class="inside">
501
 
502
- <?php echo core::getStatusHtml();?>
503
  </div>
504
  </div>
505
 
5
  // settings for generating a map
6
 
7
 
8
+ class Settings
9
  {
10
 
11
  public static function addHooks()
16
 
17
  public static function admin_menu()
18
  {
19
+ add_options_page( 'XML Sitemap settings','XML Sitemap','manage_options', XSG_PLUGIN_NAME , array( __CLASS__ , 'render' ) );
20
  }
21
 
22
  public static function register_settings()
34
  $output = 'names'; // 'names' or 'objects' (default: 'names')
35
  $operator = 'and'; // 'and' or 'or' (default: 'and')
36
 
37
+ return get_post_types( $args, $output, $operator );
38
+
 
39
  }
40
 
41
  static function postTypeDefault($sitemapDefaults,$name)
46
 
47
  static function getDefaults($name){
48
 
49
+ $settings = new metasettings();
50
 
51
+ $settings->exclude = Helpers::getFieldValue($name . 'Exclude', 0);
52
+ $settings->priority = Helpers::getFieldValue($name . 'Priority' , 0);
53
+ $settings->frequency = Helpers::getFieldValue($name . 'Frequency', 0);
54
+ $settings->scheduled = Helpers::getFieldValue($name . 'Scheduled', 0);
55
 
56
  return $settings;
57
  }
60
 
61
  static function handlePostBack(){
62
 
63
+ if (strtoupper(Helpers::geServerValue('REQUEST_METHOD', '')) != 'POST'){ return; }
64
 
65
  /* Verify the nonce before proceeding. */
66
+ if ( !isset( $_POST['wpXSG_meta_nonce'] ) || !wp_verify_nonce( $_POST['wpXSG_meta_nonce'], basename( __FILE__ ) ) ) {return ;}
 
67
 
68
 
69
  if ( !current_user_can( 'manage_options') ) {return;}
70
 
71
 
72
+ $globalsettings = new globalsettings();
73
 
74
+ $register = Helpers::getFieldValue('register', 0);
75
 
76
+ $globalsettings->newsMode = Helpers::getFieldValue('newsMode', 0);
77
+ $globalsettings->enableImages = Helpers::getFieldValue('enableImages', 0);
78
+ $globalsettings->addRssToHead = Helpers::getFieldValue('addRssToHead', 0);
79
+ $globalsettings->pingSitemap = Helpers::getFieldValue('pingSitemap', 0 );
80
+ $globalsettings->addToRobots = Helpers::getFieldValue('addToRobots', 0 );
81
+ $globalsettings->sendStats = Helpers::getFieldValue('sendStats', 0 );
82
+ $globalsettings->smallCredit = Helpers::getFieldValue('smallCredit', 0 );
83
+ $globalsettings->robotEntries = Helpers::getTextAreaValue('robotEntries', "" );
84
+ $globalsettings->registerEmail = Helpers::getEmailValue('registerEmail', "" );
85
 
86
+ $globalsettings->urlXmlSitemap = Helpers::getFieldValue('urlXmlSitemap' , "xmlsitemap.xml");
87
+ $globalsettings->urlNewsSitemap = Helpers::getFieldValue('urlNewsSitemap', "newssitemap.xml");
88
+ $globalsettings->urlRssSitemap = Helpers::getFieldValue('urlRssSitemap' , "rsssitemap.xml");
89
+ $globalsettings->urlRssLatest = Helpers::getFieldValue('urlRssLatest', "rsslatest.xml");
90
+ $globalsettings->urlHtmlSitemap = Helpers::getFieldValue('urlHtmlSitemap', "htmlsitemap.htm");
91
 
92
+ $globalsettings->register = $register;
93
 
94
 
95
  // if new registration status then .....
96
  if ($register != get_option('wpXSG_registered'))
97
  {
98
  $postData = array(
99
+ 'email' => $globalsettings->registerEmail,
100
  'website' => get_bloginfo( 'url' ),
101
  'register' => $register,
102
  'id' => get_option('wpXSG_MapId')
122
 
123
  }
124
 
125
+ update_option( "wpXSG_global" , $globalsettings , true);
126
  update_option( "wpXSG_registered" , $register , true);
127
 
128
 
129
+ Core::add_rewrite_rules();
130
  flush_rewrite_rules();
131
 
132
 
133
 
134
+ $sitemapDefaults = new SitemapDefaults();
135
 
136
+ $sitemapDefaults->dateField = Helpers::getFieldValue('dateField', $sitemapDefaults->dateField );
137
  $sitemapDefaults->homepage = self::getDefaults("homepage");
138
  $sitemapDefaults->pages = self::getDefaults("pages");
139
  $sitemapDefaults->posts = self::getDefaults("posts");
144
  $sitemapDefaults->oldArchive = self::getDefaults("oldArchive");
145
  $sitemapDefaults->authors = self::getDefaults("authors");
146
 
147
+ $sitemapDefaults->excludeRules = Helpers::getFieldValue('excludeRules',"" );
148
 
149
  foreach ( self::getPostTypes() as $post_type )
150
  {
160
  ?>
161
 
162
  <tr>
163
+ <td><?php echo esc_attr($title); ?></td>
164
+ <td><select name="<?php echo esc_attr($name); ?>Exclude" id="<?php echo esc_attr($name); ?>Exclude" ></select> </td>
165
+ <td><select name="<?php echo esc_attr($name); ?>Priority" id="<?php echo esc_attr($name); ?>Priority" ></select> </td>
166
+ <td><select name="<?php echo esc_attr($name); ?>Frequency" id="<?php echo esc_attr($name); ?>Frequency" ></select> </td>
167
  <?php if ($scheduled) { ?>
168
+ <td><input type="checkbox" name="<?php echo esc_attr($name); ?>Scheduled" id="<?php echo esc_attr($name); ?>Scheduled"
169
  <?php if ($defaults->scheduled) { echo 'checked="checked"';} ?>
170
  ></input> </td>
171
  <?php }
172
  else
173
+ { echo '<td></td>';}
174
  ?>
175
  </tr>
176
  <script>
184
 
185
  }
186
 
187
+ public static function renderSitemapLink($globalsettings, $property, $name) {
188
  $blogUrl = get_bloginfo( 'url' ) ;
189
+ $fileUrl = Helpers::safeRead($globalsettings,$property) ;
190
  if (strlen($fileUrl) > 0 ) {
191
  echo '<li><a target="_blank" href="' . esc_url($blogUrl .'/' . $fileUrl) . '">' . esc_attr($name) . '</a></li>';
192
  }
202
 
203
  self::handlePostBack();
204
 
205
+ $globalsettings = Core::getGlobalsettings();
206
+ $sitemapDefaults = get_option( "wpXSG_sitemapDefaults" , new SitemapDefaults() );
207
 
208
 
209
  ?>
225
 
226
 
227
  <p>Here you can edit your admin settings and defaults. You can override categories, tags, pages and posts when adding and editing them.</p>
228
+ <p>Please support us with a <a target="_blank" href="<?php echo XSG_DONATE_URL ?>">small donation</a>. If you have any comments, questions,
229
  suggestions and bugs please <a target="_blank" href="https://xmlsitemapgenerator.org/contact.aspx">contact us</a>.</strong></p>
230
 
231
  <div id="poststuff" class="metabox-holder has-right-sidebar">
239
  <p>Pages that are created or modified by Xml Sitemap Generator</p>
240
  <ul>
241
  <?php
242
+ self::renderSitemapLink($globalsettings,"urlXmlSitemap", "XML Sitemap");
243
+ self::renderSitemapLink($globalsettings,"urlRssSitemap", "RSS Sitemap");
244
+ self::renderSitemapLink($globalsettings,"urlRssLatest", "RSS New Pages");
245
+ self::renderSitemapLink($globalsettings,"urlHtmlSitemap", "HTML Sitemap");
246
 
247
  ?>
248
 
251
  </div>
252
  </div>
253
 
 
 
 
 
 
 
 
 
 
 
 
254
 
255
 
256
  <div class="postbox">
294
 
295
  <div class="meta-box-sortabless">
296
 
297
+
 
298
 
299
  <div class="postbox" <?php if (!get_option('wpXSG_registered')) {echo 'style="border-left:solid 4px #dc3232;"';} ?>">
300
  <h3 class="hndle"><span>Register for important updates</span></h3>
305
 
306
 
307
  <p>
308
+ <input type="checkbox" name="register" id="register" value="1" <?php checked($globalsettings->register, '1'); ?> /> Recieve important news and updates about the plugin. <a href="https://xmlsitemapgenerator.org/help/privacy.aspx" target="_blank" rel="nofollow">Privacy Policy</a>.
309
  </p>
310
  <table><tr><td>
311
  <p>
312
  <label for="email" >Email address</label><br />
313
+ <input type="text" name="registerEmail" size="40" value="<?php echo Helpers::safeRead2($globalsettings,"registerEmail",get_option( 'admin_email' ) ); ?>" />
314
  </p>
315
  </td><td>&nbsp;</td><td>
316
  <p>
321
  </div>
322
  </div>
323
 
324
+ <div class="postbox" style="background-color:#faf9e8">
325
+ <h3 class="hndle"><span>Please support my work</span></h3>
326
+
327
+ <div class="inside">
328
+
329
+ <p>If you find this plugin useful, please help support my work and keep the project alive with a small annual contribution.</p>
330
+ <p>You can support me via paypal or Buy Me A Coffee. Some suggestions are below :</p>
331
+
332
+ <div style=" display:inline-block; text-align:center; padding:1em; width:150px;border:solid 1px #CCCCCC; margin-right:1em;">
333
+ <h4>Individuals</h4>
334
+ <p>£5 GBP<br />~ $6.30 USD</p>
335
+ <p><a href="https://www.paypal.com/webapps/billing/plans/subscribe?plan_id=P-7CH14255BF477193PMJWYA3I" target="blank">
336
+ <img src="<?php echo xsgPluginPath(); ?>assets/paypal.png" /></a></p>
337
+ <p><a href="https://www.buymeacoffee.com/xmlsitemaps" target="blank" >
338
+ <img width="120" height="35" src="<?php echo xsgPluginPath(); ?>assets/buymeacoffee.svg" /> </a></p>
339
+
340
+ </div>
341
+
342
+ <div style=" display:inline-block; text-align:center; padding:1em; width:150px;border:solid 1px #CCCCCC; margin-right:1em;">
343
+ <h4>Sole traders</h4>
344
+ <p>£10 GBP<br />~ $12.60 USD</p>
345
+ <p><a href="https://www.paypal.com/webapps/billing/plans/subscribe?plan_id=P-9AF72318UN401454TMJWYB5I" target="blank">
346
+ <img src="<?php echo xsgPluginPath(); ?>assets/paypal.png" /></a></p>
347
+ <p><a href="https://www.buymeacoffee.com/xmlsitemaps" target="blank" >
348
+ <img width="120" height="35" src="<?php echo xsgPluginPath(); ?>assets/buymeacoffee.svg" /> </a></p>
349
+ </div>
350
+
351
+ <div style=" display:inline-block; text-align:center; padding:1em; width:150px;border:solid 1px #CCCCCC; margin-right:1em;">
352
+ <h4>Small busineses</h4>
353
+ <p>£20 GBP<br />~ $25.20 USD</p>
354
+ <p><a href="https://www.paypal.com/webapps/billing/plans/subscribe?plan_id=P-8D144606MX3223435MJWYDCI" target="blank">
355
+ <img src="<?php echo xsgPluginPath(); ?>assets/paypal.png" /></a></p>
356
+ <p><a href="https://www.buymeacoffee.com/xmlsitemaps" target="blank" >
357
+ <img width="120" height="35" src="<?php echo xsgPluginPath(); ?>assets/buymeacoffee.svg" /> </a></p>
358
+ </div>
359
+
360
+ <div style=" display:inline-block; text-align:center; padding:1em; width:150px;border:solid 1px #CCCCCC; margin-right:1em;">
361
+ <h4>Larger businesses</h4>
362
+ <p>£50 GBP <br />~ $61.67 USD</p>
363
+ <p><a href="https://www.paypal.com/webapps/billing/plans/subscribe?plan_id=P-0A784764VU256342JMJWYD7I" target="blank">
364
+ <img src="<?php echo xsgPluginPath(); ?>assets/paypal.png" /></a></p>
365
+ <p><a href="https://www.buymeacoffee.com/xmlsitemaps" target="blank" >
366
+ <img width="120" height="35" src="<?php echo xsgPluginPath(); ?>assets/buymeacoffee.svg" /> </a></p>
367
+ </div>
368
+
369
+ </div>
370
+ </div>
371
 
372
  <div class="postbox">
373
  <h3 class="hndle"><span>Output urls</span></h3>
377
  <table><tr><td>
378
  <p>
379
  <label for="email" >XML Sitemap URL</label><br />
380
+ <input type="text" name="urlXmlSitemap" size="40" value="<?php echo Helpers::safeRead($globalsettings,"urlXmlSitemap"); ?>" />
381
  </p>
382
 
383
  <p>
384
  <label for="email" >RSS Sitemap URL</label><br />
385
+ <input type="text" name="urlRssSitemap" size="40" value="<?php echo Helpers::safeRead($globalsettings,"urlRssSitemap"); ?>" />
386
  </p>
387
  <p>
388
  <label for="email" >HTML Sitemap URL</label><br />
389
+ <input type="text" name="urlHtmlSitemap" size="40" value="<?php echo Helpers::safeRead($globalsettings,"urlHtmlSitemap"); ?>" />
390
  </p>
391
  </td><td>&nbsp;</td><td style="vertical-align:top">
392
  <p>
393
  <label for="email" >XML News Sitemap URL</label><br />
394
+ <input type="text" name="urlNewsSitemap" size="40" value="<?php echo Helpers::safeRead($globalsettings,"urlNewsSitemap"); ?>" />
395
  </p>
396
  <p>
397
  <label for="email" >RSS Latest URLs</label><br />
398
+ <input type="text" name="urlRssLatest" size="40" value="<?php echo Helpers::safeRead($globalsettings,"urlRssLatest"); ?>" />
399
  </p>
400
 
401
 
410
 
411
  <ul class="defaultsList">
412
 
413
+ <li>News sitemap : <input type="radio" name="newsMode" value="0" <?php checked($globalsettings->newsMode, '0'); ?> >
414
+ Disabled &nbsp;<input type="radio" name="newsMode" value="1" <?php checked($globalsettings->newsMode, '1'); ?> >
415
+ Include all posts &nbsp;<input type="radio" name="newsMode" value="2" <?php checked($globalsettings->newsMode, '2'); ?> > Selected tags / categories
416
  </li>
417
 
418
  <li>
419
+ <input type="checkbox" name="enableImages" id="enableImages" value="1" <?php checked($globalsettings->enableImages, '1'); ?> />
420
  <label for="sm_b_ping">Enable images in sitemap</label><br>
421
  </li>
422
 
423
  <li>
424
+ <input type="checkbox" name="pingSitemap" id="pingSitemap" value="1" <?php checked($globalsettings->pingSitemap, '1'); ?> />
425
  <label for="sm_b_ping">Automatically ping Google / Bing (MSN & Yahoo) daily</label><br>
426
  </li>
427
  <li>
428
+ <input type="checkbox" name="addRssToHead" id=""addRssToHead" value="1" <?php checked($globalsettings->addRssToHead, '1'); ?> />
429
  <label for="sm_b_ping">Add latest pages / post RSS feed to head tag</label><br>
430
  </li>
431
  <li>
432
+ <input type="checkbox" name="addToRobots" id="addToRobots" value="1" <?php checked($globalsettings->addToRobots, '1'); ?> />
433
  <label for="sm_b_ping">Add sitemap links to your robots.txt file</label><br>
434
  </li>
435
+
 
 
 
436
  </ul>
437
  </div>
438
  </div>
459
 
460
  <p>You can override the sitemap default settings for taxonomy items (categories, tags, etc), pages and posts when adding and editing them.</p>
461
 
462
+ <table class="wp-list-table widefat fixed striped tags" style="clear:none;" aria-label="General sitemap defaults">
463
  <thead>
464
  <tr>
465
  <th scope="col">Page / area</th>
487
  </table>
488
 
489
  <p>Custom post types<p/>
490
+ <table class="wp-list-table widefat fixed striped tags" style="clear:none;" aria-label="Custom posts sitemap defaults">
491
  <thead>
492
  <tr>
493
  <th scope="col">Page / area</th>
517
  <h3 class="hndle"><span>Robots.txt</span></h3>
518
  <div class="inside">
519
  <p>Add custom entries to your robots.txt file.</p>
520
+ <textarea name="robotEntries" id="robotEntries" rows="10" style="width:98%;"><?php echo Helpers::safeRead($globalsettings,"robotEntries"); ?></textarea>
521
 
522
  </div>
523
  </div>
529
  <h3 class="hndle"><span>Log</span></h3>
530
  <div class="inside">
531
 
532
+ <?php echo Core::getStatusHtml();?>
533
  </div>
534
  </div>
535
 
code/settingsModels.php CHANGED
@@ -6,19 +6,19 @@ namespace xmlSitemapGenerator;
6
 
7
 
8
 
9
- class sitemapDefaults {
10
 
11
  function __construct() {
12
  //($exclude1 = 1,$priority1 = 1,$frequency1 = 1, $inherit = 0)
13
- $this->homepage = new metaSettings(3,12,6,0);
14
- $this->pages = new metaSettings(3,8,4,0);
15
- $this->posts = new metaSettings(3,8,4,0);
16
- $this->taxonomyCategories = new metaSettings(3,5,5,0);
17
- $this->taxonomyTags = new metaSettings(3,5,5,0);
18
 
19
- $this->recentArchive = new metaSettings(3,8,7,0);
20
- $this->oldArchive = new metaSettings(3,5,3,0);
21
- $this->authors = new metaSettings(3,5,5,0);
22
 
23
  }
24
 
@@ -38,7 +38,7 @@ class sitemapDefaults {
38
  public $customPosts = array();
39
  }
40
 
41
- class globalSettings {
42
 
43
  public $enableImages = false; // add images to the sitemap
44
  public $addRssToHead = true; // add recent files to Rss header
@@ -59,7 +59,7 @@ class globalSettings {
59
 
60
  }
61
 
62
- class metaSettings
63
  {
64
  function __construct($exclude1 = 1,$priority1 = 1,$frequency1 = 1, $inherit1 = 0, $news1 = 0) {
65
  $this->exclude = $exclude1;
6
 
7
 
8
 
9
+ class SitemapDefaults {
10
 
11
  function __construct() {
12
  //($exclude1 = 1,$priority1 = 1,$frequency1 = 1, $inherit = 0)
13
+ $this->homepage = new MetaSettings(3,12,6,0);
14
+ $this->pages = new MetaSettings(3,8,4,0);
15
+ $this->posts = new MetaSettings(3,8,4,0);
16
+ $this->taxonomyCategories = new MetaSettings(3,5,5,0);
17
+ $this->taxonomyTags = new MetaSettings(3,5,5,0);
18
 
19
+ $this->recentArchive = new MetaSettings(3,8,7,0);
20
+ $this->oldArchive = new MetaSettings(3,5,3,0);
21
+ $this->authors = new MetaSettings(3,5,5,0);
22
 
23
  }
24
 
38
  public $customPosts = array();
39
  }
40
 
41
+ class GlobalSettings {
42
 
43
  public $enableImages = false; // add images to the sitemap
44
  public $addRssToHead = true; // add recent files to Rss header
59
 
60
  }
61
 
62
+ class MetaSettings
63
  {
64
  function __construct($exclude1 = 1,$priority1 = 1,$frequency1 = 1, $inherit1 = 0, $news1 = 0) {
65
  $this->exclude = $exclude1;
code/upgrader.php CHANGED
@@ -3,7 +3,7 @@
3
  namespace xmlSitemapGenerator;
4
 
5
 
6
- class upgrader
7
  {
8
 
9
  public static function doUpgrade()
3
  namespace xmlSitemapGenerator;
4
 
5
 
6
+ class Upgrader
7
  {
8
 
9
  public static function doUpgrade()
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: XmlSitemapGenerator
3
  Tags: google, google sitemaps, seo, xml sitemap
4
  Donate link: https://xmlsitemapgenerator.org/contribute/subscribeother.aspx?service=wordpress
5
  Requires at least: 5.1.0
6
- Tested up to: 5.9
7
- Stable tag: 2.0.5
8
 
9
  Improve your websites SEO with a comprehensive, easy to use RSS and XML sitemap plugin. Compatible with Google, Bing, Baidu, Yandex and more.
10
 
@@ -129,6 +129,14 @@ You should now be up and running, but you may also want to :
129
 
130
  == Changelog ==
131
 
 
 
 
 
 
 
 
 
132
  = 2.0.5 =
133
  Release Date: April 29th, 2022
134
  * To ensure hot fix from 2.0.4 gets pushed to all users.
3
  Tags: google, google sitemaps, seo, xml sitemap
4
  Donate link: https://xmlsitemapgenerator.org/contribute/subscribeother.aspx?service=wordpress
5
  Requires at least: 5.1.0
6
+ Tested up to: 6.0
7
+ Stable tag: 2.0.6
8
 
9
  Improve your websites SEO with a comprehensive, easy to use RSS and XML sitemap plugin. Compatible with Google, Bing, Baidu, Yandex and more.
10
 
129
 
130
  == Changelog ==
131
 
132
+ = 2.0.6 =
133
+ Release Date: May 12th, 2022
134
+ * New : Tested for Wordpress 6.0
135
+ * Fix : Added timezone correction to dates.
136
+ * Fix : Added missing escaping.
137
+ * Fix : Archives showing with zero posts
138
+ * Fix : Updated various code quality issues.
139
+
140
  = 2.0.5 =
141
  Release Date: April 29th, 2022
142
  * To ensure hot fix from 2.0.4 gets pushed to all users.
www-xml-sitemap-generator-org.php CHANGED
@@ -4,7 +4,7 @@ namespace xmlSitemapGenerator;
4
  Plugin Name: XML Sitemap Generator for Google
5
  Plugin URI: https://XmlSitemapGenerator.org
6
  Description: HTML, RSS and Google XML Sitemap generator compatible with Google, Bing, Baidu, Yandex and more.
7
- Version: 2.0.5
8
  Author: XmlSitemapGenerator.org
9
  Author URI: https://XmlSitemapGenerator.org
10
  License: GPL2
@@ -25,17 +25,17 @@ function xsgPluginPath() {
25
 
26
  if(defined('ABSPATH') && defined('WPINC')) {
27
 
28
- register_activation_hook(__FILE__, 'xmlSitemapGenerator\core::activatePlugin');
29
 
30
- add_action("init", 'xmlSitemapGenerator\core::initialisePlugin');
31
 
32
  // used to redirect the user to the plugin settings when activated manually.
33
- add_action( 'activated_plugin', 'xmlSitemapGenerator\core::activated');
34
 
35
  // when ever a new blog is created in network mode
36
- add_action( 'wp_initialize_site', 'xmlSitemapGenerator\core::activateNewBlog', 900 );
37
 
38
- add_action( 'upgrader_process_complete', 'xmlSitemapGenerator\core::activatePlugin' );
39
 
40
 
41
  }
4
  Plugin Name: XML Sitemap Generator for Google
5
  Plugin URI: https://XmlSitemapGenerator.org
6
  Description: HTML, RSS and Google XML Sitemap generator compatible with Google, Bing, Baidu, Yandex and more.
7
+ Version: 2.0.6
8
  Author: XmlSitemapGenerator.org
9
  Author URI: https://XmlSitemapGenerator.org
10
  License: GPL2
25
 
26
  if(defined('ABSPATH') && defined('WPINC')) {
27
 
28
+ register_activation_hook(__FILE__, 'xmlSitemapGenerator\Core::activatePlugin');
29
 
30
+ add_action("init", 'xmlSitemapGenerator\Core::initialisePlugin');
31
 
32
  // used to redirect the user to the plugin settings when activated manually.
33
+ add_action( 'activated_plugin', 'xmlSitemapGenerator\Core::activated');
34
 
35
  // when ever a new blog is created in network mode
36
+ add_action( 'wp_initialize_site', 'xmlSitemapGenerator\Core::activateNewBlog', 900 );
37
 
38
+ add_action( 'upgrader_process_complete', 'xmlSitemapGenerator\Core::activatePlugin' );
39
 
40
 
41
  }