div:has(.woof_auto_show) {
This is the markup:
<br><div style="position: relative;"><br><code>\<a href="javascript:void(0);" class="woof_show_auto_form woof_btn_default "></code><br>
how-to reproduce this issue :
– add the gutenberg block “Advanced Columns”
– go to the advanced tab
– add a custom classname to the block “myclassname” for example
– “myclassname” is saved into the dashboard
– “myclassname” is not shown on the website (front)
Regards,
Maxime
Thanks for your help,
EF
After upgrading to WordPress 6.0, I am facing a problem with image alignment.
It looks as if everything is normal, notice the right-aligned image on:
https://www.leti.lt/wordpress/accueil/
However, if I save the post this alignment is no longer correct:
https://www.leti.lt/wordpress/aaaa/
I found that the problem can be worked around with a “surgical fix”: In the “wp:image” statement, a “className” declaration is missing. It should read:
<!– wp:image {“align”:”right”,”id”:23,”width”:224,”height”:148,”sizeSlug”:”large”,”className”:”alignright”} –>
So, adding “className”:”alignright” makes it work.
What can I change (possibly in functions.php) to get the proper “className” declarations (copied from figure class)?
]]>since wordpress 5.6, when I put a class name in aditional classes box of any block and press update the post, then, when I reload the page, the class is duplicated. if I put the name “rightopen”, it appears “rightopen rightopen”.
every update, it duplicate the class name.
does anyone know how to stop this duplication?
thanks
]]>Fatal error: Cannot declare class ES_Widget, because the name is already in use in wp-content/plugins/email-subscribers/lite/includes/classes/class-es-widget.php on line 87
This class is coz of another plugin that I am running on my website. Is there a workaround with this, that you could provide?
]]>blocks.min.js?ver=423068d7079f57cf9f02458ccb4a6131:3 Block validation: Block validation failed for ‘andyandrejka/profile-pic’
Content generated by save function:
<section class=”Componet profile_pic” class=”wp-block-andyandrejka-profile-pic”><div class=”Wrapper”><div class=”img_w”><div class=”img” style=”background-image:url(https://192.150.140.108/wp/wp-content/uploads/2020/03/84958218_486729275350316_8183725397188370510_n.jpg)”></div></div></div></section>
Content retrieved from post body:
<section class=”Componet profile_pic” class=”wp-block-andyandrejka-profile-pic”><div class=”Wrapper”><div class=”img_w”><div class=”img” style=”background-image:url(https://192.150.140.108/wp/wp-content/uploads/2020/03/84958218_486729275350316_8183725397188370510_n.jpg)”></div></div></div></section>
Has the process of creating your own blocks changed?
PHP registration:
register_block_type('andyandrejka/profile-pic', array(
'editor_script' => 'custom-block-guttenberg'
));
JS:
const { registerBlockType } = wp.blocks;
const { RichText, InspectorControls, ColorPalette, MediaUpload } = wp.editor;
const { PanelBody, TextControl, IconButton } = wp.components;
registerBlockType('andyandrejka/profile-pic', {
// Atributes
title: 'Profilovy obrázek',
description: 'Profilovy obrázek',
icon: 'format-image',
category: 'layout',
// custom attributes
attributes: {
backgroundImageUrl: {
type: 'string',
default: null
},
},
edit({ attributes, setAttributes }) {
const {
backgroundImageUrl,
} = attributes;
function onSelectImage(newImage) {
setAttributes({ backgroundImageUrl: newImage.sizes.full.url });
}
return ([
<InspectorControls style={{ marginBottom: '40px' }}>
<PanelBody title={'Profilovy obrázek'}>
<p><strong>Vyberte porfilovy obrázek:</strong></p>
<MediaUpload
onSelect={onSelectImage}
type="image"
value={backgroundImageUrl}
render={({ open }) => (
<IconButton
className="editor-media-placeholder__button is-button is-default is-large"
icon="upload"
onClick={open}>
Obrázek
</IconButton>
)}
/>
</PanelBody>
</InspectorControls>,
<section class="Componet profile_pic">
<div class="Wrapper">
<div class="img_w">
<div class="img" style={{ backgroundImage: <code>url(${backgroundImageUrl})</code> }}></div>
</div>
</div>
</section>
]);
},
save({ attributes, setAttributes }) {
const {
backgroundImageUrl,
} = attributes;
return (
<section class="Componet profile_pic">
<div class="Wrapper">
<div class="img_w">
<div class="img" style={{ backgroundImage: <code>url(${backgroundImageUrl})</code> }}></div>
</div>
</div>
</section>
)
},
});
]]>blocks.min.js?ver=423068d7079f57cf9f02458ccb4a6131:3 Block validation: Block validation failed for 'andyandrejka/profile-pic'
Content generated by save function:
<section class="Componet profile_pic" class="wp-block-andyandrejka-profile-pic"><div class="Wrapper"><div class="img_w"><div class="img" style="background-image:url(https://192.150.140.108/wp/wp-content/uploads/2020/03/84958218_486729275350316_8183725397188370510_n.jpg)"></div></div></div></section>
Content retrieved from post body:
<section class="Componet profile_pic" class="wp-block-andyandrejka-profile-pic"><div class="Wrapper"><div class="img_w"><div class="img" style="background-image:url(https://192.150.140.108/wp/wp-content/uploads/2020/03/84958218_486729275350316_8183725397188370510_n.jpg)"></div></div></div></section>
Has the process of creating your own blocks changed?
]]>$chat_name
contains a dot or other reserved characters for CSS, a script error appears in console when a live message is added:
jquery.js?ver=1.12.4-wp:2 Uncaught Error: Syntax error, unrecognized expression: .sac-user-Tester-A.
at Function.ea.error (jquery.js?ver=1.12.4-wp:2)
at ea.tokenize (jquery.js?ver=1.12.4-wp:2)
at ea.select (jquery.js?ver=1.12.4-wp:2)
at Function.ea (jquery.js?ver=1.12.4-wp:2)
at Function.a.find (jquery-migrate.min.js?ver=1.4.1:2)
at n.fn.init.find (jquery.js?ver=1.12.4-wp:2)
at n.fn.init.a.fn.find (jquery-migrate.min.js?ver=1.4.1:2)
at a.fn.init.n.fn.init (jquery.js?ver=1.12.4-wp:2)
at new a.fn.init (jquery-migrate.min.js?ver=1.4.1:2)
at n (jquery.js?ver=1.12.4-wp:2)
In this testcase the $user->display_name
was Tester A.
with a dot at the end of last name.
Currently there is some sort of sanitization in simple_ajax_chat()
which replaces spaces with dashes to convert the name to a CSS classname:
$name_class = preg_replace("/[\s]+/", "-", $chat_name);
That approach is obviously not sufficient to produce a valid classname, would recommend to use something like this instead:
$name_class = sanitize_title( $chat_name );
Thanks for great plugin.
]]>But this invalidates all existing blocks, which is an absolute no go.
Is there a way to add those core block classes without invalidating existing blocks?
]]>