Plugin Directory

Changeset 1252047


Ignore:
Timestamp:
09/23/2015 01:47:47 PM (11 years ago)
Author:
jacobwarduk
Message:

Checking for admin page before loading resources

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bbp-tweet/trunk/bbp-tweet.php

    r1231148 r1252047  
    4141
    4242
    43 add_action( 'admin_init', 'bbp_tweet_admin_init' );
    44 
    45 function bbp_tweet_admin_init() {
    46 
     43add_action( 'admin_enqueue_scripts', 'bbp_tweet_admin_init' );
     44
     45function bbp_tweet_admin_init( $hook ) {
     46
     47    if ( 'bbp-tweet-admin.php' != $hook ) {
     48        return;
     49    }
     50   
    4751    wp_register_style( 'bbp_tweet_bootstrap_main_stylesheet', plugins_url( 'css/bootstrap.min.css', __FILE__) );
    4852    wp_register_style( 'bbp_tweet_bootstrap_theme_stylesheet', plugins_url( 'css/bootstrap-theme.min.css', __FILE__) );
Note: See TracChangeset for help on using the changeset viewer.