Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PHP:
- $variations[] = array(
- 'name' => 'damien-update-info',
- 'title' => 'Update Info',
- 'icon' => 'book-alt',
- 'attributes' => array( 'className' => 'is-style-group-info' ),
- 'innerBlocks' => array(
- array( 'core/paragraph', array( 'content' => '<strong>' . $date->format('j F Y') . '</strong>: information about the update ...', ) ),
- ),
- );
- JS:
- wp.blocks.registerBlockVariation(
- 'core/group',
- {
- name: 'dcwd-group-update',
- title: 'Update info',
- attributes: {
- className: 'is-style-group-info',
- },
- innerBlocks: [
- [
- 'core/paragraph',
- {
- content: '<strong>' + new Date().toLocaleDateString('en-us', { year:"numeric", month:"long", day:"numeric"}) + '</strong>: Info about update...',
- }
- ],
- ],
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement