How do I verify a user is_admin()
in a wordpress plugin file that looks similar to this:
// Load WP core
define( 'WP_USE_THEMES', false );
require( '../../../wp-load.php' );
if (is_admin()) {
header('Content-Type: application/pdf');
echo base64_decode($pdf_data);
}
Basically, a user will go to a php file within the plugin and if they are logged in as Admin, they get to see the pdf data. If they are not logged in, they don't see anything.