diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-11-18 13:31:37 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-11-18 13:31:37 +0000 |
| commit | 2b56b90f06b0018f0dba866e2d799cda640d9597 (patch) | |
| tree | 5c7ff6836df5f6a9539847b49738e5665c06e498 /wp-inst/wp-admin/admin-functions.php | |
| parent | 2f31acafe53edd3619b85a16fe1692dee7339a6b (diff) | |
| download | wordpress-mu-2b56b90f06b0018f0dba866e2d799cda640d9597.tar.gz wordpress-mu-2b56b90f06b0018f0dba866e2d799cda640d9597.tar.xz wordpress-mu-2b56b90f06b0018f0dba866e2d799cda640d9597.zip | |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@439 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-admin/admin-functions.php')
| -rw-r--r-- | wp-inst/wp-admin/admin-functions.php | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/wp-inst/wp-admin/admin-functions.php b/wp-inst/wp-admin/admin-functions.php index aea5881..1cf51b5 100644 --- a/wp-inst/wp-admin/admin-functions.php +++ b/wp-inst/wp-admin/admin-functions.php @@ -212,17 +212,37 @@ function get_post_to_edit($id) { // Default post information to use when populating the "Write Post" form. function get_default_post_to_edit() { - global $content, $excerpt, $edited_post_title; + if ( !empty($_REQUEST['post_title']) ) + $post_title = wp_specialchars(stripslashes($_REQUEST['post_title'])); + else if ( !empty($_REQUEST['popuptitle']) ) { + $post_title = wp_specialchars(stripslashes($_REQUEST['popuptitle'])); + $post_title = funky_javascript_fix($post_title); + } else { + $post_title = ''; + } + + if ( !empty($_REQUEST['content']) ) + $post_content = wp_specialchars(stripslashes($_REQUEST['content'])); + else if ( !empty($post_title) ) { + $text = wp_specialchars(stripslashes(urldecode($_REQUEST['text']))); + $text = funky_javascript_fix($text); + $popupurl = wp_specialchars($_REQUEST['popupurl']); + $post_content = '<a href="'.$popupurl.'">'.$post_title.'</a>'."\n$text"; + } + + if ( !empty($_REQUEST['excerpt']) ) + $post_excerpt = wp_specialchars(stripslashes($_REQUEST['excerpt'])); + else + $post_excerpt = ''; $post->post_status = 'draft'; $post->comment_status = get_settings('default_comment_status'); $post->ping_status = get_settings('default_ping_status'); $post->post_pingback = get_settings('default_pingback_flag'); $post->post_category = get_settings('default_category'); - $content = wp_specialchars($content); - $post->post_content = apply_filters('default_content', $content); - $post->post_title = apply_filters('default_title', $edited_post_title); - $post->post_excerpt = apply_filters('default_excerpt', $excerpt); + $post->post_content = apply_filters('default_content', $post_content); + $post->post_title = apply_filters('default_title', $post_title); + $post->post_excerpt = apply_filters('default_excerpt', $post_excerpt); $post->page_template = 'default'; $post->post_parent = 0; $post->menu_order = 0; @@ -984,14 +1004,6 @@ function got_mod_rewrite() { return false; } - if ( function_exists('ob_get_clean') ) { - ob_start(); - phpinfo(INFO_MODULES); - $php_modules = ob_get_clean(); - if ( strpos($php_modules, 'mod_rewrite') === false) - return false; - } - return true; } @@ -1276,7 +1288,7 @@ function add_submenu_page($parent, $page_title, $menu_title, $access_level, $fil } function add_options_page($page_title, $menu_title, $access_level, $file, $function = '') { - return add_submenu_page('options-personal.php', $page_title, $menu_title, $access_level, $file, $function); + return add_submenu_page('options-general.php', $page_title, $menu_title, $access_level, $file, $function); } function add_management_page($page_title, $menu_title, $access_level, $file, $function = '') { |
