本文整理汇总了PHP中bp_group_is_forum_enabled函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_group_is_forum_enabled函数的具体用法?PHP bp_group_is_forum_enabled怎么用?PHP bp_group_is_forum_enabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_group_is_forum_enabled函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _e
</label>
<select id="topic_group_id" name="topic_group_id">
<option value=""><?php
/* translators: no option picked in select box */
_e('----', 'buddypress');
?>
</option>
<?php
while (bp_groups()) {
bp_the_group();
?>
<?php
if (bp_group_is_forum_enabled() && (is_super_admin() || 'public' == bp_get_group_status() || bp_group_is_member())) {
?>
<option value="<?php
bp_group_id();
?>
"><?php
bp_group_name();
?>
</option>
<?php
}
?>
<?php
开发者ID:shieldsdesignstudio,项目名称:forefield,代码行数:31,代码来源:bp-forums.php
示例2: enable_forum_assignment_screen
/**
* enable_forum_assignment_screen( $vars )
*
* Hooks into screen_handler
* If forum is active for group, creates a thread for assignment
*
* @param Array $vars a set of variables received for this screen template
* @return Array $vars a set of variable passed to this screen template
*/
function enable_forum_assignment_screen($vars)
{
global $bp;
$e_forum_nonce = 'assignment_enable_forum';
$is_nonce = false;
if (isset($_POST['_wpnonce'])) {
$is_nonce = wp_verify_nonce($_POST['_wpnonce'], $e_forum_nonce);
}
// Nonce will take care of dublicates
if ($is_nonce && bp_group_is_forum_enabled()) {
$assignment = $this->is_assignment($this->current_assignment);
$assignment_forum_id = groups_get_groupmeta($bp->groups->current_group->id, 'forum_id');
// Append assignment link to the content
$assignment->post_content = $assignment->post_content . "\n\n" . "<a href=\"" . $vars['current_uri'] . '/assignment/' . $assignment->post_name . "\">" . __('Courseware Assignment Link', 'bpsp') . "</a>";
// Create tags from title and append 'assignment' to it
$assignment->tags = str_replace('-', ', ', $assignment->post_name) . __(", assignment", 'bpsp');
// Create a topic for current assignment
$topic = groups_new_group_forum_topic($assignment->post_title, $assignment->post_content, $assignment->tags, $assignment_forum_id);
// Create topic for assignment and save in post_meta topic link
if ($topic) {
$topic_permalink = bp_get_group_permalink($bp->groups->current_group) . 'forum/topic/' . $topic->topic_slug;
if (update_post_meta($assignment->ID, 'topic_link', $topic_permalink)) {
$vars['message'] = __('Assignment forum created.', 'bpsp');
}
// Force saving the new permalink to $vars, since it doesn't show up
$vars['forum_link'] = $topic_permalink;
}
} else {
$vars['error'] = __('Forum was not created.', 'bpsp');
}
return $this->single_assignment_screen($vars);
}
开发者ID:ruanbarbosa,项目名称:buddypress-courseware,代码行数:41,代码来源:assignments.class.php
示例3: bp_group_news
<p><?php
bp_group_news();
?>
</p>
</div>
<?php
}
?>
<?php
do_action('groups_custom_group_fields');
?>
<?php
if (bp_group_is_visible() && bp_group_is_forum_enabled() && function_exists('bp_forums_setup')) {
?>
<div class="info-group">
<h4><?php
_e('Active Forum Topics', 'buddypress');
?>
<a href="<?php
bp_group_forum_permalink();
?>
"><?php
_e('See All »', 'buddypress');
?>
</a></h4>
<p><?php
bp_group_active_forum_topics();
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:31,代码来源:group-home.php
示例4: _e
<input type="text" name="topic_title" id="topic_title" value="" />
<label><?php _e( 'Content:', 'buddypress' ) ?></label>
<textarea name="topic_text" id="topic_text"></textarea>
<label><?php _e( 'Tags (comma separated):', 'buddypress' ) ?></label>
<input type="text" name="topic_tags" id="topic_tags" value="" />
<label><?php _e( 'Post In Group Forum:', 'buddypress' ) ?></label>
<select id="topic_group_id" name="topic_group_id">
<option value="">----</option>
<?php while ( bp_groups() ) : bp_the_group(); ?>
<?php if ( bp_group_is_forum_enabled() && 'public' == bp_get_group_status() ) : ?>
<option value="<?php bp_group_id() ?>"><?php bp_group_name() ?></option>
<?php endif; ?>
<?php endwhile; ?>
</select><!-- #topic_group_id -->
<?php do_action( 'groups_forum_new_topic_after' ) ?>
<div class="submit">
<input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ) ?>" />
<input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ) ?>" />
</div>
开发者ID:n-sane,项目名称:zaroka,代码行数:31,代码来源:index.php
示例5: _e
</label>
<select id="topic_group_id" name="topic_group_id">
<option value=""><?php
/* translators: no option picked in select box */
_e('----', 'buddypress');
?>
</option>
<?php
while (bp_groups()) {
bp_the_group();
?>
<?php
if (bp_group_is_forum_enabled() && (bp_current_user_can('bp_moderate') || 'public' == bp_get_group_status() || bp_group_is_member())) {
?>
<option value="<?php
bp_group_id();
?>
"><?php
bp_group_name();
?>
</option>
<?php
}
?>
<?php
开发者ID:par-orillonsoft,项目名称:myfossil-theme,代码行数:31,代码来源:index.php
示例6: group_settings_hidden_field
/**
* Add a hidden input field on the group settings page if the group forum is
* enabled.
*
* Due to the way BuddyPress' group admin settings page saves its settings,
* we need to let BP know that bbPress added a forum.
*
* @since bbPress (r5026)
*
* @link http://bbpress.trac.wordpress.org/ticket/2339/
* @see groups_screen_group_admin_settings()
*/
public function group_settings_hidden_field()
{
// if a forum is not enabled, we don't need to add this field
if (!bp_group_is_forum_enabled()) {
return;
}
?>
<input type="hidden" name="group-show-forum" id="group-show-forum" value="1" />
<?php
}
开发者ID:luskyj89,项目名称:mt-wordpress,代码行数:24,代码来源:groups.php
示例7: bp_groupblog_options_nav
/**
* bp_groupblog_options_nav()
*
* Manually create the navigation for the group since we can't fetch any other way.
* You should manually add items if you have third party plugins that add a menu item.
*
* The BuddyPress function we duplicate is called bp_get_options_nav()
*/
function bp_groupblog_options_nav()
{
global $bp;
$checks = get_site_option('bp_groupblog_blog_defaults_options');
?>
<li id="home-personal-li"<?php
if ($checks['deep_group_integration']) {
?>
class="current selected"<?php
}
?>
>
<a id="home" href="<?php
bp_group_permalink();
?>
"><?php
_e('Home', 'groupblog');
?>
</a>
</li>
<?php
if (groups_is_user_admin($bp->loggedin_user->id, bp_get_group_id()) || groups_is_user_mod($bp->loggedin_user->id, bp_get_group_id())) {
?>
<li id="admin-personal-li" >
<a id="admin" href="<?php
bp_group_permalink();
?>
admin/"><?php
_e('Admin', 'groupblog');
?>
</a>
</li>
<?php
}
?>
<?php
if (bp_group_is_visible()) {
?>
<?php
if (bp_groupblog_is_blog_enabled(bp_get_group_id())) {
?>
<?php
if (!$checks['deep_group_integration']) {
?>
<li id="<?php
echo BP_GROUPBLOG_SLUG;
?>
-personal-li"<?php
//if ( is_page() ) :
?>
class="current selected"<?php
//endif;
?>
>
<a id="<?php
echo BP_GROUPBLOG_SLUG;
?>
" href="<?php
bp_group_permalink();
?>
blog/"><?php
_e('Blog', 'groupblog');
?>
</a>
</li>
<?php
}
?>
<?php
}
?>
<?php
if (bp_is_active('forums') && (function_exists('bp_forums_is_installed_correctly') && bp_group_is_forum_enabled() && !(int) bp_get_option('bp-disable-forum-directory')) && bp_forums_is_installed_correctly()) {
?>
<li id="<?php
echo BP_FORUMS_SLUG;
?>
-personal-li" >
<a id="<?php
echo BP_FORUMS_SLUG;
?>
" href="<?php
bp_group_permalink();
?>
forum/"><?php
_e('Forum', 'groupblog');
?>
//.........这里部分代码省略.........
开发者ID:adisonc,项目名称:MaineLearning,代码行数:101,代码来源:functions.php
示例8: _e
if ($is_teacher) {
?>
<a href="<?php
echo $nav_options[__('Home', 'bpsp')] . '/new_bibliography';
?>
" class="alignright action">
<?php
_e('Manage bibliography', 'bpsp');
?>
</a>
<?php
}
?>
</li>
<?php
if (bp_group_is_forum_enabled()) {
?>
<li>
<?php
printf(__('<em>%d</em> Assignment discussions started', 'bpsp'), $assignment_topics_count);
?>
<a href="<?php
bp_group_forum_permalink();
?>
" class="alignright action">
<?php
_e('Visit forums', 'bpsp');
?>
</a>
</li>
<?php
开发者ID:warinermedia,项目名称:buddypress-courseware,代码行数:31,代码来源:dashboard.php
示例9: edit_screen
/**
* Show forums and new forum form when editing a group
*
* @since bbPress (r3563)
* @uses bbp_get_template_part()
*/
public function edit_screen()
{
$checked = bp_get_new_group_enable_forum() || bp_group_is_forum_enabled(bp_get_group_id());
?>
<h4><?php
_e('Enable Group Forum', 'bbpress');
?>
</h4>
<p><?php
_e('Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress');
?>
</p>
<div class="checkbox">
<label><input type="checkbox" name="bbp-edit-group-forum" id="bbp-edit-group-forum" value="1"<?php
checked($checked);
?>
/> <?php
_e('Yes. I want this group to have a forum.', 'bbpress');
?>
</label>
</div>
<p class="description"><?php
_e('Saying no will not delete existing forum content.', 'bbpress');
?>
</p>
<input type="submit" value="<?php
esc_attr_e('Save Settings', 'bbpress');
?>
" />
<?php
// Verify intent
wp_nonce_field('groups_edit_save_' . $this->slug);
}
开发者ID:hscale,项目名称:webento,代码行数:45,代码来源:group.php
注:本文中的bp_group_is_forum_enabled函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论