admin管理员组

文章数量:1277271

I'm building a custom "row" plugin and would like to control some css-grid related stuff from the backend. What is the "best way" to save the css generated from the controls and how to inject it into the website?

Right now I'm using add_action( 'wp_head', array( $this, 'render_server_side_css' ) );, to get my css stored inside block attributesto the frontend (head), but is this js + php approach the best way or is there a more "gutenberg ready" approach to solve this issue?

And if that is the right way, how to generate some ids for styling? The client id is always changing, so that is not really an option ...

本文标签: plugin developmentBest way to save custom css for an block