/** * Archive FAQ shortcode. * * @since 1.3.0 * * @param array $atts The shortcode attributes. * * @return string The HTML of the shortcode. */ function jc_sc_archive_jobs_for_jets($atts = array()) { global $jc_sc_jobs_for_jets_args; if (!$jc_sc_jobs_for_jets_args) { $jc_sc_jobs_for_jets_args = array(); } $atts = shortcode_atts(array('type' => false), $atts); if ($atts['type']) { $jc_sc_jobs_for_jets_args['type'] = $atts['type']; add_filter('jc_archive_jobs-for-jets_args', 'jc_archive_jobs_for_jets_sc_args'); } ob_start(); jc_load_template('loop', 'jobs-for-jets'); return ob_get_clean(); }
/** * Archive FAQ shortcode. * * @since 1.3.0 * * @param array $atts The shortcode attributes. * * @return string The HTML of the shortcode. */ function jc_sc_archive_faq($atts = array()) { global $jc_sc_faq_args; if (!$jc_sc_faq_args) { $jc_sc_faq_args = array(); } $atts = shortcode_atts(array('topic' => false), $atts); if ($atts['topic']) { $jc_sc_faq_args['topic'] = $atts['topic']; add_filter('jc_archive_faq_args', 'jc_archive_faq_sc_args'); } ob_start(); jc_load_template('loop', 'faq'); return ob_get_clean(); }
/** * Loads the event data for the calendar event tip. * * @since 1.3.0 * @access private */ function jc_calendar_event_load_tip() { global $post; if (!($event_ID = $_POST['event_ID'])) { die(0); } if (!($event = get_post($event_ID))) { die(0); } $post = get_post($event_ID); setup_postdata($post); ob_start(); jc_load_template('partials', 'event-meta'); $meta_html = ob_get_clean(); $excerpt = get_the_excerpt(); wp_reset_postdata(); wp_send_json(array('success' => true, 'ID' => $event_ID, 'title' => get_the_title($event), 'link' => get_permalink($event), 'excerpt' => $excerpt, 'meta_html' => $meta_html)); }
public function widget($args, $instance) { echo $args['before_widget']; if (!empty($instance['title'])) { echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title']; } add_filter('jc_events_list_args', function ($args) use($instance) { if (isset($instance['count'])) { $args['numberposts'] = $instance['count']; } if (isset($instance['category']) && $instance['category'] != '-1') { $args['tax_query'] = array(array('taxonomy' => 'event-category', 'field' => 'term_id', 'terms' => $instance['category'])); } return $args; }); $condensed = isset($instance['condensed']) && $instance['condensed'] == '1'; jc_load_template('partials', 'events-list' . ($condensed ? '-condensed' : '')); echo $args['after_widget']; }
/** * Shows the event meta details. * * @since 0.3.0 */ function jc_single_event_sidebar_left_before_widgets() { ?> <li class="widget widget-event-details"> <h3 class="widget-title">Event Details</h3> <?php jc_load_template('partials', 'event-meta'); ?> </li> <li class="widget widget-button"> <a href="<?php bloginfo('url'); ?> /events" class="button"> <span class="fa fa-arrow-circle-o-left"></span> Back to Calendar </a> </li> <?php }
/** * Program Courses shortcode. * * @since 1.3.0 * * @param array $atts The shortcode attributes. * * @return string The HTML of the shortcode. */ function jc_sc_program_courses($atts = array()) { global $jc_courses; $atts = shortcode_atts(array('program' => false, 'include' => false, 'exclude' => false), $atts); $courses = array(); if ($program = get_post($atts['program'])) { if ($program_courses = rbm_get_field('courses', $program->ID)) { $courses = $program_courses; } } if ($atts['include']) { $courses = array_merge($courses, explode(',', $atts['include'])); } if ($atts['exclude']) { $courses = array_diff($courses, explode(',', $atts['exclude'])); } $jc_courses = $courses; ob_start(); jc_load_template('partials', 'course-table'); return ob_get_clean(); }
/** * Archive FAQ shortcode. * * @since 1.3.0 * * @param array $atts The shortcode attributes. * * @return string The HTML of the shortcode. */ function jc_sc_archive_staff($atts = array()) { global $jc_sc_staff_args; if (!$jc_sc_staff_args) { $jc_sc_staff_args = array(); } $atts = shortcode_atts(array('department' => false, 'include' => false, 'display' => false), $atts); if ($atts['department'] || $atts['include']) { $jc_sc_staff_args['department'] = $atts['department']; $jc_sc_staff_args['include'] = $atts['include']; add_filter('jc_get_staff_args', 'jc_archive_staff_sc_args'); } if ($atts['display'] == 'grid') { ob_start(); jc_load_template('loop', 'staff-grid'); $output = ob_get_clean(); } else { ob_start(); jc_load_template('loop', 'staff'); $output = ob_get_clean(); } return $output; }
* Displays event post excerpt for the search. * * @since 1.3.0 * * @package JacksonCollege * @subpackage JacksonCollege/views/search */ defined('ABSPATH') || die; $page_content_classes = apply_filters('jc_template_search_content_classes', array()); ?> <article <?php post_class($page_content_classes); ?> data-equalizer-watch> <h1 class="post-title"> <a href="<?php the_permalink(); ?> "> <?php the_title(); ?> </a> </h1> <?php jc_load_template('partials', 'event-meta'); ?> </article>
<?php /** * Archive: Search * * Displays the search archive. * * @since 1.3.0 * * @package JacksonCollege * @subpackage JacksonCollege/views/archives */ defined('ABSPATH') || die; /** This action is documented in views/templates/content.php */ $page_content_classes = apply_filters('jc_template_content_classes', array()); ?> <section class="<?php echo implode(' ', array_merge(array('page-content'), $page_content_classes)); ?> " data-equalizer-watch> <?php jc_breadcrumbs(); ?> <?php jc_load_template('loop', 'search'); ?> </section>
$i = 0; foreach ($semesters as $semester) { $i++; ?> <div class="semester"> <h3> Semester <?php echo $i; ?> - <span class="semester-season"><?php echo $semester['season']; ?> </span> </h3> <?php if (isset($semester['courses']) && !empty($semester['courses'])) { $jc_courses = $semester['courses']; jc_load_template('partials', 'course-table'); } ?> </div> <?php } ?> </div> <?php } ?> </article>
/** * Generic archive page. * * @since 0.3.0 * @package JacksonCollege * * @global WP_Query $wp_query */ // Don't load directly if (!defined('ABSPATH')) { die; } require_once __DIR__ . '/includes/hooks/news-hooks.php'; get_header(); jc_load_template('header'); ?> <div class="page-container"> <div class="page-background-left"></div> <div class="row" data-equalizer> <?php jc_load_template('content', 'calendar'); get_sidebar('left'); get_sidebar('right'); ?> </div> </div> <?php get_footer();
/** * Archive FAQ shortcode. * * @since 1.3.0 * * @return string The HTML of the shortcode. */ function jc_sc_archive_location() { ob_start(); jc_load_template('loop', 'location'); return ob_get_clean(); }
function jc_section_program_set_queried_object_ID() { global $wp_query; static $queried_ID; if (!$queried_ID) { $queried_ID = (int) $wp_query->queried_object_id; $wp_query->queried_object_id = (int) jc_site_section(); } else { $wp_query->queried_object_id = $queried_ID; } } require_once __DIR__ . '/includes/academics-hooks.php'; get_header(); the_post(); jc_load_template('header'); ?> <div class="page-container"> <div class="page-background-left"></div> <div class="row" data-equalizer> <?php jc_load_template('content', 'program'); get_sidebar('left'); get_sidebar('right'); ?> </div> </div> <?php get_footer();
/** * Outputs the content grid after the content. * * @since 1.3.0 * @access private */ function jc_content_grid_output() { jc_load_template('partials', 'content-grid'); }
/** * Outputs the landing grid after the content. * * @since 1.3.0 * @access private */ function jc_landing_grid_output() { jc_load_template('partials', 'landing-grid'); }
* Sets the page sidebar to "locations". * * @since 0.3.0 * @access private * * @return string */ function jc_archive_location_site_sidebar_id() { return 'locations'; } /** This action is documented in views/templates/content.php */ $page_content_classes = apply_filters('jc_template_content_classes', ''); ?> <article <?php post_class(array_merge(array('page-content'), $page_content_classes)); ?> data-equalizer-watch> <?php jc_breadcrumbs(); ?> <?php jc_the_content(); ?> <?php jc_load_template('loop', 'location'); ?> </article>
<?php echo get_the_title($pathway); ?> </a> </li> <?php } ?> </ul> <?php } } get_header(); the_post(); jc_load_template('header'); ?> <div class="page-container"> <div class="page-background-left"></div> <div class="row" data-equalizer> <?php jc_load_template('content', 'pathway'); get_sidebar('left'); get_sidebar('right'); ?> </div> </div> <?php get_footer();
setup_postdata($post); if (!($image = rbm_get_field('archive_image')) && has_post_thumbnail()) { $image = get_post_thumbnail_id(); } elseif (!$image) { $image = ''; } $grid_items[] = array('text' => get_the_title(), 'icon' => rbm_get_field('archive_icon'), 'image' => $image, 'color' => rbm_get_field('archive_color'), 'link' => get_permalink()); } wp_reset_postdata(); return $grid_items; } /** This action is documented in views/templates/content.php */ $page_content_classes = apply_filters('jc_template_content_classes', ''); ?> <article <?php post_class(array_merge(array('page-content'), $page_content_classes)); ?> data-equalizer-watch> <?php jc_breadcrumbs(); ?> <?php jc_the_content(); ?> <?php jc_load_template('partials', 'content-grid'); ?> </article>
<?php /** * Spotlight archive page. * * @since 1.3.0 * @package JacksonCollege */ // Don't load directly if (!defined('ABSPATH')) { die; } require_once __DIR__ . '/includes/hooks/spotlight-hooks.php'; get_header(); jc_load_template('header'); ?> <div class="page-container"> <div class="page-background-left"></div> <div class="row" data-equalizer> <?php jc_load_template('archive', 'spotlight'); get_sidebar('left'); get_sidebar('right'); ?> </div> </div> <?php get_footer();
* * @package JacksonCollege * @subpackage JacksonCollege/views/content */ defined('ABSPATH') || die; /** This action is documented in views/content/content.php */ $page_content_classes = apply_filters('jc_template_content_classes', ''); ?> <article <?php post_class(array_merge(array('page-content'), $page_content_classes)); ?> data-equalizer-watch> <?php jc_breadcrumbs(); ?> <?php if (is_tax()) { ?> <?php the_archive_title('<h1 class="page-title">', '</h1>'); ?> <?php } ?> <?php jc_load_template('partials', 'calendar'); ?> </article>
/** * Shows a single Profile CPT * * @since 1.3.0 * @package JacksonCollege */ // Don't load directly if (!defined('ABSPATH')) { die; } require_once __DIR__ . '/includes/hooks/profile-hooks.php'; get_header(); the_post(); jc_load_template('header'); ?> <div class="page-container"> <div class="page-background-left"></div> <div class="row" data-equalizer> <?php jc_load_template('content', 'profile'); get_sidebar('left'); get_sidebar('right'); ?> </div> </div> <?php get_footer();
<?php /** * Archive: Spotlight * * Displays an archive of spotlights. * * @since 1.3.0 * * @package JacksonCollege * @subpackage JacksonCollege/views/archives */ defined('ABSPATH') || die; /** This action is documented in views/templates/content.php */ $page_content_classes = apply_filters('jc_template_content_classes', ''); ?> <section class="spotlights-archive page-content" data-equalizer-watch> <?php jc_breadcrumbs(); ?> <?php jc_load_template('loop', 'spotlight'); ?> </section>
/** * The theme's single file use for displaying posts. * * @since 0.3.0 * @package JacksonCollege */ // Don't load directly if (!defined('ABSPATH')) { die; } require_once __DIR__ . '/includes/hooks/news-hooks.php'; get_header(); the_post(); jc_load_template('header'); ?> <div class="page-container"> <div class="page-background-left"></div> <div class="row" data-equalizer> <?php jc_load_template('content', 'single'); get_sidebar('left'); get_sidebar('right'); ?> </div> </div> <?php get_footer();
?> "> <h2 class="search-results-section-title"> <?php echo $post_type_object->labels->name; ?> </h2> <?php $filtered_posts = array_filter($posts, function ($post) use($post_type) { return $post->post_type == $post_type; }); foreach ($filtered_posts as $post) { setup_postdata($post); jc_load_template('search', $post_type); } ?> </section> <?php } } else { ?> <div class="small-12 columns"> Nothing found. </div> <?php }
function jc_degree_section_header($template) { static $did_one = false; if (!$did_one && $template[0] == 'header' && get_post_type() == 'jcaca-degree' && ($program_ID = get_post_meta(get_the_ID(), 'jc_program', true))) { if (get_post_meta($program_ID, 'site_section', true)) { $template[1] = 'site-section'; $did_one = true; } } return $template; } require_once __DIR__ . '/includes/academics-hooks.php'; get_header(); the_post(); jc_load_template('header'); ?> <div class="page-container"> <div class="page-background-left"></div> <div class="row" data-equalizer> <?php jc_load_template('content', 'degree'); get_sidebar('left'); get_sidebar('right'); ?> </div> </div> <?php get_footer();
/** * Archive: JC FAQ * * Displays an archive of CPT FAQ. * * @since 1.3.0 * * @package JacksonCollege * @subpackage JacksonCollege/views/archives */ defined('ABSPATH') || die; /** This action is documented in views/templates/content.php */ $page_content_classes = apply_filters('jc_template_content_classes', ''); ?> <article <?php post_class(array_merge(array('page-content'), $page_content_classes)); ?> data-equalizer-watch> <?php jc_breadcrumbs(); ?> <?php jc_the_content(); ?> <?php jc_load_template('loop', 'faq'); ?> </article>
$args['meta_query'][] = array('key' => '_rbm_hidden_on_home', 'value' => '1', 'compare' => '!='); return $args; } ?> <h2 class="home-social-subhead"> <a href="<?php echo get_post_type_archive_link('event'); ?> " title="View Events"> Events </a> </h2> <?php jc_load_template('partials', 'events-list'); ?> </div> <div class="home-social-profile columns medium-12 large-3"> <?php $profiles = get_posts(array('post_type' => 'jc-profile', 'numberposts' => 2)); ?> <?php if (!empty($profiles)) { ?> <div class="profiles"> <?php $i = 0; ?>
* Archive: Posts (news) * * Displays an archive of posts (news). * * @since 1.3.0 * * @package JacksonCollege * @subpackage JacksonCollege/views/archives */ defined('ABSPATH') || die; /** This action is documented in views/templates/content.php */ $page_content_classes = apply_filters('jc_template_content_classes', ''); ?> <article <?php post_class(array_merge(array('page-content'), $page_content_classes)); ?> data-equalizer-watch> <?php jc_breadcrumbs(); ?> <?php jc_load_template('loop', 'news'); ?> <?php jc_pagination(); ?> </article>
/** * Generic archive page. * * @since 0.3.0 * @package JacksonCollege * * @global WP_Query $wp_query */ // Don't load directly if (!defined('ABSPATH')) { die; } require_once __DIR__ . '/includes/hooks/news-hooks.php'; get_header(); jc_load_template('header'); ?> <div class="page-container"> <div class="page-background-left"></div> <div class="row" data-equalizer> <?php jc_load_template('archive', 'news'); get_sidebar('left'); get_sidebar('right'); ?> </div> </div> <?php get_footer();
/** * Archive: JC Staff * * Displays an archive of CPT Staff. * * @since 1.3.0 * * @package JacksonCollege * @subpackage JacksonCollege/views/archives */ defined('ABSPATH') || die; /** This action is documented in views/templates/content.php */ $page_content_classes = apply_filters('jc_template_content_classes', ''); ?> <article <?php post_class(array_merge(array('page-content'), $page_content_classes)); ?> data-equalizer-watch> <?php jc_breadcrumbs(); ?> <?php jc_the_content(); ?> <?php jc_load_template('loop', 'staff'); ?> </article>