Skip to content

Commit b7c1ce2

Browse files
authored
fix PHP Deprecated: Function create_function()
1 parent 7b0b28b commit b7c1ce2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bea-post-views-counter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,7 @@ function init_bea_pvc_plugin() {
101101
}
102102

103103
// Widget
104-
add_action('widgets_init', create_function('', 'return register_widget("BEA_PVC_Widget");'));
104+
add_action( 'widgets_init', function () {
105+
return register_widget("BEA_PVC_Widget");
106+
} );
105107
}

0 commit comments

Comments
 (0)