This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( bp_docs_is_doc_edit() || bp_docs_is_doc_create() ) : ?> | |
<?php bp_docs_media_buttons( 'doc_content' ) ?> | |
<?php endif; ?> | |
<?php | |
// Maybe you'll want to do something with main doc ID. | |
$doc_id = get_the_ID(); | |
?> | |
<ul id="doc-attachments-ul"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_docs_create_admins_only( $caps, $cap, $user_id, $args ) { | |
if ( 'bp_docs_create' == $cap ) { | |
// Only admins can create docs. | |
if ( bp_current_user_can( 'bp_moderate' ) ) { | |
$caps[] = 'exist'; | |
} else { | |
$caps[] = 'do_not_allow'; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'bp_user_can', 'my_create_groups_cap_change', 20, 5 ); | |
function my_create_groups_cap_change( $retval, $user_id, $capability, $site_id, $args ) { | |
if ( 'create_subgroups' == $capability ) { | |
// We need to know which group is in question. | |
if ( empty( $args['group_id'] ) ) { | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove the default | |
remove_action( 'bp_actions', 'bp_docs_process_folder_delete_cb' ); | |
// Add the troubleshooting version | |
add_action( 'bp_actions', 'my_tshoot_bp_docs_process_folder_delete_cb' ); | |
/** | |
* Catch a request to delete a folder. | |
* | |
* @since 1.9.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="toggle-container toggle-closed"> | |
<span class="arrow"></span><a href="https://www.communitycommons.org/cchelp/how-do-i-add-a-picture-to-my-member-profile/" class="toggle-trigger">This is probably the most common example of a toggle.</a> | |
<div class="toggle-content border-left"> | |
<p>It includes the arrow toggle-state indicator and the content block gets the nice little left border and indent.</p> | |
<p>…</p> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span class="add-tooltip" data-tooltip-text="Tooltip message to show">Target text</span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set the current progress in the 'status' parameter. | |
// List out the names of the steps in the 'steps' parameter. | |
[progress_bar status="5" steps="Uno,Dos,Tres,Cuatro,Cinco,Seis,Siete"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span class="icon-mime-type video"></span><a href="#video">Video</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git includes/templates/docs/single/comments.php includes/templates/docs/single/comments.php | |
index b11ff29..8b5d42d 100644 | |
--- includes/templates/docs/single/comments.php | |
+++ includes/templates/docs/single/comments.php | |
@@ -21,35 +21,44 @@ foreach ( (array)$comments as $comment ) { | |
?> | |
-<?php if ( current_user_can( 'bp_docs_read_comments' ) ) : ?> | |
+<?php if ( current_user_can( 'bp_docs_read_comments' ) || current_user_can( 'bp_docs_post_comments' ) ) : ?> |