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


PHP vc_camel_case函數代碼示例

本文整理匯總了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;
 }
開發者ID:chicosilva,項目名稱:olharambiental,代碼行數:39,代碼來源:vc-column.php

示例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;
 }
開發者ID:VitaAprel,項目名稱:mynotebook,代碼行數:17,代碼來源:class-vc-pageable.php

示例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;
 }
開發者ID:hikaram,項目名稱:wee,代碼行數:64,代碼來源:vc-column.php

示例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);
 }
開發者ID:hikaram,項目名稱:wee,代碼行數:16,代碼來源:class-vc-navbar.php

示例5: setShortcodes

 /**
  * Set elements templates.
  */
 protected function setShortcodes()
 {
     foreach ($this->shortcodes as $tag) {
         add_shortcode($tag, array($this, vc_camel_case($tag . '_shortcode')));
     }
 }
開發者ID:evanbuss,項目名稱:wordpress,代碼行數:9,代碼來源:vc_grid_element.php

示例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());
    }
}
開發者ID:Sibzsolutions,項目名稱:Schiffrinpa,代碼行數:17,代碼來源:_autoload.php


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