Make WordPress Core

Changeset 2780


Ignore:
Timestamp:
08/14/2005 06:06:02 PM (20 years ago)
Author:
matt
Message:

Fixes #967, Fixes #972, Fixes #1578, Fixes #1580, Fixes #1567, Fixes #1481, Fixes #1186

Location:
branches/1.5
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/wp-admin/categories.php

    r2446 r2780  
    3535   
    3636    $wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')");
     37    do_action('add_category', $wpdb->insert_id);
    3738   
    3839    header('Location: categories.php?message=1#addcat');
     
    5859    // TODO: Only set categories to general if they're not in another category already
    5960    $wpdb->query("UPDATE $wpdb->post2cat SET category_id='1' WHERE category_id='$cat_ID'");
     61    do_action('delete_category', $cat_ID);
    6062
    6163    header('Location: categories.php?message=2');
  • branches/1.5/wp-admin/edit-page-form.php

    r2412 r2780  
    8686
    8787<p class="submit">
    88   <input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php $post_ID ? _e('Edit Page') :_e('Create New Page') ?> &raquo;" />
    89   <input name="referredby" type="hidden" id="referredby" value="<?php echo $sendto; ?>" />
     88<?php if ( $post_ID ) : ?>
     89<input name="save" type="submit" id="save" tabindex="5" value=" <?php _e('Save and Continue Editing'); ?> "/>
     90<input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php $post_ID ? _e('Edit Page') : _e('Create New Page') ?> &raquo;" />
     91<?php else : ?>
     92<input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php _e('Create New Page') ?> &raquo;" />
     93<?php endif; ?>
     94<input name="referredby" type="hidden" id="referredby" value="<?php echo $sendto; ?>" />
    9095</p>
    9196
    9297<fieldset id="pageoptions">
    93      <legend><?php _e('Page Options') ?></legend> 
     98     <legend><?php _e('Page Options') ?></legend>
    9499<table width="100%" cellspacing="2" cellpadding="5" class="editform">
    95100<?php if ( 0 != count( get_page_templates() ) ) { ?>
  • branches/1.5/wp-admin/post.php

    r2666 r2780  
    196196        do_action('publish_post', $post_ID);
    197197        if ($post_pingback)
    198             pingback($content, $post_ID);
    199         do_enclose( $content, $post_ID );
    200         do_trackbacks($post_ID);
    201        
     198            register_shutdown_function('pingback', $content, $post_ID);
     199        register_shutdown_function('do_enclose', $content, $post_ID );
     200        register_shutdown_function('do_trackbacks', $post_ID);
    202201    }
    203202
     
    435434    if ($post_status == 'publish') {
    436435        do_action('publish_post', $post_ID);
    437         do_trackbacks($post_ID);
    438         do_enclose( $content, $post_ID );
     436        register_shutdown_function('do_trackbacks', $post_ID);
     437        register_shutdown_function('do_enclose', $content, $post_ID );
    439438        if ( get_option('default_pingback_flag') )
    440             pingback($content, $post_ID);
     439            register_shutdown_function('pingback', $content, $post_ID);
    441440    }
    442441
  • branches/1.5/wp-admin/users.php

    r2477 r2780  
    7373    VALUES
    7474        ('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_domain', '$user_browser', '$now', '$new_users_can_blog', 'nickname', '$user_firstname', '$user_lastname', '$user_nicename', '$user_uri')");
    75    
     75
     76    do_action('user_register', $wpdb->insert_id);
     77
    7678    if ($result == false)
    7779        die (__('<strong>ERROR</strong>: Couldn&#8217;t register you!'));
     
    9799    }
    98100
    99     $id = $_GET['id'];
     101    $id = (int) $_GET['id'];
    100102    $prom = $_GET['prom'];
    101103
     
    109111    if ('up' == $prom) {
    110112        $new_level = $usertopromote_level + 1;
    111         $sql="UPDATE $wpdb->users SET user_level=$new_level WHERE ID = $id AND $new_level < $user_level";
     113        $wpdb->query("UPDATE $wpdb->users SET user_level=$new_level WHERE ID = $id AND $new_level < $user_level");
    112114    } elseif ('down' == $prom) {
    113115        $new_level = $usertopromote_level - 1;
    114         $sql="UPDATE $wpdb->users SET user_level=$new_level WHERE ID = $id AND $new_level < $user_level";
    115     }
    116     $result = $wpdb->query($sql);
     116        $wpdb->query("UPDATE $wpdb->users SET user_level=$new_level WHERE ID = $id AND $new_level < $user_level");
     117    }
    117118
    118119    header('Location: users.php');
  • branches/1.5/wp-includes/pluggable-functions.php

    r2607 r2780  
    217217    }
    218218
     219    $notify_message = apply_filters('comment_notification_text', $notify_message);
     220    $subject = apply_filters('comment_notification_subject', $subject);
     221    $message_headers = apply_filters('comment_notification_headers', $message_headers);
     222
    219223    $message_headers = "MIME-Version: 1.0\n"
    220224        . "$from\n"
     
    241245    $comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
    242246    $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
    243     $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID='$post->post_author' LIMIT 1");
    244247
    245248    $comment_author_domain = gethostbyaddr($comment->comment_author_IP);
     
    261264    $admin_email = get_settings("admin_email");
    262265
     266    $notify_message = apply_filters('comment_moderation_text', $notify_message);
     267    $subject = apply_filters('comment_moderation_subject', $subject);
     268
    263269    @wp_mail($admin_email, $subject, $notify_message);
    264270   
  • branches/1.5/wp-includes/template-functions-category.php

    r2616 r2780  
    263263    }
    264264
     265    $exclusions = apply_filters('list_cats_exclusions', $exclusions);
     266
    265267    if (intval($categories)==0){
    266268        $sort_column = 'cat_'.$sort_column;
  • branches/1.5/wp-includes/version.php

    r2672 r2780  
    33// This just holds the version number, in a separate file so we can bump it without cluttering the SVN
    44
    5 $wp_version = '1.5.1.3';
     5$wp_version = '1.5.2';
    66
    77?>
  • branches/1.5/xmlrpc.php

    r2778 r2780  
    577577
    578578      // FIXME: do we pingback always? pingback($content, $post_ID);
    579       trackback_url_list($content_struct['mt_tb_ping_urls'],$post_ID);
     579      // trackback_url_list($content_struct['mt_tb_ping_urls'],$post_ID);
     580
     581        if ('publish' == $post_status) {
     582            if ($post_pingback) pingback($content, $post_ID);
     583            do_enclose( $content, $post_ID );
     584            do_trackbacks($post_ID);
     585            do_action('publish_post', $post_ID);
     586        } 
    580587
    581588      return strval($post_ID);
     
    661668
    662669      // FIXME: do we pingback always? pingback($content, $post_ID);
    663       trackback_url_list($content_struct['mt_tb_ping_urls'], $post_ID);
     670      // trackback_url_list($content_struct['mt_tb_ping_urls'], $post_ID);
     671        if ('publish' == $post_status) {
     672            if ($post_pingback) pingback($content, $post_ID);
     673            do_enclose( $content, $post_ID );
     674            do_trackbacks($post_ID);
     675            do_action('publish_post', $post_ID);
     676        }   
     677        do_action('edit_post', $post_ID);
    664678
    665679      return true;
Note: See TracChangeset for help on using the changeset viewer.