This file contains hidden or 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 | |
/* | |
Use YouTube privacy-enhanced mode. More info: https://support.google.com/youtube/answer/171780?visit_id=637419781721286051-946666784&rd=1 | |
*/ | |
add_filter( | |
'embed_oembed_html', | |
function( $cache, $url, $attr, $post_ID ) { | |
if ( preg_match('#^https?://(www\.)?youtu\.?be(\.com)?/#i', $url) ) { | |
return str_replace( | |
' src="https://www.youtube.com/embed/', |
This file contains hidden or 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 | |
function customize_cf7_dequeue() { | |
wp_dequeue_script( 'contact-form-7' ); | |
wp_dequeue_style( 'contact-form-7' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'customize_cf7_dequeue' ); | |
function customize_cf7_enqueue( $content ) { | |
if ( has_shortcode( $content, 'contact-form-7' ) ) { | |
wpcf7_enqueue_styles(); |
This file contains hidden or 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
.gallery {display: grid;} | |
.gallery-columns-2 {grid-template-columns: 1fr 1fr;} | |
.gallery-columns-3 {grid-template-columns: 1fr 1fr 1fr;} |
This file contains hidden or 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 | |
add_filter( 'comment_form_default_fields', function( $fields ) { | |
$require_name_email = get_option( 'require_name_email' ); | |
if ( ! $require_name_email ) { | |
unset($fields['email']); | |
} | |
return $fields; | |
} ); |
This file contains hidden or 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
.sass-cache/ | |
cache/ | |
node_modules/ | |
/vendor/ | |
wp-config.php | |
# Exclude WordPress folder (in this example "public") | |
/public/* | |
# Re-include specific files + directories |
This file contains hidden or 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 | |
add_filter( | |
'wp_resource_hints', | |
function( $hints, $relation_type ) { | |
foreach( $hints as $k => $v ) { | |
if ( strpos( $v, '//s.w.org/' ) ) { | |
unset( $hints[$k] ); | |
} | |
} | |
return $hints; |
This file contains hidden or 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
#!/bin/bash | |
# Unzip theme bundle | |
unzip elmastudio-themebundle.zip | |
# Delete MacOS directory | |
rm -fr __MACOSX | |
# Unzip theme files | |
cd elmastudio-themebundle |
This file contains hidden or 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 | |
/** | |
* Receive webmention pings https://www.w3.org/TR/webmention/ | |
* | |
* @license Creative Commons https://creativecommons.org/publicdomain/zero/1.0/ | |
*/ | |
$statusURL = ''; | |
$data = []; |
This file contains hidden or 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 | |
add_action( | |
'admin_menu', | |
function() { | |
/* Hide posts admin menu */ | |
remove_menu_page( 'edit.php' ); | |
} | |
); | |
add_action( 'wp_before_admin_bar_render', function() { |
This file contains hidden or 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 | |
remove_action( 'welcome_panel', 'wp_welcome_panel' ); |
NewerOlder