Skip to content

Commit

Permalink
[WIP]
Browse files Browse the repository at this point in the history
  • Loading branch information
wordpressfan committed Oct 23, 2024
1 parent 815e639 commit 5dcfb61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inc/Engine/Common/PerformanceHints/Admin/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ public function truncate_tables(): void {
* @return void
*/
public function delete_post( int $post_id ): void {
if ( 'attachment' === get_post_type( $post_id ) ) {
return;
}
$this->controller->delete_post( $post_id );
}

Expand Down
4 changes: 4 additions & 0 deletions inc/Engine/Optimization/RUCSS/Admin/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public function delete_used_css_on_update_or_delete( $post_id ) {
return;
}

if ( 'attachment' === get_post_type( $post_id ) ) {
return;
}

$url = get_permalink( $post_id );

if ( false === $url ) {
Expand Down

0 comments on commit 5dcfb61

Please sign in to comment.