3 require_once('admin.php');
5 if ( ! current_user_can('edit_posts') )
6 wp_die(__('Cheatin’ uh?'));
9 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
10 <html xmlns="http://www.w3.org/1999/xhtml">
12 <script type="text/javascript">
24 $post = get_default_post_to_edit();
26 $popuptitle = wp_specialchars(stripslashes($popuptitle));
27 $text = wp_specialchars(stripslashes(urldecode($text)));
29 $popuptitle = funky_javascript_fix($popuptitle);
30 $text = funky_javascript_fix($text);
32 $post_title = wp_specialchars($_REQUEST['post_title']);
33 if (!empty($post_title))
34 $post->post_title = stripslashes($post_title);
36 $post->post_title = $popuptitle;
39 $content = wp_specialchars($_REQUEST['content']);
40 $popupurl = clean_url($_REQUEST['popupurl']);
41 if ( !empty($content) ) {
42 $post->post_content = wp_specialchars( stripslashes($_REQUEST['content']) );
44 $post->post_content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text";
47 /* /big funky fixes */
49 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
50 <html xmlns="http://www.w3.org/1999/xhtml">
52 <title><?php bloginfo('name') ?> › Bookmarklet — WordPress</title>
53 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
54 <?php wp_admin_css(); ?>
56 <style type="text/css">
59 #wpbookmarklet textarea,input,select {
61 border-color: #cccccc;
67 #wpbookmarklet .checkbox {
68 background-color: #ffffff;
74 #wpbookmarklet textarea {
75 font-family: Verdana, Geneva, Arial, Helvetica;
79 #wpbookmarklet .wrap {
83 #wpbookmarklet #postdiv {
87 #wpbookmarklet #titlediv {
94 <body id="wpbookmarklet">
96 <h1><?php bloginfo('name') ?></h1>
99 <?php require('edit-form.php'); ?>
101 <?php do_action('admin_footer', ''); ?>