PluginProbe
Code Engine – PHP Snippets, AI Functions & Automation for WordPress / 0.4.2
Code Engine – PHP Snippets, AI Functions & Automation for WordPress v0.4.2
0.5.7 0.5.6 0.5.5 0.5.4 0.5.3 0.5.2 0.5.1 0.5.0 0.4.9 0.4.8 0.4.7 0.4.6 trunk 0.0.1 0.0.2 0.2.8 0.2.9 0.3.0 0.3.1 0.3.2 0.3.3 0.3.4 0.3.5 0.3.6 0.3.7 All 33 releases
← All changes | classes/modules/snippet.php +0 -14 0.4.60.4.2 View file →
@@ -390,9 +390,8 @@
390 390 $scopes = [
391 391 "global" => "persistent",
392 392 "front-end" => "frontend",
393 393 "admin" => "backend",
394 - "content" => "content_php",
395 394 ];
396 395
397 396 if ( array_key_exists( $params['scope'], $scopes ) ) {
398 397 $params['scope'] = $scopes[$params['scope']];
@@ -622,21 +621,8 @@
622 621 $code = ltrim( $code );
623 622 }
624 623
625 624 return $code;
626 - }
627 -
628 - public function delete_duplicates() {
629 - // Delete snippets that have the same code and scope, keeping only the most recent one ( based on the updated column )
630 - $query = "DELETE t1 FROM $this->table_name t1
631 - INNER JOIN $this->table_name t2
632 - WHERE t1.id < t2.id
633 - AND t1.code = t2.code
634 - AND t1.scope = t2.scope";
635 -
636 - $this->wpdb->query( $query );
637 -
638 - return $this->wpdb->rows_affected;
639 625 }
640 626
641 627 #endregion
642 628