$layout_loaded
$layout_loaded : boolean
Content_wrapper should be called twice, so this says if it is loading for first time, or if it is already loaded
GE_Block_Wrapper is our "Una Matina". Imagine factory making houses for little elements.
That's what this does. It wraps elements into wrappers, so they can be edited. NICE.
content_wrapper(string $html) : string
Content filter for GoldenEgg page. It's used to add our own HTML codes to layout, so we can style it as We WANT! Origins of this function comes from ancient GoldenEgg Theme, which even didn't know what Gutenberg is and how he acts.
Thus this is heart of GoldenEgg, thank him in advance. (This function replaces Gutenberg do_blocks hook, but we use it in this function, thus it is save to use)
| string | $html | Page (HTML) content supplied by Wordpress |
Page (HTML) content supplied to Wordpress
wrap_block(array $block, string $wrapper_html) : string
Wraps block with wrapper. If is full_column, don't wrap it. If is wide_column, wrap it half way.
Wriggity wrapitty wrap.
| array | $block | Block (in array) parsed by Gutenberg native parser |
| string | $wrapper_html | Html of main wrapper |
Return content of block
detect_block_wrapper(string $block_content, string $wrapper_attributes, string $editbutton_html, string $block_class) : array
Detects, if has block wrapper. If so, place our wrapper into this, so we save some problems with their wrappers.
| string | $block_content | Raw block html |
| string | $wrapper_attributes | Wrapper attributes |
| string | $editbutton_html | Edit button html code |
| string | $block_class | Wrapper class |
Array with 'wrap_block' (bool) and 'raw_content' (string)
do_special_block(string $name, array $arguments = array()) : string
Does special magic with PHP rendered blocks. Firstly it rebuilds Gutenberg code of this block and then it runs Gutenberg functions to render them.
| string | $name | Block name (e.g. core/latest-posts) |
| array | $arguments | Array of attributes of that block |
HTML code of this block, generated by PHP
do_goldenegg_wrapping(string $html) : string
Very tricks function. This one wraps (GoldenEggifies) every block in its own way.
It has own array for adding more wrapping options, feel free to expand him.
| string | $html | HTML of one particular block |
GoldenEggified block html