Skip to content

Instantly share code, notes, and snippets.

Marc Nilius zottto

Block or report user

Report or block zottto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zottto
zottto / .htaccess
Created Dec 15, 2017
Default Apache configuration for WordPress performance optimizations
View .htaccess
# Keep-Alive
<IfModule mod_headers.c>
Header set Connection Keep-Alive
</IfModule>
# Compress Transfer
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript application/json application/ld+json \
application/rss+xml application/vnd.ms-fontobject \
@zottto
zottto / wordpress-snippet-remove-login-messages.php
Last active Jan 27, 2017
Ein Snippet, um die Login-Meldungen von WordPress zu vereinheitlichen. In einem Custom Plugin benutzen...
View wordpress-snippet-remove-login-messages.php
<?php
function wp_modify_login_error_incorrect_password($user) {
if ( is_wp_error( $user ) ) {
$error_string = $user->get_error_message();
if ($user->get_error_code() == 'incorrect_password') {
$user = new WP_Error('invalid_username', $error_string);
}
}
return $user;
}
@zottto
zottto / wordpress-custom-plugin-template.php
Created Nov 27, 2015
Use this custom plugin template to add your own code snippets to WordPress. Copy this file into the plugin directory and activate it.
View wordpress-custom-plugin-template.php
<?php
/**
* Plugin Name: Custom Plugin Template
* Description: Add custom tweaks and snippets in this custom plugin.
* Plugin URI: http://www.wp-sicherheit.info/
* Version: 1.0
* Author: Marc Nilius
* Author URI: http://www.wp-sicherheit.info/
* Licence: GPL 2
* License URI: http://opensource.org/licenses/GPL-2.0
@zottto
zottto / .htaccess
Last active Dec 7, 2018
Mehr Sicherheit in WordPress durch .htaccess
View .htaccess
# Beispiel-Codeschnipsel für die WordPress-htaccess-Datei
# https://www.wp-sicherheit.info
# Marc Nilius, info@wp-sicherheit.info
# Mit Material von Zodiac1978, siehe auch https://gist.github.com/Zodiac1978/d25a8f3aebba7cd1c01c
#
# Diese Codeschnipsel gehören in die .htaccess-Datei im Hauptverzeichnis von WordPress
# Jeder einzelne Bestandteil kann einzeln kopiert und genutzt werden.
# Bitte die Verwendungshinweise (Kommentare) an jedem Schnipsel beachten
@zottto
zottto / .htaccess
Last active Nov 14, 2016
Passwortschutz für WP-Admin-Bereich
View .htaccess
# Beispiel-Datei für WP-Passwortschutz
# https://www.wp-sicherheit.info
# Marc Nilius, info@wp-sicherheit.info
# Absicherung der wp-login.php
# Der Zugriff eines nicht-eingeloggten benutzers aucf /wp-admin
# leitet auch auf die wp-login.php weiter, so dass hiermit
# alles abgesichert ist
#
# Den Pfad zur .htpasswd entsprechend anpassen
@zottto
zottto / deactivate-automatic-plugin-updates.php
Last active Aug 29, 2015
WordPress: Deactivate automatic plugin updates
View deactivate-automatic-plugin-updates.php
<?php
/**
* Plugin Name: Deactivate automatic plugin updates
* Description: Deactivates the possibility to automatically update a plugin.
* Plugin URI: http://www.wp-sicherheit.info/
* Version: 1.0
* Author: Marc Nilius
* Author URI: http://www.wp-sicherheit.info/
* Licence: GPL 2
* License URI: http://opensource.org/licenses/GPL-2.0
@zottto
zottto / sessionStorage.js
Created Aug 16, 2012 — forked from tagawa/sessionStorage.js
sessionStorage polyfill
View sessionStorage.js
/*
* Based on: http://www.quirksmode.org/js/cookies.html
* and https://github.com/wojodesign/local-storage-js/blob/master/storage.js
* and https://gist.github.com/350433
* License: http://www.opensource.org/licenses/MIT
*/
(function(window) {
'use strict';
window.sessionStorage = window.sessionStorage || {
You can’t perform that action at this time.