{"id":5871825,"date":"2015-03-06T23:28:12","date_gmt":"2015-03-06T23:28:12","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/non-static-method-cpt_shortcodeinitialize\/"},"modified":"2016-08-22T17:44:59","modified_gmt":"2016-08-22T17:44:59","slug":"non-static-method-cpt_shortcodeinitialize","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/non-static-method-cpt_shortcodeinitialize\/","title":{"rendered":"non-static method cpt_shortcode::initialize()"},"content":{"rendered":"<p>No GitHub repo for a Pull Request so here&#8217;s the code.<\/p>\n<p><code>Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method cpt_shortcode::initialize() should not be called statically in \/srv\/www\/wp-includes\/plugin.php on line 496<\/code><\/p>\n<p>Just add static when defining the function <code>public static function initialize() {<\/code> in <code>class.main.php<\/code><\/p>\n<p>Thanks for the plugin, hope you can incorparate this fix.<\/p>\n<p>Adios!<\/p>\n<p>https:\/\/wordpress.org\/plugins\/custom-post-type-list-shortcode\/<\/p>\n","protected":false},"template":"","class_list":["post-5871825","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5871825","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\/5871825\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5871825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}