Created
November 23, 2022 16:43
-
-
Save brianlayman/98dc153303cb05b3262bb99717ea2e80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste this at the end of functions.php | |
// or add as a separate file in mu-plugins including a leading opening < ? php tag in front. | |
// Activate WordPress Maintenance Mode | |
function wp_maintenance_mode() { | |
if ( ( !current_user_can( 'edit_themes' ) || !is_user_logged_in() ) && !( is_admin() || stripos( wp_login_url(), $_SERVER['SCRIPT_NAME'] ) ) ) { | |
$message = '<!doctype html> | |
<title>Site Maintenance</title> | |
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet"> | |
<style> | |
html, body { padding: 0; margin: 0; width: 100%; height: 100%; } | |
* {box-sizing: border-box;} | |
body { text-align: center; padding: 0; background: #fff; color: #02375a; font-family: Open Sans; } | |
h1 { font-size: 50px; font-weight: 800; text-align: center; font-family: Tahoma;} | |
body { font-family: Open Sans; font-weight: 100; font-size: 20px; color: #02375a; text-align: center; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center;} | |
article { display: block; width: 700px; padding: 50px; margin: 0 auto; } | |
a { color: #02375a; font-weight: bold;} | |
a:hover { text-decoration: none; } | |
svg { width: 300px; margin-top: 1em; } | |
</style> | |
<article> | |
<svg width="255px" height="40px" viewBox="0 0 255 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<title>SDR_Logo_Blog</title> | |
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | |
<g id="Header/blog" transform="translate(-360.000000, -20.000000)"> | |
<g id="SDR_Logo_Blog" transform="translate(360.000000, 20.000000)"> | |
<g id="SecureData_RGB"> | |
<path d="M20,0 C31.0352941,0 40,8.96470588 40,20 C40,31.0352941 31.0352941,40 20,40 C8.96470588,40 0,31.0352941 0,20 C0,8.96470588 8.96470588,0 20,0 L20,0 Z" id="Path" fill="#004C96"></path> | |
<path d="M14.6352941,15.8823529 L10.9176471,15.8823529 L10.9176471,13.9764706 C10.9176471,9.95294118 14.9882353,6.65882353 20,6.65882353 C25.0117647,6.65882353 29.0823529,9.95294118 29.0823529,13.9764706 L29.0823529,15.8823529 L25.3647059,15.8823529 L25.3647059,13.9764706 C25.3647059,11.6 22.9647059,9.67058824 20.0235294,9.67058824 C17.0823529,9.67058824 14.6823529,11.6 14.6823529,13.9764706 L14.6823529,15.8823529 L14.6352941,15.8823529 Z M29.5294118,21.2470588 C30.5176471,21.2470588 31.3411765,20.4235294 31.3411765,19.4352941 L31.3411765,19.3647059 C31.3411765,18.3764706 30.5411765,17.5529412 29.5294118,17.5529412 L10.4705882,17.5529412 C9.48235294,17.5529412 8.65882353,18.3529412 8.65882353,19.3647059 L8.65882353,19.4352941 C8.65882353,20.4235294 9.45882353,21.2470588 10.4705882,21.2470588 L29.5294118,21.2470588 L29.5294118,21.2470588 Z M29.5294118,26.6117647 C30.5176471,26.6117647 31.3411765,25.8117647 31.3411765,24.8 L31.3411765,24.7294118 C31.3411765,23.7411765 30.5411765,22.9176471 29.5294118,22.9176471 L10.4705882,22.9176471 C9.48235294,22.9176471 8.65882353,23.7176471 8.65882353,24.7294118 L8.65882353,24.8 C8.65882353,25.7882353 9.45882353,26.6117647 10.4705882,26.6117647 L29.5294118,26.6117647 L29.5294118,26.6117647 Z M29.5294118,32 C30.5176471,32 31.3411765,31.2 31.3411765,30.1882353 L31.3411765,30.1176471 C31.3411765,29.1294118 30.5411765,28.3058824 29.5294118,28.3058824 L10.4705882,28.3058824 C9.48235294,28.3058824 8.65882353,29.1058824 8.65882353,30.1176471 L8.65882353,30.1882353 C8.65882353,31.1764706 9.45882353,32 10.4705882,32 L29.5294118,32 L29.5294118,32 Z" id="Shape" fill="#FFFFFF" fill-rule="nonzero"></path> | |
<path d="M45.3411765,13.5764706 L51.5529412,13.5764706 C51.6941176,14.5647059 53.0823529,14.7058824 53.8588235,14.7058824 C54.4941176,14.7058824 55.9294118,14.6588235 55.9294118,13.7647059 C55.9294118,12.9647059 54.6823529,12.8 54.0941176,12.7294118 L50.2588235,12.2588235 C47.9294118,11.9764706 45.4588235,11.0588235 45.4588235,8.32941176 C45.4588235,4.32941176 50.0941176,4.07058824 53.0823529,4.07058824 C56.0705882,4.07058824 61.1294118,4.32941176 61.4117647,8.28235294 L55.4352941,8.28235294 C55.2705882,7.15294118 53.7411765,7.01176471 52.8470588,7.01176471 C52.3058824,7.01176471 51.0117647,7.10588235 51.0117647,7.88235294 C51.0117647,8.63529412 52.4470588,8.75294118 52.9647059,8.82352941 L57.6470588,9.48235294 C59.9294118,9.81176471 62,10.7529412 62,13.3647059 C62,17.8352941 56.2588235,18.0705882 53.0117647,18.0705882 C50.0941176,18 45.3882353,17.4117647 45.3411765,13.5764706 L45.3411765,13.5764706 Z M64.4470588,17.6 L78.9176471,17.6 L78.9176471,14.1882353 L69.5764706,14.1882353 L69.5764706,12.4470588 L76.7764706,12.4470588 L76.7764706,9.17647059 L69.5764706,9.17647059 L69.5764706,7.6 L78.4705882,7.6 L78.4705882,4.35294118 L64.4470588,4.35294118 L64.4470588,17.6 L64.4470588,17.6 Z M91.9529412,9.90588235 L97.8117647,9.90588235 C97.6,5.15294118 93.0352941,4 89.0588235,4 C84.3058824,4 80.1411765,5.55294118 80.1411765,10.9882353 C80.1411765,16.4 84.3058824,17.9529412 89.0588235,17.9529412 C92.9882353,17.9529412 97.2,16.8705882 97.8588235,12.4 L91.9294118,12.4 C91.6,13.9058824 90.5411765,14.5411765 89.0352941,14.5411765 C86.7529412,14.5411765 85.6470588,13.2 85.6470588,10.9882353 C85.6470588,8.77647059 86.7529412,7.41176471 89.0352941,7.41176471 C90.7294118,7.38823529 91.7882353,8.21176471 91.9529412,9.90588235 L91.9529412,9.90588235 Z M105.247059,4.35294118 L100.117647,4.35294118 L100.117647,11.3176471 C100.117647,16.4470588 103.247059,17.9764706 107.952941,17.9764706 C112.658824,17.9764706 115.764706,16.4705882 115.764706,11.3176471 L115.764706,4.35294118 L110.611765,4.35294118 L110.611765,10.8235294 C110.611765,12.8705882 110.305882,14.3764706 107.929412,14.3764706 C105.552941,14.3764706 105.223529,12.8941176 105.223529,10.8235294 L105.223529,4.35294118 L105.247059,4.35294118 Z M129.082353,4.35294118 L119.011765,4.35294118 L119.011765,17.6 L124.211765,17.6 L124.211765,13.5529412 L127.270588,13.5529412 C128.282353,13.5529412 128.988235,13.7411765 129.129412,14.8705882 C129.223529,15.6235294 129.129412,17.0117647 129.482353,17.6 L135.2,17.6 L135.2,17.3882353 C134.564706,17.0588235 134.517647,14.7764706 134.470588,14.0941176 C134.4,12.6588235 134.235294,11.8588235 132.823529,11.2705882 C134.258824,10.7294118 135.011765,9.41176471 135.011765,7.92941176 C134.988235,4.44705882 131.717647,4.35294118 129.082353,4.35294118 L129.082353,4.35294118 Z M124.211765,10.0705882 L124.211765,7.71764706 L127.082353,7.71764706 C127.976471,7.71764706 129.341176,7.64705882 129.341176,8.87058824 C129.341176,10.0470588 128.094118,10.0705882 127.2,10.0705882 L124.211765,10.0705882 L124.211765,10.0705882 Z M137.529412,17.6 L152,17.6 L152,14.1882353 L142.658824,14.1882353 L142.658824,12.4470588 L149.858824,12.4470588 L149.858824,9.17647059 L142.658824,9.17647059 L142.658824,7.6 L151.552941,7.6 L151.552941,4.35294118 L137.529412,4.35294118 L137.529412,17.6 L137.529412,17.6 Z M46.1647059,22.7294118 L46.1647059,36 L54.6588235,36 C59.1294118,36 63.1058824,34.4705882 63.1058824,29.3882353 C63.1058824,24.3058824 59.1294118,22.7529412 54.6588235,22.7529412 L46.1647059,22.7529412 L46.1647059,22.7294118 Z M51.2941176,26.0235294 L53.8352941,26.0235294 C56.1647059,26.0235294 57.5529412,26.7294118 57.5529412,29.2470588 C57.5529412,31.7882353 56.1647059,32.4705882 53.8352941,32.4705882 L51.2941176,32.4705882 L51.2941176,26.0235294 L51.2941176,26.0235294 Z M63.2941176,36 L68.8,36 L69.2705882,34.7058824 L74.8941176,34.7058824 L75.3411765,36 L80.8941176,36 L75.5294118,22.7529412 L69.0117647,22.7529412 L63.2941176,36 L63.2941176,36 Z M70.4705882,31.4352941 L72.1647059,26.7764706 L73.7647059,31.4352941 L70.4705882,31.4352941 L70.4705882,31.4352941 Z M84.8,36 L89.9294118,36 L89.9294118,26.1176471 L94.7294118,26.1176471 L94.7294118,22.7529412 L80,22.7529412 L80,26.1176471 L84.8,26.1176471 L84.8,36 L84.8,36 Z M93.5294118,36 L99.0352941,36 L99.5058824,34.7058824 L105.129412,34.7058824 L105.576471,36 L111.129412,36 L105.764706,22.7529412 L99.2470588,22.7529412 L93.5294118,36 L93.5294118,36 Z M100.705882,31.4352941 L102.4,26.7764706 L104,31.4352941 L100.705882,31.4352941 L100.705882,31.4352941 Z" id="Shape" fill="#000000" fill-rule="nonzero"></path> | |
</g> | |
<rect id="Rectangle" fill="#424242" x="159.058824" y="0" width="1" height="40"></rect> | |
<g id="OFFICIAL-BLOG" transform="translate(166.588235, 6.117647)" fill="#424242" fill-rule="nonzero"> | |
<path d="M4.24632353,5.34185517 C4.24632353,6.22416415 4.47035846,6.89846765 4.91842831,7.36476566 C5.36649816,7.83106368 6.01332721,8.06421268 6.85891544,8.06421268 C7.70450368,8.06421268 8.35133272,7.83106368 8.79940257,7.36476566 C9.24747243,6.89846765 9.47150735,6.22416415 9.47150735,5.34185517 C9.47150735,4.45497464 9.24747243,3.77609959 8.79940257,3.30523003 C8.35133272,2.83436047 7.70450368,2.59892569 6.85891544,2.59892569 C6.01332721,2.59892569 5.36649816,2.83436047 4.91842831,3.30523003 C4.47035846,3.77609959 4.24632353,4.45497464 4.24632353,5.34185517 Z M0,5.34185517 C0,3.5772372 0.576746324,2.24577351 1.73023897,1.34746411 C2.88373162,0.449154703 4.59329044,0 6.85891544,0 C9.12454044,0 10.8340993,0.449154703 11.9875919,1.34746411 C13.1410846,2.24577351 13.7178309,3.5772372 13.7178309,5.34185517 C13.7178309,7.10190159 13.1410846,8.4310795 11.9875919,9.32938891 C10.8340993,10.2276983 9.12454044,10.676853 6.85891544,10.676853 C4.59329044,10.676853 2.88373162,10.2276983 1.73023897,9.32938891 C0.576746324,8.4310795 0,7.10190159 0,5.34185517 Z" id="Shape"></path> | |
<polygon id="Path" points="15.3584559 10.4094174 15.3584559 0.267435625 25.5330882 0.267435625 25.5330882 2.75664413 19.308364 2.75664413 19.308364 4.1349662 24.3956801 4.1349662 24.3956801 6.63103203 19.308364 6.63103203 19.308364 10.4094174"></polygon> | |
<polygon id="Path" points="26.7945772 10.4094174 26.7945772 0.267435625 36.9692096 0.267435625 36.9692096 2.75664413 30.7444853 2.75664413 30.7444853 4.1349662 35.8318015 4.1349662 35.8318015 6.63103203 30.7444853 6.63103203 30.7444853 10.4094174"></polygon> | |
<polygon id="Path" points="38.2306985 10.4094174 38.2306985 0.267435625 42.1806066 0.267435625 42.1806066 10.4094174"></polygon> | |
<path d="M52.8998162,4.52583365 C52.8354779,3.89953142 52.6125919,3.42180453 52.2311581,3.09265299 C51.8497243,2.76350145 51.328125,2.59892569 50.6663603,2.59892569 C49.8207721,2.59892569 49.173943,2.83436047 48.7258732,3.30523003 C48.2778033,3.77609959 48.0537684,4.45497464 48.0537684,5.34185517 C48.0537684,6.22416415 48.2778033,6.89846765 48.7258732,7.36476566 C49.173943,7.83106368 49.8207721,8.06421268 50.6663603,8.06421268 C51.2775735,8.06421268 51.7704504,7.92592332 52.1449908,7.6493446 C52.5195312,7.37276588 52.7665441,6.96246934 52.8860294,6.41845499 L57.4425551,6.41845499 C57.2357537,7.82192058 56.5590533,8.88251998 55.412454,9.60025319 C54.2658548,10.3179864 52.6838235,10.676853 50.6663603,10.676853 C48.4007353,10.676853 46.6911765,10.2276983 45.5376838,9.32938891 C44.3841912,8.4310795 43.8074449,7.10190159 43.8074449,5.34185517 C43.8074449,3.5772372 44.3841912,2.24577351 45.5376838,1.34746411 C46.6911765,0.449154703 48.4007353,0 50.6663603,0 C52.7803309,0 54.4163603,0.389724564 55.5744485,1.16917369 C56.7325368,1.94862282 57.3460478,3.06750947 57.4149816,4.52583365 L52.8998162,4.52583365 Z" id="Path"></path> | |
<polygon id="Path" points="58.9108456 10.4094174 58.9108456 0.267435625 62.8607537 0.267435625 62.8607537 10.4094174"></polygon> | |
<path d="M69.0854779,6.9121823 L71.6153493,6.9121823 L70.3883272,3.34637397 L69.0854779,6.9121823 Z M63.5569853,10.4094174 L67.9756434,0.267435625 L72.9871324,0.267435625 L77.109375,10.4094174 L72.8285846,10.4094174 L72.4908088,9.41510545 L68.1548713,9.41510545 L67.7895221,10.4094174 L63.5569853,10.4094174 Z" id="Shape"></path> | |
<polygon id="Path" points="77.8262868 10.4094174 77.8262868 0.267435625 81.7761949 0.267435625 81.7761949 7.62534397 88.0009191 7.62534397 88.0009191 10.4094174"></polygon> | |
<path d="M4.54273897,24.7316237 L7.34145221,24.7316237 C7.98483456,24.7316237 8.40188419,24.6721936 8.5926011,24.5533333 C8.78331801,24.434473 8.87867647,24.2196102 8.87867647,23.9087448 C8.87867647,23.5887364 8.77987132,23.3681592 8.58226103,23.2470131 C8.38465074,23.1258671 7.97104779,23.065294 7.34145221,23.065294 L4.54273897,23.065294 L4.54273897,24.7316237 Z M4.54273897,19.4926284 L4.54273897,20.925809 L7.19669118,20.925809 C7.77113971,20.925809 8.14338235,20.8743791 8.31341912,20.7715192 C8.48345588,20.6686594 8.56847426,20.4823688 8.56847426,20.2126474 C8.56847426,19.9383544 8.49034926,19.749778 8.33409926,19.6469182 C8.17784926,19.5440583 7.79871324,19.4926284 7.19669118,19.4926284 L4.54273897,19.4926284 Z M8.79595588,17.1199944 C10.2205882,17.1199944 11.228171,17.3154281 11.818704,17.7062956 C12.4092371,18.097163 12.7045037,18.7451801 12.7045037,19.6503468 C12.7045037,20.1486457 12.589614,20.5852286 12.3598346,20.9600957 C12.1300551,21.3349627 11.7922794,21.6389707 11.3465074,21.8721197 C11.9347426,22.0595532 12.3782169,22.3647041 12.6769301,22.7875724 C12.9756434,23.2104407 13.125,23.7373118 13.125,24.3681855 C13.125,25.3327824 12.8079044,26.0562301 12.1737132,26.5385285 C11.5395221,27.0208269 10.5859375,27.2619761 9.31295956,27.2619761 L0.592830882,27.2619761 L0.592830882,17.1199944 L8.79595588,17.1199944 Z" id="Shape"></path> | |
<polygon id="Path" points="14.8069853 27.2619761 14.8069853 17.1199944 18.7568934 17.1199944 18.7568934 24.4779027 24.9816176 24.4779027 24.9816176 27.2619761"></polygon> | |
<path d="M29.8828125,22.1944139 C29.8828125,23.0767229 30.1068474,23.7510264 30.5549173,24.2173244 C31.0029871,24.6836224 31.6498162,24.9167714 32.4954044,24.9167714 C33.3409926,24.9167714 33.9878217,24.6836224 34.4358915,24.2173244 C34.8839614,23.7510264 35.1079963,23.0767229 35.1079963,22.1944139 C35.1079963,21.3075334 34.8839614,20.6286583 34.4358915,20.1577888 C33.9878217,19.6869192 33.3409926,19.4514844 32.4954044,19.4514844 C31.6498162,19.4514844 31.0029871,19.6869192 30.5549173,20.1577888 C30.1068474,20.6286583 29.8828125,21.3075334 29.8828125,22.1944139 Z M25.636489,22.1944139 C25.636489,20.429796 26.2132353,19.0983323 27.3667279,18.2000229 C28.5202206,17.3017135 30.2297794,16.8525587 32.4954044,16.8525587 C34.7610294,16.8525587 36.4705882,17.3017135 37.6240809,18.2000229 C38.7775735,19.0983323 39.3543199,20.429796 39.3543199,22.1944139 C39.3543199,23.9544603 38.7775735,25.2836382 37.6240809,26.1819477 C36.4705882,27.0802571 34.7610294,27.5294118 32.4954044,27.5294118 C30.2297794,27.5294118 28.5202206,27.0802571 27.3667279,26.1819477 C26.2132353,25.2836382 25.636489,23.9544603 25.636489,22.1944139 Z" id="Shape"></path> | |
<path d="M51.7210478,26.3636667 C51.261489,26.7659631 50.6721048,27.060828 49.9528952,27.2482615 C49.2336857,27.435695 48.3363971,27.5294118 47.2610294,27.5294118 C44.9954044,27.5294118 43.2858456,27.0802571 42.1323529,26.1819477 C40.9788603,25.2836382 40.402114,23.9544603 40.402114,22.1944139 C40.402114,20.429796 40.9788603,19.0983323 42.1323529,18.2000229 C43.2858456,17.3017135 44.9954044,16.8525587 47.2610294,16.8525587 C49.1681985,16.8525587 50.6962316,17.174853 51.8451287,17.8194414 C52.9940257,18.4640298 53.6443015,19.3600535 53.7959559,20.5075123 L49.4669118,20.5075123 C49.2555147,20.0960729 48.9763327,19.7897791 48.6293658,19.5886309 C48.2823989,19.3874827 47.8630515,19.2869087 47.3713235,19.2869087 C46.5487132,19.2869087 45.8892463,19.5497727 45.3929228,20.0755009 C44.8965993,20.601229 44.6484375,21.3075334 44.6484375,22.1944139 C44.6484375,23.0904376 44.8931526,23.7864559 45.3825827,24.282469 C45.8720129,24.7784821 46.5556066,25.0264886 47.433364,25.0264886 C48.0905331,25.0264886 48.6374081,24.9076283 49.073989,24.6699078 C49.5105699,24.4321872 49.777114,24.1076072 49.8736213,23.6961678 L48.2329963,23.6961678 L48.2329963,21.5018242 L53.9269301,21.5018242 L53.9269301,27.2619761 L52.1484375,27.2619761 L51.7210478,26.3636667 Z" id="Path"></path> | |
</g> | |
</g> | |
</g> | |
</g> | |
</svg> | |
<h1>We’ll be back soon!</h1> | |
<div> | |
<p>Sorry for the inconvenience. We’re performing some maintenance at the moment. This only affects our blog. So please browse the <a href="/">main site</a> until the blog maintenance is complete, otherwise we’ll be back up shortly!</p> | |
<p>— Secure Data Recovery</p> | |
</div> | |
</article>'; | |
wp_die( $message ); | |
} | |
} | |
// Add/Remove the comment indicator from the next line to disable/enable maintenance mode | |
add_action( 'init', 'wp_maintenance_mode' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment