本文整理汇总了PHP中vc_parse_multi_attribute函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_parse_multi_attribute函数的具体用法?PHP vc_parse_multi_attribute怎么用?PHP vc_parse_multi_attribute使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_parse_multi_attribute函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _vc_google_fonts_parse_attributes
/**
* @param $attr
* @param $value
*
* @since 4.3
* @return array
*/
public function _vc_google_fonts_parse_attributes($attr, $value)
{
$fields = array();
if (is_array($attr) && !empty($attr)) {
foreach ($attr as $key => $val) {
if (is_numeric($key)) {
$fields[$val] = '';
} else {
$fields[$key] = $val;
}
}
}
$values = vc_parse_multi_attribute($value, array('font_family' => isset($fields['font_family']) ? $fields['font_family'] : '', 'font_style' => isset($fields['font_style']) ? $fields['font_style'] : '', 'font_family_description' => isset($fields['font_family_description']) ? $fields['font_family_description'] : '', 'font_style_description' => isset($fields['font_style_description']) ? $fields['font_style_description'] : ''));
return array('fields' => $fields, 'values' => $values);
}
开发者ID:AlchemyMomentum,项目名称:public_html,代码行数:22,代码来源:google_fonts.php
示例2: vcex_parse_typography_param
/**
* Parses the font_control / typography param
*
* @since 2.0.0
*/
function vcex_parse_typography_param($value)
{
// Conter value to array
$value = vc_parse_multi_attribute($value);
// Define defaults
$defaults = array('tag' => '', 'text_align' => '', 'font_size' => '', 'line_height' => '', 'color' => '', 'font_style_italic' => '', 'font_style_bold' => '', 'font_family' => '', 'letter_spacing' => '', 'font_family' => '');
// Parse values so keys exist
$values = wp_parse_args($value, $defaults);
// Return values
return $values;
}
开发者ID:iq007,项目名称:MadScape,代码行数:16,代码来源:vc-helpers.php
示例3: vc_build_link
/**
* @param $value
*
* @since 4.2
* @return array
*/
function vc_build_link($value)
{
return vc_parse_multi_attribute($value, array('url' => '', 'title' => '', 'target' => ''));
}
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:10,代码来源:vc_link.php
示例4: _vc_font_container_parse_attributes
/**
* @param $attr
* @param $value
*
* @return array
*/
public function _vc_font_container_parse_attributes($attr, $value)
{
$fields = array();
if (isset($attr)) {
foreach ($attr as $key => $val) {
if (is_numeric($key)) {
$fields[$val] = "";
} else {
$fields[$key] = $val;
}
}
}
$values = vc_parse_multi_attribute($value, array('tag' => isset($fields['tag']) ? $fields['tag'] : 'h2', 'font_size' => isset($fields['font_size']) ? $fields['font_size'] : '', 'font_style_italic' => isset($fields['font_style_italic']) ? $fields['font_style_italic'] : '', 'font_style_bold' => isset($fields['font_style_bold']) ? $fields['font_style_bold'] : '', 'font_family' => isset($fields['font_family']) ? $fields['font_family'] : '', 'color' => isset($fields['color']) ? $fields['color'] : '', 'line_height' => isset($fields['line_height']) ? $fields['line_height'] : '', 'text_align' => isset($fields['text_align']) ? $fields['text_align'] : 'left', 'tag_description' => isset($fields['tag_description']) ? $fields['tag_description'] : '', 'font_size_description' => isset($fields['font_size_description']) ? $fields['font_size_description'] : '', 'font_style_description' => isset($fields['font_style_description']) ? $fields['font_style_description'] : '', 'font_family_description' => isset($fields['font_family_description']) ? $fields['font_family_description'] : '', 'color_description' => isset($fields['color_description']) ? $fields['color_description'] : 'left', 'line_height_description' => isset($fields['line_height_description']) ? $fields['line_height_description'] : '', 'text_align_description' => isset($fields['text_align_description']) ? $fields['text_align_description'] : ''));
return array('fields' => $fields, 'values' => $values);
}
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:21,代码来源:font_container.php
注:本文中的vc_parse_multi_attribute函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论