PluginProbe
Premmerce / 1.3.12
Premmerce v1.3.12
trunk 1.0 1.1 1.2 1.2.1 1.3 1.3.10 1.3.11 1.3.12 1.3.13 1.3.14 1.3.15 1.3.16 1.3.17 1.3.18 1.3.19 1.3.2 1.3.20 1.3.21 1.3.22 1.3.23 1.3.3 1.3.4 1.3.5 1.3.6 All 28 releases
premmerce / src / Data / Plugins.php

Plugins.php in Premmerce 1.3.12, at src/Data/Plugins.php

118 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Premmerce\Premmerce\Data;
4
5 class Plugins
6 {
7 /**
8 * @return array
9 */
10 public static function getAll()
11 {
12 $plugins = array();
13 $plugins['woocommerce'] = array(
14 'name' => 'WooCommerce',
15 'plugin' => 'woocommerce.php',
16 );
17 $plugins['wordpress-seo'] = array(
18 'name' => 'Yoast SEO',
19 'plugin' => 'wp-seo.php',
20 );
21 $plugins['contact-form-7'] = array(
22 'name' => 'Contact Form 7',
23 'plugin' => 'wp-contact-form-7.php',
24 );
25 $plugins['premmerce-search'] = array(
26 'name' => 'Premmerce Search',
27 'plugin' => 'premmerce-search.php',
28 );
29 $plugins['premmerce-user-roles'] = array(
30 'name' => 'Premmerce User Roles',
31 'plugin' => 'premmerce-users-roles.php',
32 );
33 $plugins['premmerce-woocommerce-brands'] = array(
34 'name' => 'Premmerce WooCommerce Brands',
35 'plugin' => 'premmerce-brands.php',
36 );
37 $plugins['premmerce-woocommerce-product-filter'] = array(
38 'name' => 'Premmerce WooCommerce Product Filter',
39 'plugin' => 'premmerce-filter.php',
40 );
41 $plugins['woo-customers-manager'] = array(
42 'name' => 'WooCommerce Customers Manager',
43 'plugin' => 'premmerce-extended-users.php',
44 );
45 $plugins['woo-permalink-manager'] = array(
46 'name' => 'WooCommerce Permalink Manager',
47 'plugin' => 'premmerce-url-manager.php',
48 );
49 $plugins['woo-seo-addon'] = array(
50 'name' => 'WooCommerce SEO Addon',
51 'plugin' => 'premmerce-seo-addon.php',
52 );
53 $plugins['premmerce-woocommerce-wishlist'] = array(
54 'name' => 'Premmerce WooCommerce Wishlist',
55 'plugin' => 'premmerce-wishlist.php',
56 );
57 $plugins['premmerce-redirect-manager'] = array(
58 'name' => 'Premmerce Redirect Manager',
59 'plugin' => 'premmerce-redirect.php',
60 );
61 $plugins['premmerce-woocommerce-wholesale-pricing'] = array(
62 'name' => 'Premmerce Woocommerce Wholesale Pricing',
63 'plugin' => 'premmerce-price-types.php',
64 );
65 $plugins['premmerce-woocommerce-product-bundles'] = array(
66 'name' => 'Woocommerce Frequently Bought Together',
67 'plugin' => 'premmerce-product-bundles.php',
68 );
69 $plugins['google-analytics-dashboard-for-wp'] = array(
70 'name' => 'Google Analytics Dashboard',
71 'plugin' => 'gadwp.php.php',
72 );
73 $plugins['woocommerce-google-analytics-integration'] = array(
74 'name' => 'WooCommerce Google Analytics Integration',
75 'plugin' => 'woocommerce-google-analytics-integration.php',
76 );
77 $plugins['ml-slider'] = array(
78 'name' => 'MetaSlider',
79 'plugin' => 'ml-slider.php',
80 );
81 return $plugins;
82 }
83
84 /**
85 * @param $slug
86 *
87 * @return bool
88 */
89 public static function exists( $slug )
90 {
91 return array_key_exists( $slug, self::getAll() );
92 }
93
94 /**
95 * @param $slug
96 *
97 * @return mixed
98 */
99 public static function get( $slug )
100 {
101 if ( self::exists( $slug ) ) {
102 return self::getAll()[$slug];
103 }
104 }
105
106 /**
107 * @param $slug
108 *
109 * @return null|string
110 */
111 public static function getPath( $slug )
112 {
113 if ( $plugin = self::get( $slug ) ) {
114 return ( isset( $plugin['link'] ) ? 'extra/' . $plugin['link'] : null );
115 }
116 }
117
118 }