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 | |
# Redirect to another domain: www.sitodidestinazione.it. | |
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP_HOST} !^(www\.)?sitodidestinazione\.it$ [NC] | |
RewriteRule .* http://www.sitodidestinazione.it%{REQUEST_URI} [R=301,L] | |
# Same for HTTPS: | |
RewriteCond %{HTTPS} on | |
RewriteCond %{HTTP_HOST} !^(www\.)?sitodidestinazione\.it$ [NC] | |
RewriteRule .* https://www.sitodidestinazione.it%{REQUEST_URI} [R=301,L] |
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 | |
/* | |
Plugin Name: EVE Target _blank + noopener | |
Plugin URI: https://www.evemilano.com/ | |
Version: 2.9 201904 | |
Description: This plugin put target blank to all external links | |
Author: Giovanni Sacheli | |
Author URI: https://www.evemilano.com/about-me/ | |
*/ |
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
/* 410 STATUS CODE */ | |
add_filter( 'rest_authentication_errors', function( $result ) { | |
if ( ! empty( $result ) ) { | |
return $result; | |
} | |
if ( ! is_user_logged_in() ) { | |
return new WP_Error( 'rest_not_logged_in', 'You are not currently logged in.', array( 'status' => 401 ) ); | |
} | |
return $result; | |
}); |
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
#Official GoAccess' Debian/Ubuntu Repository | |
echo "deb http://deb.goaccess.io/ $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/goaccess.list | |
wget -O - https://deb.goaccess.io/gnugpg.key | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install goaccess | |
# UBUNTU EASY INSTALL | |
apt-get install goaccess |
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
# Questa regola imposta come default l'editor HTML | |
add_filter( 'wp_default_editor', create_function('', 'return "html";') ); | |
# Questa regola imposta come default l'editor visuale | |
add_filter( 'wp_default_editor', create_function('', 'return "tinymce";') ); |
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
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "BreadcrumbList", | |
"itemListElement": [{ | |
"@type": "ListItem", | |
"position": 1, | |
"name": "Books", | |
"item": "https://example.com/books" | |
},{ |
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
<ol vocab="http://schema.org/" typeof="BreadcrumbList"> | |
<li property="itemListElement" typeof="ListItem"> | |
<a property="item" typeof="WebPage" | |
href="https://example.com/books"> | |
<span property="name">Books</span></a> | |
<meta property="position" content="1"> | |
</li> | |
› | |
<li property="itemListElement" typeof="ListItem"> | |
<a property="item" typeof="WebPage" |
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
<ol itemscope itemtype="http://schema.org/BreadcrumbList"> | |
<li itemprop="itemListElement" itemscope | |
itemtype="http://schema.org/ListItem"> | |
<a itemtype="http://schema.org/Thing" | |
itemprop="item" href="https://example.com/books"> | |
<span itemprop="name">Books</span></a> | |
<meta itemprop="position" content="1" /> | |
</li> | |
› | |
<li itemprop="itemListElement" itemscope |
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
function add_defer_attribute($tag, $handle) { | |
// add script handles to the array below | |
$scripts_to_defer = array('jquery-migrate', 'hoverIntent', 'superfish', 'superfish-args', 'skip-links', 'wp-embed'); | |
foreach($scripts_to_defer as $defer_script) { | |
if ($defer_script === $handle) { | |
return str_replace(' src', ' defer="defer" src', $tag); | |
} | |
} | |
return $tag; |
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 | |
/* | |
Plugin Name: EVE OG Injector | |
Plugin URI: https://www.evemilano.com/ | |
Version: 3.6 - 20171128 | |
Description: Inject dynamic Open Graph into HTML head | |
Author: Giovanni Sacheli | |
Author URI: https://www.evemilano.com/ | |
*/ |
NewerOlder