Skip to content

Instantly share code, notes, and snippets.

View photocurio's full-sized avatar

Peter Mumford photocurio

View GitHub Profile
@lgg
lgg / Make WordPress to use protocol relative urls
Created June 7, 2016 03:29
Make WordPress to use protocol relative urls
//make other links relative
add_filter ('site_url', 'wp_make_theme_links_protocols_relative');
add_filter ('get_option_siteurl', 'wp_make_theme_links_protocols_relative');
add_filter ('stylesheet_directory_uri', 'wp_make_theme_links_protocols_relative');
add_filter ('template_directory_uri', 'wp_make_theme_links_protocols_relative');
add_filter ('wp_get_attachment_url', 'wp_make_theme_links_protocols_relative');
add_filter ('wp_get_attachment_thumb_url', 'wp_make_theme_links_protocols_relative');
add_filter ('the_permalink', 'wp_make_theme_links_protocols_relative');
function wp_make_theme_links_protocols_relative( $link ){
$link = str_replace("http://", "//", $link);
@noisymask
noisymask / _bootstrap-3-extra-large-grid.scss
Last active April 14, 2023 17:29
Bootstrap 3 extra large grid with SASS
// for background see http://stackoverflow.com/a/25644266/526258
@import "bootstrap";
// XLarge screen
$screen-xl: 1600px;
$screen-xl-min: $screen-xl;
$screen-xl-hugedesktop: $screen-xl-min;
// So media queries don't overlap when required, provide a maximum