This file contains hidden or 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(!Modernizr.svg) { | |
$('img[src*="svg"]').attr('src', function() { | |
return $(this).attr('src').replace('.svg', '.png'); | |
}); | |
} |
This file contains hidden or 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
/* | |
* Allow Editors to chance theme options and Redux Framework | |
* https://codex.wordpress.org/Roles_and_Capabilities | |
* | |
* | |
*/ | |
// get the the role object | |
$editor = get_role('editor'); |
This file contains hidden or 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
/* http://css-tricks.com/snippets/css/retina-display-media-query/ */ | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2), | |
only screen and ( min--moz-device-pixel-ratio: 2), | |
only screen and ( -o-min-device-pixel-ratio: 2/1), | |
only screen and ( min-device-pixel-ratio: 2), | |
only screen and ( min-resolution: 192dpi), | |
only screen and ( min-resolution: 2dppx) { | |
/* Retina-specific stuff here */ |
This file contains hidden or 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 autogen_featured_img() { | |
global $post; | |
if (!has_post_thumbnail($post->ID)) { | |
$attached_image = | |
get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" ); | |
if ($attached_image) { | |
foreach ($attached_image as $attachment_id => $attachment) { | |
set_post_thumbnail($post->ID, $attachment_id); | |
} |
This file contains hidden or 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
/* Include ReduxFramework | |
* | |
* http://docs.reduxframework.com/redux-framework/advanced/embedding-redux-into-your-theme-or-plugin/ | |
* | |
*/ | |
if ( !class_exists( 'ReduxFramework' ) && file_exists( dirname( __FILE__ ) . '/admin/ReduxFramework/ReduxCore/framework.php' ) ) { | |
// Translate | |
// https://github.com/ReduxFramework/redux-framework/issues/520 | |
load_textdomain( 'redux-framework-demo', dirname( __FILE__ ) . '/languages/' . $locale . '.mo' ); |
This file contains hidden or 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
AddType image/svg+xml svg svgz | |
AddEncoding gzip svgz |
This file contains hidden or 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
$("a").click( function() { | |
$('p').toggle(); | |
}); | |
// oder | |
$("a").on("click", function() { | |
$('p').toggle(); | |
}); |
This file contains hidden or 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
/** | |
* Additional Styles | |
* @since 1.0.0 | |
*/ | |
function child_styles() { | |
if ( !is_admin() ) { | |
// register styles | |
wp_register_style('googlefont-oswald', 'http://fonts.googleapis.com/css?family=Oswald:400,300,700', array(), false, 'all'); |
This file contains hidden or 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="outer"> | |
<article>article | |
<div class="nest-1">nest-1</div> | |
<div class="nest-2">nest-2</div> | |
</article> | |
<aside>aside</aside> | |
</div> |
This file contains hidden or 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="outer"> | |
<article> | |
<div class="nest-1">nest-1</div> | |
<div class="nest-2">nest-2</div> | |
</article> | |
<aside>aside</aside> | |
</div> |