PluginProbe
Widget Disable / 3.0.0
Widget Disable v3.0.0
trunk 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 2.0.0 2.1.0 3.0.0 3.0.1
wp-widget-disable / wp-widget-disable.php

wp-widget-disable.php in Widget Disable 3.0.0, at wp-widget-disable.php

56 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Widget Disable
4 * Plugin URI: https://required.com/services/wordpress-plugins/wp-widget-disable/
5 * Description: Disable sidebar and dashboard widgets with an easy to use interface. Simply use the checkboxes provided under <strong>Appearance -> Disable Widgets</strong> and select the widgets you'd like to hide.
6 * Version: 3.0.0
7 * Requires at least: 6.0
8 * Requires PHP: 7.4
9 * Author: required
10 * Author URI: https://required.com
11 * License: GPLv2+
12 * Text Domain: wp-widget-disable
13 *
14 * Copyright (c) 2015-2023 required (email: support@required.ch)
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License, version 2 or, at
18 * your discretion, any later version, as published by the Free
19 * Software Foundation.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 */
30
31 // phpcs:disable Generic.Arrays.DisallowLongArraySyntax -- File needs to be parsable by PHP 5.2.4.
32
33 if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
34 require dirname( __FILE__ ) . '/vendor/autoload.php';
35 }
36
37 // phpcs:ignore WordPress.NamingConventions -- Variable gets unset.
38 $requirements_check = new WP_Requirements_Check(
39 array(
40 'title' => 'WP Widget Disable',
41 'php' => '7.4',
42 'wp' => '6.0',
43 'file' => __FILE__,
44 )
45 );
46
47 if ( $requirements_check->passes() ) {
48 // Pull in the plugin classes and initialize.
49 include __DIR__ . '/classes/class-wp-widget-disable.php';
50
51 $widget_disable = new WP_Widget_Disable();
52 add_action( 'plugins_loaded', array( $widget_disable, 'add_hooks' ) );
53 }
54
55 unset( $requirements_check );
56