|
@@ 88-96 (lines=9) @@
|
| 85 |
|
* |
| 86 |
|
* @return array An array with the updated JSON-LD and references. |
| 87 |
|
*/ |
| 88 |
|
public function wl_term_jsonld_array( $value, $term_id ) { |
| 89 |
|
$jsonld = $value['jsonld']; |
| 90 |
|
$references = $value['references']; |
| 91 |
|
|
| 92 |
|
return array( |
| 93 |
|
'jsonld' => $this->build_jsonld( $jsonld, $term_id, $references, self::TERM ), |
| 94 |
|
'references' => $references, |
| 95 |
|
); |
| 96 |
|
} |
| 97 |
|
|
| 98 |
|
|
| 99 |
|
/** |
|
@@ 116-125 (lines=10) @@
|
| 113 |
|
* |
| 114 |
|
* @return array An array with the updated JSON-LD and references. |
| 115 |
|
*/ |
| 116 |
|
public function wl_post_jsonld_array( $value, $post_id ) { |
| 117 |
|
|
| 118 |
|
$jsonld = $value['jsonld']; |
| 119 |
|
$references = $value['references']; |
| 120 |
|
|
| 121 |
|
return array( |
| 122 |
|
'jsonld' => $this->build_jsonld( $jsonld, $post_id, $references, self::POST ), |
| 123 |
|
'references' => $references, |
| 124 |
|
); |
| 125 |
|
} |
| 126 |
|
|
| 127 |
|
/** |
| 128 |
|
* Returns JSON-LD data after applying transformation functions. |