Changeset 8058
- Timestamp:
- 06/06/2008 07:39:11 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin.php
r7999 r8058 8 8 9 9 if ( get_option('db_version') != $wp_db_version ) { 10 wp_redirect( get_option('siteurl') . '/wp-admin/upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])));10 wp_redirect(admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])))); 11 11 exit; 12 12 } -
trunk/wp-includes/general-template.php
r7999 r8058 34 34 function wp_loginout() { 35 35 if ( ! is_user_logged_in() ) 36 $link = '<a href="' . get_option('siteurl') . '/wp-login.php">' . __('Log in') . '</a>';36 $link = '<a href="' . site_url('wp-login.php', 'forceable') . '">' . __('Log in') . '</a>'; 37 37 else 38 $link = '<a href="' . get_option('siteurl') . '/wp-login.php?action=logout">' . __('Log out') . '</a>';38 $link = '<a href="' . site_url('wp-login.php?action=logout', 'forceable') . '">' . __('Log out') . '</a>'; 39 39 40 40 echo apply_filters('loginout', $link); … … 46 46 if ( ! is_user_logged_in() ) { 47 47 if ( get_option('users_can_register') ) 48 $link = $before . '<a href="' . get_option('siteurl') . '/wp-login.php?action=register">' . __('Register') . '</a>' . $after;48 $link = $before . '<a href="' . site_url('wp-login.php?action=register', 'forceable') . '">' . __('Register') . '</a>' . $after; 49 49 else 50 50 $link = ''; 51 51 } else { 52 $link = $before . '<a href="' . get_option('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;52 $link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after; 53 53 } 54 54 -
trunk/wp-includes/link-template.php
r8000 r8058 751 751 var x=d.selection; 752 752 var s=(e?e():(k)?k():(x?x.createRange().text:0)); 753 var f='" . get_settings('siteurl') . '/wp-admin/press-this.php'. "';753 var f='" . admin_url('press-this.php') . "'; 754 754 var l=d.location; 755 755 var e=encodeURIComponent; … … 780 780 function site_url($path = '', $scheme = null) { 781 781 // should the list of allowed schemes be maintained elsewhere? 782 if ( !in_array($scheme, array('http', 'https')) ) 783 $scheme = ( is_ssl() ? 'https' : 'http' ); 782 if ( !in_array($scheme, array('http', 'https')) ) { 783 if ( ('forceable' == $scheme) && (defined('FORCE_SSL_LOGIN') && FORCE_SSL_LOGIN) ) 784 $scheme = 'https'; 785 else 786 $scheme = ( is_ssl() ? 'https' : 'http' ); 787 } 784 788 785 789 $url = str_replace( 'http://', "{$scheme}://", get_option('siteurl') ); … … 794 798 global $_wp_admin_url; 795 799 796 $url = site_url( ) . '/wp-admin/';800 $url = site_url('wp-admin/', 'forceable'); 797 801 798 802 if ( !empty($path) && is_string($path) && strpos($path, '..') === false ) -
trunk/wp-includes/pluggable.php
r7998 r8058 644 644 nocache_headers(); 645 645 646 $login_url = get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']); 647 648 // Redirect to https if connection is secure 649 if ( $secure ) 650 $login_url = str_replace('http://', 'https://', $login_url); 646 $login_url = site_url( 'wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']), 'forceable' ); 647 651 648 wp_redirect($login_url); 652 649 exit(); … … 665 662 */ 666 663 function check_admin_referer($action = -1, $query_arg = '_wpnonce') { 667 $adminurl = strtolower( get_option('siteurl')).'/wp-admin';664 $adminurl = strtolower(admin_url()); 668 665 $referer = strtolower(wp_get_referer()); 669 666 $result = wp_verify_nonce($_REQUEST[$query_arg], $action); … … 795 792 796 793 if ( isset($lp['host']) && ( !in_array($lp['host'], $allowed_hosts) && $lp['host'] != strtolower($wpp['host'])) ) 797 $location = get_option('siteurl') . '/wp-admin/';794 $location = admin_url(); 798 795 799 796 wp_redirect($location, $status); … … 849 846 } 850 847 $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n"; 851 $notify_message .= sprintf( __('Delete it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&c=$comment_id") . "\r\n";852 $notify_message .= sprintf( __('Spam it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&dt=spam&c=$comment_id") . "\r\n";848 $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=cdc&c=$comment_id") ) . "\r\n"; 849 $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=cdc&dt=spam&c=$comment_id") ) . "\r\n"; 853 850 854 851 $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])); … … 929 926 } 930 927 931 $notify_message .= sprintf( __('Approve it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=mac&c=$comment_id") . "\r\n";932 $notify_message .= sprintf( __('Delete it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&c=$comment_id") . "\r\n";933 $notify_message .= sprintf( __('Spam it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&dt=spam&c=$comment_id") . "\r\n";928 $notify_message .= sprintf( __('Approve it: %s'), admin_url("comment.php?action=mac&c=$comment_id") ) . "\r\n"; 929 $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=cdc&c=$comment_id") ) . "\r\n"; 930 $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=cdc&dt=spam&c=$comment_id") ) . "\r\n"; 934 931 935 932 $notify_message .= sprintf( __ngettext('Currently %s comment is waiting for approval. Please visit the moderation panel:', 936 933 'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n"; 937 $notify_message .= get_option('siteurl') . "/wp-admin/edit-comments.php?comment_status=moderated\r\n";934 $notify_message .= admin_url("edit-comments.php?comment_status=moderated") . "\r\n"; 938 935 939 936 $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), get_option('blogname'), $post->post_title ); … … 975 972 $message = sprintf(__('Username: %s'), $user_login) . "\r\n"; 976 973 $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n"; 977 $message .= get_option('siteurl') . "/wp-login.php\r\n";974 $message .= site_url("wp-login.php", 'forceable') . "\r\n"; 978 975 979 976 wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_option('blogname')), $message); … … 1295 1292 $default = "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com') 1296 1293 elseif ( 'blank' == $default ) 1297 $default = get_option('siteurl') . '/wp-includes/images/blank.gif';1294 $default = includes_url('images/blank.gif'); 1298 1295 elseif ( !empty($email) && 'gravatar_default' == $default ) 1299 1296 $default = ''; -
trunk/wp-includes/post.php
r8019 r8058 2393 2393 if ( !is_array($icon_files) ) { 2394 2394 $icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/crystal' ); 2395 $icon_dir_uri = apply_filters( 'icon_dir_uri', trailingslashit(get_option('siteurl')) . WPINC . '/images/crystal');2395 $icon_dir_uri = apply_filters( 'icon_dir_uri', includes_url('images/crystal') ); 2396 2396 $dirs = apply_filters( 'icon_dirs', array($icon_dir => $icon_dir_uri) ); 2397 2397 $icon_files = array(); -
trunk/wp-includes/script-loader.php
r8047 r8058 72 72 $scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20'); 73 73 $scripts->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.js', array('jquery'), '3.1-20080430'); 74 $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2. 0.2-20080430');75 $scripts->add( 'swfupload-degrade', '/wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js', array('swfupload'), '2. 0.2');74 $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2.1.0'); 75 $scripts->add( 'swfupload-degrade', '/wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js', array('swfupload'), '2.1.0'); 76 76 $scripts->localize( 'swfupload-degrade', 'uploadDegradeOptions', array( 77 77 'is_lighttpd_before_150' => is_lighttpd_before_150(), 78 78 ) ); 79 $scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2. 0.2');80 $scripts->add( 'swfupload-handlers', '/wp-includes/js/swfupload/handlers.js', array('swfupload'), '2. 0.2-20080407');79 $scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2.1.0'); 80 $scripts->add( 'swfupload-handlers', '/wp-includes/js/swfupload/handlers.js', array('swfupload'), '2.1.0'); 81 81 // these error messages came from the sample swfupload js, they might need changing. 82 82 $scripts->localize( 'swfupload-handlers', 'swfuploadL10n', array( -
trunk/wp-includes/widgets.php
r7968 r8058 1074 1074 $url = clean_url(strip_tags($url)); 1075 1075 if ( file_exists(dirname(__FILE__) . '/rss.png') ) 1076 $icon = str_replace(ABSPATH, get_option('siteurl').'/', dirname(__FILE__)) . '/rss.png';1076 $icon = str_replace(ABSPATH, site_url() . '/', dirname(__FILE__)) . '/rss.png'; 1077 1077 else 1078 $icon = get_option('siteurl').'/wp-includes/images/rss.png';1078 $icon = includes_url('images/rss.png'); 1079 1079 $title = "<a class='rsswidget' href='$url' title='" . attribute_escape(__('Syndicate this content')) ."'><img style='background:orange;color:white;border:none;' width='14' height='14' src='$icon' alt='RSS' /></a> <a class='rsswidget' href='$link' title='$desc'>$title</a>"; 1080 1080 -
trunk/wp-login.php
r7998 r8058 381 381 382 382 <p id="nav"> 383 <a href="<?php bloginfo('wpurl'); ?>/wp-login.php"><?php _e('Log in') ?></a> |384 <a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=lostpassword" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a>383 <a href="<?php site_url('wp-login.php', 'forceable') ?>"><?php _e('Log in') ?></a> | 384 <a href="<?php site_url('wp-login.php?action=lostpassword') ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a> 385 385 </p> 386 386 … … 455 455 <?php if ( isset($_GET['checkemail']) && in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?> 456 456 <?php elseif (get_option('users_can_register')) : ?> 457 <a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=register"><?php _e('Register') ?></a> |458 <a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=lostpassword" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a>457 <a href="<?php site_url('wp-login.php?action=register') ?>"><?php _e('Register') ?></a> | 458 <a href="<?php site_url('wp-login.php?action=lostpassword') ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a> 459 459 <?php else : ?> 460 <a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=lostpassword" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a>460 <a href="<?php site_url('wp-login.php?action=lostpassword') ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a> 461 461 <?php endif; ?> 462 462 </p>
Note: See TracChangeset
for help on using the changeset viewer.