Moved JS from inline PHP to own source file.

This commit is contained in:
Andrey Savchenko committed 2014-10-23 22:09:48 +03:00
1 parent 1d87865377
commit 4cdf206de9
2 files changed
+11 -17

No files matched your search

-17
View File
@@ -180,8 +180,6 @@ class Laps {
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
add_action( 'admin_bar_menu', array( __CLASS__, 'admin_bar_menu' ), 100 );
add_action( 'wp_print_footer_scripts', array( __CLASS__, 'print_footer_scripts' ), 11 );
add_action( 'admin_print_footer_scripts', array( __CLASS__, 'print_footer_scripts' ), 11 );
}
static function enqueue_scripts() {
@@ -195,21 +193,6 @@ class Laps {
}
}
static function print_footer_scripts() {
if ( wp_script_is( 'laps-tooltip', 'done' ) ) {
?>
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery(".laps-timeline .event").lapstooltip({
container: '#wpadminbar', placement: 'bottom', html: true, animation: false
// , trigger: 'click'
});
});
</script><?php
}
}
/**
* Render interface and add to the toolbar.
*