Skip to content

Instantly share code, notes, and snippets.

@glueckpress
glueckpress / wpseo-iconfix.php
Last active October 2, 2018 23:12 — forked from krafit/wpseo-iconfix.php
[WordPress] Nachdem der Schmerz, den wpSEO-Menüpunkt ansehen zu müssen zu groß wurde, hat @krafit das Icon im Admin-Menü ersetzt. Ich hab’s in ein Plugin gewickelt, Torsten hat’s aktualisiert.
<?php
/**
* Plugin Name: wpSEO Icon Fix
* Description: Admin icon hack for wpSEO.
* Version: 2018.08
* Author: Simon Kraft, Caspar Hübinger, Torsten Landsiedel
* License: GNU General Public License v3
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
@Zodiac1978
Zodiac1978 / genderize.php
Last active September 28, 2015 11:22
Overwrite single translations in WordPress
<?php
/*
Plugin Name: Gender all the things
Description: Gender all the things
Version: 1.0
Author: Torsten Landsiedel
Author URI: http://torstenlandsiedel.de
*/
<?php
function md_filter_curly_double_quotes( $translations, $text, $context, $domain ) {
if ( 'opening curly double quote' == $context && '&#8220;' == $text ) {
$translations = '&#8222;';
} else if ( 'closing curly double quote' == $context && '&#8221;' == $text ) {
$translations = '&#8220;';
}
return $translations;
@zottto
zottto / .htaccess
Last active November 14, 2016 10:48
Passwortschutz für WP-Admin-Bereich
# 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
@thefuxia
thefuxia / t5-page-template-column.php
Last active December 14, 2017 09:04
T5 Page Template Column. Shows the page templates as separate, sortable column.
<?php
/**
* Plugin Name: T5 Page Template Column
* Plugin URI: https://gist.github.com/toscho/f657e323a60f12ad9605
* Description: Shows the page templates as separate, sortable column.
* Version: 2015.02.14
* Required: 4.0
* Author: Thomas Scholz <info@toscho.de>
* Author URI: http://toscho.de
* License: MIT
@neilgee
neilgee / conditional-read-more.php
Last active May 19, 2017 00:39
Genesis Conditional Read More and Force Read More
<?php
//Two functions below to set the read more text conditionally - the 2nd function forces the read more as sometimes it does not appear.
//Read More Text For Excerpt - Set conditionally based on Category slug
add_filter( 'excerpt_more', 'genesischild_read_more_link' );
function genesischild_read_more_link( $more ) {
if( in_category('video') ) {//add in category
return '... <a href="' . get_permalink() . '" class="more-link" title="View More">View More</a>';//change read more text
@Zodiac1978
Zodiac1978 / .htaccess
Last active May 3, 2024 12:11
Safer WordPress with these .htaccess additions
# Don't show errors which contain full path diclosure (FPD)
# Use that line only if PHP is installed as a module and not per CGI
# try using a php.ini in that case.
# Change mod_php5.c to mod_php7.c if you are running PHP7
<IfModule mod_php5.c>
php_flag display_errors Off
</IfModule>
# Don't list directories
<IfModule mod_autoindex.c>
@robneu
robneu / genesis-nav-space-fix.css
Last active May 21, 2018 20:45
Remove unwated space from nav elements on Genesis themes.
/**
* The Default Genesis styles have a bug which causes extra unwanted
* space to display in the nav menu bar elements. This will remove the
* extra space cross-browser. The reason for the strange .001px font size
* is due to a bug on older Andorid devices.
*
* Note: I've used the default Genesis styles here as an example. The only
* actual change is the font-size rule on both selectors.
*
* Reference link: http://css-tricks.com/fighting-the-space-between-inline-block-elements/
@anikalindtner
anikalindtner / gist:9524950
Last active March 1, 2023 11:52
Workshops/Mailinglists/Lists
@Zodiac1978
Zodiac1978 / .htaccess
Last active March 15, 2024 08:29
Make your Website faster - a safe htaccess way
#
# Sources:
# http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites
# http://codex.wordpress.org/Output_Compression
# http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086
# http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/
# http://gtmetrix.com/configure-entity-tags-etags.html
# http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014
# http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress
# https://andreashecht-blog.de/4183/