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
<div class="parent"> | |
<div class="generic-child-element"> | |
… | |
</div> | |
<div class="unique-child-element"> | |
<h3 class="title">This Block's Title</h3> | |
</div> | |
<div class="another-child-element"> | |
Some text… | |
</div> |
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
<div class="module"> | |
<div class="image"> | |
<img src="a-cool-cucumber.gif" /> | |
</div> | |
<div class="text"> | |
<h3 class="title">This Block's Title</h3> | |
</div> | |
</div> |
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
div.module { | |
.image { | |
margin: .5em; | |
} | |
img { | |
border: none; | |
} | |
.text { | |
padding: .25em; |
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('intermediate_image_sizes_advanced', function($sizes) { | |
unset( $sizes['thumbnail']); | |
unset( $sizes['medium']); | |
unset( $sizes['large']); | |
return $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
@function strip-unit($value) { | |
@return $value / ($value * 0 + 1); | |
} | |
@mixin flexible_font_sizes( $min-font-size, $max-font-size, $min-width, $max-width ) { | |
$font-size-difference: strip-unit($max-font-size - $min-font-size); | |
$viewport-difference: strip-unit($max-width - $min-width); | |
@media screen and #{breakpoint($min-width)} and #{breakpoint($max-width down)} { |
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 (is_archive() || is_search()) : | |
$url = get_permalink(); | |
if (has_post_thumbnail()) : | |
print '<a href="'.$url.'">'; | |
the_post_thumbnail('thumbnail'); | |
print '</a>'; | |
endif; | |
if ( $post->post_type == 'post' ) print '<div itemprop="blogPost">'; | |
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 | |
add_action( 'after_header', 'namespace_get_header_int', 20 ); | |
function namespace_get_header_int() { | |
if ( !is_front_page() ) { | |
get_header('int'); | |
} | |
} |
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 | |
namespace CLIENT; | |
class Interior { | |
public static function init() { | |
add_action( 'wp', function () { | |
if ( ! is_front_page() ) { | |
self::hook_wordpress(); |
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 | |
/** | |
* is_news_or_post | |
* | |
* A custom boolean check for Hexadite so that we can test if we're on a news or post layout without repeating every single check every time we need to. | |
* | |
* @return bool | |
*/ | |
function is_news_or_post() { |
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
$fpt_options = array(); | |
if ( array_key_exists( $pt_key, $options ) | |
&& is_array( $options[ $pt_key ] ) | |
&& array_key_exists( $post_type, $defaults[ $pt_key ] ) | |
&& is_array( $options[ $pt_key ][ $post_type ] ) | |
) { | |
$fpt_options = $options[ $pt_key ][ $post_type ]; | |
} |