WordPress Dataviews React multilanguage i18n
WordPress Dataviews React multilanguage i18n
WordPress Dataviews React multilanguage i18n
from origin ‘http://localhost:3000’ has been blocked by CORS policy
how to combine wordpress and front framework
Ok, so I read up a bit and realized I cannot mix and match (React and pure JS). So, in the new WooCommerce they’ve created so-called slot fills that you can use to create your own react component as a separate plugin that you can then attach in a few places. Once you do that, … Read more
The function wp_enqueue_script takes a parameter $ver that you can use to automatically add an version parameter to the URL. To always load the newest version of your Javascript-File, you can use the php filemtime-function to give the timestamp of the modification date. In a Plugin, use like this: wp_register_script( ‘my-awesome-script’, plugin_dir_url( __FILE__ ). ‘assets/my-awesome-script.js’, … Read more
Extend WordPress Gutenberg core/navigation-link
Rather than binding text with a directive, you could bind a callback with data-wp-watch that sets the inner HTML of the div when it runs: <div data-wp-watch=”callbacks.renderContent”></div> callbacks: { renderContent() { const context = getContext(); const element = getElement(); element.ref.innerHTML = context.randomPost.content.rendered; }, }, Since the callback uses context.randomPost.content.rendered, it should run any time that … Read more
I managed to find the solution myself. You need to modify the onUpdateStartDate() function: function onUpdateStartDate(value) { const date = new Date(value); date.setHours(0, 0, 0, 0); setMeta({ …meta, ‘_my_start_date’: date }); }
Custom plugin translation not working
Core/Image access caption in render_template and in wp.hooks