Skip to content

Instantly share code, notes, and snippets.

View soulreverie's full-sized avatar

Lydia soulreverie

View GitHub Profile
@soulreverie
soulreverie / functions.php
Created April 15, 2020 14:53 — forked from eristic/functions.php
Gulp file for using Gulp with Underscores theme. Place in root theme directory, saved as gulpfile.js
/*
This is taken directly from here and modified to fit our needs: https://developer.wordpress.org/themes/basics/including-css-javascript/
*/
function add_that_css_and_js() {
wp_enqueue_style( 'enqueue-that-css', get_template_directory_uri() . '/css/main.css', array(), '1.0', 'all');
wp_enqueue_script( 'enqueue-that-js', get_template_directory_uri() . '/js/min/main.min.js', array ( 'jquery' ), 1.0, true);
@soulreverie
soulreverie / wp-increase-timeout.php
Created October 18, 2019 13:11 — forked from sudar/wp-increase-timeout.php
Increase the curl timeout in WordPress
<?php
Copied from http://fatlabmusic.com/blog/2009/08/12/how-to-fix-wp-http-error-name-lookup-timed-out/
//adjustments to wp-includes/http.php timeout values to workaround slow server responses
add_filter('http_request_args', 'bal_http_request_args', 100, 1);
function bal_http_request_args($r) //called on line 237
{
$r['timeout'] = 15;
return $r;
}
// detect IE
var IEversion = detectIE();
if (IEversion !== false) {
// document.getElementById('result').innerHTML = 'IE ' + IEversion;
document.getElementsByTagName("body")[0].classList.add("ie");
document.getElementsByTagName("body")[0].classList.add("ie" + IEversion);
} else {
// document.getElementById('result').innerHTML = 'NOT IE';
}
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your