Skip to content

Instantly share code, notes, and snippets.

View erickolivares's full-sized avatar
🥳

Erick Olivares erickolivares

🥳
View GitHub Profile
function crop_settings_api_init() {
// Add the section to media settings
add_settings_section(
'crop_settings_section',
'Crop images',
'crop_settings_callback_function',
'media'
);
// Add the fields to the new section
add_settings_field(
function crop_settings_api_init() {
// Add the section to media settings
add_settings_section(
'crop_settings_section',
'Crop images',
'crop_settings_callback_function',
'media'
);
// Add the fields to the new section
add_settings_field(
@erickolivares
erickolivares / Saved Content
Created August 3, 2017 20:44
Ingrid White Consulting
<!DOCTYPE html>
<!--[if lt IE 7]><html lang="en-US" class="no-js ie-fix"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html lang="en-US" class="no-js ie-fix"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html lang="en-US" class="no-js ie-fix"><![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-US" class="no-js"><!--<![endif]-->
<head><script type="text/javascript" src="/static/js/analytics.js?v=1500596387.0" charset="utf-8"></script>
jQuery(document).ready(function( $ ) {
var modId = $(".main-content .row > div"); //divs with ID's
var navItems = $(".custom-nav li"); //nav items li
var points = [];
for (var i = 0; i < modId.length; i++) {
var thismod = modId.eq([i]);
var thismodID = thismod.attr("id")

Sentence Case

find:

([A-Z])([A-Z]+)\b

replace:

$1\L$2

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Personal Email</title>
<style>
body{
background-color:#CCCCCC;
// Put this in wp-config.php and replace https://example.com/ with the URL of the production site.
define( 'RH_USE_REMOTE_MEDIA_URL', 'SITE URL' );
// Put the rest of this in functions.php or a custom plugin or somewhere else.
if ( defined( 'RH_USE_REMOTE_MEDIA_URL' ) && ! empty( RH_USE_REMOTE_MEDIA_URL ) ) {
add_filter( 'wp_get_attachment_image_src', 'filter_wp_get_attachment_image_src' );
add_filter( 'wp_calculate_image_srcset', 'filter_wp_calculate_image_srcset' );
add_filter( 'wp_get_attachment_url', 'filter_wp_get_attachment_url' );
}