Changeset 3127 for trunk/wp-admin/admin-functions.php
- Timestamp:
- 11/17/2005 03:26:24 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/admin-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r3124 r3127 213 213 // Default post information to use when populating the "Write Post" form. 214 214 function get_default_post_to_edit() { 215 global $content, $excerpt, $edited_post_title; 215 if ( !empty($_REQUEST['post_title']) ) 216 $post_title = wp_specialchars(stripslashes($_REQUEST['post_title'])); 217 else if ( !empty($_REQUEST['popuptitle']) ) { 218 $post_title = wp_specialchars(stripslashes($_REQUEST['popuptitle'])); 219 $post_title = funky_javascript_fix($post_title); 220 } else { 221 $post_title = ''; 222 } 223 224 if ( !empty($_REQUEST['content']) ) 225 $post_content = wp_specialchars(stripslashes($_REQUEST['content'])); 226 else if ( !empty($post_title) ) { 227 $text = wp_specialchars(stripslashes(urldecode($_REQUEST['text']))); 228 $text = funky_javascript_fix($text); 229 $popupurl = wp_specialchars($_REQUEST['popupurl']); 230 $post_content = '<a href="'.$popupurl.'">'.$post_title.'</a>'."\n$text"; 231 } 232 233 if ( !empty($_REQUEST['excerpt']) ) 234 $post_excerpt = wp_specialchars(stripslashes($_REQUEST['excerpt'])); 235 else 236 $post_excerpt = ''; 216 237 217 238 $post->post_status = 'draft'; … … 220 241 $post->post_pingback = get_settings('default_pingback_flag'); 221 242 $post->post_category = get_settings('default_category'); 222 $content = wp_specialchars($content); 223 $post->post_content = apply_filters('default_content', $content); 224 $post->post_title = apply_filters('default_title', $edited_post_title); 225 $post->post_excerpt = apply_filters('default_excerpt', $excerpt); 243 $post->post_content = apply_filters('default_content', $post_content); 244 $post->post_title = apply_filters('default_title', $post_title); 245 $post->post_excerpt = apply_filters('default_excerpt', $post_excerpt); 226 246 $post->page_template = 'default'; 227 247 $post->post_parent = 0;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)