本文整理汇总了PHP中bp_get_new_group_enable_forum函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_get_new_group_enable_forum函数的具体用法?PHP bp_get_new_group_enable_forum怎么用?PHP bp_get_new_group_enable_forum使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_get_new_group_enable_forum函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_new_group_enable_forum
function bp_new_group_enable_forum()
{
echo bp_get_new_group_enable_forum();
}
示例2: _e
</h4>
<?php
if (bp_forums_is_installed_correctly()) {
?>
<p><?php
_e('Should this group have a forum?', 'vibe');
?>
</p>
<div class="checkbox">
<label><input type="checkbox" name="group-show-forum"
id="group-show-forum"
value="1"<?php
checked(bp_get_new_group_enable_forum(), true, true);
?>
/> <?php
_e('Enable discussion forum', 'vibe');
?>
</label>
</div>
<?php
} elseif (is_super_admin()) {
?>
<p><?php
printf(__('<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'vibe'), bp_core_do_network_admin() ? network_admin_url('settings.php?page=bb-forums-setup') : admin_url('admin.php?page=bb-forums-setup'));
?>
</p>
示例3: create_screen
/**
* Show forums and new forum form when creating a group
*
* @since bbPress (r3465)
*/
public function create_screen($group_id = 0)
{
// Bail if not looking at this screen
if (!bp_is_group_creation_step($this->slug)) {
return false;
}
// Check for possibly empty group_id
if (empty($group_id)) {
$group_id = bp_get_new_group_id();
}
$checked = bp_get_new_group_enable_forum() || groups_get_groupmeta($group_id, 'forum_id');
?>
<h4><?php
esc_html_e('Group Forum', 'bbpress');
?>
</h4>
<p><?php
esc_html_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-create-group-forum" id="bbp-create-group-forum" value="1"<?php
checked($checked);
?>
/> <?php
esc_html_e('Yes. I want this group to have a forum.', 'bbpress');
?>
</label>
</div>
<?php
}
示例4:
?>
</label>
</div>
<?php
}
?>
<?php
if (function_exists('bp_forums_is_installed_correctly')) {
?>
<?php
if (bp_forums_is_installed_correctly()) {
?>
<div class="checkbox">
<label><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php
if (bp_get_new_group_enable_forum()) {
?>
checked="checked"<?php
}
?>
/> <?php
_e('Enable discussion forum', 'buddypress');
?>
</label>
</div>
<?php
} else {
?>
<?php
if (is_site_admin()) {
?>
示例5: create_screen
/**
* Show forums and new forum form when creating a group
*
* @since bbPress (r3465)
*/
public function create_screen()
{
// Bail if not looking at this screen
if (!bp_is_group_creation_step($this->slug)) {
return false;
}
$checked = bp_get_new_group_enable_forum() || groups_get_groupmeta(bp_get_new_group_id(), 'forum_id');
?>
<h4><?php
_e('Group Forums', '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-create-group-forum" id="bbp-create-group-forum" value="1"<?php
checked($checked);
?>
/> <?php
_e('Yes. I want this group to have a forum.', 'bbpress');
?>
</label>
</div>
<?php
// Verify intent
wp_nonce_field('groups_create_save_' . $this->slug);
}