Skip to content

Instantly share code, notes, and snippets.

@2ndkauboy
2ndkauboy / not.css
Last active October 11, 2016 12:18
:not
/********Link-Klasse****/
a.download-button {
color: #fff !important;
background: #c8504b;
padding: 10px 20px;
border-radius: 2px;
margin: 5px;
}
/****** angewendeter Code auf alle Links, die nicht .fy-button als Klasse haben ***/
@2ndkauboy
2ndkauboy / functions.php
Last active May 30, 2016 13:06 — forked from jchristopher/functions.php
Automatically convert permalinks to PDFs in search results to the PDF itself, not the Attachment page
<?php
// Automatically convert permalinks to PDFs in search results to the PDF itself, not the Attachment page
add_filter( 'the_permalink', function( $permalink ) {
global $post;
if ( is_search() && 'application/pdf' == get_post_mime_type( $post->ID ) ) {
// if the result is a PDF, link directly to the file not the attachment page
$permalink = wp_get_attachment_url( $post->ID );
}
@2ndkauboy
2ndkauboy / .gitignore
Last active October 16, 2019 09:12
MemberPress German Translation
*
!/memberpress-de_DE.*
@2ndkauboy
2ndkauboy / footer.php
Last active February 21, 2016 19:05
TwentyFifteen Child-Theme with an additional Footer Menu
@2ndkauboy
2ndkauboy / allow-svg-uploads.php
Created December 2, 2015 22:34
Enable the users of your blog to upload SVG files
<?php
/**
* Plugin Name: Allow SVG uploads
* Description: Enable the users of your blog to upload SVG files
* Version: 1.0.0
* Author: Bernhard Kau
* Author URI: https://kau-boys.de
* License: GPLv3
* License URI: http://www.gnu.org/licenses/gpl-3.0
*/
@2ndkauboy
2ndkauboy / wp-tag-cloud-tag-number.php
Last active December 8, 2021 16:10
This plugin will limit the number of the shown tags to a custom number
<?php
/**
* Plugin Name: WP Tag Cloud Tag Number
* Description: This plugin will limit the number of the shown tags to a custom number
* Version: 1.0.0
* Author: Bernhard Kau
* Author URI: https://kau-boys.de
* License: GPLv3
* License URI: http://www.gnu.org/licenses/gpl-3.0
*/
@2ndkauboy
2ndkauboy / form_validation_hightlight.js
Last active November 2, 2015 15:37
User friendly form validation feedback
jQuery( document ).ready( function( $ ) {
$( 'form' ).submit( function() {
$( this ).attr( 'data-touched', true );
} );
$( ':submit' ).click( function() {
$( this ).closest( 'form' ).attr( 'data-touched', true );
} );
<?php
/**
* Plugin Name: MailPoet Load Textdomain Fix
* Description: This plugin will deactivate the translation laoding from the MailPoet plugin and load it in the correct was instead, so other plugins that hook into the loading of translations works together with MailPoet
* Version: 1.0
* Author: Bernhard Kau
* Author URI: http://kau-boys.com
* License: GPLv3
* License URI: http://www.gnu.org/licenses/gpl-3.0
@2ndkauboy
2ndkauboy / disable-cachify-on-home-page.php
Created September 4, 2015 15:38
Disable Cachify on home page
<?php
/**
* Plugin Name: Disable Cachify on home page
* Description: This plugin simple disables the caching of the home page with Cachify (see https://wordpress.org/support/topic/exclude-home-page-from-being-cached)
* Author: Bernhard Kau
* Author URI: https://kau-boys.de
*/
add_filter(
'cachify_skip_cache',