Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) {
- $meta_boxes[] = [
- 'title' => 'Circle Image and Text',
- 'id' => 'circle-image-text',
- 'description' => 'Two column circle gradient and text with button',
- 'type' => 'block',
- 'icon' => 'awards',
- 'category' => 'layout',
- 'context' => 'side',
- 'render_template' => get_template_directory() . '/blocks/templates/circle-image-text.php',
- 'supports' => [
- 'align' => true,
- ],
- 'fields' => [
- [
- 'id' => 'left-image',
- 'name' => 'Left Column Image',
- 'type' => 'single_image'
- ],
- [
- 'type' => 'textarea',
- 'name' => 'right-text',
- 'name' => 'Right Column text'
- ],
- [
- 'type' => 'textarea',
- 'name' => 'right-text',
- 'name' => 'Right Column text'
- ],
- [
- 'type' => 'text',
- 'name' => 'button-text',
- 'name' => 'Button Text'
- ],
- [
- 'type' => 'textarea',
- 'name' => 'button-link',
- 'name' => 'Button Link'
- ]
- ],
- ];
- return $meta_boxes;
- });`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement