WordPress.org

Plugin Directory

Changeset 617005


Ignore:
Timestamp:
10/24/12 20:39:16 (21 months ago)
Author:
jblz
Message:

Jetpack: move the logged-in check before the hook-ins so we don't load a bunch of resources needlessly for logged-out users.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/notes.php

    r616989 r617005  
    6969 
    7070    function action_init() { 
     71        if ( !is_user_logged_in() ) 
     72            return; 
    7173        wp_enqueue_style( 'notes-admin-bar-rest', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/admin-bar-rest.css' ), array(), '2012-05-18a' ); 
    7274        wp_enqueue_style( 'noticons', $this->wpcom_static_url( '/i/noticons/noticons.css' ), array(), '2012-10-02' ); 
     
    8789 
    8890        if ( !is_object( $wp_admin_bar ) ) 
    89             return; 
    90  
    91         if ( !is_user_logged_in() ) 
    9291            return; 
    9392 
Note: See TracChangeset for help on using the changeset viewer.