Make WordPress Core


Ignore:
Timestamp:
10/24/2006 03:57:19 AM (19 years ago)
Author:
markjaquith
Message:

Don't assume that TinyMCE exists, and degrade gracefully if it doesn't. fixes #3272

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r4413 r4417  
    288288// Get an existing post and format it for editing.
    289289function get_post_to_edit($id) {
    290     global $richedit;
    291     $richedit = ( 'true' == get_user_option('rich_editing') ) ? true : false;
    292290
    293291    $post = get_post($id);
    294292
    295     $post->post_content = format_to_edit($post->post_content, $richedit);
     293    $post->post_content = format_to_edit($post->post_content, user_can_richedit());
    296294    $post->post_content = apply_filters('content_edit_pre', $post->post_content);
    297295
     
    351349
    352350function get_comment_to_edit($id) {
    353     global $richedit;
    354     $richedit = ( 'true' == get_user_option('rich_editing') ) ? true : false;
    355 
    356351    $comment = get_comment($id);
    357352
    358     $comment->comment_content = format_to_edit($comment->comment_content, $richedit);
     353    $comment->comment_content = format_to_edit($comment->comment_content, user_can_richedit());
    359354    $comment->comment_content = apply_filters('comment_edit_pre', $comment->comment_content);
    360355
Note: See TracChangeset for help on using the changeset viewer.