Skip to content

Instantly share code, notes, and snippets.

function iz_mail_from($old) {
return 'EMAIL_ABENDER';
}
function iz_mail_from_name($old) {
return 'NAME_ABSENDER';
}
add_filter('wp_mail_from', 'iz_mail_from');
add_filter('wp_mail_from_name', 'iz_mail_from_name');
html {
display: table;
height: 100%;
width: 100%;
text-align: center;
}
body {
display: table-cell;
vertical-align: middle;
[class*="col-"] {
float: none;
display: inline-block;
margin: 0 -0.125em;
vertical-align: top;
}
@ingozoell
ingozoell / container-border.html
Last active July 29, 2016 14:56
Container Border
<style>
/* === DEMO STYLE =========================================== */
.TEXT_FREISTELLER_BGIMAGE.bg-bild-modul {
background-image: url('http://placehold.it/350x150');
background-repeat: no-repeat;
background-position: center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-ms-background-size: cover;
function no_self_ping( &$links ) {
$home = get_option( 'home' );
foreach ( $links as $l => $link )
if ( 0 === strpos( $link, $home ) )
unset($links[$l]);
}
add_action( 'pre_ping', 'no_self_ping' );
@ingozoell
ingozoell / js_firefox_fix_touch_no_touch.js
Created July 12, 2016 20:01
Firefox Fix: .touch/.no-touch
if( navigator.userAgent.toLowerCase().indexOf('firefox') > -1 ) {
$('html').removeClass('touch');
$('html').addClass('no-touch');
}
@ingozoell
ingozoell / wp_disables_all_core_updates.php
Last active September 27, 2016 21:17
Disables all WP core updates
/* Disables all core updates
* http://make.wordpress.org/core/2013/10/25/the-definitive-guide-to-disabling-auto-updates-in-wordpress-3-7/
*/
define( 'WP_AUTO_UPDATE_CORE', false );
/*
* Disable automatic WordPress Updates
* https://www.siteground.com/tutorials/wordpress/auto-update.htm
*
*/
@ingozoell
ingozoell / wp_cpt_loop.php
Created June 24, 2016 10:04
Wordpress CPT Loop
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); // reset the query ?>
@ingozoell
ingozoell / wp-custom-widget.php
Created June 15, 2016 08:04
WordPress: Custom Widget
add_action('widgets_init', 'create_arbitrary_sidebar');
function create_arbitrary_sidebar(){
register_sidebar(array(
'name' => __('Shortcode Widgets'),
'id' => 'arbitrary',
'description' => sprintf(__('Widgets aus diesem Bereich lassen sich über Shortcodes %1$s oder %2$s in Beiträge/Seiten einfügen.'), '[widget ID]', '[widget Name]'),
'before_widget' => '<div class="block"><div class="block-content block-%2$s clear-block" id="instance-%1$s">',
'after_widget' => '</div></div>',
'before_title' => '<h3 class="title">',
'after_title' => '</h3>'