Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/tutor-pro/addons/gradebook/gradebook.php

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 + /**
3 + * Gradebook Addon
4 + *
5 + * @package TutorPro\Addons
6 + * @subpackage Gradebook
7 + * @author Themeum <support@themeum.com>
8 + * @link https://themeum.com
9 + * @since 2.0.0
10 + */
11 +
12 + if ( ! defined( 'ABSPATH' ) ) {
13 + exit;
14 + }
15 +
16 + /**
17 + * Defined the tutor main file
18 + */
19 + define( 'TUTOR_GB_VERSION', '1.0.0' );
20 + define( 'TUTOR_GB_FILE', __FILE__ );
21 +
22 + add_filter( 'tutor_addons_lists_config', 'tutor_gradebook_config' );
23 +
24 + /**
25 + * Showing config for addons central lists
26 + *
27 + * @param array $config config.
28 + *
29 + * @return array
30 + */
31 + function tutor_gradebook_config( $config ) {
32 + $new_config = array(
33 + 'name' => __( 'Gradebook', 'tutor-pro' ),
34 + 'description' => __( 'Track student progress with a centralized gradebook.', 'tutor-pro' ),
35 + );
36 + $basic_config = (array) TUTOR_GB();
37 + $new_config = array_merge( $new_config, $basic_config );
38 +
39 + $config[ plugin_basename( TUTOR_GB_FILE ) ] = $new_config;
40 + return $config;
41 + }
42 +
43 + if ( ! function_exists( 'TUTOR_GB' ) ) {
44 + /**
45 + * Addon helper.
46 + *
47 + * @return object
48 + */
49 + //phpcs:ignore
50 + function TUTOR_GB() {
51 + $info = array(
52 + 'path' => plugin_dir_path( TUTOR_GB_FILE ),
53 + 'url' => plugin_dir_url( TUTOR_GB_FILE ),
54 + 'basename' => plugin_basename( TUTOR_GB_FILE ),
55 + 'version' => TUTOR_GB_VERSION,
56 + 'nonce_action' => 'tutor_nonce_action',
57 + 'nonce' => '_wpnonce',
58 + );
59 +
60 + return (object) $info;
61 + }
62 + }
63 +
64 + require 'classes/init.php';
65 + new TUTOR_GB\Init();
66 +