Skip to content

Instantly share code, notes, and snippets.

Avatar

Caspar Hübinger glueckpress

View GitHub Profile
@mgibbs189
mgibbs189 / functions.php
Created Nov 1, 2016
FacetWP - accessibility support
View functions.php
<?php
add_filter( 'facetwp_assets', function( $assets ) {
$assets['accessibility.js'] = FACETWP_URL . '/assets/js/src/accessibility.js';
return $assets;
});
@bueltge
bueltge / wp-i18n-cheatsheet.md
Last active May 20, 2020
WordPress i18n Cheatsheet
View wp-i18n-cheatsheet.md

WordPress i18n CheatSheet

Whenever I write plugins or themes, there is one thing that needs a little extra attention and is quite frankly hard to get right: Translatable text. This list should helps me to find the right way fast.

Props to Alex Kirk, there list it inside a quiz.

You want to output the username in a sentence.

Assume that the $username has been escaped using esc_html().

@krafit
krafit / wpseo-iconfix.php
Created Dec 2, 2015
Nachdem der Schmerz, den wpSEO-Menüpunkt ansehen zu müssen zu groß wurde, habe ich das Icon im Admin-Menü ersetzt.
View wpseo-iconfix.php
if (function_exists(wpseo_autoload)) {
function krafit_repair_wpseo() {
?>
<style>
#adminmenu #toplevel_page_wpseo div.wp-menu-image img {
display: none;
}
#adminmenu #toplevel_page_wpseo div.wp-menu-image::before {
content: "\f511";
@joehoyle
joehoyle / private-wp-api.php
Created Oct 14, 2015
Only allow access to the API for authenticated requests
View private-wp-api.php
<?php
add_filter( 'rest_pre_dispatch', function() {
if ( ! is_user_logged_in() ) {
return new WP_Error( 'not-logged-in', 'API Requests are only supported for authenticated requests', array( 'status' => 401 ) );
}
} );
@johnbillion
johnbillion / wp_mail.md
Last active May 6, 2020
WordPress Emails
View wp_mail.md

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

View goodbye-wordpress.md

Goodbye, WordPress!

Fast 9 Jahre und nahezu 3 Millionen Downloads später ist Schluss.
Schluss mit WordPress.

Für mich geht ein Lebensabschnitt zu Ende. Ein Lebensabschnitt, der unendlich viel Erfahrung, Learnings und Spaß mit sich brachte. Ein Lebensabschnitt, der aber unendlich viel Zeit, Nerven und Motivation mit sich nahm. Doch der Wille zählt und ich hoffe stark, dass meine Software und mein Engagement die WordPress-Community ein Stückchen besser, qualitativer gemacht haben.

// Bitteschön

View gist:4fa3c4228a8bb53cc71d
INITIALISATION
==============
load wp-config.php
set up default constants
load wp-content/advanced-cache.php if it exists
load wp-content/db.php if it exists
connect to mysql, select db
load object cache (object-cache.php if it exists, or wp-include/cache.php if not)
load wp-content/sunrise.php if it exists (multisite only)
@sergejmueller
sergejmueller / .htaccess
Last active Jun 16, 2016
Stop search engines from indexing .txt, .log, .xml, .css and .js files in Apache
View .htaccess
<FilesMatch "\.(txt|log|xml|css|js)$">
Header set X-Robots-Tag "noindex"
</FilesMatch>
@sergejmueller
sergejmueller / index.html
Created Sep 9, 2014
Prevent animation flickering on CSS3 Transitions/Transforms in Safari
View index.html
<!DOCTYPE html>
<html>
<style>
html {
-webkit-font-smoothing: antialiased;
}
</style>
You can’t perform that action at this time.