当前位置: 首页>>代码示例>>PHP>>正文


PHP bb_get_uri函数代码示例

本文整理汇总了PHP中bb_get_uri函数的典型用法代码示例。如果您正苦于以下问题:PHP bb_get_uri函数的具体用法?PHP bb_get_uri怎么用?PHP bb_get_uri使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bb_get_uri函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: bb_default_scripts

function bb_default_scripts(&$scripts)
{
    $scripts->base_url = bb_get_uri(BB_INC, null, BB_URI_CONTEXT_SCRIPT_SRC);
    $scripts->base_url_admin = bb_get_uri('bb-admin/', null, BB_URI_CONTEXT_SCRIPT_SRC + BB_URI_CONTEXT_BB_ADMIN);
    $scripts->content_url = '';
    // May not work - might need to specify plugin and theme urls
    $scripts->default_version = bb_get_option('version');
    $scripts->default_dirs = array('/bb-admin/js/', '/bb-includes/js/');
    // These are our enqueued scripts
    $scripts->add('topic', $scripts->base_url . 'js/topic.js', array('wp-lists'), '20090602');
    $scripts->add('profile-edit', $scripts->base_url . 'js/profile-edit.js', array('password-strength-meter'), '20080721');
    $scripts->add('admin-forums', $scripts->base_url_admin . 'js/admin-forums.js', array('wp-lists', 'interface'), '20090320');
    $scripts->add('utils', $scripts->base_url_admin . 'js/utils.js', false, '20090102');
    $scripts->add('common', $scripts->base_url_admin . 'js/common.js', array('jquery', 'hoverIntent', 'utils'), '20090517');
    $scripts->add_data('common', 'group', 1);
    $scripts->localize('common', 'commonL10n', array('warnDelete' => __("You are about to delete the selected items.\n  'Cancel' to stop, 'OK' to delete."), 'l10n_print_after' => 'try{convertEntities(commonL10n);}catch(e){};'));
    $scripts->localize('admin-forums', 'bbSortForumsL10n', array('handleText' => __('drag'), 'saveText' => __('Save Forum Order'), 'editText' => __('Edit Forum Order')));
    // These are non-3rd-party libraries
    $scripts->add('wp-lists', $scripts->base_url . 'js/wp-lists.js', array('wp-ajax-response', 'jquery-color'), '20080826');
    $scripts->localize('wp-lists', 'wpListL10n', array('url' => $scripts->base_url_admin . 'admin-ajax.php'));
    $scripts->add('wp-ajax-response', $scripts->base_url . 'js/wp-ajax-response.js', array('jquery'), '20080316');
    $scripts->localize('wp-ajax-response', 'wpAjax', array('noPerm' => __('You do not have permission to do that.'), 'broken' => __('An unidentified error has occurred.')));
    // jQuery and friends
    $scripts->add('jquery', $scripts->base_url . 'js/jquery/jquery.js', false, '1.4.2');
    $scripts->add('jquery-color', $scripts->base_url . 'js/jquery/jquery.color.js', array('jquery'), '2.0-4561');
    $scripts->add('interface', $scripts->base_url . 'js/jquery/interface.js', array('jquery'), '1.2.3');
    $scripts->add('password-strength-meter', $scripts->base_url . 'js/jquery/password-strength-meter.js', array('jquery'), '20070405');
    $scripts->localize('password-strength-meter', 'pwsL10n', array('short' => __('Too short'), 'bad' => __('Bad'), 'good' => __('Good'), 'strong' => __('Strong')));
    $scripts->add('hoverIntent', $scripts->base_url . 'js/jquery/hoverIntent.js', array('jquery'), '20090102');
    $scripts->add_data('hoverIntent', 'group', 1);
}
开发者ID:un1coin,项目名称:ovn-space,代码行数:31,代码来源:functions.bb-script-loader.php

示例2: get

 function get($option)
 {
     switch ($option) {
         case 'application_id':
             return 'glotpress';
             break;
         case 'application_uri':
             return bb_get_uri(null, null, BB_URI_CONTEXT_NONE);
             break;
         case 'cron_uri':
             return '';
             break;
         case 'cron_check':
             return '';
             break;
         case 'charset':
             return 'UTF-8';
             break;
         case 'wp_http_version':
             return 'GlotPress/' . gp_get_option('version');
             break;
         case 'hash_function_name':
             return 'gp_hash';
             break;
         default:
             return gp_get_option(BP_Options::prefix() . $option);
             break;
     }
 }
开发者ID:rmccue,项目名称:GlotPress,代码行数:29,代码来源:class.bp-options.php

