Skip to content

Instantly share code, notes, and snippets.

@pranali333
Created July 11, 2018 14:30
Show Gist options
  • Save pranali333/459788e565801d17e972f233966046b6 to your computer and use it in GitHub Desktop.
Save pranali333/459788e565801d17e972f233966046b6 to your computer and use it in GitHub Desktop.
Custom code to keep rtMedia uploader open by default
// Put below code at end of your theme's functions.php file.
add_action( 'wp_head', function() {
?>
<style>
#rtm-media-gallery-uploader {
display: block !important;
}
</style>
<script>
if( typeof rtMediaHook == "object" ){ // check if rtMediaHook defined or not
rtMediaHook.register(
'rtmedia_js_uploader_slide_after_gallery_reload', // hook id here
function () { // your function here
return false;
}
);
}
</script>
<?php
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment