This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: EggMUP: Register Custom Data Types | |
* Plugin URI: https://gist.github.com/ianpegg/8e5039a2d4eb7ce631e25d93f574768a/ | |
* 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 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Maintenance mode force redirect rules | |
# Note: based on source code from elsewhere, but I've lost the source. | |
# Let me know if you recognise any of this and want attribution! | |
# We don't need to tell everyone we're apache: | |
ServerSignature Off | |
# Set server admin email | |
ServerSignature EMail | |
SetEnv SERVER_ADMIN [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Use X-Forwarded-For HTTP Header to Get Visitor's Real IP Address. | |
* | |
* @link https://wordpress.org/support/topic/where-to-add-the-x-forwarded-for-code-in-wp-config-php/ | |
*/ | |
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { | |
$Arr_http_x_headers = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); | |
$_SERVER['REMOTE_ADDR'] = $Arr_http_x_headers[0]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------------------------------- | |
# Security: Block XMLRPC as it is deprecated | |
# ---------------------------------------------------------------------- | |
<Files xmlrpc.php> | |
Order Allow,Deny | |
Deny from all | |
</Files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------------------------------- | |
# Security: Block access to backup and source files | |
# ---------------------------------------------------------------------- | |
<FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$"> | |
Order allow,deny | |
Deny from all | |
Satisfy All | |
</FilesMatch> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: EggMUP: Remove Blog from WordPress | |
* Plugin URI: https://gist.github.com/ianpegg/011dbee31391f0a049ba46bbbd623bb8 | |
* Description: WordPress started as a blogging platform - but | |
* not every site needs a blog! Note: at the moment, this MUP just hides | |
* post editing and creation in the dashboard as core post types cannot be disabled! | |
* Version: 1.0 | |
* Author: Ian Pegg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################## Uploads directory .htaccess configuration ################# | |
## Prevent code execution and load files from LIVE when in DEV environments ## | |
# BEGIN Uploads directory code execution protection | |
<IfModule mod_php5.c> | |
php_flag engine 0 | |
</IfModule> | |
<IfModule mod_php7.c> | |
php_flag engine 0 |
NewerOlder