Changeset 948

Show
Ignore:
Timestamp:
03/14/08 19:26:10 (9 months ago)
Author:
_ck_
Message:

moved javascript to bb_head

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bbpress-polls/trunk/bb-polls.php

    r947 r948  
    186186        bb_polls_add_header();  // add_action('bb_send_headers', 'bb_polls_add_header'); 
    187187        add_action('bb_head', 'bb_polls_add_css'); 
     188        add_action('bb_head','bb_polls_add_javascript'); 
    188189        add_filter('topic_title', 'bb_polls_title'); 
    189190        add_action('topicmeta','bb_polls_pre_poll',200); 
     
    196197$user_id=bb_get_current_user_info( 'id' ); 
    197198$administrator=bb_current_user_can('administrate'); 
    198 bb_polls_add_javascript($topic_id);     // ajax-ish 
    199199if (!$edit_poll && isset($_GET['edit_poll'])) {$edit_poll= intval($_GET['edit_poll']);} 
    200200if ($edit_poll || ! isset($topic->poll_options)) {      // no saved poll question with options 
     
    458458}  
    459459 
    460 function bb_polls_add_javascript($topic_id) { 
     460function bb_polls_add_javascript($topic_id=0) { 
    461461global $bb_polls; 
    462462if ($bb_polls['use_ajax']) :