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
<?php | |
/** | |
* Get the user IP address from the server request. | |
* | |
* @return string | |
*/ | |
function get_user_ip() : string { | |
if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { | |
return $_SERVER[ 'HTTP_CLIENT_IP' ]; |
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
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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
/** | |
* Check if passed argument is a callable function. | |
* | |
* @param {Callable} func | |
* @return {Boolean} | |
*/ | |
export function isFunction( func ) { | |
return func && {}.toString.call( func ) === '[object Function]'; | |
} |
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
/** | |
* Copy text to clipboard. | |
* | |
* @param {String} text | |
* @return {void} | |
*/ | |
const copyToClipboard = ( text ) => { | |
const activeElement = document.activeElement; | |
// create a dummy element for text selection and push it offscreen |
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
:root { | |
--mouse-x: 0px; | |
--mouse-y: 0px; | |
} |
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
<?php | |
/** | |
* Raise PHP memory limit. | |
*/ | |
define( 'WP_MEMORY_LIMIT', '256M' ); | |
/** | |
* Disable revisions, we don’t need them. | |
*/ | |
define( 'WP_POST_REVISIONS', false ); |
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
html:not(.no-js):not(.user-is-tabbing) button:focus, | |
html:not(.no-js):not(.user-is-tabbing) input:focus, | |
html:not(.no-js):not(.user-is-tabbing) select:focus, | |
html:not(.no-js):not(.user-is-tabbing) textarea:focus { | |
outline: none; | |
} |
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
Show hidden characters
{ | |
"tab_size": 2, | |
"translate_tabs_to_spaces": false, | |
"word_wrap": false | |
} |
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
/** | |
* App JS | |
* | |
* This is the main scripts file. | |
* | |
* Author: PubliOne S.r.l. | |
* Author URI: http://publione.it | |
* | |
* @version 0.1.0 | |
*/ |
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
<?php | |
/** | |
* The search form in Microdata format. | |
* | |
* This is used by Google to display a fully functional | |
* search bar in the search results for your website, | |
* directly below the title. | |
* | |
* @link https://developers.google.com/webmasters/structured-data/slsb-overview | |
*/ |