This file contains 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
add_action( 'groups_group_after_save', 'bp_45123590' ); | |
function bp_45123590( $group_args ) { | |
$towrite = PHP_EOL . 'newly created group args: ' . print_r( $group_args, TRUE ); | |
$fp = fopen('groups_group_after_save_args.txt', 'a'); | |
fwrite($fp, $towrite); | |
fclose($fp); | |
} |
This file contains 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 bp_docs_upgrade_script_1_9() { | |
global $wpdb; | |
$bp = buddypress(); | |
// Clean the meta_values that got grossed up in BP 2.0 | |
$wpdb->update( $bp->groups->table_name_groupmeta, | |
array( 'meta_key' => 'bp-docs' ), | |
array( 'meta_key' => 'bpdocs' ) |
This file contains 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
// Utility filter to see what's attached to a filter: | |
function dc_wp_show_hooked_filters() { | |
// Set the hook name you're checking out here. | |
$hook_name = 'pre_get_posts'; | |
global $wp_filter; | |
echo '<pre class="filter-dump">'; | |
var_dump( $wp_filter[$hook_name] ); | |
echo '</pre>'; | |
} | |
add_action( 'wp_head', 'dc_wp_show_hooked_filters' ); |
This file contains 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
function dc_wp_show_hooked_filters(){ | |
global $wp_filter; | |
$filter_name = 'bp_core_fetch_avatar_no_grav'; | |
echo '<pre class="filter-dump">'; | |
var_dump( $wp_filter[$filter_name] ); | |
echo '</pre>'; | |
} | |
add_action( 'wp_head', 'dc_wp_show_hooked_filters' ); |
This file contains 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_enable_folders() ) { | |
echo PHP_EOL . "Folders are enabled generally."; | |
} else { | |
echo PHP_EOL . "Folders are disabled generally."; | |
} | |
if ( bp_docs_enable_folders_for_current_context() ) { | |
echo PHP_EOL . "Folders are enabled for current context."; | |
} else { |
This file contains 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
<!-- Checkbox inputs, before changes --> | |
<div class="editfield field_2 field_core-makeup optional-field visibility-public alt field_type_checkbox"> | |
<div class="checkbox"> | |
<label for="field_2">Core makeup</label> | |
<label for="field_11_0"><input name="field_2[]" id="field_11_0" value="Goat" type="checkbox">Goat</label> | |
<label for="field_12_1"><input name="field_2[]" id="field_12_1" value="Rhinoceros" type="checkbox">Rhinoceros</label> | |
<label for="field_13_2"><input name="field_2[]" id="field_13_2" value="Slow Loris" type="checkbox">Slow Loris</label> | |
</div> | |
</div> |
This file contains 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' ) ) : ?> |