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
// Thanks to Maykel Loomans | |
// http://miekd.com/articles/sizing-type-leading-and-vertical-dimensions-with-rem-units/ | |
$baseFontSize: 16px; | |
@mixin rem($property, $px_values) { | |
$baseline_rem: ($baseFontSize / 1rem); | |
#{$property}: $px_values; | |
@if type-of($px_values) == 'number' { | |
#{$property}: $px_values / $baseline_rem; | |
} |
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_filter('the_content', 'wpr_google_plusone'); | |
function wpr_google_plusone($content) { | |
$content = $content.'<div class="plusone"><g:plusone size="tall" href="'.get_permalink().'"></g:plusone></div>'; | |
return $content; | |
} | |
add_action ('wp_enqueue_scripts','wpr_google_plusone_script'); | |
function wpr_google_plusone_script() { | |
wp_enqueue_script('google-plusone', 'https://apis.google.com/js/plusone.js', array(), null); | |
} |
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_contactmethods( $contactmethods ) { | |
$contactmethods['twitter'] = 'Twitter'; // Add Twitter | |
$contactmethods['facebook'] = 'Facebook'; // Add Facebook | |
unset($contactmethods['yim']); // Remove YIM | |
unset($contactmethods['aim']); // Remove AIM | |
unset($contactmethods['jabber']); // Remove Jabber | |
return $contactmethods; | |
} | |
add_filter('user_contactmethods','new_contactmethods',10,1); |
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 | |
if ( ! function_exists( 'ucc_add_cpts_to_pre_get_posts' ) ) { | |
function ucc_add_cpts_to_pre_get_posts( $query ) { | |
if ( $query->is_main_query() && ! is_post_type_archive() && ! is_singular() && ! is_404() ) { | |
$my_post_type = get_query_var( 'post_type' ); | |
if ( empty( $my_post_type ) ) { | |
$args = array( | |
'exclude_from_search' => false, | |
'public' => true, |
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 | |
if ( ! function_exists( 'ucc_nav_menu_css_class' ) ) { | |
function ucc_nav_menu_css_class( $classes, $item, $args ) { | |
$class = sanitize_title( $item->title ); | |
$classes[] = 'menu-item-' . $class; | |
return $classes; | |
} } | |
add_filter( 'nav_menu_css_class', 'ucc_nav_menu_css_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
<?php | |
/** | |
* Pretty Print (for debugging) | |
* @param mixed value to print | |
*/ | |
function pp($val = null) { | |
if ( $val === false ) { | |
echo '<pre>(boolean) 0</pre>'; | |
} |
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 | |
/** | |
* Pretty Print (for debugging) | |
* | |
* @param mixed $val The value to print | |
*/ | |
function pp($val = null) { | |
$ret = '<pre>'; |
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 | |
/** | |
* Changes oEmbed defaults dinamically | |
*/ | |
function lr_oembed_defaults($embed_size) { | |
if(is_front_page()) { | |
$embed_size['width'] = 940; | |
$embed_size['height'] = 600; | |
} |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>CSS3 CoverFlow</title> | |
<link rel="stylesheet" href="css/coverflow.css"> |