Hook to add Editor-CSS
Hi,
is it possible, with a hook, to add CSS to wp-content/plugins/brizy-pro/public/editor-build/[latest]/css/editor.pro.css. I would like to attach something to hide things (in WAAS).
Thank You and regards
Steffen
-
Hi Steffen,
You can't do that, but probably if you give us more details about what exactly you want to do, we could come up with some suggestions.
0 -
Hi Alex,
I can of course attach my own CSS below, that I then have to copy in again after each Brizy update. Until an API is made available, that works.
What do I want to do. Well, I want to hide some things, actually only two.
First, disconnecting from the Brizy Cloud. I'm building a WAAS, but I don't want to use the WAAS feature because I want to use the cloud. I don't need to rename Brizy, I communicate openly and transparently that it is Brizy. This is nothing to be ashamed of, on the contrary, it is purely a quality feature.
Then I want to hide elements and then hide the edit button.
So as of now, I'm just going to append a line of CSS code:
.brz-ed-popup-two__cloud-button,
.brz-ed-popup-two__cloud-info,
.brz-ed-popup-two-sidebar .brz-p {
display:none!important;
}It's OK if I attach it manually and re-install it after an update.
Thank You and regrads
Steffen
0 -
Hi Steffen,
Try to add this code to functions.php in your child theme:
<?php
add_action( 'wp_enqueue_scripts', function() {
$custom_css = "
.brz-ed-popup-two__cloud-button,
.brz-ed-popup-two__cloud-info,
.brz-ed-popup-two-sidebar .brz-p {
display:none!important;
}
";
wp_add_inline_style( 'brizy-pro-editor', $custom_css );
}, 10000 );0 -
Thank you Alex,
but unfortunately it has no effect.0 -
I'm afraid I can't help you with more at the moment. You will have to add it after each update until we find a better solution ).
0 -
@Steffen
Couldn't you add your CSS code via the Snippets plugin and activate it for the admin section only?0 -
Try:
<?php
add_action( 'wp_enqueue_scripts', function() {
$custom_css = "
.brz-ed-popup-two__cloud-button,
.brz-ed-popup-two__cloud-info,
.brz-ed-popup-two-sidebar .brz-p {
display:none!important;
}
";
wp_add_inline_style( 'brizy-pro-editor', $custom_css );
}, PHP_INT_MAX);0 -
OR Try using a shortcut to process style after brizy styles load:
// Shortcode handler which also outputs inline styles. add_shortcode( 'addmystyles', 'ams_process_shortcode'); function ams_process_shortcode() { $color = '#bada55'; $css = 'body { background-color: ' . $color . '; }'; // Register dummy ams-inline-style wp_register_style( 'ams-inline-style', false, array( 'brizy-pro-editor' ) ); wp_enqueue_style( 'ams-inline-style' ); wp_add_inline_style( 'ams-inline-style', $css ); return "<p>Look, I am working!</p>"; }0 -
Hi Sam,
thanks for the involvement. That's what I call a community ❤️
0
Please sign in to leave a comment.
Comments
9 comments