diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-06-22 18:31:50 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-06-22 18:31:50 +0000 |
commit | d48e85e0ac5e675ca33fac173f30c75403d1033f (patch) | |
tree | 1164430fa3b83a4d9283961b09c1576f2885e6b2 /wp-admin/bookmarklet.php | |
parent | 086dcde66603301531efc6d8087bd06d0546f148 (diff) | |
download | wordpress-mu-d48e85e0ac5e675ca33fac173f30c75403d1033f.tar.gz wordpress-mu-d48e85e0ac5e675ca33fac173f30c75403d1033f.tar.xz wordpress-mu-d48e85e0ac5e675ca33fac173f30c75403d1033f.zip |
Moved everything in wp-inst down a directory.
Uses's Ryan Boren's htaccess rules and mods
If you're upgrading, try this on a test server first!
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@591 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/bookmarklet.php')
-rw-r--r-- | wp-admin/bookmarklet.php | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/wp-admin/bookmarklet.php b/wp-admin/bookmarklet.php new file mode 100644 index 0000000..4345340 --- /dev/null +++ b/wp-admin/bookmarklet.php @@ -0,0 +1,104 @@ +<?php +$mode = 'bookmarklet'; +require_once('admin.php'); + +if ( ! current_user_can('edit_posts') ) + die ("Cheatin' uh?"); + +if ('b' == $a): +?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<script type="text/javascript"> +<!-- +window.close() +--> +</script> +</head> +<body></body> +</html> +<?php +exit; +endif; + +$post = get_default_post_to_edit(); + +$popuptitle = wp_specialchars(stripslashes($popuptitle)); +$text = wp_specialchars(stripslashes(urldecode($text))); + +$popuptitle = funky_javascript_fix($popuptitle); +$text = funky_javascript_fix($text); + +$post_title = wp_specialchars($_REQUEST['post_title']); +if (!empty($post_title)) + $post->post_title = stripslashes($post_title); +else + $post->post_title = $popuptitle; + + +$content = wp_specialchars($_REQUEST['content']); +$popupurl = wp_specialchars($_REQUEST['popupurl']); + if ( !empty($content) ) { + $post->post_content = wp_specialchars( stripslashes($_REQUEST['content']) ); + } else { + $post->post_content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text"; + } + + /* /big funky fixes */ + +?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title><?php bloginfo('name') ?> › Bookmarklet — WordPress</title> +<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" /> +<link rel="stylesheet" href="wp-admin.css" type="text/css" /> + +<style type="text/css"> +<!-- + +#wpbookmarklet textarea,input,select { + border-width: 1px; + border-color: #cccccc; + border-style: solid; + padding: 2px; + margin: 1px; +} + +#wpbookmarklet .checkbox { + background-color: #ffffff; + border-width: 0px; + padding: 0px; + margin: 0px; +} + +#wpbookmarklet textarea { + font-family: Verdana, Geneva, Arial, Helvetica; + font-size: 0.9em; +} + +#wpbookmarklet .wrap { + border: 0px; +} + +#wpbookmarklet #postdiv { + margin-bottom: 0.5em; +} + +#wpbookmarklet #titlediv { + margin-bottom: 1em; +} + +--> +</style> +</head> +<body id="wpbookmarklet"> +<div id="wphead"> +<h1><?php bloginfo('name') ?></h1> +</div> + +<?php require('edit-form.php'); ?> + +<?php do_action('admin_footer', ''); ?> + +</body> +</html> |