{"id":4409934,"date":"2013-12-13T18:21:57","date_gmt":"2013-12-13T18:21:57","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/get_plugin_data-is-undefined-function\/"},"modified":"2016-08-21T13:29:22","modified_gmt":"2016-08-21T13:29:22","slug":"get_plugin_data-is-undefined-function","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/get_plugin_data-is-undefined-function\/","title":{"rendered":"get_plugin_data() is undefined function?"},"content":{"rendered":"<p>I have the following code in my plugin&#8217;s main file:<\/p>\n<p><code>$_ENV[&#039;cc_author_plugindata&#039;] = get_plugin_data( __FILE__, false );<\/code><\/p>\n<p>I get the following error:<\/p>\n<p><code>Fatal error: Call to undefined function get_plugin_data()<\/code><\/p>\n<p>I&#8217;m inside wp-admin, so I&#8217;m not sure why this function isn&#8217;t available. What&#8217;s going wrong?<\/p>\n","protected":false},"template":"","class_list":["post-4409934","topic","type-topic","status-closed","hentry","topic-tag-get_plugin_data"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4409934","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\/4409934\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4409934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}