Advertisement
geminilabs

Untitled

Feb 4th, 2023
1,016
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. add_action('admin_init', function () {
  2.     global $wpdb;
  3.     $rows = $wpdb->get_var("
  4.        SELECT TABLE_ROWS
  5.        FROM INFORMATION_SCHEMA.TABLES
  6.        WHERE TABLE_SCHEMA = '{$wpdb->dbname}' AND TABLE_NAME = '{$wpdb->posts}'
  7.    ");
  8.     glsr_log()->once('info', $wpdb->posts, sprintf('%s rows: %s', $wpdb->posts, $rows));
  9. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement