Skip to content

Instantly share code, notes, and snippets.

View pstoute's full-sized avatar

Paul Stoute pstoute

View GitHub Profile
@pstoute
pstoute / stoute-fluentcrm-subscriber-count.php
Last active April 21, 2021 09:03
FluentCRM Subscriber Count Shortcode
<?php
/**
* Plugin Name: FluentCRM Subscriber Count
* Version: 1.0
* Description: Adds a shortcode [fluentcrm_subscriber_count]
*/
function stoute_fcrm_subscriber_count($atts)
{
<?php
// Add this to your plugin or functions.php file. Then you can use the smart code "{stoute_funnels_form_data}" in the form. I use it as a hidden field.
/**
* Add Fluent Forms Custom Smart Code
* Since @1.0.11
**/
add_filter('fluentform_editor_shortcodes', function ($smartCodes) {
$smartCodes[0]['shortcodes']['{stoute_funnels_form_data}'] = 'Funnel Form Data';
return $smartCodes;
@pstoute
pstoute / stoute-funnels.php
Created January 15, 2022 00:47
Add a custom post type to your WordPress site to add the functionality for Funnel Packs as a Post Type. This does require Metabox.io FREE to function but you could replicate the same process using ACF or any other method.
<?php
/**
* Plugin Name: Stoute Funnels
* Description: Adds the custom post type and metabox.io fields for funnelpacks.com funnels. Plugin requires the metabox.io free plugin.
* Version: 1.0.12
* Author: Paul Stoute
* Author URI: https://paulstoute.com
* Text Domain: stoute_funnel
**/
@pstoute
pstoute / betteruptime-7g-context.conf
Last active July 10, 2023 18:37
7G Whitelist for Better Uptime IPs
if ($remote_addr ~* "(23.88.41.31|3.220.166.35|45.33.100.21|45.56.78.139|45.79.47.102|143.42.97.120|143.42.97.213|116.202.157.36|116.202.33.182|142.132.140.32|142.132.140.42|142.132.140.47|142.132.140.77|168.119.90.223|168.119.96.203|54.243.207.163|74.207.228.249|95.216.117.142|139.162.109.252|142.132.140.107|142.132.140.122|172.104.109.161|172.105.169.250|172.105.173.108|172.105.190.118|172.105.206.169|2a01:4f9:2b:1b6e::|2a01:4f8:10b:3d1b::|2a01:4f8:231:2ac9::|2a01:4f8:251:53df::|2a01:4f8:261:1254::|2a01:4f8:261:1257::|2a01:4f8:261:1262::|2a01:4f8:261:1280::|2a01:4f8:261:1296::|2a01:4f8:261:129f::|2a01:4f8:c17:ef62::|2a01:4f8:c010:9ef1::|2400:8902::f03c:92ff:fe47:3951|2400:8902::f03c:92ff:fe47:395f|2400:8902::f03c:92ff:fecd:665e|2400:8907::f03c:92ff:fe47:3955|2400:8907::f03c:92ff:fe47:397a|2400:8907::f03c:92ff:fe47:399e|2600:3c00::f03c:92ff:feaa:0335|2600:3c00::f03c:92ff:feaa:0354|2600:3c02::f03c:92ff:feba:b84a|2600:3c02::f03c:92ff:feba:d761|2a01:7e00::f03c:93ff:fe22:2372|2a01:7e00::f03c:93ff:fe22:23c8)") {
@pstoute
pstoute / managewp-7g-context.conf
Last active March 22, 2022 01:05
7G Whitelist Rules for ManageWP IP addresses
if ($remote_addr ~* "(34.211.180.66|54.70.65.107|34.210.224.7|52.41.5.108|52.35.72.129|54.191.137.17|35.162.254.253|52.11.12.231|52.11.29.70|52.11.54.161|52.24.142.159|52.25.191.255|52.34.126.117|52.34.254.47|52.35.82.99|52.36.28.80|52.39.177.152|52.41.237.12|52.43.13.71|52.43.76.224|52.88.96.110|52.89.155.51|54.187.92.57|54.191.32.65|54.191.67.23|54.191.80.119|54.191.135.209|54.191.136.176|54.191.148.85|54.191.149.8|52.26.122.21|52.24.187.29|52.89.85.107|54.186.128.167|54.191.40.136|52.88.119.122|52.89.94.121|52.25.116.116|52.88.215.225|54.186.143.184|52.88.197.180|52.27.171.126|34.211.178.241|52.24.232.158|52.26.187.210|52.42.189.119|54.186.244.128|54.71.54.102|34.210.35.214|34.213.77.188|34.218.121.176|52.10.190.191|52.10.225.96|52.11.187.168|52.25.139.76|52.43.127.200|54.191.108.9|54.70.201.228|44.224.174.169|52.32.57.81|44.225.177.160|34.223.186.249|44.224.135.238|44.226.111.14|44.225.203.104|44.226.100.122|44.224.250.144|44.225.118.211|54.189.93.69|44.231.184.112|44.238.10.27|54.185.116.30|44.238.58.95|
@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;
}
@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 / wpumbrella-7g-context.conf
Last active November 17, 2023 21:03
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 / 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 / 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