Skip to content

Instantly share code, notes, and snippets.

@colegeissinger
Created October 28, 2013 23:05
Show Gist options
  • Save colegeissinger/7206390 to your computer and use it in GitHub Desktop.
Save colegeissinger/7206390 to your computer and use it in GitHub Desktop.
An example of a popup window's php file within TinyMCE's windowManager
<?php
// Load up WordPress into our iFrame
$absolute_path = __FILE__;
$path_to_file = explode( 'wp-content', $absolute_path );
$path_to_wp = $path_to_file[0];
require_once( $path_to_wp . 'wp-load.php' );
if ( ! is_user_logged_in() || ! current_user_can( 'edit_posts' ) )
wp_die( 'Oops! You can\'t call this page directly.' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
<!-- HTML FORMS HERE -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment