Created
June 2, 2025 14:08
-
-
Save mahircoding/cc0302e81dd3785499736f46ccd0fc62 to your computer and use it in GitHub Desktop.
Buddyboos - add custom record button
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 | |
/** | |
* BP Nouveau messages editor toolbar | |
* | |
* This template can be overridden by copying it to yourtheme/buddypress/messages/parts/bp-messages-formatting-toolbar.php. | |
* | |
* @since BuddyBoss 2.1.4 | |
* @version 1.0.0 | |
*/ | |
?> | |
<script type="text/html" id="tmpl-whats-new-formatting-toolbar"> | |
<?php if ( ! bp_is_active( 'media' ) ) : ?> | |
<div class="media-off"> | |
<?php endif; ?> | |
<?php if ( bp_is_active( 'media' ) ) : ?> | |
<div id="vrbm-recording-container"> | |
<div class="post-elements-buttons-item show-toolbar" data-bp-tooltip-pos="down-left" data-bp-tooltip="Voice Note" data-bp-tooltip-show="Voice Note" id="vrbm-record-button"> | |
<i class="bb-icon-l bb-icon-microphone"></i> | |
</div> | |
<div id="vrbm-recording-status"></div> | |
<!-- Cancel button --> | |
<div class="post-recording show-toolbar" data-bp-tooltip-pos="down-left" id="vrbm-cancel-button" data-bp-tooltip="Cancel Voice Note" style="display: none;"> | |
<i class="bb-icon-l bb-icon-cancel"></i> | |
</div> | |
<!-- Add custom post button --> | |
<div class="post-recording show-toolbar" data-bp-tooltip-pos="down-left" data-bp-tooltip="Send Voice Note" data-bp-tooltip-show="Send Voice Note" id="vrbm-post-button" style="display: none;"> | |
<i class="bb-icon-l bb-icon-paper-plane"></i> | |
</div> | |
<input type="hidden" id="vrbm-recording-url" name="vrbm_recording_url"> | |
</div> | |
<div class="post-elements-buttons-item show-toolbar" data-bp-tooltip-pos="down-left" data-bp-tooltip="<?php esc_attr_e( 'Show formatting', 'buddyboss' ); ?>" data-bp-tooltip-hide="<?php esc_attr_e( 'Hide formatting', 'buddyboss' ); ?>" data-bp-tooltip-show="<?php esc_attr_e( 'Show formatting', 'buddyboss' ); ?>"> | |
<a href="#" id="show-toolbar-button" class="toolbar-button bp-tooltip" aria-label="<?php esc_attr_e( 'Show formatting', 'buddyboss' ); ?>"> | |
<span class="bb-icon-l bb-icon-font"></span> | |
</a> | |
</div> | |
<div class="post-elements-buttons-item post-emoji bp-tooltip post-media-emoji-support" data-bp-tooltip-pos="down" data-bp-tooltip="<?php esc_attr_e( 'Emoji', 'buddyboss' ); ?>"></div> | |
<?php endif; ?> | |
<?php if ( ! bp_is_active( 'media' ) ) : ?> | |
</div> | |
<?php endif; ?> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ganti file file-bp-messages-formatting-toolbar-php
dengan code ini, copas all, replace saja.
lokasi file di File: buddyboss-platform/bp-templates/bp-nouveau/buddypress/common/js-templates/messages/parts/bp-messages-formatting-toolbar.php
buka di Plugin Editor WordPress. klik Save