<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<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">
	<channel>
		<title>Gravity Support Forums Topic: Roles and capabilities - granting permissions to editors</title>
		<link>https://legacy.forums.gravityhelp.com/topic/roles-and-capabilities-granting-permissions-to-editors</link>
		<description>Gravity Support Forums Topic: Roles and capabilities - granting permissions to editors</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 03:27:36 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/roles-and-capabilities-granting-permissions-to-editors" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "Roles and capabilities - granting permissions to editors"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/roles-and-capabilities-granting-permissions-to-editors#post-6761</link>
			<pubDate>Mon, 28 Jun 2010 12:00:55 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">6761@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@AspectWD If you want role management you don't have to write it yourself.  Gravity Forms integrates with the Members plugin which adds complete role management to WordPress.&#60;/p&#62;
&#60;p&#62;You can download it here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://wordpress.org/extend/plugins/members/&#34; rel=&#34;nofollow&#34;&#62;http://wordpress.org/extend/plugins/members/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Justin Walmsley on "Roles and capabilities - granting permissions to editors"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/roles-and-capabilities-granting-permissions-to-editors#post-6755</link>
			<pubDate>Mon, 28 Jun 2010 05:00:50 +0000</pubDate>
			<dc:creator>Justin Walmsley</dc:creator>
			<guid isPermaLink="false">6755@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Guys, &#60;/p&#62;
&#60;p&#62;Looks like a great solution, &#60;/p&#62;
&#60;p&#62;I'm still trying to get to grips with PHP, I want to add the same functions for editors on my WP site.&#60;/p&#62;
&#60;p&#62;@wheatoncollege could you past the code that you ended up using as mine is returning errors.&#60;/p&#62;
&#60;p&#62;Really appreciate it. &#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Wheaton College on "Roles and capabilities - granting permissions to editors"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/roles-and-capabilities-granting-permissions-to-editors#post-6209</link>
			<pubDate>Wed, 09 Jun 2010 15:40:30 +0000</pubDate>
			<dc:creator>Wheaton College</dc:creator>
			<guid isPermaLink="false">6209@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;excellent, thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Roles and capabilities - granting permissions to editors"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/roles-and-capabilities-granting-permissions-to-editors#post-6208</link>
			<pubDate>Wed, 09 Jun 2010 15:24:24 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">6208@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Your method above will work. A couple of notes:&#60;/p&#62;
&#60;p&#62;To test if Gravity Forms is active, use:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;if(class_exists(&#38;quot;RGForms&#38;quot;)){
...
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Also, it is probably not good form to call $role-&#38;gt;add_cap('....') at every request. You may want to use the theme activation hook so that your code only runs when the theme gets activated, or you can implement your own logic with an option. Something like&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;if( ! get_option(&#38;#39;has_loaded_permissions&#38;#39;, true) ){
   //permissions have not been set, set them now
  $role = get_role( &#38;#39;editor&#38;#39; );
  $role-&#38;gt;add_cap( &#38;#39;gravityforms_create_form&#38;#39; );
  .......
  .......

  //update option so that we don&#38;#39;t set the permissions again
  update_option(&#38;#39;has_loaded_permissions&#38;#39;, true);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I hope this helps.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Wheaton College on "Roles and capabilities - granting permissions to editors"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/roles-and-capabilities-granting-permissions-to-editors#post-6204</link>
			<pubDate>Wed, 09 Jun 2010 14:28:42 +0000</pubDate>
			<dc:creator>Wheaton College</dc:creator>
			<guid isPermaLink="false">6204@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;A safer way might be to wrap that code in a is_plugin_active conditional. Like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if (is_plugin_active(&#38;#39;gravityforms/gravityforms.php&#38;#39;)) {
        $role = get_role( &#38;#39;editor&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_create_form&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_delete_entries&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_delete_forms&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_edit_entries&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_edit_entry_notes&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_edit_forms&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_edit_settings&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_export_entries&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_feed&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_uninstall&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_view_entries&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_view_entry_notes&#38;#39; );
        $role-&#38;gt;add_cap( &#38;#39;gravityforms_view_settings&#38;#39; );
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;BUT, this generates an error, saying that is_plugin_active is not defined. d'oh!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Wheaton College on "Roles and capabilities - granting permissions to editors"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/roles-and-capabilities-granting-permissions-to-editors#post-6203</link>
			<pubDate>Wed, 09 Jun 2010 14:09:00 +0000</pubDate>
			<dc:creator>Wheaton College</dc:creator>
			<guid isPermaLink="false">6203@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, I see that Gravity Forms offers some core capabilities.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/role-management/&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/role-management/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I'd like to tap into these without using the Members plugin, in part because I am using WPMU and Members does not affect roles globally in WPMU.&#60;/p&#62;
&#60;p&#62;Basically, I want to allow all EDITORS to do all Gravity Forms-related capabilities. &#60;/p&#62;
&#60;p&#62;Since all of my blogs are based off of a parent theme, can I simple add this to my theme's functions.php file?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$role = get_role( &#38;#39;editor&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_create_form&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_delete_entries&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_delete_forms&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_edit_entries&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_edit_entry_notes&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_edit_forms&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_edit_settings&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_export_entries&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_feed&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_uninstall&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_view_entries&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_view_entry_notes&#38;#39; );
$role-&#38;gt;add_cap( &#38;#39;gravityforms_view_settings&#38;#39; );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and this will add these capabilities to the Editor role for any site using that theme?&#60;/p&#62;
&#60;p&#62;I've tested this and it seems to work fine. However, I am just asking for a sanity check. Is this the right way to do this?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
