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
/* | |
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 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'; | |
} |
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
/* Shortcode spam-protected HTML "mailto" | |
* [email] | |
* | |
*/ | |
function iz_email_protection($atts , $content = null ){ | |
if ( ! is_email ($content) ) | |
return; | |
return '<a href="mailto:'.antispambot($content).'">'.antispambot($content).'</a>'; | |
} |
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
html { | |
display: table; | |
height: 100%; | |
width: 100%; | |
text-align: center; | |
} | |
body { | |
display: table-cell; | |
vertical-align: middle; |
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
[class*="col-"] { | |
float: none; | |
display: inline-block; | |
margin: 0 -0.125em; | |
vertical-align: top; | |
} |
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 taxonomies_redirect() { | |
if( is_tax('filter') ) { | |
wp_redirect( home_url('/fotouebersicht/'), 301 ); | |
exit; | |
} | |
} | |
add_action( 'template_redirect', 'taxonomies_redirect' ); | |
*/ |
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
/** | |
* Create a shortcode to insert content of a page of specified ID | |
* | |
* @param array attributes of shortcode | |
* @return string $output Content of page specified, if no page id specified output = null | |
*/ | |
function pa_insertPage($atts, $content = null) { | |
// Default output if no pageid given | |
$output = 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
/* | |
------------------------------------------------------------------------------------------ | |
Clean up output of stylesheet <link> tags | |
------------------------------------------------------------------------------------------ */ | |
function my_clean_style_tag($input) { | |
preg_match_all("!<link rel='stylesheet'\s?(id='[^']+')?\s+href='(.*)' type='text/css' media='(.*)' />!", $input, $matches); | |
// Only display media if it is meaningful | |
$media = $matches[3][0] !== '' && $matches[3][0] !== 'all' ? ' media="' . $matches[3][0] . '"' : ''; | |
return '<link rel="stylesheet" href="' . $matches[2][0] . '"' . $media . '>' . "\n"; | |
} |
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
// Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3. | |
// | |
// This is a hack to fill the gap between 480 and 767 pixels - a missing range | |
// in the bootstrap responsive grid structure. Use these classes to style pages | |
// on cellphones when they transition from portrait to landscape. | |
// | |
// Contains: | |
// Columns, Offsets, Pushes, Pulls for the Mid-Small layout | |
// Visibility classes for the Mid-Small layout | |
// Redefined visibility classes for the Extra Small layout |
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
<script>!function(a,b){"use strict";b.documentElement.className=b.documentElement.className.replace("no-js","js"),("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&(document.documentElement.className=document.documentElement.className.replace("no-touch","touch"))}(window,document);</script> |
NewerOlder