';
181 |
182 | }
183 | }
184 |
185 | }
186 |
187 | /**
188 | * Reset the recommended plugins reset on page load
189 | *
190 | * @return void
191 | * @access public
192 | */
193 | public function dictate_recommended_plugins() {
194 |
195 | $needs_update = ( isset( $_GET['reset_plugins'] ) ) ? true : false;
196 | $nonce = ( ! empty( $_GET['_wpnonce'] ) ) ? $_GET['_wpnonce'] : '';
197 |
198 | if ( ! wp_verify_nonce( $nonce, 'reset-plugins' ) ) {
199 | return;
200 | }
201 |
202 | if ( true === $needs_update && current_user_can( 'activate_plugins' ) ) {
203 |
204 | Dictate::reset_plugins();
205 |
206 | }
207 |
208 | header("Refresh:0; url=" . admin_url( 'plugins.php' ) );
209 |
210 | }
211 |
212 | /**
213 | * Add a new tab for custom path plugins
214 | *
215 | * @param array $tabs The tabs for the page
216 | *
217 | * @return mixed
218 | * @access public
219 | */
220 | public function add_custom_path_tab( $tabs ) {
221 |
222 | $custom_path_plugins = Dictate::get_custom_path_plugins( true );
223 |
224 | if ( empty( $custom_path_plugins ) ) {
225 | return $tabs;
226 | }
227 |
228 | $custom_path_tab = sprintf(
229 | '