function lorainccc_spotlight_box_html($post) { wp_nonce_field('_lorainccc_spotlight_box_nonce', 'lorainccc_spotlight_box_nonce'); ?> <script> jQuery(document).ready(function(){ jQuery('#event_start_date').datepicker({ dateFormat: "yy-mm-dd" }); jQuery('#event_start_time').timepicker({ timeFormat: "hh:mm tt" }); jQuery('#event_end_date').datepicker({ dateFormat: "yy-mm-dd" }); jQuery('#event_end_time').timepicker({ timeFormat: "hh:mm tt" }); }); </script> <h4>Associated Link:</h4> <p> <label for="lorainccc_spotlight_box_link"><?php _e('Associated Link', 'lorainccc_spotlight_box'); ?> </label><br> <input class="widefat" type="text" name="lorainccc_spotlight_box_link" id="lorainccc_spotlight_box_link" value="<?php echo lorainccc_spotlight_box_get_meta('lorainccc_spotlight_box_link'); ?> "> </p> <?php }
/** * Outputs the content of the widget * * @param array $args * @param array $instance */ public function widget($args, $instance) { // outputs the content of the widget extract($args); $dbi_args = array('post_type' => 'spotlights', 'order' => 'ASC', 'posts_per_page' => 2); $query = new WP_Query($dbi_args); ?> <div class="small-up-1 medium-up-2 large-up-2 spotlight-grid"> <?php while ($query->have_posts()) { $query->the_post(); ?> <div class="column lccc-spotlight"> <div data-equalizer="<?php the_title(); ?> " data-equalize-on="medium" data-resize="<?php the_title(); ?> "> <div class="large-7 medium-4 columns service-box-image" data-equalizer-watch="business"> <?php the_post_thumbnail(); ?> </div> <div class="large-5 medium-8 columns service-box-copy text-center" data-equalizer-watch="business"> <div class="service-box-container"> <div class="service-box-header"> <?php $sub_title = lorainccc_spotlight_box_get_meta('lorainccc_spotlight_box_sub_header'); ?> <h2><?php echo $sub_title; ?> <span><?php the_title(); ?> </span></h2> </div> <div class="service-box-body"> <p><?php the_content(); ?> </p> </div> <?php $asoc_link = lorainccc_spotlight_box_get_meta('lorainccc_spotlight_box_link'); if ($asoc_link == '') { $asoc_link = 'http://www.lorainccc.edu/'; } ?> <a href="<?php echo $asoc_link; ?> " class="button">Learn More</a> </div> </div> <div class="yellow-bottom-border"></div> </div> </div> <?php } ?> </div> <?php }