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
tell application "iTerm" | |
activate | |
set t to (make new terminal) | |
tell t | |
tell (make new session at the end of sessions) | |
exec command "tail -f /Applications/MAMP/logs/php_error.log" | |
end tell | |
end tell | |
end tell |
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 | |
/** | |
* Iti_Walker_Flag_Parents | |
* Adds a class of 'menu-item-parent' to all WordPress Menu items that have children | |
*/ | |
class Iti_Walker_Flag_Parents extends Walker_Nav_Menu | |
{ | |
function display_element($element, &$children_elements, $max_depth, $depth=0, $args, &$output) | |
{ |
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 | |
function my_attachments( $attachments ) | |
{ | |
$args = array( | |
// title of the meta box (string) | |
'label' => 'My Attachments', | |
// all post types to utilize (string|array) |
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 $attachments = new Attachments( 'attachments' ); ?> | |
<?php if( $attachments->exist() ) : ?> | |
<h3>Attachments</h3> | |
<ul> | |
<?php while( $attachments->get() ) : ?> | |
<li> | |
ID: <?php echo $attachments->id(); ?><br /> | |
Type: <?php echo $attachments->type(); ?><br /> | |
Subtype: <?php echo $attachments->subtype(); ?><br /> | |
URL: <?php echo $attachments->url(); ?><br /> |
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
// snippet referenced in: http://mondaybynoon.com/20130114/css3-pseudo-elements-box-shadows-hidpi-retina-geometric-shapes/ | |
// for project: http://terranovachurch.org | |
.locations .wrapper { | |
height:210px; | |
&:after { | |
// implement the brackets | |
content:' '; |
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 | |
/** | |
* My events have two Custom Fields, one for a start date and one for an end | |
* date. Start dates are required, but end dates are optional. That's because | |
* some events are one day only, while others might span multiple dates | |
* (e.g. conferences). Dates are stored in MySQL format. | |
* | |
* I want to pull events that meet these criteria: | |
* - Event has only a start date, and it's after NOW() |
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
jQuery(document).ready(function($){ | |
if(location.hash){ | |
if($(location.hash)){ | |
setTimeout(function(){ | |
var targetTop = $('#content').offset().top; | |
targetTop -= $('#header').height() + $('#nav').height() - 23; | |
$('body,html').scrollTop(targetTop); |
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 | |
/** | |
* Enable debugging in SearchWP | |
* Messages are logged to searchwp-debug.txt in your uploads folder | |
*/ | |
add_filter( 'searchwp_debug', '__return_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 | |
function myForumIncludeIds( $ids, $engine, $terms ) | |
{ | |
if( $engine != 'my_forum_supplemental_engine' ) | |
return $ids; | |
// set your forum ID | |
$forumID = 900; |
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 | |
function mySearchIncludeIds( $ids, $engine, $terms ) | |
{ | |
// if we're viewing a category page and the SearchWP engine is the default engine | |
if( is_category() && $engine == 'default' ) { | |
$termID = get_queried_object_id(); // determine which category we're viewing | |
// get the IDs of all the posts in this category |