Plugin Directory

Changeset 1252058


Ignore:
Timestamp:
09/23/2015 02:00:19 PM (11 years ago)
Author:
jacobwarduk
Message:

Fixing admin page loading resources

File:
1 edited

Legend:

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

    r1252047 r1252058  
    3333// Function to create menu links
    3434function bbp_tweet_menu_actions() {
    35     add_menu_page( 'bbp tweet', 'bbp tweet', 1, 'bbp_tweet_settings_page', 'bbp_tweet_settings' );
    36 
     35
     36    global $bbp_tweet_menu_page;
     37    $bbp_tweet_menu_page = add_menu_page( 'bbp tweet', 'bbp tweet', 1, 'bbp_tweet_settings_page', 'bbp_tweet_settings' );
     38
     39    global $bbp_tweet_oauth_instructions_page;
    3740    add_submenu_page( 'oauth-instructions.php', 'Twitter oAuth Instructions', 'Twitter oAuth Instructions', 'manage_options', 'oauth_instructions_page', 'oauth_instructions' );
     41
    3842}
    3943
     
    4549function bbp_tweet_admin_init( $hook ) {
    4650
    47     if ( 'bbp-tweet-admin.php' != $hook ) {
     51    global $bbp_tweet_menu_page;
     52
     53    if ( 'bbp-tweet-admin.php' != $bbp_tweet_menu_page ) {
    4854        return;
    4955    }
    50    
     56
    5157    wp_register_style( 'bbp_tweet_bootstrap_main_stylesheet', plugins_url( 'css/bootstrap.min.css', __FILE__) );
    5258    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.