View PLUGIN - WordPress Dynamic Prerender
<?php
/*
Plugin Name: EVE Dynamic Prerender
Plugin URI: https://www.evemilano.com/
Version: 1.0
Description: Inject Dynamic Prerender
Author: Giovanni Sacheli
Author URI: https://www.evemilano.com/
*/
View All WordPress Old Post Slug Cleanup
DELETE FROM `wp_postmeta` WHERE `meta_key` = '_wp_old_slug'
View One WordPress Old Post Slug Cleanup
DELETE FROM `wp_postmeta` WHERE `meta_key` = '_wp_old_slug' AND `meta_value` = 'the-old-post-slug'
View Viewing All
SELECT * FROM `wp_postmeta` WHERE `meta_key` = '_wp_old_slug'
View Defer script calling
# script con attributo defer
<script src="my.js" defer></script>
# script con attributo async e defer
<script src="my.js" async defer></script>
View Async script calling
# script con attributo async
<script async src="my.js">
View external and inline script
# script default
<script type="text/javascript" src="small.js"></script>
# script in linea
<script type="text/javascript">
/* contents of a small JavaScript file */
</script>
View functions.php
/*enable async script call*/
function add_async_forscript($url)
{
if (strpos($url, '#asyncload')===false)
return $url;
else if (is_admin())
return str_replace('#asyncload', '', $url);
else
return str_replace('#asyncload', '', $url)."' async='async";
}
View Modifica nel file functions.php
//* Personalizzare l'immagine nella pagina di login
function custom_loginlogo() {
echo '<style type="text/css">
h1 a {background-image: url(https://www.evemilano.com/wp-content/uploads/2013/04/logo-evemilano-std1000.png) !important; }
</style>';
}
add_action('login_head', 'custom_loginlogo');
//* Personalizzare il link dell'immagine nella pagina di login
View Browser Caching NGINX sites-available
. . .
# Default server configuration
#
# Expires map
map $sent_http_content_type $expires {
default off;
text/html epoch;
text/css max;
application/javascript max;