本文整理汇总了PHP中bp_is_activity_component函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_is_activity_component函数的具体用法?PHP bp_is_activity_component怎么用?PHP bp_is_activity_component使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_is_activity_component函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: bebop_feeds
function bebop_feeds()
{
global $bp, $wp_query, $this_bp_feed;
if (bp_is_activity_component()) {
$active_extensions = bebop_extensions::bebop_get_active_extension_names();
$active_extensions[] = 'all_oers';
foreach ($active_extensions as $extension) {
if (bp_current_action() == $extension) {
if ($extension == 'all_oers') {
$this_bp_feed = $extension;
} else {
if (bebop_tables::check_option_exists('bebop_' . $extension . '_rss_feed')) {
if (bebop_tables::get_option_value('bebop_' . $extension . '_rss_feed') == 'on') {
$this_bp_feed = $extension;
}
}
}
}
}
}
if (empty($this_bp_feed)) {
return false;
}
$wp_query->is_404 = false;
status_header(200);
include_once 'templates/user/bebop-feed-template.php';
die;
}
开发者ID:adisonc,项目名称:MaineLearning,代码行数:28,代码来源:bebop-feeds.php
示例2: register_plugin_scripts
function register_plugin_scripts()
{
if (bp_is_activity_component() || bp_is_group_home()) {
wp_enqueue_script('bp-reshare-js', BP_RESHARE_PLUGIN_URL_JS . '/reshare.js', array('jquery'), 0, 1);
BP_Reshare::localize_script();
}
}
开发者ID:KristianI,项目名称:bp-reshare,代码行数:7,代码来源:bp-reshare-component.php
示例3: bp_follow_add_activity_scope_filter
/**
* Filter the activity loop when we're on a "Following" page
*
* This is done:
* - On the activity directory and clicking on the "Following" tab
* - On a user's "Activity > Following" page
*
* @since 1.0.0
*
* @param string|array Current activity querystring
* @param string $object The current object or component
* @return array
*/
function bp_follow_add_activity_scope_filter($qs, $object)
{
global $bp;
// not on the activity object? stop now!
if ($object != 'activity') {
return $qs;
}
$set = false;
// activity directory
// can't use bp_is_activity_directory() yet since that's a BP 2.0 function
if (!bp_displayed_user_id() && bp_is_activity_component() && !bp_current_action()) {
// check if activity scope is following before manipulating
if (isset($_COOKIE['bp-activity-scope']) && 'following' === $_COOKIE['bp-activity-scope']) {
$set = true;
}
// user's activity following page
} elseif (bp_is_user_activity() && bp_is_current_action('following')) {
$set = true;
}
// not on a user page? stop now!
if (!$set) {
return $qs;
}
// set internal marker noting that our activity scope is applied
$bp->follow->activity_scope_set = 1;
$qs = wp_parse_args($qs);
$following_ids = bp_get_following_ids(array('user_id' => bp_displayed_user_id() ? bp_displayed_user_id() : bp_loggedin_user_id()));
// if $following_ids is empty, pass a negative number so no activity can be found
$following_ids = empty($following_ids) ? -1 : $following_ids;
$qs['user_id'] = $following_ids;
return apply_filters('bp_follow_add_activity_scope_filter', $qs, false);
}
开发者ID:wesavetheworld,项目名称:buddypress-followers,代码行数:45,代码来源:activity-scope.php
示例4: lsx_buddypress_page_columns
/**
* Forces the BP Profile Pages to be 1 Column
*
* @package lsx
* @subpackage jetpack
* @category infinite scroll
*/
function lsx_buddypress_page_columns($layout)
{
if (bp_is_profile_component() || bp_is_settings_component() || bp_is_activity_component() || bp_is_group() || bp_is_messages_component() || bp_is_members_directory() || bp_is_groups_directory() || bp_is_groups_component() || bp_is_members_component()) {
$layout = '1c';
}
return $layout;
}
开发者ID:LinaPeterssonOberg,项目名称:exam,代码行数:14,代码来源:buddypress.php
示例5: load_scripts
function load_scripts()
{
wp_enqueue_script('gwa-user', AGM_PLUGIN_URL . '/js/gwa-user.js');
if (bp_is_activity_component()) {
add_thickbox();
}
}
开发者ID:hscale,项目名称:webento,代码行数:7,代码来源:agm-geotag_bp.php
示例6: bp_reshare_is_user_profile_reshares
function bp_reshare_is_user_profile_reshares()
{
if (bp_is_activity_component() && bp_displayed_user_id() && bp_is_current_action('reshares')) {
return true;
} else {
return false;
}
}
开发者ID:KristianI,项目名称:bp-reshare,代码行数:8,代码来源:bp-reshare-functions.php
示例7: test_member_activity_page
public function test_member_activity_page()
{
$url = home_url($this->u->user_nicename) . '/' . bp_get_activity_slug();
$this->go_to($url);
$this->assertTrue(bp_is_user());
$this->assertTrue(bp_is_my_profile());
$this->assertEquals($this->u->ID, bp_displayed_user_id());
$this->assertTrue(bp_is_activity_component());
}
开发者ID:JeroenNouws,项目名称:BuddyPress,代码行数:9,代码来源:root-profiles.php
示例8: bphelp_pbpp_redirect
function bphelp_pbpp_redirect()
{
global $bp;
//IMPORTANT: Do not alter the following line.
$bphelp_my_redirect_slug = get_option('bphelp-my-redirect-slug', 'register');
if (bp_is_activity_component() || bp_is_groups_component() || bp_is_group_forum() || bbp_is_single_forum() || bbp_is_single_topic() || bp_is_forums_component() || bp_is_blogs_component() || bp_is_members_component() || bp_is_profile_component()) {
if (!is_user_logged_in()) {
bp_core_redirect(get_option('home') . '/' . $bphelp_my_redirect_slug);
}
}
}
开发者ID:pausaura,项目名称:agora_nodes,代码行数:11,代码来源:private-bp-pages.php
示例9: bp_reshare_add_reshare_button
function bp_reshare_add_reshare_button()
{
global $bp;
if (!is_user_logged_in()) {
return false;
}
$activity_types_resharable = bp_reshare_activity_types();
if (!in_array(bp_get_activity_type(), $activity_types_resharable)) {
return false;
}
if (bp_reshare_activity_is_hidden()) {
return false;
}
if (bp_reshare_is_user_profile_reshares() && $bp->displayed_user->id != $bp->loggedin_user->id) {
return false;
}
$activity_first_id = bp_get_activity_id();
if ('reshare_update' == bp_get_activity_type()) {
$activity_first_id = bp_get_activity_secondary_item_id();
}
$rs_count = bp_activity_get_meta($activity_first_id, 'reshared_count');
$rs_count = !empty($rs_count) ? $rs_count : 0;
if ($bp->loggedin_user->id == bp_get_activity_user_id() || bp_reshare_user_did_reshared($activity_first_id)) {
$reshared_class = 'reshared';
}
$action_url = wp_nonce_url(bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/?to_reshare=' . $activity_first_id, '_reshare_update');
if ($_POST['scope'] == 'reshares' || bp_reshare_is_user_profile_reshares() || bp_is_activity_component() && !bp_displayed_user_id() && $_COOKIE['bp-activity-scope'] == 'reshares') {
$extra_class = 'unshare';
$action_url = wp_nonce_url(bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/?delete_reshare=' . bp_get_activity_id(), '_reshare_delete');
}
?>
<a href="<?php
echo $action_url;
?>
" class="button bp-primary-action bp-agu-reshare" id="bp-agu-reshare-<?php
bp_activity_id();
?>
" rel="<?php
echo $activity_first_id;
?>
"><span class="bp-agu-reshare-img <?php
echo $reshared_class . ' ' . $extra_class;
?>
"></span><span class="rs-count"><?php
echo $rs_count;
?>
</span></a>
<?php
}
开发者ID:KristianI,项目名称:bp-reshare,代码行数:50,代码来源:bp-reshare-screens.php
示例10: bp_activity_maybe_load_mentions_scripts
/**
* Should BuddyPress load the mentions scripts and related assets, including results to prime the
* mentions suggestions?
*
* @since 2.1.0
*
* @return bool True if mentions scripts should be loaded.
*/
function bp_activity_maybe_load_mentions_scripts()
{
$mentions_enabled = bp_activity_do_mentions() && bp_is_user_active();
$load_mentions = $mentions_enabled && (bp_is_activity_component() || is_admin());
/**
* Filters whether or not BuddyPress should load mentions scripts and assets.
*
* @since 2.1.0
*
* @param bool $load_mentions True to load mentions assets, false otherwise.
* @param bool $mentions_enabled True if mentions are enabled.
*/
return (bool) apply_filters('bp_activity_maybe_load_mentions_scripts', $load_mentions, $mentions_enabled);
}
开发者ID:humanmade,项目名称:BuddyPress,代码行数:22,代码来源:bp-activity-functions.php
示例11: dt_theme_bbpress_title
function dt_theme_bbpress_title(){
global $bp;
$doctitle = "";
$separator = dttheme_option ( 'seo', 'title-delimiter' );
$id = 0;
if ( !empty( $bp->displayed_user->fullname ) ) {
$blog_title = preg_replace ( "~(?:\[/?)[^/\]]+/?\]~s", '', get_option ( 'blogname' ));
$title = bp_current_component() === "profile" ? __("Profile","dt_themes") : __("Member","dt_themes");
$subtitle = strip_tags( $bp->displayed_user->fullname );
$doctitle = $blog_title.' '.$separator.' '.$title.' '.$separator.' '.$subtitle.' '.$separator;
} elseif( bp_is_members_component() ) {
$id = $bp->pages->members->id;
}elseif( bp_is_activity_component() ){
$id = $bp->pages->activity->id;
}elseif( bp_current_component() === "groups" ) {
$id = $bp->pages->groups->id;
}elseif( bp_current_component() === "register" ) {
$id = $bp->pages->register->id;
}elseif( bp_current_component() === "activate" ) {
$id = $bp->pages->activate->id;
}
if( $id > 0 ){
global $post;
$args = array (
"blog_title" => preg_replace ( "~(?:\[/?)[^/\]]+/?\]~s", '', get_option ( 'blogname' ) ),
"blog_description" => get_bloginfo ( 'description' ),
"post_title" => ! empty ( $post ) ? $post->post_title : NULL,
"post_author_nicename" => ! empty ( $nickname ) ? ucwords ( $nickname ) : NULL,
"post_author_firstname" => ! empty ( $first_name ) ? ucwords ( $first_name ) : NULL,
"post_author_lastname" => ! empty ( $last_name ) ? ucwords ( $last_name ) : NULL,
"post_author_dsiplay" => ! empty ( $display_name ) ? ucwords ( $display_name ) : NULL );
$args = array_filter ( $args );
$doctitle = get_post_meta ( $id, '_seo_title', true );
if (empty ( $doctitle )) :
$options = is_array ( dttheme_option ( 'seo', 'page-title-format' ) ) ? dttheme_option ( 'seo', 'page-title-format' ) : array ();
foreach ( $options as $option ) :
if (array_key_exists ( $option, $args ))
$doctitle .= $args [$option] . ' ' . $separator . ' ';
endforeach;
endif;
}
return $doctitle;
}
开发者ID:namnguyen2312,项目名称:spa,代码行数:49,代码来源:utils.php
示例12: logged_out_redirect
function logged_out_redirect()
{
global $bp;
// BuddyPress components to lock
if (bp_is_activity_component() || bp_is_groups_component() || bp_is_group_forum() || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page(BP_MEMBERS_SLUG) || bp_is_profile_component()) {
// Check if user is logged out
if (!is_user_logged_in()) {
// Check if a page was selected for redirection
if (of_get_option('redirect')) {
$redirect_page = get_permalink(of_get_option('redirect'));
// If not redirect to login page
} else {
$redirect_page = site_url('/wp-login.php');
}
wp_redirect($redirect_page);
exit;
}
}
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:19,代码来源:private-bp.php
示例13: bp_checkins_is_activity_or_friends
function bp_checkins_is_activity_or_friends()
{
if ((int) bp_get_option('bp-checkins-disable-activity-checkins') && (!(int) bp_get_option('bp-checkins-activate-component') || '' == bp_get_option('bp-checkins-activate-component'))) {
return false;
}
if ((int) bp_get_option('bp-checkins-disable-activity-checkins') && bp_is_activity_component() && !bp_is_single_activity()) {
return false;
}
if ((int) bp_get_option('bp-checkins-disable-activity-checkins') && bp_is_group_home()) {
return false;
}
if (!bp_checkins_show_friends_checkins() && bp_displayed_user_id() && bp_is_friends_component()) {
return false;
}
if (bp_is_group_home() || bp_is_activity_component() || bp_displayed_user_id() && bp_is_friends_component()) {
return true;
} else {
return false;
}
}
开发者ID:socialray,项目名称:surfied-2-0,代码行数:20,代码来源:bp-checkins-shared.php
示例14: is_activity
/**
* Set up the theme compatibility hooks, if we're looking at an activity page.
*
* @since 1.7.0
*/
public function is_activity()
{
// Bail if not looking at a group.
if (!bp_is_activity_component()) {
return;
}
// Activity Directory.
if (!bp_displayed_user_id() && !bp_current_action()) {
bp_update_is_directory(true, 'activity');
/** This action is documented in bp-activity/bp-activity-screens.php */
do_action('bp_activity_screen_index');
add_filter('bp_get_buddypress_template', array($this, 'directory_template_hierarchy'));
add_action('bp_template_include_reset_dummy_post_data', array($this, 'directory_dummy_post'));
add_filter('bp_replace_the_content', array($this, 'directory_content'));
// Single activity.
} elseif (bp_is_single_activity()) {
add_filter('bp_get_buddypress_template', array($this, 'single_template_hierarchy'));
add_action('bp_template_include_reset_dummy_post_data', array($this, 'single_dummy_post'));
add_filter('bp_replace_the_content', array($this, 'single_dummy_content'));
}
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:26,代码来源:class-bp-activity-theme-compat.php
示例15: init_scripts
/**
* @internal copied from bp-default/functions.php
*/
public function init_scripts()
{
parent::init_scripts();
// Enqueue various scripts
wp_enqueue_script('bp-jquery-query');
wp_enqueue_script('bp-jquery-cookie');
// Enqueue scrollTo only on activity pages
if (bp_is_activity_component()) {
wp_enqueue_script('bp-jquery-scroll-to');
}
// Enqueue members widget JS just in case
if (is_active_widget(false, false, 'bp_core_members_widget') && !is_admin() && !is_network_admin()) {
wp_enqueue_script('bp-widget-members');
}
// Bump this when changes are made to bust cache
$version = '20120110';
// the global BuddyPress JS - Ajax will not work without it
wp_enqueue_script('dtheme-ajax-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array('jquery'), bp_get_version());
// 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_x_comments' => __('Show all %d comments', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'), 'view' => __('View', 'buddypress'), 'mark_as_fav' => __('Favorite', 'buddypress'), 'remove_fav' => __('Remove Favorite', 'buddypress'), 'unsaved_changes' => __('Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress'));
wp_localize_script('dtheme-ajax-js', 'BP_DTheme', $params);
}
开发者ID:shads196770,项目名称:cbox-theme,代码行数:25,代码来源:class.php
示例16: tk_get_bp_page_type
function tk_get_bp_page_type($page_type)
{
global $bp;
if (is_page() && tk_is_buddypress() && $bp->current_component != '') {
$slug = $bp->current_component;
$component = tk_get_bp_component_by_slug($slug);
$action = $bp->current_action;
if ($component != '') {
if ($action != '') {
if (bp_is_group_forum_topic()) {
$page_type = 'bp-component-' . $component . '-' . $action . '-topic';
} elseif (!bp_is_activity_front_page() && bp_is_activity_component() && $action != 'just-me') {
$page_type = 'bp-component-activity-activity';
} else {
$page_type = 'bp-component-' . $component . '-' . $action;
}
} else {
$page_type = 'bp-component-' . $component;
}
}
}
return apply_filters('tk_get_bp_page_type', $page_type);
}
开发者ID:netconstructor,项目名称:SeoPress,代码行数:23,代码来源:bp.inc.php
示例17: dpa_add_css
/**
* Enqueues CSS files.
*
* @since 2.0
* @global object $bp BuddyPress global settings
*/
function dpa_add_css()
{
global $bp;
if (is_active_widget(false, false, 'achievements-sitewide') || is_active_widget(false, false, 'achievements-available-achievements') || is_active_widget(false, false, 'achievements-member-achievements') || is_active_widget(false, false, 'achievements-featured-achievement') || is_active_widget(false, false, 'achievements-member-achievements-available') || is_active_widget(false, false, 'achievements-member-points')) {
nxt_enqueue_style('achievements-widget', plugins_url('/css/widget.css', __FILE__), array(), ACHIEVEMENTS_VERSION);
}
if (!bp_is_current_component($bp->achievements->slug)) {
if (bp_is_active('activity') && bp_is_activity_component() && !bp_is_blog_page() || bp_is_component_front_page('activity') && bp_is_front_page()) {
nxt_enqueue_style('achievements-directory', plugins_url('/css/directory.css', __FILE__), array(), ACHIEVEMENTS_VERSION);
}
nxt_print_styles();
return;
}
if (DPA_SLUG_CREATE == $bp->current_action && dpa_permission_can_user_create() || DPA_SLUG_ACHIEVEMENT_EDIT == $bp->current_action && dpa_permission_can_user_edit() || DPA_SLUG_ACHIEVEMENT_CHANGE_PICTURE == $bp->current_action && dpa_permission_can_user_change_picture() || DPA_SLUG_ACHIEVEMENT_GRANT == $bp->current_action && dpa_permission_can_user_grant()) {
nxt_enqueue_style('achievements-admin', plugins_url('/css/admin.css', __FILE__), array(), ACHIEVEMENTS_VERSION);
}
if ($bp->is_single_item) {
nxt_enqueue_style('achievements-detail', plugins_url('/css/detail.css', __FILE__), array(), ACHIEVEMENTS_VERSION);
} else {
nxt_enqueue_style('achievements-directory', plugins_url('/css/directory.css', __FILE__), array(), ACHIEVEMENTS_VERSION);
}
nxt_print_styles();
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:29,代码来源:achievements-cssjs.php
示例18: rtmedia_modify_activity_upload_url
function rtmedia_modify_activity_upload_url($params)
{
// return original params if BuddyPress multilingual plugin is not active
include_once ABSPATH . 'wp-admin/includes/plugin.php';
if (function_exists('is_plugin_active') && is_plugin_active('buddypress-multilingual/sitepress-bp.php')) {
if (class_exists('BuddyPress')) {
// change upload url only if it's activity page and if it's group page than it shouldn't group media page
if (bp_is_activity_component() || bp_is_groups_component() && !is_rtmedia_page()) {
if (function_exists('bp_get_activity_directory_permalink')) {
$params['url'] = bp_get_activity_directory_permalink() . 'upload/';
}
}
}
}
return $params;
}
开发者ID:EfncoPlugins,项目名称:rtMedia,代码行数:16,代码来源:rt-template-functions.php
示例19: bp_activity_screen_single_activity_permalink
/**
* Load the page for a single activity item.
*
* @since 1.2.0
*
* @uses bp_is_activity_component()
* @uses bp_activity_get_specific()
* @uses bp_current_action()
* @uses bp_action_variables()
* @uses bp_do_404()
* @uses bp_is_active()
* @uses groups_get_group()
* @uses groups_is_user_member()
* @uses apply_filters_ref_array() To call the 'bp_activity_permalink_access' hook.
* @uses do_action() To call the 'bp_activity_screen_single_activity_permalink' hook.
* @uses bp_core_add_message()
* @uses is_user_logged_in()
* @uses bp_core_redirect()
* @uses site_url()
* @uses esc_url()
* @uses bp_get_root_domain()
* @uses bp_get_activity_root_slug()
* @uses bp_core_load_template()
* @uses apply_filters() To call the 'bp_activity_template_profile_activity_permalink' hook.
*/
function bp_activity_screen_single_activity_permalink()
{
$bp = buddypress();
// No displayed user or not viewing activity component.
if (!bp_is_activity_component()) {
return false;
}
if (!bp_current_action() || !is_numeric(bp_current_action())) {
return false;
}
// Get the activity details.
$activity = bp_activity_get_specific(array('activity_ids' => bp_current_action(), 'show_hidden' => true, 'spam' => 'ham_only'));
// 404 if activity does not exist
if (empty($activity['activities'][0]) || bp_action_variables()) {
bp_do_404();
return;
} else {
$activity = $activity['activities'][0];
}
// Default access is true.
$has_access = true;
// If activity is from a group, do an extra cap check.
if (isset($bp->groups->id) && $activity->component == $bp->groups->id) {
// Activity is from a group, but groups is currently disabled.
if (!bp_is_active('groups')) {
bp_do_404();
return;
}
// Check to see if the group is not public, if so, check the
// user has access to see this activity.
if ($group = groups_get_group(array('group_id' => $activity->item_id))) {
// Group is not public.
if ('public' != $group->status) {
// User is not a member of group.
if (!groups_is_user_member(bp_loggedin_user_id(), $group->id)) {
$has_access = false;
}
}
}
}
/**
* Filters the access permission for a single activity view.
*
* @since 1.2.0
*
* @param array $access Array holding the current $has_access value and current activity item instance.
*/
$has_access = apply_filters_ref_array('bp_activity_permalink_access', array($has_access, &$activity));
/**
* Fires before the loading of a single activity template file.
*
* @since 1.2.0
*
* @param BP_Activity_Activity $activity Object representing the current activity item being displayed.
* @param bool $has_access Whether or not the current user has access to view activity.
*/
do_action('bp_activity_screen_single_activity_permalink', $activity, $has_access);
// Access is specifically disallowed.
if (false === $has_access) {
// User feedback.
bp_core_add_message(__('You do not have access to this activity.', 'buddypress'), 'error');
// Redirect based on logged in status.
if (is_user_logged_in()) {
$url = bp_loggedin_user_domain();
} else {
$url = sprintf(site_url('wp-login.php?redirect_to=%s'), urlencode(esc_url_raw(bp_activity_get_permalink((int) bp_current_action()))));
}
bp_core_redirect($url);
}
/**
* Filters the template to load for a single activity screen.
*
* @since 1.0.0
*
* @param string $template Path to the activity template to load.
//.........这里部分代码省略.........
开发者ID:dcavins,项目名称:buddypress-svn,代码行数:101,代码来源:bp-activity-screens.php
示例20: bp_dtheme_enqueue_scripts
/**
* Enqueue theme javascript safely
*
* @see http://codex.wordpress.org/Function_Reference/wp_enqueue_script
* @since BuddyPress (1.5)
*/
function bp_dtheme_enqueue_scripts()
{
// Enqueue various scripts
wp_enqueue_script('bp-jquery-query');
wp_enqueue_script('bp-jquery-cookie');
// Enqueue scrollTo only on activity pages
if (bp_is_activity_component()) {
wp_enqueue_script('bp-jquery-scroll-to');
}
// A similar check is done in BP_Core_Members_Widget, but due to a load order
// issue, we do it again here
if (is_active_widget(false, false, 'bp_core_members_widget') && !is_admin() && !is_network_admin()) {
wp_enqueue_script('bp-widget-members');
}
// Enqueue the global JS - Ajax will not work without it
wp_enqueue_script('dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array('jquery'), bp_get_version());
// 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_x_comments' => __('Show all %d comments', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'), 'view' => __('View', 'buddypress'), 'mark_as_fav' => __('Favorite', 'buddypress'), 'remove_fav' => __('Remove Favorite', 'buddypress'), 'unsaved_changes' => __('Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress'));
wp_localize_script('dtheme-ajax-js', 'BP_DTheme', $params);
// Maybe enqueue comment reply JS
if (is_singular() && bp_is_blog_page() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:30,代码来源:functions.php
注:本文中的bp_is_activity_component函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论