function coronastatics_widgetreg()
{
register_widget('corona_bd_widget');
register_widget('corona_bd_widget_world');
}
add_action('widgets_init', 'coronastatics_widgetreg');
and i’m calling this functions as __construct. below is the code:
<?php
class corona_bd_widget extends WP_Widget{
public function __construct()
{
$widget_ops = array(
'classname' => 'corona_bd_widget',
'description' => 'Display Bangladesh Live CoronaVirus (Covid-19) Real-Time Data'
);
parent::__construct('corona_bd_widget', 'CoronaStatics Bangladesh', $widget_ops);
}
// output the widget content on the front-end
public function widget($args, $instance)
{
echo $args['before_widget'];
if (!empty($instance['title'])) {
echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
}
$data = json_decode(coronastatics_bangladeshapi());
?>
the codes are working good. but now i want to change the “corona_bd_widget” to “coronastatics_bangladeshwidget”, but while i’m changing this “corona_bd_widget” to “coronastatics_bangladeshwidget” it’s not showing anything into the widget area of my website. can you please explain what is the issue?
thanks.
]]>RESPONSIVE_SLIDER_plugin has a deprecated constructor in \wp-content\plugins\hot-responsive-slider\hot_responsive_slider.php on line 31
1- Go to the plugin location for Hot Responsive Slider and edit hot_responsive_slider.php (Use a plain text editor like NotePad++ or Brackets (Google to find it)
2- Find the following section of code:
class RESPONSIVE_SLIDER_plugin {
var $OPTIONS = array();
var $plugin_path = '';
function RESPONSIVE_SLIDER_plugin() {
3- Change the function line:
From: function RESPONSIVE_SLIDER_plugin() {
To: function __construct() {
Now open Dashboard and error is gone, open ‘Settings’ and will see ‘Hot Responsive Slider’
Hope this helps
Mike
]]>Notice: The called constructor method for WP_Widget in wp_soundpress_plugin is deprecated since version 4.3.0! Use
__construct()
instead.
However, I was able to fix it. For anyone else who cannot get this plugin to work, please give this a try:
Find line 101 in soundpress.php in the plugin’s install folder. Change it from this:
parent::WP_Widget(false, $name = __('SoundPress Widget', 'wp_soundpress_plugin') );
to this:
parent::__construct(false, $name = __('SoundPress Widget', 'wp_soundpress_plugin') );
The only thing that’s really needed is to change “WP_Widget” to “__construct” so that it works in the newer versions of WordPress. I hope this helps someone! Thank you!
]]>Notice: The called constructor method for WP_Widget in CPO_Widget is deprecated since version 4.3.0! Use __construct() instead. in /.../wp-includes/functions.php on line 3718
For more information, see https://make.www.ads-software.com/core/2015/07/02/deprecating-php4-style-constructors-in-wordpress-4-3/
Cheers,
Paul
https://www.ads-software.com/plugins/child-page-of-widget/
]]>I am currently using your plugin it’s really a Gods’s gift to manage Https content delivery through Cloudflare Flexible SSL.
However, I notice that plugins which are loaded (included) before the “__construct” method of your “class.SSLInsecureContentFixer” will not benefit from your modifications. (Seems normal as filters are not yet initialized/added)
Do you have a beautiful way to solve this problem or do I need to modify plugins order, on any activation, to put the “SSL Insecure Content Fixer” in first position ? (Cf. https://www.ads-software.com/support/topic/how-to-change-plugins-load-order?replies=11)
Yours faithfully,
Birmania
https://www.ads-software.com/plugins/ssl-insecure-content-fixer/
]]>I updated the plugin event calendar but now I cannot login anymore (https://www.bestager-messen.de/wp-login.php). It shows the following error message:
“Notice: Die verwendete Konstruktoren-Methode f??r WP_Widget ist seit Version 4.3.0 veraltet! Verwende stattdessen
__construct()
. in /www/htdocs/w013555e/bestager-senioren-messen.de/wp-includes/functions.php on line 3624″
In line 3624 @functions.php is this code:
trigger_error( sprintf( __( ‘The called constructor method for %1$s is deprecated since version %2$s! Use %3$s instead.’ ), $class, $version, ‘
__construct()
‘ ) );
What can I do? I use the latest WordPress Version. I cannot login anymore…
Thanks
https://www.ads-software.com/plugins/the-events-calendar/
]]>https://www.ads-software.com/plugins/randomtext/
]]>I believe there are 2 problems
Shouldn’t the debug messages be buffered until the header for
the page is properly completed?
Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct() instead. in /home/adminname/public_html/wp-includes/functions.php on line 3624.
I have looked at various www.ads-software.com forums and seen many theories as to prospective problems on the matter but it appears none of them apply in my case. For example, I don’t have a WP_Widget in the coding of the website.
Can anyone help me get to the bottom of this? It is very distressing to see this deprecation notice forcibly splashed across my home page.
]]>On activating version 1.6.1 I get the following errors:
Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct() instead. in /var/www/wp-includes/functions.php on line 3624
Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /var/www/wp-includes/functions.php on line 3737
https://www.ads-software.com/plugins/wp-word-count/
]]>