Skip to content

Instantly share code, notes, and snippets.

@AliceWonderMiscreations
Last active April 25, 2018 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AliceWonderMiscreations/e65bb21f0d6c9c6842f0a535837077ec to your computer and use it in GitHub Desktop.
Save AliceWonderMiscreations/e65bb21f0d6c9c6842f0a535837077ec to your computer and use it in GitHub Desktop.
Basic WP plugin to send RTA (Restricted To Adults) voluntary content label
<?php
declare(strict_types=1);
/**
* Plugin Name: AWM RTA Label
* Plugin URI: https://gist.github.com/AliceWonderMiscreations/e65bb21f0d6c9c6842f0a535837077ec
* Description: Globally enables RTA Label on a WordPress Blog. Enable this plugin, and it is done. Disable plugin to undo.
* Version: 2112
* Author: Alice Wonder Miscreations
* Author URI: https://github.com/AliceWonderMiscreations/
* License: MIT
* Licens URI: https://opensource.org/licenses/MIT
*
* @package AWonderPHP/RTALabel
* @author Alice Wonder <paypal@domblogger.net>
* @license https://opensource.org/licenses/MIT MIT
* @link https://gist.github.com/AliceWonderMiscreations/e65bb21f0d6c9c6842f0a535837077ec
*/
function awm_rta_header() {
header('Rating: RTA-5042-1996-1400-1577-RTA');
}
function awm_rta_meta() {
echo "<meta name=\"RATING\" content=\"RTA-5042-1996-1400-1577-RTA\" />\n";
}
add_action('send_headers', 'awm_rta_header');
add_action('wp_head', 'awm_rta_meta');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment