export_add_js

Display JavaScript on the page.

Description

export_add_js(); 

Usage

  1. if ( !function_exists( 'export_add_js' ) ) { 
  2. require_once ABSPATH . '/wp-admin/export.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = export_add_js(); 
  7.  

Defined (1)

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

/wp-admin/export.php  
  1. function export_add_js() { 
  2. ?> 
  3. <script type="text/javascript"> 
  4. jQuery(document).ready(function($) { 
  5. var form = $('#export-filters'),  
  6. filters = form.find('.export-filters'); 
  7. filters.hide(); 
  8. form.find('input:radio').change(function() { 
  9. filters.slideUp('fast'); 
  10. switch ( $(this).val() ) { 
  11. case 'attachment': $('#attachment-filters').slideDown(); break; 
  12. case 'posts': $('#post-filters').slideDown(); break; 
  13. case 'pages': $('#page-filters').slideDown(); break; 
  14. }); 
  15. }); 
  16. </script> 
  17. <?php