Hides old items gutenberg block.
This commit is contained in:
parent
6f3049bed0
commit
1bf51b4498
|
@ -257,7 +257,8 @@
|
|||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item a,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item a {
|
||||
color: #454647;
|
||||
font-weight: bold; }
|
||||
font-weight: bold;
|
||||
line-height: 2rem; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item img {
|
||||
height: auto;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,7 +13,7 @@ function tainacan_blocks_initialize() {
|
|||
}
|
||||
|
||||
function tainacan_blocks_add_gutenberg_blocks_actions() {
|
||||
add_action('init', 'tainacan_blocks_register_tainacan_items_grid');
|
||||
// add_action('init', 'tainacan_blocks_register_tainacan_items_grid');
|
||||
add_action('init', 'tainacan_blocks_register_tainacan_terms_list');
|
||||
add_action('init', 'tainacan_blocks_register_tainacan_items_list');
|
||||
|
||||
|
@ -49,28 +49,28 @@ function tainacan_blocks_enqueue_on_theme(){
|
|||
// );
|
||||
}
|
||||
|
||||
function tainacan_blocks_register_tainacan_items_grid(){
|
||||
global $TAINACAN_BASE_URL;
|
||||
// function tainacan_blocks_register_tainacan_items_grid(){
|
||||
// global $TAINACAN_BASE_URL;
|
||||
|
||||
wp_register_script(
|
||||
'items-grid',
|
||||
$TAINACAN_BASE_URL . '/assets/gutenberg_items_grid-components.js',
|
||||
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor', 'underscore')
|
||||
);
|
||||
// wp_register_script(
|
||||
// 'items-grid',
|
||||
// $TAINACAN_BASE_URL . '/assets/gutenberg_items_grid-components.js',
|
||||
// array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor', 'underscore')
|
||||
// );
|
||||
|
||||
wp_register_style(
|
||||
'items-grid',
|
||||
$TAINACAN_BASE_URL . '/assets/css/tainacan-gutenberg-blocks-style.css',
|
||||
array('wp-edit-blocks')
|
||||
);
|
||||
// wp_register_style(
|
||||
// 'items-grid',
|
||||
// $TAINACAN_BASE_URL . '/assets/css/tainacan-gutenberg-blocks-style.css',
|
||||
// array('wp-edit-blocks')
|
||||
// );
|
||||
|
||||
if (function_exists('register_block_type')) {
|
||||
register_block_type( 'tainacan/items-grid', array(
|
||||
'editor_script' => 'items-grid',
|
||||
'style' => 'items-grid'
|
||||
) );
|
||||
}
|
||||
}
|
||||
// if (function_exists('register_block_type')) {
|
||||
// register_block_type( 'tainacan/items-grid', array(
|
||||
// 'editor_script' => 'items-grid',
|
||||
// 'style' => 'items-grid'
|
||||
// ) );
|
||||
// }
|
||||
// }
|
||||
|
||||
function tainacan_blocks_register_tainacan_terms_list(){
|
||||
global $TAINACAN_BASE_URL;
|
||||
|
@ -134,7 +134,7 @@ function tainacan_blocks_add_plugin_settings() {
|
|||
|
||||
$settings = tainacan_blocks_get_plugin_js_settings();
|
||||
|
||||
wp_localize_script( 'items-grid', 'tainacan_plugin', $settings );
|
||||
// wp_localize_script( 'items-grid', 'tainacan_plugin', $settings );
|
||||
wp_localize_script( 'terms-list', 'tainacan_plugin', $settings );
|
||||
wp_localize_script( 'items-list', 'tainacan_plugin', $settings );
|
||||
}
|
||||
|
|
|
@ -829,16 +829,18 @@ registerBlockType('tainacan/items-list', {
|
|||
}
|
||||
}
|
||||
/>
|
||||
<RangeControl
|
||||
label={__('Margin', 'tainacan')}
|
||||
value={ gridMargin }
|
||||
onChange={ ( margin ) => {
|
||||
setAttributes( { gridMargin: margin } )
|
||||
setContent();
|
||||
}}
|
||||
min={ 0 }
|
||||
max={ 48 }
|
||||
/>
|
||||
<div style={{ marginTop: '16px'}}>
|
||||
<RangeControl
|
||||
label={__('Margin between items', 'tainacan')}
|
||||
value={ gridMargin }
|
||||
onChange={ ( margin ) => {
|
||||
setAttributes( { gridMargin: margin } )
|
||||
setContent();
|
||||
}}
|
||||
min={ 0 }
|
||||
max={ 48 }
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
: null }
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@ module.exports = {
|
|||
user_search: './src/admin/js/theme-main.js',
|
||||
user_admin: './src/admin/js/main.js',
|
||||
//gutenberg_collections_carousel: './src/gutenberg-blocks/tainacan-collections/collections-carousel/index.js',
|
||||
gutenberg_items_grid: './src/gutenberg-blocks/tainacan-items/items-grid/index.js',
|
||||
// gutenberg_items_grid: './src/gutenberg-blocks/tainacan-items/items-grid/index.js',
|
||||
gutenberg_terms_list: './src/gutenberg-blocks/tainacan-terms/terms-list/index.js',
|
||||
gutenberg_items_list: './src/gutenberg-blocks/tainacan-items/items-list/index.js',
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue