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.6 4.8.7 4.8.8 4.8.9 4.9.0 4.9.1 4.9.10 4.9.11 4.9.12 4.9.13 4.9.14 4.9.15 4.9.16 4.9.17 4.9.18 4.9.19 4.9.2 4.9.20 4.9.21 4.9.3 4.9.4 4.9.5 4.9.6 4.9.7 4.9.8 4.9.9 trunk 1.1.5 1.2.1 1.2.3 1.2.4 1.2.5 1.3 1.3.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8
mailchimp-for-wp / includes / class-plugin.php
mailchimp-for-wp / includes Last commit date
admin 10 years ago forms 10 years ago integrations 10 years ago mailchimp 10 years ago views 10 years ago class-api.php 10 years ago class-array-bag.php 10 years ago class-container.php 10 years ago class-debug-log-reader.php 10 years ago class-debug-log.php 10 years ago class-dynamic-content-tags.php 10 years ago class-field-formatter.php 10 years ago class-field-guesser.php 10 years ago class-field-map.php 10 years ago class-mailchimp.php 10 years ago class-plugin.php 10 years ago class-queue-job.php 10 years ago class-queue.php 10 years ago class-request.php 10 years ago class-tools.php 10 years ago class-validator.php 10 years ago class-visitor-tracking.php 10 years ago default-actions.php 10 years ago default-filters.php 10 years ago deprecated-functions.php 10 years ago functions.php 10 years ago
class-plugin.php
77 lines
1 <?php
2
3 /**
4 * Class MC4WP_Plugin
5 *
6 * Helper class for easy access to information like the plugin file or plugin directory.
7 *
8 * @access public
9 * @ignore
10 */
11 class MC4WP_Plugin {
12
13 /**
14 * @var string The plugin version.
15 */
16 protected $version;
17
18 /**
19 * @var string The main plugin file.
20 */
21 protected $file;
22
23 /**
24 * @param string $file The plugin version.
25 * @param string $version The main plugin file.
26 */
27 public function __construct( $file, $version ) {
28 $this->file = $file;
29 $this->version = $version;
30 }
31
32 /**
33 * Get the main plugin file.
34 *
35 * @return string
36 */
37 public function file() {
38 return $this->file;
39 }
40
41 /**
42 * Get the plugin version.
43 *
44 * @return string
45 */
46 public function version() {
47 return $this->version;
48 }
49
50 /**
51 * Gets the directory the plugin lives in.
52 *
53 * @param string $path
54 *
55 * @return string
56 */
57 public function dir( $path = '' ) {
58
59 // ensure path has leading slash
60 if( '' !== $path ) {
61 $path = '/' . ltrim( $path, '/' );
62 }
63
64 return dirname( $this->file ) . $path;
65 }
66
67 /**
68 * Gets the URL to the plugin files.
69 *
70 * @param string $path
71 *
72 * @return string
73 */
74 public function url( $path = '' ) {
75 return plugins_url( $path, $this->file );
76 }
77 }