本文整理汇总了PHP中bp_get_user_firstname函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_get_user_firstname函数的具体用法?PHP bp_get_user_firstname怎么用?PHP bp_get_user_firstname使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_get_user_firstname函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: setup_nav
/**
* Set up navigation
*
* @since 1.3
*/
function setup_nav($main_nav = array(), $sub_nav = array())
{
// Add 'Example' to the main navigation
$main_nav = array('name' => __('Projects', 'collabpress'), 'slug' => $this->slug, 'position' => 44, 'screen_function' => array($this, 'template_loader'), 'default_subnav_slug' => 'tasks', 'show_for_displayed_user' => array($this, 'show_tab_for_current_user'));
$projects_link = trailingslashit(bp_loggedin_user_domain() . $this->slug);
// Add a few subnav items under the main Example tab
$sub_nav[] = array('name' => bp_is_my_profile() ? __('My Tasks', 'collabpress') : sprintf(__('%s’s Tasks', 'collabpress'), bp_get_user_firstname()), 'slug' => 'tasks', 'parent_url' => $projects_link, 'parent_slug' => $this->slug, 'screen_function' => array($this, 'template_loader'), 'position' => 10);
parent::setup_nav($main_nav, $sub_nav);
}
开发者ID:clarkewd,项目名称:CollabPress,代码行数:14,代码来源:cp-bp.php
示例2: bp_dtheme_js_terms
function bp_dtheme_js_terms()
{
?>
<script type="text/javascript">
<?php
if (get_option('priority_loading') == 'enable') {
?>
head.ready(function() {
<?php
}
?>
var bp_terms_my_favs = '<?php
_e("My Favorites", "buddypress");
?>
';
var bp_terms_accepted = '<?php
_e("Accepted", "buddypress");
?>
';
var bp_terms_rejected = '<?php
_e("Rejected", "buddypress");
?>
';
var bp_terms_show_all_comments = '<?php
_e("Show all comments for this thread", "buddypress");
?>
';
var bp_terms_show_all = '<?php
_e("Show all", "buddypress");
?>
';
var bp_terms_comments = '<?php
_e("comments", "buddypress");
?>
';
var bp_terms_close = '<?php
_e("Close", "buddypress");
?>
';
var bp_terms_mention_explain = '<?php
printf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", "buddypress"), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname()));
?>
';
<?php
if (get_option('priority_loading') == 'enable') {
?>
});
<?php
}
?>
</script>
<?php
}
开发者ID:ConceptHaus,项目名称:backup,代码行数:53,代码来源:functions-buddypress.php
示例3: bp_tpack_init
function bp_tpack_init()
{
global $wp_themes;
/* Check to make sure the active theme is not bp-default */
if ('bp-default' == get_option('template')) {
return false;
}
/* Load the default BuddyPress AJAX functions */
if (!(int) get_option('bp_tpack_disable_js')) {
require_once BP_PLUGIN_DIR . '/bp-themes/bp-default/_inc/ajax.php';
/* Load the default BuddyPress javascript */
wp_enqueue_script('bp-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array('jquery'));
// Add words that we need to use in JS to the end of the page so they can be
// translated and still used.
$params = array('my_favs' => __('My Favorites', 'buddypress'), 'accepted' => __('Accepted', 'buddypress'), 'rejected' => __('Rejected', 'buddypress'), 'show_all_comments' => __('Show all comments for this thread', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'), 'mention_explain' => sprintf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress'), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname())));
wp_localize_script('bp-js', 'BP_DTheme', $params);
}
/* Add the wireframe BP page styles */
if (!(int) get_option('bp_tpack_disable_css')) {
wp_enqueue_style('bp-css', plugins_url($path = basename(dirname(__FILE__))) . '/bp.css');
}
}
开发者ID:Nightgunner5,项目名称:Pubcomp-CMS,代码行数:22,代码来源:bp-template-pack.php
示例4: bp_tpack_enqueue_scripts
/**
* Enqueues BuddyPress JS and related AJAX functions
*
* @since 1.2
*/
function bp_tpack_enqueue_scripts()
{
// Do not enqueue JS if it's disabled
if (get_option('bp_tpack_disable_js')) {
return;
}
// Add words that we need to use in JS to the end of the page so they can be translated and still used.
$params = array('my_favs' => __('My Favorites', 'buddypress'), 'accepted' => __('Accepted', 'buddypress'), 'rejected' => __('Rejected', 'buddypress'), 'show_all_comments' => __('Show all comments for this thread', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'));
// BP 1.5+
if (version_compare(BP_VERSION, '1.3', '>')) {
// Bump this when changes are made to bust cache
$version = '20110818';
$params['view'] = __('View', 'buddypress');
} else {
$version = '20110729';
if (bp_displayed_user_id()) {
$params['mention_explain'] = sprintf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress'), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname()));
}
}
// Enqueue the global JS - Ajax will not work without it
nxt_enqueue_script('dtheme-ajax-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array('jquery'), $version);
// Localize the JS strings
nxt_localize_script('dtheme-ajax-js', 'BP_DTheme', $params);
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:29,代码来源:bpt-functions.php
示例5: bp_compliments_get_add_compliment_button
/**
* Returns a compliment button for a given user.
*
* @since 0.0.1
* @package BuddyPress_Compliments
*
* @global object $bp BuddyPress instance.
* @global object $members_template Members template object.
* @param array|string $args {
* Attributes of the $args.
*
* @type int $receiver_id Compliment receiver ID.
* @type int $sender_id Compliment sender ID.
* @type string $link_text Link text.
* @type string $link_title Link title.
* @type string $wrapper_class Link wrapper class.
* @type string $link_class Link class. Default "compliments-popup".
* @type string $wrapper Link wrapper. Default "div".
*
* }
* @return string Button HTML.
*/
function bp_compliments_get_add_compliment_button($args = '')
{
global $bp, $members_template;
$r = wp_parse_args($args, array('receiver_id' => bp_displayed_user_id(), 'sender_id' => bp_loggedin_user_id(), 'link_text' => '', 'link_title' => '', 'wrapper_class' => '', 'link_class' => 'compliments-popup', 'wrapper' => 'div'));
if (!$r['receiver_id'] || !$r['sender_id']) {
return false;
}
// if the logged-in user is the receiver, use already-queried variables
if (bp_loggedin_user_id() && $r['receiver_id'] == bp_loggedin_user_id()) {
$receiver_domain = bp_loggedin_user_domain();
$receiver_fullname = bp_get_loggedin_user_fullname();
// else we do a lookup for the user domain and display name of the receiver
} else {
$receiver_domain = bp_core_get_user_domain($r['receiver_id']);
$receiver_fullname = bp_core_get_user_displayname($r['receiver_id']);
}
// setup some variables
$id = 'compliments';
$action = 'start';
$class = 'compliments';
/**
* Filters the compliment receiver name.
*
* @since 0.0.1
* @package BuddyPress_Compliments
*
* @param string $receiver_fullname Receiver full name.
* @param int $r['receiver_id'] Receiver ID.
*/
$link_text = sprintf(sprintf(__('Send %s', 'bp-compliments'), BP_COMP_SINGULAR_NAME), apply_filters('bp_compliments_receiver_name', bp_get_user_firstname($receiver_fullname), $r['receiver_id']));
if (empty($r['link_text'])) {
$r['link_text'] = $link_text;
}
$wrapper_class = 'compliments-button ' . $id;
if (!empty($r['wrapper_class'])) {
$wrapper_class .= ' ' . esc_attr($r['wrapper_class']);
}
$link_class = $class;
if (!empty($r['link_class'])) {
$link_class .= ' ' . esc_attr($r['link_class']);
}
// make sure we can view the button if a user is on their own page
$block_self = empty($members_template->member) ? true : false;
// if we're using AJAX and a user is on their own profile, we need to set
// block_self to false so the button shows up
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' && bp_is_my_profile()) {
$block_self = false;
}
// setup the button arguments
$button = array('id' => $id, 'component' => 'compliments', 'must_be_logged_in' => true, 'block_self' => $block_self, 'wrapper_class' => $wrapper_class, 'wrapper_id' => 'compliments-button-' . (int) $r['receiver_id'], 'link_href' => wp_nonce_url($receiver_domain . $bp->compliments->compliments->slug . '/' . $action . '/', $action . '_compliments'), 'link_text' => esc_attr($r['link_text']), 'link_title' => esc_attr($r['link_title']), 'link_id' => $class . '-' . (int) $r['receiver_id'], 'link_class' => $link_class, 'wrapper' => !empty($r['wrapper']) ? esc_attr($r['wrapper']) : false);
// Filter and return the HTML button
/**
* Filters the compliment button.
*
* @since 0.0.1
* @package BuddyPress_Compliments
*
* @param string $button Button HTML.
* @param int $r['receiver_id'] Receiver ID.
* @param int $r['sender_id'] Sender ID.
*/
return bp_get_button(apply_filters('bp_compliments_get_add_compliment_button', $button, $r['receiver_id'], $r['sender_id']));
}
开发者ID:kprajapatii,项目名称:buddypress-compliments,代码行数:85,代码来源:bp-compliments-templatetags.php
示例6: bp_loggedin_user_domain
<div id="whats-new-avatar">
<a href="<?php
echo bp_loggedin_user_domain();
?>
">
<?php
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
</a>
</div>
<h5><?php
if (bp_is_group()) {
printf(__("What's new in %s, %s?", 'vibe'), bp_get_group_name(), bp_get_user_firstname());
} else {
printf(__("What's new, %s?", 'vibe'), bp_get_user_firstname());
}
?>
</h5>
<div id="whats-new-content">
<div id="whats-new-textarea">
<textarea name="whats-new" class="bp-suggestions" id="whats-new" cols="50" rows="10"><?php
if (isset($_GET['r'])) {
?>
@<?php
echo esc_attr($_GET['r']);
?>
<?php
}
?>
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:31,代码来源:post-form.php
示例7: bp_loggedin_user_domain
<div id="whats-new-avatar">
<a href="<?php
echo bp_loggedin_user_domain();
?>
">
<?php
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
</a>
</div>
<p class="activity-greeting"><?php
if (bp_is_group()) {
printf(__("What's new in %s, %s?", 'buddypress'), bp_get_group_name(), bp_get_user_firstname(bp_get_loggedin_user_fullname()));
} else {
printf(__("What's new, %s?", 'buddypress'), bp_get_user_firstname(bp_get_loggedin_user_fullname()));
}
?>
</p>
<div id="whats-new-content">
<div id="whats-new-textarea">
<textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="10"
<?php
if (bp_is_group()) {
?>
data-suggestions-group-id="<?php
echo esc_attr((int) bp_get_current_group_id());
?>
" <?php
}
开发者ID:kosir,项目名称:thatcamp-org,代码行数:31,代码来源:post-form.php
示例8: bp_loggedin_user_domain
?>
<div id="whats-new-avatar">
<a href="<?php
echo bp_loggedin_user_domain();
?>
">
<?php
bp_loggedin_user_avatar('width=60&height=60');
?>
</a>
</div>
<h5>
<?php
printf(__("Comment on this link, %s?", 'buddypress-links'), bp_get_user_firstname());
?>
</h5>
<div id="whats-new-content">
<div id="whats-new-textarea">
<textarea name="whats-new" id="whats-new" value="" /><?php
if (isset($_GET['r'])) {
?>
@<?php
echo esc_attr($_GET['r']);
?>
<?php
}
?>
</textarea>
开发者ID:adisonc,项目名称:MaineLearning,代码行数:31,代码来源:post-form.php
示例9: require_once
// Load the AJAX functions for the theme
require_once( TEMPLATEPATH . '/_inc/ajax.php' );
// Load the javascript for the theme
wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ) );
// Add words that we need to use in JS to the end of the page so they can be translated and still used.
$params = array(
'my_favs' => __( 'My Favorites', 'buddypress' ),
'accepted' => __( 'Accepted', 'buddypress' ),
'rejected' => __( 'Rejected', 'buddypress' ),
'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
'show_all' => __( 'Show all', 'buddypress' ),
'comments' => __( 'comments', 'buddypress' ),
'close' => __( 'Close', 'buddypress' ),
'mention_explain' => sprintf( __( "%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress' ), '@' . bp_get_displayed_user_username(), bp_get_user_firstname( bp_get_displayed_user_fullname() ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) )
);
wp_localize_script( 'dtheme-ajax-js', 'BP_DTheme', $params );
/**
* Add the JS needed for blog comment replies
*
* @package BuddyPress Theme
* @since 1.2
*/
function bp_dtheme_add_blog_comments_js() {
if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
}
add_action( 'template_redirect', 'bp_dtheme_add_blog_comments_js' );
/**
开发者ID:n-sane,项目名称:zaroka,代码行数:31,代码来源:functions.php
示例10: bp_activity_delete_link
bp_activity_delete_link();
?>
</p>
</div>
<?php
}
}
?>
<?php
} else {
?>
<h5><?php
printf(__('What are your thoughts on %s, %s?', 'bpgr'), bp_get_group_name(), bp_get_user_firstname());
?>
</h5>
<div id="whats-new-content">
<div id="whats-new-textarea">
<div>
<textarea name="review_content" id="whats-new" value="" /><?php
if (!empty($bp->group_reviews->previous_data->review_content)) {
echo esc_html($bp->group_reviews->previous_data->review_content);
?>
<?php
}
?>
</textarea>
</div>
开发者ID:adisonc,项目名称:MaineLearning,代码行数:31,代码来源:post.php
示例11: bp_activity_comment_form_action
?>
<form action="<?php
bp_activity_comment_form_action();
?>
" method="post" id="ac-form-<?php
bp_activity_id();
?>
" class="ac-form"<?php
bp_activity_comment_form_nojs_display();
?>
>
<div class="activity-comments-inner">
<div class="ac-comment-head"><i class="fa fa-comment"></i> Kommentera aktivitet</div>
<div class="ac-comment-user"><?php
printf(__("Du är inloggad som %s", 'buddypress'), bp_get_user_firstname());
bp_loggedin_user_avatar('width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT);
?>
</div>
<div class="ac-reply-content">
<div class="ac-textarea">
<textarea id="ac-input-<?php
bp_activity_id();
?>
" class="ac-input form-control" name="ac_input_<?php
bp_activity_id();
?>
"></textarea>
</div>
<input type="submit" name="ac_form_submit" class="btn btn-primary btn-small" value="<?php
_e('Post', 'buddypress');
开发者ID:melgar3d,项目名称:wpsvse,代码行数:31,代码来源:entry.php
示例12: bp_loggedin_user_domain
<div id="whats-new-avatar">
<a href="<?php
echo bp_loggedin_user_domain();
?>
">
<?php
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
</a>
</div>
<p class="activity-greeting"><?php
if (bp_is_group()) {
printf(__("What's new in %s, %s?", 'wonderflux'), bp_get_group_name(), bp_get_user_firstname(bp_get_loggedin_user_fullname()));
} else {
printf(__("What's new, %s?", 'wonderflux'), bp_get_user_firstname(bp_get_loggedin_user_fullname()));
}
?>
</p>
<div id="whats-new-content">
<div id="whats-new-textarea">
<label for="whats-new" class="bp-screen-reader-text"><?php
_e('Post what\'s new', 'wonderflux');
?>
</label>
<textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="10"
<?php
if (bp_is_group()) {
?>
data-suggestions-group-id="<?php
开发者ID:Tanver186,项目名称:Wonderflux,代码行数:31,代码来源:post-form.php
示例13: do_action
<?php
if (is_user_logged_in()) {
?>
<?php
do_action('bp_before_sidebar_me');
?>
<div id="sidebar-me" class="widget">
<h3 class="widgettitle"><?php
_e('Hi', 'buddyboss');
?>
<?php
echo bp_get_user_firstname();
?>
!</h3>
<a href="<?php
echo bp_loggedin_user_domain();
?>
">
<?php
bp_loggedin_user_avatar('type=full');
?>
</a>
<ul id="quicklinks">
<li id="icon-profile"><a href="<?php
echo bp_loggedin_user_domain();
开发者ID:par-orillonsoft,项目名称:Wishmagnet,代码行数:30,代码来源:sidebar-home-left.php
示例14: bp_follow_get_add_follow_button
/**
* Returns a follow / unfollow button for a given user depending on the follower status.
*
* Checks to see if the follower is already following the leader. If is following, returns
* "Stop following" button; if not following, returns "Follow" button.
*
* @param array $args {
* Array of arguments.
* @type int $leader_id The user ID of the person we want to follow.
* @type int $follower_id The user ID initiating the follow request.
* @type string $link_text The anchor text for the link.
* @type string $link_title The title attribute for the link.
* @type string $wrapper_class CSS class for the wrapper container.
* @type string $link_class CSS class for the link.
* @type string $wrapper The element for the wrapper container. Defaults to 'div'.
* }
* @return mixed String of the button on success. Boolean false on failure.
* @uses bp_get_button() Renders a button using the BP Button API
* @author r-a-y
* @since 1.1
*/
function bp_follow_get_add_follow_button($args = '')
{
global $bp, $members_template;
$r = wp_parse_args($args, array('leader_id' => bp_displayed_user_id(), 'follower_id' => bp_loggedin_user_id(), 'link_text' => '', 'link_title' => '', 'wrapper_class' => '', 'link_class' => '', 'wrapper' => 'div'));
if (!$r['leader_id'] || !$r['follower_id']) {
return false;
}
// if we're checking during a members loop, then follow status is already
// queried via bp_follow_inject_member_follow_status()
if (!empty($members_template->in_the_loop) && $r['follower_id'] == bp_loggedin_user_id() && $r['leader_id'] == bp_get_member_user_id()) {
$is_following = $members_template->member->is_following;
// else we manually query the follow status
} else {
$is_following = bp_follow_is_following(array('leader_id' => $r['leader_id'], 'follower_id' => $r['follower_id']));
}
// if the logged-in user is the leader, use already-queried variables
if (bp_loggedin_user_id() && $r['leader_id'] == bp_loggedin_user_id()) {
$leader_domain = bp_loggedin_user_domain();
$leader_fullname = bp_get_loggedin_user_fullname();
// else we do a lookup for the user domain and display name of the leader
} else {
$leader_domain = bp_core_get_user_domain($r['leader_id']);
$leader_fullname = bp_core_get_user_displayname($r['leader_id']);
}
// setup some variables
if ($is_following) {
$id = 'following';
$action = 'stop';
$class = 'unfollow';
$link_text = sprintf(_x('Unfollow', 'Button', 'bp-follow'), apply_filters('bp_follow_leader_name', bp_get_user_firstname($leader_fullname), $r['leader_id']));
if (empty($r['link_text'])) {
$r['link_text'] = $link_text;
}
} else {
$id = 'not-following';
$action = 'start';
$class = 'follow';
$link_text = sprintf(_x('Follow', 'Button', 'bp-follow'), apply_filters('bp_follow_leader_name', bp_get_user_firstname($leader_fullname), $r['leader_id']));
if (empty($r['link_text'])) {
$r['link_text'] = $link_text;
}
}
$wrapper_class = 'follow-button ' . $id;
if (!empty($r['wrapper_class'])) {
$wrapper_class .= ' ' . esc_attr($r['wrapper_class']);
}
$link_class = $class;
if (!empty($r['link_class'])) {
$link_class .= ' ' . esc_attr($r['link_class']);
}
// make sure we can view the button if a user is on their own page
$block_self = empty($members_template->member) ? true : false;
// if we're using AJAX and a user is on their own profile, we need to set
// block_self to false so the button shows up
if (bp_follow_is_doing_ajax() && bp_is_my_profile()) {
$block_self = false;
}
// setup the button arguments
$button = array('id' => $id, 'component' => 'follow', 'must_be_logged_in' => true, 'block_self' => $block_self, 'wrapper_class' => $wrapper_class, 'wrapper_id' => 'follow-button-' . (int) $r['leader_id'], 'link_href' => wp_nonce_url($leader_domain . $bp->follow->followers->slug . '/' . $action . '/', $action . '_following'), 'link_text' => esc_attr($r['link_text']), 'link_title' => esc_attr($r['link_title']), 'link_id' => $class . '-' . (int) $r['leader_id'], 'link_class' => $link_class, 'wrapper' => !empty($r['wrapper']) ? esc_attr($r['wrapper']) : false);
// Filter and return the HTML button
return bp_get_button(apply_filters('bp_follow_get_add_follow_button', $button, $r['leader_id'], $r['follower_id']));
}
开发者ID:wesavetheworld,项目名称:buddypress-followers,代码行数:83,代码来源:template.php
示例15: bp_loggedin_user_domain
<div id="whats-new-avatar">
<a href="<?php
echo bp_loggedin_user_domain();
?>
">
<?php
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
</a>
</div>
<h5><?php
if (bp_is_group()) {
printf(__("What's new in %s, %s?", 'firmasite'), bp_get_group_name(), bp_get_user_firstname());
} else {
printf(__("What's new, %s?", 'firmasite'), bp_get_user_firstname());
}
?>
</h5>
<div class="clearfix"></div>
<?php
if (bp_is_active('groups') && !bp_is_my_profile() && !bp_is_group()) {
?>
<div id="whats-new-post-in-box">
<div class="help-block"><?php
_e('Post in', 'firmasite');
?>
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:31,代码来源:post-form.php
示例16: bp_compat_enqueue_scripts
/**
* Enqueues BuddyPress JS and related AJAX functions
*
* @since 1.3
*/
function bp_compat_enqueue_scripts()
{
// Add words that we need to use in JS to the end of the page so they can be translated and still used.
$params = array('my_favs' => __('My Favorites', 'dp'), 'accepted' => __('Accepted', 'dp'), 'rejected' => __('Rejected', 'dp'), 'show_all_comments' => __('Show all comments for this thread', 'dp'), 'show_all' => __('Show all', 'dp'), 'comments' => __('comments', 'dp'), 'close' => __('Close', 'dp'));
// BP 1.5+
if (version_compare(BP_VERSION, '1.3', '>')) {
// Bump this when changes are made to bust cache
$version = '20110818';
$params['view'] = __('View', 'dp');
} else {
$version = '20110729';
if (bp_displayed_user_id()) {
$params['mention_explain'] = sprintf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'dp'), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname()));
}
}
// Enqueue the global JS - Ajax will not work without it
wp_enqueue_script('bp-theme-js', trailingslashit(get_template_directory_uri()) . 'bp/global.js', array('jquery'), $version);
// Localize the JS strings
wp_localize_script('bp-theme-js', 'BP_Theme', $params);
}
开发者ID:alphadc,项目名称:xiuxing,代码行数:25,代码来源:bp-functions.php
示例17: bp_loggedin_user_domain
<a href="<?php
echo bp_loggedin_user_domain();
?>
">
<?php
bp_loggedin_user_avatar('width=60&height=60');
?>
</a>
</div>
<h5>
<?php
if (bp_get_groupblog_id()) {
?>
<?php
printf(__("What's new in %s, %s?", 'buddypress'), bp_get_group_name(), bp_get_user_firstname());
?>
<?php
}
?>
</h5>
<div id="whats-new-content">
<div id="whats-new-textarea">
<textarea name="whats-new" id="whats-new" value="" /><?php
if (isset($_GET['r'])) {
?>
@<?php
echo esc_attr($_GET['r']);
?>
<?php
开发者ID:adisonc,项目名称:MaineLearning,代码行数:31,代码来源:post-form.php
示例18: bp_loggedin_user_domain
?>
<div id="mpp-whats-new-avatar">
<a href="<?php
echo bp_loggedin_user_domain();
?>
">
<?php
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
</a>
</div>
<p class="activity-greeting">
<?php
printf(__("Want to say Something, %s?", 'mediapress'), bp_get_user_firstname(bp_get_loggedin_user_fullname()));
?>
</p>
<div id="mpp-whats-new-content">
<div id="mpp-whats-new-textarea">
<textarea name="mpp-whats-new" id="mpp-whats-new" cols="50" rows="3"><?php
if (isset($_GET['r'])) {
?>
@<?php
echo esc_textarea($_GET['r']);
?>
<?php
}
?>
开发者ID:markc,项目名称:mediapress,代码行数:31,代码来源:post-form.php
示例19: elseif
?>
<?php
} elseif (!bp_is_my_profile() && bp_is_user_activity()) {
?>
<?php
printf(__("Write something to %s?", 'buddypress'), bp_get_displayed_user_fullname());
?>
<?php
} else {
?>
<?php
printf(__("Add a photo, %s", 'buddypress'), bp_get_user_firstname());
?>
<?php
}
?>
</h5>
<div id="whats-new-icons">
<?php
if (BUDDY_BOSS_PICS_ENABLED) {
?>
<div id="whats-new-pic"></div><!-- #whats-new-pic -->
<?php
}
开发者ID:par-orillonsoft,项目名称:Wishmagnet,代码行数:31,代码来源:post-form.php
示例20: define
define('BP_DISABLE_ADMIN_BAR', true);
define('BP_DTHEME_DISABLE_CUSTOM_HEADER', true);
add_filter('bp_core_fetch_avatar_no_grav', '__return_true');
remove_action('wp_print_styles', 'bp_tpack_enqueue_styles');
remove_filter('wp_nav_menu', 'remove_ul');
// Stop the theme from killing WordPress if BuddyPress is not enabled.
if (!class_exists('BP_Core_User')) {
return false;
}
// Load the AJAX functions for the theme
require_once WP_PLUGIN_DIR . '/buddypress/bp-themes/bp-default/_inc/ajax.php';
// Load the javascript for the theme
wp_enqueue_script('dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array('jquery'));
// Add words that we need to use in JS to the end of the page so they can be translated and still used.
$params = array('my_favs' => __('My Favorites', 'buddypress'), 'accepted' => __('Accepted', 'buddypress'), 'rejected' => __('Rejected', 'buddypress'), 'show_all_comments' => __('Show all comments for this thread', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'), 'mention_explain' => sprintf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress'), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname())));
wp_localize_script('dtheme-ajax-js', 'BP_DTheme', $params);
/**
* Add the JS needed for blog comment replies
*
* @package BuddyPress Theme
* @since 1.2
*/
function bp_dtheme_add_blog_comments_js()
{
if (is_singular()) {
wp_enqueue_script('comment-reply');
}
}
add_action('template_redirect', 'bp_dtheme_add_blog_comments_js');
/**
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:30,代码来源:functions.php
注:本文中的bp_get_user_firstname函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论