Created
June 21, 2017 18:34
-
-
Save ideag/7c27228411d64edf4b53feb93900845e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== Anarchy === | |
Contributors: ideag | |
Donate link: http://example.com/ | |
Tags: anarchy, map_meta_cap | |
Requires at least: 2.0 | |
Tested up to: 4.8 | |
Stable tag: 1.0.0 | |
License: GPLv2 or later | |
License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
Inspired by John Blackbourn's talk at WordCamp Europe 2017, this plugin utilizes "the most powerful filer in WordPress" to allow any user to EVERYTHING in WP Admin. | |
== Description == | |
WARNING: *This is a joke plugin. Please do not use it in production environment*. | |
Inspired by John Blackbourn's talk at WordCamp Europe 2017, this plugin utilizes "the most powerful filer in WordPress" to allow any user to EVERYTHING in WP Admin. | |
No mater what role the user has, this plugin grants full capabilities to every user. That's the purest form of anarchy in WordPress. | |
== Installation == | |
1. Upload the plugin files to the `/wp-content/plugins/anarchy` directory, or install the plugin through the WordPress plugins screen directly. | |
1. Activate the plugin through the 'Plugins' screen in WordPress | |
== Frequently Asked Questions == | |
= Is this a joke? = | |
Yes, totally. | |
= Should I use it on a real site? = | |
No. Just... no. | |
== Changelog == | |
= 1.0.0 = | |
* This is the first and last version of this plugin, ever. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Anarchy | |
* Description: Enable anarchy in WordPress - allow every user to do EVERYTHING in WP Admin. | |
* Version: 1.0.0 | |
* Author: Arūnas Liuiza | |
* Author URI: https://arunas.co | |
* License: GPL2 | |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
* | |
* @package Anarchy | |
*/ | |
add_filter( 'map_meta_cap', 'anarchy', 9999 ); | |
/** | |
* Allow everything | |
* | |
* @return array required capabilities | |
*/ | |
function anarchy() { | |
return array(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment