Moved JS from inline PHP to own source file.
This commit is contained in:
1 parent
1d87865377
commit
4cdf206de9
2 files changed
+11
-17
No files matched your search
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
jQuery.fn.lapstooltip = jQuery.fn.tooltip.noConflict();
|
||||||
|
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
jQuery(".laps-timeline .event").lapstooltip({
|
||||||
|
container: '#wpadminbar',
|
||||||
|
placement: 'bottom',
|
||||||
|
html : true,
|
||||||
|
animation: false
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -180,8 +180,6 @@ class Laps {
|
|||||||
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
|
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
|
||||||
add_action( 'admin_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( '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() {
|
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.
|
* Render interface and add to the toolbar.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in new issue
Block a user