• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP bbp_is_reply_anonymous函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: disabled

" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php 
        disabled(bbp_is_topic_spam());
        ?>
 />
						</p>

						<?php 
        do_action('bbp_theme_after_reply_form_tags');
        ?>

					<?php 
    }
    ?>

					<?php 
    if (bbp_is_subscriptions_active() && !bbp_is_anonymous() && (!bbp_is_reply_edit() || bbp_is_reply_edit() && !bbp_is_reply_anonymous())) {
        ?>

						<?php 
        do_action('bbp_theme_before_reply_form_subscription');
        ?>

						<p>

							<input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php 
        bbp_form_topic_subscribed();
        ?>
 tabindex="<?php 
        bbp_tab_index();
        ?>
" />
开发者ID:estrategasdigitales,项目名称:flazam,代码行数:31,代码来源:form-reply.php


示例2: bbp_edit_reply_handler

/**
 * Handles the front end edit reply submission
 *
 * @param string $action The requested action to compare this function to
 * @uses bbp_add_error() To add an error message
 * @uses bbp_get_reply() To get the reply
 * @uses bbp_verify_nonce_request() To verify the nonce and check the request
 * @uses bbp_is_reply_anonymous() To check if the reply was by an anonymous user
 * @uses current_user_can() To check if the current user can edit that reply
 * @uses bbp_filter_anonymous_post_data() To filter anonymous data
 * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
 * @uses remove_filter() To remove kses filters if needed
 * @uses esc_attr() For sanitization
 * @uses apply_filters() Calls 'bbp_edit_reply_pre_title' with the title and
 *                       reply id
 * @uses apply_filters() Calls 'bbp_edit_reply_pre_content' with the content
 *                        reply id
 * @uses wp_set_post_terms() To set the topic tags
 * @uses bbp_has_errors() To get the {@link WP_Error} errors
 * @uses wp_save_post_revision() To save a reply revision
 * @uses bbp_update_reply_revision_log() To update the reply revision log
 * @uses wp_update_post() To update the reply
 * @uses bbp_get_reply_topic_id() To get the reply topic id
 * @uses bbp_get_topic_forum_id() To get the topic forum id
 * @uses bbp_get_reply_to() To get the reply to id
 * @uses do_action() Calls 'bbp_edit_reply' with the reply id, topic id, forum
 *                    id, anonymous data, reply author, bool true (for edit),
 *                    and the reply to id
 * @uses bbp_get_reply_url() To get the paginated url to the reply
 * @uses wp_safe_redirect() To redirect to the reply url
 * @uses bbPress::errors::get_error_message() To get the {@link WP_Error} error
 *                                             message
 */
function bbp_edit_reply_handler($action = '')
{
    // Bail if action is not bbp-edit-reply
    if ('bbp-edit-reply' !== $action) {
        return;
    }
    // Define local variable(s)
    $revisions_removed = false;
    $reply = $reply_id = $reply_author = $topic_id = $forum_id = $anonymous_data = 0;
    $reply_title = $reply_content = $reply_edit_reason = $terms = '';
    /** Reply *****************************************************************/
    // Reply id was not passed
    if (empty($_POST['bbp_reply_id'])) {
        bbp_add_error('bbp_edit_reply_id', __('<strong>ERROR</strong>: Reply ID not found.', 'bbpress'));
        return;
        // Reply id was passed
    } elseif (is_numeric($_POST['bbp_reply_id'])) {
        $reply_id = (int) $_POST['bbp_reply_id'];
        $reply = bbp_get_reply($reply_id);
    }
    // Nonce check
    if (!bbp_verify_nonce_request('bbp-edit-reply_' . $reply_id)) {
        bbp_add_error('bbp_edit_reply_nonce', __('<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress'));
        return;
    }
    // Reply does not exist
    if (empty($reply)) {
        bbp_add_error('bbp_edit_reply_not_found', __('<strong>ERROR</strong>: The reply you want to edit was not found.', 'bbpress'));
        return;
        // Reply exists
    } else {
        // Check users ability to create new reply
        if (!bbp_is_reply_anonymous($reply_id)) {
            // User cannot edit this reply
            if (!current_user_can('edit_reply', $reply_id)) {
                bbp_add_error('bbp_edit_reply_permissions', __('<strong>ERROR</strong>: You do not have permission to edit that reply.', 'bbpress'));
                return;
            }
            // Set reply author
            $reply_author = bbp_get_reply_author_id($reply_id);
            // It is an anonymous post
        } else {
            // Filter anonymous data
            $anonymous_data = bbp_filter_anonymous_post_data();
        }
    }
    // Remove kses filters from title and content for capable users and if the nonce is verified
    if (current_user_can('unfiltered_html') && !empty($_POST['_bbp_unfiltered_html_reply']) && wp_create_nonce('bbp-unfiltered-html-reply_' . $reply_id) === $_POST['_bbp_unfiltered_html_reply']) {
        remove_filter('bbp_edit_reply_pre_title', 'wp_filter_kses');
        remove_filter('bbp_edit_reply_pre_content', 'bbp_encode_bad', 10);
        remove_filter('bbp_edit_reply_pre_content', 'bbp_filter_kses', 30);
    }
    /** Reply Topic ***********************************************************/
    $topic_id = bbp_get_reply_topic_id($reply_id);
    /** Topic Forum ***********************************************************/
    $forum_id = bbp_get_topic_forum_id($topic_id);
    // Forum exists
    if (!empty($forum_id) && $forum_id !== bbp_get_reply_forum_id($reply_id)) {
        // Forum is a category
        if (bbp_is_forum_category($forum_id)) {
            bbp_add_error('bbp_edit_reply_forum_category', __('<strong>ERROR</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress'));
            // Forum is not a category
        } else {
            // Forum is closed and user cannot access
            if (bbp_is_forum_closed($forum_id) && !current_user_can('edit_forum', $forum_id)) {
                bbp_add_error('bbp_edit_reply_forum_closed', __('<strong>ERROR</strong>: This forum has been closed to new replies.', 'bbpress'));
            }
//.........这里部分代码省略.........
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:101,代码来源:functions.php


示例3: bbp_get_reply_author_email

/**
 * Return the reply author email address
 *
 * @since bbPress (r3445)
 *
 * @param int $reply_id Optional. Reply id
 * @uses bbp_get_reply_id() To get the reply id
 * @uses bbp_is_reply_anonymous() To check if the reply is by an anonymous
 *                                 user
 * @uses bbp_get_reply_author_id() To get the reply author id
 * @uses get_userdata() To get the user data
 * @uses get_post_meta() To get the anonymous poster's website email
 * @uses apply_filters() Calls bbp_get_reply_author_email with the author
 *                        email & reply id
 * @return string Reply author email address
 */
function bbp_get_reply_author_email($reply_id = 0)
{
    $reply_id = bbp_get_reply_id($reply_id);
    // Not anonymous
    if (!bbp_is_reply_anonymous($reply_id)) {
        // Use reply author email address
        $user_id = bbp_get_reply_author_id($reply_id);
        $user = get_userdata($user_id);
        $author_email = !empty($user->user_email) ? $user->user_email : '';
        // Anonymous
    } else {
        // Get email from post meta
        $author_email = get_post_meta($reply_id, '_bbp_anonymous_email', true);
        // Sanity check for missing email address
        if (empty($author_email)) {
            $author_email = '';
        }
    }
    return apply_filters('bbp_get_reply_author_email', $author_email, $reply_id);
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:36,代码来源:template.php


示例4: bbp_fix_post_author

/**
 * Fix post author id on post save
 *
 * When a logged in user changes the status of an anonymous reply or topic, or
 * edits it, the post_author field is set to the logged in user's id. This
 * function fixes that.
 *
 * @since 2.0.0 bbPress (r2734)
 *
 * @param array $data Post data
 * @param array $postarr Original post array (includes post id)
 * @uses bbp_get_topic_post_type() To get the topic post type
 * @uses bbp_get_reply_post_type() To get the reply post type
 * @uses bbp_is_topic_anonymous() To check if the topic is by an anonymous user
 * @uses bbp_is_reply_anonymous() To check if the reply is by an anonymous user
 * @return array Data
 */
function bbp_fix_post_author($data = array(), $postarr = array())
{
    // Post is not being updated or the post_author is already 0, return
    if (empty($postarr['ID']) || empty($data['post_author'])) {
        return $data;
    }
    // Post is not a topic or reply, return
    if (!in_array($data['post_type'], array(bbp_get_topic_post_type(), bbp_get_reply_post_type()))) {
        return $data;
    }
    // Is the post by an anonymous user?
    if (bbp_get_topic_post_type() === $data['post_type'] && !bbp_is_topic_anonymous($postarr['ID']) || bbp_get_reply_post_type() === $data['post_type'] && !bbp_is_reply_anonymous($postarr['ID'])) {
        return $data;
    }
    // The post is being updated. It is a topic or a reply and is written by an anonymous user.
    // Set the post_author back to 0
    $data['post_author'] = 0;
    return $data;
}
开发者ID:CompositeUK,项目名称:clone.bbPress,代码行数:36,代码来源:functions.php


示例5: reply_update

 /**
  * Update the activity stream entry when a reply status changes
  *
  * @param int $post_id
  * @param obj $post
  * @uses get_post_type()
  * @uses bbp_get_reply_post_type()
  * @uses bbp_get_reply_id()
  * @uses bbp_is_reply_anonymous()
  * @uses bbp_get_public_status_id()
  * @uses bbp_get_closed_status_id()
  * @uses bbp_get_reply_topic_id()
  * @uses bbp_get_reply_forum_id()
  * @uses bbp_get_reply_author_id()
  * @return Bail early if not a reply, or reply is by anonymous user
  */
 public function reply_update($reply_id, $post)
 {
     // Bail early if not a reply
     if (get_post_type($post) != bbp_get_reply_post_type()) {
         return;
     }
     $reply_id = bbp_get_reply_id($reply_id);
     // Bail early if reply is by anonymous user
     if (bbp_is_reply_anonymous($reply_id)) {
         return;
     }
     $anonymous_data = array();
     // Action based on new status
     if ($post->post_status == bbp_get_public_status_id()) {
         // Validate reply data
         $topic_id = bbp_get_reply_topic_id($reply_id);
         $forum_id = bbp_get_reply_forum_id($reply_id);
         $reply_author_id = bbp_get_reply_author_id($reply_id);
         $this->reply_create($reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author_id);
     } else {
         $this->reply_delete($reply_id);
     }
 }
开发者ID:hscale,项目名称:webento,代码行数:39,代码来源:activity.php


示例6: bbp_current_user_can_access_anonymous_user_form

/**
 * Performs a series of checks to ensure the current user should see the
 * anonymous user form fields.
 *
 * @since 2.5.0 bbPress (r5119)
 *
 * @uses bbp_is_anonymous()
 * @uses bbp_is_topic_edit()
 * @uses bbp_is_topic_anonymous()
 * @uses bbp_is_reply_edit()
 * @uses bbp_is_reply_anonymous()
 *
 * @return bool
 */
function bbp_current_user_can_access_anonymous_user_form()
{
    // Users need to earn access
    $retval = false;
    // User is not logged in, and anonymous posting is allowed
    if (bbp_is_anonymous()) {
        $retval = true;
        // User is editing a topic, and topic is authored by anonymous user
    } elseif (bbp_is_topic_edit() && bbp_is_topic_anonymous()) {
        $retval = true;
        // User is editing a reply, and reply is authored by anonymous user
    } elseif (bbp_is_reply_edit() && bbp_is_reply_anonymous()) {
        $retval = true;
    }
    // Allow access to be filtered
    return (bool) apply_filters('bbp_current_user_can_access_anonymous_user_form', (bool) $retval);
}
开发者ID:CompositeUK,项目名称:clone.bbPress,代码行数:31,代码来源:template.php


示例7: insert_balance_reply

 /**
  * Insert Balance
  * @since 0.1
  * @version 1.2.1
  */
 public function insert_balance_reply()
 {
     $reply_id = bbp_get_reply_id();
     // Skip Anonymous replies
     if (bbp_is_reply_anonymous($reply_id)) {
         return;
     }
     // Get reply author
     $user_id = bbp_get_reply_author_id($reply_id);
     // Check for exclusions and guests
     if ($this->core->exclude_user($user_id) || $user_id == 0) {
         return;
     }
     $balance = $this->core->get_users_cred($user_id, $this->mycred_type);
     $layout = $this->core->plural() . ': ' . $this->core->format_creds($balance);
     echo apply_filters('mycred_bbp_reply_balance', '<div class="users-mycred-balance">' . $layout . '</div>', $layout, $user_id, $this);
 }
开发者ID:kfwebdev,项目名称:wp-atd,代码行数:22,代码来源:mycred-hook-bbPress.php


示例8: AddBBPressForumThreadUserRating

 public function AddBBPressForumThreadUserRating($author_link, $args)
 {
     RWLogger::LogEnterence('AddBBPressForumThreadUserRating');
     $post_id = 0;
     $defaults = array('post_id' => 0, 'link_title' => '', 'type' => 'both', 'size' => 80, 'sep' => '&nbsp;');
     $r = wp_parse_args($args, $defaults);
     extract($r);
     $reply_id = bbp_get_reply_id($post_id);
     RWLogger::Log('AddBBPressForumThreadUserRating', 'post_id = ' . $post_id);
     RWLogger::Log('AddBBPressForumThreadUserRating', 'reply_id = ' . $reply_id);
     if (bbp_is_reply_anonymous($reply_id)) {
         return $author_link;
     }
     $options = array('show-info' => 'false');
     // If accumulated user rating, then make sure it can not be directly rated.
     if ($this->IsUserAccumulatedRating()) {
         $options['read-only'] = 'true';
         $options['show-report'] = 'false';
     }
     $author_id = bbp_get_reply_author_id($reply_id);
     return $author_link . $this->EmbedRatingIfVisible($author_id, $author_id, bbp_get_reply_author_display_name($reply_id), bbp_get_reply_author_url($reply_id), 'user', false, false, false, $options);
 }
开发者ID:robertoAg,项目名称:wordpress_humor,代码行数:22,代码来源:rating-widget.php


示例9:

<?php

/**
 * Anonymous User
 *
 * @package bbPress
 * @subpackage Theme
 */
?>

<?php 
if (bbp_is_anonymous() || bbp_is_topic_edit() && bbp_is_topic_anonymous() || bbp_is_reply_edit() && bbp_is_reply_anonymous()) {
    ?>

	<?php 
    do_action('bbp_theme_before_anonymous_form');
    ?>

	<fieldset class="bbp-form">
		<legend><?php 
    bbp_is_topic_edit() || bbp_is_reply_edit() ? _e('Author Information', 'bbpress') : _e('Your information:', 'bbpress');
    ?>
</legend>

		<?php 
    do_action('bbp_theme_anonymous_form_extras_top');
    ?>

		<p>
			<label for="bbp_anonymous_author"><?php 
    _e('Name (required):', 'bbpress');
开发者ID:kanawanzx,项目名称:support_forum,代码行数:31,代码来源:form-anonymous.php


示例10: aq_get_author

/**
 * Custom function from bbp_get_author_link(), returns only author name
 * -------------------------------------------------------------------------------------------*/
function aq_get_author($post_id = 0)
{
    // Confirmed topic
    if (bbp_is_topic($post_id)) {
        return bbp_get_topic_author($post_id);
        // Confirmed reply
    } elseif (bbp_is_reply($post_id)) {
        return bbp_get_reply_author($post_id);
        // Get the post author and proceed
    } else {
        $user_id = get_post_field('post_author', $post_id);
    }
    // Neither a reply nor a topic, so could be a revision
    if (!empty($post_id)) {
        // Assemble some link bits
        $anonymous = bbp_is_reply_anonymous($post_id);
        // Add links if not anonymous
        if (empty($anonymous) && bbp_user_has_profile($user_id)) {
            $author_link = get_the_author_meta('display_name', $user_id);
            // No links if anonymous
        } else {
            $author_link = join('&nbsp;', $author_links);
        }
        // No post so link is empty
    } else {
        $author_link = '';
    }
    return $author_link;
}
开发者ID:kanawanzx,项目名称:support_forum,代码行数:32,代码来源:bbpress-functions.php


示例11: bbp_author_metabox

/**
 * Anonymous user information metabox
 *
 * @since 2.0.0 bbPress (r2828)
 *
 * @uses bbp_is_reply_anonymous() To check if reply is anonymous
 * @uses bbp_is_topic_anonymous() To check if topic is anonymous
 * @uses get_the_ID() To get the global post ID
 * @uses get_post_meta() To get the author user information
 */
function bbp_author_metabox()
{
    // Post ID
    $post_id = get_the_ID();
    // Show extra bits if topic/reply is anonymous
    if (bbp_is_reply_anonymous($post_id) || bbp_is_topic_anonymous($post_id)) {
        ?>

		<p>
			<strong class="label"><?php 
        esc_html_e('Name:', 'bbpress');
        ?>
</strong>
			<label class="screen-reader-text" for="bbp_anonymous_name"><?php 
        esc_html_e('Name', 'bbpress');
        ?>
</label>
			<input type="text" id="bbp_anonymous_name" name="bbp_anonymous_name" value="<?php 
        echo esc_attr(get_post_meta($post_id, '_bbp_anonymous_name', true));
        ?>
" />
		</p>

		<p>
			<strong class="label"><?php 
        esc_html_e('Email:', 'bbpress');
        ?>
</strong>
			<label class="screen-reader-text" for="bbp_anonymous_email"><?php 
        esc_html_e('Email', 'bbpress');
        ?>
</label>
			<input type="text" id="bbp_anonymous_email" name="bbp_anonymous_email" value="<?php 
        echo esc_attr(get_post_meta($post_id, '_bbp_anonymous_email', true));
        ?>
" />
		</p>

		<p>
			<strong class="label"><?php 
        esc_html_e('Website:', 'bbpress');
        ?>
</strong>
			<label class="screen-reader-text" for="bbp_anonymous_website"><?php 
        esc_html_e('Website', 'bbpress');
        ?>
</label>
			<input type="text" id="bbp_anonymous_website" name="bbp_anonymous_website" value="<?php 
        echo esc_attr(get_post_meta($post_id, '_bbp_anonymous_website', true));
        ?>
" />
		</p>

	<?php 
    } else {
        ?>

		<p>
			<strong class="label"><?php 
        esc_html_e('ID:', 'bbpress');
        ?>
</strong>
			<label class="screen-reader-text" for="bbp_author_id"><?php 
        esc_html_e('ID', 'bbpress');
        ?>
</label>
			<input type="text" id="bbp_author_id" name="post_author_override" value="<?php 
        echo esc_attr(bbp_get_global_post_field('post_author'));
        ?>
" data-ajax-url="<?php 
        echo esc_url(wp_nonce_url(add_query_arg(array('action' => 'bbp_suggest_user'), admin_url('admin-ajax.php', 'relative')), 'bbp_suggest_user_nonce'));
        ?>
" />
		</p>

	<?php 
    }
    ?>

	<p>
		<strong class="label"><?php 
    esc_html_e('IP:', 'bbpress');
    ?>
</strong>
		<label class="screen-reader-text" for="bbp_author_ip_address"><?php 
    esc_html_e('IP Address', 'bbpress');
    ?>
</label>
		<input type="text" id="bbp_author_ip_address" name="bbp_author_ip_address" value="<?php 
    echo esc_attr(get_post_meta($post_id, '_bbp_author_ip', true));
//.........这里部分代码省略.........
开发者ID:joeyblake,项目名称:bbpress,代码行数:101,代码来源:metaboxes.php


示例12: bbp_get_author_link

/**
 * Return the author link of the post
 *
 * @since bbPress (r2875)
 *
 * @param mixed $args Optional. If an integer, it is used as reply id.
 * @uses bbp_is_topic() To check if it's a topic page
 * @uses bbp_get_topic_author_link() To get the topic author link
 * @uses bbp_is_reply() To check if it's a reply page
 * @uses bbp_get_reply_author_link() To get the reply author link
 * @uses get_post_field() To get the post author
 * @uses bbp_is_reply_anonymous() To check if the reply is by an
 *                                 anonymous user
 * @uses get_the_author_meta() To get the author name
 * @uses bbp_get_user_profile_url() To get the author profile url
 * @uses get_avatar() To get the author avatar
 * @uses apply_filters() Calls 'bbp_get_reply_author_link' with the
 *                        author link and args
 * @return string Author link of reply
 */
function bbp_get_author_link($args = '')
{
    // Default arguments
    $defaults = array('post_id' => 0, 'link_title' => '', 'type' => 'both', 'size' => 80);
    $r = bbp_parse_args($args, $defaults, 'get_author_link');
    extract($r);
    // Used as reply_id
    if (is_numeric($args)) {
        $post_id = $args;
    }
    // Confirmed topic
    if (bbp_is_topic($post_id)) {
        return bbp_get_topic_author_link($args);
    } elseif (bbp_is_reply($post_id)) {
        return bbp_get_reply_author_link($args);
    } else {
        $user_id = get_post_field('post_author', $post_id);
    }
    // Neither a reply nor a topic, so could be a revision
    if (!empty($post_id)) {
        // Generate title with the display name of the author
        if (empty($link_title)) {
            $link_title = sprintf(!bbp_is_reply_anonymous($post_id) ? __('View %s\'s profile', 'bbpress') : __('Visit %s\'s website', 'bbpress'), get_the_author_meta('display_name', $user_id));
        }
        // Assemble some link bits
        $link_title = !empty($link_title) ? ' title="' . $link_title . '"' : '';
        $author_url = bbp_get_user_profile_url($user_id);
        $anonymous = bbp_is_reply_anonymous($post_id);
        // Get avatar
        if ('avatar' == $type || 'both' == $type) {
            $author_links[] = get_avatar($user_id, $size);
        }
        // Get display name
        if ('name' == $type || 'both' == $type) {
            $author_links[] = get_the_author_meta('display_name', $user_id);
        }
        // Add links if not anonymous
        if (empty($anonymous)) {
            foreach ($author_links as $link_text) {
                $author_link[] = sprintf('<a href="%1$s"%2$s>%3$s</a>', $author_url, $link_title, $link_text);
            }
            $author_link = join('&nbsp;', $author_link);
            // No links if anonymous
        } else {
            $author_link = join('&nbsp;', $author_links);
        }
        // No post so link is empty
    } else {
        $author_link = '';
    }
    return apply_filters('bbp_get_author_link', $author_link, $args);
}
开发者ID:rmccue,项目名称:bbPress,代码行数:72,代码来源:bbp-user-template.php


示例13: bbp_author_metabox

/**
 * Anonymous user information metabox
 *
 * @since bbPress (r2828)
 *
 * @uses bbp_is_reply_anonymous() To check if reply is anonymous
 * @uses bbp_is_topic_anonymous() To check if topic is anonymous
 * @uses get_the_ID() To get the global post ID
 * @uses get_post_meta() To get the author user information
 */
function bbp_author_metabox()
{
    // Post ID
    $post_id = get_the_ID();
    // Show extra bits if topic/reply is anonymous
    if (bbp_is_reply_anonymous($post_id) || bbp_is_topic_anonymous($post_id)) {
        ?>

		<p><strong><?php 
        _e('Name', 'bbpress');
        ?>
</strong></p>

		<p>
			<label class="screen-reader-text" for="bbp_anonymous_name"><?php 
        _e('Name', 'bbpress');
        ?>
</label>
			<input type="text" id="bbp_anonymous_name" name="bbp_anonymous_name" value="<?php 
        echo esc_attr(get_post_meta($post_id, '_bbp_anonymous_name', true));
        ?>
" size="25" />
		</p>

		<p><strong><?php 
        _e('Email', 'bbpress');
        ?>
</strong></p>

		<p>
			<label class="screen-reader-text" for="bbp_anonymous_email"><?php 
        _e('Email', 'bbpress');
        ?>
</label>
			<input type="text" id="bbp_anonymous_email" name="bbp_anonymous_email" value="<?php 
        echo esc_attr(get_post_meta($post_id, '_bbp_anonymous_email', true));
        ?>
" size="25" />
		</p>

		<p><strong><?php 
        _e('Website', 'bbpress');
        ?>
</strong></p>

		<p>
			<label class="screen-reader-text" for="bbp_anonymous_website"><?php 
        _e('Website', 'bbpress');
        ?>
</label>
			<input type="text" id="bbp_anonymous_website" name="bbp_anonymous_website" value="<?php 
        echo esc_attr(get_post_meta($post_id, '_bbp_anonymous_website', true));
        ?>
" size="25" />
		</p>

	<?php 
    }
    ?>

	<p><strong><?php 
    _e('IP Address', 'bbpress');
    ?>
</strong></p>

	<p>
		<label class="screen-reader-text" for="bbp_author_ip_address"><?php 
    _e('IP Address', 'bbpress');
    ?>
</label>
		<input type="text" id="bbp_author_ip_address" name="bbp_author_ip_address" value="<?php 
    echo esc_attr(get_post_meta($post_id, '_bbp_author_ip', true));
    ?>
" size="25" disabled="disabled" />
	</p>

	<?php 
    do_action('bbp_author_metabox', $post_id);
}
开发者ID:rmccue,项目名称:bbPress,代码行数:89,代码来源:bbp-metaboxes.php


示例14: get_data

 /**
  * Get the data being exported
  *
  * @access public
  * @since 1.0
  * @return array $data Data for Export
  */
 public function get_data()
 {
     $topics = get_posts(array('post_parent' => $this->forum_id, 'nopaging' => true, 'post_type' => bbp_get_topic_post_type()));
     foreach ($topics as $topic) {
         $topic_anonymous = bbp_is_topic_anonymous($topic->ID);
         if ($topic_anonymous) {
             $email = get_post_meta($topic->ID, '_bbp_anonymous_email', true);
         } else {
             $email = get_the_author_meta('email', $topic->post_author);
         }
         $data[] = array('post_type' => bbp_get_topic_post_type(), 'post_author' => $email, 'user_login' => get_the_author_meta('user_login', $topic->post_author), 'post_parent' => $topic->post_parent, 'post_content' => htmlentities($topic->post_content), 'post_title' => $topic->post_title, 'post_date_gmt' => $topic->post_date_gmt, 'post_date' => $topic->post_date, 'anonymous' => $topic_anonymous ? '1' : '0', 'voices' => bbp_get_topic_voice_count($topic->ID), 'reply_count' => bbp_get_topic_post_count($topic->ID), 'resolved' => function_exists('bbps_topic_resolved') && bbps_topic_resolved($topic->ID) ? '1' : 0);
         $replies = get_posts(array('post_parent' => $topic->ID, 'nopaging' => true, 'post_type' => bbp_get_reply_post_type()));
         if ($replies) {
             foreach ($replies as $reply) {
                 $reply_anonymous = bbp_is_reply_anonymous($reply->ID);
                 if ($reply_anonymous) {
                     $reply_email = get_post_meta($topic->ID, '_bbp_anonymous_email', true);
                 } else {
                     $reply_email = get_the_author_meta('email', $reply->post_author);
                 }
                 $data[] = array('post_type' => bbp_get_reply_post_type(), 'post_author' => $reply_email, 'user_login' => get_the_author_meta('user_login', $reply->post_author), 'post_parent' => $reply->post_parent, 'post_content' => htmlentities($reply->post_content), 'post_title' => $reply->post_title, 'post_date_gmt' => $reply->post_date_gmt, 'post_date' => $reply->post_date, 'anonymous' => $reply_anonymous ? '1' : '0', 'voices' => '0', 'reply_count' => '0', 'resolved' => '0');
             }
         }
     }
     $data = apply_filters('bbp_export_get_data', $data);
     return $data;
 }
开发者ID:markc,项目名称:bbPress-Export-and-Import,代码行数:34,代码来源:export.php


示例15: AddBBPressForumThreadUserRating

 public function AddBBPressForumThreadUserRating($author_link)
 {
     global $post;
     $reply_id = bbp_get_reply_id($post->ID);
     if (bbp_is_reply_anonymous($reply_id)) {
         return $author_link;
     }
     $options = array('show-info' => 'false');
     // If accumulated user rating, then make sure it can not be directly rated.
     if ($this->IsUserAccumulatedRating()) {
         $options['read-only'] = 'true';
         $options['show-report'] = 'false';
     }
     $author_id = bbp_get_reply_author_id($reply_id);
     return $author_link . $this->EmbedRatingIfVisible($author_id, $author_id, bbp_get_reply_author_display_name($reply_id), bbp_get_reply_author_url($reply_id), 'user', false, false, false, $options);
 }
开发者ID:panser,项目名称:wandromaha,代码行数:16,代码来源:rating-widget.php


示例16: likebtn_bbp_author_link

function likebtn_bbp_author_link($author_link)
{
    global $post;
    $reply_id = bbp_get_reply_id($post->ID);
    if (bbp_is_reply_anonymous($reply_id)) {
        return $author_link;
    }
    $author_id = bbp_get_reply_author_id($reply_id);
    $content = _likebtn_get_content_universal(LIKEBTN_ENTITY_BBP_USER, $author_id);
    return $author_link . $content;
}
开发者ID:Omuze,项目名称:barakat,代码行数:11,代码来源:likebtn_like_button.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP bbp_is_reply_edit函数代码示例发布时间:2022-05-24
下一篇:
PHP bbp_is_reply函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap