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 | |
class WPSEO_Frontend { | |
function __construct() { | |
$options = get_wpseo_options(); | |
add_action( 'wp_head', array(&$this, 'head'), 1, 1 ); | |
remove_action( 'wp_head', 'rel_canonical' ); |
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 | |
/** | |
* List available attributes on product page in a drop-down selection | |
*/ | |
add_action('woocommerce_before_add_to_cart_button', 'list_attributes_on_product_page'); | |
function list_attributes_on_product_page() { | |
global $product; | |
$attributes = $product->get_attributes(); |
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 | |
/** | |
* Customise WordPress Vimeo oEmbed | |
* https://developer.vimeo.com/apis/oembed | |
*/ | |
function my_oembed_fetch_url( $provider, $url, $args ) { | |
if ( strpos( $provider, 'vimeo.com' ) !== 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
<IfModule mod_headers.c> | |
Header set Strict-Transport-Security "max-age=0; includeSubDomains; preload" env=HTTPS | |
</IfModule> |
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
__; | |
_e; | |
_x:1,2c; | |
_ex:1,2c; | |
esc_html__; | |
esc_html_e; | |
esc_html_x:1,2c; | |
esc_attr__; | |
esc_attr_e; | |
esc_attr_x:1,2c |
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
Order Deny,Allow | |
Deny from all | |
SetEnvIf X-Forwarded-For "^1\.1\.1\.1" AllowAccess | |
Allow from env=AllowAccess |
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
# Redirect other IP addresses | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
# Single IP Address | |
RewriteCond %{REMOTE_HOST} !^00.00.00.00 | |
# Multiple IP Addresses | |
RewriteCond %{REMOTE_HOST} !^(00.00.00.00|00.00.00.00) | |
RewriteRule .* http://www.example.com/ [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 | |
/** | |
* Implement 'wp_ajax_send-attachment-to-editor' to not attach an unattached media item. | |
* | |
* In WordPress TRAC 22085 there was a change. | |
* that caused unattached media files (images) to be attached to posts if they are inserted into the post. | |
* | |
* If you don't like this strategy you can disable it using this simple, rather hacky, action hook. | |
* |
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 | |
/** | |
* All Category Post Permalink | |
* | |
* When using %category% in permalinks, this allows you to substitute | |
* an alternative slug "all" to replace the category. By default this | |
* is not permitted - the post page is force redirected to a URL | |
* with a valid category. | |
*/ |
NewerOlder