本文整理汇总了PHP中RevSliderNavigation::add_placeholder_sub_modifications方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderNavigation::add_placeholder_sub_modifications方法的具体用法?PHP RevSliderNavigation::add_placeholder_sub_modifications怎么用?PHP RevSliderNavigation::add_placeholder_sub_modifications使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderNavigation
的用法示例。
在下文中一共展示了RevSliderNavigation::add_placeholder_sub_modifications方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_custom_navigation_css
public function add_custom_navigation_css($slides)
{
$rs_nav = new RevSliderNavigation();
$all_navs = $rs_nav->get_all_navigations();
$slider_type = $this->slider->getParam('slider-type');
$enable_arrows = $this->slider->getParam('enable_arrows', 'off');
$enable_bullets = $this->slider->getParam('enable_bullets', 'off');
$enable_tabs = $this->slider->getParam('enable_tabs', 'off');
$enable_thumbnails = $this->slider->getParam('enable_thumbnails', 'off');
if ($slider_type !== 'hero' && ($enable_arrows == 'on' || $enable_bullets == 'on' || $enable_tabs == 'on' || $enable_thumbnails == 'on')) {
if (!empty($slides)) {
foreach ($slides as $slide) {
$navigation_arrow_style = $this->slider->getParam('navigation_arrow_style', 'round');
$navigation_bullets_style = $this->slider->getParam('navigation_bullets_style', 'round');
$tabs_style = $this->slider->getParam('tabs_style', 'round');
$thumbnails_style = $this->slider->getParam('thumbnails_style', 'round');
if (!empty($all_navs)) {
foreach ($all_navs as $cur_nav) {
//get modifications out, wrap the class with slide class to be specific
if ($enable_arrows == 'on' && $cur_nav['handle'] == $navigation_arrow_style) {
$this->rev_custom_navigation_css .= $rs_nav->add_placeholder_sub_modifications($cur_nav['css']['arrows'], $cur_nav['handle'], 'arrows', $cur_nav['settings'], $slide, $this) . "\n";
}
if ($enable_bullets == 'on' && $cur_nav['handle'] == $navigation_bullets_style) {
$this->rev_custom_navigation_css .= $rs_nav->add_placeholder_sub_modifications($cur_nav['css']['bullets'], $cur_nav['handle'], 'bullets', $cur_nav['settings'], $slide, $this) . "\n";
}
if ($enable_tabs == 'on' && $cur_nav['handle'] == $tabs_style) {
$this->rev_custom_navigation_css .= $rs_nav->add_placeholder_sub_modifications($cur_nav['css']['tabs'], $cur_nav['handle'], 'tabs', $cur_nav['settings'], $slide, $this) . "\n";
}
if ($enable_thumbnails == 'on' && $cur_nav['handle'] == $thumbnails_style) {
$this->rev_custom_navigation_css .= $rs_nav->add_placeholder_sub_modifications($cur_nav['css']['thumbs'], $cur_nav['handle'], 'thumbs', $cur_nav['settings'], $slide, $this) . "\n";
}
}
}
}
if ($this->markup_export === true) {
echo '<!-- STYLE -->';
}
if (!is_admin()) {
echo '<script>var htmlDiv = document.getElementById("rs-plugin-settings-inline-css"); var htmlDivCss="';
} else {
echo "<style>";
}
if (!is_admin()) {
echo addslashes(RevSliderCssParser::compress_css($this->rev_custom_navigation_css)) . '";
if(htmlDiv) {
htmlDiv.innerHTML = htmlDiv.innerHTML + htmlDivCss;
}else{
var htmlDiv = document.createElement("div");
htmlDiv.innerHTML = "<style>" + htmlDivCss + "</style>";
document.getElementsByTagName("head")[0].appendChild(htmlDiv.childNodes[0]);
}
</script>' . "\n";
} else {
echo $this->rev_custom_navigation_css . '</style>';
}
if ($this->markup_export === true) {
echo '<!-- /STYLE -->';
}
}
}
}