|
@@ 203-211 (lines=9) @@
|
| 200 |
|
} |
| 201 |
|
|
| 202 |
|
// If no claim was found (and modified) above, create a new claim. |
| 203 |
|
if ( !isset( $apiParams ) ) { |
| 204 |
|
$apiParams = [ |
| 205 |
|
'action' => 'wbcreateclaim', |
| 206 |
|
'entity' => $this->getId(), |
| 207 |
|
'property' => $property, |
| 208 |
|
'snaktype' => 'value', |
| 209 |
|
'value' => wp_json_encode( [ 'entity-type' => 'item', 'numeric-id' => $itemIdNumeric ] ), |
| 210 |
|
]; |
| 211 |
|
} |
| 212 |
|
|
| 213 |
|
// Save the property. |
| 214 |
|
$wdWpOauth = new WdWpOauth(); |
|
@@ 337-345 (lines=9) @@
|
| 334 |
|
} |
| 335 |
|
|
| 336 |
|
// If no claim was found (and modified) above, create a new claim. |
| 337 |
|
if ( !isset( $setTitleParams ) ) { |
| 338 |
|
$setTitleParams = [ |
| 339 |
|
'action' => 'wbcreateclaim', |
| 340 |
|
'entity' => $this->getId(), |
| 341 |
|
'property' => $property, |
| 342 |
|
'snaktype' => 'value', |
| 343 |
|
'value' => \GuzzleHttp\json_encode( [ 'text' => $value, 'language' => $this->lang ] ), |
| 344 |
|
]; |
| 345 |
|
} |
| 346 |
|
|
| 347 |
|
// Save the property. |
| 348 |
|
$wdWpOauth = new WdWpOauth(); |