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 | libraries/ct-ajax-list-table/includes/scripts.php +49 -0 7.9.3 → 8.0.5 View file →
@@ -1,0 +1,49 @@
1 +<?php
2 +/**
3 + * Scripts
4 + *
5 + * @author GamiPress <[email protected]>, Ruben Garcia <[email protected]>
6 + *
7 + * @since 1.0.0
8 + */
9 +// Exit if accessed directly
10 +defined( 'ABSPATH' ) || exit;
11 +
12 +/**
13 + * Register admin scripts
14 + *
15 + * @since 1.0.0
16 + * @return void
17 + */
18 +function ct_ajax_list_table_register_scripts() {
19 +
20 + // Stylesheets
21 + wp_register_style( 'ct-ajax-list-table-css', CT_AJAX_LIST_TABLE_URL . 'assets/css/ct-ajax-list-table.css', array( ), CT_AJAX_LIST_TABLE_VER, 'all' );
22 +
23 + // Scripts
24 + wp_register_script( 'ct-ajax-list-table-js', CT_AJAX_LIST_TABLE_URL . 'assets/js/ct-ajax-list-table.js', array( 'jquery' ), CT_AJAX_LIST_TABLE_VER, true );
25 +
26 +
27 +}
28 +add_action( 'admin_init', 'ct_ajax_list_table_register_scripts' );
29 +
30 +/**
31 + * Enqueue admin scripts
32 + *
33 + * @since 1.0.0
34 + * @return void
35 + */
36 +function ct_ajax_list_table_enqueue_scripts() {
37 +
38 + // Stylesheets
39 + wp_enqueue_style( 'ct-ajax-list-table-css' );
40 +
41 + // Localize script
42 + wp_localize_script( 'ct-ajax-list-table-js', 'ct_ajax_list_table', array(
43 + 'nonce' => wp_create_nonce( 'ct_ajax_list_table' ),
44 + ) );
45 +
46 + wp_enqueue_script( 'ct-ajax-list-table-js' );
47 +
48 +
49 +}