How to inject right sidebar on post edit page?

I did not support this because of the difficulty of implementation. However, Gutenberg is made with ReactJS, and a slot called PluginPostStatusInfo is provided, so it seems possible to inject your own React elements by using this slot. https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/slotfills/plugin-post-status-info.md

How to render initial posts on page load in a Gutenberg block using the Interactivity API?

You could consider running actions.getPosts on mount via data-wp-init like: <div … data-wp-init=”actions.getPosts”> As per the documentation: This directive runs a callback only when the node is created. You could also consider server-rendering the initial set of posts, like: <div data-wp-watch=”callbacks.renderContent”> <?php $query = new WP_Query( array( … ) ); ?> <?php while( $query->have_posts() ) … Read more

Pass WP data to javascript

The most direct answer to your question as it stands is “yes” – there are many ways to acquire data from WordPress without embedding it in the page’s markup or an inline <script> generated via wp_add_inline_script()/wp_localize_script(). A couple of options would be to have your JavaScript make a web request to the REST API (either … Read more

Pass global variable data to localize_script

The issue you’re encountering is related to the execution order in WordPress. Global variables in WordPress are request-specific and are not preserved across different requests or different parts of a request unless they are included within the same scope. The wp_enqueue_scripts action runs before the template file is executed, hence your $product_filter_data array is still … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)