PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
← All changes | tgm-pa/configuration.php +68 -44 1.2.7 → 1.5.9 View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +
2 3 /**
3 4 * This file represents an example of the code that themes would use to register
4 5 * the required plugins.
5 6 *
@@ -15,9 +16,9 @@
15 16 * @copyright Copyright (c) 2011, Thomas Griffin
16 17 * @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
17 18 * @link https://github.com/TGMPA/TGM-Plugin-Activation
18 19 */
19 -
20 +if ( ! defined( 'ABSPATH' ) ) exit;
20 21 /**
21 22 * Include the TGM_Plugin_Activation class.
22 23 *
23 24 * Depending on your implementation, you may want to change the include call:
@@ -30,11 +31,11 @@
30 31 *
31 32 * Plugin:
32 33 * require_once dirname( __FILE__ ) . '/path/to/class-tgm-plugin-activation.php';
33 34 */
34 -require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php';
35 +require_once dirname(__FILE__) . '/class-tgm-plugin-activation.php';
35 36
36 -add_action( 'tgmpa_register', 'wpdirectorykit_register_required_plugins' );
37 +add_action('tgmpa_register', 'wpdirectorykit_register_required_plugins');
37 38
38 39 /**
39 40 * Register the required plugins for this plugin.
40 41 *
@@ -51,44 +52,67 @@
51 52 * In that case, the TGMPA default settings will be used.
52 53 *
53 54 * This function is hooked into `tgmpa_register`, which is fired on the WP `init` action on priority 10.
54 55 */
55 -function wpdirectorykit_register_required_plugins() {
56 - /*
56 +function wpdirectorykit_register_required_plugins()
57 +{
58 + /*
57 59 * Array of plugin arrays. Required keys are name and slug.
58 60 * If the source is NOT from the .org repo, then source is also required.
59 61 */
60 - $plugins = array(
62 + $plugins = array(
61 63
62 64
63 65 array(
64 - 'name' => 'Element Invader',
65 - 'slug' => 'elementinvader',
66 - 'required' => false,
67 - ),
66 + 'name' => 'Element Invader',
67 + 'slug' => 'elementinvader',
68 + 'required' => false,
69 + ),
68 70 array(
69 - 'name' => 'ElementInvader Addons for Elementor',
70 - 'slug' => 'elementinvader-addons-for-elementor',
71 - 'required' => false,
72 - ),
73 - array(
74 - 'name' => 'Elementor',
75 - 'slug' => 'elementor',
76 - 'required' => false,
71 + 'name' => 'ElementInvader Addons for Elementor',
72 + 'slug' => 'elementinvader-addons-for-elementor',
73 + 'required' => false,
77 74 ),
78 - array(
79 - 'name' => 'Classified Ads',
80 - 'slug' => 'classified-ads',
81 - 'required' => false,
75 + array(
76 + 'name' => 'Elementor',
77 + 'slug' => 'elementor',
78 + 'required' => false,
82 79 ),
80 + array(
81 + 'name' => 'Classified Ads',
82 + 'slug' => 'classified-ads',
83 + 'required' => false,
84 + ),
85 + array(
86 + 'name' => 'Add To Home Screen on iOS and PWA',
87 + 'slug' => 'add-to-home-screen-on-ios-pwa',
88 + 'required' => false,
89 + ),
90 + array(
91 + 'name' => 'Bikit Business Directory',
92 + 'slug' => 'bikit-business-directory',
93 + 'required' => false,
94 + ),
95 + array(
96 + 'name' => 'Directorykit Car Dealer Addon',
97 + 'slug' => 'directorykit-car-dealer-addon',
98 + 'required' => false,
99 + ),
83 100
84 - // This is an example of the use of 'is_callable' functionality. A user could - for instance -
85 - // have WPSEO installed *or* WPSEO Premium. The slug would in that last case be different, i.e.
86 - // 'wordpress-seo-premium'.
87 - // By setting 'is_callable' to either a function from that plugin or a class method
88 - // `array( 'class', 'method' )` similar to how you hook in to actions and filters, TGMPA can still
89 - // recognize the plugin as being installed.
101 + /*
102 + array(
103 + 'name' => 'Bikit Business Directory',
104 + 'slug' => 'bikit-business-directory',
105 + 'required' => false,
106 + ),*/
90 107
108 + // This is an example of the use of 'is_callable' functionality. A user could - for instance -
109 + // have WPSEO installed *or* WPSEO Premium. The slug would in that last case be different, i.e.
110 + // 'wordpress-seo-premium'.
111 + // By setting 'is_callable' to either a function from that plugin or a class method
112 + // `array( 'class', 'method' )` similar to how you hook in to actions and filters, TGMPA can still
113 + // recognize the plugin as being installed.
114 +
91 115 /*
92 116 array(
93 117 'name' => 'Meta Box',
94 118 'slug' => 'meta-box',
@@ -95,11 +119,11 @@
95 119 'required' => false,
96 120 'is_callable' => 'rwmb_meta',
97 121 ),*/
98 122
99 - );
123 + );
100 124
101 - /*
125 + /*
102 126 * Array of configuration settings. Amend each line as needed.
103 127 *
104 128 * TGMPA will start providing localized text strings soon. If you already have translations of our standard
105 129 * strings available, please help us make TGMPA even better by giving us access to these translations or by
@@ -106,21 +130,21 @@
106 130 * sending in a pull-request with .po file(s) with the translations.
107 131 *
108 132 * Only uncomment the strings in the config array if you want to customize the strings.
109 133 */
110 - $config = array(
111 - 'id' => 'wpdirectorykit', // Unique ID for hashing notices for multiple instances of TGMPA.
112 - 'default_path' => '', // Default absolute path to bundled plugins.
113 - 'menu' => 'tgmpa-install-plugins', // Menu slug.
114 - 'parent_slug' => 'plugins.php', // Parent menu slug.
115 - 'capability' => 'manage_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
116 - 'has_notices' => true, // Show admin notices or not.
117 - 'dismissable' => true, // If false, a user cannot dismiss the nag message.
118 - 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.
119 - 'is_automatic' => false, // Automatically activate plugins after installation or not.
120 - 'message' => '', // Message to output right before the plugins table.
134 + $config = array(
135 + 'id' => 'wpdirectorykit', // Unique ID for hashing notices for multiple instances of TGMPA.
136 + 'default_path' => '', // Default absolute path to bundled plugins.
137 + 'menu' => 'tgmpa-install-plugins', // Menu slug.
138 + 'parent_slug' => 'plugins.php', // Parent menu slug.
139 + 'capability' => 'manage_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
140 + 'has_notices' => true, // Show admin notices or not.
141 + 'dismissable' => true, // If false, a user cannot dismiss the nag message.
142 + 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.
143 + 'is_automatic' => false, // Automatically activate plugins after installation or not.
144 + 'message' => '', // Message to output right before the plugins table.
121 145
122 - /*
146 + /*
123 147 'strings' => array(
124 148 'page_title' => __( 'Install Required Plugins', 'wpdirectorykit' ),
125 149 'menu_title' => __( 'Install Plugins', 'wpdirectorykit' ),
126 150 /* translators: %s: plugin name. * /
@@ -194,8 +218,8 @@
194 218
195 219 'nag_type' => '', // Determines admin notice type - can only be one of the typical WP notice classes, such as 'updated', 'update-nag', 'notice-warning', 'notice-info' or 'error'. Some of which may not work as expected in older WP versions.
196 220 ),
197 221 */
198 - );
222 + );
199 223
200 - tgmpa( $plugins, $config );
224 + tgmpa($plugins, $config);
201 225 }