Advertisement
Guest User

Functions.php - Image Upload Functions

a guest
Jan 7th, 2011
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. /**
  2.  * IMAGE UPLOAD META FUNCTIONS
  3.  */
  4.  
  5. //
  6. function my_admin_scripts() {
  7. wp_enqueue_script('media-upload');
  8. wp_enqueue_script('thickbox');
  9. wp_register_script('my-upload',  get_template_directory_uri() . '/custom/img-upload.js', array('jquery','media-upload','thickbox'));
  10. wp_enqueue_script('my-upload');
  11. }
  12.  
  13. function my_admin_styles() {
  14. wp_enqueue_style('thickbox');
  15. }
  16.  
  17. //if (isset($_GET['page']) && $_GET['page'] == 'my_plugin_page') {
  18. add_action('admin_print_scripts-post.php', 'my_admin_scripts');
  19. add_action('admin_print_styles-post.php', 'my_admin_styles' );
  20. //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement