Skip to content

Commit 36a1760

Browse files
committed
lint fixes
1 parent ded67b2 commit 36a1760

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

includes/Services/SiteGenImageService.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static function upload_images_to_wp_media_library( $image_urls, $post_id
5858

5959
$uploaded_image_urls = array();
6060
$total_images = count( $image_urls );
61-
$successful_uploads = 0;
61+
$successful_uploads = 0;
6262

6363
try {
6464
foreach ( $image_urls as $image_url ) {
@@ -168,8 +168,8 @@ public static function update_post_content_with_new_image_urls( $post_id, $url_m
168168
return false;
169169
}
170170

171-
$content = $post->post_content;
172-
$updated = false;
171+
$content = $post->post_content;
172+
$updated = false;
173173
$replaced_count = 0;
174174

175175
// Replace each original URL with the new WordPress URL
@@ -187,10 +187,12 @@ public static function update_post_content_with_new_image_urls( $post_id, $url_m
187187

188188
// Update the post if content changed
189189
if ( $updated ) {
190-
$update_result = wp_update_post( array(
191-
'ID' => $post_id,
192-
'post_content' => $content,
193-
) );
190+
$update_result = wp_update_post(
191+
array(
192+
'ID' => $post_id,
193+
'post_content' => $content,
194+
)
195+
);
194196

195197
if ( is_wp_error( $update_result ) ) {
196198
return false;
@@ -211,7 +213,7 @@ public static function update_post_content_with_new_image_urls( $post_id, $url_m
211213
public static function get_image_processing_status( $post_id ) {
212214
$queue = \NewfoldLabs\WP\Module\Onboarding\TaskManagers\ImageSideloadTaskManager::get_queue();
213215
$stats = \NewfoldLabs\WP\Module\Onboarding\TaskManagers\ImageSideloadTaskManager::get_stats();
214-
216+
215217
$post_tasks = array();
216218
foreach ( $queue as $task ) {
217219
if ( $task['post_id'] === $post_id ) {
@@ -220,10 +222,10 @@ public static function get_image_processing_status( $post_id ) {
220222
}
221223

222224
return array(
223-
'post_id' => $post_id,
224-
'queue_status' => \NewfoldLabs\WP\Module\Onboarding\TaskManagers\ImageSideloadTaskManager::get_status(),
225-
'queue_stats' => $stats,
226-
'post_tasks' => $post_tasks,
225+
'post_id' => $post_id,
226+
'queue_status' => \NewfoldLabs\WP\Module\Onboarding\TaskManagers\ImageSideloadTaskManager::get_status(),
227+
'queue_stats' => $stats,
228+
'post_tasks' => $post_tasks,
227229
'post_task_count' => count( $post_tasks ),
228230
);
229231
}

0 commit comments

Comments
 (0)