<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>intelligent e-Services &#187; #WordPress Development</title>
	<atom:link href="https://ieservices.de/en/tag/wordpress-development/feed/" rel="self" type="application/rss+xml" />
	<link>https://ieservices.de/en/</link>
	<description>the new challenge for open minded people</description>
	<lastBuildDate>Fri, 10 Apr 2026 15:02:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>WordPress Plugin Development :: Getting the current plugin header information</title>
		<link>https://ieservices.de/en/2010/09/17/wordpress-plugin-development-getting-the-current-plugin-header-information/</link>
		<comments>https://ieservices.de/en/2010/09/17/wordpress-plugin-development-getting-the-current-plugin-header-information/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 14:55:01 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[#WordPress]]></category>
		<category><![CDATA[#WordPress Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress Widgets]]></category>

		<guid isPermaLink="false">http://ieservices.de/?p=661</guid>
		<description><![CDATA[<p>You are developing a plugin and you wonder actually how you can access in the plugin itself the variables, which are shown in the [...]</p>
<p>The post <a rel="nofollow" href="https://ieservices.de/en/2010/09/17/wordpress-plugin-development-getting-the-current-plugin-header-information/">WordPress Plugin Development :: Getting the current plugin header information</a> appeared first on <a rel="nofollow" href="https://ieservices.de/en/">intelligent e-Services</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>You are developing a plugin and you wonder actually how you can access in the plugin itself the variables, which are shown in the plugin manager?</p>
<p>And why should we always redefine the information in the plugin itself?</p>
<p>We can easily use the WordPress function:<br />
<code><br />
$plugin_data = get_file_data( __FILE__, $headers, 'plugin'); </code></p>
<p>So here is an example how it works:</p>
<hr />
<p><code></p>
<div id="_mcePaste">* Plugin Name: Pluginformation</div>
<div id="_mcePaste">* Version: 1.0.0</div>
<div id="_mcePaste">* Plugin URI: http://ieservices.de/</div>
<div id="_mcePaste">* Description: Simple plugin to display the plugins information</div>
<div id="_mcePaste">* Author: Martin Andreas Woerz</div>
<div id="_mcePaste">* Author URI: mailto:martin[at]ieservices[dot]de?subject=ieServices%20Plugin%20Pluginformation</div>
<div id="_mcePaste">* Text Domain: pluginformation</div>
<div id="_mcePaste">* Domain Path: plugins</div>
<div id="_mcePaste">* Network: ieservices.de</div>
<div id="_mcePaste">*/</div>
<div id="_mcePaste">// define which header we want to retrieve from the plugin declaration</div>
<div id="_mcePaste">$headers = array</div>
<div id="_mcePaste">(</div>
<div id="_mcePaste">
<div id="_mcePaste"><span style="white-space: pre;"> </span>'Name' =&gt; 'Plugin Name',</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>'PluginURI' =&gt; 'Plugin URI',</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>'Version' =&gt; 'Version',</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>'Description' =&gt; 'Description',</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>'Author' =&gt; 'Author',</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>'AuthorURI' =&gt; 'Author URI',</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>'TextDomain' =&gt; 'Text Domain',</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>'DomainPath' =&gt; 'Domain Path',</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>'Network' =&gt; 'Network',</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>// Site Wide Only is deprecated in favor of Network.</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>'_sitewide' =&gt; 'Site Wide Only',</div>
</div>
<div id="_mcePaste">);</div>
<div id="_mcePaste">// get the current file with __FILE__ and query the data from the WordPress function get_file_data()</div>
<div id="_mcePaste">$plugin_data = get_file_data( __FILE__, $headers, 'plugin');</div>
<div>echo '&lt;pre&gt;';<br />
print_r($plugin_data);<br />
echo '&lt;/pre&gt;';</div>
<p></code></p>
<hr />The result will be:</p>
<p><code>Array<br />
(<br />
[Name] =&gt; Pluginformation<br />
[PluginURI] =&gt; http://ieservices.de/<br />
[Version] =&gt; 1.0.0<br />
[Description] =&gt; Simple plugin to display the plugins information<br />
[Author] =&gt; Martin Andreas Woerz<br />
[AuthorURI] =&gt; mailto:martin[at]ieservices[dot]de?subject=ieServices%20Plugin%20Pluginformation<br />
[TextDomain] =&gt; pluginformation<br />
[DomainPath] =&gt; plugins<br />
[Network] =&gt; ieservices.de<br />
)<br />
</code></p>
<hr />Surely you can alter the headers, but those are the standards.<br />
For example you can add an Author E-Mail address or a Authors Website</p>
<p>The post <a rel="nofollow" href="https://ieservices.de/en/2010/09/17/wordpress-plugin-development-getting-the-current-plugin-header-information/">WordPress Plugin Development :: Getting the current plugin header information</a> appeared first on <a rel="nofollow" href="https://ieservices.de/en/">intelligent e-Services</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://ieservices.de/en/2010/09/17/wordpress-plugin-development-getting-the-current-plugin-header-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
