| 1 |
<?php |
| 2 |
/** |
| 3 |
* Register layouts and sections for the Layout block. |
| 4 |
* |
| 5 |
* @package Blockspare |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace Blockspare\Layouts; |
| 9 |
include BLOCKSPARE_PLUGIN_DIR .'inc/template-library/init.php'; |
| 10 |
add_action( 'plugins_loaded', __NAMESPACE__ . '\register_components', 11 ); |
| 11 |
/** |
| 12 |
* Registers section and layout components. |
| 13 |
* |
| 14 |
* @since 2.0 |
| 15 |
*/ |
| 16 |
function register_components() { |
| 17 |
$blocks_lists = array(); |
| 18 |
|
| 19 |
$templates = apply_filters( 'blockspare_template_library', $blocks_lists ); |
| 20 |
|
| 21 |
if(!empty($templates)){ |
| 22 |
foreach($templates as $temp){ |
| 23 |
blockspare_register_layout_component($temp); |
| 24 |
} |
| 25 |
} |
| 26 |
|
| 27 |
} |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|