Permalink
Browse files

Set javascript variables in `admin_print_scripts`, not `admin_init`

  • Loading branch information...
1 parent fbee987 commit 1033ed16c938e22773ecacfc6121f5cde9a618fb @joshbetz joshbetz committed Jul 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 bulk-user-management.php
View
@@ -29,7 +29,7 @@ class Bulk_User_Management {
function __construct() {
add_action( 'init', array( $this, 'init' ) );
- add_action( 'admin_init', array( $this, 'admin_init' ) );
+ add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_action( 'admin_menu', array( $this, 'register_menus' ) );
@@ -55,7 +55,7 @@ public function init() {
$this->invite_page = apply_filters('bulk_user_management_invite_page', $this->invite_page);
}
- public function admin_init() { ?>
+ public function admin_print_scripts() { ?>
<script>
var bulk_user_management_images = "<?php echo plugins_url( 'images', __FILE__ ); ?>";
</script>

0 comments on commit 1033ed1

Please sign in to comment.