PluginProbe
Extendify / 3.2.3
Extendify v3.2.3
3.2.3 3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 All 129 releases
← All changes | app/Mcp/Connections.php +15 -0 3.2.2 → 3.2.3 View file →
@@ -60,8 +60,23 @@
60 60 return $connections;
61 61 }
62 62
63 63 /**
64 + * Expired rows count until their user's screen prunes them.
65 + *
66 + * @return integer
67 + */
68 + public static function count()
69 + {
70 + $wpdb = $GLOBALS['wpdb'];
71 +
72 + return (int) $wpdb->get_var($wpdb->prepare(
73 + "SELECT COUNT(*) FROM {$wpdb->usermeta} WHERE meta_key LIKE %s",
74 + $wpdb->esc_like(self::prefix()) . '%'
75 + ));
76 + }
77 +
78 + /**
64 79 * @param integer $userId - The user whose connections to describe.
65 80 * @return array - What a screen would have to redraw for: how many, and the newest.
66 81 */
67 82 public static function state($userId)