Make WordPress Core


Ignore:
Timestamp:
08/30/2006 09:46:31 PM (18 years ago)
Author:
ryan
Message:

Use get_option instead of get_settings. Just 'cause.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/plugins/wp-db-backup.php

    r4095 r4144  
    164164
    165165        $this_basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
    166         $download_uri = get_settings('siteurl') . "/wp-admin/edit.php?page={$this_basename}&backup={$backup_filename}";
     166        $download_uri = get_option('siteurl') . "/wp-admin/edit.php?page={$this_basename}&backup={$backup_filename}";
    167167        switch($_POST['deliver']) {
    168168        case 'http':
     
    316316            } elseif ('http' == $_POST['deliver']) {
    317317                $this_basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
    318                 header('Refresh: 3; ' . get_settings('siteurl') . "/wp-admin/edit.php?page={$this_basename}&backup={$this->backup_file}");
     318                header('Refresh: 3; ' . get_option('siteurl') . "/wp-admin/edit.php?page={$this_basename}&backup={$this->backup_file}");
    319319            }
    320320            // we do this to say we're done.
     
    620620                $msg = sprintf(__('File not found:%s'), "<br /><strong>$filename</strong><br />");
    621621                $this_basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
    622                 $msg .= '<br /><a href="' . get_settings('siteurl') . "/wp-admin/edit.php?page={$this_basename}" . '">' . __('Return to Backup');
     622                $msg .= '<br /><a href="' . get_option('siteurl') . "/wp-admin/edit.php?page={$this_basename}" . '">' . __('Return to Backup');
    623623            die($msg);
    624624            }
     
    633633
    634634            if (! is_email ($recipient)) {
    635                 $recipient = get_settings('admin_email');
     635                $recipient = get_option('admin_email');
    636636            }
    637637            $randomish = md5(time());
     
    643643            $headers = "MIME-Version: 1.0\n";
    644644            $headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\n";
    645             $headers .= 'From: ' . get_settings('admin_email') . "\n";
     645            $headers .= 'From: ' . get_option('admin_email') . "\n";
    646646
    647647            $message = sprintf(__("Attached to this email is\n   %1s\n   Size:%2s kilobytes\n"), $filename, round(filesize($diskfile)/1024));
     
    686686            switch($_POST['deliver']) {
    687687            case 'http':
    688                 $feedback .= '<br />' . sprintf(__('Your backup file: <a href="%1s">%2s</a> should begin downloading shortly.'), get_settings('siteurl') . "/{$this->backup_dir}{$this->backup_file}", $this->backup_file);
     688                $feedback .= '<br />' . sprintf(__('Your backup file: <a href="%1s">%2s</a> should begin downloading shortly.'), get_option('siteurl') . "/{$this->backup_dir}{$this->backup_file}", $this->backup_file);
    689689                break;
    690690            case 'smtp':
    691691                if (! is_email($_POST['backup_recipient'])) {
    692                     $feedback .= get_settings('admin_email');
     692                    $feedback .= get_option('admin_email');
    693693                } else {
    694694                    $feedback .= $_POST['backup_recipient'];
     
    698698            case 'none':
    699699                $feedback .= '<br />' . __('Your backup file has been saved on the server. If you would like to download it now, right click and select "Save As"');
    700                 $feedback .= ':<br /> <a href="' . get_settings('siteurl') . "/{$this->backup_dir}$file\">$file</a> : " . sprintf(__('%s bytes'), filesize(ABSPATH . $this->backup_dir . $file));
     700                $feedback .= ':<br /> <a href="' . get_option('siteurl') . "/{$this->backup_dir}$file\">$file</a> : " . sprintf(__('%s bytes'), filesize(ABSPATH . $this->backup_dir . $file));
    701701            }
    702702            $feedback .= '</p></div>';
     
    782782        echo '<label style="display:block;"><input type="radio" checked="checked" name="deliver" value="http" /> ' . __('Download to your computer') . '</label>';
    783783        echo '<div><input type="radio" name="deliver" id="do_email" value="smtp" /> ';
    784         echo '<label for="do_email">'.__('Email backup to:').'</label><input type="text" name="backup_recipient" size="20" value="' . get_settings('admin_email') . '" />';
     784        echo '<label for="do_email">'.__('Email backup to:').'</label><input type="text" name="backup_recipient" size="20" value="' . get_option('admin_email') . '" />';
    785785
    786786        // Check DB dize.
     
    810810        if (function_exists('wp_cron_init')) {
    811811            echo '<fieldset class="options"><legend>' . __('Scheduled Backup') . '</legend>';
    812             $datetime = get_settings('date_format') . ' @ ' . get_settings('time_format');
     812            $datetime = get_option('date_format') . ' @ ' . get_option('time_format');
    813813            echo '<p>' . __('Last WP-Cron Daily Execution') . ': ' . date($datetime, get_option('wp_cron_daily_lastrun')) . '<br />';
    814814            echo __('Next WP-Cron Daily Execution') . ': ' . date($datetime, (get_option('wp_cron_daily_lastrun') + 86400)) . '</p>';
     
    829829            $cron_recipient = get_option('wp_cron_backup_recipient');
    830830            if (! is_email($cron_recipient)) {
    831                 $cron_recipient = get_settings('admin_email');
     831                $cron_recipient = get_option('admin_email');
    832832            }
    833833            echo __('Email backup to:') . ' <input type="text" name="cron_backup_recipient" size="20" value="' . $cron_recipient . '" />';
Note: See TracChangeset for help on using the changeset viewer.