本文整理汇总了PHP中vc_camel_case函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_camel_case函数的具体用法?PHP vc_camel_case怎么用?PHP vc_camel_case使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_camel_case函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getColumnControls
/**
* @param $controls
* @param string $extended_css
*
* @return string
*/
public function getColumnControls($controls, $extended_css = '')
{
$output = '<div class="vc_controls vc_control-column vc_controls-visible controls' . (!empty($extended_css) ? " {$extended_css}" : '') . '">';
$controls_end = '</div>';
if ($extended_css == 'bottom-controls') {
$control_title = __('Append to this column', 'js_composer');
} else {
$control_title = __('Prepend to this column', 'js_composer');
}
$controls_add = ' <a class="vc_control column_add vc_column-add" data-vc-control="add" href="#" title="' . $control_title . '"><i class="vc_icon"></i></a>';
$controls_edit = ' <a class="vc_control column_edit vc_column-edit" data-vc-control="edit" href="#" title="' . __('Edit this column', 'js_composer') . '"><i class="vc_icon"></i></a>';
$controls_delete = ' <a class="vc_control column_delete vc_column-delete" data-vc-control="delete" href="#" title="' . __('Delete this column', 'js_composer') . '"><i class="vc_icon"></i></a>';
if (is_array($controls) && !empty($controls)) {
foreach ($controls as $control) {
$method_name = vc_camel_case('output-editor-control-' . $control);
if (method_exists($this, $method_name)) {
$output .= $this->{$method_name}();
} else {
$control_var = 'controls_' . $control;
$output .= ${$control_var};
}
}
return $output . $controls_end;
} elseif (is_string($controls) && 'full' === $controls) {
return $output . $controls_add . $controls_edit . $controls_delete . $controls_end;
} elseif (is_string($controls)) {
$control_var = 'controls_' . $controls;
if (isset(${$control_var})) {
return $output . ${$control_var} . $controls_end;
}
}
return $output . $controls_add . $controls_edit . $controls_delete . $controls_end;
}
示例2: renderPagination
/**
* @param $grid_style
* @param $settings
* @param string $content
*
* @param string $css_class
*
* @return string
*/
public function renderPagination($grid_style, $settings, $content = '', $css_class = '')
{
$css_class .= empty($css_class) ? '' : ' ' . 'vc_pageable-wrapper vc_hook_hover';
$content_method = vc_camel_case('content-' . $grid_style);
$content = method_exists($this, $content_method) ? $this->{$content_method}($grid_style, $settings, $content) : $content;
$output = '<div class="' . esc_attr($css_class) . '" data-vc-pageable-content="true">' . $content . '</div>';
return $output;
}
示例3: getColumnControls
/**
* @param $controls
* @param string $extended_css
*
* @return string
*/
public function getColumnControls($controls, $extended_css = '')
{
$output = '<div class="vc_controls vc_control-column vc_controls-visible controls' . (!empty($extended_css) ? " {$extended_css}" : '') . '">';
$controls_end = '</div>';
if (' bottom-controls' === $extended_css) {
$control_title = __('Append to this column', 'js_composer');
} else {
$control_title = __('Prepend to this column', 'js_composer');
}
if (vc_user_access()->part('shortcodes')->checkStateAny(true, 'custom', null)->get()) {
$controls_add = '<a class="vc_control column_add vc_column-add" data-vc-control="add" href="#" title="' . $control_title . '"><i class="vc_icon"></i></a>';
} else {
$controls_add = '';
}
$controls_edit = '<a class="vc_control column_edit vc_column-edit" data-vc-control="edit" href="#" title="' . __('Edit this column', 'js_composer') . '"><i class="vc_icon"></i></a>';
$controls_delete = '<a class="vc_control column_delete vc_column-delete" data-vc-control="delete" href="#" title="' . __('Delete this column', 'js_composer') . '"><i class="vc_icon"></i></a>';
$editAccess = vc_user_access_check_shortcode_edit($this->shortcode);
$allAccess = vc_user_access_check_shortcode_all($this->shortcode);
if (is_array($controls) && !empty($controls)) {
foreach ($controls as $control) {
if ('add' === $control || $editAccess && 'edit' === $control || $allAccess) {
$method_name = vc_camel_case('output-editor-control-' . $control);
if (method_exists($this, $method_name)) {
$output .= $this->{$method_name}();
} else {
$control_var = 'controls_' . $control;
if (isset(${$control_var})) {
$output .= ${$control_var};
}
}
}
}
return $output . $controls_end;
} elseif (is_string($controls) && 'full' === $controls) {
if ($allAccess) {
return $output . $controls_add . $controls_edit . $controls_delete . $controls_end;
} elseif ($editAccess) {
return $output . $controls_add . $controls_edit . $controls_end;
} else {
return $output . $controls_add . $controls_end;
}
return $output . $controls_end;
} elseif (is_string($controls)) {
$control_var = 'controls_' . $controls;
if ('add' === $controls || ($editAccess && 'edit' == $controls || $allAccess) && isset(${$control_var})) {
return $output . ${$control_var} . $controls_end;
}
return $output . $controls_end;
}
if ($allAccess) {
return $output . $controls_add . $controls_edit . $controls_delete . $controls_end;
} elseif ($editAccess) {
return $output . $controls_add . $controls_edit . $controls_end;
} else {
return $output . $controls_add . $controls_end;
}
return $output . $controls_end;
}
示例4: getControls
/**
* Generate array of controls by iterating property $controls list.
* vc_filter: vc_nav_controls - hook to override list of controls
* @return array - list of arrays witch contains key name and html output for button.
*/
public function getControls()
{
$list = array();
foreach ($this->controls as $control) {
$method = vc_camel_case('get_control_' . $control);
if (method_exists($this, $method)) {
$list[] = array($control, $this->{$method}() . "\n");
}
}
return apply_filters($this->controls_filter_name, $list);
}
示例5: setShortcodes
/**
* Set elements templates.
*/
protected function setShortcodes()
{
foreach ($this->shortcodes as $tag) {
add_shortcode($tag, array($this, vc_camel_case($tag . '_shortcode')));
}
}
示例6: array
<?php
/**
* @deprecated 4.4 due to autoload logic
*/
// Here comes the list of vendors
$vendors_list = array();
// default prefix for auto loaded class
$vendor_class_prefix = 'plugins/class-vc-vendor-';
if (!empty($vendors_list)) {
foreach ($vendors_list as $vendor_name) {
$vendor_file = vc_path_dir('VENDORS_DIR', $vendor_class_prefix . $vendor_name . '.php');
require_once $vendor_file;
$vendor_class_name = 'Vc_Vendor_' . vc_camel_case($vendor_name);
vc_add_vendor(new $vendor_class_name());
}
}