Skip to content

Instantly share code, notes, and snippets.

@jarno-vos
jarno-vos / rsssl-force-license-field.php
Created September 22, 2026 07:47
rsssl-force-license-field.php
<?php
/**
* Plugin Name: Really Simple Security — Force License field display
* Description: Restores the license field when another plugin hides it. Load this file from wp-content/mu-plugins/.
* Version: 1.0.0
*
* The plugin stylesheet shows the field with:
* .rsssl-license .rsssl-license-field { display: flex; }
* This must-use plugin repeats that rule with !important, and also forces the
* password input itself to stay visible.
@jarno-vos
jarno-vos / rsssl-htaccess-path-fixer.php
Created September 10, 2026 07:41
rsssl-htaccess-path-fixer.php
<?php
/**
* Plugin Name: RSSSL htaccess path fix
* Description: Stop RSSSL from trying /.htaccess when WordPress get_home_path() returns /.
*/
add_filter( 'rsssl_home_htaccess_path', 'rsssl_workaround_htaccess_path' );
add_filter( 'rsssl_htaccess_file_path', 'rsssl_workaround_htaccess_path' );
function rsssl_workaround_htaccess_path( $path ) {
@jarno-vos
jarno-vos / rss-ms-force-deactivate.php
Created September 1, 2026 13:38
rss-ms-force-deactivate.php
<?php
/**
* Plugin Name: RSSSL emergency deactivate Pro Multisite
* Description: Clean advanced-headers, auto_prepend, then deactivate Pro Multisite after a revert to single-site. Delete this file afterwards.
*/
add_action( 'admin_init', static function () {
if ( is_multisite() ) {
return;
}
@jarno-vos
jarno-vos / rss-404-override.php
Created August 31, 2026 11:18
rss-404-override.php - Override the test when homepage 404's were detected
<?php
/**
* Plugin Name: RSS - override to allow 404 blocking (homepage check override)
*/
add_action( 'plugins_loaded', static function () {
if ( get_option( 'rsssl_homepage_contains_404_resources' ) !== 'false' ) {
update_option( 'rsssl_homepage_contains_404_resources', 'false', false );
}
delete_option( 'rsssl_404_resources_to_check' );
}, 1 );
@jarno-vos
jarno-vos / lla-nonce-profile-builder.php
Created August 24, 2026 09:06
Inject LLA nonce to Profile Builder login form
<?php
// Add the Really Simple Security LLA nonce to the Profile Builder login form
add_filter( 'login_form_middle', function( $content ) {
return $content . wp_nonce_field( 'rsssl_login_action', 'rsssl_login_nonce', true, false );
});
@jarno-vos
jarno-vos / metricool-dismiss-notice.php
Created July 27, 2026 06:24
metricool-dismiss-notice.php
<?php
/**
* Plugin Name: Dismiss Metricool Review Notice
* Description: Manually dismisses the Metricool "Leave a review" admin notice.
* Author: Really Simple Plugins
* Version: 1.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
@jarno-vos
jarno-vos / block-ru-registration.php
Created June 29, 2026 06:52
Block .ru domains from account registration on WordPres
<?php
add_filter( 'registration_errors', function ( $errors, $sanitized_user_login, $user_email ) {
if ( preg_match( '/\.ru$/i', $user_email ) ) {
$errors->add(
'blocked_email_domain',
__( 'Registrations with .ru email addresses are not allowed.', 'wordpress' )
);
}
return $errors;
}, 10, 3 );
@jarno-vos
jarno-vos / rsssl-skip-rest-check.php
Created June 24, 2026 07:51
rsssl-skip-rest-check.php
<?php
/**
* Plugin Name: Override RSSSL REST API test result
*/
if ( ! function_exists( 'rsssl_rest_api_accessible_for_logged_out_users' ) ) {
function rsssl_rest_api_accessible_for_logged_out_users(): bool {
return true;
}
}
@jarno-vos
jarno-vos / exclude-wpo-minify.php
Last active June 12, 2026 12:54
exclude-wpo-minify.php
<?php
/**
* Plugin Name: RSSSL exclude WP Optimize minify cache from permission scan
*/
add_filter( 'rsssl_file_scan_exclude_paths', function ( array $excluded_paths ): array {
$excluded_paths[] = 'wp-content/cache/wpo-minify';
return $excluded_paths;
} );
@jarno-vos
jarno-vos / rss-disable-2fa-settings.php
Last active May 8, 2026 12:31
Fully disable all 2FA settings programmatically
<?php
/**
* Plugin Name: RSSSL Emergency Disable 2FA
* Description: Emergency MU plugin to disable RSSSL 2FA paths.
*/
add_action('plugins_loaded', function () {
$is_network_rsssl = is_multisite()
&& function_exists('rsssl_is_networkwide_active')
&& rsssl_is_networkwide_active();