// jQuery
$(document).ready(function() {
// code
})
This file contains hidden or 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
| /* | |
| NOTE!!!! | |
| The most updated version of this code is here: | |
| https://github.com/scottjehl/iOS-Orientationchange-Fix |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Responsive Design Testing</title> | |
| <style> | |
| body { margin: 20px; font-family: sans-serif; overflow-x: scroll; } | |
| .wrapper { width: 6000px; } | |
| .frame { float: left; } | |
| h2 { margin: 0 0 5px 0; } |
This file contains hidden or 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 | |
| /** | |
| * returns a array for use with #options in a form field | |
| * */ | |
| function taxonomy_options_array($machine_name, $all = NULL) { | |
| $v = taxonomy_vocabulary_machine_name_load($machine_name); | |
| if (!empty($all)) { | |
| $options[$all[0]] = $all[1]; | |
| } |
This file contains hidden or 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
| if (typeof (AC) === "undefined") { | |
| AC = {} | |
| } | |
| AC.ImageReplacer = Class.create({ | |
| _defaultOptions: { | |
| listenToSwapView: true, | |
| filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i, | |
| filenameInsert: "_☃x", | |
| ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i, | |
| attribute: "data-hires", |
This file contains hidden or 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
| /** | |
| * Add "first" and "last" CSS classes to dynamic sidebar widgets. Also adds numeric index class for each widget (widget-1, widget-2, etc.) | |
| */ | |
| function widget_first_last_classes($params) { | |
| global $my_widget_num; // Global a counter array | |
| $this_id = $params[0]['id']; // Get the id for the current sidebar we're processing | |
| $arr_registered_widgets = wp_get_sidebars_widgets(); // Get an array of ALL registered widgets | |
| if(!$my_widget_num) {// If the counter array doesn't exist, create it |
This file contains hidden or 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
| name = Problem solver | |
| description = The module that will solve all your drupal problems | |
| package = Problems | |
| version = 1.x | |
| core = 7.x |
This file contains hidden or 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 | |
| /** | |
| * @file | |
| * Re-usable stuff. | |
| * | |
| * @FIXME multifield function seems not to work in included several times in the same page. | |
| */ | |
| /** | |
| * Implements hook_theme() |
This file contains hidden or 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_js_alter(). | |
| * Force every JS file on every_page in the same group, in order to have only one aggregated file, and reduce http requests. | |
| */ | |
| function YOURTHEME_js_alter(&$js) { | |
| foreach($js as $file => $info) { | |
| if ($info['type'] == 'file') { | |
| $js[$file]['every_page'] = TRUE; |
This file contains hidden or 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_drush_command(). | |
| */ | |
| function custom_local_drush_command() { | |
| $items['files-fix-permissions'] = array( | |
| 'description' => 'Fix file permissions', | |
| 'options' => array( | |
| 'owner' => "The name of the user to assign ownership of all files with chown(). Defaults to \$USER.", |