<?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: Global Custom Fields, Take Two</title>
	<atom:link href="http://digwp.com/2009/09/global-custom-fields-take-two/feed/" rel="self" type="application/rss+xml" />
	<link>http://digwp.com/2009/09/global-custom-fields-take-two/</link>
	<description>Take your WordPress skills to the next level.</description>
	<lastBuildDate>Sat, 11 Feb 2012 16:22:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: TeMc</title>
		<link>http://digwp.com/2009/09/global-custom-fields-take-two/#comment-2577</link>
		<dc:creator>TeMc</dc:creator>
		<pubDate>Sun, 29 Nov 2009 00:19:21 +0000</pubDate>
		<guid isPermaLink="false">http://digwp.com/?p=721#comment-2577</guid>
		<description>@Andy: 

The reason your html content went all funky on the Global Custom Fields-settings page was because it was spitted out on that page.

And what happens with HTML code on a webpage ? Exactly, it get&#039;s executed. So a an &lt;code&gt;a&lt;/code&gt;-tag or &lt;code&gt;p&lt;/code&gt;-tag will show as such.

With &lt;code&gt;htmlentitites()&lt;/code&gt; in PHP you convert the tags. So &amp; will become &lt;code&gt;&amp;&lt;/code&gt; and &lt;code&gt;&gt;&lt;/code&gt; will become &lt;code&gt;&gt;&lt;/code&gt; etc.

After saving it, and using it on your page it automatically converts back to real HTML which you can then use in your theme.

Tho I personally recommend wrapping all the get_option&#039;s in &lt;code&gt;htmlentities()&lt;/code&gt; the way I showed above (just to be on the save side.. why not ?) it certainly also works for &lt;code&gt;[input]&lt;/code&gt; or any other tag.

