1 | <?php |
||
13 | class Meta extends Module { |
||
14 | /** |
||
15 | * Sync module name. |
||
16 | * |
||
17 | * @access public |
||
18 | * |
||
19 | * @return string |
||
20 | */ |
||
21 | public function name() { |
||
24 | |||
25 | /** |
||
26 | * This implementation of get_objects_by_id() is a bit hacky since we're not passing in an array of meta IDs, |
||
27 | * but instead an array of post or comment IDs for which to retrieve meta for. On top of that, |
||
28 | * we also pass in an associative array where we expect there to be 'meta_key' and 'ids' keys present. |
||
29 | * |
||
30 | * This seemed to be required since if we have missing meta on WP.com and need to fetch it, we don't know what |
||
31 | * the meta key is, but we do know that we have missing meta for a given post or comment. |
||
32 | * |
||
33 | * @todo Refactor the $wpdb->prepare call to use placeholders. |
||
34 | * |
||
35 | * @param string $object_type The type of object for which we retrieve meta. Either 'post' or 'comment'. |
||
36 | * @param array $config Must include 'meta_key' and 'ids' keys. |
||
37 | * |
||
38 | * @return array |
||
39 | */ |
||
40 | public function get_objects_by_id( $object_type, $config ) { |
||
62 | |||
63 | /** |
||
64 | * Get a single Meta Result. |
||
65 | * |
||
66 | * @param string $object_type post, comment, term, user. |
||
67 | * @param null $id Object ID. |
||
68 | * @param null $meta_key Meta Key. |
||
69 | * |
||
70 | * @return mixed|null |
||
71 | */ |
||
72 | public function get_object_by_id( $object_type, $id = null, $meta_key = null ) { |
||
109 | } |
||
110 |