PluginProbe
Parse.ly / 3.8.4
Parse.ly v3.8.4
3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 All 106 releases
← All changes | src/Endpoints/class-rest-metadata.php +5 -4 3.16.4 → 3.8.4 View file →
@@ -65,21 +65,22 @@
65 65 /**
66 66 * Function to get hooked into the `get_callback` property of the `parsely`
67 67 * REST API field. It generates the `parsely` object in the REST API.
68 68 *
69 - * @param array<string, mixed> $object_data The data of the object to render the metadata for,
70 - * usually a post or a page.
69 + * @param array<string, mixed> $object The WordPress object to extract to render the metadata for,
70 + * usually a post or a page.
71 + *
71 72 * @return array<string, mixed> The `parsely` object to be rendered in the REST API. Contains a
72 73 * version number describing the response and the `meta` object
73 74 * containing the actual metadata.
74 75 */
75 - public function get_callback( array $object_data ): array {
76 + public function get_callback( array $object ): array {
76 77 /**
77 78 * Variable.
78 79 *
79 80 * @var int
80 81 */
81 - $post_id = $object_data['ID'] ?? $object_data['id'] ?? 0;
82 + $post_id = $object['ID'] ?? $object['id'] ?? 0;
82 83 $post = WP_Post::get_instance( $post_id );
83 84 $options = $this->parsely->get_options();
84 85
85 86 if ( false === $post ) {