Skip to content

Instantly share code, notes, and snippets.

View pstoute's full-sized avatar

Paul Stoute pstoute

View GitHub Profile
@pstoute
pstoute / fortress-aws-alloy-override.php
Last active July 17, 2023 19:06
Use this plugin as a must use plugin for any Fortress secured site where you are using AWS Alloy to manage your connections with Amazon Buy with Prime buttons.
<?php
/**
* Plugin Name: GridPane Fortress - Skip the check for a session being in sudo-mode for AWS Alloy connections.
* Description: Companion plugin to the Fortress Security module to whitelist AWS Alloy connections.
* Author: Stoute Web Solutions
* Author URI: https://stoutewebsolutions.com
* Version: 1.0
*/
@pstoute
pstoute / fortress-uabb-gf-override.php
Created June 28, 2023 20:01
This must use plugin gets added to the /wp-content/mu-plugins directory and requires no configuration to allow the fortress 2fa pages to display all by setting the gravity forms force hooks js output to false on pages including /snicco-fortress
<?php
/**
* Plugin Name: GridPane Fortress - UABB Gravity Forms Styler Override
* Description: This must use plugin overrides the Ultimate Addons forced filter to return false on fortress related pages.
* Version: 1.0
* Author: Stoute Web Solutions
* Author URI: https://stoutewebsolutions.com/
* Plugin URI: https://community.gridpane.com/t/ultimate-addons-for-beaver-builder-breaks-fortress-2fa-page-third-party/3333/80
*/
@pstoute
pstoute / fortress-logging.php
Last active June 18, 2023 15:02
Enable logging for Fortress by Snicco. This has not been tested on any hosting environment other than GridPane.
<?php
/**
* Plugin Name: Fortress Logging - Only activate when actively troubleshooting
* Description: Enables a logging of the response event (other actions need to be made in order to have this work since fortress does not expose the response by default.
* Version: 0.0.1
*/
use Snicco\Bundle\HttpRouting\Event\ResponseSent;
add_action(ResponseSent::class, function (ResponseSent $event) {
@pstoute
pstoute / mu-stop-update-emails.php
Last active June 8, 2023 17:38
This snippet is used to prevent the emails that are sent when things are auto updated within WordPress
<?php
/**
* Disable Auto Update Emails
*
* Plugin Name: Disable Auto Update Emails
* Description: Disable the emails that are sent when plugins, themes, and WP Core are auto updated.
* Version: 0.1.0
* Author: Paul Stoute
* Author URI: https://stoute.co
* License: GPL-2.0+
@pstoute
pstoute / fortress-celigo-whitelist.php
Last active June 6, 2023 14:39
Fortress whitelist for Celigo connector IPs
<?php
/**
* Plugin Name: GridPane Fortress - Skip the check for a session being in sudo-mode for Celigo connections.
* Description: Companion plugin to the Fortress Security module to whitelist Celigo connections.
* Author: Company
*
* Version: 1.0',
' */
// This is a replication of the original whitelisted module for ManageWP found here: https://github.com/snicco/fortress/blob/beta/docs/modules/session/sudo-mode.md#skipping-the-sudo-mode-check-for-request-from-managewp
@pstoute
pstoute / fortress-make_com-whitelist.php
Last active June 2, 2023 21:35
fortress-make_com-whitelist.php
<?php
/**
* Plugin Name: GridPane Fortress - Skip the check for a session being in sudo-mode for make.com connections.
* Description: Companion plugin to the Fortress Security module to whitelist make.com connections.
* Author: Company
*
* Version: 1.0
*/
// This is a replication of the original whitelisted module for ManageWP found here: https://github.com/snicco/fortress/blob/beta/docs/modules/session/sudo-mode.md#skipping-the-sudo-mode-check-for-request-from-managewp
@pstoute
pstoute / com.my.delete.screenshots.every.hour.plist
Created May 27, 2022 01:43
PLIST to auto delete screenshots older than 60min and check every hour.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.my.delete.screenshots.every.hour</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
@pstoute
pstoute / wpumbrella-7g-context.conf
Last active September 16, 2024 05:55
Whitelist the WP-Umbrella.com IP address
if ($wpumbrella_ips) {
set $7g_drop_bad_request 0;
set $7g_drop_bad_referer 0;
set $7g_drop_bad_query_string 0;
set $7g_drop_not_allowed_method 0;
set $7g_drop_bad_bot 0;
}
@pstoute
pstoute / oxygen_user_meta.php
Created March 26, 2022 19:53
Add meta user fields via Metabox.io so that Oxygen Builder can pull the field data.
<?php
/**
* Add the fields via Metabox.io
**/
function stoute_user_register_meta_boxes( $meta_boxes ) {
$prefix = 'social_';
$meta_boxes[] = [
'title' => esc_html__( 'Social Media', 'stoute_users' ),
'id' => 'social',
@pstoute
pstoute / webgility-7g-context.conf
Created March 21, 2022 23:33
Add the webgility IP address to your 7G whitelist.
if ($remote_addr ~* "54.69.99.71") {
set $7g_drop_bad_request 0;
set $7g_drop_bad_referer 0;
set $7g_drop_bad_query_string 0;
set $7g_drop_not_allowed_method 0;
set $7g_drop_bad_bot 0;
}