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
RewriteEngine On | |
RewriteBase / | |
# redirects subX.subY.domain.com to /-client/subY/subX | |
RewriteCond %{REQUEST_URI} !^/- | |
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.([^\.]+) | |
RewriteCond %{DOCUMENT_ROOT}/-clients/%3/%2 -d | |
RewriteRule ^(.*)$ -clients/%3/%2/$1 [L] | |
# redirects subY.domain.com to /-client/subY/ |
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
(function(d){ | |
dojo.extend(dojo.NodeList, { | |
equalHeight: function(options, data){ | |
var defaults = { | |
height:null, | |
minHeight: 0, | |
maxHeight: null | |
}; | |
options = dojo.mixin(defaults, options); |
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
function wpautop_fix( $content ){ | |
$content = ereg_replace('<p[^>]*>(<img[^>]*>)<\\/p[^>]*>', '\\1', $content); | |
return $content; | |
} | |
add_filter('the_content', 'wpautop_fix'); |
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 | |
ini_set('xdebug.var_display_max_children', 3999 ); | |
ini_set('xdebug.var_display_max_data', 3999 ); | |
ini_set('xdebug.var_display_max_depth', 3999 ); | |
?> |
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
function wp_list_pages_add_first_last($content) { | |
$content = preg_replace('/li class\=\"/', 'li class="first ', $content, 1); | |
$content_rev = strrev($content); | |
$content_rev = preg_replace('/\"\=ssalc il/', ' tsal"=ssalc il', $content_rev, 1); | |
return strrev($content_rev); | |
} | |
add_filter('wp_list_pages','wp_list_pages_add_first_last'); |
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
function add_attr_attachment_link($html){ | |
$attr = array( | |
// array of attributes | |
); | |
$html = str_replace('<a','<a '.join(' ',$attr),$html); | |
return $html; | |
} | |
add_filter('wp_get_attachment_link','add_attr_attachment_link',10,1); |
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
$child_of = 0; | |
if (empty($post->post_parent)){ | |
$child_of = $post->ID; | |
} | |
else { | |
$child_of = $post->post_parent; | |
} | |
// Set defaults | |
$defaults = 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
tar czf new-files.tar.gz `git diff <COMMITIDFROM> <COMMITIDTO> --name-only` |
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
add_filter('query_vars', 'add_queryvars' ); | |
function add_queryvars( $qvars ){ | |
$qvars[] = '_m'; | |
return $qvars; | |
} |
OlderNewer