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
#Where the fuck? | |
wtf() | |
{ | |
if [ -z "$1" ]; then | |
echo -e 'Usage: wtf [regex] ([path])' | |
else | |
if [ -z "$2" ]; then | |
baseDir="." | |
else | |
baseDir="$2" |
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 | |
/** | |
* Plugin Name: Theme Asset Versioning | |
*/ | |
/** | |
* Returns a versioned file name based on the last modified file date | |
* | |
* @param string $fileUrl Pointing to the file as would have been from the html | |
* @return string a versioned filename |
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 echo $this->partial('header'); ?> | |
<body <?php body_class('layout-'.$this->layout); ?>> | |
<header class="container_16 clearfix" role="banner"> | |
<div class="grid_3"><h1 class="ir siteTitle"><a href="/"><?php echo bloginfo('name'); ?></a></h1> | |
</div> | |
<div class="grid_9"> | |
<?php echo $this->partial('menu', 'utility'); ?> | |
</div> | |
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
G̸̡͉̙̫̻̺̝͉̣̩͕͍̓͑̈̒̆̀ͅlitcȟ̚̕ ̍͒͏" |
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
<h2>Leave a comment</h2> | |
<?php | |
comment_form(array('comment_notes_after'=>'', 'title_reply' => '')); | |
echo $this->partial('list', 'comments'); |
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 | |
/** | |
* Limits an excerpt to the given number of characters | |
* @param integer $limit in words | |
* @param boolean $allowUnfilteredManualExcerpt Gives the manual excerpt priority | |
* @return string | |
*/ | |
function getTheLimitedExcerpt($limit = 30, $allowUnfilteredManualExcerpt = false) | |
{ | |
global $post; |
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 | |
require_once __DIR__ .'/library/Skellie/Frame.php'; | |
use Skellie\Frame; | |
/** | |
* Takes over the rendering process and uses layouts instead | |
* @param string $templateFile | |
* @return null | |
*/ | |
add_filter('template_include', function ($templateFile) { | |
$frame = new Frame($templateFile); |
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 | |
query_posts(array( | |
'posts_per_page' => $this->limit?:10, | |
'category_name' => $this->categorySlug, | |
'paged' => get_query_var('paged') | |
)); | |
if (have_posts()) {?> | |
<section class="categoryList"> | |
<header><h2><?php echo $this->title?:'Archive'; ?></h2></header> |
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 | |
$params = array( | |
'categorySlug' => 'news', | |
'limit' => 7 | |
); | |
echo $this->partial('list', 'category', $params); ?> |
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
tabfix() | |
{ | |
if [ -z "$1" ]; then | |
echo -e 'Usage: tabfix [path]' | |
else | |
baseDir="$1" | |
find "$baseDir" -name "*.php" |while read line | |
do | |
expand -t 4 -i $line > $line.new | |
mv $line.new $line |
OlderNewer