PluginProbe
Code Engine – PHP Snippets, AI Functions & Automation for WordPress / 0.4.1
Code Engine – PHP Snippets, AI Functions & Automation for WordPress v0.4.1
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 -18 0.4.60.4.1 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']];
@@ -624,21 +623,8 @@
624 623
625 624 return $code;
626 625 }
627 626
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 - }
640 -
641 627 #endregion
642 628
643 629 #region Snippet CRUD
644 630
@@ -894,12 +880,8 @@
894 880 }
895 881
896 882 function check_db( )
897 883 {
898 - if ( $this->db_check ) {
899 - return true;
900 - }
901 -
902 884 if ( $this->does_table_exist( $this->table_name ) ) {
903 885 $this->check_columns( );
904 886 $this->db_check = true;
905 887 } else {