<?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: WordPress action hook contextual_help</title>
	<atom:link href="http://www.studiograsshopper.ch/code-snippets/wordpress-action-hook-contextual-help/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.studiograsshopper.ch/code-snippets/wordpress-action-hook-contextual-help/</link>
	<description>Wordpress site design and development, plugins, code ideas, template tags and css resources for bloggers</description>
	<lastBuildDate>Tue, 07 Feb 2012 22:11:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: flor</title>
		<link>http://www.studiograsshopper.ch/code-snippets/wordpress-action-hook-contextual-help/#comment-10373</link>
		<dc:creator>flor</dc:creator>
		<pubDate>Thu, 11 Mar 2010 13:12:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.studiograsshopper.ch/?p=1797#comment-10373</guid>
		<description>I figured out that in the add_action function you need to specify the number of arguments the action function takes, which is 2 in this case. 

I changed it to: add_action( &#039;contextual_help&#039;, &#039;my_function&#039; ,10,2);

I also change the $text variable in the actual function to $contextual_help. Not sure if that is related though.

Flor</description>
		<content:encoded><![CDATA[<p>I figured out that in the add_action function you need to specify the number of arguments the action function takes, which is 2 in this case. </p>
<p>I changed it to: add_action( &#8216;contextual_help&#8217;, &#8216;my_function&#8217; ,10,2);</p>
<p>I also change the $text variable in the actual function to $contextual_help. Not sure if that is related though.</p>
<p>Flor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ade</title>
		<link>http://www.studiograsshopper.ch/code-snippets/wordpress-action-hook-contextual-help/#comment-8698</link>
		<dc:creator>Ade</dc:creator>
		<pubDate>Sat, 16 Jan 2010 13:47:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.studiograsshopper.ch/?p=1797#comment-8698</guid>
		<description>Hi Philip,

I&#039;ll write up an article on it in the next day or two.

Here&#039;s some info to get you going in the meantime...

Normally you will add your Theme Options page like this (simplified for posting here):
&lt;pre lang=&quot;php&quot;&gt;add_action(&#039;admin_menu&#039;, &#039;add_my_theme_options_page&#039;);
function add_my_theme_options_page() {
	$page_hook = add_submenu_page(args, etc etc);
}&lt;/pre&gt;

The variable $page_hook is what you want. Of course, you will need to be careful with variable scope to make sure you can access this elsewhere.

A quick way to find your page hook is to look at the Page Source of your Theme Options page - you will see it in the HEAD section.</description>
		<content:encoded><![CDATA[<p>Hi Philip,</p>
<p>I&#8217;ll write up an article on it in the next day or two.</p>
<p>Here&#8217;s some info to get you going in the meantime&#8230;</p>
<p>Normally you will add your Theme Options page like this (simplified for posting here):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_my_theme_options_page'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> add_my_theme_options_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$page_hook</span> <span style="color: #339933;">=</span> add_submenu_page<span style="color: #009900;">&#40;</span>args<span style="color: #339933;">,</span> etc etc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The variable $page_hook is what you want. Of course, you will need to be careful with variable scope to make sure you can access this elsewhere.</p>
<p>A quick way to find your page hook is to look at the Page Source of your Theme Options page &#8211; you will see it in the HEAD section.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Downer</title>
		<link>http://www.studiograsshopper.ch/code-snippets/wordpress-action-hook-contextual-help/#comment-8693</link>
		<dc:creator>Philip Downer</dc:creator>
		<pubDate>Sat, 16 Jan 2010 07:59:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.studiograsshopper.ch/?p=1797#comment-8693</guid>
		<description>I love this concept. Would be really useful when developing themes for clients&#039; sites.

Can you offer any links to where I can learn more about how and where page hooks are defined?</description>
		<content:encoded><![CDATA[<p>I love this concept. Would be really useful when developing themes for clients&#8217; sites.</p>
<p>Can you offer any links to where I can learn more about how and where page hooks are defined?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ade</title>
		<link>http://www.studiograsshopper.ch/code-snippets/wordpress-action-hook-contextual-help/#comment-8661</link>
		<dc:creator>Ade</dc:creator>
		<pubDate>Thu, 14 Jan 2010 22:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.studiograsshopper.ch/?p=1797#comment-8661</guid>
		<description>Hi,

Without seeing all your code it&#039;s difficult to say what the problem may be. You don&#039;t need to make either &lt;strong&gt;$screen&lt;/strong&gt; or &lt;strong&gt;$text&lt;/strong&gt; global because they are the arguments passed to your function by the add_action filter. Without the filter, nothing will work. The code in the article will work in WPMU 2.8.6.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Without seeing all your code it&#8217;s difficult to say what the problem may be. You don&#8217;t need to make either <strong>$screen</strong> or <strong>$text</strong> global because they are the arguments passed to your function by the add_action filter. Without the filter, nothing will work. The code in the article will work in WPMU 2.8.6.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uwiuw</title>
		<link>http://www.studiograsshopper.ch/code-snippets/wordpress-action-hook-contextual-help/#comment-8656</link>
		<dc:creator>uwiuw</dc:creator>
		<pubDate>Thu, 14 Jan 2010 15:26:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.studiograsshopper.ch/?p=1797#comment-8656</guid>
		<description>i love the idea. But i encounter a problem when i try to use your snipet

i got this error code :Warning: Missing argument 2 for my_admin_help() in C:\xampp\htdocs\myblog\wp.com\wp-content\plugins\bakaautoblog\coreadminlayout.php on line 31

i believe there&#039;s problem on  $screen variabel. i had make it global variabel but it still send error. 

by the way, right now i use wpmu Version 2.8.6 as development environtment. i use it using xampp on my localhost. i use your snippet as part of a plugin. i believe where and what version or what kind of wordpress i use is not the main problem. I hope you can help me.</description>
		<content:encoded><![CDATA[<p>i love the idea. But i encounter a problem when i try to use your snipet</p>
<p>i got this error code :Warning: Missing argument 2 for my_admin_help() in C:\xampp\htdocs\myblog\wp.com\wp-content\plugins\bakaautoblog\coreadminlayout.php on line 31</p>
<p>i believe there&#8217;s problem on  $screen variabel. i had make it global variabel but it still send error. </p>
<p>by the way, right now i use wpmu Version 2.8.6 as development environtment. i use it using xampp on my localhost. i use your snippet as part of a plugin. i believe where and what version or what kind of wordpress i use is not the main problem. I hope you can help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 10 WordPress dashboard hacks</title>
		<link>http://www.studiograsshopper.ch/code-snippets/wordpress-action-hook-contextual-help/#comment-8060</link>
		<dc:creator>10 WordPress dashboard hacks</dc:creator>
		<pubDate>Mon, 28 Dec 2009 14:51:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.studiograsshopper.ch/?p=1797#comment-8060</guid>
		<description>[...] » Source [...]</description>
		<content:encoded><![CDATA[<p>[...] » Source [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

