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
function allow_private_parent_pages_nh( $dropdown_args, $post = 0 ) { | |
$dropdown_args['post_status'] = array('publish', 'draft', 'private'); | |
return $dropdown_args; | |
} | |
add_filter('page_attributes_dropdown_pages_args', 'allow_private_parent_pages_nh', 10, 2); | |
add_filter('quick_edit_dropdown_pages_args', 'allow_private_parent_pages_nh', 10, 2); |
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 | |
class FB_Like_Widget extends WP_Widget { | |
private static $scripts_added; | |
public function __construct() { | |
parent::__construct( | |
'fb-like-box-widget', // ID | |
'Facebook Widget ', // Name | |
array( |
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
/** | |
* Archive Template for Posts Page | |
* | |
* This changes the Wordpress template hierarchy to use archive.php for the posts page | |
* | |
* @author Chris Koelle | |
* | |
* @param string $template | |
* @return string | |
*/ |
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
// Cross browser opacity | |
@mixin opacity ( $value: 0.5 ) { | |
opacity: $value; | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=" $value * 100 ")"; | |
filter: alpha(opacity= $value * 100 ); | |
zoom: 1; | |
} | |
// Media Queries | |
@mixin mq($query) { |
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 | |
// Custom Post Type Dropdown | |
function cmb_post_type_dropdown($field, $meta) { | |
wp_dropdown_pages(array( | |
'show_option_none' => '-- Select One ---', | |
'name' => $field['id'], | |
'id' => $field['id'], | |
'post_type' => $field['post_type'], | |
'selected' => $meta | |
)); |
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
function cleanup_post_class( $classes, $class, $post_id ) { | |
foreach($classes as $key => $class): | |
if(preg_match('/(^tag)|(^post)|(hentry)|(uncategorized)|(status)/', $class)) unset($classes[$key]); | |
endforeach; | |
$classes[] = 'post-'.$post_id; | |
return $classes; | |
} | |
add_filter('post_class', 'cleanup_post_class', 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
function new_embed_sizes() { | |
return array( 'width' => 640, 'height' => 9999); | |
} | |
add_filter('embed_defaults', 'new_embed_sizes'); |
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
Array.prototype.shuffle = function() { | |
var i = this.length, j, temp; | |
if ( i === 0 ) return this; | |
while ( --i ) { | |
j = Math.floor( Math.random() * ( i + 1 ) ); | |
temp = this[i]; | |
this[i] = this[j]; | |
this[j] = temp; | |
} | |
return this; |
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
// Cleanup some of the extra menu item classes added to wp_nav_menu | |
function nh_allowed_menu_item_classes($classes, $item) { | |
// Get custom classes added from within the menus admin page | |
$new_classes = (array) get_post_meta( $item->ID, '_menu_item_classes', true ); | |
// Consolidate the assorted "current..." classes | |
$current_classes = preg_grep('/current/', $classes); | |
if(!empty($current_classes)) $new_classes[] = 'current'; |
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
Header set X-UA-Compatible "IE=edge" |
OlderNewer