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
/** | |
* Memory Management for WordPress | |
* Provides different resources based on logged in user or not | |
*/ | |
ini_set( 'memory_limit', '64M' ); // Set to the lowest possible value as this is the default. | |
$logged_in_user = false; | |
if( !empty( $_COOKIE ) ){ // $_COOKIE is super variable is always defined, but often empty | |
foreach ( $_COOKIE as $cookie_name => $cookie_value ) { | |
if ( 0 === strpos( $cookie_name, 'wordpress_logged_in_' ) ) { // Look for if cookie is present for logged in user | |
$logged_in_user = true; |
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: WP PGP Email | |
* Version: 0.1 | |
* Description: Provides mechanism to encrypt outgoing email using PGP | |
* Author: Tim Nash | |
* Author URI: https://timnash.co.uk | |
* Plugin URI: https://timnash.co.uk/wordpress-pgp-email | |
* | |
* |