Skip to content

Commit d19f0ff

Browse files
committed
Using __construct instead of deprecated PHP4-style constructors when registering widget
1 parent 0fe6a6e commit d19f0ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/lib/acm-widget.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
class ACM_Ad_Zones extends WP_Widget {
99

1010
// Process the new widget
11-
function ACM_Ad_Zones() {
11+
function __construct() {
1212
$widget_ops = array(
1313
'classname' => 'acm_ad_zones',
1414
'description' => __( 'Display an Ad Code Manager ad zone within a widget area', 'ad-code-manager' ),
1515
);
16-
$this->WP_Widget( 'ACM_Ad_Zones', __( 'Ad Code Manager Ad Zone', 'ad-code-manager' ), $widget_ops );
16+
parent::__construct( 'ACM_Ad_Zones', __( 'Ad Code Manager Ad Zone', 'ad-code-manager' ), $widget_ops );
1717
}
1818

1919
// Build the widget settings form

0 commit comments

Comments
 (0)