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

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 + /**
3 + * Tutor Email Notification Addon
4 + *
5 + * @package TutorPro\Addons
6 + * @subpackage Email
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 + // Constants.
17 + define( 'TUTOR_EMAIL_VERSION', '1.0.0' );
18 + define( 'TUTOR_EMAIL_FILE', __FILE__ );
19 +
20 + /**
21 + * Showing config for addons central lists
22 + */
23 + add_filter( 'tutor_addons_lists_config', 'tutor_email_config' );
24 + /**
25 + * Tutor email config.
26 + *
27 + * @param array $config config.
28 + *
29 + * @return array
30 + */
31 + function tutor_email_config( $config ) {
32 + $new_config = array(
33 + 'name' => __( 'Email', 'tutor-pro' ),
34 + 'description' => __( 'Send automated and customized emails for various Tutor events.', 'tutor-pro' ),
35 + );
36 + $basic_config = (array) TUTOR_EMAIL();
37 + $new_config = array_merge( $new_config, $basic_config );
38 +
39 + $config[ plugin_basename( TUTOR_EMAIL_FILE ) ] = $new_config;
40 + return $config;
41 + }
42 +
43 + if ( ! function_exists( 'TUTOR_EMAIL' ) ) {
44 + //phpcs:ignore
45 + function TUTOR_EMAIL() {
46 + $info = array(
47 + 'path' => plugin_dir_path( TUTOR_EMAIL_FILE ),
48 + 'url' => plugin_dir_url( TUTOR_EMAIL_FILE ),
49 + 'basename' => plugin_basename( TUTOR_EMAIL_FILE ),
50 + 'version' => TUTOR_EMAIL_VERSION,
51 + 'nonce_action' => 'tutor_nonce_action',
52 + 'nonce' => '_wpnonce',
53 + );
54 +
55 + $info['default_bg'] = $info['url'] . 'assets/images/heading.png';
56 +
57 + return (object) $info;
58 + }
59 + }
60 +
61 + require 'classes/Init.php';
62 + new TUTOR_EMAIL\Init();
63 +