Make WordPress Core

Changeset 9716


Ignore:
Timestamp:
11/15/2008 06:10:35 PM (15 years ago)
Author:
ryan
Message:

Unused var fixes. Props DD32. see #8220

Location:
trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r9711 r9716  
    161161    $visibility = 'public';
    162162    $visibility_trans = __('Public, Sticky');
    163     $sticky = 'sticky';
    164163} else {
    165164    $visibility = 'public';
  • trunk/wp-admin/edit-link-form.php

    r9703 r9716  
    8888<?php
    8989if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('manage_links') ) { ?>
    90     <a class="submitdelete deletion" href="<?php echo wp_nonce_url("link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id); ?>" onclick="if ( confirm('<?php echo js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete."), $link->link_name )); ?>') ) {return true;}return false;"><?php _e('Delete'); ?></a>
     90    <a class="submitdelete deletion" href="<?php echo wp_nonce_url("link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id); ?>" onclick="if ( confirm('<?php echo js_escape(sprintf(__("You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete."), $link->link_name )); ?>') ) {return true;}return false;"><?php _e('Delete'); ?></a>
    9191<?php } ?>
    9292</div>
  • trunk/wp-admin/import/blogger.php

    r9506 r9716  
    523523
    524524    function import_post( $entry ) {
    525         global $wpdb, $importing_blog;
     525        global $importing_blog;
    526526
    527527        // The old permalink is all Blogger gives us to link comments to their posts.
     
    660660
    661661    function get_user_options($current) {
    662         global $wpdb, $importer_users;
     662        global $importer_users;
    663663        if ( ! isset( $importer_users ) )
    664664            $importer_users = (array) get_users_of_blog();
  • trunk/wp-admin/import/mt.php

    r9369 r9716  
    5656
    5757    function users_form($n) {
    58         global $wpdb, $testing;
     58        global $wpdb;
    5959        $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY ID");
    6060?><select name="userselect[<?php echo $n; ?>]">
     
    102102    //function to check the authorname and do the mapping
    103103    function checkauthor($author) {
    104         global $wpdb;
    105104        //mtnames is an array with the names in the mt import file
    106105        $pass = wp_generate_password();
     
    110109            $user_id = username_exists($this->newauthornames[$this->j]); //check if the new author name defined by the user is a pre-existing wp user
    111110            if (!$user_id) { //banging my head against the desk now.
    112                 if ($newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname
     111                if ($this->newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname
    113112                    $user_id = wp_create_user($author, $pass);
    114113                    $this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank.
  • trunk/wp-admin/includes/dashboard.php

    r9710 r9716  
    354354
    355355function wp_dashboard_recent_drafts( $drafts = false ) {
    356     global $post;
    357356    if ( !$drafts ) {
    358357        $drafts_query = new WP_Query( array(
  • trunk/wp-admin/includes/file.php

    r9699 r9716  
    330330    // You may define your own function and pass the name in $overrides['upload_error_handler']
    331331    $upload_error_handler = 'wp_handle_upload_error';
     332
     333    // You may define your own function and pass the name in $overrides['unique_filename_callback']
     334    $unique_filename_callback = null;
    332335
    333336    // $_POST['action'] must be set and its value must equal $overrides['action'] or this:
  • trunk/wp-admin/includes/media.php

    r9699 r9716  
    263263
    264264    // Save the data
    265     $id = wp_insert_attachment($attachment, $file, $post_parent);
     265    $id = wp_insert_attachment($attachment, $file, $post_id);
    266266    if ( !is_wp_error($id) ) {
    267267        wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
     
    906906
    907907    $edit_post = sanitize_post($post, 'edit');
    908     $file = wp_get_attachment_url($post->ID);
    909     $link = get_attachment_link($post->ID);
    910908
    911909    $form_fields = array(
     
    10201018        return false;
    10211019
    1022     $title_label = __('Title');
    1023     $description_label = __('Description');
    1024     $tags_label = __('Tags');
    1025 
    10261020    $toggle_on = __('Show');
    10271021    $toggle_off = __('Hide');
     
    10311025    $filename = basename($post->guid);
    10321026    $title = attribute_escape($post->post_title);
    1033     $description = attribute_escape($post->post_content);
     1027
    10341028    if ( $_tags = get_the_tags($attachment_id) ) {
    10351029        foreach ( $_tags as $tag )
  • trunk/wp-admin/includes/plugin-install.php

    r9700 r9716  
    2828 */
    2929function plugins_api($action, $args = null) {
    30     global $wp_version;
    3130
    3231    if( is_array($args) )
     
    248247 */
    249248function display_plugins_table($plugins, $page = 1, $totalpages = 1){
    250     global $tab;
    251 
    252249    $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : '';
    253250    $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : '';
     
    675672                            'activate_plugin' => '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" target="_parent">' . __('Activate Plugin') . '</a>',
    676673                            'plugins_page' => '<a href="' . admin_url('plugins.php') . '" title="' . __('Goto plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>'
    677                             ), $plugin_information, $plugin_file);
     674                            ), array(), $plugin_file);
    678675        if ( ! empty($install_actions) )
    679676            show_message('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$install_actions));
  • trunk/wp-admin/includes/post.php

    r9701 r9716  
    770770 */
    771771function wp_edit_posts_query( $q = false ) {
    772     global $wpdb;
    773772    if ( false === $q )
    774773        $q = $_GET;
     
    833832 */
    834833function wp_edit_attachments_query( $q = false ) {
    835     global $wpdb;
    836834    if ( false === $q )
    837835        $q = $_GET;
  • trunk/wp-admin/includes/template.php

    r9715 r9716  
    208208    $hidden = array_intersect( array_keys( $columns ), array_filter( (array) get_user_option( "manage-$type-columns-hidden" ) ) );
    209209    $col_count = count($columns) - count($hidden);
    210     $output = ''; ?>
     210    ?>
    211211
    212212<form method="get" action=""><table style="display: none"><tbody id="inlineedit">
     
    660660    // convert it to table rows
    661661    $out = '';
    662     $class = '';
    663662    $count = 0;
    664663    foreach( $tags as $tag )
     
    18801879    $comment = get_comment( $comment_id );
    18811880    $post = get_post($comment->comment_post_ID);
    1882     $authordata = get_userdata($post->post_author);
    18831881    $the_comment_status = wp_get_comment_status($comment->comment_ID);
    18841882
  • trunk/wp-admin/page.php

    r9620 r9716  
    2323 */
    2424function redirect_page($page_ID) {
     25    global $action;
     26
    2527    $referredby = '';
    2628    if ( !empty($_POST['referredby']) ) {
  • trunk/wp-includes/bookmark.php

    r9699 r9716  
    3030        $_bookmark = $bookmark;
    3131    } else {
    32         if ( isset($GLOBALS['link']) && ($GLOBALS['link']->link_id == $link) ) {
     32        if ( isset($GLOBALS['link']) && ($GLOBALS['link']->link_id == $bookmark) ) {
    3333            $_bookmark = & $GLOBALS['link'];
    3434        } elseif ( ! $_bookmark = wp_cache_get($bookmark, 'bookmark') ) {
  • trunk/wp-includes/cron.php

    r9407 r9716  
    159159 */
    160160function spawn_cron( $local_time ) {
    161     global $current_blog;
    162161
    163162    /*
  • trunk/wp-includes/http.php

    r9575 r9716  
    412412                $chunkLength = strlen( $match[0] );
    413413
    414                 $strBody = substr($body, strlen( $match[0] ), $length);
     414                $strBody = substr($body, $chunkLength, $length);
    415415                $parsedBody .= $strBody;
    416416
  • trunk/wp-includes/pluggable.php

    r9680 r9716  
    15131513    }
    15141514
    1515     if ( 'custom' == $default )
    1516         $default = add_query_arg( 's', $size, $defaults[$avatar_default][1] );
    1517     elseif ( 'mystery' == $default )
     1515    if ( 'mystery' == $default )
    15181516        $default = "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')
    15191517    elseif ( 'blank' == $default )
     
    15251523    elseif ( empty($email) )
    15261524        $default = "http://www.gravatar.com/avatar/?d=$default&amp;s={$size}";
     1525    else
     1526        $default = add_query_arg( 's', $size, $default );
    15271527
    15281528    if ( !empty($email) ) {
  • trunk/wp-includes/plugin.php

    r9611 r9716  
    124124 * @since 0.71
    125125 * @global array $wp_filter Stores all of the filters
    126  * @global array $merge_filters Merges the filter hooks using this function.
     126 * @global array $merged_filters Merges the filter hooks using this function.
    127127 * @global array $wp_current_filter stores the list of current filters with the current one last
    128128 *
     
    220220 */
    221221function remove_all_filters($tag, $priority = false) {
    222     global $wp_filter, $merge_filters;
     222    global $wp_filter, $merged_filters;
    223223
    224224    if( isset($wp_filter[$tag]) ) {
  • trunk/wp-includes/post.php

    r9714 r9716  
    21622162
    21632163    if ( empty($pages) ) {
    2164         $page = apply_filters('get_pages', array(), $r);
     2164        $pages = apply_filters('get_pages', array(), $r);
    21652165        return $pages;
    21662166    }
     
    33233323 */
    33243324function wp_get_post_autosave( $post_id ) {
    3325     global $wpdb;
     3325
    33263326    if ( !$post = get_post( $post_id ) )
    33273327        return false;
  • trunk/wp-includes/theme.php

    r9707 r9716  
    187187        $author_uri = clean_url( trim( $author_uri[1]) );
    188188    else
    189         $author_uti = '';
     189        $author_uri = '';
    190190
    191191    if ( preg_match( '|Template:(.*)$|mi', $theme_data, $template ) )
  • trunk/wp-includes/user.php

    r9344 r9716  
    260260
    261261    if ( ! empty($meta_value) )
    262         $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s AND meta_value = %s", $userid, $meta_key, $meta_value) );
     262        $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s AND meta_value = %s", $user_id, $meta_key, $meta_value) );
    263263    else
    264264        $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
Note: See TracChangeset for help on using the changeset viewer.