Skip to content

Instantly share code, notes, and snippets.

View ianpegg's full-sized avatar

Ian Pegg ianpegg

View GitHub Profile
<?php
/**
* Plugin Name: EggMUP: Suppress Site Status Tests
* Plugin URI: https://gist.github.com/ianpegg/cf7317ffbaf0714e1249d6f1deef97e5
* Description: Some site status tests are useful, but some are not.
* Version: 1.0.1
* Author: Ian Pegg
* Author URI: https://eggcupwebdesign.com
* Some site status report on matters that are not important, e.g.
* automatic updates being disabled when the site is under version control.
@ianpegg
ianpegg / modify-data-types.inc.php
Created January 11, 2024 13:22
Functions that allow the modification of built-in data types.
<?php
/**
* Plugin Name: EggMUP: Modify Built-in Data Types
* Plugin URI: https://gist.github.com/ianpegg/
* Description: Functions that allow the modification of built-in data types.
* Version: 1.0.0
* Author: Ian Pegg
* Author URI: https://eggcupwebdesign.com
* php version 7.4.15
@ianpegg
ianpegg / utilities.inc.php
Last active January 10, 2024 18:30
Provides utilities for DEV and STAGING sites.
<?php
/**
* Plugin Name: EggMUP: Utilities
* Plugin URI: https://gist.github.com/ianpegg/b92324d6e1e1078bd47da0f27e300bf3
* Description: Provides utilities for DEV and STAGING sites.
* Version: 1.0.0
* Author: Ian Pegg
* Author URI: https://eggcupwebdesign.com
* Use this statement to include this library in other scripts
@ianpegg
ianpegg / contact-form.html
Last active December 7, 2023 17:21
HTML & shortcodes for Contact Form 7 form, using WordPress FSE styles.
<div class="form-group">
<label for="your-name" class="control-label required">Name</label>
[text* your-name autocomplete:name minlength:5 maxlength:70 id:your-name class:form-control]
</div>
<div class="form-group">
<label for="your-email" class="control-label required">Email</label>
[email* your-email autocomplete:email minlength:6 maxlength:254 id:your-email class:form-control]
</div>
<?php
/**
* Plugin Name: EggMUP: SEO Tools
* Plugin URI: https://gist.github.com/ianpegg/29d16c74fea470046c1dacb4f9dd3fb9
* Description: Tools for SEO tweaks.
* Version: 1.0.0
* Author: Ian Pegg
* Author URI: https://eggcupwebdesign.com
* php version 7.4.15
@ianpegg
ianpegg / .htaccess
Last active October 10, 2023 12:16
cPanel Web Root Rewrite: rewrite all traffic to go via 'web' directory
# ----------------------------------------------------------------------
# Rewrite all traffic to go via 'web' directory (Bedrock requirement)
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
# Adapted from: https://www.siteground.com/kb/how_to_change_my_document_root_folder_using_an_htaccess_file/
RewriteCond %{HTTP_HOST} ^example.(org.uk|test)$ [NC,OR]
RewriteCond %{HTTP_HOST} ^(staging|www).example.(org.uk|test)$
RewriteCond %{REQUEST_URI} !web/
RewriteRule (.*) /web/$1 [L]
@ianpegg
ianpegg / custom-data-types.inc.php
Last active September 25, 2023 16:43
EggMUP that registers a demo Custom Post Type and Custom Taxonomy. Edit the arrays to create your own, then drop into your mu-plugins directory.
<?php
/**
* Plugin Name: EggMUP: Register Custom Data Types
* Plugin URI: https://gist.github.com/ianpegg/
* Description: Defines and registers custom post types and custom taxonomies.
* Version: 1.0.0
* Author: Ian Pegg
* Author URI: https://eggcupwebdesign.com
* php version 8.0.28
*
@ianpegg
ianpegg / composer.json
Created September 23, 2023 12:31
Custom WordPress Composer configuration boilerplate.
{
"name": "eggcup-web-design/wordpress-boilerplate",
"type": "project",
"license": "MIT",
"description": "Custom WordPress Composer configuration boilerplate.",
"homepage": "https://eggcupwebdesign.com",
"authors": [
{
"name": "Ian Pegg",
"homepage": "https://eggcupwebdesign.com"
@ianpegg
ianpegg / dashboard-setup.inc.php
Last active May 5, 2023 10:41
Modify the WP dashboard - remove dashboard widgets and other furniture we don't need.
<?php
/**
* Plugin Name: EggMUP: WP Admin Dashboard Setup
* Plugin URI: https://gist.github.com/ianpegg/0e3beb746757916d46f636f12b6d6a44
* Description: Modify the WP dashboard - remove dashboard widgets
* and other furniture we don't need.
* Version: 1.1.0
* Author: Ian Pegg
* Author URI: https://eggcupwebdesign.com
@ianpegg
ianpegg / index.php
Last active May 4, 2023 17:54
Intentionally empty index file to prevent directory listing on poorly configured servers.
<?php
/**
* Plugin Name: Empty Index File
* Plugin URI: https://gist.github.com/ianpegg/3a4ac333c3eeaed9309fa5dc6e9fa8c0
* Description: Prevents directory listing on mis-configured servers.
* Version: 1.0.0
* Author: Ian Pegg
* Author URI: https://eggcupwebdesign.com
* php version 7.4.15