| 1 |
<?php |
| 2 |
/* |
| 3 |
* This file is part of the ManageWP Worker plugin. |
| 4 |
* |
| 5 |
* (c) ManageWP LLC <contact@managewp.com> |
| 6 |
* |
| 7 |
* For the full copyright and license information, please view the LICENSE |
| 8 |
* file that was distributed with this source code. |
| 9 |
*/ |
| 10 |
|
| 11 |
class MWP_WordPress_Query_Comment extends MWP_WordPress_Query_Abstract |
| 12 |
{ |
| 13 |
public function query(array $options = array()) |
| 14 |
{ |
| 15 |
$options += array( |
| 16 |
'query' => null, |
| 17 |
'prefixName' => '{{prefix}}', |
| 18 |
'deserialize' => array(), |
| 19 |
'tryDeserialize' => array(), |
| 20 |
); |
| 21 |
|
| 22 |
$query = str_replace($options['prefixName'], $this->getDb()->prefix, $options['query']); |
| 23 |
$comments = $this->getDb()->get_results($query, ARRAY_A); |
| 24 |
$this->deserialize($comments, $options['deserialize'], $options['tryDeserialize']); |
| 25 |
|
| 26 |
return $comments; |
| 27 |
} |
| 28 |
} |
| 29 |
|