Skip to content

Instantly share code, notes, and snippets.

Avatar
🇰🇪
at home

Stefan Kremer stkjj

🇰🇪
at home
View GitHub Profile
@stkjj
stkjj / functions.php
Created Dec 16, 2020
Load CF7 CSS and JS only on a per need base
View functions.php
add_filter( 'wpcf7_load_js', '__return_false' );
add_filter( 'wpcf7_load_css', '__return_false' );
function reregister_cf7_js() {
if ( is_page (array(1,'kontakt'))) {
if (function_exists( 'wpcf7_enqueue_scripts')) {
wpcf7_enqueue_scripts();
}
if (function_exists( 'wpcf7_enqueue_styles')) {
wpcf7_enqueue_styles();
@stkjj
stkjj / search-replace.sql
Created Nov 13, 2020
SQL Befehle nach Umzug von dev auf live System in WP Datenbank um die Domain anzupassen
View search-replace.sql
UPDATE wp_options SET option_value = replace(option_value, 'https://old.tld', 'https://new.tld') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'https://old.tld','https://new.tld');
UPDATE wp_posts SET post_content = replace(post_content, 'https://old.tld', 'https://new.tld');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'https://old.tld', 'https://new.tld');
View CF7 DSGVO Zustimmung
[acceptance DSGVO] Ich habe die <a href="/datenschutz/">Datenschutzerklärung</a> zur Kenntnis genommen. Ich stimme zu, dass meine Angaben und Daten zur Beantwortung meiner Anfrage elektronisch erhoben und gespeichert werden. <br />
Hinweis: Sie können Ihre Einwilligung jederzeit für die Zukunft per E-Mail an E-Mail-Adresse@xyz.de widerrufen. [/acceptance]
[acceptance GDPR] I have taken note of the <a href="/privacy-policy/">Privacy Policy</a>. I agree that my details and data for answering my inquiry will be collected and stored electronically. <br />
Note: You can revoke your consent in future at any time by e-mailing to E-Mail-Adresse@xyz.de. [/acceptance]
@stkjj
stkjj / for_htaccess
Created Apr 7, 2020
Browser Cache Optimization
View for_htaccess
# Optimize cache-control
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault “access plus 1 month”
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
ExpiresByType text/html “access plus 3 days”
ExpiresByType text/xml “access plus 1 seconds”
View projekt26.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<!-- OPML generated by Fever -->
<head><title>Fever // Project26</title></head>
<body>
<outline type="rss" text="Torsten Landsiedel" title="Torsten Landsiedel" xmlUrl="https://torstenlandsiedel.de/tag/projekt26/feed" htmlUrl="https://torstenlandsiedel.de"/>
<outline type="rss" text="Marc Nilius" title="Marc Nilius" xmlUrl="https://www.wp-wartung24.de/tag/projekt26/feed/" htmlUrl="https://www.wp-wartung24.de"/>
<outline type="rss" text="Stefan Kremer" title="Stefan Kremer" xmlUrl="https://nairobi-notes.de/tag/projekt26/" htmlUrl=""/>
<outline type="rss" text="Ralf Wiechers" title="Ralf Wiechers" xmlUrl="https://blog.drivingralle.de/stichwort/projekt26/feed" htmlUrl="https://blog.drivingralle.de"/>
<outline type="rss" text="Thomas Brühl" title="Thomas Brühl" xmlUrl="https://her.ein.de/tag/projekt26/feed" htmlUrl="https://her.ein.de"/>