beaverbuilder / feature-requests

Feature request board for Beaver Builder products.
26 stars 4 forks source link

Video Module Default Option #348

Open NathanLyle opened 10 months ago

NathanLyle commented 10 months ago

When using the video module, there are two options: Media Library or Embed. It defaults to Media Library, but I strongly recommend changing that so that Embed is the default. The number of times it would make sense to upload a video file directly to the website is much smaller than for embedding a video hosted elsewhere. Having the current default in place encourages uploading large files to the site, which translates into higher bandwidth and space usage, and can negatively impact search visibility and SEO scores. (Plus, it's just a hassle to always have to change that option when using it.)

The following allows the default to be changed, but requires extra effort on the part of someone to put it in place (and knowledge of how to do so):

add_filter( 'fl_builder_settings_form_defaults', function ( $defaults, $form_type ) { if ( $form_type == 'video-module' ) { $defaults->video_type = 'embed'; } return $defaults; }, 10, 2 );