Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/login-customizer/src/Essentials.php

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 + /**
3 + * Essential tools for Plugin
4 + *
5 + * @package LoginCustomizer
6 + * @author WPBrigade
7 + * @copyright Copyright (c) 2021, WPBrigade
8 + * @link https://loginpress.pro/
9 + * @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10 + */
11 +
12 + namespace LoginCustomizer;
13 +
14 + /**
15 + * Constant class.
16 + *
17 + * @since 2.2.0
18 + * @version 2.5.4
19 + * @access public
20 + */
21 +
22 + class Essentials {
23 +
24 + /**
25 + * Plugin Version
26 + *
27 + * @var string
28 + */
29 + public $version = '2.5.4';
30 +
31 + /**
32 + * Class Essentials construct
33 + * @version 2.2.0
34 + */
35 + public function __construct() {
36 +
37 + $this->define_constants();
38 + add_action( 'init', array($this, 'load_text_domain' ) );
39 + }
40 +
41 + /**
42 + * Defining Constants
43 + *
44 + * @since 1.0.0
45 + * @version 2.2.0
46 + * @access public
47 + * @return void
48 + */
49 + public function define_constants() {
50 +
51 + $this->define( 'LOGINCUST_FREE_URL', plugin_dir_url( __FILE__ ) );
52 + $this->define( 'LOGINCUST_DIR_PATH', plugin_dir_path( __FILE__ ) );
53 + $this->define( 'LOGINCUST_FREE_VERSION', $this->version );
54 + $this->define( 'LOGINCUST_FEEDBACK_SERVER', 'https://wpbrigade.com/' );
55 + $this->define( 'LOGINCUST_FREE_RESOURCES', plugins_url( 'resources', dirname( __FILE__ ) ) );
56 + }
57 +
58 + /**
59 + * Plugin Translation languages
60 + * @version 2.2.0
61 + *
62 + * @return void
63 + */
64 + public function load_text_domain() {
65 +
66 + load_plugin_textdomain( 'login-customizer', false, LOGINCUST_FREE_RESOURCES . '/languages/' );
67 + }
68 +
69 + /**
70 + * Callback to Define constant if not already set
71 + * @param string $name
72 + * @param string|bool $value
73 + */
74 + private function define( $name, $value ) {
75 + if ( ! defined( $name ) ) {
76 + define( $name, $value );
77 + }
78 + }
79 + }
80 +
81 +