Skip to content

Instantly share code, notes, and snippets.

Avatar
Always interested

Frank Bültge bueltge

Always interested
View GitHub Profile
@bueltge
bueltge / disable-rest-api.php
Last active Apr 30, 2020
Disable WordPress REST API for users, there have not enough rights
View disable-rest-api.php
<?php # -*- coding: utf-8 -*-
declare(strict_types=1);
/**
* Plugin Name: Disable REST API
*/
// Completely disable wp-json access.
add_filter(
'rest_authentication_errors',
function () {
@bueltge
bueltge / gist:757903
Created Dec 28, 2010
This WordPress Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine
View gist:757903
<?php
/*
Plugin Name: HowTo Plugin
Plugin URI:
Description: This Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine
Author: Heiko, Frank
Author URI: http://bueltge.de
Version: 0.1
License:
@bueltge
bueltge / question.md
Created Mar 19, 2020
Rules to use open source solutions?
View question.md

If I create new solutions, libraries then is often my task to search for existing solutions to use them or use them as library to create faster and more solid the goal. The current status is more feeling, a mind set on my side to decide is this repository useful and still active in maintenance. So I look at the project is it a 'one man show' or a lot of committers, an organization. This entirely depends on my priorities and field. The more experimental or niche work my do. Different languages may also exhibit different technical traits here which makes this more or less of a concern. In the end I will have to decide for myself, but a list of helping points is more transparent and supporting my decision.

So I want to create clues and indications (not really rules) to get an easier decision to use or not use this library in my project.

Maybe you had also thought about or you have the same problem.

How you decide about the dependencies in your project?

View remove_admin_bar_gravatar.php
<?php
/**
* Plugin Name: Remove Gravatar on Admin Bar
* Plugin URI: http://talkpress.de/artikel/wordpress-admin-bar-datenkrake-missbrauch
* Description: Remove Gravatar on Admin Bar
* Version: 1.0.0
* Author: Frank Bültge
* Author URI: http://bueltge.de
* License: GPLv3
*/
@bueltge
bueltge / audit-performance.md
Last active Dec 31, 2019
Resources for Audit Performance
View audit-performance.md

Resources

web.dev

Tools (online) for Audit Performance

Webhint

  • webhint is a customizable linting tool that helps you improve your site's accessibility, speed, cross-browser compatibility, and more
  • https://webhint.io/scanner/
@bueltge
bueltge / stick-unstick-admin-bar.php
Created Jul 31, 2012
WordPress Plugin, that add a stick/unstick post link to the admin bar of WordPress.
View stick-unstick-admin-bar.php
<?php
/**
* Plugin Name: Stick/Unstick post via Admin bar
* Plugin URI: http://wordpress.stackexchange.com/q/58818/6035
* Description: Add a stick/unstick post link to the admin bar of WordPress.
* Version: 1.0.0
* Author: Frank Bültge
* Author URI: http://bueltge.de
* License: GPLv3
*/
View gutenberg-whitelist.php
<?php
/**
* Plugin Name: Control Gutenberg blocks.
* Description:
* Plugin URI: https://bueltge.de
* Version: 1.0.0
* Author:
* Author URI:
* Licence: GPLv2+
*/
@bueltge
bueltge / table.css
Created Oct 21, 2019
Simple Responsive Tables with Flexbox
View table.css
/* Default table styles for this demo */
table {
border-collapse: collapse;
text-align: left;
width: 100%;
}
table tr {
background: white;
border-bottom: 1px solid
}
@bueltge
bueltge / http-status-codes-explained.md
Last active Jul 8, 2019
HTTP Status Codes Explained
View http-status-codes-explained.md

HTTP Status Codes Explained

In a Client-Server architecture, you (the Client end) receives various types of responses and to identify each of them, these HTTP Status Codes are divided into various categories. Each status code is a 3 digit number of which, the first digit determines the category and the rest two digits really gives the meaning to these HTTP Status Codes.

@bueltge
bueltge / add-rel-nofollow-checkbox.php
Created Feb 14, 2017 — forked from danielbachhuber/add-rel-nofollow-checkbox.php
Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor
View add-rel-nofollow-checkbox.php
<?php
/**
* Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor
*
* @see https://danielbachhuber.com/tip/rel-nofollow-link-modal/
*/
add_action( 'after_wp_tiny_mce', function(){
?>
<script>