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
// WP 4.2+ | |
wp_enqueue_script( 'html5shiv', '//cdn.jsdelivr.net/html5shiv/3.7.2/html5shiv.js' ); | |
wp_script_add_data( 'html5shiv', 'conditional', 'lt IE 9' ); | |
wp_enqueue_script( 'respond', get_template_directory_uri() . '/js/respond.min.js' ); | |
wp_script_add_data( 'respond', 'conditional', 'lt IE 9' ); | |
// WP 4.1 | |
wp_enqueue_script( 'html5shiv', '//cdn.jsdelivr.net/html5shiv/3.7.2/html5shiv.js', array(), '3.7.2', false ); | |
add_filter( 'script_loader_tag', function( $tag, $handle ) { |
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
.line-break { | |
/* These are technically the same, but use both */ | |
overflow-wrap: break-word; | |
word-wrap: break-word; | |
-ms-word-break: break-all; | |
/* This is the dangerous one in WebKit, as it breaks things wherever */ | |
word-break: break-all; | |
/* Instead use this non-standard one: */ |
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
var checkTouch = function(){ | |
/* Touch Device Detection */ | |
var isTouchDevice = 'ontouchstart' in document.documentElement; | |
var isTouchDeviceFireFoxBug = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; /* Fixed FireFox Bug */ | |
var isTouch = isTouchDevice || isTouchDeviceFireFoxBug; | |
if( isTouch ) { | |
$('html').addClass('touch'); | |
} else { |
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
.back-to-top { | |
position: fixed; | |
bottom: 18px; | |
right: 50px; | |
color: #282828; | |
-webkit-transition: all .3s ease; | |
transition: all .3s ease; | |
} | |
.back-to-top:hover { | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; |
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
/* | |
By Osvaldas Valutis, www.osvaldas.info | |
Available for use under the MIT License | |
*/ | |
;(function( $, window, document, undefined ) { | |
$.fn.doubleTapToGo = function( params ) { | |
if( !( 'ontouchstart' in window ) && | |
!navigator.msMaxTouchPoints && | |
!navigator.userAgent.toLowerCase().match( /windows phone os 7/i ) ) return false; |
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
/* Shortcode: Aktuelles Jahr | |
* copyright, footer | |
* | |
*/ | |
function iz_aktuelles_jahr() { | |
return date('Y'); | |
} | |
add_shortcode( 'aktuelles_jahr', 'iz_aktuelles_jahr' ); |
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 iz_post_column_register_sortable( $columns ) | |
{ | |
$columns['author'] = 'author'; | |
$columns['categories'] = 'categories'; | |
$columns['tags'] = 'tags'; | |
return $columns; | |
} | |
add_filter("manage_edit-post_sortable_columns", "iz_post_column_register_sortable" ); | |
// add_filter("manage_edit-CPT_SLUG_sortable_columns", "iz_post_column_register_sortable" ); |
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 default_published_wpse_91299() | |
{ | |
global $submenu; | |
// POSTS | |
foreach( $submenu['edit.php'] as $key => $value ) { | |
if( in_array( 'edit.php', $value ) ) { | |
$submenu['edit.php'][ $key ][2] = 'edit.php?post_status=publish&post_type=post'; | |
} | |
} |
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
add_filter('body_class','add_category_to_single'); | |
function add_category_to_single($classes) { | |
if (is_single() ) { | |
global $post; | |
foreach((get_the_category($post->ID)) as $category) { | |
// add category slug to the $classes array | |
$classes[] = $category->category_nicename; | |
} | |
} | |
// return the $classes array |
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
add_action( 'admin_menu', 'default_published_wpse_91299' ); | |
function default_published_wpse_91299() | |
{ | |
global $submenu; | |
// POSTS | |
foreach( $submenu['edit.php'] as $key => $value ) { | |
if( in_array( 'edit.php', $value ) ) { | |
$submenu['edit.php'][ $key ][2] = 'edit.php?post_status=publish&post_type=post'; | |
} |