See http://andymantell.com/blog/2012/07/restricting-items-displayed-drupal-media-library-using-hookqueryalter for associated blog post.
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
$nodes = node_load_multiple(array(1,2,3)); | |
$block['content'] = array( | |
'#theme' => 'item_list', | |
'#items' => node_view_multiple($nodes), | |
); | |
See http://andymantell.com/blog/2012/07/enabling-mollom-protection-forms-install-profile-or-update-hook for associated blog post.
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
on_stylesheet_saved do |filename| | |
system("drush cc css-js") | |
end |
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
#{headings()} { | |
color: red; | |
} |
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
{ | |
"folders": [ | |
{ | |
"path": "www" | |
} | |
], | |
"settings": { | |
"rulers": [120], | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, |
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 | |
/* | |
Plugin Name: Deployment routines | |
Description: Runs update routines allowing code based database updates. | |
Author: Andy Mantell | |
Version: 1.0 | |
*/ | |
add_action('admin_init', 'deployment_admin_init'); |
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 | |
/** | |
* Enable the login form block | |
*/ | |
function foo_update_7097() { | |
_block_rehash('theme_name_here'); | |
db_merge('block') | |
->key(array( |
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
conduct( | |
{ | |
'media_queries': | |
[ | |
{ | |
query: 'max-width: 600px', | |
match: function() { | |
// This code will run when this media query moves from an unmatched state to a matched state | |
}, | |
unmatch: function() { |
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'; | |
var lazy_load_image = require('../plugins/lazy-load-image.js'); | |
var domready = require('detect-dom-ready'); | |
var pubsub = require('pubsub-js'); | |
// @TODO: This should only load images which are visible by default, not things that are inside hidden tabs etc | |
// @TODO: This loop probably belongs inside the plugin, not here | |
// @TODO: Select via data attributes instead of classes assuming IE8 supports this? | |
function process(element) { |
OlderNewer