PluginProbe
WP Directory Kit / 1.2.7
WP Directory Kit v1.2.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 1.4.0 1.4.1 All 35 releases
wpdirectorykit / tgm-pa / configuration.php

configuration.php in WP Directory Kit 1.2.7, at tgm-pa/configuration.php

202 lines 9.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This file represents an example of the code that themes would use to register
4 * the required plugins.
5 *
6 * It is expected that theme authors would copy and paste this code into their
7 * functions.php file, and amend to suit.
8 *
9 * @see http://tgmpluginactivation.com/configuration/ for detailed documentation.
10 *
11 * @package TGM-Plugin-Activation
12 * @subpackage Example
13 * @version 2.6.1 for plugin Wpdirectorykit
14 * @author Thomas Griffin, Gary Jones, Juliette Reinders Folmer
15 * @copyright Copyright (c) 2011, Thomas Griffin
16 * @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
17 * @link https://github.com/TGMPA/TGM-Plugin-Activation
18 */
19
20 /**
21 * Include the TGM_Plugin_Activation class.
22 *
23 * Depending on your implementation, you may want to change the include call:
24 *
25 * Parent Theme:
26 * require_once get_template_directory() . '/path/to/class-tgm-plugin-activation.php';
27 *
28 * Child Theme:
29 * require_once get_stylesheet_directory() . '/path/to/class-tgm-plugin-activation.php';
30 *
31 * Plugin:
32 * require_once dirname( __FILE__ ) . '/path/to/class-tgm-plugin-activation.php';
33 */
34 require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php';
35
36 add_action( 'tgmpa_register', 'wpdirectorykit_register_required_plugins' );
37
38 /**
39 * Register the required plugins for this plugin.
40 *
41 * In this example, we register five plugins:
42 * - one included with the TGMPA library
43 * - two from an external source, one from an arbitrary source, one from a GitHub repository
44 * - two from the .org repo, where one demonstrates the use of the `is_callable` argument
45 *
46 * The variables passed to the `tgmpa()` function should be:
47 * - an array of plugin arrays;
48 * - optionally a configuration array.
49 * If you are not changing anything in the configuration array, you can remove the array and remove the
50 * variable from the function call: `tgmpa( $plugins );`.
51 * In that case, the TGMPA default settings will be used.
52 *
53 * This function is hooked into `tgmpa_register`, which is fired on the WP `init` action on priority 10.
54 */
55 function wpdirectorykit_register_required_plugins() {
56 /*
57 * Array of plugin arrays. Required keys are name and slug.
58 * If the source is NOT from the .org repo, then source is also required.
59 */
60 $plugins = array(
61
62
63 array(
64 'name' => 'Element Invader',
65 'slug' => 'elementinvader',
66 'required' => false,
67 ),
68 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,
77 ),
78 array(
79 'name' => 'Classified Ads',
80 'slug' => 'classified-ads',
81 'required' => false,
82 ),
83
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.
90
91 /*
92 array(
93 'name' => 'Meta Box',
94 'slug' => 'meta-box',
95 'required' => false,
96 'is_callable' => 'rwmb_meta',
97 ),*/
98
99 );
100
101 /*
102 * Array of configuration settings. Amend each line as needed.
103 *
104 * TGMPA will start providing localized text strings soon. If you already have translations of our standard
105 * strings available, please help us make TGMPA even better by giving us access to these translations or by
106 * sending in a pull-request with .po file(s) with the translations.
107 *
108 * Only uncomment the strings in the config array if you want to customize the strings.
109 */
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.
121
122 /*
123 'strings' => array(
124 'page_title' => __( 'Install Required Plugins', 'wpdirectorykit' ),
125 'menu_title' => __( 'Install Plugins', 'wpdirectorykit' ),
126 /* translators: %s: plugin name. * /
127 'installing' => __( 'Installing Plugin: %s', 'wpdirectorykit' ),
128 /* translators: %s: plugin name. * /
129 'updating' => __( 'Updating Plugin: %s', 'wpdirectorykit' ),
130 'oops' => __( 'Something went wrong with the plugin API.', 'wpdirectorykit' ),
131 'notice_can_install_required' => _n_noop(
132 /* translators: 1: plugin name(s). * /
133 'Plugin WP Directory Kit requires the following plugin: %1$s.',
134 'Plugin WP Directory Kit requires the following plugins: %1$s.',
135 'wpdirectorykit'
136 ),
137 'notice_can_install_recommended' => _n_noop(
138 /* translators: 1: plugin name(s). * /
139 'Plugin WP Directory Kit recommends the following plugin: %1$s.',
140 'Plugin WP Directory Kit recommends the following plugins: %1$s.',
141 'wpdirectorykit'
142 ),
143 'notice_ask_to_update' => _n_noop(
144 /* translators: 1: plugin name(s). * /
145 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.',
146 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.',
147 'wpdirectorykit'
148 ),
149 'notice_ask_to_update_maybe' => _n_noop(
150 /* translators: 1: plugin name(s). * /
151 'There is an update available for: %1$s.',
152 'There are updates available for the following plugins: %1$s.',
153 'wpdirectorykit'
154 ),
155 'notice_can_activate_required' => _n_noop(
156 /* translators: 1: plugin name(s). * /
157 'The following required plugin is currently inactive: %1$s.',
158 'The following required plugins are currently inactive: %1$s.',
159 'wpdirectorykit'
160 ),
161 'notice_can_activate_recommended' => _n_noop(
162 /* translators: 1: plugin name(s). * /
163 'The following recommended plugin is currently inactive: %1$s.',
164 'The following recommended plugins are currently inactive: %1$s.',
165 'wpdirectorykit'
166 ),
167 'install_link' => _n_noop(
168 'Begin installing plugin',
169 'Begin installing plugins',
170 'wpdirectorykit'
171 ),
172 'update_link' => _n_noop(
173 'Begin updating plugin',
174 'Begin updating plugins',
175 'wpdirectorykit'
176 ),
177 'activate_link' => _n_noop(
178 'Begin activating plugin',
179 'Begin activating plugins',
180 'wpdirectorykit'
181 ),
182 'return' => __( 'Return to Required Plugins Installer', 'wpdirectorykit' ),
183 'plugin_activated' => __( 'Plugin activated successfully.', 'wpdirectorykit' ),
184 'activated_successfully' => __( 'The following plugin was activated successfully:', 'wpdirectorykit' ),
185 /* translators: 1: plugin name. * /
186 'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'wpdirectorykit' ),
187 /* translators: 1: plugin name. * /
188 'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this plugin. Please update the plugin.', 'wpdirectorykit' ),
189 /* translators: 1: dashboard link. * /
190 'complete' => __( 'All plugins installed and activated successfully. %1$s', 'wpdirectorykit' ),
191 'dismiss' => __( 'Dismiss this notice', 'wpdirectorykit' ),
192 'notice_cannot_install_activate' => __( 'There are one or more required or recommended plugins to install, update or activate.', 'wpdirectorykit' ),
193 'contact_admin' => __( 'Please contact the administrator of this site for help.', 'wpdirectorykit' ),
194
195 '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 ),
197 */
198 );
199
200 tgmpa( $plugins, $config );
201 }
202