{"id":11350403,"date":"2019-03-24T21:21:38","date_gmt":"2019-03-24T21:21:38","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/deprecated-php-function-4\/"},"modified":"2019-03-24T21:21:38","modified_gmt":"2019-03-24T21:21:38","slug":"deprecated-php-function-4","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/deprecated-php-function-4\/","title":{"rendered":"deprecated php function"},"content":{"rendered":"<p>Hi, I&#8217;m using this snippet but I discovered that create_function() is deprecated. I have not found a solution to fix the problem. Any help will be greatly appreciated!<\/p>\n<p>if ( !current_user_can(&#8216;administrator&#8217;) ) {<br \/>\n    add_action( &#8216;init&#8217;, create_function( &#8216;$a&#8217;, &#8220;remove_action( &#8216;init&#8217;, &#8216;wp_version_check&#8217; );&#8221; ), 2 );<br \/>\n    add_filter( &#8216;pre_option_update_core&#8217;, create_function( &#8216;$a&#8217;, &#8220;return null;&#8221; ) );<br \/>\n}<\/p>\n","protected":false},"template":"","class_list":["post-11350403","topic","type-topic","status-publish","hentry","topic-tag-create_function"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11350403","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\/11350403\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=11350403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}