本文整理汇总了PHP中RevSliderNavigation::translate_navigation方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderNavigation::translate_navigation方法的具体用法?PHP RevSliderNavigation::translate_navigation怎么用?PHP RevSliderNavigation::translate_navigation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderNavigation
的用法示例。
在下文中一共展示了RevSliderNavigation::translate_navigation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: putJS
//.........这里部分代码省略.........
echo ' touchenabled:"' . esc_attr($touch_enabled) . '",' . "\n";
echo ' swipe_threshold: ' . esc_attr($swipe_velocity) . ',' . "\n";
echo ' swipe_min_touches: ' . esc_attr($swipe_min_touches) . ',' . "\n";
echo ' swipe_direction: "' . esc_attr($swipe_direction) . '",' . "\n";
echo ' drag_block_vertical: ';
echo $drag_block_vertical == 'true' ? 'true' : 'false';
echo "\n";
echo ' }' . "\n";
}
if ($enable_arrows == 'on') {
$navigation_arrow_style = $this->slider->getParam('navigation_arrow_style', 'round');
$arrows_always_on = $this->slider->getParam('arrows_always_on', 'true') == 'true' ? 'true' : 'false';
$hide_arrows_on_mobile = $this->slider->getParam('hide_arrows_on_mobile', 'off') == 'on' ? 'true' : 'false';
$hide_arrows_over = $this->slider->getParam('hide_arrows_over', 'off') == 'on' ? 'true' : 'false';
$arr_tmp = '';
$ff = false;
if (!empty($all_navs)) {
foreach ($all_navs as $cur_nav) {
if ($cur_nav['handle'] == $navigation_arrow_style) {
if (isset($cur_nav['markup']['arrows'])) {
$arr_tmp = $cur_nav['markup']['arrows'];
}
if (isset($cur_nav['css']['arrows'])) {
$nav_css .= $rs_nav->add_placeholder_modifications($cur_nav['css']['arrows'], $cur_nav['handle'], 'arrows', $cur_nav['settings'], $this->slider, $this) . "\n";
}
$ff = true;
break;
}
}
}
if ($ff == false) {
$navigation_arrow_style = '';
}
$navigation_arrow_style = $rs_nav->translate_navigation($navigation_arrow_style);
if ($add_comma) {
echo ' ,' . "\n";
}
$add_comma = true;
echo ' arrows: {' . "\n";
echo ' style:"' . esc_attr($navigation_arrow_style) . '",' . "\n";
echo ' enable:';
echo $this->slider->getParam('enable_arrows', 'off') == 'on' ? 'true' : 'false';
echo ',' . "\n";
echo $this->slider->getParam('rtl_arrows', 'off') == 'on' ? ' rtl:true,' . "\n" : '';
echo ' hide_onmobile:' . $hide_arrows_on_mobile . ',' . "\n";
if ($hide_arrows_on_mobile === 'true') {
echo ' hide_under:' . esc_attr($this->slider->getParam('arrows_under_hidden', '0', RevSlider::FORCE_NUMERIC)) . ',' . "\n";
}
if ($hide_arrows_over === 'true') {
echo ' hide_over:' . esc_attr($this->slider->getParam('arrows_over_hidden', '0', RevSlider::FORCE_NUMERIC)) . ',' . "\n";
}
echo ' hide_onleave:' . $arrows_always_on . ',' . "\n";
if ($arrows_always_on === 'true') {
echo ' hide_delay:' . esc_attr($this->slider->getParam('hide_arrows', '200', RevSlider::FORCE_NUMERIC)) . ',' . "\n";
echo ' hide_delay_mobile:' . esc_attr($this->slider->getParam('hide_arrows_mobile', '1200', RevSlider::FORCE_NUMERIC)) . ',' . "\n";
}
echo ' tmp:\'';
echo preg_replace("/\r|\n/", "", $arr_tmp);
echo '\',' . "\n";
echo ' left: {' . "\n";
echo in_array($this->slider->getParam('leftarrow_position', 'slider'), array('layergrid', 'grid')) ? ' container:"layergrid",' . "\n" : '';
echo ' h_align:"' . esc_attr($this->slider->getParam('leftarrow_align_hor', 'left')) . '",' . "\n";
echo ' v_align:"' . esc_attr($this->slider->getParam('leftarrow_align_vert', 'center')) . '",' . "\n";
echo ' h_offset:' . esc_attr($this->slider->getParam('leftarrow_offset_hor', '20', RevSlider::FORCE_NUMERIC)) . ',' . "\n";
echo ' v_offset:' . esc_attr($this->slider->getParam('leftarrow_offset_vert', '0', RevSlider::FORCE_NUMERIC)) . "\n";
echo ' },' . "\n";