本文整理汇总了PHP中jc_load_template函数的典型用法代码示例。如果您正苦于以下问题:PHP jc_load_template函数的具体用法?PHP jc_load_template怎么用?PHP jc_load_template使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了jc_load_template函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jc_sc_archive_jobs_for_jets
/**
* 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();
}
示例2: jc_sc_archive_faq
/**
* 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();
}
示例3: jc_calendar_event_load_tip
/**
* 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));
}
示例4: widget
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'];
}
示例5: jc_single_event_sidebar_left_before_widgets
/**
* 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
}
示例6: jc_sc_program_courses
/**
* 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();
}
示例7: jc_sc_archive_staff
/**
* 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;
}
示例8: defined
* 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>
示例9: defined
<?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>
示例10: foreach
$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>
示例11: get_header
/**
* 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();
示例12: jc_sc_archive_location
/**
* 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();
}
示例13: jc_section_program_set_queried_object_ID
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();
示例14: jc_content_grid_output
/**
* Outputs the content grid after the content.
*
* @since 1.3.0
* @access private
*/
function jc_content_grid_output()
{
jc_load_template('partials', 'content-grid');
}
示例15: jc_landing_grid_output
/**
* Outputs the landing grid after the content.
*
* @since 1.3.0
* @access private
*/
function jc_landing_grid_output()
{
jc_load_template('partials', 'landing-grid');
}