Skip to content

Instantly share code, notes, and snippets.

@elaleprieto
elaleprieto / .htaccess
Created November 29, 2019 23:52 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@elaleprieto
elaleprieto / woocommerce-input-fields-bootstrap-classes.php
Created April 10, 2019 15:33
Add the Bootstrap input classes to all WooCommerce input fields
<?php
function lv2_add_bootstrap_input_classes( $args, $key, $value = null ) {
/* This is not meant to be here, but it serves as a reference
of what is possible to be changed.
$defaults = array(
'type' => 'text',
'label' => '',
'description' => '',
@elaleprieto
elaleprieto / api_cache.php
Created November 11, 2018 22:05 — forked from corbanb/api_cache.php
Simple API caching with PHP
<?php
/**
* API Request Caching
*
* Use server-side caching to store API request's as JSON at a set
* interval, rather than each pageload.
*
* @arg Argument description and usage info
*/