Skip to content

Instantly share code, notes, and snippets.

@jarno-vos
jarno-vos / truncate-csp-list.php
Created August 15, 2025 10:46
truncate-csp-list.php
<?php
/**
* Plugin Name: Truncate Really Simple Security CSP List
* Description: Truncates the rsssl_csp_log table on every page load. Use with caution.
* Author: Really Simple Security
* Version: 1.0
*/
// Prevent direct access
if ( ! defined( 'ABSPATH' ) ) {
<?php
/**
* Delete all legacy options that start with simplybookMePl_
* @example https://example.com/?run_simplybookme_cleanup=1
*/
add_action('init', function () {
// Only run when query param is present
if (!isset($_GET['run_simplybookme_cleanup'])) {
return;
}
@jarno-vos
jarno-vos / remove-redirect-transient.php
Created May 19, 2025 12:08
remove-redirect-transient.php
<?php
// On the action admin_init
add_action('admin_init', function() {
// We remove the transient that redirects to the settings page since it might have persisted due to caching
delete_transient('rsssl_redirect_to_settings_page');
}, 30);
@jarno-vos
jarno-vos / rsssl-email-template-override.php
Created April 30, 2025 07:44
rsssl-email-template-override.php
<?php
/**
* Plugin Name: Really Simple Security - Email 2FA Template Override
* Description: Overrides the email template for Really Simple Security's Two-Factor Authentication.
* Version: 1.1
* Author: Really Simple Plugins
*/
/**
@jarno-vos
jarno-vos / override-auth-cookie-expiration.php
Created March 31, 2025 08:42
override-auth-cookie-expiration.php
@jarno-vos
jarno-vos / exclude-quiz-maker.php
Created March 17, 2025 08:37
exclude-quiz-maker.php
<?php
/**
* Plugin Name: RSSSL - Quiz Maker Exclusion
* Description: Excludes the quiz-maker slug from being reported as vulnerable in Really Simple Security.
* Version: 1.0
* Author: Jarno (Really Simple Plugins)
*/
defined('ABSPATH') or die();
@jarno-vos
jarno-vos / force-ssl-enabled.php
Created March 13, 2025 11:14
force-ssl-enabled.php
<?php
defined('ABSPATH') or die();
add_action('plugins_loaded', 'force_rsssl_ssl_option');
function force_rsssl_ssl_option() {
if (function_exists('rsssl_update_option')) {
rsssl_update_option('ssl_enabled', true);
}
}
@jarno-vos
jarno-vos / log-paths.php
Created December 13, 2024 08:43
log-paths.php
<?php
add_action('init', function() {
if (defined('ABSPATH')) {
error_log('ABSPATH: ' . ABSPATH);
}
if (defined('WP_CONTENT_DIR')) {
error_log('WP_CONTENT_DIR: ' . WP_CONTENT_DIR);
}
});
@jarno-vos
jarno-vos / rsssl-change-path.php
Created December 6, 2024 10:25
rsssl-change-path.php
<?php
/* Get the parent directory of the WordPress installation, and look for the wp-config.php here */
add_filter('rsssl_wpconfig_path', function($path) {
return dirname(ABSPATH) . '/wp-config.php';
});
@jarno-vos
jarno-vos / rsssl-clear-permissions-scan-results.php
Created December 3, 2024 08:25
rsssl-clear-permissions-scan-results.php
<?php
/*
Plugin Name: RSSSL Clear Scan Results
Description: One-time cleanup of RSSSL permissions scan results
Version: 1.0
*/
add_action('admin_init', function() {
delete_option('rsssl_files_with_wrong_permissions');
// Remove this file after a single run