title: Creating optional multiple buttons for jQuery UI Dialog
body: <p>So I know to create multiple buttons with jQuery UI you simply do:</p>
  
  <pre><code>buttons : [{
      text  : settings.buttonText,
      click : function () { settings.buttonFunction(); }
  },
  {
      text  : button2Text,
      click : function () { settings.button2Function(); }
  }
  }]
  </code></pre>
  
  <p>I have a plugin I've created to handle &amp; make dialogboxes similar site-wide, and recently need to add the option of passing in multiple buttons, not just 1.</p>
  
  <p>Now typically this whole section doesn't even get run unless a button is even wanted. I have a quick <code>if (settings.buttonText) { }</code> wrapped around it. But the problem is even though I don't pass in button2Text etc, the button is still appearing. Besides doing some newbish thing like <code>.hide()</code>...</p>
  
  <p>My question is: <strong>How can i have that second <code>{ text ... click ... }</code> area be dynamic and only appear in the object if settings.button2Text is passed into the plugin</strong>? Is this even possible?</p>
  
  <p>I feel like the solution is so simple I'm just braindead right now :) Thanks for any input</p>