menikan
Forum Replies Created
-
Thanks !
Our temporary solution until you guys fixed it in a new update is the following CSS tweak to force the color of labels and headlines of the lazyblocks to be black (since the background color is set to #fff):where(.editor-styles-wrapper) .has-base-color label,
:where(.editor-styles-wrapper) .has-base-color .lazyblocks-component-base-control__label,
:where(.editor-styles-wrapper) h1,
:where(.editor-styles-wrapper) h2,
:where(.editor-styles-wrapper) h3,
:where(.editor-styles-wrapper) h4,
:where(.editor-styles-wrapper) h5,
:where(.editor-styles-wrapper) h6
{
color: #000 !important;
}Forum: Plugins
In reply to: [Custom Block Builder - Lazy Blocks] toggle a part of the code on / off ?I just realized i could achieve this by creating a Select-Element and adding the values “hashscroll” or nothing..
But in other more complex parts it might be useful to have a toggle for bigger sections of code. Havent tried that yet, wether i can put a whole line of code into the value, so it shows up or not.<a class="{{link-type}}" href="{{button-link}}" alt="{{button-text}}">
Hey,
thanks for your answer! In the meantime is solved it by putting this code into the functions.php of the theme to hide the blocks for non-admins.
/**
* Filters the list of allowed block types based on user capabilities.
*
* This function checks if the current user has the 'edit_theme_options' capability.
* If the user does not have this capability, certain blocks are removed from the
* list of allowed block types in the Editor.
*
* @param array|bool $allowed_block_types Array of block type slugs, or boolean to enable/disable all.
* @param object $block_editor_context The current block editor context.
*
* @return array The filtered list of allowed block types. If the current user does not have
* the 'edit_theme_options' capability, the list will exclude the disallowed blocks.
*/
function example_disallow_block_types( $allowed_block_types, $block_editor_context ) {
// If the current user doesn't have the correct permissions, disallow blocks.
if ( ! current_user_can( 'edit_theme_options' ) ) {
$disallowed_blocks = array(
'aioseo/breadcrumbs',
'aioseo/faq',
'aioseo/html-sitemap',
'aioseo/table-of-contents',
);
// Get all registered blocks if $allowed_block_types is not already set.
if ( ! is_array( $allowed_block_types ) || empty( $allowed_block_types ) ) {
$registered_blocks = WP_Block_Type_Registry::get_instance()->get_all_registered();
$allowed_block_types = array_keys( $registered_blocks );
}
// Create a new array for the allowed blocks.
$filtered_blocks = array();
// Loop through each block in the allowed blocks list.
foreach ( $allowed_block_types as $block ) {
// Check if the block is not in the disallowed blocks list.
if ( ! in_array( $block, $disallowed_blocks, true ) ) {
// If it's not disallowed, add it to the filtered list.
$filtered_blocks[] = $block;
}
}
// Return the filtered list of allowed blocks
return $filtered_blocks;
}
return $allowed_block_types;
}
add_filter( 'allowed_block_types_all', 'example_disallow_block_types', 10, 2 );Forum: Plugins
In reply to: [Custom Block Builder - Lazy Blocks] html inside div gets exported with ” ” ?Never mind… The problem was a syntax error with some leftovers of an SVG… now it works as expected.
ah i forgot to overwrite the one on the server with the edited one… now it works and gets shown as 99.9 in my wordpress backend 🙂 thank you!
- This reply was modified 1 year, 7 months ago by menikan.
@sterndata – the style.css of this theme only has this commented line for version info – where else could this information be stored if not the in style.css ? Or how can i add this properly so wordpress recognises the command for version 99.9 ?

- This reply was modified 1 year, 7 months ago by menikan.
Thanks! That is indeed a good solution for my wordpress instance to avoid accidental updates.
But shouldnt this not be possible in the first place ? Shouldnt themese have something likea unique ID in the the wordpress theme database to avoid this ?
Just want to raise awareness to the devs for this in future updates.why would anyone overwrite the shortcut for developer mode and remove the option to disable this note feature ? how can i keep using my shortcut in chrome for Toggle Inspect Element Mode (command, shift, c) without the Notes Panel popping up please ?
Screenshots
https://imgur.com/a/d3Yeljs