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
<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
#blocco di redirect HTTP | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
server_name www.evemilano.com evemilano.com; | |
return 301 https://www.evemilano.com$request_uri; | |
} | |
#blocco di redirect IP | |
server { |
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
fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:100m inactive=60m use_temp_path=off; | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
fastcgi_cache_use_stale error timeout invalid_header http_500; | |
fastcgi_ignore_headers Cache-Control Expires Set-Cookie; | |
# 201803 aggiunto | |
add_header X-Cache $upstream_cache_status; | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; |
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
fastcgi_cache_path /etc/nginx/cache/1 levels=1:2 keys_zone=CACHESITO:10m max_size=50m inactive=1440m use_temp_path=off; | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
add_header X-Cache $upstream_cache_status; | |
server { | |
listen 80; | |
listen [::]:80; | |
#redirect to HTTPS |
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
#blocco di redirect | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name evemilano.com; | |
rewrite ^(.*) http://www.evemilano.com$1 permanent; | |
} | |
#blocco default | |
server { |
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
//Making jQuery Google API | |
function replace_jquery() { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3'); | |
wp_enqueue_script('jquery'); | |
} | |
add_action('wp_enqueue_scripts', 'replace_jquery'); |
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
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; | |
}); |
NewerOlder