Skip to content
Permalink
Browse files

Cleaner custom block register template

  • Loading branch information
Jaska committed Aug 29, 2019
1 parent 4520062 commit c5c7428db7ffefb95a6aef9fcf35344cf12c92f7
Showing with 17 additions and 43 deletions.
  1. +17 −43 inc/_conf/register-custom-blocks.php
@@ -2,52 +2,26 @@
/**
* REMEMBER TO ALSO ADD CUSTOM BLOCKS TO register-blocks.php
* etc: acf/nostoblokki
*
* Täältä ikonit
* https://developer.wordpress.org/resource/dashicons/#excerpt-view
*
* Pastellivärit jees, esim:
* azure
* lavender
* Cornsilk > Ivory
* Honeydew
* Linen > Seashell
* https://www.advancedcustomfields.com/resources/acf_register_block_type/
*/
// add_action('acf/init', 'register_custom_blocks', 11, 2);
add_action('acf/init', 'register_custom_blocks', 11, 2);
// function register_custom_blocks() {
function register_custom_blocks() {
// if( function_exists('acf_register_block') ) {
if( function_exists('acf_register_block') ) {
// acf_register_block_type(array(
// 'name' => 'nostoblokki',
// 'title' => __('Nostoblokki'),
// // 'description' => __('A custom testimonial block.'),
// 'render_template' => 'partials/content/nosto.php',
// 'category' => 'formatting',
// 'icon' => array('background' => 'lavender', 'src' => 'nametag'),
// ));
// The core provided categories are [ common | formatting | layout | widgets | embed ]
// https://developer.wordpress.org/resource/dashicons/#layout
// example colors: azure, lavender, Ivory, Honeydew, Seashell
// acf_register_block_type(array(
// 'name' => 'review',
// 'title' => __('Arvostelu'),
// // 'description' => __('A custom testimonial block.'),
// 'render_template' => 'partials/content/review.php',
// 'category' => 'widgets',
// 'icon' => array('background' => 'azure', 'src' => 'star-filled'),
// ));
// acf_register_block_type(array(
// 'name' => 'exampleblock',
// 'title' => __('Name of the block'),
// 'description' => __('A custom testimonial block.'),
// 'render_template' => 'partials/content/nosto.php',
// 'category' => 'formatting',
// 'icon' => array('background' => 'lavender', 'src' => 'nametag'),
// ));
// acf_register_block(array(
// 'name' => 'sivulista',
// 'title' => __('Sivulista'),
// 'description' => __('Luo 3 uusinta uutista, listaa kategorian mukaan sisältöjä…'),
// 'render_template' => 'partials/content/sivulista.php',
// 'category' => 'formatting',
// // 'icon' => 'admin-comments',
// 'mode' => 'edit',
// 'icon' => array('background' => 'linen', 'src' => 'excerpt-view'),
// //'keywords' => array( 'testimonial', 'quote' ),
// ));
// }
// }
}
}

0 comments on commit c5c7428

Please sign in to comment.
You can’t perform that action at this time.