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 | |
/** | |
* Check if a value is a number, if it is print it out and keep going, other wise return FALSE | |
* | |
* @param (string) $number | |
* @return (mixed) boolean/$number | |
*/ | |
function is_number($number) { |
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 | |
/** | |
* Display an array in a readable format, preserving the whitespace, | |
* formatting as code, and displaying inside of a Message box. This can | |
* be placed inside of any function within a Drupal module or theme. | |
* This is primarily used during troubleshooting and should never be | |
* used on a production website. | |
* | |
* @param $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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="author" content="" /> | |
<meta name="copyright" content="" /> | |
<meta name="robots" content="index, follow" /> |
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
<!--[if lt IE9]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="description" content="" /> | |
<title></title> | |
<!-- Flash player dependant upon WP Audio Player by Martin Laine --> |
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 | |
/** | |
* Convert a string (e.g., News & Events) into a usable | |
* CSS selector (e.g., id="news-events", class="news-events"). | |
* | |
* @param $text | |
* @return $text | |
*/ | |
function check_selector($text) { |
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
name = "MY MODULE" | |
description = "Custom Views specific to a website" | |
package = "MY WEBSITE" | |
core = 7.x | |
dependencies[] = views |
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 | |
/** | |
* Class SM | |
* | |
* Define a generic wrapper class with some system | |
* wide functionality. In this case we'll give it | |
* the ability to fetch a social media feed from | |
* another server for parsing and possibly caching. | |
* |
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 | |
/** | |
* Implementation of hook_html_head_alter(). | |
*/ | |
function THEMENAME_html_head_alter(&$head_elements) { | |
// Update the charset to use HTML5 format | |
$head_elements['system_meta_content_type'] = array( | |
'#type' => 'html_tag', |
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 | |
/** | |
* Implementation of theme_menu_tree(). | |
*/ | |
function MYTHEME_menu_tree(&$variables) { | |
return '<nav><ul class="menu">' . $variables['tree'] . '</ul></nav>'; | |
} |
OlderNewer