More coding style stuff
This commit is contained in:
1 parent
4cc18430da
commit
247f6f53aa
1 file changed
+7
-4
+7
-4
@@ -19,8 +19,9 @@ class Laps {
|
|||||||
*/
|
*/
|
||||||
static function on_load() {
|
static function on_load() {
|
||||||
|
|
||||||
if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
|
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self::$stopwatch = new Stopwatch();
|
self::$stopwatch = new Stopwatch();
|
||||||
self::$stopwatch->start( 'Plugins Load', 'plugin' );
|
self::$stopwatch->start( 'Plugins Load', 'plugin' );
|
||||||
@@ -32,9 +33,10 @@ class Laps {
|
|||||||
add_action( 'after_setup_theme', array( __CLASS__, 'after_setup_theme' ), 15 );
|
add_action( 'after_setup_theme', array( __CLASS__, 'after_setup_theme' ), 15 );
|
||||||
add_action( 'init', array( __CLASS__, 'init' ) );
|
add_action( 'init', array( __CLASS__, 'init' ) );
|
||||||
|
|
||||||
if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES )
|
if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
|
||||||
add_filter( 'query', array( __CLASS__, 'query' ), 20 );
|
add_filter( 'query', array( __CLASS__, 'query' ), 20 );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hook events by name and priority from array.
|
* Hook events by name and priority from array.
|
||||||
@@ -157,7 +159,7 @@ class Laps {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static function print_footer_scripts( ) {
|
static function print_footer_scripts() {
|
||||||
|
|
||||||
if ( wp_script_is( 'laps-tooltip', 'done' ) ) {
|
if ( wp_script_is( 'laps-tooltip', 'done' ) ) {
|
||||||
?>
|
?>
|
||||||
@@ -179,8 +181,9 @@ class Laps {
|
|||||||
*/
|
*/
|
||||||
static function admin_bar_menu( $wp_admin_bar ) {
|
static function admin_bar_menu( $wp_admin_bar ) {
|
||||||
|
|
||||||
if ( ! apply_filters( 'laps_can_see', current_user_can( 'manage_options' ) ) )
|
if ( ! apply_filters( 'laps_can_see', current_user_can( 'manage_options' ) ) ) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
global $timestart, $wpdb;
|
global $timestart, $wpdb;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user