Skip to content

Commit

Permalink
Merge pull request #90 from BenjaminMedia/IVD-461/fix-missing-var
Browse files Browse the repository at this point in the history
IVD-461: Fixed missing variable
  • Loading branch information
jonastanz authored Dec 12, 2018
2 parents 2288b09 + 46fdae1 commit 0851666
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/Services/CxenseApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,20 @@ public static function pingCrawler($postId, $delete = false)
try {
if (!is_plugin_active('wp-bonnier-cache/wp-bonnier-cache.php')) {
if ($delete || !Post::is_published($postId)) {
return self::request(self::CXENSE_PROFILE_DELETE, [
$apiPath = self::CXENSE_PROFILE_DELETE;
return self::request($apiPath, [
'siteId' => WpCxense::instance()->settings->getSiteId(),
'url' => $contentUrl
]);
}

return self::request(self::CXENSE_PROFILE_PUSH, ['url'=> $contentUrl]);
$apiPath = self::CXENSE_PROFILE_PUSH;
return self::request($apiPath, ['url'=> $contentUrl]);
}
} catch (Exception $e) {
if ($e instanceof HttpException) {
error_log('WP cXense: Failed calling cXense api: ' . $apiPath . ' response code: '. $e->getCode() .' error: ' . $e->getMessage());
error_log('WP cXense: Failed calling cXense api: ' . $apiPath . ' response code: ' .
$e->getCode() .' error: ' . $e->getMessage());
}

if ($e->getCode() == self::EXCEPTION_USER_NOT_DEFINED) {
Expand Down
2 changes: 1 addition & 1 deletion wp-cxense.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Plugin Name: WP cXense
* Version: 2.2.0
* Version: 2.2.2
* Plugin URI: https://github.com/BenjaminMedia/wp-cxense
* Description: This plugin integrates your site with cXense by adding meta tags and calling the cXense api
* Author: Bonnier - Alf Henderson
Expand Down

0 comments on commit 0851666

Please sign in to comment.