Ticket #715: bb_uri_patch.build912.patch
File bb_uri_patch.build912.patch, 56.9 KB (added by , 17 years ago) |
---|
-
bb-templates/kakumei/tags.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php _e('Tags'); ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Tags'); ?></h3> 4 4 5 5 <p><?php _e('This is a collection of tags that are currently popular on the forums.'); ?></p> 6 6 -
bb-templates/kakumei/favorites.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php _e('Favorites'); ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Favorites'); ?></h3> 4 4 5 5 <h2 id="currentfavorites"><?php _e('Current Favorites'); ?><?php if ( $topics ) echo ' (' . $favorites_total . ')'; ?></h2> 6 6 -
bb-templates/kakumei/search.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php _e('Search')?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Search')?></h3> 4 4 <?php bb_topic_search_form(); ?> 5 5 6 6 <?php if ( !empty ( $q ) ) : ?> … … 35 35 <p><?php _e('No results found.') ?></p> 36 36 <?php endif; ?> 37 37 <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> 39 39 <?php bb_get_footer(); ?> -
bb-templates/kakumei/login.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php _e('Log in'); ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Log in'); ?></h3> 4 4 5 5 <h2><?php isset($_POST['user_login']) ? _e('Log in Failed') : _e('Log in') ; ?></h2> 6 6 7 7 8 <form method="post" action="<?php bb_ option('uri'); ?>bb-login.php">8 <form method="post" action="<?php bb_uri('bb-login.php', 'action'); ?>"> 9 9 <table width="50%"> 10 10 <?php if ( $user_exists ) : ?> 11 11 <tr valign="top"> … … 21 21 <tr valign="top" class="error"> 22 22 <th scope="row"><?php _e('Username:'); ?></th> 23 23 <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> 25 25 </tr> 26 26 <tr valign="top"> 27 27 <th scope="row"><?php _e('Password:'); ?></th> … … 47 47 48 48 <?php if ( $user_exists ) : ?> 49 49 <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'); ?>"> 51 51 <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 /> 52 52 <input name="user_login" type="hidden" value="<?php echo $user_login; ?>" /> 53 53 <input type="submit" value="<?php echo attribute_escape( __('Recover Password »') ); ?>" /></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> 3 3 <p> 4 4 <label><?php _e('Username:'); ?><br /> 5 5 <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
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php view_name(); ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php view_name(); ?></h3> 4 4 5 5 <?php if ( $topics || $stickies ) : ?> 6 6 -
bb-templates/kakumei/topic.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <a href="<?php forum_link(); ?>"><?php forum_name(); ?></a></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <a href="<?php forum_link(); ?>"><?php forum_name(); ?></a></h3> 4 4 <div class="infobox"> 5 5 6 6 <div id="topic-info"> -
bb-templates/kakumei/password-reset.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php _e('Log in'); ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Log in'); ?></h3> 4 4 5 5 <h2><?php _e('Password Reset'); ?></h2> 6 6 -
bb-templates/kakumei/profile-edit.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php _e('Edit Profile'); ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Edit Profile'); ?></h3> 4 4 <h2 id="userlogin"><?php echo get_user_name( $user->ID ); ?></h2> 5 5 <form method="post" action="<?php profile_tab_link($user->ID, 'edit'); ?>"> 6 6 <fieldset> -
bb-templates/kakumei/header.php
15 15 var page = <?php global $page; echo $page; ?>; 16 16 var currentUserId = <?php bb_current_user_info( 'id' ); ?>; 17 17 var topicId = <?php topic_id(); ?>; 18 var uriBase = '<?php bb_ option('uri'); ?>';18 var uriBase = '<?php bb_uri(null, 'script'); ?>'; 19 19 var tagLinkBase = '<?php bb_tag_link_base(); ?>'; 20 20 var favoritesLink = '<?php favorites_link(); ?>'; 21 21 var isFav = <?php if ( false === $is_fav = is_user_favorite( bb_get_current_user_info( 'id' ) ) ) echo "'no'"; else echo $is_fav; ?>; … … 31 31 <div id="wrapper"> 32 32 33 33 <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> 35 35 <?php login_form(); ?> 36 36 37 37 </div> -
bb-templates/kakumei/forum.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php forum_name(); ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php forum_name(); ?></h3> 4 4 5 5 <?php if ( $topics || $stickies ) : ?> 6 6 -
bb-templates/kakumei/rss2.php
9 9 10 10 <channel> 11 11 <title><?php echo $title; ?></title> 12 <link><?php bb_ option('uri'); ?></link>12 <link><?php bb_uri(); ?></link> 13 13 <description><?php echo $title; ?></description> 14 14 <language>en</language> 15 15 <pubDate><?php echo gmdate('D, d M Y H:i:s +0000'); ?></pubDate> … … 20 20 <link><?php post_link(); ?></link> 21 21 <pubDate><?php bb_post_time('D, d M Y H:i:s +0000'); ?></pubDate> 22 22 <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> 24 24 <description><?php post_text(); ?></description> 25 25 </item> 26 26 <?php endforeach; ?> -
bb-templates/kakumei/register-success.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php _e('Register'); ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Register'); ?></h3> 4 4 5 5 <h2 id="register"><?php _e('Great!'); ?></h2> 6 6 -
bb-templates/kakumei/tag-single.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <a href="<?php tag_page_link(); ?>"><?php _e('Tags'); ?></a> » <?php tag_name(); ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <a href="<?php tag_page_link(); ?>"><?php _e('Tags'); ?></a> » <?php tag_name(); ?></h3> 4 4 5 5 <p><a href="<?php tag_rss_link(); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr> link for this tag.') ?></a></p> 6 6 -
bb-templates/kakumei/stats.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php _e('Statistics'); ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Statistics'); ?></h3> 4 4 5 5 <dl> 6 6 <dt><?php _e('Registered Users'); ?></dt> -
bb-templates/kakumei/profile.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php _e('Profile') ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Profile') ?></h3> 4 4 <h2 id="userlogin"><?php echo get_user_name( $user->ID ); ?></h2> 5 5 6 6 <?php if ( $updated ) : ?> -
bb-templates/kakumei/front-page.php
74 74 75 75 <?php else : // $forums ?> 76 76 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> 78 78 79 79 <?php post_form(); endif; // $forums ?> 80 80 -
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"> 2 2 <p><?php _e('Search:'); ?> 3 3 <input type="text" size="38" maxlength="100" name="q" value="<?php echo attribute_escape( $q ); ?>" /> 4 4 </p> -
bb-templates/kakumei/profile-base.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php echo $profile_page_title; ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php echo $profile_page_title; ?></h3> 4 4 <h2><?php echo get_user_name( $user->ID ); ?></h2> 5 5 6 6 <?php bb_profile_base_content(); ?> -
bb-templates/kakumei/edit-post.php
1 1 <?php bb_get_header(); ?> 2 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php _e('Edit Post'); ?></h3>2 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Edit Post'); ?></h3> 3 3 4 4 <?php edit_form(); ?> 5 5 -
bb-templates/kakumei/register.php
1 1 <?php bb_get_header(); ?> 2 2 3 <h3 class="bbcrumb"><a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php _e('Register'); ?></h3>3 <h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Register'); ?></h3> 4 4 5 5 <h2 id="register"><?php _e('Registration'); ?></h2> 6 6 7 7 <?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'); ?>"> 9 9 <fieldset> 10 10 <legend><?php _e('Profile Information'); ?></legend> 11 11 <p><?php _e("Your password will be emailed to the address you provide."); ?></p> -
bb-login.php
3 3 4 4 $ref = wp_get_referer(); 5 5 6 $re = bb_get_ option('uri');6 $re = bb_get_uri(); 7 7 8 if ( 0 === strpos($ref, bb_get_ option( 'uri')) ) {8 if ( 0 === strpos($ref, bb_get_uri()) ) { 9 9 $re = $_POST['re'] ? $_POST['re'] : $_GET['re']; 10 if ( 0 !== strpos($re, bb_get_ option( 'uri')) )10 if ( 0 !== strpos($re, bb_get_uri()) ) 11 11 $re = $ref . $re; 12 12 } 13 13 14 if ( 0 === strpos($re, bb_get_ option( 'uri' ) . 'register.php') )15 $re = bb_get_ option( 'uri');14 if ( 0 === strpos($re, bb_get_uri('register.php')) ) 15 $re = bb_get_uri(); 16 16 17 17 $re = clean_url( $re ); 18 18 -
bb-includes/akismet.php
8 8 9 9 function bb_akismet_verify_key( $key ) { 10 10 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') ); 12 12 $response = bb_ksd_http_post("key=$key&blog=$blog", 'rest.akismet.com', '/1.1/verify-key', $bb_ksd_api_port); 13 13 if ( 'valid' == $response[1] ) 14 14 return true; … … 55 55 return; 56 56 57 57 $_submit = array( 58 'blog' => bb_get_ option('uri'),58 'blog' => bb_get_uri(null, 'akismet'), 59 59 'user_ip' => $bb_post->poster_ip, 60 60 'permalink' => get_topic_link( $bb_post->topic_id ), // First page 61 61 'comment_type' => 'forum', … … 77 77 return; 78 78 79 79 $_submit = array( 80 'blog' => bb_get_ option('uri'),80 'blog' => bb_get_uri(null, 'akismet'), 81 81 'permalink' => get_user_profile_link( $user->ID ), 82 82 'comment_type' => 'profile', 83 83 'comment_author' => get_user_name( $user->ID ), … … 94 94 $path = '/1.1/comment-check'; 95 95 96 96 $_submit = array( 97 'blog' => bb_get_ option('uri'),97 'blog' => bb_get_uri(null, 'akismet'), 98 98 'user_ip' => preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] ), 99 99 'user_agent' => $_SERVER['HTTP_USER_AGENT'], 100 100 'referrer' => $_SERVER['HTTP_REFERER'], … … 217 217 if ( !bb_current_user_can('moderate') ) 218 218 return $link; 219 219 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>"; 221 221 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>"; 223 223 return $link; 224 224 } 225 225 -
bb-includes/deprecated.php
298 298 299 299 // It's not omnipotent 300 300 function 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 ); 302 302 } 303 303 304 304 // Neither is this one 305 305 function 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 ); 307 307 } 308 308 309 309 function bb_convert_path_base( $path, $from_base, $to_base ) { -
bb-includes/pluggable.php
8 8 (empty($_COOKIE[bb_get_option( 'usercookie' )])) ) { 9 9 nocache_headers(); 10 10 11 header('Location: ' . bb_get_ option('uri'));11 header('Location: ' . bb_get_uri()); 12 12 exit(); 13 13 } 14 14 } -
bb-includes/script-loader.php
61 61 $ver = $this->scripts[$handle]->ver ? $this->scripts[$handle]->ver : $bb_db_version; 62 62 if ( isset($this->args[$handle]) ) 63 63 $ver .= '&' . $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; 65 65 $src = add_query_arg('ver', $ver, $src); 66 66 $src = apply_filters( 'bb_script_loader_src', $src ); 67 67 $src = attribute_escape( $src ); -
bb-includes/functions.php
1239 1239 return bb_delete_meta( 0, $option, $value, 'topic', true ); 1240 1240 } 1241 1241 1242 function bb_uri($file = null, $context = 'href') { 1243 echo apply_filters('bb_uri', bb_get_uri($file, $context), $file, $context); 1244 } 1245 1246 function 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 1242 1251 // This is the only function that should add to $bb_(user||topic)_cache 1243 1252 function bb_append_meta( $object, $type ) { 1244 1253 global $bbdb, $bb_table_prefix; … … 1867 1876 1868 1877 function bb_nonce_ays($action) { 1869 1878 if ( !$adminurl = wp_get_referer() ) 1870 $adminurl = bb_get_ option( 'uri' ) . '/bb-admin';1879 $adminurl = bb_get_uri('bb-admin/'); 1871 1880 1872 1881 $title = wp_specialchars( __('bbPress Confirmation') ); 1873 1882 $adminurl = attribute_escape( $adminurl ); … … 1903 1912 <head> 1904 1913 <title><?php echo $title ?></title> 1905 1914 <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" /> 1907 1916 <?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" /> 1909 1918 <?php endif; ?> 1910 1919 </head> 1911 1920 <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> 1913 1922 <?php 1914 1923 } 1915 1924 -
bb-includes/registration-functions.php
52 52 53 53 %s 54 54 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') );55 If 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') ); 56 56 57 57 endif; 58 58 } … … 110 110 if ( $user ) : 111 111 $message = __("Your username is: %1\$s \nYour password is: %2\$s \nYou can now log in: %3\$s \n\nEnjoy!"); 112 112 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') ), 114 114 'From: ' . bb_get_option('admin_email') 115 115 ); 116 116 -
bb-includes/template-functions.php
60 60 if ( file_exists( $active_theme . 'style.css' ) ) 61 61 $r = bb_get_active_theme_uri() . $css_file; 62 62 else 63 $r = bb_get_ option( 'uri' ) . "bb-templates/kakumei/$css_file";63 $r = bb_get_uri('bb-templates/kakumei/' . $css_file); 64 64 return apply_filters( 'bb_get_stylesheet_uri', $r, $stylesheet ); 65 65 } 66 66 … … 80 80 elseif ( 0 === strpos($theme, BBTHEMEDIR) ) 81 81 $r = BBTHEMEURL . substr($theme, strlen(BBTHEMEDIR)); 82 82 elseif ( 0 === strpos($theme, BBPATH) ) 83 $r = bb_get_ option( 'uri' ) . substr($theme, strlen(BBPATH));83 $r = bb_get_uri(substr($theme, strlen(BBPATH))); 84 84 else 85 85 $r = false; 86 86 … … 153 153 do_action('pre_post_form'); 154 154 155 155 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"; 157 157 bb_load_template( 'post-form.php', array('h2' => $h2) ); 158 158 bb_nonce_field( is_topic() ? 'create-post_' . $topic->topic_id : 'create-topic' ); 159 159 if ( is_forum() ) … … 164 164 echo "\n</form>"; 165 165 } elseif ( !bb_is_user_logged_in() ) { 166 166 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') )); 168 168 echo '</p>'; 169 169 } 170 170 do_action('post_post_form'); … … 172 172 173 173 function edit_form() { 174 174 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"; 176 176 bb_load_template( 'edit-form.php', array('topic_title') ); 177 177 bb_nonce_field( 'edit-post_' . $bb_post->post_id ); 178 178 echo "\n</form>"; … … 325 325 326 326 function get_recent_rss_link() { 327 327 if ( bb_get_option( 'mod_rewrite' ) ) 328 $link = bb_get_ option( 'uri' ) . 'rss/';328 $link = bb_get_uri('rss/', 'rss'); 329 329 else 330 $link = bb_get_ option( 'uri' ) . "rss.php";330 $link = bb_get_uri('rss.php', 'rss'); 331 331 return apply_filters( 'get_recent_rss_link', $link ); 332 332 } 333 333 … … 360 360 } else { 361 361 $column = 'forum_id'; 362 362 } 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 : '' ) ); 364 364 } else { 365 365 $args = array(); 366 $link = bb_get_ option( 'uri' ) . 'forum.php';366 $link = bb_get_uri('forum.php'); 367 367 $args['id'] = $forum->forum_id; 368 368 $args['page'] = 1 < $page ? $page : ''; 369 369 $link = add_query_arg( $args, $link ); … … 439 439 function get_forum_rss_link( $forum_id = 0 ) { 440 440 $forum = get_forum( get_forum_id( $forum_id ) ); 441 441 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'); 443 443 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; 445 445 446 446 return apply_filters( 'get_forum_rss_link', $link, $forum_id ); 447 447 } … … 555 555 } else { 556 556 $column = 'topic_id'; 557 557 } 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" : '' ) ); 559 559 } else { 560 $link = bb_get_ option('uri') . 'topic.php';560 $link = bb_get_uri('topic.php'); 561 561 $args['id'] = $topic->topic_id; 562 562 $args['page'] = 1 < $page ? $page : ''; 563 563 } … … 583 583 $topic = get_topic( get_topic_id( $id ) ); 584 584 585 585 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'); 587 587 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"; 589 589 590 590 return apply_filters( 'get_topic_rss_link', $link, $topic->topic_id ); 591 591 } … … 736 736 return; 737 737 738 738 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"; 740 740 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"; 742 742 } 743 743 744 744 function topic_close_link( $args = '' ) { … … 752 752 return; 753 753 754 754 $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"; 756 756 } 757 757 758 758 function topic_sticky_link( $args = '' ) { … … 766 766 return; 767 767 768 768 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"; 770 770 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"; 772 772 } 773 773 774 774 function topic_show_all_link( $id = 0 ) { … … 817 817 if ( !$dropdown ) 818 818 return; 819 819 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"; 821 821 echo "<input type='hidden' name='topic_id' value='$topic->topic_id' />\n\t"; 822 822 echo '<label for="forum_id">'. __('Move this topic to the selected forum:') . ' '; 823 823 echo $dropdown; … … 851 851 if ( is_forum() || is_bb_tag() ) 852 852 $url = '#postform'; 853 853 elseif ( is_front() ) 854 $url = add_query_arg( 'new', '1', bb_get_ option( 'uri') );854 $url = add_query_arg( 'new', '1', bb_get_uri() ); 855 855 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') ); 857 857 elseif ( is_forum() ) { 858 858 if ( !bb_current_user_can( 'write_topic', get_forum_id() ) ) 859 859 return; … … 972 972 function post_ip_link( $post_id = 0 ) { 973 973 if ( !bb_current_user_can( 'view_by_ip' ) ) 974 974 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>'; 976 976 echo apply_filters( 'post_ip_link', $link, get_post_id( $post_id ) ); 977 977 } 978 978 979 979 function post_edit_link( $post_id = 0 ) { 980 980 $bb_post = bb_get_post( get_post_id( $post_id ) ); 981 981 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>"; 983 983 } 984 984 985 985 function post_del_class( $post_id = 0 ) { … … 997 997 return; 998 998 999 999 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>"; 1001 1001 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>"; 1003 1003 $r = apply_filters( 'post_delete_link', $r, $bb_post->post_status, $bb_post->post_id ); 1004 1004 echo $r; 1005 1005 } … … 1093 1093 } else { 1094 1094 $column = 'ID'; 1095 1095 } 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" : '' ) ); 1097 1097 } 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" : '' ); 1099 1099 } 1100 1100 return apply_filters( 'get_user_profile_link', $r, $user->ID ); 1101 1101 } … … 1328 1328 $args = wp_parse_args( $args, $defaults ); 1329 1329 extract($args, EXTR_SKIP); 1330 1330 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 ); 1332 1332 } 1333 1333 1334 1334 function bb_admin_link( $args = '' ) { … … 1347 1347 $args = wp_parse_args( $args, $defaults ); 1348 1348 extract($args, EXTR_SKIP); 1349 1349 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 ); 1351 1351 } 1352 1352 1353 1353 function bb_profile_link( $args = '' ) { … … 1479 1479 $_tag =& $tag; 1480 1480 1481 1481 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'); 1483 1483 else 1484 $link = bb_get_ option('uri') . "rss.php?tag=$_tag->tag";1484 $link = bb_get_uri('rss.php', 'rss') . "?tag=$_tag->tag"; 1485 1485 1486 1486 return apply_filters( 'get_tag_rss_link', $link, $tag_id ); 1487 1487 } … … 1490 1490 global $topic; 1491 1491 if ( !bb_current_user_can( 'edit_tag_by_on', bb_get_current_user_info( 'id' ), $topic->topic_id ) ) 1492 1492 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"; 1494 1494 bb_load_template( 'tag-form.php' ); 1495 1495 bb_nonce_field( 'add-tag_' . $topic->topic_id ); 1496 1496 echo "</form>"; … … 1502 1502 return false; 1503 1503 $form = "<ul id='manage-tags'>\n "; 1504 1504 $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"; 1506 1506 $form .= "<input type='text' name='tag' size='10' maxlength='30' />\n\t"; 1507 1507 $form .= "<input type='hidden' name='id' value='$tag->tag_id' />\n\t"; 1508 1508 $form .= "<input type='submit' name='Submit' value='" . __('Rename') . "' />\n\t"; … … 1510 1510 bb_nonce_field( 'rename-tag_' . $tag->tag_id ); 1511 1511 echo "\n\t</div></form>\n </li>\n "; 1512 1512 $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"; 1514 1514 $form .= "<input type='text' name='tag' size='10' maxlength='30' />\n\t"; 1515 1515 $form .= "<input type='hidden' name='id' value='$tag->tag_id' />\n\t"; 1516 1516 $form .= "<input type='submit' name='Submit' value='" . __('Merge') . "' "; … … 1519 1519 bb_nonce_field( 'merge-tag_' . $tag->tag_id ); 1520 1520 echo "\n\t</div></form>\n </li>\n "; 1521 1521 $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"; 1523 1523 $form .= "<input type='hidden' name='id' value='$tag->tag_id' />\n\t"; 1524 1524 $form .= "<input type='submit' name='Submit' value='" . __('Destroy') . "' "; 1525 1525 $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"; … … 1536 1536 global $tag, $topic; 1537 1537 if ( !bb_current_user_can( 'edit_tag_by_on', $tag->user_id, $topic->topic_id ) ) 1538 1538 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') ); 1540 1540 $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>]'; 1541 1541 return $r; 1542 1542 } … … 1749 1749 $user = bb_get_user( bb_get_user_id( $id ) ); 1750 1750 1751 1751 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'); 1753 1753 else 1754 $link = bb_get_ option('uri') . "rss.php?profile=$user->ID";1754 $link = bb_get_uri('rss.php', 'rss') . '?profile=' . $user->ID; 1755 1755 1756 1756 return apply_filters( 'get_favorites_rss_link', $link, $user->ID ); 1757 1757 } … … 1794 1794 $v =& $view; 1795 1795 1796 1796 if ( !array_key_exists($v, $bb_views) ) 1797 return bb_get_ option('uri');1797 return bb_get_uri(); 1798 1798 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 : '' ) ); 1800 1800 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 : ''); 1802 1802 1803 1803 return apply_filters( 'get_view_link', $link, $v, $page ); 1804 1804 } -
bb-includes/js/wp-ajax-js.php
19 19 tempObj.WPError(transport); 20 20 } 21 21 }); 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'); ?>'; 23 23 this.getResponseElement(responseEl); 24 24 }, 25 25 addArg: function(key, value) { -
favorites.php
23 23 bb_remove_user_favorite( $user_id, $topic_id ); 24 24 25 25 $ref = wp_get_referer(); 26 if ( false !== strpos( $ref, bb_get_ option('uri') ) )26 if ( false !== strpos( $ref, bb_get_uri() ) ) 27 27 wp_redirect( $ref ); 28 28 else 29 29 wp_redirect( get_topic_link( $topic_id ) ); -
bb-edit.php
8 8 $bb_post = bb_get_post( $post_id ); 9 9 10 10 if ( !$bb_post ) { 11 wp_redirect( bb_get_ option( 'uri') );11 wp_redirect( bb_get_uri() ); 12 12 die(); 13 13 } 14 14 … … 28 28 if ($post_id) 29 29 wp_redirect( get_post_link( $post_id ) ); 30 30 else 31 wp_redirect( bb_get_ option( 'uri') );31 wp_redirect( bb_get_uri() ); 32 32 ?> -
bb-post.php
52 52 if ($post_id) 53 53 wp_redirect( $link ); 54 54 else 55 wp_redirect( bb_get_ option( 'uri') );55 wp_redirect( bb_get_uri() ); 56 56 exit; 57 57 58 58 ?> -
bb-admin/topic-toggle.php
8 8 bb_die(__('There is a problem with that topic, pardner.')); 9 9 10 10 if ( !bb_current_user_can( 'close_topic', $topic_id ) ) { 11 wp_redirect( bb_get_ option( 'uri') );11 wp_redirect( bb_get_uri() ); 12 12 exit(); 13 13 } 14 14 -
bb-admin/site.php
8 8 this unless you're upgrading from one version to another or are seeing 9 9 pagination oddities.") ?></p> 10 10 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'); ?>"> 12 12 <fieldset> 13 13 <legend><?php _e('Choose items to recalculate') ?></legend> 14 14 <ol> -
bb-admin/rewrite-rules.php
4 4 header('Content-type: text/plain'); 5 5 6 6 if ( !bb_current_user_can('manage_options') ) { 7 wp_redirect( bb_get_ option( 'uri') );7 wp_redirect( bb_get_uri() ); 8 8 exit(); 9 9 } 10 10 -
bb-admin/admin-header.php
3 3 <head> 4 4 <title><?php bb_admin_title() ?></title> 5 5 <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" /> 7 7 <?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" /> 9 9 <?php endif; do_action('bb_admin_print_scripts'); do_action( 'bb_admin_head' ); ?> 10 10 </head> 11 11 12 12 <body> 13 13 14 <div id="top"><h1>bbPress — <a href="<?php bb_ option('uri'); ?>"><?php bb_option('name'); ?></a></h1>14 <div id="top"><h1>bbPress — <a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a></h1> 15 15 <?php login_form(); ?> 16 16 </div> 17 17 <?php bb_admin_menu(); ?> -
bb-admin/delete-topic.php
4 4 $topic_id = (int) $_GET['id']; 5 5 6 6 if ( !bb_current_user_can( 'delete_topic', $topic_id ) ) { 7 wp_redirect( bb_get_ option( 'uri') );7 wp_redirect( bb_get_uri() ); 8 8 exit(); 9 9 } 10 10 -
bb-admin/view-ip.php
2 2 require('admin.php'); 3 3 4 4 if ( !bb_current_user_can('view_by_ip') ) { 5 wp_redirect( bb_get_ option( 'uri') );5 wp_redirect( bb_get_uri() ); 6 6 exit(); 7 7 } 8 8 -
bb-admin/plugins.php
89 89 <cite><?php printf( __('By %s.'), $plugin['author_link'] ); ?></cite> 90 90 </td> 91 91 <?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> 93 93 <?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> 95 95 <?php endif; ?> 96 96 </tr> 97 97 <?php endforeach; ?> -
bb-admin/content-forums.php
17 17 bb_admin_notice( __('Forum Updated.') ); 18 18 break; 19 19 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')) ); 21 21 break; 22 22 endswitch; 23 23 } … … 42 42 <li><?php printf(__ngettext('%d post', '%d posts', $deleted_forum->posts), $deleted_forum->posts); ?></li> 43 43 </ul> 44 44 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'); ?>"> 46 46 <p> 47 47 <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 /> 48 48 <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> … … 55 55 </p> 56 56 <?php bb_nonce_field( 'delete-forums' ); ?> 57 57 </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 59 59 <p class="submit alignleft"> 60 60 <input type="submit" value="<?php _e('« Go back'); ?>" tabindex="10" /> 61 61 </p> -
bb-admin/delete-post.php
4 4 $post_id = (int) $_GET['id']; 5 5 6 6 if ( !bb_current_user_can( 'delete_post', $post_id ) ) { 7 wp_redirect( bb_get_ option( 'uri') );7 wp_redirect( bb_get_uri() ); 8 8 exit(); 9 9 } 10 10 -
bb-admin/upgrade.php
23 23 $bb_upgrade = bb_upgrade_all(); 24 24 25 25 if ( $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/') ); 27 27 else 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/') ); 29 29 30 30 printf('<p>' . __('%1$d queries and %2$s seconds.') . '</p>', $bbdb->num_queries, bb_timer_stop(0)); 31 31 -
bb-admin/admin.php
4 4 bb_auth(); 5 5 6 6 if ( 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')) ); 8 8 9 9 require('admin-functions.php'); 10 10 require('admin-deprecated.php'); -
bb-admin/admin-functions.php
108 108 } 109 109 endif; 110 110 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() ); 112 112 exit(); 113 113 } 114 114 } … … 525 525 $r .= "\t\t<div class='list-block posrel'>\n"; 526 526 $r .= "\t\t\t<div class='alignright'>\n"; 527 527 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"; 529 529 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"; 531 531 $r .= "\t\t\t</div>\n"; 532 532 $r .= "\t\t\t" . get_forum_name( $_forum->forum_id ) . ' — ' . get_forum_description( $_forum->forum_id ) . "\n\t\t</div>\n"; 533 533 if ( $close ) … … 544 544 return; 545 545 $action = $forum_id ? 'update' : 'add'; 546 546 ?> 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'); ?>"> 548 548 <fieldset> 549 549 <table><col /><col style="width: 80%" /> 550 550 <tr><th scope="row"><?php _e('Forum Name:'); ?></th> -
bb-admin/tag-destroy.php
16 16 if ( $destroyed = destroy_tag( $tag_id ) ) { 17 17 printf(__("Rows deleted from tags table: %d <br />\n"), $destroyed['tags']); 18 18 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()); 20 20 } else { 21 21 die(printf(__("Something odd happened when attempting to destroy that tag.<br />\n<a href=\"%s\">Try Again?</a>"), wp_get_referer())); 22 22 } -
bb-admin/sticky.php
9 9 bb_die(__('There is a problem with that topic, pardner.')); 10 10 11 11 if ( !bb_current_user_can( 'stick_topic', $topic_id ) ) { 12 wp_redirect( bb_get_ option( 'uri') );12 wp_redirect( bb_get_uri() ); 13 13 exit(); 14 14 } 15 15 -
bb-admin/install.php
32 32 $user->set_role( 'keymaster' ); ?> 33 33 34 34 <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> 36 36 37 37 <?php else : ?> 38 38 … … 292 292 293 293 --The bbPress Team 294 294 http://bbpress.org/ 295 "), bb_get_ option( 'uri'), $admin_login, $password);295 "), bb_get_uri(), $admin_login, $password); 296 296 297 297 @mail(bb_get_option( 'admin_email' ), __('New bbPress installation'), $message, $message_headers);?> 298 298 -
bb-admin/bb-forum.php
5 5 bb_die(__("You don't have the authority to mess with the forums.")); 6 6 7 7 if ( !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') ); 9 9 10 10 $sent_from = wp_get_referer(); 11 11 -
bb-admin/topic-move.php
8 8 bb_die(__('Invalid topic or forum.')); 9 9 10 10 if ( !bb_current_user_can( 'move_topic', $topic_id, $forum_id ) ) { 11 wp_redirect( bb_get_ option( 'uri') );11 wp_redirect( bb_get_uri() ); 12 12 exit(); 13 13 } 14 14 -
bb-admin/themes.php
3 3 4 4 if ( isset($_GET['theme']) ) { 5 5 if ( !bb_current_user_can( 'use_keys' ) ) { 6 wp_redirect( bb_get_ option( 'uri') );6 wp_redirect( bb_get_uri() ); 7 7 exit; 8 8 } 9 9 bb_check_admin_referer( 'switch-theme' ); 10 10 $activetheme = stripslashes($_GET['theme']); 11 11 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' ); 13 13 exit; 14 14 } 15 15 … … 29 29 function bb_admin_theme_row( $theme ) { 30 30 $theme_data = file_exists( $theme . 'style.css' ) ? bb_get_theme_data( $theme . 'style.css' ) : false; 31 31 $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' ) ); 33 33 ?> 34 34 <li<?php alt_class( 'theme', $class ); ?>> 35 35 <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
4 4 bb_auth(); 5 5 6 6 if ( !bb_current_user_can( 'edit_user', $user_id ) ) { 7 $sendto = bb_get_ option('uri');7 $sendto = bb_get_uri(); 8 8 wp_redirect( $sendto ); 9 9 } 10 10 … … 48 48 if ( bb_current_user_can('edit_users') ): 49 49 if ( isset($_POST['delete-user']) && $_POST['delete-user'] && $bb_current_id != $user->ID ) : 50 50 bb_delete_user( $user->ID ); 51 wp_redirect( bb_get_ option( 'uri') );51 wp_redirect( bb_get_uri() ); 52 52 exit; 53 53 endif; 54 54 $role = $_POST['role']; -
edit.php
8 8 $bb_post = bb_get_post( $post_id ); 9 9 10 10 if ( !$bb_post || !bb_current_user_can( 'edit_post', $post_id ) ) { 11 wp_redirect( bb_get_ option( 'uri') );11 wp_redirect( bb_get_uri() ); 12 12 die(); 13 13 } 14 14