Skip to content

Instantly share code, notes, and snippets.

Avatar

Bernhard Kau 2ndkauboy

View GitHub Profile
View reusable-blocks-management.php
<?php
/**
* Reusable Blocks Management
*
* @package Reusable_Block_Management
* @author Bernhard Kau
* @license GPLv3
*
* @wordpress-plugin
* Plugin Name: Reusable Blocks Management
@2ndkauboy
2ndkauboy / sun-info.sh
Created Jan 8, 2020
Sun Info with PHP
View sun-info.sh
#!/usr/bin/bash
php -r 'setlocale(LC_TIME, "de_DE.UTF-8"); date_default_timezone_set("Europe/Berlin"); print_r(array_map(function($time){ return strftime("%c", $time); }, date_sun_info(time(), 52.3918, 13.1126)));'
View unique-title-checker-across-post-types.php
<?php
/**
* Unique Title Checker Across Post Types
*
* @package unique-title-checker-across-post-types
* @author Bernhard Kau
* @license GPLv3
*
* @wordpress-plugin
* Plugin Name: Unique Title Checker Across Post Types
View unique-title-checker-only-unique-error.php
<?php
/**
* Unique Title Checker Errors Only
*
* @package unique-title-checker
* @author Bernhard Kau
* @license GPLv3
*
* @wordpress-plugin
* Plugin Name: Unique Title Checker Errors Only
View capital_eszett_dangit.php
<?php
/**
* CapitalizeDangit
*
* @package CapitalizeDangit
* @author Bernhard Kau
* @license GPLv3
*
* @wordpress-plugin
* Plugin Name: CapitalizeDangit
View not.css
/********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 — forked from jchristopher/functions.php
Automatically convert permalinks to PDFs in search results to the PDF itself, not the Attachment page
View functions.php
<?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 Oct 16, 2019
MemberPress German Translation
View .gitignore
*
!/memberpress-de_DE.*
@2ndkauboy
2ndkauboy / footer.php
Last active Feb 21, 2016
TwentyFifteen Child-Theme with an additional Footer Menu
View footer.php
@2ndkauboy
2ndkauboy / allow-svg-uploads.php
Created Dec 2, 2015
Enable the users of your blog to upload SVG files
View allow-svg-uploads.php
<?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
*/
You can’t perform that action at this time.