本文整理汇总了PHP中soliloquy函数的典型用法代码示例。如果您正苦于以下问题:PHP soliloquy函数的具体用法?PHP soliloquy怎么用?PHP soliloquy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了soliloquy函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: output_hero
function output_hero()
{
$slider = get_field('slider');
// print_r($slider);
if (function_exists('soliloquy') && isset($slider->ID)) {
soliloquy($slider->ID);
}
}
示例2: soliloquy_slider
/**
* Primary template tag for outputting Soliloquy sliders in templates (v1).
*
* @since 2.1.0
*
* @param int $slider_id The ID of the slider to load.
* @param bool $return Flag to echo or return the slider HTML.
*/
function soliloquy_slider($id, $return = false)
{
// First test to see if the slider can be found by ID. If so, run that.
$by_id = Soliloquy::get_instance()->get_slider($id);
if ($by_id) {
return soliloquy($id, 'id', array(), $return);
}
// If not by ID, it must be a slug, so return the slug.
return soliloquy($id, 'slug', array(), $return);
}
示例3: widget
/**
* widget function.
*
* @see WP_Widget
* @access public
* @param array $args
* @param array $instance
* @return void
*/
function widget($args, $instance)
{
if ($this->get_cached_widget($args)) {
return;
}
ob_start();
extract($args);
$slider = absint($instance['slider']);
echo $before_widget;
if (function_exists('soliloquy_slider')) {
add_filter('soliloquy_output_caption', array($this, 'soliloquy_output_caption'), 10, 5);
soliloquy($slider);
remove_filter('soliloquy_output_caption', array($this, 'soliloquy_output_caption'), 10, 5);
}
echo $after_widget;
$content = apply_filters('jobify_widget_slider_hero', ob_get_clean(), $instance, $args);
echo $content;
$this->cache_widget($args, $content);
}
示例4: widget
/**
* widget function.
*
* @see WP_Widget
* @access public
* @param array $args
* @param array $instance
* @return void
*/
function widget($args, $instance)
{
if ($this->get_cached_widget($args)) {
return;
}
extract($args);
$slider = absint($instance['slider']);
echo '</div>';
echo $before_widget;
if (function_exists('soliloquy')) {
add_filter('soliloquy_output_before_caption', array($this, 'soliloquy_output_before_caption'), 10, 5);
add_filter('soliloquy_output_after_caption', array($this, 'soliloquy_output_after_caption'), 10, 5);
add_filter('soliloquy_output_caption', array($this, 'soliloquy_output_caption'), 10, 5);
soliloquy($slider);
remove_filter('soliloquy_output_before_caption', array($this, 'soliloquy_output_before_caption'), 10, 5);
remove_filter('soliloquy_output_after_caption', array($this, 'soliloquy_output_after_caption'), 10, 5);
remove_filter('soliloquy_output_caption', array($this, 'soliloquy_output_caption'), 10, 5);
}
echo $after_widget;
echo '<div class="container">';
}
示例5: widget
/**
* Outputs the widget within the widgetized area.
*
* @since 1.0.0
*
* @param array $args The default widget arguments.
* @param array $instance The input settings for the current widget instance.
*/
public function widget($args, $instance)
{
// Extract arguments into variables.
extract($args);
$title = apply_filters('widget_title', $instance['title']);
$slider_id = $instance['soliloquy_id'];
do_action('soliloquy_widget_before_output', $args, $instance);
echo $before_widget;
do_action('soliloquy_widget_before_title', $args, $instance);
// If a title exists, output it.
if ($title) {
echo $before_title . $title . $after_title;
}
do_action('soliloquy_widget_before_slider', $args, $instance);
// If a slider has been selected, output it.
if ($slider_id) {
soliloquy($slider_id);
}
do_action('soliloquy_widget_after_slider', $args, $instance);
echo $after_widget;
do_action('soliloquy_widget_after_output', $args, $instance);
}
示例6: widget
/**
* widget function.
*
* @see WP_Widget
* @access public
* @param array $args
* @param array $instance
* @return void
*/
function widget($args, $instance)
{
if ($this->get_cached_widget($args)) {
return;
}
ob_start();
extract($args);
$slider = absint($instance['slider']);
$background = esc_url($instance['background']);
echo $before_widget;
if (function_exists('soliloquy_slider')) {
add_filter('soliloquy_output_before_image', array($this, 'soliloquy_output_before_image'), 10, 5);
add_filter('soliloquy_output_after_image', array($this, 'soliloquy_output_after_image'), 10, 5);
add_filter('soliloquy_output_before_caption', array($this, 'soliloquy_output_before_caption'), 10, 5);
add_filter('soliloquy_output_after_caption', array($this, 'soliloquy_output_after_image'), 10, 5);
add_filter('soliloquy_output_caption', array($this, 'soliloquy_output_caption'), 10, 5);
soliloquy($slider);
remove_filter('soliloquy_output_before_image', array($this, 'soliloquy_output_before_image'), 10, 5);
remove_filter('soliloquy_output_after_image', array($this, 'soliloquy_output_after_image'), 10, 5);
remove_filter('soliloquy_output_before_caption', array($this, 'soliloquy_output_before_caption'), 10, 5);
remove_filter('soliloquy_output_after_caption', array($this, 'soliloquy_output_after_image'), 10, 5);
remove_filter('soliloquy_output_caption', array($this, 'soliloquy_output_caption'), 10, 5);
}
?>
<style>
#<?php
echo $this->id;
?>
{ background-image: url(<?php
echo $background;
?>
); background-size: cover; }
</style>
<?php
echo $after_widget;
$content = apply_filters('jobify_widget_slider', ob_get_clean(), $instance, $args);
echo $content;
$this->cache_widget($args, $content);
}
示例7: uw_site_title
<div class="home uw-body">
<div class="row">
<div role='main' class="uw-content" >
<?php
uw_site_title();
?>
<div id='main_content' class="uw-body-copy" tabindex="-1">
<?php
if (function_exists('soliloquy')) {
soliloquy('14466');
}
?>
<div class="row">
<?php
get_template_part('quicklinks');
?>
</div>
<?php
// Start the Loop.
while (have_posts()) {
the_post();
示例8: one_blog_slider
function one_blog_slider()
{
if (is_front_page() && function_exists('soliloquy')) {
echo '
<div class="home-slider-container hidden-xs">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="home-slider">';
soliloquy('home-page-slider', 'slug');
echo '</div>
</div>
</div>
</div>
</div>
';
}
}
示例9: the_field
if (get_field('testimonial')) {
?>
<?php
the_field('testimonial');
?>
<?php
}
?>
</div>
</section>
<section id="bottom">
<div class="home-widgets-6 color-section widget-area">
<?php
if (function_exists('soliloquy')) {
soliloquy('376');
}
?>
</div>
</section>
<footer role="contentinfo">
<div id="footerbottom">
<div class="wrap">
<p class="copyright">Copyright <?php
echo date('Y');
?>
Detroit IT.</p>
</div>
</div>
示例10: soliloquy
?>
" >
<div class="input-group">
<input type="text" id="searchbox" class="form-control" placeholder="Search" name="s" id="s">
<div class="input-group-btn">
<button class="btn btn-default" id="searchsubmit" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
</div>-->
</div>
</div><!--end navbar-colapse-->
</nav>
</div>
<?php
//Muestra SLIDESHOW solo si es FRONT PAGE
if (is_front_page()) {
if (function_exists('soliloquy')) {
soliloquy('29');
}
}
?>
</header><!-- #masthead -->
<div id="content" class="site-content">
示例11: the_ID
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Red_Cedar_Theme
*/
?>
<article id="post-<?php
the_ID();
?>
" <?php
post_class();
?>
>
<?php
if (function_exists('soliloquy')) {
soliloquy('midwifery-services-slider', 'slug');
}
?>
<div class="entry-content">
<div class="row">
<h4><strong>Midwifery Services</strong></h4><br>
</div>
<div class="row">
<div class="midwifery small-12 large-4 columns">
<img src="/wp-content/uploads/2016/04/midwifery4.jpg" alt="Mother and Baby" width="400" height="600" />
</div>
<div class="labor small-12 large-8 columns">
<h5><strong>PRENATAL CARE</strong><br><p>Regular prenatal care includes monitoring the physical aspects of pregnancy as well as a time to learn about your changing body and the baby growing inside you. It is a time to get answers, discuss concerns, receive support, and prepare for giving birth. Partners and children are welcome and encouraged to participate in appointments.</p><br> <p>We value shared decision making and respect each family's right to make informed choices about the care they receive during pregnancy and birth. Making an informed choice allows families to take responsibility for decisions by considering all the options, risks and benefits. We support you making informed decisions by providing choices, information, and connecting you with resources.</h5></p>
</div>
</div>
示例12: the_ID
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Red_Cedar_Theme
*/
?>
<article id="post-<?php
the_ID();
?>
" <?php
post_class();
?>
>
<?php
if (function_exists('soliloquy')) {
soliloquy('doula-services-slider', 'slug');
}
?>
<div class="entry-content">
<div class="row">
<div class="doula services small-12 large-8 columns">
<h4>Doula Services</h4>
<h5><p>We all want a healthy mother and healthy baby. As your doula, our focus is on your specific goals and desires for this birth. At <strong><i>Red Cedar Birth</i></strong> we trust you to make the best choices about your body, your baby and your birth. You can expect your doula to provide information and education as well as affirm your priorities and preferences. We offer unbiased support and a policy of non-judgement, without agenda.<p>
Red Cedar Birth is a proud member of the <a class="community" href="http://www.willowtreefamily.com/lansing-doula-network">Lansing Doula Network</a>, and we have personally worked with the network to encourage a welcome and cohesive relationship between local doulas and hospital staff. Many of the providers in our area have been very open to deepening these relationships and we look forward to the positive impact this will have on our clients.<p>
<p><strong>Your doula team will:</strong></p>
<ul>
<li><strong>Be a personal resource</strong> during your pregnancy and postpartum. Your doula is here to provide you with answers to questions and additional information on a large variety of subjects, as well as to help navigate hospital policy and regional standards of care.</li><br>
<li><strong>Offer generous phone and email support</strong> as well as any professional referrals into the community as needed.</li><br>
<li><strong>Meet with you and your partner</strong> prenatally to discuss your birth goals, desires, and preferences.</li><br>
<li><strong>When you are ready</strong> for physical support, your doula will join you, at home or hospital, and remain with you until you and baby are settled in for quiet family time.</li><br>
示例13: get_header
<?php
/* Template Name: Homepage */
get_header();
?>
<!--==============================Section start=================================-->
<section>
<!--Slider Start-->
<?php
$avocation_soliloquy = get_theme_mod('avocation_soliloquy');
if (!empty($avocation_soliloquy)) {
if (function_exists('soliloquy')) {
soliloquy($avocation_soliloquy);
}
}
?>
<!--Slider End-->
<!--Purpose-Business Start-->
<div class="business-wrap">
<span class="mask-overlay"></span>
<div class="avocation-container container business-box">
<?php
$purpose_check = get_theme_mod('avocation_purposetitle');
if (!empty($purpose_check)) {
?>
<h2><?php
echo esc_attr(get_theme_mod('avocation_purposetitle', ''));
?>
示例14: get_header
<?php
/*
Template Name: Home Page
*/
get_header();
?>
<div class="slider">
<?php
if (function_exists('soliloquy')) {
soliloquy('1138');
}
?>
<div class="content cf">
</div><!-- .content -->
</div><!-- #zone1 -->
<?php
while (have_posts()) {
the_post();
?>
<div class="fullwidth">
<div class="content cf">
<?php
the_content();
?>
</div>
<?php
if ($_GET['admin'] == 't8-seo-check') {
echo '<div class="content cf">';
the_meta();
示例15: genesis_slider
function genesis_slider()
{
if (function_exists('soliloquy')) {
soliloquy('81');
}
if (function_exists('soliloquy')) {
soliloquy('81', 'slug');
}
// custom excerpt length
function custom_excerpt_length($length)
{
return 26;
}
add_filter('excerpt_length', 'custom_excerpt_length', 999);
//edit read more text
function new_excerpt_more($more)
{
return '… <div class="read-more"> <a href="' . get_permalink(get_the_ID()) . '"><br>Read On →</a></div>';
}
add_filter('excerpt_more', 'new_excerpt_more');
// create custom loop
function ycc_custom_loop()
{
global $post;
setup_postdata($post);
// create custom widget for school's introduction
genesis_widget_area('homemainwidget', array('before' => '<div class="homemainwidget">', 'after' => '</div>'));
// loop through posts to get 2 latest posts
global $post;
$args = array('posts_per_page' => 1, 'offset' => 0);
$myposts = get_posts($args);
foreach ($myposts as $post) {
setup_postdata($post);
?>
<div class="news">
<h2>News</h2>
<div class="one-half first">
<li><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a><p><?php
the_excerpt();
?>
</p></li>
</div>
<?php
}
wp_reset_postdata();
$args = array('posts_per_page' => 1, 'offset' => 1);
$myposts = get_posts($args);
foreach ($myposts as $post) {
setup_postdata($post);
?>
<div class="one-half">
<li><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a><p><?php
the_excerpt();
?>
</p></li>
</div>
<?php
}
wp_reset_postdata();
?>
</div>
<div class="one-half first">
<h2>Gallery</h2>
<img src="http://www.cominscoch.ceredigion.sch.uk/wp/wp-content/uploads/IMG_1789.jpg" alt="">
</div>
<div class="one-half">
Twitter Feed
</div>
<?php
}
}