Changeset 7638

Show
Ignore:
Timestamp:
01/27/07 07:09:23 (18 months ago)
Author:
GamerZ
Message:

Replace get_settings() With get_options()

Location:
wp-useronline/trunk/useronline
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • wp-useronline/trunk/useronline/useronline-js.php

    r7426 r7638  
    3030// Variables 
    3131var useronline_ajax_url = "<?php echo $useronline_ajax_url; ?>/useronline.php"; 
    32 var useronline_timeout = <?php echo (get_settings('useronline_timeout')*1000); ?>; 
     32var useronline_timeout = <?php echo (get_option('useronline_timeout')*1000); ?>; 
    3333 
    3434// UserOnline JavaScript Init 
  • wp-useronline/trunk/useronline/useronline-options.php

    r7426 r7638  
    5757 
    5858### Get Useronline Bots 
    59 $useronline_options_bots = get_settings('useronline_bots'); 
     59$useronline_options_bots = get_option('useronline_bots'); 
    6060$useronline_options_bots_name = ''; 
    6161$useronline_options_bots_agent = ''; 
     
    7777                              <th align="left" width="30%"><?php _e('Time Out', 'wp-useronline'); ?></th> 
    7878                              <td align="left"> 
    79                                     <input type="text" name="useronline_timeout" value="<?php echo get_settings('useronline_timeout'); ?>" size="4" /><br /><?php _e('How long till it will remove the user from the database (In seconds).', 'wp-useronline'); ?> 
     79                                    <input type="text" name="useronline_timeout" value="<?php echo get_option('useronline_timeout'); ?>" size="4" /><br /><?php _e('How long till it will remove the user from the database (In seconds).', 'wp-useronline'); ?> 
    8080                              </td> 
    8181                        </tr> 
     
    8383                              <th align="left" width="30%"><?php _e('UserOnline URL', 'wp-useronline'); ?></th> 
    8484                              <td align="left"> 
    85                                     <input type="text" name="useronline_url" value="<?php echo get_settings('useronline_url'); ?>" size="50" /><br /><?php _e('URL To UserOnline Page<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2', 'wp-useronline'); ?> 
     85                                    <input type="text" name="useronline_url" value="<?php echo get_option('useronline_url'); ?>" size="50" /><br /><?php _e('URL To UserOnline Page<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2', 'wp-useronline'); ?> 
    8686                              </td> 
    8787                        </tr> 
  • wp-useronline/trunk/useronline/useronline.php

    r7605 r7638  
    7171      global $wpdb, $useronline; 
    7272      // Useronline Settings 
    73       $timeoutseconds = get_settings('useronline_timeout'); 
     73      $timeoutseconds = get_option('useronline_timeout'); 
    7474      $timestamp = current_time('timestamp'); 
    7575      $timeout = ($timestamp-$timeoutseconds); 
     
    8080 
    8181      // Check For Bot 
    82       $bots = get_settings('useronline_bots'); 
     82      $bots = get_option('useronline_bots'); 
    8383      foreach ($bots as $name => $lookfor) {  
    8484            if (stristr($useragent, $lookfor) !== false) {  
     
    143143       
    144144      // Get Most User Online 
    145       $most_useronline = intval(get_settings('useronline_most_users')); 
     145      $most_useronline = intval(get_option('useronline_most_users')); 
    146146 
    147147      // Check Whether Current Users Online Is More Than Most Users Online 
     
    163163                  $users = __('Users', 'wp-useronline'); 
    164164            } 
    165             $useronline_url = get_settings('useronline_url'); 
     165            $useronline_url = get_option('useronline_url'); 
    166166            // Display User Online 
    167167            if($display) { 
     
    181181if(!function_exists('get_most_useronline')) { 
    182182      function get_most_useronline($display = true) { 
    183             $most_useronline_users = intval(get_settings('useronline_most_users')); 
     183            $most_useronline_users = intval(get_option('useronline_most_users')); 
    184184            if($display) { 
    185185                  echo number_format($most_useronline_users); 
     
    194194if(!function_exists('get_most_useronline_date')) { 
    195195      function get_most_useronline_date($display = true, $date_format = 'jS F Y, H:i') { 
    196             $most_useronline_timestamp = get_settings('useronline_most_timestamp'); 
     196            $most_useronline_timestamp = get_option('useronline_most_timestamp'); 
    197197            $most_useronline_date = gmdate($date_format, $most_useronline_timestamp); 
    198198            if($display) { 
     
    315315      if($users_browse) { 
    316316            // Reassign Bots Name 
    317             $bots = get_settings('useronline_bots'); 
     317            $bots = get_option('useronline_bots'); 
    318318            $bots_name = array(); 
    319319            foreach($bots as $botname => $botlookfor) { 
     
    602602### Function: Stats Page Link 
    603603function useronline_stats_page_link($author) { 
    604       $stats_url = get_settings('stats_url'); 
     604      $stats_url = get_option('stats_url'); 
    605605      if(strpos($stats_url, '?') !== false) { 
    606606            $stats_url = "$stats_url&amp;stats_author=$author"; 
     
    663663      add_option('useronline_bots', $bots, 'Bots Name/Useragent'); 
    664664      // Database Upgrade For WP-UserOnline 2.05 
    665       add_option('useronline_url', get_settings('siteurl').'/useronline/', 'UserOnline Page URL'); 
     665      add_option('useronline_url', get_option('siteurl').'/useronline/', 'UserOnline Page URL'); 
    666666} 
    667667?> 
  • wp-useronline/trunk/useronline/wp-useronline.pot

    r7605 r7638  
    33"Project-Id-Version: WP-UserOnline 2.10\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2007-01-26 15:07+0800\n" 
     5"PO-Revision-Date: 2007-01-27 15:08+0800\n" 
    66"Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 
    77"Language-Team: Lester Chan <gamerz84@hotmail.com>\n"