Changeset 7637

Show
Ignore:
Timestamp:
01/27/07 07:08:30 (1 year ago)
Author:
GamerZ
Message:

Replace get_settings() With get_options()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-stats/trunk/stats/stats-options.php

    r7427 r7637  
    2121$base_name = plugin_basename('stats/stats-options.php'); 
    2222$base_page = 'admin.php?page='.$base_name; 
    23 $stats_mostlimit = intval(get_settings('stats_mostlimit')); 
    24 $stats_display = get_settings('stats_display'); 
     23$stats_mostlimit = intval(get_option('stats_mostlimit')); 
     24$stats_display = get_option('stats_display'); 
    2525 
    2626### If Form Is Submitted 
     
    6767                              <th align="left" width="30%"><?php _e('Stats URL', 'wp-stats'); ?></th> 
    6868                              <td align="left"> 
    69                                     <input type="text" name="stats_url" value="<?php echo get_settings('stats_url'); ?>" size="50" /><br /><?php _e('URL To Stats Page.<br />Example: http://www.yoursite.com/blogs/stats/<br />Example: http://www.yoursite.com/blogs/?page_id=2', 'wp-stats'); ?> 
     69                                    <input type="text" name="stats_url" value="<?php echo get_option('stats_url'); ?>" size="50" /><br /><?php _e('URL To Stats Page.<br />Example: http://www.yoursite.com/blogs/stats/<br />Example: http://www.yoursite.com/blogs/?page_id=2', 'wp-stats'); ?> 
    7070                              </td> 
    7171                        </tr> 
     
    109109                                          } 
    110110                                    ?> 
    111                                     <p><strong><?php printf(__('Top %s Post Stats', 'wp-stats'), get_settings('stats_mostlimit')); ?></strong></p> 
     111                                    <p><strong><?php printf(__('Top %s Post Stats', 'wp-stats'), get_option('stats_mostlimit')); ?></strong></p> 
    112112                                    <input type="checkbox" name="stats_display[]" value="recent_posts"<?php checked(1, $stats_display['recent_posts']); ?> />&nbsp;&nbsp;<?php echo $stats_mostlimit ?> <?php _e('Most Recent Posts', 'wp-stats'); ?><br /> 
    113113                                    <input type="checkbox" name="stats_display[]" value="recent_commtents"<?php checked(1, $stats_display['recent_commtents']); ?> />&nbsp;&nbsp;<?php echo $stats_mostlimit ?> <?php _e('Most Recent Comments', 'wp-stats'); ?><br /> 
  • wp-stats/trunk/stats/stats-widget.php

    r7427 r7637  
    135135                  if(intval($options['show_link']) == 1) { 
    136136                        echo '<ul>'."\n"; 
    137                         echo '<li><a href="'.stripslashes(get_settings('stats_url')).'">'.__('My Blog Statistics', 'wp-stats').'</a></li>'."\n"; 
     137                        echo '<li><a href="'.stripslashes(get_option('stats_url')).'">'.__('My Blog Statistics', 'wp-stats').'</a></li>'."\n"; 
    138138                        echo '</ul>'."\n"; 
    139139                  } 
  • wp-stats/trunk/stats/stats.php

    r7621 r7637  
    230230      $posts = $wpdb->get_results("SELECT COUNT($wpdb->posts.ID) AS 'posts_total', $wpdb->users.display_name,  $wpdb->users.user_nicename FROM $wpdb->posts LEFT JOIN $wpdb->users ON $wpdb->users.ID = $wpdb->posts.post_author AND user_activation_key = '' AND $where AND post_status = 'publish' GROUP BY $wpdb->posts.post_author"); 
    231231      if($posts) { 
    232             $using_permalink = get_settings('permalink_structure'); 
     232            $using_permalink = get_option('permalink_structure'); 
    233233            $permalink = $wp_rewrite->get_author_permastruct(); 
    234234            foreach ($posts as $post) { 
     
    238238                        $posts_total = intval($post->posts_total);                         
    239239                        if($using_permalink) { 
    240                               $temp .= "<li><a href=\"".get_settings('home').$author_link."\" title=\"".sprintf(__('View posts posted by %s', 'wp-stats'), $display_name)."\">$display_name</a> ($posts_total)</li>\n"; 
     240                              $temp .= "<li><a href=\"".get_option('home').$author_link."\" title=\"".sprintf(__('View posts posted by %s', 'wp-stats'), $display_name)."\">$display_name</a> ($posts_total)</li>\n"; 
    241241                        } else { 
    242                               $temp .= "<li><a href=\"".get_settings('siteurl')."/?author_name=$post_author\" title=\"".sprintf(__('View posts posted by %s', 'wp-stats'), $display_name)."\">$display_name</a> ($posts_total)</li>\n"; 
     242                              $temp .= "<li><a href=\"".get_option('siteurl')."/?author_name=$post_author\" title=\"".sprintf(__('View posts posted by %s', 'wp-stats'), $display_name)."\">$display_name</a> ($posts_total)</li>\n"; 
    243243                        } 
    244244            } 
     
    350350### Function: Stats Page 
    351351function stats_page_link($author, $page = 0) { 
    352       $stats_url = get_settings('stats_url'); 
     352      $stats_url = get_option('stats_url'); 
    353353      if($page > 1) { 
    354354            $page = "&amp;stats_page=$page"; 
     
    373373      $temp_stats = ''; 
    374374      $temp_post = $post; 
    375       $stats_mostlimit = intval(get_settings('stats_mostlimit')); 
    376       $stats_display = get_settings('stats_display'); 
     375      $stats_mostlimit = intval(get_option('stats_mostlimit')); 
     376      $stats_display = get_option('stats_display'); 
    377377 
    378378      // Default wp-stats.php Page 
     
    547547      } else { 
    548548            // Stats URL 
    549             $stats_url = get_settings('stats_url'); 
     549            $stats_url = get_option('stats_url'); 
    550550            // Number Of Comments Per Page 
    551551            $perpage = 10; 
     
    667667      add_option('stats_mostlimit', '10', 'Stats Most Limit'); 
    668668      add_option('stats_display', $stats_display, 'Stats To Display'); 
    669       add_option('stats_url', get_settings('siteurl').'/stats/', 'Stats URL'); 
     669      add_option('stats_url', get_option('siteurl').'/stats/', 'Stats URL'); 
    670670} 
    671671?> 
  • wp-stats/trunk/stats/wp-stats.pot

    r7606 r7637  
    33"Project-Id-Version: WP-Stats 2.10\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2007-01-26 15:08+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@homtail.com>\n"