-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor wpdb statements #165
base: master
Are you sure you want to change the base?
Conversation
* @param array $values, | ||
* @return array $placeholders | ||
*/ | ||
public function get_prepare_placeholders( $values ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is get prepare
placeholders
.
The method itself is not doing any sql preparing, nor is it doing anything with placeholders. It's simply looping through an array and merging things.
Is it really needed? Maybe we rename it to something that makes more sense?
); | ||
|
||
$query = $wpdb->prepare( | ||
"SELECT `ID` FROM $wpdb->posts WHERE `post_content` LIKE %s AND `post_status` IN ( " . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to peer review and figure out what has changed... The PR can be much cleaner and easier to understand by not reformatting, unless it needs to be.
Resolves #123