<?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: Code improvements: double title attribute, insert ID</title>
		<link>https://legacy.forums.gravityhelp.com/topic/code-improvements-double-title-attribute-insert-id</link>
		<description>Gravity Support Forums Topic: Code improvements: double title attribute, insert ID</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 07:43: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/code-improvements-double-title-attribute-insert-id" rel="self" type="application/rss+xml" />

		<item>
			<title>pronamic on "Code improvements: double title attribute, insert ID"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/code-improvements-double-title-attribute-insert-id#post-28766</link>
			<pubDate>Wed, 29 Jun 2011 03:40:51 +0000</pubDate>
			<dc:creator>pronamic</dc:creator>
			<guid isPermaLink="false">28766@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Just some tips / improvements... in version 1.2.3 of the PayPal Add-On:&#60;/p&#62;
&#60;p&#62;paypal.php on line 370:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;span class=&#38;quot;edit&#38;quot;&#38;gt;
&#38;lt;a title=&#38;quot;&#38;lt;?php _e(&#38;quot;Edit&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;)?&#38;gt;&#38;quot; href=&#38;quot;admin.php?page=gf_paypal&#38;amp;view=edit&#38;amp;id=&#38;lt;?php echo $setting[&#38;quot;id&#38;quot;] ?&#38;gt;&#38;quot; title=&#38;quot;&#38;lt;?php _e(&#38;quot;Edit&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;) ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php _e(&#38;quot;Edit&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;) ?&#38;gt;&#38;lt;/a&#38;gt;
&#124;
&#38;lt;/span&#38;gt;
&#38;lt;a title=&#38;quot;&#38;lt;?php _e(&#38;quot;View Stats&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;)?&#38;gt;&#38;quot; href=&#38;quot;admin.php?page=gf_paypal&#38;amp;view=stats&#38;amp;id=&#38;lt;?php echo $setting[&#38;quot;id&#38;quot;] ?&#38;gt;&#38;quot; title=&#38;quot;&#38;lt;?php _e(&#38;quot;View Stats&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;) ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php _e(&#38;quot;Stats&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;) ?&#38;gt;&#38;lt;/a&#38;gt;
&#124;
&#38;lt;/span&#38;gt;
&#38;lt;a title=&#38;quot;&#38;lt;?php _e(&#38;quot;View Entries&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;)?&#38;gt;&#38;quot; href=&#38;quot;admin.php?page=gf_entries&#38;amp;view=entries&#38;amp;id=&#38;lt;?php echo $setting[&#38;quot;form_id&#38;quot;] ?&#38;gt;&#38;quot; title=&#38;quot;&#38;lt;?php _e(&#38;quot;View Entries&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;) ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php _e(&#38;quot;Entries&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;) ?&#38;gt;&#38;lt;/a&#38;gt;
&#124;
&#38;lt;/span&#38;gt;
&#38;lt;span class=&#38;quot;edit&#38;quot;&#38;gt;
&#38;lt;a title=&#38;quot;&#38;lt;?php _e(&#38;quot;Delete&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;) ?&#38;gt;&#38;quot; href=&#38;quot;javascript: if(confirm(&#38;#39;&#38;lt;?php _e(&#38;quot;Delete this feed? &#38;quot;, &#38;quot;gravityformspaypal&#38;quot;) ?&#38;gt; &#38;lt;?php _e(&#38;quot;\&#38;#39;Cancel\&#38;#39; to stop, \&#38;#39;OK\&#38;#39; to delete.&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;) ?&#38;gt;&#38;#39;)){ DeleteSetting(&#38;lt;?php echo $setting[&#38;quot;id&#38;quot;] ?&#38;gt;);}&#38;quot;&#38;gt;&#38;lt;?php _e(&#38;quot;Delete&#38;quot;, &#38;quot;gravityformspaypal&#38;quot;)?&#38;gt;&#38;lt;/a&#38;gt;
&#38;lt;/span&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The &#34;title&#34; attribute is often specified twice. There is missing an opening &#34;span&#34; tag just before the &#34;View Entries&#34; link. I think the &#38;lt;span&#38;gt; element wrapped around the &#34;Delete&#34; link should be classifcied as &#34;trash&#34;, and the &#38;lt;span&#38;gt; around the &#34;View Entries&#34; link as &#34;view&#34;.&#60;/p&#62;
&#60;p&#62;data.php on line 169:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$id = $wpdb-&#38;gt;get_var(&#38;quot;SELECT LAST_INSERT_ID()&#38;quot;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Why don't you use the code:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$id = $wpdb-&#38;gt;insert_id;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://codex.wordpress.org/Function_Reference/wpdb_Class#INSERT_rows&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Function_Reference/wpdb_Class#INSERT_rows&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I guess these improvements also apply to other Add-Ons.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
