Ticket #715: bb_uri_patch.build912.patch

File bb_uri_patch.build912.patch, 56.9 kB (added by sambauers, 1 year ago)
  • bb-templates/kakumei/tags.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Tags'); ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Tags'); ?></h3> 
    44 
    55<p><?php _e('This is a collection of tags that are currently popular on the forums.'); ?></p> 
    66 
  • bb-templates/kakumei/favorites.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Favorites'); ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Favorites'); ?></h3> 
    44 
    55<h2 id="currentfavorites"><?php _e('Current Favorites'); ?><?php if ( $topics ) echo ' (' . $favorites_total . ')'; ?></h2> 
    66 
  • bb-templates/kakumei/search.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Search')?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Search')?></h3> 
    44<?php bb_topic_search_form(); ?> 
    55 
    66<?php if ( !empty ( $q ) ) : ?> 
     
    3535<p><?php _e('No results found.') ?></p> 
    3636<?php endif; ?> 
    3737<br /> 
    38 <p><?php printf(__('You may also try your <a href="http://google.com/search?q=site:%1$s %2$s">search at Google</a>'), bb_get_option('uri'), urlencode($q)) ?></p> 
     38<p><?php printf(__('You may also try your <a href="http://google.com/search?q=site:%1$s %2$s">search at Google</a>'), bb_get_uri(), urlencode($q)) ?></p> 
    3939<?php bb_get_footer(); ?> 
  • bb-templates/kakumei/login.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Log in'); ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Log in'); ?></h3> 
    44 
    55<h2><?php isset($_POST['user_login']) ? _e('Log in Failed') : _e('Log in') ; ?></h2> 
    66 
    77 
    8 <form method="post" action="<?php bb_option('uri'); ?>bb-login.php"> 
     8<form method="post" action="<?php bb_uri('bb-login.php', 'action'); ?>"> 
    99<table width="50%"> 
    1010<?php if ( $user_exists ) : ?> 
    1111        <tr valign="top"> 
     
    2121        <tr valign="top" class="error"> 
    2222                <th scope="row"><?php _e('Username:'); ?></th> 
    2323                <td><input name="user_login" type="text" value="<?php echo $user_login; ?>" /><br /> 
    24                 <?php _e('This username does not exist.'); ?> <a href="<?php bb_option('uri'); ?>register.php?user=<?php echo $user_login; ?>"><?php _e('Register it?'); ?></a></td> 
     24                <?php _e('This username does not exist.'); ?> <a href="<?php bb_uri('register.php'); ?>?user=<?php echo $user_login; ?>"><?php _e('Register it?'); ?></a></td> 
    2525        </tr> 
    2626        <tr valign="top"> 
    2727                <th scope="row"><?php _e('Password:'); ?></th> 
     
    4747 
    4848<?php if ( $user_exists ) : ?> 
    4949<hr /> 
    50 <form method="post" action="<?php bb_option('uri'); ?>bb-reset-password.php"> 
     50<form method="post" action="<?php bb_uri('bb-reset-password.php', 'action'); ?>"> 
    5151<p><?php _e('If you would like to recover the password for this account, you may use the following button to start the recovery process:'); ?><br /> 
    5252<input name="user_login" type="hidden" value="<?php echo $user_login; ?>" /> 
    5353<input type="submit" value="<?php echo attribute_escape( __('Recover Password &raquo;') ); ?>" /></p> 
  • bb-templates/kakumei/login-form.php

    old new  
    1 <form class="login" method="post" action="<?php bb_option('uri'); ?>bb-login.php"> 
    2 <p><?php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_option('uri').'register.php') ?>:</p> 
     1<form class="login" method="post" action="<?php bb_uri('bb-login.php', 'action'); ?>"> 
     2<p><?php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_uri('register.php')) ?>:</p> 
    33<p> 
    44        <label><?php _e('Username:'); ?><br /> 
    55                <input name="user_login" type="text" id="user_login" size="13" maxlength="40" value="<?php echo attribute_escape( $_COOKIE[ bb_get_option( 'usercookie' ) ] ); ?>" /> 
  • bb-templates/kakumei/view.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php view_name(); ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php view_name(); ?></h3> 
    44 
    55<?php if ( $topics || $stickies ) : ?> 
    66 
  • bb-templates/kakumei/topic.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <a href="<?php forum_link(); ?>"><?php forum_name(); ?></a></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <a href="<?php forum_link(); ?>"><?php forum_name(); ?></a></h3> 
    44<div class="infobox"> 
    55 
    66<div id="topic-info"> 
  • bb-templates/kakumei/password-reset.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Log in'); ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Log in'); ?></h3> 
    44 
    55<h2><?php _e('Password Reset'); ?></h2> 
    66 
  • bb-templates/kakumei/profile-edit.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Edit Profile'); ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Edit Profile'); ?></h3> 
    44<h2 id="userlogin"><?php echo get_user_name( $user->ID ); ?></h2> 
    55<form method="post" action="<?php profile_tab_link($user->ID, 'edit');  ?>"> 
    66<fieldset> 
  • bb-templates/kakumei/header.php

    old new  
    1515                var page = <?php global $page; echo $page; ?>; 
    1616                var currentUserId = <?php bb_current_user_info( 'id' ); ?>; 
    1717                var topicId = <?php topic_id(); ?>; 
    18                 var uriBase = '<?php bb_option('uri'); ?>'; 
     18                var uriBase = '<?php bb_uri(null, 'script'); ?>'; 
    1919                var tagLinkBase = '<?php bb_tag_link_base(); ?>'; 
    2020                var favoritesLink = '<?php favorites_link(); ?>';  
    2121                var isFav = <?php if ( false === $is_fav = is_user_favorite( bb_get_current_user_info( 'id' ) ) ) echo "'no'"; else echo $is_fav; ?>; 
     
    3131        <div id="wrapper"> 
    3232         
    3333                <div id="header"> 
    34                         <h1><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a></h1> 
     34                        <h1><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a></h1> 
    3535                        <?php login_form(); ?> 
    3636 
    3737                </div> 
  • bb-templates/kakumei/forum.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php forum_name(); ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php forum_name(); ?></h3> 
    44 
    55<?php if ( $topics || $stickies ) : ?> 
    66 
  • bb-templates/kakumei/rss2.php

    old new  
    99 
    1010<channel> 
    1111<title><?php echo $title; ?></title> 
    12 <link><?php bb_option('uri'); ?></link> 
     12<link><?php bb_uri(); ?></link> 
    1313<description><?php echo $title; ?></description> 
    1414<language>en</language> 
    1515<pubDate><?php echo gmdate('D, d M Y H:i:s +0000'); ?></pubDate> 
     
    2020<link><?php post_link(); ?></link> 
    2121<pubDate><?php bb_post_time('D, d M Y H:i:s +0000'); ?></pubDate> 
    2222<dc:creator><?php post_author(); ?></dc:creator> 
    23 <guid isPermaLink="false"><?php post_id(); ?>@<?php bb_option('uri'); ?></guid> 
     23<guid isPermaLink="false"><?php post_id(); ?>@<?php bb_uri(); ?></guid> 
    2424<description><?php post_text(); ?></description> 
    2525</item> 
    2626<?php endforeach; ?> 
  • bb-templates/kakumei/register-success.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Register'); ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Register'); ?></h3> 
    44 
    55<h2 id="register"><?php _e('Great!'); ?></h2> 
    66 
  • bb-templates/kakumei/tag-single.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <a href="<?php tag_page_link(); ?>"><?php _e('Tags'); ?></a> &raquo; <?php tag_name(); ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <a href="<?php tag_page_link(); ?>"><?php _e('Tags'); ?></a> &raquo; <?php tag_name(); ?></h3> 
    44 
    55<p><a href="<?php tag_rss_link(); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr> link for this tag.') ?></a></p> 
    66 
  • bb-templates/kakumei/stats.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Statistics'); ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Statistics'); ?></h3> 
    44 
    55<dl> 
    66        <dt><?php _e('Registered Users'); ?></dt> 
  • bb-templates/kakumei/profile.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Profile') ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Profile') ?></h3> 
    44<h2 id="userlogin"><?php echo get_user_name( $user->ID ); ?></h2> 
    55 
    66<?php if ( $updated ) : ?> 
  • bb-templates/kakumei/front-page.php

    old new  
    7474 
    7575<?php else : // $forums ?> 
    7676 
    77 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a></h3> 
     77<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a></h3> 
    7878 
    7979<?php post_form(); endif; // $forums ?> 
    8080 
  • bb-templates/kakumei/search-form.php

    old new  
    1 <form action="<?php bb_option('uri'); ?>search.php" method="get"> 
     1<form action="<?php bb_uri('search.php', 'action'); ?>" method="get"> 
    22        <p><?php _e('Search:'); ?> 
    33                <input type="text" size="38" maxlength="100" name="q" value="<?php echo attribute_escape( $q ); ?>" /> 
    44        </p> 
  • bb-templates/kakumei/profile-base.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php echo $profile_page_title; ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php echo $profile_page_title; ?></h3> 
    44<h2><?php echo get_user_name( $user->ID ); ?></h2> 
    55 
    66<?php bb_profile_base_content(); ?> 
  • bb-templates/kakumei/edit-post.php

    old new  
    11<?php bb_get_header(); ?> 
    2 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Edit Post'); ?></h3> 
     2<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Edit Post'); ?></h3> 
    33 
    44<?php edit_form(); ?> 
    55 
  • bb-templates/kakumei/register.php

    old new  
    11<?php bb_get_header(); ?> 
    22 
    3 <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Register'); ?></h3> 
     3<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Register'); ?></h3> 
    44 
    55<h2 id="register"><?php _e('Registration'); ?></h2> 
    66 
    77<?php if ( !bb_is_user_logged_in() ) : ?> 
    8 <form method="post" action="<?php bb_option('uri'); ?>register.php"> 
     8<form method="post" action="<?php bb_uri('register.php', 'action'); ?>"> 
    99<fieldset> 
    1010<legend><?php _e('Profile Information'); ?></legend> 
    1111<p><?php _e("Your password will be emailed to the address you provide."); ?></p> 
  • bb-login.php

    old new  
    33 
    44$ref = wp_get_referer(); 
    55 
    6 $re = bb_get_option('uri'); 
     6$re = bb_get_uri(); 
    77 
    8 if ( 0 === strpos($ref, bb_get_option( 'uri' )) ) { 
     8if ( 0 === strpos($ref, bb_get_uri()) ) { 
    99        $re = $_POST['re'] ? $_POST['re'] : $_GET['re']; 
    10         if ( 0 !== strpos($re, bb_get_option( 'uri' )) ) 
     10        if ( 0 !== strpos($re, bb_get_uri()) ) 
    1111                $re = $ref . $re; 
    1212} 
    1313 
    14 if ( 0 === strpos($re, bb_get_option( 'uri' ) . 'register.php') ) 
    15         $re = bb_get_option( 'uri' ); 
     14if ( 0 === strpos($re, bb_get_uri('register.php')) ) 
     15        $re = bb_get_uri(); 
    1616 
    1717$re = clean_url( $re ); 
    1818 
  • bb-includes/akismet.php

    old new  
    88 
    99function bb_akismet_verify_key( $key ) { 
    1010        global $bb_ksd_pre_post_status, $bb_ksd_api_host, $bb_ksd_api_port; 
    11         $blog = urlencode( bb_get_option('uri') ); 
     11        $blog = urlencode( bb_get_uri(null, 'akismet') ); 
    1212        $response = bb_ksd_http_post("key=$key&blog=$blog", 'rest.akismet.com', '/1.1/verify-key', $bb_ksd_api_port); 
    1313        if ( 'valid' == $response[1] ) 
    1414                return true; 
     
    5555                        return; 
    5656 
    5757                $_submit = array( 
    58                         'blog' => bb_get_option('uri'), 
     58                        'blog' => bb_get_uri(null, 'akismet'), 
    5959                        'user_ip' => $bb_post->poster_ip, 
    6060                        'permalink' => get_topic_link( $bb_post->topic_id ), // First page 
    6161                        'comment_type' => 'forum', 
     
    7777                        return; 
    7878 
    7979                $_submit = array( 
    80                         'blog' => bb_get_option('uri'), 
     80                        'blog' => bb_get_uri(null, 'akismet'), 
    8181                        'permalink' => get_user_profile_link( $user->ID ), 
    8282                        'comment_type' => 'profile', 
    8383                        'comment_author' => get_user_name( $user->ID ), 
     
    9494                $path = '/1.1/comment-check'; 
    9595 
    9696                $_submit = array( 
    97                         'blog' => bb_get_option('uri'), 
     97                        'blog' => bb_get_uri(null, 'akismet'), 
    9898                        'user_ip' => preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] ), 
    9999                        'user_agent' => $_SERVER['HTTP_USER_AGENT'], 
    100100                        'referrer' => $_SERVER['HTTP_REFERER'], 
     
    217217        if ( !bb_current_user_can('moderate') ) 
    218218                return $link; 
    219219        if ( 2 == $post_status ) 
    220                 $link .= " <a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/delete-post.php?id=' . get_post_id() . '&status=0&view=all', 'delete-post_' . get_post_id() ) ) . "' >" . __('Not Spam') ."</a>"; 
     220                $link .= " <a href='" . attribute_escape( bb_nonce_url( bb_get_uri('bb-admin/delete-post.php') . '?id=' . get_post_id() . '&status=0&view=all', 'delete-post_' . get_post_id() ) ) . "' >" . __('Not Spam') ."</a>"; 
    221221        else 
    222                 $link .= " <a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/delete-post.php?id=' . get_post_id() . '&status=2', 'delete-post_' . get_post_id() ) ) . "' >" . __('Spam') ."</a>"; 
     222                $link .= " <a href='" . attribute_escape( bb_nonce_url( bb_get_uri('bb-admin/delete-post.php') . '?id=' . get_post_id() . '&status=2', 'delete-post_' . get_post_id() ) ) . "' >" . __('Spam') ."</a>"; 
    223223        return $link; 
    224224} 
    225225 
  • bb-includes/deprecated.php

    old new  
    298298 
    299299// It's not omnipotent 
    300300function bb_path_to_url( $path ) { 
    301         return apply_filters( 'bb_path_to_url', bb_convert_path_base( $path, BBPATH, bb_get_option( 'uri' ) ), $path ); 
     301        return apply_filters( 'bb_path_to_url', bb_convert_path_base( $path, BBPATH, bb_get_uri() ), $path ); 
    302302} 
    303303 
    304304// Neither is this one 
    305305function bb_url_to_path( $url ) { 
    306         return apply_filters( 'bb_url_to_path', bb_convert_path_base( $url, bb_get_option( 'uri' ), BBPATH ), $url ); 
     306        return apply_filters( 'bb_url_to_path', bb_convert_path_base( $url, bb_get_uri(), BBPATH ), $url ); 
    307307} 
    308308 
    309309function bb_convert_path_base( $path, $from_base, $to_base ) { 
  • bb-includes/pluggable.php

    old new  
    88                         (empty($_COOKIE[bb_get_option( 'usercookie' )])) ) { 
    99                nocache_headers(); 
    1010 
    11                 header('Location: ' . bb_get_option('uri')); 
     11                header('Location: ' . bb_get_uri()); 
    1212                exit(); 
    1313        } 
    1414} 
  • bb-includes/script-loader.php

    old new  
    6161                                        $ver = $this->scripts[$handle]->ver ? $this->scripts[$handle]->ver : $bb_db_version; 
    6262                                        if ( isset($this->args[$handle]) ) 
    6363                                                $ver .= '&amp;' . $this->args[$handle]; 
    64                                         $src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : rtrim(bb_get_option( 'uri' ), ' /') . $this->scripts[$handle]->src; 
     64                                        $src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : rtrim(bb_get_uri(), ' /') . $this->scripts[$handle]->src; 
    6565                                        $src = add_query_arg('ver', $ver, $src); 
    6666                                        $src = apply_filters( 'bb_script_loader_src', $src ); 
    6767                                        $src = attribute_escape( $src ); 
  • bb-includes/functions.php

    old new  
    12391239        return bb_delete_meta( 0, $option, $value, 'topic', true ); 
    12401240} 
    12411241 
     1242function bb_uri($file = null, $context = 'href') { 
     1243        echo apply_filters('bb_uri', bb_get_uri($file, $context), $file, $context); 
     1244} 
     1245 
     1246function bb_get_uri($file = null, $context = 'href') { 
     1247        $uri = bb_get_option('uri') . $file; 
     1248        return apply_filters('bb_get_uri', $uri, $file, $context); 
     1249} 
     1250 
    12421251// This is the only function that should add to $bb_(user||topic)_cache 
    12431252function bb_append_meta( $object, $type ) { 
    12441253        global $bbdb, $bb_table_prefix; 
     
    18671876 
    18681877function bb_nonce_ays($action) { 
    18691878        if ( !$adminurl = wp_get_referer() ) 
    1870                 $adminurl = bb_get_option( 'uri' ) . '/bb-admin'
     1879                $adminurl = bb_get_uri('bb-admin/')
    18711880 
    18721881        $title = wp_specialchars( __('bbPress Confirmation') ); 
    18731882        $adminurl = attribute_escape( $adminurl ); 
     
    19031912<head> 
    19041913        <title><?php echo $title ?></title> 
    19051914        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    1906         <link rel="stylesheet" href="<?php bb_option('uri'); ?>bb-admin/install.css" type="text/css" /> 
     1915        <link rel="stylesheet" href="<?php bb_uri('bb-admin/install.css'); ?>" type="text/css" /> 
    19071916<?php if ( ('rtl' == $bb_locale->text_direction) ) : ?> 
    1908         <link rel="stylesheet" href="<?php bb_option('uri'); ?>bb-admin/install-rtl.css" type="text/css" /> 
     1917        <link rel="stylesheet" href="<?php bb_uri('bb-admin/install-rtl.css'); ?>" type="text/css" /> 
    19091918<?php endif; ?> 
    19101919</head> 
    19111920<body> 
    1912         <h1 id="logo"><img alt="bbPress" src="<?php bb_option('uri'); ?>bb-images/bbpress.png" /></h1> 
     1921        <h1 id="logo"><img alt="bbPress" src="<?php bb_uri('bb-images/bbpress.png', 'src'); ?>" /></h1> 
    19131922<?php 
    19141923} 
    19151924 
  • bb-includes/registration-functions.php

    old new  
    5252 
    5353%s 
    5454 
    55 If you don't want to reset your password, just ignore this email. Thanks!"), bb_get_option('uri')."bb-reset-password.php?key=".$resetkey ), 'From: ' . bb_get_option('admin_email') ); 
     55If you don't want to reset your password, just ignore this email. Thanks!"), bb_get_uri('bb-reset-password.php', 'email')."?key=".$resetkey ), 'From: ' . bb_get_option('admin_email') ); 
    5656 
    5757        endif; 
    5858} 
     
    110110        if ( $user ) : 
    111111                $message = __("Your username is: %1\$s \nYour password is: %2\$s \nYou can now log in: %3\$s \n\nEnjoy!"); 
    112112                mail( bb_get_user_email( $user->ID ), bb_get_option('name') . ': ' . __('Password'),  
    113                         sprintf( $message, "$user->user_login", "$pass", bb_get_option('uri') ),  
     113                        sprintf( $message, "$user->user_login", "$pass", bb_get_uri(null, 'email') ),  
    114114                        'From: ' . bb_get_option('admin_email')  
    115115                ); 
    116116 
  • bb-includes/template-functions.php

    old new  
    6060        if ( file_exists( $active_theme . 'style.css' ) ) 
    6161                $r = bb_get_active_theme_uri() . $css_file; 
    6262        else 
    63                 $r = bb_get_option( 'uri' ) . "bb-templates/kakumei/$css_file"
     63                $r = bb_get_uri('bb-templates/kakumei/' . $css_file)
    6464        return apply_filters( 'bb_get_stylesheet_uri', $r, $stylesheet ); 
    6565} 
    6666 
     
    8080        elseif ( 0 === strpos($theme, BBTHEMEDIR) ) 
    8181                $r = BBTHEMEURL . substr($theme, strlen(BBTHEMEDIR)); 
    8282        elseif ( 0 === strpos($theme, BBPATH) ) 
    83                 $r = bb_get_option( 'uri' ) . substr($theme, strlen(BBPATH)); 
     83                $r = bb_get_uri(substr($theme, strlen(BBPATH))); 
    8484        else 
    8585                $r = false; 
    8686 
     
    153153        do_action('pre_post_form'); 
    154154 
    155155        if ( ( is_topic() && bb_current_user_can( 'write_post', $topic->topic_id ) && $page == $last_page ) || ( !is_topic() && bb_current_user_can( 'write_topic', $forum->forum_id ) ) ) { 
    156                 echo "<form class='postform' name='postform' id='postform' method='post' action='" . bb_get_option('uri') . "bb-post.php'>\n"; 
     156                echo "<form class='postform' name='postform' id='postform' method='post' action='" . bb_get_uri('bb-post.php', 'action') . "'>\n"; 
    157157                bb_load_template( 'post-form.php', array('h2' => $h2) ); 
    158158                bb_nonce_field( is_topic() ? 'create-post_' . $topic->topic_id : 'create-topic' ); 
    159159                if ( is_forum() ) 
     
    164164                echo "\n</form>"; 
    165165        } elseif ( !bb_is_user_logged_in() ) { 
    166166                echo '<p>'; 
    167                 printf(__('You must <a href="%s">log in</a> to post.'), attribute_escape( bb_get_option('uri') . 'bb-login.php' )); 
     167                printf(__('You must <a href="%s">log in</a> to post.'), attribute_escape( bb_get_uri('bb-login.php') )); 
    168168                echo '</p>'; 
    169169        } 
    170170        do_action('post_post_form'); 
     
    172172 
    173173function edit_form() { 
    174174        global $bb_post, $topic_title; 
    175         echo "<form name='post' id='post' method='post' action='" . bb_get_option('uri')  . "bb-edit.php'>\n"; 
     175        echo "<form name='post' id='post' method='post' action='" . bb_get_uri('bb-edit.php', 'action') . "'>\n"; 
    176176        bb_load_template( 'edit-form.php', array('topic_title') ); 
    177177        bb_nonce_field( 'edit-post_' . $bb_post->post_id ); 
    178178        echo "\n</form>"; 
     
    325325 
    326326function get_recent_rss_link() { 
    327327        if ( bb_get_option( 'mod_rewrite' ) ) 
    328                 $link = bb_get_option( 'uri' ) . 'rss/'
     328                $link = bb_get_uri('rss/', 'rss')
    329329        else 
    330                 $link = bb_get_option( 'uri' ) . "rss.php"
     330                $link = bb_get_uri('rss.php', 'rss')
    331331        return apply_filters( 'get_recent_rss_link', $link ); 
    332332} 
    333333 
     
    360360                } else { 
    361361                        $column = 'forum_id'; 
    362362                } 
    363                 $link = bb_get_option( 'uri' ) . "forum/" . $forum->$column . ( 1 < $page ? "/page/$page" : '' ); 
     363                $link = bb_get_uri( 'forum/' . $forum->$column . ( 1 < $page ? '/page/' . $page : '' ) ); 
    364364        } else { 
    365365                $args = array(); 
    366                 $link = bb_get_option( 'uri' ) . 'forum.php'
     366                $link = bb_get_uri('forum.php')
    367367                $args['id'] = $forum->forum_id; 
    368368                $args['page'] = 1 < $page ? $page : ''; 
    369369                $link = add_query_arg( $args, $link ); 
     
    439439function get_forum_rss_link( $forum_id = 0 ) { 
    440440        $forum = get_forum( get_forum_id( $forum_id ) ); 
    441441        if ( bb_get_option('mod_rewrite') ) 
    442                 $link = bb_get_option('uri') . "rss/forum/$forum->forum_id"
     442                $link = bb_get_uri('rss/forum/' . $forum->forum_id, 'rss')
    443443        else 
    444                 $link = bb_get_option('uri') . "rss.php?forum=$forum->forum_id"
     444                $link = bb_get_uri('rss.php', 'rss') . '?forum=' . $forum->forum_id
    445445 
    446446        return apply_filters( 'get_forum_rss_link', $link, $forum_id ); 
    447447} 
     
    555555                } else { 
    556556                        $column = 'topic_id'; 
    557557                } 
    558                 $link = bb_get_option('uri') . "topic/" . $topic->$column . ( 1 < $page ? "/page/$page" : '' ); 
     558                $link = bb_get_uri( "topic/" . $topic->$column . ( 1 < $page ? "/page/$page" : '' ) ); 
    559559        } else { 
    560                 $link = bb_get_option('uri') . 'topic.php'
     560                $link = bb_get_uri('topic.php')
    561561                $args['id'] = $topic->topic_id; 
    562562                $args['page'] = 1 < $page ? $page : ''; 
    563563        } 
     
    583583        $topic = get_topic( get_topic_id( $id ) ); 
    584584 
    585585        if ( bb_get_option('mod_rewrite') ) 
    586                 $link = bb_get_option('uri') . "rss/topic/$topic->topic_id"
     586                $link = bb_get_uri('rss/topic/' . $topic->topic_id, 'rss')
    587587        else 
    588                 $link = bb_get_option('uri') . "rss.php?topic=$topic->topic_id"; 
     588                $link = bb_get_uri('rss.php', 'rss') . "?topic=$topic->topic_id"; 
    589589 
    590590        return apply_filters( 'get_topic_rss_link', $link, $topic->topic_id ); 
    591591} 
     
    736736                return; 
    737737 
    738738        if ( 0 == $topic->topic_status ) 
    739                 echo "$before<a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/delete-topic.php?id=' . $topic->topic_id , 'delete-topic_' . $topic->topic_id ) ) . "' onclick=\"return confirm('" . js_escape( __('Are you sure you wanna delete that?') ) . "')\">" . __('Delete entire topic') . "</a>$after"; 
     739                echo "$before<a href='" . attribute_escape( bb_nonce_url( bb_get_uri('bb-admin/delete-topic.php') . '?id=' . $topic->topic_id , 'delete-topic_' . $topic->topic_id ) ) . "' onclick=\"return confirm('" . js_escape( __('Are you sure you wanna delete that?') ) . "')\">" . __('Delete entire topic') . "</a>$after"; 
    740740        else 
    741                 echo "$before<a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/delete-topic.php?id=' . $topic->topic_id . '&view=all', 'delete-topic_' . $topic->topic_id ) ) . "' onclick=\"return confirm('" . js_escape( __('Are you sure you wanna undelete that?') ) . "')\">" . __('Undelete entire topic') . "</a>$after"; 
     741                echo "$before<a href='" . attribute_escape( bb_nonce_url( bb_get_uri('bb-admin/delete-topic.php') . '?id=' . $topic->topic_id . '&view=all', 'delete-topic_' . $topic->topic_id ) ) . "' onclick=\"return confirm('" . js_escape( __('Are you sure you wanna undelete that?') ) . "')\">" . __('Undelete entire topic') . "</a>$after"; 
    742742} 
    743743 
    744744function topic_close_link( $args = '' ) { 
     
    752752                return; 
    753753 
    754754        $text = topic_is_open( $topic->topic_id ) ? __('Close topic') : __('Open topic'); 
    755         echo "$before<a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/topic-toggle.php?id=' . $topic->topic_id, 'close-topic_' . $topic->topic_id ) ) . "'>$text</a>$after"; 
     755        echo "$before<a href='" . attribute_escape( bb_nonce_url( bb_get_uri('bb-admin/topic-toggle.php') . '?id=' . $topic->topic_id, 'close-topic_' . $topic->topic_id ) ) . "'>$text</a>$after"; 
    756756} 
    757757 
    758758function topic_sticky_link( $args = '' ) { 
     
    766766                return; 
    767767 
    768768        if ( topic_is_sticky( $topic->topic_id ) ) 
    769                 echo "$before<a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/sticky.php?id=' . $topic->topic_id, 'stick-topic_' . $topic->topic_id ) ) . "'>". __('Unstick topic') ."</a>$after"; 
     769                echo "$before<a href='" . attribute_escape( bb_nonce_url( bb_get_uri('bb-admin/sticky.php') . '?id=' . $topic->topic_id, 'stick-topic_' . $topic->topic_id ) ) . "'>". __('Unstick topic') ."</a>$after"; 
    770770        else 
    771                 echo "$before<a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/sticky.php?id=' . $topic->topic_id, 'stick-topic_' . $topic->topic_id ) ) . "'>". __('Stick topic') . "</a> (<a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/sticky.php?id=' . $topic->topic_id . '&super=1', 'stick-topic_' . $topic->topic_id ) ) . "'>" . __('to front') . "</a>)$after"; 
     771                echo "$before<a href='" . attribute_escape( bb_nonce_url( bb_get_uri('bb-admin/sticky.php') . '?id=' . $topic->topic_id, 'stick-topic_' . $topic->topic_id ) ) . "'>". __('Stick topic') . "</a> (<a href='" . attribute_escape( bb_nonce_url( bb_get_uri('bb-admin/sticky.php') . '?id=' . $topic->topic_id . '&super=1', 'stick-topic_' . $topic->topic_id ) ) . "'>" . __('to front') . "</a>)$after"; 
    772772} 
    773773 
    774774function topic_show_all_link( $id = 0 ) { 
     
    817817        if ( !$dropdown ) 
    818818                return; 
    819819 
    820         echo '<form id="topic-move" method="post" action="' . bb_get_option('uri') . 'bb-admin/topic-move.php"><div>' . "\n\t"; 
     820        echo '<form id="topic-move" method="post" action="' . bb_get_uri('bb-admin/topic-move.php') . '"><div>' . "\n\t"; 
    821821        echo "<input type='hidden' name='topic_id' value='$topic->topic_id' />\n\t"; 
    822822        echo '<label for="forum_id">'. __('Move this topic to the selected forum:') . ' '; 
    823823        echo $dropdown; 
     
    851851        if ( is_forum() || is_bb_tag() ) 
    852852                $url = '#postform'; 
    853853        elseif ( is_front() ) 
    854                 $url = add_query_arg( 'new', '1', bb_get_option( 'uri' ) ); 
     854                $url = add_query_arg( 'new', '1', bb_get_uri() ); 
    855855        if ( !bb_is_user_logged_in() ) 
    856                 $url = add_query_arg( 're', urlencode($url), bb_get_option( 'uri' ) . 'bb-login.php' ); 
     856                $url = add_query_arg( 're', urlencode($url), bb_get_uri('bb-login.php') ); 
    857857        elseif ( is_forum() ) { 
    858858                if ( !bb_current_user_can( 'write_topic', get_forum_id() ) ) 
    859859                        return; 
     
    972972function post_ip_link( $post_id = 0 ) { 
    973973        if ( !bb_current_user_can( 'view_by_ip' ) ) 
    974974                return; 
    975         $link = '<a href="' . attribute_escape( bb_get_option('uri') . 'bb-admin/view-ip.php?ip=' . get_post_ip( $post_id ) ) . '">' . get_post_ip( $post_id ) . '</a>'; 
     975        $link = '<a href="' . attribute_escape( bb_get_uri('bb-admin/view-ip.php') . '?ip=' . get_post_ip( $post_id ) ) . '">' . get_post_ip( $post_id ) . '</a>'; 
    976976        echo apply_filters( 'post_ip_link', $link, get_post_id( $post_id ) ); 
    977977} 
    978978 
    979979function post_edit_link( $post_id = 0 ) { 
    980980        $bb_post = bb_get_post( get_post_id( $post_id ) ); 
    981981        if ( bb_current_user_can( 'edit_post', $bb_post->post_id ) ) 
    982                 echo "<a href='" . attribute_escape( apply_filters( 'post_edit_uri', bb_get_option('uri') . 'edit.php?id=' . $bb_post->post_id, $bb_post->post_id ) ) . "'>". __('Edit') ."</a>"; 
     982                echo "<a href='" . attribute_escape( apply_filters( 'post_edit_uri', bb_get_uri('edit.php') . '?id=' . $bb_post->post_id, $bb_post->post_id ) ) . "'>". __('Edit') ."</a>"; 
    983983} 
    984984 
    985985function post_del_class( $post_id = 0 ) { 
     
    997997                return; 
    998998 
    999999        if ( 1 == $bb_post->post_status ) 
    1000                 $r = "<a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/delete-post.php?id=' . $bb_post->post_id . '&status=0&view=all', 'delete-post_' . $bb_post->post_id ) ) . "' onclick='return confirm(\" ". js_escape( __('Are you sure you wanna undelete that?') ) ." \");'>". __('Undelete') ."</a>"; 
     1000                $r = "<a href='" . attribute_escape( bb_nonce_url( bb_get_uri('bb-admin/delete-post.php') . '?id=' . $bb_post->post_id . '&status=0&view=all', 'delete-post_' . $bb_post->post_id ) ) . "' onclick='return confirm(\" ". js_escape( __('Are you sure you wanna undelete that?') ) ." \");'>". __('Undelete') ."</a>"; 
    10011001        else 
    1002                 $r = "<a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/delete-post.php?id=' . $bb_post->post_id . '&status=1', 'delete-post_' . $bb_post->post_id ) ) . "' onclick='return ajaxPostDelete(" . $bb_post->post_id . ", \"" . get_post_author( $post_id ) . "\");'>". __('Delete') ."</a>"; 
     1002                $r = "<a href='" . attribute_escape( bb_nonce_url( bb_get_uri('bb-admin/delete-post.php') . '?id=' . $bb_post->post_id . '&status=1', 'delete-post_' . $bb_post->post_id ) ) . "' onclick='return ajaxPostDelete(" . $bb_post->post_id . ", \"" . get_post_author( $post_id ) . "\");'>". __('Delete') ."</a>"; 
    10031003        $r = apply_filters( 'post_delete_link', $r, $bb_post->post_status, $bb_post->post_id ); 
    10041004        echo $r; 
    10051005} 
     
    10931093                } else { 
    10941094                        $column = 'ID'; 
    10951095                } 
    1096                 $r = bb_get_option('uri') . "profile/" . $user->$column . ( 1 < $page ? "/page/$page" : '' ); 
     1096                $r = bb_get_uri( "profile/" . $user->$column . ( 1 < $page ? "/page/$page" : '' ) ); 
    10971097        } else { 
    1098                 $r = bb_get_option('uri') . "profile.php?id=$user->ID" . ( 1 < $page ? "&page=$page" : '' ); 
     1098                $r = bb_get_uri('profile.php') . "?id=$user->ID" . ( 1 < $page ? "&page=$page" : '' ); 
    10991099        } 
    11001100        return apply_filters( 'get_user_profile_link', $r, $user->ID ); 
    11011101} 
     
    13281328        $args = wp_parse_args( $args, $defaults ); 
    13291329        extract($args, EXTR_SKIP); 
    13301330 
    1331         return apply_filters( 'bb_get_logout_link', "$before<a href='" . attribute_escape( bb_get_option( 'uri' ) . 'bb-login.php?logout' ) . "'>$text</a>$after", $args ); 
     1331        return apply_filters( 'bb_get_logout_link', "$before<a href='" . attribute_escape( bb_get_uri('bb-login.php') . '?logout' ) . "'>$text</a>$after", $args ); 
    13321332} 
    13331333 
    13341334function bb_admin_link( $args = '' ) { 
     
    13471347        $args = wp_parse_args( $args, $defaults ); 
    13481348        extract($args, EXTR_SKIP); 
    13491349 
    1350         return apply_filters( 'bb_get_admin_link', "$before<a href='" . attribute_escape( bb_get_option( 'uri' ) . 'bb-admin/' ) . "'>$text</a>$after", $args ); 
     1350        return apply_filters( 'bb_get_admin_link', "$before<a href='" . attribute_escape( bb_get_uri('bb-admin/') ) . "'>$text</a>$after", $args ); 
    13511351} 
    13521352 
    13531353function bb_profile_link( $args = '' ) { 
     
    14791479                $_tag =& $tag; 
    14801480 
    14811481        if ( bb_get_option('mod_rewrite') ) 
    1482                 $link = bb_get_option('uri') . "rss/tags/$_tag->tag"
     1482                $link = bb_get_uri('rss/tags/' . $_tag->tag, 'rss')
    14831483        else 
    1484                 $link = bb_get_option('uri') . "rss.php?tag=$_tag->tag"; 
     1484                $link = bb_get_uri('rss.php', 'rss') . "?tag=$_tag->tag"; 
    14851485 
    14861486        return apply_filters( 'get_tag_rss_link', $link, $tag_id ); 
    14871487} 
     
    14901490        global $topic; 
    14911491        if ( !bb_current_user_can( 'edit_tag_by_on', bb_get_current_user_info( 'id' ), $topic->topic_id ) ) 
    14921492                return false; 
    1493         echo "<form id='tag-form' method='post' action='" . bb_get_option('uri') . "tag-add.php'>\n"; 
     1493        echo "<form id='tag-form' method='post' action='" . bb_get_uri('tag-add.php' , 'action') . "'>\n"; 
    14941494        bb_load_template( 'tag-form.php' ); 
    14951495        bb_nonce_field( 'add-tag_' . $topic->topic_id ); 
    14961496        echo "</form>"; 
     
    15021502                return false; 
    15031503        $form  = "<ul id='manage-tags'>\n "; 
    15041504        $form .= "<li id='tag-rename'>" . __('Rename tag:') . "\n\t"; 
    1505         $form .= "<form method='post' action='" . bb_get_option('uri') . "bb-admin/tag-rename.php'><div>\n\t"; 
     1505        $form .= "<form method='post' action='" . bb_get_uri('bb-admin/tag-rename.php', 'action') . "'><div>\n\t"; 
    15061506        $form .= "<input type='text' name='tag' size='10' maxlength='30' />\n\t"; 
    15071507        $form .= "<input type='hidden' name='id' value='$tag->tag_id' />\n\t"; 
    15081508        $form .= "<input type='submit' name='Submit' value='" . __('Rename') . "' />\n\t"; 
     
    15101510        bb_nonce_field( 'rename-tag_' . $tag->tag_id ); 
    15111511        echo "\n\t</div></form>\n  </li>\n "; 
    15121512        $form  = "<li id='tag-merge'>" . __('Merge this tag into:') . "\n\t"; 
    1513         $form .= "<form method='post' action='" . bb_get_option('uri') . "bb-admin/tag-merge.php'><div>\n\t"; 
     1513        $form .= "<form method='post' action='" . bb_get_uri('bb-admin/tag-merge.php', 'action') . "'><div>\n\t"; 
    15141514        $form .= "<input type='text' name='tag' size='10' maxlength='30' />\n\t"; 
    15151515        $form .= "<input type='hidden' name='id' value='$tag->tag_id' />\n\t"; 
    15161516        $form .= "<input type='submit' name='Submit' value='" . __('Merge') . "' "; 
     
    15191519        bb_nonce_field( 'merge-tag_' . $tag->tag_id ); 
    15201520        echo "\n\t</div></form>\n  </li>\n "; 
    15211521        $form  = "<li id='tag-destroy'>" . __('Destroy tag:') . "\n\t"; 
    1522         $form .= "<form method='post' action='" . bb_get_option('uri') . "bb-admin/tag-destroy.php'><div>\n\t"; 
     1522        $form .= "<form method='post' action='" . bb_get_uri('bb-admin/tag-destroy.php', 'action') . "'><div>\n\t"; 
    15231523        $form .= "<input type='hidden' name='id' value='$tag->tag_id' />\n\t"; 
    15241524        $form .= "<input type='submit' name='Submit' value='" . __('Destroy') . "' "; 
    15251525        $form .= 'onclick="return confirm(\'' . js_escape( sprintf(__('Are you sure you want to destroy the "%s" tag? This is permanent and cannot be undone.'), $tag->raw_tag) ) . "');\" />\n\t"; 
     
    15361536        global $tag, $topic; 
    15371537        if ( !bb_current_user_can( 'edit_tag_by_on', $tag->user_id, $topic->topic_id ) ) 
    15381538                return false; 
    1539         $url = add_query_arg( array('tag' => $tag->tag_id, 'user' => $tag->user_id, 'topic' => $tag->topic_id), bb_get_option('uri') . 'tag-remove.php' ); 
     1539        $url = add_query_arg( array('tag' => $tag->tag_id, 'user' => $tag->user_id, 'topic' => $tag->topic_id), bb_get_uri('tag-remove.php') ); 
    15401540        $r = '[<a href="' . attribute_escape( bb_nonce_url( $url, 'remove-tag_' . $tag->tag_id . '|' . $tag->topic_id) ) . '" onclick="return ajaxDelTag(' . $tag->tag_id . ', ' . $tag->user_id . ', \'' . js_escape($tag->raw_tag) . '\');" title="' . attribute_escape( __('Remove this tag') ) . '">x</a>]'; 
    15411541        return $r; 
    15421542} 
     
    17491749        $user = bb_get_user( bb_get_user_id( $id ) ); 
    17501750 
    17511751        if ( bb_get_option('mod_rewrite') ) 
    1752                 $link = bb_get_option('uri') . "rss/profile/$user->ID"
     1752                $link = bb_get_uri('rss/profile/' . $user->ID, 'rss')
    17531753        else 
    1754                 $link = bb_get_option('uri') . "rss.php?profile=$user->ID"
     1754                $link = bb_get_uri('rss.php', 'rss') . '?profile=' . $user->ID
    17551755 
    17561756        return apply_filters( 'get_favorites_rss_link', $link, $user->ID ); 
    17571757} 
     
    17941794                $v =& $view; 
    17951795 
    17961796        if ( !array_key_exists($v, $bb_views) ) 
    1797                 return bb_get_option('uri'); 
     1797                return bb_get_uri(); 
    17981798        if ( bb_get_option('mod_rewrite') ) 
    1799                 $link = bb_get_option('uri') . 'view/' . $v . ( 1 < $page ? "/page/$page" : '' ); 
     1799                $link = bb_get_uri( 'view/' . $v . ( 1 < $page ? '/page/' . $page : '' ) ); 
    18001800        else 
    1801                 $link = bb_get_option('uri') . "view.php?view=$v" . ( 1 < $page ? "&page=$page" : ''); 
     1801                $link = bb_get_uri('view.php') . '?view=' . $v . ( 1 < $page ? '&page=' . $page : ''); 
    18021802 
    18031803        return apply_filters( 'get_view_link', $link, $v, $page ); 
    18041804} 
  • bb-includes/js/wp-ajax-js.php

    old new  
    1919                                        tempObj.WPError(transport); 
    2020                        } 
    2121                }); 
    22                 this.url = url ? url : '<?php bb_option( 'uri' ); ?>bb-admin/admin-ajax.php'; 
     22                this.url = url ? url : '<?php bb_uri('bb-admin/admin-ajax.php'); ?>'; 
    2323                this.getResponseElement(responseEl); 
    2424        }, 
    2525        addArg: function(key, value) { 
  • favorites.php

    old new  
    2323                bb_remove_user_favorite( $user_id, $topic_id ); 
    2424 
    2525        $ref = wp_get_referer(); 
    26         if ( false !== strpos( $ref, bb_get_option('uri') ) ) 
     26        if ( false !== strpos( $ref, bb_get_uri() ) ) 
    2727                wp_redirect( $ref ); 
    2828        else 
    2929                wp_redirect( get_topic_link( $topic_id ) ); 
  • bb-edit.php

    old new  
    88$bb_post  = bb_get_post( $post_id ); 
    99 
    1010if ( !$bb_post ) { 
    11         wp_redirect( bb_get_option( 'uri' ) ); 
     11        wp_redirect( bb_get_uri() ); 
    1212        die(); 
    1313} 
    1414 
     
    2828if ($post_id) 
    2929        wp_redirect( get_post_link( $post_id ) ); 
    3030else 
    31         wp_redirect( bb_get_option( 'uri' ) ); 
     31        wp_redirect( bb_get_uri() ); 
    3232?> 
  • bb-post.php

    old new  
    5252if ($post_id) 
    5353        wp_redirect( $link ); 
    5454else 
    55         wp_redirect( bb_get_option( 'uri' ) ); 
     55        wp_redirect( bb_get_uri() ); 
    5656exit; 
    5757 
    5858?> 
  • bb-admin/topic-toggle.php

    old new  
    88        bb_die(__('There is a problem with that topic, pardner.')); 
    99 
    1010if ( !bb_current_user_can( 'close_topic', $topic_id ) ) { 
    11         wp_redirect( bb_get_option( 'uri' ) ); 
     11        wp_redirect( bb_get_uri() ); 
    1212        exit(); 
    1313} 
    1414 
  • bb-admin/site.php

    old new  
    88this unless you're upgrading from one version to another or are seeing 
    99pagination oddities.") ?></p> 
    1010 
    11 <form method="post" action="<?php bb_option('uri'); ?>bb-admin/bb-do-counts.php"> 
     11<form method="post" action="<?php bb_uri('bb-admin/bb-do-counts.php', 'action'); ?>"> 
    1212        <fieldset> 
    1313        <legend><?php _e('Choose items to recalculate') ?>