public function build_shortcode($atts, $content = null)
 {
     extract(shortcode_atts(array('id' => '', 'title' => false, 'description' => false, 'minimize' => false, 'custom_css_class' => ''), $atts));
     $output = '<div class="avca-formidable ' . $custom_css_class . '">';
     $output .= FrmFormsController::get_form_shortcode(array('id' => $id, 'title' => $title, 'description' => $description, 'minimize' => $minimize));
     $output .= '</div>';
     return $output;
 }
 public static function get_form_shortcode($atts)
 {
     _deprecated_function(__FUNCTION__, '1.07.05', 'FrmFormsController::get_form_shortcode()');
     return FrmFormsController::get_form_shortcode($atts);
 }
 function test_get_form_shortcode()
 {
     $form = FrmFormsController::get_form_shortcode(array('id' => $this->contact_form_key));
     $this->assertNotEmpty(strpos($form, '<form '), 'The form is missing');
 }
        <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>

          <h2><?php 
        the_title();
        ?>
</h2>
          <?php 
        the_content();
        ?>

        <?php 
    }
}
?>
        <?php 
echo FrmFormsController::get_form_shortcode(array('id' => 9, 'title' => false, 'description' => false));
?>

      </div>

  </div>

</main><!-- #main -->

<?php 
get_footer();
 public static function edit_entry_ajax()
 {
     //check_ajax_referer( 'frm_ajax', 'nonce' );
     $id = FrmAppHelper::get_param('id', '', 'post', 'absint');
     $entry_id = FrmAppHelper::get_param('entry_id', 0, 'post', 'absint');
     $post_id = FrmAppHelper::get_param('post_id', 0, 'post', 'sanitize_title');
     $fields = FrmAppHelper::get_param('fields', array(), 'post', 'sanitize_title');
     $exclude_fields = FrmAppHelper::get_param('exclude_fields', array(), 'post', 'sanitize_title');
     global $frm_vars;
     $frm_vars['footer_loaded'] = true;
     if ($entry_id) {
         $_GET['entry'] = $entry_id;
     }
     if ($post_id && is_numeric($post_id)) {
         global $post;
         if (!$post) {
             $post = get_post($post_id);
         }
     }
     echo "<script type='text/javascript'>\n/*<![CDATA[*/\njQuery(document).ready(function(\$){\n\$('#frm_form_" . esc_attr($id) . "_container .frm-show-form').submit(window.frmFrontForm.submitForm);\n});\n/*]]>*/\n</script>";
     echo FrmFormsController::get_form_shortcode(compact('id', 'entry_id', 'fields', 'exclude_fields'));
     self::print_ajax_scripts('all');
     wp_die();
 }
 public static function edit_entry_ajax()
 {
     $id = FrmAppHelper::get_param('id');
     $entry_id = FrmAppHelper::get_param('entry_id', false);
     $post_id = FrmAppHelper::get_param('post_id', false);
     global $frm_vars;
     $frm_vars['ajax_edit'] = $entry_id ? $entry_id : true;
     $_GET['entry'] = $entry_id;
     if ($post_id and is_numeric($post_id)) {
         global $post;
         if (!$post) {
             $post = get_post($post_id);
         }
     }
     FrmAppHelper::load_scripts(array('formidable'));
     echo "<script type='text/javascript'>\n/*<![CDATA[*/\njQuery(document).ready(function(\$){\n\$('#frm_form_" . $id . "_container .frm-show-form').submit(window.frmOnSubmit);\n});\n/*]]>*/\n</script>";
     echo FrmFormsController::get_form_shortcode(compact('id', 'entry_id'));
     $frm_vars['ajax_edit'] = false;
     //if(!isset($_POST) or (!isset($_POST['action']) and !isset($_POST['frm_action])))
     //    echo FrmProEntriesController::footer_js();
     die;
 }
    ?>
            </div><!-- .entry-content -->

        	<?php 
    edit_post_link(__('Edit', 'twentyfifteen'), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->');
    ?>

        </article><!-- #post-## -->

        <div id="attendants" class="comments-area">
    		<h2 class="comments-title">참가신청</h2>
            <?php 
    if (is_user_logged_in()) {
        ?>
                <?php 
        echo FrmFormsController::get_form_shortcode(array('id' => 11));
        ?>
            <?php 
    } else {
        ?>
                <p class="info">
                    참가신청를 하려면 
                    <a href="<?php 
        echo wp_login_url(get_permalink() . '#attendants');
        ?>
" title="Login">로그인</a>
                    하세요!
                </p>    
            <?php 
    }
    ?>
예제 #8
0
<?php

/**
 * Template Name: Contact Page
 */
?>
<div class="contact-page">
  <?php 
while (have_posts()) {
    the_post();
    ?>
    <?php 
    get_template_part('templates/content', 'page');
    ?>
  <?php 
}
?>
  <div class="row">
    <div id="contact" class="col-sm-3">
      <?php 
dynamic_sidebar('sidebar');
?>
    </div>
    <div class="col-sm-9">
      <?php 
echo FrmFormsController::get_form_shortcode(array('id' => 6, 'title' => true, 'description' => true));
?>
    </div>
  </div>
</div>