Open aubreypwd opened 4 years ago
Continuation of https://github.com/WebDevStudios/WDS-Coding-Standards/issues/77
If would be nice to catch these in-code, e.g.:
function method() { $wpdb->get_var( "SELECT ..." ); }
In the above example, a warning would show because you didn't add global $wpdb. Note this shouldn't happen if you use e.g. $this->wpdb or $object->wpdb, etc.
global $wpdb
$this->wpdb
$object->wpdb
Continuation of https://github.com/WebDevStudios/WDS-Coding-Standards/issues/77
If would be nice to catch these in-code, e.g.:
In the above example, a warning would show because you didn't add
global $wpdb
. Note this shouldn't happen if you use e.g.$this->wpdb
or$object->wpdb
, etc.