Is there any way to fire heartbeat API from for website visitors?

As Mark Kaplun says in the comments, you shouldn’t do it. But here’s how to enqueue the heartbeat script for all users on the public side… if you really, really want to overload your server. add_action( ‘wp_enqueue_scripts’, ‘enqueue_heartbeat’ ); function enqueue_heartbeat() { wp_enqueue_script( ‘heartbeat’, includes_url( js/heartbeat.js ) ); }

AJAX button with success callback. (Titan Framework)

So now I want to refresh the page using a success callback. I’ve enqueued a simple script via admin_enqueue_scripts: I believe in that script, you need a global JS function named ajax_success_refresh, as in the following example: // This is the ‘success_callback’ for the AJAX action of ‘yyy_reset_security_logs’. function ajax_success_refresh() { window.location.reload( false ); } … Read more

Make wordpress join default user metas with a column from another table while displaying the wp_users table on the users screen

To avoid a second query just for sorting you could use the pre_user_query hook to support a custom orderby value. This code will enable sorting users by reputation in a single query just by setting orderby to reputation. function wpse_296999_pre_user_query( $user_query ) { global $wpdb; $order = $user_query->query_vars[‘order’]; $orderby = $user_query->query_vars[‘orderby’]; // If orderby is … Read more

How to add custom post widgets as tags into wordpress

Please check ACF https://www.advancedcustomfields.com/ Create new text field for title https://www.advancedcustomfields.com/resources/text/ Create new file or text field for file https://www.advancedcustomfields.com/resources/file/ You can also check link field https://www.advancedcustomfields.com/resources/link/ Adding fields to Posts When you add new field group you can set position to ‘Side’.

Pass CF7 form data to plugin

A complete answer would be a little complicated since ‘plugin A’ and ‘plugin B’ should be analized in-depth so check for available hooks and filters, but if I understand you wrote your own plugin so you have full control on it. That said, a starting point to get submitted data from CF7 is the following: … Read more

Preventing double loading JS scripts (like React) when developing for Gutenberg

Any WordPress-packaged scripts enqueued properly via wp_enqueue_script won’t load multiple times. If two different plugins rely on the same dependencies, thanks to the enqueue logic, those dependencies will only be loaded once. create-guten-block only contains javascript relevant to the custom block itself, and sets wp-blocks, wp-i18n, and wp-element (the abstraction layer WP uses on top … Read more