mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-14 04:06:48 +09:00
Added mapbox / gmaps setting switcher
This commit is contained in:
@@ -95,6 +95,7 @@ class WPStrava {
|
||||
|
||||
if ( is_admin() ) {
|
||||
$this->settings->hook();
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );
|
||||
} else { // Front-end.
|
||||
add_action( 'init', array( $this, 'register_shortcodes' ) );
|
||||
add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ) );
|
||||
@@ -188,6 +189,18 @@ class WPStrava {
|
||||
return $this->segments;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register/enqueue admin javascript.
|
||||
*
|
||||
* @author Justin Foell <justin@foell.org>
|
||||
* @since next
|
||||
*/
|
||||
public function register_admin_scripts() {
|
||||
if ( $this->settings->is_settings_page() ) {
|
||||
wp_enqueue_script( 'strava-admin-settings', WPSTRAVA_PLUGIN_URL . 'src/admin-settings.js', array(), WPSTRAVA_PLUGIN_VERSION, true );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the wp-strava stylesheet.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user