Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/tutor-pro/addons/content-bank/src/AddonRegister.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
/**
3
+
* Addon Register Handler
4
+
*
5
+
* @package TutorPro\ContentBank
6
+
* @author Themeum <support@themeum.com>
7
+
* @link https://themeum.com
8
+
* @since 3.0.0
9
+
*/
10
+
11
+
namespace TutorPro\ContentBank;
12
+
13
+
/**
14
+
* AddonRegister Class.
15
+
*
16
+
* @since 3.0.0
17
+
*/
18
+
class AddonRegister {
19
+
/**
20
+
* Register hooks and dependencies
21
+
*/
22
+
public function __construct() {
23
+
add_filter( 'tutor_addons_lists_config', array( $this, 'register_addon' ) );
24
+
}
25
+
26
+
/**
27
+
* Register course bundle addon
28
+
*
29
+
* @since 2.2.0
30
+
*
31
+
* @param array $addons array of addons.
32
+
*
33
+
* @return array
34
+
*/
35
+
public static function register_addon( $addons ) {
36
+
37
+
$new_addon = array(
38
+
'name' => __( 'Content Bank', 'tutor-pro' ),
39
+
'description' => __( 'Create content once and use it across multiple courses.', 'tutor-pro' ),
40
+
'path' => TUTOR_CONTENT_BANK_DIR,
41
+
'basename' => plugin_basename( TUTOR_CONTENT_BANK_FILE ),
42
+
'url' => plugin_dir_url( TUTOR_CONTENT_BANK_FILE ),
43
+
'is_new' => true,
44
+
);
45
+
46
+
$addons[ plugin_basename( $new_addon['basename'] ) ] = $new_addon;
47
+
48
+
return $addons;
49
+
}
50
+
}
51
+