<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									WordPress - Fix &quot;called constructor method for WP_Widget in ... is depreciated&quot; - Web Development				            </title>
            <link>https://www.tweaking4all.nl/forum/web-development/wordpress-fix-called-constructor-method-for-wp_widget-in-is-depreciated/</link>
            <description>Tweaking4All.nl Discussie Forum</description>
            <language>nl-NL</language>
            <lastBuildDate>Thu, 16 Jul 2026 02:14:34 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>WordPress - Fix &quot;called constructor method for WP_Widget in ... is depreciated&quot;</title>
                        <link>https://www.tweaking4all.nl/forum/web-development/wordpress-fix-called-constructor-method-for-wp_widget-in-is-depreciated/#post-369</link>
                        <pubDate>Mon, 20 Jun 2016 16:34:16 +0000</pubDate>
                        <description><![CDATA[Sinds WordPress 4.3.0 kun je de volgende foutmeldingen zien:&nbsp;Notice: The called constructor method for WP_Widget in xyz is deprecated since version 4.3.0! Use __construct()&nbsp;Dit bet...]]></description>
                        <content:encoded><![CDATA[<p>Sinds WordPress 4.3.0 kun je de volgende foutmeldingen zien:&nbsp;</p><pre>Notice: The called constructor method for WP_Widget in xyz is deprecated since version 4.3.0! Use __construct()&nbsp;</pre><p>Dit betreft vaak plugins (zoek naar een update) of jouw eigen PHP code di geupdate dient te worden.</p><p>Als voorbeeld voor jouw eigen code, of als je handmatig een plugin wilt updaten:</p><p>Zoe naar de code die de fout genereerd; b.v.:&nbsp;</p><pre>class t4a_stats_widget extends WP_Widget {&nbsp;<br>&nbsp; &nbsp;function t4a_stats_widget() {<br>&nbsp; &nbsp; &nbsp;$widget_ops = array('classname' =&gt; '', 'description' =&gt; 'Statistics overview' ); <br>&nbsp; &nbsp; &nbsp;$this-&gt;WP_Widget('stats_widget', __('T4A Statistics', 'tweaking4all'), $widget_ops); <br>&nbsp;} <br>...&nbsp;</pre><p>Vervang in dit voorbeeld "<b>function t4a_stats_widget() {</b>" met &nbsp;"<b>function __construct() {</b>", <br>en vervang "<b>$this-&gt;WP_Widget(</b>" met "<b>parent::__construct(</b>", zodat de code er zo uitziet:&nbsp;<br>(t4a_stats_widget is de naam van de falende widget)</p><pre>class t4a_stats_widget extends WP_Widget {<br>&nbsp; function __construct() {<br>&nbsp; &nbsp; $widget_ops = array('classname' =&gt; '', 'description' =&gt; 'Statistics overview' );&nbsp;<br>&nbsp; &nbsp; parent::__construct('stats_widget', __('T4A Statistics', 'tweaking4all'), $widget_ops);&nbsp;<br>&nbsp; &nbsp;}&nbsp;<br>...&nbsp;</pre><p>Herhaal dit voor alle betroffen stukken code.</p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.nl/forum/web-development/">Web Development</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.nl/forum/web-development/wordpress-fix-called-constructor-method-for-wp_widget-in-is-depreciated/#post-369</guid>
                    </item>
							        </channel>
        </rss>
		