本文整理汇总了PHP中RevSlider::isAliasExists方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSlider::isAliasExists方法的具体用法?PHP RevSlider::isAliasExists怎么用?PHP RevSlider::isAliasExists使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSlider
的用法示例。
在下文中一共展示了RevSlider::isAliasExists方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jeg_import_revolution
function jeg_import_revolution()
{
/** first delete the slider */
$slider = new RevSlider();
global $_FILES;
$sliderpaths = array();
if (!$slider->isAliasExists('santaicon')) {
$sliderpaths[] = get_template_directory() . '/admin/import/data/santaicon.zip';
}
if (!$slider->isAliasExists('slider1')) {
$sliderpaths[] = get_template_directory() . '/admin/import/data/slider1.zip';
}
if (!$slider->isAliasExists('resto')) {
$sliderpaths[] = get_template_directory() . '/admin/import/data/resto.zip';
}
ob_start();
if ($sliderpaths) {
foreach ($sliderpaths as $sliderpath) {
$_FILES["import_file"]["tmp_name"] = $sliderpath;
$slider->importSliderFromPost(false, false);
}
}
ob_end_clean();
}
示例2: checkRevSliderExists
/**
*
* put rev slider on the page.
* the data can be slider ID or slider alias.
*/
function checkRevSliderExists($alias)
{
$rev = new RevSlider();
return $rev->isAliasExists($alias);
}
示例3: mango_taxonomy_banner
function mango_taxonomy_banner()
{
if (is_tax(array('product_cat', 'product_tag', 'portfolio-category', 'faq-category')) || is_category() || is_tag()) {
$tax_id = get_queried_object_id();
$tax_data = get_option('tax_meta_' . $tax_id);
ob_start();
$tax_data = get_option('tax_meta_' . $tax_id);
$banner_type = isset($tax_data['mango_taxonomy_banner_type']) && $tax_data['mango_taxonomy_banner_type'] ? $tax_data['mango_taxonomy_banner_type'] : '';
if ($banner_type) {
echo "<div class='mango_banner'>";
if ($banner_type == 'video') {
$video_embed = isset($tax_data['mango_taxonomy_banner_video']) && $tax_data['mango_taxonomy_banner_video'] ? $tax_data['mango_taxonomy_banner_video'] : '';
if ($video_embed) {
// entry-media
echo '<div class="embed-responsive embed-responsive-16by9">';
echo wp_oembed_get($video_embed);
echo '</div>';
}
} elseif ($banner_type == 'image') {
$app_gallery = isset($tax_data['mango_taxonomy_banner_image']) && $tax_data['mango_taxonomy_banner_image'] ? $tax_data['mango_taxonomy_banner_image'] : '';
if ($app_gallery) {
$img_src = wp_get_attachment_image_src($app_gallery['id'], 'full');
echo '<img src="' . esc_url($img_src[0]) . '" class="img-responsive" alt="">';
}
} elseif ($banner_type == 'rev_slider') {
if (shortcode_exists('rev_slider') || function_exists('rev_slider')) {
$rev_slider = isset($tax_data['mango_taxonomy_banner_rev_slider']) && $tax_data['mango_taxonomy_banner_rev_slider'] ? $tax_data['mango_taxonomy_banner_rev_slider'] : '';
if ($rev_slider && RevSlider::isAliasExists($rev_slider)) {
echo do_shortcode('[rev_slider "' . $rev_slider . '"]');
}
}
} elseif ($banner_type == 'custom_banner') {
$custom_banner = isset($tax_data['mango_taxonomy_banner_custom']) && $tax_data['mango_taxonomy_banner_custom'] ? $tax_data['mango_taxonomy_banner_custom'] : '';
if ($custom_banner) {
echo do_shortcode($custom_banner);
}
}
echo "</div>";
}
echo ob_get_clean();
//wrap the banner in a div with class mango_banner
}
}