Skip to content

Instantly share code, notes, and snippets.

View ahaywood's full-sized avatar

Amy Haywood Dutton ahaywood

View GitHub Profile
@ahaywood
ahaywood / wordpress-hide-editor-on-pages.php
Created March 8, 2017 21:31 — forked from atomtigerzoo/wordpress-hide-editor-on-pages.php
Wordpress: Hide the editor on defined pages
/**
* Hide the main editor on specific pages
*/
define('EDITOR_HIDE_PAGE_TITLES', json_encode(array()));
define('EDITOR_HIDE_PAGE_TEMPLATES', json_encode(array('template-cars.php')));
/**
* Hide the main editor on defined pages
*
@ahaywood
ahaywood / README.md
Created August 26, 2016 03:57
Disable scroll zoom on embedded Google Maps
@ahaywood
ahaywood / .scss-lint.yml
Created August 26, 2016 03:44
YML: Scss Lint config
linters:
Indentation:
enabled: true
allow_non_nested_indentation: false
character: space # or 'tab'
width: 4
Comment:
allowed: '\/\*---(\*(?!\/)|[^*])*\*\/'
@ahaywood
ahaywood / Page Template
Created August 25, 2016 16:24
PHP: WP - Page Template
<?php /*
Template Name: template name
*/ ?>
@ahaywood
ahaywood / wp-config.php
Last active August 9, 2017 11:17
PHP: WP - Config file for working with Multiple Environments in WordPress
<?php
/** Enable W3 Total Cache */
define('WP_CACHE', true); // Added by W3 Total Cache
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
@ahaywood
ahaywood / jquery.before_after.js
Created July 25, 2016 19:15
JS: jQuery Plugin for determining whether a DOM item comes before or after
// REFERENCE: http://stackoverflow.com/questions/7208624/check-if-element-is-before-or-after-another-element-in-jquery
(function($) {
$.fn.isAfter = function(sel){
return this.prevAll().filter(sel).length !== 0;
};
$.fn.isBefore= function(sel){
return this.nextAll().filter(sel).length !== 0;
};
})(jQuery);
@ahaywood
ahaywood / README.md
Last active July 4, 2016 15:20
JS: jQuery Slide and Fade Animation
@ahaywood
ahaywood / wp-config.php
Last active May 29, 2018 01:40
PHP: WP - Config file for working with local-config.php
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
@ahaywood
ahaywood / functions.php
Created February 9, 2016 21:27
PHP: WP - Register Custom Taxonomy
register_taxonomy(
'type_of_staff', // Taxonomy
'staff', // Object Type
array(
'label' => __( 'Type' ),
'rewrite' => array( 'slug' => 'type' ),
'hierarchical' => true, // Is this taxonomy hierarchical like categories or not hierarchical like tags.
)
);
@ahaywood
ahaywood / wp-config.php
Created December 1, 2015 21:20
PHP: WP - Prevent Automatic Updates
/**
* Prevent Wordpress from automatically updating
*/
define( 'AUTOMATIC_UPDATER_DISABLED', true );