本文整理汇总了PHP中Fields::gallery方法的典型用法代码示例。如果您正苦于以下问题:PHP Fields::gallery方法的具体用法?PHP Fields::gallery怎么用?PHP Fields::gallery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fields
的用法示例。
在下文中一共展示了Fields::gallery方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gallery
/**
*
* Layout: Gallery
*
* @author Michael W. Delaney
* @since 1.0
*
* Image gallery layout
*/
function gallery()
{
$FCBFields = new Fields(__FUNCTION__);
$FCBRepeaters = new Repeaters(__FUNCTION__);
$FCBFlexibleContent = new FlexibleContent(__FUNCTION__);
return array('order' => '70', 'layout' => array('key' => $this->key . __FUNCTION__, 'name' => 'gallery', 'label' => 'Gallery', 'display' => 'block', 'sub_fields' => array($FCBFields->title(), $FCBFields->navigation_title(), $FCBFields->tab_content(), $FCBFields->content(), $FCBRepeaters->content_data_attributes(), $FCBFields->tab_gallery(), $FCBFields->gallery(), $FCBFields->tab_background(), $FCBFields->background_image(), $FCBFields->background_color(), $FCBFields->background_color_placeholder(), $FCBFields->theme_color(), $FCBFields->choose_color(), $FCBFields->tab_cta(), $FCBFlexibleContent->cta(), $FCBFields->tab_dev(), $FCBFields->dev_block_message(), $FCBRepeaters->block_data_attributes(), $FCBFields->block_classes(), $FCBFields->tab_endpoint())));
}
示例2: media
/**
*
* Flexible Content: Media
*
* @author Michael W. Delaney
* @since 1.0
*
* Flexible Content field for Calls to Action
*/
function media($min = 0, $max = 1, $thisKey = 'flexible')
{
$FCBFlexibleContentFields = new Fields($this->layout, __FUNCTION__);
return array('key' => $this->key . $thisKey . '-' . $this->getCallingFunctionName() . __FUNCTION__, 'label' => 'Media', 'name' => 'media', 'type' => 'flexible_content', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => 'acf-media', 'id' => ''), 'min' => $min, 'max' => $max, 'button_label' => 'Add Media', 'layouts' => array(array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-image', 'name' => 'image', 'label' => 'Image', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->media_image())), array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-video', 'name' => 'video', 'label' => 'Video', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->media_video())), array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-gallery', 'name' => 'gallery', 'label' => 'Gallery', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->gallery())), array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-content', 'name' => 'content', 'label' => 'Content', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->media_content())), array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-code', 'name' => 'code', 'label' => 'Code', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->media_code())), array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-map', 'name' => 'map', 'label' => 'Map', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->media_map()))));
}