Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| <?php | |
| function to_slug($str) { | |
| $str = trim(mb_strtolower($str)); | |
| $str = preg_replace('/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/', 'a', $str); | |
| $str = preg_replace('/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/', 'e', $str); | |
| $str = preg_replace('/(ì|í|ị|ỉ|ĩ)/', 'i', $str); | |
| $str = preg_replace('/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/', 'o', $str); | |
| $str = preg_replace('/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/', 'u', $str); | |
| $str = preg_replace('/(ỳ|ý|ỵ|ỷ|ỹ)/', 'y', $str); | |
| $str = preg_replace('/(đ)/', 'd', $str); |
| <?php | |
| add_rewrite_rule('^(custom-page)/([^/]*)/?', 'index.php?pagename=$matches[1]&custom_var=$matches[2]', 'top'); | |
| function custom_query_vars_filter($vars) { | |
| $vars[] .= 'custom_var'; | |
| return $vars; | |
| } | |
| add_filter('query_vars', 'custom_query_vars_filter'); | |
| // flush_rewrite_rules(); |
| html, | |
| body, | |
| p, | |
| ol, | |
| ul, | |
| li, | |
| dl, | |
| dt, | |
| dd, | |
| blockquote, |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| var lazyLoad = false; | |
| function onLazyLoad() { | |
| if (lazyLoad === true) return; | |
| lazyLoad = true; | |
| document.removeEventListener('scroll', onLazyLoad); | |
| document.removeEventListener('mousemove', onLazyLoad); | |
| document.removeEventListener('mousedown', onLazyLoad); | |
| document.removeEventListener('touchstart', onLazyLoad); |
| window.addEventListener('DOMContentLoaded', function () { | |
| var observer, | |
| options = { | |
| rootMargin: '0px', | |
| threshold: 0.05 | |
| }, | |
| allTheLazyImages = document.querySelectorAll('.lazy'); | |
| function lazyLoader(e) { | |
| e.forEach(function (e) { |
| window.addEventListener('DOMContentLoaded', function () { | |
| window.focus(); | |
| window.addEventListener('blur', function () { | |
| setTimeout(function () { | |
| if (document.activeElement.tagName === 'IFRAME') { | |
| console.log('clicked'); | |
| } | |
| }); | |
| }); |
| Code | Country name (using title case) | Year | ccTLD |
|---|---|---|---|
| AD | Andorra | 1974 | .ad |
| AE | United Arab Emirates | 1974 | .ae |
| [AF](https://en.wikipe |
| <?php | |
| header("HTTP/1.1 301 Moved Permanently"); | |
| header("Location: " . get_bloginfo('url')); | |
| exit(); | |
| ?> |
| window.onScriptLoad = function () { | |
| // this callback will be called by recaptcah/api.js once its loaded. If we used | |
| // render=explicit as param in script src, then we can explicitly render reCaptcha at this point | |
| // element to "render" invisible captcha in | |
| var htmlEl = document.querySelector('.g-recaptcha'); | |
| // option to captcha | |
| var captchaOptions = { | |
| sitekey: '6Lck', |