コード例 #1
0
ファイル: common.php プロジェクト: sabdev1/ljcdevsab
/**
 * Process the iPhorm popup shortcode
 *
 * @param array $atts
 * @param string $content Trigger content/HTML
 */
function iphorm_popup_shortcode($atts, $content = null)
{
    extract(shortcode_atts(array('id' => 0, 'options' => '', 'values' => ''), $atts));
    if (iphorm_needs_raw_tag()) {
        return '[raw]' . iphorm_popup($id, $content, $options, $values) . '[/raw]';
    }
    return iphorm_popup($id, $content, $options, $values);
}
コード例 #2
0
ファイル: widget.php プロジェクト: sabdev1/ljcdevsab
 /**
  * Display the widget
  *
  * @param  array  $args      Display arguments
  * @param  array  $instance  The settings for this widget instance
  */
 public function widget($args, $instance)
 {
     if (iphorm_form_exists($instance['form_id'])) {
         extract($args);
         echo $before_widget;
         $title = apply_filters('widget_title', $instance['title']);
         if ($title) {
             echo $before_title . $title . $after_title;
         }
         echo iphorm_popup($instance['form_id'], $instance['content'], $instance['options']);
         echo $after_widget;
     }
 }