當前位置: 首頁>>代碼示例>>PHP>>正文


PHP RevSliderNavigation::add_placeholder_sub_modifications方法代碼示例

本文整理匯總了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 -->';
                }
            }
        }
    }
開發者ID:surreal8,項目名稱:wptheme,代碼行數:61,代碼來源:output.class.php


注:本文中的RevSliderNavigation::add_placeholder_sub_modifications方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。