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/wpdiscuz/includes/scripts.php +50 -0 7.9.3 → 8.0.5 View file →
@@ -1,0 +1,50 @@
1 +<?php
2 +/**
3 + * Scripts
4 + *
5 + * @package GamiPress\bbPress\Scripts
6 + * @since 1.0.4
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_wpdiscuz_admin_register_scripts() {
18 + // Use minified libraries if SCRIPT_DEBUG is turned off
19 + $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
20 +
21 + // Stylesheets
22 + wp_register_style( 'gamipress-wpdiscuz-admin-css', GAMIPRESS_WPDISCUZ_URL . 'assets/css/gamipress-wpdiscuz-admin' . $suffix . '.css', array( ), GAMIPRESS_WPDISCUZ_VER, 'all' );
23 +
24 + // Scripts
25 + wp_register_script( 'gamipress-wpdiscuz-admin-js', GAMIPRESS_WPDISCUZ_URL . 'assets/js/gamipress-wpdiscuz-admin' . $suffix . '.js', array( 'jquery', 'jquery-ui-sortable' ), GAMIPRESS_WPDISCUZ_VER, true );
26 +
27 +}
28 +add_action( 'admin_init', 'gamipress_wpdiscuz_admin_register_scripts' );
29 +
30 +/**
31 + * Enqueue admin scripts
32 + *
33 + * @since 1.0.0
34 + * @return void
35 + */
36 +function gamipress_wpdiscuz_admin_enqueue_scripts( $hook ) {
37 +
38 + // Settings page
39 + if( $hook === 'gamipress_page_gamipress_settings' ) {
40 +
41 + //Stylesheets
42 + wp_enqueue_style( 'gamipress-wpdiscuz-admin-css' );
43 +
44 + //Scripts
45 + wp_enqueue_script( 'gamipress-wpdiscuz-admin-js' );
46 +
47 + }
48 +
49 +}
50 +add_action( 'admin_enqueue_scripts', 'gamipress_wpdiscuz_admin_enqueue_scripts', 100 );