{"id":16485541,"date":"2023-02-19T19:52:44","date_gmt":"2023-02-19T19:52:44","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/call-to-undefined-function-create_function\/"},"modified":"2023-02-19T19:52:44","modified_gmt":"2023-02-19T19:52:44","slug":"call-to-undefined-function-create_function","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/call-to-undefined-function-create_function\/","title":{"rendered":"Call to undefined function create_function()"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This is an error raised on using PHP 8.x, on line 33 of file popularity-posts-widget.php.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This can be easily solved like this:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">add_action(&#8216;widgets_init&#8217;, &#8216;ppw_widgets_init&#8217;);<br \/>function ppw_widgets_init() {<br \/>\u00a0 \u00a0 return register_widget(&#8220;PopularityPostsWidget&#8221;);<br \/>}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Would be nice to see that plugin working with PHP 8.x<\/p>\n","protected":false},"template":"","class_list":["post-16485541","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16485541","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\/16485541\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16485541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}