Created
July 11, 2018 14:30
-
-
Save pranali333/459788e565801d17e972f233966046b6 to your computer and use it in GitHub Desktop.
Custom code to keep rtMedia uploader open by default
This file contains hidden or 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
// 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