示例3: get

 function get($option)
 {
     switch ($option) {
         case 'application_id':
             return bb_get_option('site_id');
             break;
         case 'application_uri':
             return bb_get_uri(null, null, BB_URI_CONTEXT_NONE);
             break;
         case 'cron_uri':
             return bb_get_uri('bb-cron.php', array('check' => BP_Options::get('cron_check')), BB_URI_CONTEXT_nxt_HTTP_REQUEST);
             break;
         case 'nxt_http_version':
             return 'bbPress/' . bb_get_option('version');
             break;
         case 'hash_function_name':
             return 'bb_hash';
             break;
         case 'language_locale':
             return bb_get_locale();
             break;
         case 'language_directory':
             return BB_LANG_DIR;
             break;
         case 'charset':
         case 'gmt_offset':
         case 'timezone_string':
             return bb_get_option($option);
             break;
         default:
             return bb_get_option(BP_Options::prefix() . $option);
             break;
     }
 }
开发者ID:nxtclass,项目名称:NXTClass,代码行数:34,代码来源:class.bp-options.php

示例4: bb_admin_notice

if (!empty($_GET['notmodrewrite'])) {
    $manual_instructions = false;
    bb_admin_notice(__('<strong>It appears that your server does not support custom permalink structures.</strong>'), 'error');
}
if (!empty($_GET['notapache'])) {
    $manual_instructions = false;
    bb_admin_notice(__('<strong>Rewriting on webservers other than Apache using mod_rewrite is currently unsupported, but we won&#8217;t stop you from trying.</strong>'), 'error');
}
if (!empty($_GET['updated'])) {
    if ($manual_instructions) {
        bb_admin_notice(__('<strong>You should update your .htaccess now.</strong>'));
    } else {
        bb_admin_notice(__('<strong>Permalink structure updated.</strong>'));
    }
}
$permalink_options = array('mod_rewrite' => array('title' => __('Permalink type'), 'type' => 'radio', 'options' => array('0' => sprintf(__('<span>None</span> <code>%s</code>'), bb_get_uri('forums.php', array('id' => 1), BB_URI_CONTEXT_TEXT)), '1' => sprintf(__('<span>Numeric</span> <code>%s</code>'), bb_get_uri('forums/1', null, BB_URI_CONTEXT_TEXT)), 'slugs' => sprintf(__('<span>Name based</span> <code>%s</code>'), bb_get_uri('/forums/first-forum', null, BB_URI_CONTEXT_TEXT)))));
$bb_admin_body_class = ' bb-admin-settings';
bb_get_admin_header();
?>

<div class="wrap">

<h2><?php 
_e('Permalink Settings');
?>
</h2>
<?php 
do_action('bb_admin_notices');
?>

<form class="settings" method="post" action="<?php 
开发者ID:laiello,项目名称:cartonbank,代码行数:31,代码来源:options-permalinks.php

示例5: bb_location

    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

</head>
<body id="<?php 
bb_location();
?>
">
	<div class="container prepend-top append-bottom">
		<div id="util-login">
		<?php 
if (!bb_is_user_logged_in()) {
    printf(__('<a href="%2$s">Log in</a> | <a href="%1$s">Register</a>'), bb_get_uri('register.php', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_USER_FORMS), bb_get_uri('bb-login.php', null, BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_USER_FORMS));
} else {
    printf(__('Logged in as %1$s'), bb_get_profile_link(bb_get_current_user_info('name')));
    echo ' | ';
    if ($bb_current_user->has_cap('administrate') || $bb_current_user->has_cap('moderate')) {
        bb_admin_link();
        echo ' | ';
    }
    bb_logout_link();
}
?>
		</div>
		<div id="header" class="prepend-6 span-18">
			<a id="ach-logo" href="http://www.ach.org">ACH</a>
			<h1><a href="<?php 
bb_uri();
开发者ID:achorg,项目名称:DH-Answers,代码行数:31,代码来源:header.php

示例6: allow_syntax_tag

