I hereby claim:
- I am danmaby on github.
- I am danmaby (https://keybase.io/danmaby) on keybase.
- I have a public key ASB3Cx53jUDppwLxpkgEu4wlmRg7rQstfeTSe8SabKk_iwo
To claim this, I am signing this object:
# | |
<IfModule mod_headers.c> | |
# HSTS - force redirect to HTTPS at the browser level. | |
# Submit for Chrome preload list at https://hstspreload.appspot.com/ | |
Header set Strict-Transport-Security: "max-age=31536000; includeSubDomains; preload" | |
# X-Xss-Protection | |
Header always set X-Xss-Protection "1; mode=block" | |
# Stop clickjacking by only allowing us to frame our own site |
## ENABLE GZIP COMPRESSION ## | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/x-javascript |
/** | |
* ============== REMOVE FROM LIVE =================== | |
prevent https:// for cron job | |
**/ | |
add_filter( 'cron_request', function( $args ) { | |
$args['url'] = set_url_scheme( $args['url'], 'http' ); | |
return $args; | |
} ); |
/** | |
* Amazon Polly "Events" CPT | |
**/ | |
function my_amazon_polly_post_types( $post_types ) { | |
$post_types[] = 'events'; | |
return $post_types; | |
} | |
add_filter( 'amazon_polly_post_types', 'my_amazon_polly_post_types' ); |
<?php | |
/** | |
* Add 'Events' CTP to WP Loop | |
**/ | |
function add_custom_post_type_to_query( $query ) { | |
if ( $query->is_home() && $query->is_main_query() ) { | |
$query->set( 'post_type', array('post', 'events') ); | |
} | |
} |
<?php | |
// Filter out "archive" from archive page title | |
function wpldn_remove_archive_text( $value, $original_value, $params ) { | |
$value = str_replace( $params->'Archives: ', ' ', $value ); | |
return $value; | |
} | |
add_filter( 'ast-advanced-headers-title', 'wpldn_remove_archive_text', 10, 3 ); |
<?php | |
// CPT Talks - replace og:image | |
add_action( 'wp_head', 'prefix_add_og_image', 10, 1 ); | |
function prefix_add_og_image( $img ) { | |
if( is_post_type_archive( 'post-type-archive-wpldn_talk' ) ) { | |
echo '<meta property="og:image" content="https://www.wpldn.uk/wp-content/uploads/2018/03/2018-02-22-WPLDN_Primary-Image-2.jpg" />'; | |
} | |
} |
I hereby claim:
To claim this, I am signing this object:
<?php | |
// default editor label for my_custom_post_type | |
add_action('admin_footer', 'add_title_to_editor'); | |
function add_title_to_editor() { | |
global $post; | |
if (get_post_type($post) == 'my_custom_post_type') : ?> | |
<script> jQuery('<h3>Optional Additional Information</h3>').insertBefore('#postdivrich'); </script> | |
<? endif; |
/* Decorative wrap -----*/ | |
.wrap-default, .decorative-wrap-1, .decorative-wrap-2, .decorative-wrap-3, .decorative-wrap-4 { | |
position: relative; | |
z-index: 1; | |
display: inline-block; | |
} | |
@media (min-width: 992px) { | |
.wrap-default, .decorative-wrap-1, .decorative-wrap-2, .decorative-wrap-3, .decorative-wrap-4 { | |
display: block; | |
} |