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
/** | |
* Add ipad IOS7 Classes | |
* Allows us to temporariliy try to fix the slight scroll 100% hack. | |
* http://stackoverflow.com/questions/19012135/ios-7-ipad-safari-landscape-innerheight-outerheight-layout-issue | |
*/ | |
if (navigator.userAgent.match(/iPad;.*CPU.*OS 7_\d/i)) { | |
$('html').addClass('ipad ios7'); | |
} | |
/** |
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
# WordPress Project .gitignore | |
# Ignore system files | |
.DS_Store | |
# Ignore all files by default except `.gitignore` and `site` folder | |
/* | |
!/.gitignore | |
!/site/ |
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
var ipad_version = 0; | |
window.ondevicemotion = function(event) { | |
if (navigator.platform.indexOf("iPad") != -1) { | |
ipad_version = 1; | |
if (event.acceleration) ipad_version += window.devicePixelRatio; | |
} | |
window.ondevicemotion = null; | |
get_ipad_version(); | |
} |
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
Index: users2csv.php | |
=================================================================== | |
--- users2csv.php (revision 277117) | |
+++ users2csv.php (working copy) | |
@@ -26,7 +26,7 @@ | |
if ( is_admin() ) { | |
- if ($_GET['page'] == "users2csv.php") { | |
+ if ( isset( $_GET['page'] ) && $_GET['page'] == 'users2csv.php' ) { |
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 | |
/** | |
* Post Order | |
*/ | |
function product_orderby( $query ) { | |
if ( $query->is_main_query() && ( is_post_type_archive( 'custom_post_type_name' ) ) ) { | |
$query->set( 'order', 'ASC' ); | |
$query->set( 'orderby','menu_order' ); | |
} |
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
jQuery(".clickable-block").click(function(){ | |
window.location = jQuery(this).find('a').attr('href'); | |
return false; | |
}); |
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
/** | |
* Multiple Post Thumbnails (plugin compatibility) | |
* http://wordpress.org/extend/plugins/multiple-post-thumbnails/ | |
*/ | |
if ( class_exists( 'MultiPostThumbnails' ) ) { | |
$types = array( 'page' ); | |
foreach ( $types as $type ) { | |
new MultiPostThumbnails( array( | |
'label' => _x( 'Background Image', 'admin', 'mytheme' ), | |
'id' => 'background-image', |
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
Index: users2csv.php | |
=================================================================== | |
--- users2csv.php (revision 277117) | |
+++ users2csv.php (working copy) | |
@@ -26,7 +26,7 @@ | |
if ( is_admin() ) { | |
- if ($_GET['page'] == "users2csv.php") { | |
+ if ( isset( $_GET['page'] ) && $_GET['page'] == 'users2csv.php' ) { |
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
/** | |
* Don't try to show TIFF thumbnails in admin | |
*/ | |
function my_wp_prepare_attachment_for_js( $response, $attachment, $meta ) { | |
if ( is_admin() && $response['type'] == 'image' && in_array( $response['subtype'], array( 'tiff', 'tif' ) ) ) { | |
$response['type'] = 'application'; | |
} | |
return $response; | |
} | |
add_filter( 'wp_prepare_attachment_for_js', 'my_wp_prepare_attachment_for_js', 10, 3 ); |
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 | |
/** | |
* Fix canonical for posts in multiple categories | |
*/ | |
class CanonicalCategoryFix { | |
function CanonicalCategoryFix() { | |
add_filter( 'wpseo_canonical', array( $this, 'canonical_permalink' ) ); | |
add_filter( 'wpsc_change_canonical_url', array( $this, 'canonical_permalink' ) ); |