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
// Domains from which exceptions would be accepted. | |
$trademark_exceptions = array( | |
'yoast.com' => array( 'yoast' ), | |
'automattic.com' => array( 'akismet', 'akismet-', 'jetpack', 'jetpack-', 'wordpress', 'wp-', 'woo', 'woo-', 'woocommerce', 'woocommerce-' ), | |
'facebook.com' => array( 'facebook', 'instagram', 'oculus', 'whatsapp' ), | |
'support.microsoft.com' => array( 'bing-', 'microsoft-' ), | |
'trustpilot.com' => array( 'trustpilot' ), | |
'microsoft.com' => array( 'bing-', 'microsoft-' ), | |
); |
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
<aside class="qrcode"> | |
<p><img src="<?php bloginfo('template_directory'); ?>/qrcode/php/qr_img.php?d=<?php the_permalink(); ?>" alt="QR code for article link"></p> | |
<p>Scan QR code to view article online</p> | |
</aside> |
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
<aside class="qrcode"> | |
<p><img src="https://coywolf.pro/wp-content/themes/coywolf/qrcode/php/qr_img.php?d=https://coywolf.pro/seo/add-videoobject-schema-cloudflare-stream-video-wordpress/" alt="QR code for article link"></p> | |
<p>Scan QR code to view article online</p> | |
</aside> |
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
.qrcode { display:none; } | |
/* Printer Friendly */ | |
@media print { | |
.qrcode { display:block;text-align:center; } | |
} |
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
(http.request.full_uri contains "/path/to/qrcode/" and not http.referer contains "yourdomain.com") |
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
/wp-content/themes/coywolf/qrcode/php/qr_img.php?d=QR%20codes%20are%20fun" |
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
/wp-content/themes/coywolf/qrcode/php/qr_img.php |
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 cache-control headers to response | |
*/ | |
function add_cache_control_headers() { | |
if (!is_admin()) { | |
header("Cache-Control: public, must-revalidate, max-age=3600"); | |
} | |
} | |
add_action( 'template_redirect', 'add_cache_control_headers' ); |