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
// ---- | |
// libsass (v3.0.1) | |
// ---- | |
h1{ | |
font-size: 48px; | |
@media only screen and (max-width: 768px){ | |
font-size: 32px; | |
} | |
@media only screen and (max-width: 480px){ |
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_theme_support( 'typecase', array( | |
// array of simple options | |
'simple' => array( | |
// each array is an option | |
// these options are displayed in the main theme fonts panel section | |
array( | |
// the label displayed in customizer | |
'label' => 'Body Copy', | |
// the CSS selector to apply the font to | |
'selector' => 'body', |
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
// ---- | |
// libsass (v3.1.0-beta) | |
// ---- | |
//BREAKPOINTS | |
$Mobile: 480px; | |
$Landscape: 801px; | |
$Desktop: 1400px; | |
//MEDIA QUERY MIXIN |
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
if(($count % $number) == 0){ | |
//do something | |
} |
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 | |
function posts_columns_id($defaults){ | |
$defaults['wps_post_id'] = __('ID'); | |
return $defaults; | |
}// end posts_columns_id function | |
function posts_custom_id_columns($column_name, $id){ | |
if($column_name === 'wps_post_id'){ | |
echo $id; | |
} | |
}// end posts_custom_id_columns function |
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 $currentTax = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?> |
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 add_nofollow_to_reply_link( $link ) { | |
return str_replace( '")'>', '")' rel='nofollow'>', $link ); | |
} | |
add_filter( 'comment_reply_link', 'add_nofollow_to_reply_link' ); |
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
//start function to add rel attribute to image links | |
function rel_prettyPhoto($link) { | |
global $post; | |
$find ="/<a(.*?)href=('|")(.*?).(bmp|gif|jpeg|jpg|png)('|")(.*?)>/i"; | |
$replace = '<a$1href=$2$3.$4$5 rel="prettyPhoto['. $post->ID .']" $6>'; | |
$link = preg_replace($find, $replace, $link); | |
return $link; | |
} //end function to add rel attribute to image links | |
//add rel attribute function to the content filter |
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
// Register the column | |
function METAKEYHERE_column_register( $columns ) { | |
$columns['METAKEYHERE'] = __( 'COLUMNLABEL', 'POSTTYPE' ); | |
return $columns; | |
} | |
add_filter( 'manage_edit-POSTTYPE_columns', 'METAKEYHERE_column_register' ); | |
// Display the column content | |
function METAKEYHERE_column_display( $column_name, $post_id ) { |
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 ChangeMetaKey($old, $new){ | |
global $wpdb; | |
$wpdb->query( " | |
update $wpdb->postmeta | |
set meta_key = '$new' | |
where meta_key = '$old' | |
"); | |
}//end change metakey |
OlderNewer