Title: WP Sentry Deprecated function defined called class __construct
Last modified: November 9, 2020

---

# WP Sentry Deprecated function defined called class __construct

 *  [w4cdev](https://wordpress.org/support/users/w4cdev/)
 * (@w4cdev)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/wp-sentry-deprecated-function-defined-called-class-__construct-2/)
 * Error after installation
 * Deprecated: The called constructor method for WP_Widget in Sentry_Widget_Recent_Comments
   is deprecated since version 4.3.0! Use __construct() instead. in path-to-server/
   public_html/domainorg/wp-includes/functions.php on line 4870
 * Identical solution for another plugins referred and reported with the [https://stackoverflow.com/questions/6127559/wordpress-plugin-call-to-undefined-function-wp-get-current-user](https://stackoverflow.com/questions/6127559/wordpress-plugin-call-to-undefined-function-wp-get-current-user)
   but we did not find a predefined construct in /wp-sentry/sentry-widgets.php
 * But in the above snippets we did not find the class defining the widget constructor,
   instead having following class
 *     ```
       if (class_exists(‘WP_Widget’)) {
       class Sentry_Widget_Pages extends WP_Widget {
       function Sentry_Widget_Pages() {
       $widget_ops = array(‘classname’ => ‘widget_pages’, ‘description’ => __( ‘Your blog’s WordPress Pages’) );
       $this->WP_Widget(‘pages’, __(‘Pages’), $widget_ops);
       }
       ```
   
 * Noticed that the class constructor is defined in the code
 * Kind regards

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [w4cdev](https://wordpress.org/support/users/w4cdev/)
 * (@w4cdev)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/wp-sentry-deprecated-function-defined-called-class-__construct-2/#post-13637091)
 * This is the duplicated post from the below link referred from plugin folder
 * [https://wordpress.org/support/topic/wp-sentry-deprecated-function-defined-called-class-__construct/#post-13637083](https://wordpress.org/support/topic/wp-sentry-deprecated-function-defined-called-class-__construct/#post-13637083)
 *  Thread Starter [w4cdev](https://wordpress.org/support/users/w4cdev/)
 * (@w4cdev)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/wp-sentry-deprecated-function-defined-called-class-__construct-2/#post-13669665)
 * Awaiting for reply

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WP Sentry Deprecated function defined called class __construct’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-sentry.svg)
 * [WP Sentry](https://wordpress.org/plugins/wp-sentry/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-sentry/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-sentry/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-sentry/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-sentry/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-sentry/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [w4cdev](https://wordpress.org/support/users/w4cdev/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/wp-sentry-deprecated-function-defined-called-class-__construct-2/#post-13669665)
 * Status: not resolved