Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /********************************/
- /* New changes for optimisation */
- /********************************/
- add_shortcode( 'wpc-bmi', 'wpc_bmi' );
- function wpc_bmi( $atts, $content )
- {
- ob_start();
- ?>
- <div class="bmi-calc clearfix <?php echo $atts['class']; ?>" data-type="system-normal">
- <?php if( !empty($atts['title']) ) : ?>
- <h3 class="bmi-calc-title"><?php echo $atts['title']; ?></h3>
- <?php endif; ?>
- <div class='bmi-system system-normal'>
- <div class="field-text">
- <label for="bmi_height1"><?php _e('My height is', 'fw'); ?> </label>
- <input type="text" name="bmi_height1" value="" id="bmi_height1" placeholder="5">
- <label><?php _e('feet ' ,''); ?></label>
- <input type="text" name="bmi_height3" value="" id="bmi_height3" placeholder="10">
- <label><?php _e('inches and' ,''); ?></label>
- </div>
- <div class="field-text">
- <label for="bmi_weight1"><?php _e('I weight', 'fw'); ?> </label>
- <input type="text" name="bmi_weight1" value="" id="bmi_weight1" placeholder="150">
- <label><?php _e('pounds', 'fw'); ?></label>
- </div>
- <div class='clearfix'></div>
- <a class='switch' href='#'><?php _e('Switch to Metric', 'fw'); ?></a>
- </div>
- <div class='bmi-system system-metric hidden'>
- <div class="field-text">
- <label for="bmi_height2"><?php _e('My height is', 'fw'); ?> </label>
- <input type="text" name="bmi_height2" value="" id="bmi_height2" placeholder="180">
- <label><?php _e('CM and', 'fw'); ?></label>
- </div>
- <div class="field-text">
- <label for="bmi_weight2"><?php _e('I weight', ''); ?></label>
- <input type="text" name="bmi_weight2" value="" id="bmi_weight2" placeholder="80">
- <label><?php _e('KG', 'fw'); ?></label>
- </div>
- <div class='clearfix'></div>
- <a class='switch' href='#'><?php _e('Switch to Standard', 'fw'); ?></a>
- </div>
- <div class='bmi-results clearfix exceed hidden'>
- <div class="bmi-result">
- <i class="mbc-icon"></i> <?php _e('Your BMI is', 'fw'); ?> <span id='bmi-result'>39.2</span>
- </div>
- <ul>
- <li><span>< 18.5</span> <?php _e('Underweight', 'fw'); ?></li>
- <li class="normal"><span>18.5 - 24.9</span> <?php _e('Good', 'fw'); ?></li>
- <li><span>25.0 - 29.9</span> <?php _e('Overweight', 'fw'); ?></li>
- <li class="bad"><span>30.0 +</span> <?php _e('Obese', 'fw'); ?></li>
- </ul>
- </div>
- <div class="bmi-buttons">
- <a href='#' id='bmi-submit' class='btn btn-sm btn-blue'><span><?php _e('Calculate your BMI', 'fw'); ?></span></a>
- <a href='#' id='bmi-reset' class='btn btn-sm btn-blue hidden'><span><?php _e('Reset', 'fw'); ?></span></a>
- <a href="http://www.staging1.mexicobariatriccenter.com/contact/" id='bmi-schedule' class="btn btn-sm btn-red hidden"><?php _e('Schedule an appointment with us', 'fw'); ?></a>
- </div>
- </div>
- <?php $myvariable = ob_get_clean();
- return $myvariable;
- }
Add Comment
Please, Sign In to add comment