title: ternary statement and do_shortcode
body: <p>I am trying to get a wordpress theme to display the output from a plugin shortcode in a homepage featured area that currently seems to just pull text strings through from the options settings.
  I have adapted the features.php file as follows:</p>
  
  <pre><code>&lt;?php global $option_setting;
      $display_features = false;
      $meta = get_post_meta( get_the_ID(), 'enable-features',true );
      if (isset($option_setting['features-enable']['enabled'])) :
      $enabled = $option_setting['features-enable']['enabled'];
  
  if (((isset($enabled['blog']) ) &amp;&amp; is_home() ) 
  || ((isset($enabled['staticpage'])) &amp;&amp; is_front_page())
  || ((isset($enabled['posts'])) &amp;&amp; is_single())
  || ((isset($enabled['archives'])) &amp;&amp; is_archive())
  || ($meta)
  || ((isset($enabled['pages'])) &amp;&amp; is_page()))
  {
      $display_features = true;
  }
  
  if ($display_features) :
      if ( count($option_setting['features-main']) &gt; 0 ) : ?&gt;
  
      &lt;div id="features-area"&gt;
      &lt;div class="container"&gt;
          &lt;?php
            $i = 0; foreach ( $option_setting['features-main'] as $features ) {
                      echo "&lt;div class='col-md-4 col-sm-4 feature$i'&gt;&lt;figure&gt;&lt;div&gt;&lt;a href='".esc_url($features['url'])."'&gt;&lt;img src='".$features['image']."'&gt;&lt;div class='features-caption'&gt;&lt;div class='features-caption-title'&gt;".$features['title']."&lt;/div&gt;",($i==1 ? "&lt;div class='features-caption-desc'&gt;&lt;?php echo do_shortcode('[qemcalendar]'); ?&gt;&lt;/div&gt;&lt;/div&gt;&lt;/a&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;" : "&lt;div class='features-caption-desc'&gt;".$features['description']."&lt;/div&gt;&lt;/div&gt;&lt;/a&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;";
              $i++;   }
             ?&gt;
       &lt;/div&gt;   
      &lt;/div&gt;&lt;!--.features--&gt;
  &lt;?php endif;
  endif;
  endif; ?&gt;
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>Parse error: syntax error, unexpected ';' in /home/pennybro/public_html/dev/wp-content/themes/pbcc/features.php on line 24
  </code></pre>
  
  <p>Line 24 is the echo and I imagine what I have done with the <code>&lt;?php echo do_shortcode('[qemcalendar]'); ?&gt;</code> is completely wrong, but am struggling to work out what I need to do instead.</p>
  
  <p>I started out with an if else, but as this was inside the echo it wasn't very happy. I realise I may be trying to do something that simply won't work, but all thoughts appreciated!</p>
  
  <p>Thanks,</p>
  
  <p>Lisa</p>