mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-04 12:22:24 +08:00
11 lines
296 B
Text
11 lines
296 B
Text
function wpf_dev_remove_media_button( $display ) {
|
|
|
|
$screen = get_current_screen();
|
|
|
|
if ( 'page' == $screen->post_type || 'post' == $screen->post_type ) {
|
|
return false;
|
|
|
|
}
|
|
return $display;
|
|
}
|
|
add_filter( 'wpforms_display_media_button', 'wpf_dev_remove_media_button' );
|