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
# This file lists which files should not be pushed by WPE DevKit. Feel free to | |
# add, remove, or comment lines to change the sync behavior, but note that this | |
# file will be recreated with the default values if it is missing. There are a | |
# few additional files, including wp-config.php, which are ignored no matter | |
# what as synchronizing these files would almost certainly result in an unusable | |
# install. | |
# Temporary and OS files | |
*~ | |
.DS_Store |
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
sudo xattr -rd com.apple.quarantine {file path} |
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 | |
// Cleans up and shortens text | |
// for creating excerpt when custom excerpts aren't available | |
// Wrapper around wp_trim_words with added shortcode removal | |
function proper_make_excerpt($content, $count = 50, $more = '…'){ | |
// remove shortcodes first so we don't include them in our count | |
$content = strip_shortcodes( $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
// lets us know if the current post is available in the current locale | |
function proper_is_translated($id = 0){ | |
global $post; | |
if($id == 0){ | |
$context = $post->ID; | |
}else{ | |
$context = $id; | |
} |
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
$(document).ready(function(){ | |
// GO! | |
}); |
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
echo '<pre>'; | |
echo $array; | |
echo '</pre>'; |
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
// Use wherever a fixed position is declared to adjust for that pesky WP admin bar. | |
@mixin wp-admin-bump{ | |
.admin-bar & { | |
margin-top: 46px; | |
@media screen and (min-width: 782px){ | |
margin-top: 32px; | |
} | |
} | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 (is_tax() ) : | |
$single_tax_term = get_queried_object(); | |
echo $single_tax_term->name; | |
endif; |
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
/** | |
* Display a list of upcoming events with Event Organiser without repeating instances of recurring events | |
**/ | |
//Get upcoming events for the next 6 months | |
$events = eo_get_events(array( | |
'event_start_after'=>'today', | |
'event_end_after' =>'today', | |
'event_start_before' => '+6 month', |
NewerOlder