Change the number of plugins counted on wp-admin/plugins.php

The values haven’t any hook to change this. However it is easy to identify the counter via Javascript. You can change this with short lines of Javascript. Hook You should hook in this page hook of the plugin page admin_footer-plugins.php, like add_action( ‘admin_footer-plugins.php’, [ $this, ‘change_view_values’ ], 11 ); Function include javascript As example a … Read more

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

WordPress Fatal Errors [closed]

The error messages are pretty straightforward. First error: custom_permalinks_original_post_link() is not defined. It might be one defined by a plugin called “Custom Permalinks”. See https://github.com/GSA/custom-permalinks/blob/master/custom-permalinks.php. If you need that functionality, install/activate the plugin or refactor your code. Second error: It’s clear that the category-icons plugin is doing something wrong and not calling wpdb::prepare() properly. You … Read more