What is the best way to do unit tests for your plugin in 2018 [closed]
What is the best way to do unit tests for your plugin in 2018 [closed]
What is the best way to do unit tests for your plugin in 2018 [closed]
WordPress REST API call generates nonce twice on every call
Using Primary Color in Plugin Block
How to remove unwanted panels inside InspectorControls from core blocks in Gutenberg
Actually an assumption I made in the question was wrong; The update button doesn’t only change when the output of the save function changes. It also changes when the attributes are changed. However I found a small bug, which you can’t really see it in the provided code. In my BlockSettings component I was using … Read more
1) The attachment_fields_to_save filter does not get applied, even though I can see the echo’d text inside the media-upload.php window. I know this because the _imageTop meta only gets written to the database when I comment out the if(isset) check Try to exchange $_GET with $_POST and see if it works. If so, you need … Read more
I think the best thing you could do is to take a look at others people WP plugins and themes. WordPress codex has a lot of info on developing plugins using ajax: http://codex.wordpress.org/AJAX_in_Plugins For the backend side of things, I think the best approach would be to use a custom post type for the portfolio … Read more
As said I think it’s quite hard to find a reliable solution because you have to take care of so many things. I go either for the way proposed by Danny van Kooten: http://dannyvankooten.com/450/tinymce-wysiwyg-editor-in-wordpress-plugin/ add and open the editor in a thickbox or another way I’ve used once, using the widget “accessibility mode” for “advanced” … Read more
An idea I came up with was using the new WP Heartbeat API as opposed to using cron. Have your plugin fire off a call to your logging system every hour. Pippin’s tutorial contains the majority of the code you’ll need to get started.
I’d hooked to ‘wp_insert_post_empty_content’ filter. See https://core.trac.wordpress.org/browser/tags/3.8.1/src/wp-includes/post.php#L2748 //hook at the very end of all filters to prevent other filters from overwriting your return value ( 99 should be high enaugh ) add_filter( ‘wp_insert_post_empty_content’, ‘my_cancel_post_save_function’, 99, 2 ); function my_cancel_post_save_function( $maybe_empty, $postarr ) { if ( true === wp_is_post_revision( $postarr[ ‘ID’ ] ) ) { //postarr … Read more