PluginProbe
Property Hive / 2.3.1
Property Hive v2.3.1
2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 All 261 releases
← All changes | includes/class-ph-contact.php +2 -0 2.2.62.3.1 View file →
@@ -12,8 +12,9 @@
12 12 * @package PropertyHive/Classes
13 13 * @category Class
14 14 * @author PropertyHive
15 15 */
16 +// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Legacy public global class PH_Contact; preserving the existing PH_* class name is required for plugin and extension compatibility.
16 17 class PH_Contact {
17 18
18 19 /** @public int Contact (post) ID */
19 20 public $id;
@@ -29,8 +30,9 @@
29 30
30 31 if ( $user_id > 0 )
31 32 {
32 33 // We've been passed a user ID. Need to get contact ID based on user_id
34 + // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key, WordPress.DB.SlowDBQuery.slow_db_query_meta_value -- PH_Contact maps one WordPress user ID to one contact with fields=ids and posts_per_page=1. Both meta key and scalar value are fixed/typed; one-row result.
33 35 $contact_query = new WP_Query( array( 'post_type' => 'contact', 'meta_key' => '_user_id', 'meta_value' => $user_id, 'fields' => 'ids', 'posts_per_page' => 1 ) );
34 36
35 37 if ( $contact_query->have_posts() )
36 38 {