optionsframework_mlu_js_popup

The Evolved optionsframework mlu js popup function.

Description

optionsframework_mlu_js_popup(); 

Usage

  1. if ( !function_exists( 'optionsframework_mlu_js_popup' ) ) { 
  2. require_once '/admin/options-framework/options-medialibrary-uploader.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = optionsframework_mlu_js_popup(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/admin/options-framework/options-medialibrary-uploader.php  
  1. function optionsframework_mlu_js_popup () { 
  2.  
  3. $_of_title = $_REQUEST['of_title']; 
  4. if ( ! $_of_title ) { $_of_title = 'file'; } // End IF Statement 
  5. ?> 
  6. <script type="text/javascript"> 
  7. <!-- 
  8. jQuery(function($) { 
  9.  
  10. jQuery.noConflict(); 
  11.  
  12. // Change the title of each tab to use the custom title text instead of "Media File". 
  13. $( 'h3.media-title' ).each ( function () { 
  14. var current_title = $( this ).html(); 
  15. var new_title = current_title.replace( 'media file', '<?php echo $_of_title; ?>' ); 
  16. $( this ).html( new_title ); 
  17.  
  18. } ); 
  19.  
  20. // Change the text of the "Insert into Post" buttons to read "Use this File". 
  21. $( '.savesend input.button[value*="Insert into Post"], .media-item #go_button' ).attr( 'value', 'Use this File' ); 
  22.  
  23. // Hide the "Insert Gallery" settings box on the "Gallery" tab. 
  24. $( 'div#gallery-settings' ).hide(); 
  25.  
  26. // Preserve the "is_optionsframework" parameter on the "delete" confirmation button. 
  27. $( '.savesend a.del-link' ).click ( function () { 
  28.  
  29. var continueButton = $( this ).next( '.del-attachment' ).children( 'a.button[id*="del"]' ); 
  30. var continueHref = continueButton.attr( 'href' ); 
  31. continueHref = continueHref + '&is_optionsframework=yes'; 
  32. continueButton.attr( 'href', continueHref ); 
  33.  
  34. } ); 
  35.  
  36. }); 
  37. --> 
  38. </script> 
  39. <?php