Last active
March 3, 2017 13:17
-
-
Save raftaar1191/50e79116b56fdd6f4c441b4f67b448e8 to your computer and use it in GitHub Desktop.
Always show the upload container by default
This file contains 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 | |
// check if function does not exists | |
if ( ! function_exists( 'rtmedia_after_media_gallery_show_upload_button' ) ) { | |
function rtmedia_after_media_gallery_show_upload_button() { | |
// Please change the page_slug from here | |
$page_slug = 'file-upload'; | |
if ( isset( $_GET[ $page_slug ] ) && ! empty( $_GET[ $page_slug ] ) ) { | |
?> | |
<style type="text/css"> | |
#rtm-media-gallery-uploader { | |
display: block !important; | |
} | |
#rtm-media-options .rtmedia-upload-media-link { | |
display: none; | |
} | |
</style> | |
<?php | |
} | |
} | |
} | |
add_action( 'rtmedia_after_media_gallery', 'rtmedia_after_media_gallery_show_upload_button', 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment