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 mixin can be used in any sass template to easily deploy | |
// consistent gradients quickly. Just change the values of $start | |
// and $end to the colors you want your gradient to travel between. | |
// You can pass different colors when calling the mixin like this: | |
// > @include grad(#279333,#192566) | |
// Better still you can define color variables and do it like this | |
// > $yellow = #f30; |
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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: php-fastcgi | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the php-fastcgi web server | |
# Description: starts php-fastcgi using start-stop-daemon |
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
/** | |
* Get all meta keys for given object. | |
* | |
* Finds all custom meta keys for a given post and extracts them to an array for easy access. | |
* @example $meta = den_get_meta; | |
* @example echo ($meta['my-key'] ? $meta['my-key'] : null ); | |
* @return array of meta keys for post | |
* @author Darin Cassler | |
* @package den_framework | |
* @subpackage den_custom_hooks |
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 Widget_Recent_Posts_Xtra extends WP_Widget { | |
// name this widget. | |
// naming this widget allows us to use filters for unique widget areas. | |
var $namespace = "xtra-recent-posts-widget"; | |
function __construct() { | |
$widget_ops = array('classname' => 'widget_recent_entries', 'description' => __( "The most recent posts on your site") ); | |
parent::__construct('recent-posts', __('Custom Recent Posts'), $widget_ops); |
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 function den_page_title() { | |
$post = $posts[0]; // Hack. Set $post so that the_date() works. | |
/* If this is a category archive */ | |
if (is_category()) { | |
echo '<h1>Archive for the ‘' . single_cat_title() . '’ Category</h1>'; | |
} elseif( is_tag() ) { // If is tag archive | |
echo '<h1>Posts Tagged ‘' . single_tag_title(); . '’</h1>'; | |
/* If this is a daily archive */ | |
} elseif (is_day()) { |
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 | |
/** | |
* Return human version of zulu time | |
* | |
* Assumes your post has a stored date meta-key called 'event-date'. This template tag will render the human | |
* readable date. If the meta-key matches the current date, it will instead return 'Today' | |
* | |
* @package den_framework | |
* @subpackage den_calendar |
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 responsive_menu_walker extends Walker_Nav_Menu | |
{ | |
function start_lvl(&$output, $depth) { | |
// update the <li> element | |
$bookmark = 'den-menu-top'; | |
$li_pos = strrpos ( $output, $bookmark ); | |
$output = substr($output, 0, $li_pos+strlen($bookmark)) . " dropdown" . substr($output, $li_pos+strlen($bookmark), strlen($output) - $li_pos); | |
// update the <a> element | |
$bookmark = "<a "; |
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 function order_events_by_date($request){ | |
$dummy_query = new WP_Query(); | |
$dummy_query->parse_query( $request ); | |
if($dummy_query->is_singular()): | |
return $request; | |
elseif(isset($request['post_type']) && $request['post_type'] == 'event'): | |
if(!is_admin()): | |
$request['orderby'] = 'meta_value menu_order title'; | |
$request['meta_key'] = 'event-date'; | |
$request['order'] = 'ASC'; |
OlderNewer