Changeset 950

Show
Ignore:
Timestamp:
03/14/08 22:04:53 (9 months ago)
Author:
_ck_
Message:

only inject css+javascript if on topic page

Files:

Legend:

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

    r949 r950  
    184184        // }     
    185185 
    186         bb_polls_add_header();  // add_action('bb_send_headers', 'bb_polls_add_header'); 
    187         add_action('bb_head', 'bb_polls_add_css'); 
    188         add_action('bb_head','bb_polls_add_javascript'); 
    189         add_filter('topic_title', 'bb_polls_title'); 
    190         add_action('topicmeta','bb_polls_pre_poll',200); 
     186        bb_polls_add_header();  // add_action('bb_send_headers', 'bb_polls_add_header');         
     187        if (is_topic()) {               // this eventually may have to be added on an admin page 
     188                add_action('bb_head', 'bb_polls_add_css'); 
     189                add_action('bb_head','bb_polls_add_javascript'); 
     190                add_action('topicmeta','bb_polls_pre_poll',200); 
     191        } else { 
     192                add_filter('topic_title', 'bb_polls_title'); 
     193        }        
    191194} 
    192195