Skip to:
Content

bbPress.org

Ticket #715: bb_uri_patch.build912.patch

File bb_uri_patch.build912.patch, 56.9 KB (added by sambauers, 17 years ago)
  • bb-templates/kakumei/tags.php

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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') ?></legend>
    1414                <ol>
  • bb-admin/rewrite-rules.php

     
    44header('Content-type: text/plain');
    55
    66if ( !bb_current_user_can('manage_options') ) {
    7         wp_redirect( bb_get_option( 'uri' ) );
     7        wp_redirect( bb_get_uri() );
    88        exit();
    99}
    1010
  • bb-admin/admin-header.php

     
    33<head>
    44        <title><?php bb_admin_title() ?></title>
    55        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    6         <link rel="stylesheet" href="<?php bb_option('uri'); ?>bb-admin/style.css" type="text/css" />
     6        <link rel="stylesheet" href="<?php bb_uri('bb-admin/style.css'); ?>" type="text/css" />
    77<?php if ( 'rtl' == bb_get_option( 'text_direction' ) ) : ?>
    8         <link rel="stylesheet" href="<?php bb_option('uri'); ?>bb-admin/style-rtl.css" type="text/css" />
     8        <link rel="stylesheet" href="<?php bb_uri('bb-admin/style-rtl.css'); ?>" type="text/css" />
    99<?php endif; do_action('bb_admin_print_scripts'); do_action( 'bb_admin_head' ); ?>
    1010</head>
    1111
    1212<body>
    1313
    14 <div id="top"><h1>bbPress &#8212; <a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a></h1>
     14<div id="top"><h1>bbPress &#8212; <a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a></h1>
    1515<?php login_form(); ?>
    1616</div>
    1717<?php bb_admin_menu(); ?>
  • bb-admin/delete-topic.php

     
    44$topic_id = (int) $_GET['id'];
    55
    66if ( !bb_current_user_can( 'delete_topic', $topic_id ) ) {
    7         wp_redirect( bb_get_option( 'uri' ) );
     7        wp_redirect( bb_get_uri() );
    88        exit();
    99}
    1010
  • bb-admin/view-ip.php

     
    22require('admin.php');
    33
    44if ( !bb_current_user_can('view_by_ip') ) {
    5         wp_redirect( bb_get_option( 'uri' ) );
     5        wp_redirect( bb_get_uri() );
    66        exit();
    77}
    88
  • bb-admin/plugins.php

     
    8989                        <cite><?php printf( __('By %s.'), $plugin['author_link'] ); ?></cite>
    9090                </td>
    9191<?php if ( $class ) : ?>
    92                 <td class="action"><a class="delete" href="<?php echo attribute_escape( bb_nonce_url( add_query_arg( array('action' => 'deactivate', 'plugin' => urlencode($p)), bb_get_option( 'uri' ) . 'bb-admin/plugins.php' ), 'deactivate-plugin_' . $p ) ); ?>">Deactivate</a></td>
     92                <td class="action"><a class="delete" href="<?php echo attribute_escape( bb_nonce_url( add_query_arg( array('action' => 'deactivate', 'plugin' => urlencode($p)), bb_get_uri('bb-admin/plugins.php') ), 'deactivate-plugin_' . $p ) ); ?>">Deactivate</a></td>
    9393<?php else : ?>
    94                 <td class="action"><a class="edit" href="<?php echo attribute_escape( bb_nonce_url( add_query_arg( array('action' => 'activate', 'plugin' => urlencode($p)), bb_get_option( 'uri' ) . 'bb-admin/plugins.php' ), 'activate-plugin_' . $p ) ); ?>">Activate</a></td>
     94                <td class="action"><a class="edit" href="<?php echo attribute_escape( bb_nonce_url( add_query_arg( array('action' => 'activate', 'plugin' => urlencode($p)), bb_get_uri('bb-admin/plugins.php') ), 'activate-plugin_' . $p ) ); ?>">Activate</a></td>
    9595<?php endif; ?>
    9696        </tr>
    9797<?php endforeach; ?>
  • bb-admin/content-forums.php

     
    1717                bb_admin_notice( __('Forum Updated.') );
    1818                break;
    1919        case 'deleted' :
    20                 bb_admin_notice( sprintf(__('Forum deleted.  You should have bbPress <a href="%s">recount your site information</a>.'), bb_get_option( 'uri' ) . 'bb-admin/site.php') );
     20                bb_admin_notice( sprintf(__('Forum deleted.  You should have bbPress <a href="%s">recount your site information</a>.'), bb_get_uri('bb-admin/site.php')) );
    2121                break;
    2222        endswitch;
    2323}
     
    4242                <li><?php printf(__ngettext('%d post', '%d posts', $deleted_forum->posts), $deleted_forum->posts); ?></li>
    4343        </ul>
    4444
    45         <form method="post" id="delete-forums" action="<?php bb_option('uri'); ?>bb-admin/bb-forum.php">
     45        <form method="post" id="delete-forums" action="<?php bb_uri('bb-admin/bb-forum.php', 'action'); ?>">
    4646                <p>
    4747                        <label for="move-topics-delete"><input type="radio" name="move_topics" id="move-topics-delete" value="delete" /> <?php _e('Delete all topics and posts in this forum. <em>This can never be undone.</em>'); ?></label><br />
    4848                        <label for="move-topics-move"><input type="radio" name="move_topics" id="move-topics-move" value="move" checked="checked" /> <?php _e('Move topics from this forum into'); ?></label>
     
    5555                </p>
    5656                <?php bb_nonce_field( 'delete-forums' ); ?>
    5757        </form>
    58         <form method="get" action="<?php bb_option('uri'); ?>bb-admin/bb-forum.php">
     58        <form method="get" action="<?php bb_uri('bb-admin/bb-forum.php', 'action'); ?>">s
    5959                <p class="submit alignleft">
    6060                        <input type="submit" value="<?php _e('&laquo; Go back'); ?>" tabindex="10" />
    6161                </p>
  • bb-admin/delete-post.php

     
    44$post_id = (int) $_GET['id'];
    55
    66if ( !bb_current_user_can( 'delete_post', $post_id ) ) {
    7         wp_redirect( bb_get_option( 'uri' ) );
     7        wp_redirect( bb_get_uri() );
    88        exit();
    99}
    1010
  • bb-admin/upgrade.php

     
    2323$bb_upgrade = bb_upgrade_all();
    2424
    2525if ( $bb_upgrade > 0 )
    26         printf('<p>' . __('Upgrade complete.  <a href="%s">Enjoy!</a>') . '</p>', bb_get_option( 'uri' ) . 'bb-admin/' );
     26        printf('<p>' . __('Upgrade complete.  <a href="%s">Enjoy!</a>') . '</p>', bb_get_uri('bb-admin/') );
    2727else
    28         printf('<p>' . __('Nothing to upgrade.  <a href="%s">Get back to work!</a>') . '</p>', bb_get_option( 'uri' ) . 'bb-admin/' );
     28        printf('<p>' . __('Nothing to upgrade.  <a href="%s">Get back to work!</a>') . '</p>', bb_get_uri('bb-admin/') );
    2929
    3030printf('<p>' . __('%1$d queries and %2$s seconds.') . '</p>', $bbdb->num_queries, bb_timer_stop(0));
    3131
  • bb-admin/admin.php

     
    44bb_auth();
    55
    66if ( bb_get_option( 'bb_db_version' ) != bb_get_option_from_db( 'bb_db_version' ) )
    7         bb_die( sprintf(__("Your database is out-of-date.  Please <a href='%s'>upgrade</a>."), bb_get_option( 'uri' ) . 'bb-admin/upgrade.php') );
     7        bb_die( sprintf(__("Your database is out-of-date.  Please <a href='%s'>upgrade</a>."), bb_get_uri('bb-admin/upgrade.php')) );
    88
    99require('admin-functions.php');
    1010require('admin-deprecated.php');
  • bb-admin/admin-functions.php

     
    108108                }
    109109        endif;
    110110        if ( $bb_current_submenu && !bb_current_user_can( $bb_current_submenu[1] ) || !bb_current_user_can( $bb_current_menu[1] ) ) {
    111                 wp_redirect( bb_get_option( 'uri' ) );
     111                wp_redirect( bb_get_uri() );
    112112                exit();
    113113        }
    114114}
     
    525525        $r .= "\t\t<div class='list-block posrel'>\n";
    526526        $r .= "\t\t\t<div class='alignright'>\n";
    527527        if ( bb_current_user_can( 'manage_forums' ) )
    528                 $r .= "\t\t\t\t<a class='edit' href='" . attribute_escape( bb_get_option('uri') . "bb-admin/content-forums.php?action=edit&id=$_forum->forum_id" ) . "'>" . __('Edit') . "</a>\n";
     528                $r .= "\t\t\t\t<a class='edit' href='" . attribute_escape( bb_get_uri('bb-admin/content-forums.php') . "?action=edit&id=$_forum->forum_id" ) . "'>" . __('Edit') . "</a>\n";
    529529        if ( bb_current_user_can( 'delete_forum', $_forum->forum_id ) && 1 < $forums_count )
    530                 $r .= "\t\t\t\t<a class='delete' href='" . attribute_escape( bb_get_option('uri') . "bb-admin/content-forums.php?action=delete&id=$_forum->forum_id" ) . "'>" . __('Delete') . "</a>\n";
     530                $r .= "\t\t\t\t<a class='delete' href='" . attribute_escape( bb_get_uri('bb-admin/content-forums.php') . "?action=delete&id=$_forum->forum_id" ) . "'>" . __('Delete') . "</a>\n";
    531531        $r .= "\t\t\t</div>\n";
    532532        $r .= "\t\t\t" . get_forum_name( $_forum->forum_id ) . ' &#8212; ' . get_forum_description( $_forum->forum_id ) . "\n\t\t</div>\n";
    533533        if ( $close )
     
    544544                return;
    545545        $action = $forum_id ? 'update' : 'add';
    546546?>
    547 <form method="post" id="<?php echo $action; ?>-forum" action="<?php bb_option('uri'); ?>bb-admin/bb-forum.php">
     547<form method="post" id="<?php echo $action; ?>-forum" action="<?php bb_uri('bb-admin/bb-forum.php', 'action'); ?>">
    548548        <fieldset>
    549549        <table><col /><col style="width: 80%" />
    550550                <tr><th scope="row"><?php _e('Forum Name:'); ?></th>
  • bb-admin/tag-destroy.php

     
    1616if ( $destroyed = destroy_tag( $tag_id ) ) {
    1717        printf(__("Rows deleted from tags table: %d <br />\n"), $destroyed['tags']);
    1818        printf(__("Rows deleted from tagged table: %d <br />\n"), $destroyed['tagged']);
    19         printf(__('<a href="%s">Home</a>'), bb_get_option( 'uri' ));
     19        printf(__('<a href="%s">Home</a>'), bb_get_uri());
    2020} else {
    2121   die(printf(__("Something odd happened when attempting to destroy that tag.<br />\n<a href=\"%s\">Try Again?</a>"), wp_get_referer()));
    2222}
  • bb-admin/sticky.php

     
    99        bb_die(__('There is a problem with that topic, pardner.'));
    1010
    1111if ( !bb_current_user_can( 'stick_topic', $topic_id ) ) {
    12         wp_redirect( bb_get_option( 'uri' ) );
     12        wp_redirect( bb_get_uri() );
    1313        exit();
    1414}
    1515
  • bb-admin/install.php

     
    3232                $user->set_role( 'keymaster' ); ?>
    3333
    3434<p><?php printf(__('%s is now a Key Master'), $user->data->user_login); ?></p>
    35 <p><a href="<?php bb_option( 'uri' ); ?>"><?php _e('Back to the front page'); ?></a></p>
     35<p><a href="<?php bb_uri(); ?>"><?php _e('Back to the front page'); ?></a></p>
    3636
    3737<?php   else : ?>
    3838
     
    292292
    293293--The bbPress Team
    294294http://bbpress.org/
    295 "), bb_get_option( 'uri' ), $admin_login, $password);
     295"), bb_get_uri(), $admin_login, $password);
    296296
    297297@mail(bb_get_option( 'admin_email' ), __('New bbPress installation'), $message, $message_headers);?>
    298298
  • bb-admin/bb-forum.php

     
    55        bb_die(__("You don't have the authority to mess with the forums."));
    66
    77if ( !isset($_POST['action']) )
    8         wp_redirect( bb_get_option( 'uri' ) . 'bb-admin/content-forums.php' );
     8        wp_redirect( bb_get_uri('bb-admin/content-forums.php') );
    99
    1010$sent_from = wp_get_referer();
    1111
  • bb-admin/topic-move.php

     
    88        bb_die(__('Invalid topic or forum.'));
    99
    1010if ( !bb_current_user_can( 'move_topic', $topic_id, $forum_id ) ) {
    11         wp_redirect( bb_get_option( 'uri' ) );
     11        wp_redirect( bb_get_uri() );
    1212        exit();
    1313}
    1414
  • bb-admin/themes.php

     
    33
    44if ( isset($_GET['theme']) ) {
    55        if ( !bb_current_user_can( 'use_keys' ) ) {
    6                 wp_redirect( bb_get_option( 'uri' ) );
     6                wp_redirect( bb_get_uri() );
    77                exit;
    88        }
    99        bb_check_admin_referer( 'switch-theme' );
    1010        $activetheme = stripslashes($_GET['theme']);
    1111        bb_update_option( 'bb_active_theme', $activetheme );
    12         wp_redirect( bb_get_option( 'uri' ) . 'bb-admin/themes.php?activated' );
     12        wp_redirect( bb_get_uri('bb-admin/themes.php') . '?activated' );
    1313        exit;
    1414}
    1515
     
    2929function bb_admin_theme_row( $theme ) {
    3030        $theme_data = file_exists( $theme . 'style.css' ) ? bb_get_theme_data( $theme . 'style.css' ) : false;
    3131        $screen_shot = file_exists( $theme . 'screenshot.png' ) ? clean_url( bb_get_theme_uri( $theme . 'screenshot.png' ) ) : false;
    32         $activation_url = clean_url( bb_nonce_url( add_query_arg( 'theme', urlencode($theme), bb_get_option( 'uri' ) . 'bb-admin/themes.php' ), 'switch-theme' ) );
     32        $activation_url = clean_url( bb_nonce_url( add_query_arg( 'theme', urlencode($theme), bb_get_uri('bb-admin/themes.php') ), 'switch-theme' ) );
    3333?>
    3434        <li<?php alt_class( 'theme', $class ); ?>>
    3535                <div class="screen-shot"><?php if ( $screen_shot ) : ?><a href="<?php echo $activation_url; ?>" title="<?php echo attribute_escape( __('Click to activate') ); ?>"><img alt="<?php echo attribute_escape( $theme_data['Title'] ); ?>" src="<?php echo $screen_shot; ?>" /></a><?php endif; ?></div>
  • profile-edit.php

     
    44bb_auth();
    55
    66if ( !bb_current_user_can( 'edit_user', $user_id ) ) {
    7         $sendto = bb_get_option('uri');
     7        $sendto = bb_get_uri();
    88        wp_redirect( $sendto );
    99}
    1010
     
    4848        if ( bb_current_user_can('edit_users') ):
    4949                if ( isset($_POST['delete-user']) && $_POST['delete-user'] && $bb_current_id != $user->ID ) :
    5050                        bb_delete_user( $user->ID );
    51                         wp_redirect( bb_get_option( 'uri' ) );
     51                        wp_redirect( bb_get_uri() );
    5252                        exit;
    5353                endif;
    5454                $role = $_POST['role'];
  • edit.php

     
    88$bb_post  = bb_get_post( $post_id );
    99
    1010if ( !$bb_post || !bb_current_user_can( 'edit_post', $post_id ) ) {
    11         wp_redirect( bb_get_option( 'uri' ) );
     11        wp_redirect( bb_get_uri() );
    1212        die();
    1313}
    1414