Short answer: Yes, but I&#039;d recommend using it for all fields. Regardless of whether you&#039;re planning on HTML-coding in a Global Custom Field, just apply &lt;code&gt;htmlentities()&lt;/code&gt; :)</description>
		<content:encoded><![CDATA[<p>@Andy: </p>
<p>The reason your html content went all funky on the Global Custom Fields-settings page was because it was spitted out on that page.</p>
<p>And what happens with HTML code on a webpage ? Exactly, it get&#8217;s executed. So a an <code>a</code>-tag or <code>p</code>-tag will show as such.</p>
<p>With <code>htmlentitites()</code> in PHP you convert the tags. So &amp; will become <code>&amp;amp;</code> and <code>&gt;</code> will become <code>&amp;gt;</code> etc.</p>
<p>After saving it, and using it on your page it automatically converts back to real HTML which you can then use in your theme.</p>
<p>Tho I personally recommend wrapping all the get_option&#8217;s in <code>htmlentities()</code> the way I showed above (just to be on the save side.. why not ?) it certainly also works for <code>[input]</code> or any other tag.</p>
<p>Short answer: Yes, but I&#8217;d recommend using it for all fields. Regardless of whether you&#8217;re planning on HTML-coding in a Global Custom Field, just apply <code>htmlentities()</code> :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy H</title>
		<link>http://digwp.com/2009/09/global-custom-fields-take-two/#comment-2571</link>
		<dc:creator>Andy H</dc:creator>
		<pubDate>Sat, 28 Nov 2009 18:43:59 +0000</pubDate>
		<guid isPermaLink="false">http://digwp.com/?p=721#comment-2571</guid>
		<description>Works. Thanks a lot!!!

Does it implement to to a &lt;code&gt;[textarea]&lt;/code&gt; the same as for &lt;code&gt;[input]&lt;/code&gt;?

Thanks again!</description>
		<content:encoded><![CDATA[<p>Works. Thanks a lot!!!</p>
<p>Does it implement to to a <code>[textarea]</code> the same as for <code>[input]</code>?</p>
<p>Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TeMc</title>
		<link>http://digwp.com/2009/09/global-custom-fields-take-two/#comment-2566</link>
		<dc:creator>TeMc</dc:creator>
		<pubDate>Sat, 28 Nov 2009 17:23:34 +0000</pubDate>
		<guid isPermaLink="false">http://digwp.com/?p=721#comment-2566</guid>
		<description>Try playing with &lt;code&gt;htmlentities();&lt;/code&gt; php function.

Most likely where echo&#039;ing the data in an editable region (ie. the Settings-page).

so &lt;code&gt;[input type=&quot;textarea&quot; name=&quot;myglobalsetting&quot; value=&quot;[?php echo htmlentities(get_option(&#039;myglobalsetting&#039;)); ?]&quot; /]&lt;/code&gt;

(convert [ ] into  &gt;)</description>
		<content:encoded><![CDATA[<p>Try playing with <code>htmlentities();</code> php function.</p>
<p>Most likely where echo&#8217;ing the data in an editable region (ie. the Settings-page).</p>
<p>so <code>[input type="textarea" name="myglobalsetting" value="[?php echo htmlentities(get_option('myglobalsetting')); ?]" /]</code></p>
<p>(convert [ ] into  &gt;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy H</title>
		<link>http://digwp.com/2009/09/global-custom-fields-take-two/#comment-2565</link>
		<dc:creator>Andy H</dc:creator>
		<pubDate>Sat, 28 Nov 2009 17:18:37 +0000</pubDate>
		<guid isPermaLink="false">http://digwp.com/?p=721#comment-2565</guid>
		<description>This is nice!

But something weird happens when I try to put some HTML in the fields, like a simple link. It just disappears. Or in &lt;strong&gt;input&lt;/strong&gt; field the link sets itself outside of the field, after it :o And when I submit the changes second time the part outside the field disappears... Weird stuff.

If anybody knows what&#039;s this about please help :)</description>
		<content:encoded><![CDATA[<p>This is nice!</p>
<p>But something weird happens when I try to put some HTML in the fields, like a simple link. It just disappears. Or in <strong>input</strong> field the link sets itself outside of the field, after it :o And when I submit the changes second time the part outside the field disappears&#8230; Weird stuff.</p>
<p>If anybody knows what&#8217;s this about please help :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ChrisM</title>
		<link>http://digwp.com/2009/09/global-custom-fields-take-two/#comment-2289</link>
		<dc:creator>ChrisM</dc:creator>
		<pubDate>Wed, 11 Nov 2009 03:33:26 +0000</pubDate>
		<guid isPermaLink="false">http://digwp.com/?p=721#comment-2289</guid>
		<description>Not sure if this is the right fix, but it seems to work after taking a bunch of other stuff out of my functions.php file. I started with the default theme and there&#039;s a bunch of Kubrick theme stuff in the functions file. I don&#039;t think my modified theme was using any of those functions (we&#039;ll see though)...

But after taking all that stuff out, that weird &quot;cannot modify headers&quot; message went away.</description>
		<content:encoded><![CDATA[<p>Not sure if this is the right fix, but it seems to work after taking a bunch of other stuff out of my functions.php file. I started with the default theme and there&#8217;s a bunch of Kubrick theme stuff in the functions file. I don&#8217;t think my modified theme was using any of those functions (we&#8217;ll see though)&#8230;</p>
<p>But after taking all that stuff out, that weird &#8220;cannot modify headers&#8221; message went away.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ChrisM</title>
		<link>http://digwp.com/2009/09/global-custom-fields-take-two/#comment-2269</link>
		<dc:creator>ChrisM</dc:creator>
		<pubDate>Tue, 10 Nov 2009 03:19:31 +0000</pubDate>
		<guid isPermaLink="false">http://digwp.com/?p=721#comment-2269</guid>
		<description>Did you figure this out? I have the same error.</description>
		<content:encoded><![CDATA[<p>Did you figure this out? I have the same error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TeMc</title>
		<link>http://digwp.com/2009/09/global-custom-fields-take-two/#comment-2080</link>
		<dc:creator>TeMc</dc:creator>
		<pubDate>Wed, 21 Oct 2009 12:40:18 +0000</pubDate>
		<guid isPermaLink="false">http://digwp.com/?p=721#comment-2080</guid>
		<description>See also http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table

manage_options is admin-only. Which is good, but is it possible to make an exception for one or more particular settings-pages (such as Global Custom Fields)</description>
		<content:encoded><![CDATA[<p>See also <a href="http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table" rel="nofollow">http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table</a></p>
<p>manage_options is admin-only. Which is good, but is it possible to make an exception for one or more particular settings-pages (such as Global Custom Fields)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TeMc</title>
		<link>http://digwp.com/2009/09/global-custom-fields-take-two/#comment-2079</link>
		<dc:creator>TeMc</dc:creator>
		<pubDate>Wed, 21 Oct 2009 12:37:25 +0000</pubDate>
		<guid isPermaLink="false">http://digwp.com/?p=721#comment-2079</guid>
		<description>The time came, and I now really need these global custom fields, but for the time being I&#039;m still jumping between Take One and Two.

@Chris and everbody else:

I really like Take Two, but how can I make this settings-page accesable for &quot;Editors&quot; ?
Since it&#039;s no longer a page it became Admin-only..


Hope to hear a response,
TeMc</description>
		<content:encoded><![CDATA[<p>The time came, and I now really need these global custom fields, but for the time being I&#8217;m still jumping between Take One and Two.</p>
<p>@Chris and everbody else:</p>
<p>I really like Take Two, but how can I make this settings-page accesable for &#8220;Editors&#8221; ?<br />
Since it&#8217;s no longer a page it became Admin-only..</p>
<p>Hope to hear a response,<br />
TeMc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MItche</title>
		<link>http://digwp.com/2009/09/global-custom-fields-take-two/#comment-2071</link>
		<dc:creator>MItche</dc:creator>
		<pubDate>Tue, 20 Oct 2009 16:10:54 +0000</pubDate>
		<guid isPermaLink="false">http://digwp.com/?p=721#comment-2071</guid>
		<description>Thanks guys, love the functionality on this one.  I&#039;m just trying to fit it into my functions.php file.  I have lots other functions in there and when I add your code to the bottom of the file and I update my options i get a php error

&lt;code&gt;Warning: Cannot modify header information - headers already sent by (output started at /nfs/c04/h01/mnt/60977/domains/brumnotes.com/html/wp-content/themes/brumnotes/functions.php:41) in /nfs/c04/h01/mnt/60977/domains/brumnotes.com/html/wp-includes/pluggable.php on line 865&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks guys, love the functionality on this one.  I&#8217;m just trying to fit it into my functions.php file.  I have lots other functions in there and when I add your code to the bottom of the file and I update my options i get a php error</p>
<p><code>Warning: Cannot modify header information - headers already sent by (output started at /nfs/c04/h01/mnt/60977/domains/brumnotes.com/html/wp-content/themes/brumnotes/functions.php:41) in /nfs/c04/h01/mnt/60977/domains/brumnotes.com/html/wp-includes/pluggable.php on line 865</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shawn</title>
		<link>http://digwp.com/2009/09/global-custom-fields-take-two/#comment-2038</link>
		<dc:creator>shawn</dc:creator>
		<pubDate>Sun, 18 Oct 2009 22:07:02 +0000</pubDate>
		<guid isPermaLink="false">http://digwp.com/?p=721#comment-2038</guid>
		<description>I would be interested in this plugin if your still offering.</description>
		<content:encoded><![CDATA[<p>I would be interested in this plugin if your still offering.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

