Exclude WordPress and WooCommerce variables from camel case conversion

[MAILPOET-1796]
This commit is contained in:
Jan Jakeš
2020-01-07 17:23:51 +01:00
committed by Jan Jakeš
parent fbcaeaadbc
commit 685b4885c0
25 changed files with 111 additions and 109 deletions

View File

@ -68,7 +68,7 @@ class PostTransformerContentsExtractor {
public function getFeaturedImage($post) {
$postId = $post->ID;
$postTitle = $this->sanitizeTitle($post->postTitle);
$postTitle = $this->sanitizeTitle($post->post_title); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
$imageFullWidth = (bool)filter_var($this->args['imageFullWidth'], FILTER_VALIDATE_BOOLEAN);
if (!has_post_thumbnail($postId)) {
@ -125,7 +125,7 @@ class PostTransformerContentsExtractor {
}
public function getTitle($post) {
$title = $this->sanitizeTitle($post->postTitle);
$title = $this->sanitizeTitle($post->post_title); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
if (filter_var($this->args['titleIsLink'], FILTER_VALIDATE_BOOLEAN)) {
$title = '<a href="' . $this->wp->getPermalink($post->ID) . '">' . $title . '</a>';
@ -182,7 +182,7 @@ class PostTransformerContentsExtractor {
}
public function isProduct($post) {
return $post->postType === 'product';
return $post->post_type === 'product'; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
}
/**