This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
<?php | |
add_action( 'init', 'register_cpt_$1' ); | |
function register_cpt_$1() { | |
$labels = array( | |
'name' => _x( '$2s', '$1' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function(grunt) { | |
// load all grunt tasks | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
grunt.initConfig({ | |
// watch for changes and trigger compass, jshint, uglify and livereload | |
watch: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( file_exists( dirname( __FILE__ ) . '/wp-local-config.php' ) ) { | |
include( dirname( __FILE__ ) . '/wp-local-config.php' ); | |
define( 'WP_LOCAL_DEV', true ); // We'll talk about this later | |
} else { | |
define('DB_NAME', 'database_name_here'); | |
define('DB_USER', 'username_here'); | |
define('DB_PASSWORD', 'password_here'); | |
define('DB_HOST', 'localhost'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Accurately returns the height and width of the viewport | |
* much more reliably than simply $(window).height | |
* | |
* Source: http://andylangton.co.uk/blog/development/get-viewport-size-width-and-height-javascript | |
*/ | |
function viewport() { | |
var e = window, a = 'inner'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"font_face": "Ubuntu Mono", | |
"font_options": "subpixel_antialias", | |
"font_size": 16, | |
"highlight_line":true, | |
"line_padding_bottom": 1, | |
"line_padding_top": 1, | |
"rulers": | |
[ | |
80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; This file was auto-generated by drush make | |
core = 7.x | |
api = 2 | |
; Core | |
projects[drupal][version] = "7.34" | |
; Modules | |
projects[views_bulk_operations][version] = "3.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_theme_registry_alter(). | |
*/ | |
function MODULENAME_theme_registry_alter(&$theme_registry) { | |
// Defined path to the current module. | |
$module_path = drupal_get_path('module', 'MODULENAME') . '/templates'; | |
// Find all .tpl.php files in this module's folder recursively. | |
$template_file_objects = drupal_find_theme_templates($theme_registry, '.tpl.php', $module_path); | |
// Iterate through all found template file objects. | |
foreach ($template_file_objects as $key => $template_file_object) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_theme_registry_alter(). | |
*/ | |
function MODULENAME_theme_registry_alter(&$theme_registry) { | |
// Defined path to the current module. | |
$module_path = drupal_get_path('module', 'MODULENAME'); | |
$module_path .= '/templates'; |
OlderNewer