Directory / plugin
FreeMyInternet
v1.0.1 · by Lester Chan
Display a site-wide protest banner or full-screen blackout overlay, with an optional start and end date.
About this plugin
Put a protest notice on your site. Choose between a full-screen blackout that covers the whole site, and a top banner that leaves your content readable, then write your own heading, message, link and colours.
Everything is configured under Settings -> FreeMyInternet. Nothing is shown to visitors until you switch it on.
This plugin was written in June 2013 to support the FreeMyInternet campaign against the Media Development Authority of Singapore’s licensing scheme, and originally displayed that campaign’s banner and nothing else. Since 1.0.0 it is a general-purpose protest and blackout plugin, so it can be used for whatever you are protesting. The initial idea came from xenomancer’s Censor Me.
Features
- Two presentations: full-screen blackout, or a top banner
- Your own heading, message, call-to-action link and colours
- Optional image
- Schedule — set a start and end date and the notice appears and disappears on its own
- Dismissable — an optional close button, remembered per visitor until you change the notice
- Never renders in
wp-adminor on the login screen, so it cannot lock you out - No extra HTTP requests — the few kilobytes of CSS and JavaScript are inlined, and only while a protest is actually running
Donations
I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
Usage
Use the freemyinternet_should_display filter to control where the notice appears — for example, to show it to logged-out visitors only:
add_filter( 'freemyinternet_should_display', function ( $display, $options ) {
return $display && ! is_user_logged_in();
}, 10, 2 );
Use the freemyinternet_capability filter to hand the settings screen to a capability other than manage_options:
add_filter( 'freemyinternet_capability', function ( $capability, $context ) {
return 'edit_pages';
}, 10, 2 );