{"id":8304843,"date":"2016-10-16T02:01:18","date_gmt":"2016-10-16T02:01:18","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/constructor-method-error-2\/"},"modified":"2016-10-16T02:01:18","modified_gmt":"2016-10-16T02:01:18","slug":"constructor-method-error-2","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/constructor-method-error-2\/","title":{"rendered":"Constructor Method Error"},"content":{"rendered":"<p>I was unable to use this plugin due to the following error:<\/p>\n<pre><code>Notice: The called constructor method for WP_Widget in wp_soundpress_plugin is deprecated since version 4.3.0! Use\n__construct()\ninstead.<\/code><\/pre>\n<p>However, I was able to fix it. For anyone else who cannot get this plugin to work, please give this a try:<\/p>\n<p>Find line 101 in soundpress.php in the plugin&#8217;s install folder. Change it from this:<\/p>\n<p><code>parent::WP_Widget(false, $name = __(&#039;SoundPress Widget&#039;, &#039;wp_soundpress_plugin&#039;) );<\/code><\/p>\n<p>to this:<\/p>\n<p><code>parent::__construct(false, $name = __(&#039;SoundPress Widget&#039;, &#039;wp_soundpress_plugin&#039;) );<\/code><\/p>\n<p>The only thing that&#8217;s really needed is to change &#8220;WP_Widget&#8221; to &#8220;__construct&#8221; so that it works in the newer versions of WordPress. I hope this helps someone! Thank you!<\/p>\n","protected":false},"template":"","class_list":["post-8304843","topic","type-topic","status-publish","hentry","topic-tag-quick-fix","topic-tag-wp_widget","topic-tag-__construct"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8304843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8304843\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=8304843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}