Plugin Name: BB-Syntax
Plugin URI: http://www.finalwebsites.com/bbpress/geshi-syntax-highlighting.php
Description: This plugin will highlight your code snippets using the PHP class GeSHi. Wrap code blocks with <code>&lt;pre lang="LANGUAGE" line="1"&gt;</code> and <code>&lt;/pre&gt;</code> where <code>LANGUAGE</code> is a GeSHi supported language syntax.  The <code>line</code> attribute is optional. This plugin is a fork from the Wordpress plugin <a href="http://wordpress.org/extend/plugins/wp-syntax/">WP_Syntax</a> by Ryan McGeary.
Author: Olaf Lederer
Version: 0.1.1
Author URI: http://www.finalwebsites.com/
*/
function allow_syntax_tag($tags)
{
    $tags['pre'] = array('lang' => array(), 'line' => array(), 'escaped' => array(), 'style' => array(), 'width' => array());
    return $tags;
}
add_filter('bb_allowed_tags', 'allow_syntax_tag');
include_once "geshi/geshi.php";
if (!defined("BB_PLUGIN_URL")) {
    define("BB_PLUGIN_URL", bb_get_uri() . "/my-plugins");
}
function bb_syntax_head()
{
    $css_url = BB_PLUGIN_URL . "bb-syntax/bb-syntax.css";
    echo "\n" . '<link rel="stylesheet" href="' . $css_url . '" type="text/css" media="screen" />' . "\n";
}
function bb_syntax_code_trim($code)
{
    // special ltrim b/c leading whitespace matters on 1st line of content
    $code = preg_replace("/^\\s*\n/siU", "", $code);
    $code = rtrim($code);
    return $code;
}
function bb_syntax_substitute(&$match)
{
开发者ID:achorg,项目名称:DH-Answers,代码行数:31,代码来源:bb-syntax.php

示例7: bb_forum_row

function bb_forum_row($forum_id = 0, $echo = true, $close = false)
{
    global $forum, $forums_count;
    if ($forum_id) {
        $_forum = bb_get_forum($forum_id);
    } else {
        $_forum =& $forum;
    }
    if (!$_forum) {
        return;
    }
    $description = get_forum_description($_forum->forum_id);
    $r = '';
    if ($close) {
        $r .= "\t<li id='forum-{$_forum->forum_id}'" . get_alt_class('forum', 'forum clear list-block') . ">\n";
    }
    $r .= "\t\t<div class='list-block posrel'>\n";
    $r .= "\t\t\t<div class=\"row-title\">" . get_forum_name($_forum->forum_id) . "</div>\n";
    if ($description) {
        $r .= "\t\t\t<p class=\"row-description\">" . get_forum_description($_forum->forum_id) . "</p>\n";
    }
    $r .= "\t\t\t<div class=\"row-actions\"><span>\n";
    $r .= "\t\t\t\t<a class='edit' href='" . get_forum_link() . "'>" . __('View') . "</a>\n";
    if (bb_current_user_can('manage_forums')) {
        $r .= "\t\t\t\t| <a class='edit' href='" . esc_attr(bb_get_uri('bb-admin/forums.php', array('action' => 'edit', 'id' => $_forum->forum_id), BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN)) . "'>" . __('Edit') . "</a>\n";
    }
    if (bb_current_user_can('delete_forum', $_forum->forum_id) && 1 < $forums_count) {
        $r .= "\t\t\t\t| <a class='delete' href='" . esc_attr(bb_get_uri('bb-admin/forums.php', array('action' => 'delete', 'id' => $_forum->forum_id), BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN)) . "'>" . __('Delete') . "</a>\n";
    }
    $r .= "\t\t\t</span>&nbsp;</div>\n";
    $r .= "\t\t</div>\n";
    if ($close) {
        $r .= "\t</li>\n";
    }
    if ($echo) {
        echo $r;
    }
    return $r;
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:39,代码来源:functions.bb-admin.php

示例8: bb_get_avatar

 /**
  * Retrieve the avatar for a user provided a user ID or email address
  *
  * @since 0.9
  * @param int|string $id_or_email A user ID or email address
  * @param int $size Size of the avatar image
  * @param string $default URL to a default image to use if no avatar is available
  * @param string $alt Alternate text to use in image tag. Defaults to blank
  * @return string <img> tag for the user's avatar
 */
 function bb_get_avatar($id_or_email, $size = 80, $default = '', $alt = false)
 {
     if (!bb_get_option('avatars_show')) {
         return false;
     }
     if (false === $alt) {
         $safe_alt = '';
     } else {
         $safe_alt = esc_attr($alt);
     }
     if (!is_numeric($size)) {
         $size = 80;
     }
     if ($email = bb_get_user_email($id_or_email)) {
         $class = 'photo ';
     } else {
         $class = '';
         $email = $id_or_email;
     }
     if (!$email) {
         $email = '';
     }
     if (empty($default)) {
         $default = bb_get_option('avatars_default');
     }
     if (is_ssl()) {
         $host = 'https://secure.gravatar.com';
     } else {
         $host = 'http://www.gravatar.com';
     }
     switch ($default) {
         case 'logo':
             $default = '';
             break;
         case 'blank':
             $default = bb_get_uri('bb-admin/images/blank.gif', null, BB_URI_CONTEXT_IMG_SRC);
             break;
         case 'monsterid':
         case 'wavatar':
         case 'identicon':
             break;
         case 'default':
         default:
             $default = $host . '/avatar/ad516503a11cd5ca435acc9bb6523536?s=' . $size;
             // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')
             break;
     }
     $src = $host . '/avatar/';
     $class .= 'avatar avatar-' . $size;
     if (!empty($email)) {
         $src .= md5(strtolower($email));
     } else {
         $src .= 'd41d8cd98f00b204e9800998ecf8427e';
         // d41d8cd98f00b204e9800998ecf8427e == md5('')
         $class .= ' avatar-noemail';
     }
     $src .= '?s=' . $size;
     $src .= '&amp;d=' . urlencode($default);
     $rating = bb_get_option('avatars_rating');
     if (!empty($rating)) {
         $src .= '&amp;r=' . $rating;
     }
     $avatar = '<img alt="' . $safe_alt . '" src="' . $src . '" class="' . $class . '" style="height:' . $size . 'px; width:' . $size . 'px;" />';
     return apply_filters('bb_get_avatar', $avatar, $id_or_email, $size, $default, $alt);
 }
开发者ID:abc2mit,项目名称:abc2mit.github.io,代码行数:75,代码来源:functions.bb-pluggable.php

示例9: bb_ksd_post_delete_link

function bb_ksd_post_delete_link($parts, $args)
{
    if (!bb_current_user_can('moderate')) {
        return $parts;
    }
    $bb_post = bb_get_post(get_post_id($args['post_id']));
    if (2 == $bb_post->post_status) {
        $query = array('id' => $bb_post->post_id, 'status' => 0, 'view' => 'all');
        $display = __('Not Spam');
    } else {
        $query = array('id' => $bb_post->post_id, 'status' => 2);
        $display = __('Spam');
    }
    $uri = bb_get_uri('bb-admin/delete-post.php', $query, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN);
    $uri = esc_url(bb_nonce_url($uri, 'delete-post_' . $bb_post->post_id));
    if (!is_array($parts)) {
        $parts = array();
        $before = '';
        $after = '';
    } else {
        $before = $args['last_each']['before'];
        $after = $args['last_each']['after'];
    }
    // Make sure that the last tag in $before gets a class (if it's there)
    if (preg_match('/.*(<[^>]+>)[^<]*/', $before, $_node)) {
        if (preg_match('/class=(\'|")(.*)\\1/U', $_node[1], $_class)) {
            $before = str_replace($_class[0], 'class=' . $_class[1] . 'before-post-spam-link ' . $_class[2] . $_class[1], $before);
        } else {
            $before = preg_replace('/(.*)<([a-z0-9_-]+)(\\s?)([^>]*)>([^<]*)/i', '$1<$2 class="before-post-spam-link"$3$4>$5', $before, 1);
        }
    }
    $parts[] = $before . '<a class="post-spam-link" href="' . $uri . '" >' . $display . '</a>' . $after;
    return $parts;
}
开发者ID:laiello,项目名称:cartonbank,代码行数:34,代码来源:akismet.php

示例10: bb_url_to_path

function bb_url_to_path($url)
{
    bb_log_deprecated('function', __FUNCTION__, 'no alternative');
    return apply_filters('bb_url_to_path', bb_convert_path_base($url, bb_get_uri(null, null, BB_URI_CONTEXT_TEXT), BB_PATH), $url);
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:5,代码来源:functions.bb-deprecated.php

示例11: count

$forums_count = $forums ? count($forums) : 0;
if (isset($_GET['action']) && 'delete' == $_GET['action']) {
    $forum_to_delete = (int) $_GET['id'];
    $deleted_forum = bb_get_forum($forum_to_delete);
    if (!$deleted_forum || $forums_count < 2 || !bb_current_user_can('delete_forum', $forum_to_delete)) {
        bb_safe_redirect(add_query_arg(array('action' => false, 'id' => false)));
        exit;
    }
}
if (isset($_GET['message'])) {
    switch ($_GET['message']) {
        case 'updated':
            bb_admin_notice(__('<strong>Forum Updated.</strong>'));
            break;
        case 'deleted':
            bb_admin_notice(sprintf(__('<strong>Forum deleted.</strong>  You should <a href="%s">recount your site information</a>.'), bb_get_uri('bb-admin/tools-recount.php', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN)));
            break;
    }
}
if (!isset($_GET['action'])) {
    nxt_enqueue_script('admin-forums');
} elseif ('delete' == @$_GET['action']) {
    bb_admin_notice(sprintf(__('Are you sure you want to delete the "<strong>%s</strong>" forum?'), $deleted_forum->forum_name));
}
$bb_admin_body_class = ' bb-admin-forums';
bb_get_admin_header();
?>

<div class="wrap">

<h2><?php 
开发者ID:nxtclass,项目名称:NXTClass,代码行数:31,代码来源:forums.php

示例12: foreach

<?php 
    foreach ($requested_plugins as $plugin => $plugin_data) {
        $class = ' class="inactive"';
        $action = 'activate';
        $action_class = 'edit';
        $action_text = __('Activate');
        if ($plugin_data['autoload']) {
            $class = ' class="autoload"';
        } elseif (in_array($plugin, $active_plugins)) {
            $class = ' class="active"';
            $action = 'deactivate';
            $action_class = 'delete';
            $action_text = __('Deactivate');
        }
        $href = esc_attr(bb_nonce_url(bb_get_uri('bb-admin/plugins.php', array('plugin_request' => $plugin_request, 'action' => $action, 'plugin' => urlencode($plugin)), BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN), $action . '-plugin_' . $plugin));
        $meta = array();
        if ($plugin_data['version']) {
            $meta[] = sprintf(__('Version %s'), $plugin_data['version']);
        }
        if ($plugin_data['author_link']) {
            $meta[] = sprintf(__('By %s'), $plugin_data['author_link']);
        }
        if ($plugin_data['uri']) {
            $meta[] = '<a href="' . $plugin_data['uri'] . '">' . esc_html__('Visit plugin site') . '</a>';
        }
        if (count($meta)) {
            $meta = '<p class="meta">' . join(' | ', $meta) . '</p>';
        } else {
            $meta = '';
        }
开发者ID:danielcoats,项目名称:schoolpress,代码行数:30,代码来源:plugins.php

示例13: bb_get_uri

/**
 * If this page was accessed using SSL, make sure the redirect is a full URL so
 * that we don't end up on an SSL page again (unless the whole site is under SSL)
 */
if (is_ssl() && 0 === strpos($re, '/')) {
    $re = bb_get_uri($re, null, BB_URI_CONTEXT_HEADER);
}
// Clean the redirection destination
if (!empty($re)) {
    $re = esc_url($re);
    $re = esc_attr($re);
    $redirect_to = $re;
}
// Fallback to site root
if (empty($re)) {
    $re = bb_get_uri();
}
/** Handle logout *************************************************************/
// User is logged in
if (bb_is_user_logged_in()) {
    // Logout requested
    if (isset($_GET['logout'])) {
        $_GET['action'] = 'logout';
    }
    // Check logout action
    if (isset($_GET['action']) && 'logout' === $_GET['action']) {
        bb_logout();
    }
    bb_safe_redirect($re);
    exit;
}
开发者ID:hscale,项目名称:webento,代码行数:31,代码来源:bb-login.php

示例14: bb_uri

		//]]>
	</script>
	<div id="bbWrap">
		<div id="bbContent">
			<div id="bbHead">
				<h1><a href="<?php 
bb_uri();
?>
"><span><?php 
bb_option('name');
?>
</span> <em><?php 
_e('Visit Site');
?>
</em></a></h1>
				<div id="bbUserInfo">
					<p>
						<?php 
printf(__('Howdy, %1$s'), bb_get_profile_link(array('text' => bb_get_current_user_info('name'))));
?>
						| <?php 
bb_logout_link(array('redirect' => bb_get_uri(null, null, BB_URI_CONTEXT_HEADER)));
?>
					</p>
				</div>
			</div>

			<div id="bbBody">

<?php 
bb_admin_menu();
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:31,代码来源:admin-header.php

示例15: do_action

<div class="topmenu">
	<div class="page">
		<ul>
			<?php 
do_action('gz_profile_menu ');
?>
			<li><a rel="nofollow" href="<?php 
echo bb_get_uri('register.php', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_USER_FORMS);
?>
"><?php 
_e('Register', 'guangzhou');
?>
</a></li>
			<li><a rel="nofollow" href="<?php 
echo bb_get_uri('bb-login.php', null, BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_USER_FORMS);
?>
"><?php 
_e('Login', 'guangzhou');
?>
</a></li>
		</ul>
	</div>
</div>
开发者ID:billerby,项目名称:Surdeg,代码行数:23,代码来源:login-form.php


注:本文中的bb_get_uri函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。