示例#1
0
if (bp_docs_is_existing_doc()) {
    ?>

	<div id="bp-docs-single-doc-header">
		<h2 class="doc-title"><?php 
    the_title();
    ?>
</h2>

		<?php 
    if (apply_filters('bp_docs_allow_access_settings', true)) {
        ?>
			<div class="doc-permissions">

				<?php 
        bp_docs_doc_permissions_snapshot();
        ?>

			</div>
		<?php 
    }
    ?>
	</div>

	<div class="doc-tabs">
		<ul>
			<li<?php 
    if (bp_docs_is_doc_read()) {
        ?>
 class="current"<?php 
    }
/**
 * Renders the Permissions Snapshot
 *
 * @since 1.3
 */
function bp_docs_render_permissions_snapshot()
{
    $show_snapshot = is_user_logged_in();
    if (apply_filters('bp_docs_allow_access_settings', $show_snapshot)) {
        ?>
		<div class="doc-permissions">
			<?php 
        bp_docs_doc_permissions_snapshot();
        ?>
		</div>
		<?php 
    }
}