PluginProbe
Essential Widgets / 3.1
Essential Widgets v3.1
3.2.1 3.3 3.2 trunk 1.0.0 1.0.1 1.1 1.2 1.2.1 1.2.2 1.3 1.4 1.4.1 1.5 1.6 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.8 1.9 2.0 2.1 2.2 All 31 releases
← All changes | includes/widgets/widgets.php +9 -3 2.13.1 View file →
@@ -1,5 +1,11 @@
1 1 <?php
2 +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-scope variables used immediately below; file is included inside a function scope.
3 +
4 +if ( ! defined( 'ABSPATH' ) ) {
5 + exit; // Exit if accessed directly.
6 +}
7 +
2 8 /**
3 9 * The template for adding Custom Sidebars and Widgets
4 10 *
5 11 * @package Essential_Widgets
@@ -5,16 +11,16 @@
5 11 * @package Essential_Widgets
6 12 */
7 13
8 14 // Load Archives Widget
9 -//
15 +
10 16 $option = essential_widgets_get_options();
11 17 $widget_list = essential_widgets_list();
12 18
13 19 foreach( $widget_list as $key => $value ) {
14 - if( 1 == $option[ $key ] ) {
20 + if( 1 === (int) $option[ $key ] ) {
15 21 $widget_file = str_replace( '_', '-', $key );
16 22
17 - // Enqueue active widget files
23 + // Enqueue active widget files
18 24 include plugin_dir_path( __FILE__ ) . 'class-' . $widget_file . '.php';
19 25 }
20 26 }