Skip to content

Instantly share code, notes, and snippets.

@david-rahrer
david-rahrer / tk-mu-plugins.php
Created June 14, 2025 14:40 — forked from thomaskrakow/tk-mu-plugins.php
WordPress Must Use Plugin which activate Contact Form 7 only on contact page.
<?php
/*
Plugin Name: TK-MU-Plugin
Description:
Author: Thomas Krakow
Version: 1.0
Author URI: https://thomas-krakow.de/it/css-und-javascript-nur-bei-bedarf-auf-wordpress-seiten-einfugen/
*/
$fRequestURI = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH );
# Install dependencies
#
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \
mkdir -p ~/sources/ && \
# Compile against OpenSSL to enable NPN