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 -40 1.2.4 → 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,39 +52,66 @@
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 ),
75 + array(
76 + 'name' => 'Elementor',
77 + 'slug' => 'elementor',
78 + 'required' => false,
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 + ),
78 100
101 + /*
102 + array(
103 + 'name' => 'Bikit Business Directory',
104 + 'slug' => 'bikit-business-directory',
105 + 'required' => false,
106 + ),*/
79 107
80 - // This is an example of the use of 'is_callable' functionality. A user could - for instance -
81 - // have WPSEO installed *or* WPSEO Premium. The slug would in that last case be different, i.e.
82 - // 'wordpress-seo-premium'.
83 - // By setting 'is_callable' to either a function from that plugin or a class method
84 - // `array( 'class', 'method' )` similar to how you hook in to actions and filters, TGMPA can still
85 - // recognize the plugin as being installed.
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.
86 114
87 115 /*
88 116 array(
89 117 'name' => 'Meta Box',
@@ -91,11 +119,11 @@
91 119 'required' => false,
92 120 'is_callable' => 'rwmb_meta',
93 121 ),*/
94 122
95 - );
123 + );
96 124
97 - /*
125 + /*
98 126 * Array of configuration settings. Amend each line as needed.
99 127 *
100 128 * TGMPA will start providing localized text strings soon. If you already have translations of our standard
101 129 * strings available, please help us make TGMPA even better by giving us access to these translations or by
@@ -102,21 +130,21 @@
102 130 * sending in a pull-request with .po file(s) with the translations.
103 131 *
104 132 * Only uncomment the strings in the config array if you want to customize the strings.
105 133 */
106 - $config = array(
107 - 'id' => 'wpdirectorykit', // Unique ID for hashing notices for multiple instances of TGMPA.
108 - 'default_path' => '', // Default absolute path to bundled plugins.
109 - 'menu' => 'tgmpa-install-plugins', // Menu slug.
110 - 'parent_slug' => 'plugins.php', // Parent menu slug.
111 - 'capability' => 'manage_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
112 - 'has_notices' => true, // Show admin notices or not.
113 - 'dismissable' => true, // If false, a user cannot dismiss the nag message.
114 - 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.
115 - 'is_automatic' => false, // Automatically activate plugins after installation or not.
116 - '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.
117 145
118 - /*
146 + /*
119 147 'strings' => array(
120 148 'page_title' => __( 'Install Required Plugins', 'wpdirectorykit' ),
121 149 'menu_title' => __( 'Install Plugins', 'wpdirectorykit' ),
122 150 /* translators: %s: plugin name. * /
@@ -190,8 +218,8 @@
190 218
191 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.
192 220 ),
193 221 */
194 - );
222 + );
195 223
196 - tgmpa( $plugins, $config );
224 + tgmpa($plugins, $config);
197 225 }