PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / 8.0.5
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI v8.0.5
8.0.5 8.0.4 8.0.3 8.0.1 8.0.2 8.0.0 7.9.9.7 7.9.9.6 7.9.9.5 7.9.9.4 7.9.9.3 7.9.9.2 7.9.9.1 7.9.9 7.9.8 7.9.7 7.9.6 7.9.5 7.9.4 7.9.3 7.9.2 7.9.1 7.9.0 7.8.9 7.8.8 All 47 releases
← All changes | integrations/peepso/includes/scripts.php +51 -0 7.9.3 → 8.0.5 View file →
@@ -1,0 +1,51 @@
1 +<?php
2 +/**
3 + * Scripts
4 + *
5 + * @package GamiPress\PeepSo\Scripts
6 + * @since 1.0.0
7 + */
8 +// Exit if accessed directly
9 +if( !defined( 'ABSPATH' ) ) exit;
10 +
11 +/**
12 + * Register admin scripts
13 + *
14 + * @since 1.0.0
15 + * @return void
16 + */
17 +function gamipress_peepso_admin_register_scripts() {
18 +
19 + // Use minified libraries if SCRIPT_DEBUG is turned off
20 + $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
21 +
22 + // Stylesheets
23 + wp_register_style( 'gamipress-peepso-admin-css', GAMIPRESS_PEEPSO_URL . 'assets/css/gamipress-peepso-admin' . $suffix . '.css', array( ), GAMIPRESS_PEEPSO_VER, 'all' );
24 +
25 + // Scripts
26 + wp_register_script( 'gamipress-peepso-admin-js', GAMIPRESS_PEEPSO_URL . 'assets/js/gamipress-peepso-admin' . $suffix . '.js', array( 'jquery', 'jquery-ui-sortable' ), GAMIPRESS_PEEPSO_VER, true );
27 +
28 +}
29 +add_action( 'admin_init', 'gamipress_peepso_admin_register_scripts' );
30 +
31 +/**
32 + * Enqueue admin scripts
33 + *
34 + * @since 1.0.0
35 + * @return void
36 + */
37 +function gamipress_peepso_admin_enqueue_scripts( $hook ) {
38 +
39 + // Settings page
40 + if( $hook === 'gamipress_page_gamipress_settings' ) {
41 +
42 + //Stylesheets
43 + wp_enqueue_style( 'gamipress-peepso-admin-css' );
44 +
45 + //Scripts
46 + wp_enqueue_script( 'gamipress-peepso-admin-js' );
47 +
48 + }
49 +
50 +}
51 +add_action( 'admin_enqueue_scripts', 'gamipress_peepso_admin_enqueue_scripts', 100 );