All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.

Author Topic: Wordpress Javascript wp_head array  (Read 5085 times)

0 Members and 1 Guest are viewing this topic.

Offline Basilakis

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
Wordpress Javascript wp_head array
« on: 25 September 2009, 07:42 »
Hey,

I am trying to figure out how to put a JS array and print it @ wp_head

I am doing this

Code: [Select]
function weather_process_header() {
echo "\n".'<!-- Start Of Script Generated By weather-plugin -->'."\n";
wp_register_style('weather-plugin-css', plugins_url('weather-plugin/weather.css'), false, '0.1', 'all');
wp_enqueue_script('ajaxcontent', '/wp-content/plugins/weather-plugin/js/ajax-dynamic-content.js', array('weatherplugin'), '2.1');
wp_enqueue_script('ajaxweather', '/wp-content/plugins/events-calendar/js/ajax-weather.js', array('weatherplugin'), '1.0b2');
wp_print_scripts(array('weather-plugin', 'weatherplugin'));
wp_print_styles(array('weather-plugin', 'weather-plugin-css'));
echo '<!-- End Of Script Generated By weather-plugin -->'."\n";
}

and then to the wp_head

Code: [Select]
add_action('wp_head', 'weather_process_header');

But it does not seem to work fine... It prints the CSS but not the JS array. Any help? :D
« Last Edit: 25 September 2009, 09:00 by Basilakis »

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.