<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Structure of a Wordpress Plugin</title>
	<atom:link href="http://www.devlounge.net/code/structure-of-a-wordpress-plugin/feed" rel="self" type="application/rss+xml" />
	<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin</link>
	<description>Design, Develop, and Grow</description>
	<lastBuildDate>Wed, 10 Mar 2010 15:25:07 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Artem</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-182339</link>
		<dc:creator>Artem</dc:creator>
		<pubDate>Tue, 12 Jan 2010 19:20:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-182339</guid>
		<description>Ronald,  I have a question.  You say that its a good idea to use a class structure to write plugins.  But how to make classes get access to all wordpress functions like wp_add_dashboard_widget() function from within the class, or other functions like wp_get_currentuser()?  Seems like if you use a class,  youll be troubleshooting more than writing the good stuff,  and chances are that a class structure will not complete the plugin.   

Is there a wordpress class that can be extended to access all wordpress functions?</description>
		<content:encoded><![CDATA[<p>Ronald,  I have a question.  You say that its a good idea to use a class structure to write plugins.  But how to make classes get access to all wordpress functions like wp_add_dashboard_widget() function from within the class, or other functions like wp_get_currentuser()?  Seems like if you use a class,  youll be troubleshooting more than writing the good stuff,  and chances are that a class structure will not complete the plugin.   </p>
<p>Is there a wordpress class that can be extended to access all wordpress functions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Web Design and Development usefull links &#124; Victorelu</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-181652</link>
		<dc:creator>Web Design and Development usefull links &#124; Victorelu</dc:creator>
		<pubDate>Sun, 15 Nov 2009 23:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-181652</guid>
		<description>[...] Structure of a Wordpress Plugin [...]</description>
		<content:encoded><![CDATA[<p>[...] Structure of a Wordpress Plugin [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Essential Wordpress Plugin Development Resources, Tutorials and Guides : Speckyboy Design Magazine</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-181264</link>
		<dc:creator>Essential Wordpress Plugin Development Resources, Tutorials and Guides : Speckyboy Design Magazine</dc:creator>
		<pubDate>Mon, 12 Oct 2009 15:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-181264</guid>
		<description>[...] Reasons to Write a WordPress Plugin &#187; 3. How to Get Ideas for Wordpress Plugins &#187; 4. Structure of a Wordpress Plugin &#187; 5. WordPress Plugin Actions &#187; 6. WordPress Plugin Filters &#187; 7. Constructing a WordPress [...]</description>
		<content:encoded><![CDATA[<p>[...] Reasons to Write a WordPress Plugin &#187; 3. How to Get Ideas for Wordpress Plugins &#187; 4. Structure of a Wordpress Plugin &#187; 5. WordPress Plugin Actions &#187; 6. WordPress Plugin Filters &#187; 7. Constructing a WordPress [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Structure of a Wordpress Plugin Devlounge &#124; Uniform Stores</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-179408</link>
		<dc:creator>Structure of a Wordpress Plugin Devlounge &#124; Uniform Stores</dc:creator>
		<pubDate>Mon, 01 Jun 2009 13:52:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-179408</guid>
		<description>[...] Structure of a Wordpress Plugin Devlounge   Posted by root 29 minutes ago (http://www.devlounge.net)        All wordpress plugins will be installed in the wp content plugins directory but i recommend always creating a folder to store your plugin uniform resource identifier the address of an internet resource if this is the first time you 39 re posting a comment        Discuss&#160;  &#124;&#160; Bury &#124;&#160;    News &#124; Structure of a Wordpress Plugin Devlounge [...]</description>
		<content:encoded><![CDATA[<p>[...] Structure of a Wordpress Plugin Devlounge   Posted by root 29 minutes ago (<a href="http://www.devlounge.net" rel="nofollow">http://www.devlounge.net</a>)        All wordpress plugins will be installed in the wp content plugins directory but i recommend always creating a folder to store your plugin uniform resource identifier the address of an internet resource if this is the first time you 39 re posting a comment        Discuss&nbsp;  |&nbsp; Bury |&nbsp;    News | Structure of a Wordpress Plugin Devlounge [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Structure of a Wordpress Plugin Devlounge &#124; Uniform Stores</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-179403</link>
		<dc:creator>Structure of a Wordpress Plugin Devlounge &#124; Uniform Stores</dc:creator>
		<pubDate>Mon, 01 Jun 2009 12:47:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-179403</guid>
		<description>[...] Structure of a Wordpress Plugin Devlounge   Posted by root 12 minutes ago (http://www.devlounge.net)        All wordpress plugins will be installed in the wp content plugins directory but i recommend always creating a folder to store your plugin uniform resource identifier the address of an internet resource if this is the first time you 39 re posting a comment        Discuss&#160;  &#124;&#160; Bury &#124;&#160;    News &#124; Structure of a Wordpress Plugin Devlounge [...]</description>
		<content:encoded><![CDATA[<p>[...] Structure of a Wordpress Plugin Devlounge   Posted by root 12 minutes ago (<a href="http://www.devlounge.net" rel="nofollow">http://www.devlounge.net</a>)        All wordpress plugins will be installed in the wp content plugins directory but i recommend always creating a folder to store your plugin uniform resource identifier the address of an internet resource if this is the first time you 39 re posting a comment        Discuss&nbsp;  |&nbsp; Bury |&nbsp;    News | Structure of a Wordpress Plugin Devlounge [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tzvethan Dichev</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-179079</link>
		<dc:creator>Tzvethan Dichev</dc:creator>
		<pubDate>Sun, 26 Apr 2009 19:21:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-179079</guid>
		<description>Thanks. :)</description>
		<content:encoded><![CDATA[<p>Thanks. <img src='http://www.devlounge.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-179039</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 24 Apr 2009 12:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-179039</guid>
		<description>Hi, could some one please help me with a problem I am having? I am following the recommended structure for building a WordPress plugin using a class, however, when I try and use the &#039;add_meta_data&#039; code an error is generated (Warning: call_user_func(add_custom_box) [function.call-user-func]: First argument is expected to be a valid callback in C:\web\wordpress-mu\wp-admin\includes\template.php on line 2792). 

My code is not complicated, but I just cant see what I am doing wrong.

CODE-

 array(  
			&quot;name&quot; =&gt; &quot;image&quot;,  	
			&quot;std&quot; =&gt; &quot;&quot;,  
			&quot;title&quot; =&gt; &quot;Image&quot;,  
			&quot;description&quot; =&gt; &quot;Using the \&quot;&lt;em&gt;Add an Image&lt;/em&gt;\&quot; button, upload an image and paste the URL here.&quot;)  
		);
		
		function add_custom_box(){  
			//global $post, $new_meta_boxes; 
			
			/*foreach($new_meta_boxes as $meta_box) {  
				$meta_box_value = get_post_meta($post-&gt;ID, $meta_box[&#039;name&#039;].&#039;_value&#039;, true);  
  
				if($meta_box_value == &quot;&quot;)  
				$meta_box_value = $meta_box[&#039;std&#039;];*/  
				  
				// Use nonce for verification

  echo &#039;&#039;;

  // The actual fields for data entry

  echo &#039;&#039; . __(&quot;Description for this field&quot;, &#039;myplugin_textdomain&#039; ) . &#039; &#039;;
  echo &#039;&#039;;
		}
		
		
		function create_custom_box() {  
			$current_user = wp_get_current_user();
			$user_level = intval($current_user-&gt;user_level);
			
			if($user_level == 10) {
				if ( function_exists(&#039;add_meta_box&#039;) ) {  
					add_meta_box( &#039;myplugin_sectionid&#039;, __( &#039;Page Settings1&#039;, &#039;myplugin_textdomain&#039;), &#039;add_custom_box&#039;, &#039;page&#039;, &#039;normal&#039;, &#039;high&#039; );
				}  
			}
			
			
		}  
		
    }
 
}

if (class_exists(&quot;MultiPage&quot;)) {
	$MultiPage = new MultiPage();
}

//Actions and Filters	
if (isset($MultiPage)) {
	//Actions
	add_action(&#039;admin_menu&#039;, array(&amp;$MultiPage, &#039;create_custom_box&#039;), 1);
	
	//Filters
	
}
?&gt;</description>
		<content:encoded><![CDATA[<p>Hi, could some one please help me with a problem I am having? I am following the recommended structure for building a WordPress plugin using a class, however, when I try and use the &#8216;add_meta_data&#8217; code an error is generated (Warning: call_user_func(add_custom_box) [function.call-user-func]: First argument is expected to be a valid callback in C:\web\wordpress-mu\wp-admin\includes\template.php on line 2792). </p>
<p>My code is not complicated, but I just cant see what I am doing wrong.</p>
<p>CODE-</p>
<p> array(<br />
			&#8220;name&#8221; =&gt; &#8220;image&#8221;,<br />
			&#8220;std&#8221; =&gt; &#8220;&#8221;,<br />
			&#8220;title&#8221; =&gt; &#8220;Image&#8221;,<br />
			&#8220;description&#8221; =&gt; &#8220;Using the \&#8221;<em>Add an Image</em>\&#8221; button, upload an image and paste the URL here.&#8221;)<br />
		);</p>
<p>		function add_custom_box(){<br />
			//global $post, $new_meta_boxes; </p>
<p>			/*foreach($new_meta_boxes as $meta_box) {<br />
				$meta_box_value = get_post_meta($post-&gt;ID, $meta_box['name'].&#8217;_value&#8217;, true);  </p>
<p>				if($meta_box_value == &#8220;&#8221;)<br />
				$meta_box_value = $meta_box['std'];*/  </p>
<p>				// Use nonce for verification</p>
<p>  echo &#8221;;</p>
<p>  // The actual fields for data entry</p>
<p>  echo &#8221; . __(&#8220;Description for this field&#8221;, &#8216;myplugin_textdomain&#8217; ) . &#8216; &#8216;;<br />
  echo &#8221;;<br />
		}</p>
<p>		function create_custom_box() {<br />
			$current_user = wp_get_current_user();<br />
			$user_level = intval($current_user-&gt;user_level);</p>
<p>			if($user_level == 10) {<br />
				if ( function_exists(&#8216;add_meta_box&#8217;) ) {<br />
					add_meta_box( &#8216;myplugin_sectionid&#8217;, __( &#8216;Page Settings1&#8242;, &#8216;myplugin_textdomain&#8217;), &#8216;add_custom_box&#8217;, &#8216;page&#8217;, &#8216;normal&#8217;, &#8216;high&#8217; );<br />
				}<br />
			}</p>
<p>		}  </p>
<p>    }</p>
<p>}</p>
<p>if (class_exists(&#8220;MultiPage&#8221;)) {<br />
	$MultiPage = new MultiPage();<br />
}</p>
<p>//Actions and Filters<br />
if (isset($MultiPage)) {<br />
	//Actions<br />
	add_action(&#8216;admin_menu&#8217;, array(&amp;$MultiPage, &#8216;create_custom_box&#8217;), 1);</p>
<p>	//Filters</p>
<p>}<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: conor</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-178926</link>
		<dc:creator>conor</dc:creator>
		<pubDate>Tue, 14 Apr 2009 21:29:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-178926</guid>
		<description>Great article! I am writing a mailing list plugin as i speak. Actually I have allready written it for a different CMS and am trying to convert it over... Bloody OOP! It&#039;s going to take me a while to get to grips with it!</description>
		<content:encoded><![CDATA[<p>Great article! I am writing a mailing list plugin as i speak. Actually I have allready written it for a different CMS and am trying to convert it over&#8230; Bloody OOP! It&#8217;s going to take me a while to get to grips with it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prasanna</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-174571</link>
		<dc:creator>Prasanna</dc:creator>
		<pubDate>Sun, 27 Jul 2008 14:15:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-174571</guid>
		<description>I loved reading your article....
So far so good....i hope i will be able to write a plugin soon.</description>
		<content:encoded><![CDATA[<p>I loved reading your article&#8230;.<br />
So far so good&#8230;.i hope i will be able to write a plugin soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TruePaige</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-145423</link>
		<dc:creator>TruePaige</dc:creator>
		<pubDate>Fri, 16 May 2008 19:50:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-145423</guid>
		<description>yuppicide,

URI is actually the recommended nomenclature.

(Uniform Resource Identifier) - The address of an Internet resource. A URI is the unique name used to access the resource.

It&#039;s a bit of a picky different, but a URI can be much more varied, though many times it&#039;s just a web address.</description>
		<content:encoded><![CDATA[<p>yuppicide,</p>
<p>URI is actually the recommended nomenclature.</p>
<p>(Uniform Resource Identifier) &#8211; The address of an Internet resource. A URI is the unique name used to access the resource.</p>
<p>It&#8217;s a bit of a picky different, but a URI can be much more varied, though many times it&#8217;s just a web address.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yuppicide</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-142401</link>
		<dc:creator>yuppicide</dc:creator>
		<pubDate>Thu, 27 Mar 2008 20:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-142401</guid>
		<description>Great tutorial I am reading so far. In the beginning you mention some code that is required to get started. One line is:

4. Plugin URI: Your Plugin URI

Shouldn&#039;t that be URL?</description>
		<content:encoded><![CDATA[<p>Great tutorial I am reading so far. In the beginning you mention some code that is required to get started. One line is:</p>
<p>4. Plugin URI: Your Plugin URI</p>
<p>Shouldn&#8217;t that be URL?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devlounge &#124; WordPress Plugin Actions</title>
		<link>http://www.devlounge.net/code/structure-of-a-wordpress-plugin/comment-page-1#comment-43103</link>
		<dc:creator>Devlounge &#124; WordPress Plugin Actions</dc:creator>
		<pubDate>Sun, 13 May 2007 11:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.devlounge.net/articles/structure-of-a-wordpress-plugin#comment-43103</guid>
		<description>[...] Posts Structure of a Wordpress Plugin This post was written as part of the How to Write a WordPress Plugin series. One of the more [...]</description>
		<content:encoded><![CDATA[<p>[...] Posts Structure of a Wordpress Plugin This post was written as part of the How to Write a WordPress Plugin series. One of the more [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
