Skip to content

Instantly share code, notes, and snippets.

@gdarko
Created June 5, 2020 22:01
Show Gist options
  • Save gdarko/66cc7a3169ec4ab5e838a21671d6e947 to your computer and use it in GitHub Desktop.
Save gdarko/66cc7a3169ec4ab5e838a21671d6e947 to your computer and use it in GitHub Desktop.
Hide upload options on WP Vimeo Videos
<?php
/**
* Hide Upload options on WP Vimeo Videos
* @return void
*/
function wvv_disable_upload_options() {
echo '<style>.dgv-vimeo-form-row label {display:none !important;}</style>';
}
add_action('admin_head', 'wvv_disable_upload_options');
@pkimbrell38
Copy link

pkimbrell38 commented Jun 5, 2020

Thanks for your reply. When I add the code "all" of the upload options disappear. What I need it to do is make the first option available but remove the other two like the screenshot below. Is this possible?

Screen Shot 2020-06-05 at 5 16 28 PM

@gdarko
Copy link
Author

gdarko commented Jun 5, 2020

@pkimbrell38

Yes, something like this

/**
 * Hide Upload options on WP Vimeo Videos
 * @return void
 */
function wvv_disable_upload_options() {
	echo '<style>.dgv-vimeo-form-row label:not(:first-child){display: none !important;}</style>';	
}
add_action('admin_head', 'wvv_disable_upload_options');

@pkimbrell38
Copy link

pkimbrell38 commented Jun 5, 2020 via email

@gdarko
Copy link
Author

gdarko commented Jun 6, 2020

Great! No problem.
Have a nice weekend!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment