Skip to content

Instantly share code, notes, and snippets.

View fabianjaehnke's full-sized avatar

Fabian Jaehnke fabianjaehnke

View GitHub Profile
@fabianjaehnke
fabianjaehnke / functions.php
Last active May 14, 2021 08:34
useful functions for Wordpress functions.php file
<?php
//
// Auto update wordpress core, plugins, themes, translations
//
define( 'AUTOMATIC_UPDATER_DISABLED', true ); //Diasable all
define( 'WP_AUTO_UPDATE_CORE' , true ); //true, false, minor
add_filter( 'auto_update_theme' , '__return_true' );
add_filter( 'auto_update_plugin', '__return_true' );
add_filter( 'auto_update_theme', '__return_true' );
add_filter( 'auto_update_translation', '__return_false' );
if (grandtotalrecord.useCustomRange() == 1)
"Leistungszeitraum: \n" +
grandtotalrecord.customRangeStart() + " - " + grandtotalrecord.customRangeEnd();
else
"";

Keybase proof

I hereby claim:

  • I am fabianjaehnke on github.
  • I am fabianjaehnke (https://keybase.io/fabianjaehnke) on keybase.
  • I have a public key whose fingerprint is 6D99 725F 077B 7473 AC89 B73A 5EE4 3D1B 7C9C 0B3B

To claim this, I am signing this object:

# Apache Server Config | MIT License
# https://gist.github.com/bhubbard/6082577
# Modified from https://github.com/h5bp/server-configs-apaches
# ##############################################################################
# # Default WordPress #
# ##############################################################################
# http://randomtype.ca/blog/the-wordpress-htaccess-file-explained/
# BEGIN WordPress
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
// add ie conditional html5 shim to header
function add_ie_html5_shim () {
echo '<!--[if lt IE 9]>';
echo '<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>';
echo '<![endif]-->';
}
add_action('wp_head', 'add_ie_html5_shim');
@fabianjaehnke
fabianjaehnke / wordpres: browserdetection
Last active August 29, 2015 14:00
wordpress Detect The Visitor’s Browser Using A Hook
<?php
add_filter('body_class','browser_body_class');
function browser_body_class($classes) {
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
if($is_lynx) $classes[] = 'lynx';
elseif($is_gecko) $classes[] = 'gecko';
elseif($is_opera) $classes[] = 'opera';
elseif($is_NS4) $classes[] = 'ns4';
elseif($is_safari) $classes[] = 'safari';
@fabianjaehnke
fabianjaehnke / mediaqueries
Created January 21, 2014 14:53
CSS Media Queries for All Devices
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* STYLES GO HERE */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@fabianjaehnke
fabianjaehnke / reset.css
Created October 2, 2012 14:24
CSS: reset css
/* reset */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td {border:0; font-size:100%; margin:0; padding:0;}
a {outline:none;}
table {border-collapse:collapse; border-spacing:0;}
fieldset,img {border:0;}
img {vertical-align:bottom;}
del,ins {text-decoration:none;}
caption,th {text-align:left;}
h1,h2,h3,h4,h5,h6 {font-size:100%; font-weight:normal;}
q:before,q:after {content:'';}