Skip to content

Instantly share code, notes, and snippets.

View stkjj's full-sized avatar
🇰🇪
at home

Stefan Kremer stkjj

🇰🇪
at home
View GitHub Profile
FIND: (\(.*, .*, '_manufacture_country', ')0('\),\n)
REPLACE: \1DE\2
<?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"/>
@stkjj
stkjj / functions.php
Created December 16, 2020 11:35
Load CF7 CSS and JS only on a per need base
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 November 13, 2020 10:00
SQL Befehle nach Umzug von dev auf live System in WP Datenbank um die Domain anzupassen
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');
[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 April 7, 2020 08:50
Browser Cache Optimization
# 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”