26 lines
799 B
PHP
26 lines
799 B
PHP
<?php
|
|
|
|
function homegrade_content_blocks_register_template()
|
|
{
|
|
write_log(get_post_types([], 'names'));
|
|
|
|
// $post_type_object = get_post_type_object('conseils');
|
|
// $post_type_object->template_lock = 'insert';
|
|
// $post_type_object->template = array(
|
|
// array('core/paragraph', array(
|
|
// 'placeholder' => 'Add Description...',
|
|
// )),
|
|
// );
|
|
}
|
|
// add_action('init', 'homegrade_content_blocks_register_template');
|
|
|
|
function filter_block_editor_settings_when_post_provided($editor_settings, $editor_context)
|
|
{
|
|
// echo '<pre style="position: relative; background:#fff; z-index:1000;">';
|
|
// print_r($editor_settings);
|
|
// echo '</pre>';
|
|
return $editor_settings;
|
|
}
|
|
|
|
// add_filter('block_editor_settings_all', 'filter_block_editor_settings_when_post_provided', 10, 2);
|