0

I have custom post type with tinymice, I installed Buddyforms so the button is added to the top of the tinymice editor to include forms. I'll like to remove it. Please, help with the snippet to remove it.

This is the full path code

    <div id="wp-content-media-buttons" class="wp-media-buttons">
<button type="button" id="insert-media-button" class="button insert-media add_media" data-editor="content">
<span class="wp-media-buttons-icon"></span> Add Media</button>
<a class="button thickbox" data-editor="content" title="BuddyForms Shortcode Generator!" href="#TB_inline width=400&amp;inlineId=buddyforms_popup_container&amp;width=753&amp;height=234"><span class="tk-icon-buddyforms"> </span> BuddyForms</a>
<a href="#TB_inline width=640&amp;inlineId=pods_shortcode_form&amp;width=753&amp;height=234" class="thickbox button" id="add_pod_button" title="Pods Shortcode"><img style="padding: 0px 6px 0px 0px; margin: -3px 0px 0px;" src="https://winclassy.com/wp-content/plugins/pods/ui/images/icon16.png" alt="Pods Shortcode">Pods Shortcode</a>        <style>
                .gmw_media_icon:before {
                    content: "\f230" !important;
                    color: rgb(103, 199, 134) !important;
                }
                .gmw_media_icon {
                    vertical-align: text-top;
                    width: 18px;
                }
                .wp-core-ui a.gmw_media_link{
                    padding-left: 0.4em;
                }
            </style>
    
            <a href="#TB_inline?width=480&amp;inlineId=select_gmw_form&amp;width=753&amp;height=234" class="thickbox button gmw_media_link" id="add_gmw_form" title="GEO my WP Form Shortcode">
                <span class="dashicons-location-alt dashicons"></span>
                GMW Form        </a>
            </div>

I have tried removing it like this but it didn't go

#wp-content-media-buttons > a:nth-child(2) {
   display: none !important;
}

Because it appears in multiple places it'll be an overkill to using CSS so I saw a code similar to it that uses filters for removing like buttons wpforms. Could someone help me with a similar code to remove buddyforms button from there? Thanks.

<?
function wpf_dev_remove_media_button( $display ) {
    $screen = get_current_screen();
    if ( 'post' == $screen->post_type || 'pages' == $screen->post_type ) {
        return false;
    } 
    return $display;
}
add_filter( 'wpforms_display_media_button', 'wpf_dev_remove_media_button' );


[![enter image description here][1]][1]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.