enqueue and localize script in footer

You should be setting it to show in the footer with the register, so your code should look like this:

wp_register_script(
    'flowplayer_object',
    get_bloginfo( 'stylesheet_directory' ) . '/_/js/flowplayer/flowplayer-object-creator.js',
    array(), // these are your dependencies, if you need jQuery or something, it needs to go in that array
    false, // set a version if you want
    true // this will put it in the footer
);

wp_enqueue_script( 'flowplayer_object' );

Leave a Comment