Changeset 3125336
- Timestamp:
- 07/25/2024 01:54:26 PM (19 months ago)
- Location:
- simpleform-akismet
- Files:
-
- 53 added
- 7 edited
-
tags/1.1.2 (added)
-
tags/1.1.2/LICENSE.txt (added)
-
tags/1.1.2/README.txt (added)
-
tags/1.1.2/admin (added)
-
tags/1.1.2/admin/class-admin.php (added)
-
tags/1.1.2/admin/index.php (added)
-
tags/1.1.2/admin/js (added)
-
tags/1.1.2/admin/js/admin.js (added)
-
tags/1.1.2/includes (added)
-
tags/1.1.2/includes/class-activator.php (added)
-
tags/1.1.2/includes/class-core.php (added)
-
tags/1.1.2/includes/class-deactivator.php (added)
-
tags/1.1.2/includes/class-loader.php (added)
-
tags/1.1.2/includes/index.php (added)
-
tags/1.1.2/index.php (added)
-
tags/1.1.2/languages (added)
-
tags/1.1.2/languages/readme.txt (added)
-
tags/1.1.2/simpleform-akismet.php (added)
-
tags/1.1.2/uninstall.php (added)
-
tags/1.2.0 (added)
-
tags/1.2.0/admin (added)
-
tags/1.2.0/admin/class-simpleform-akismet-admin.php (added)
-
tags/1.2.0/admin/includes (added)
-
tags/1.2.0/admin/includes/class-simpleform-akismet-management.php (added)
-
tags/1.2.0/admin/includes/class-simpleform-akismet-report.php (added)
-
tags/1.2.0/admin/includes/class-simpleform-akismet-util.php (added)
-
tags/1.2.0/admin/includes/index.php (added)
-
tags/1.2.0/admin/index.php (added)
-
tags/1.2.0/admin/js (added)
-
tags/1.2.0/admin/js/admin.js (added)
-
tags/1.2.0/includes (added)
-
tags/1.2.0/includes/class-simpleform-akismet-activator.php (added)
-
tags/1.2.0/includes/class-simpleform-akismet-deactivator.php (added)
-
tags/1.2.0/includes/class-simpleform-akismet-loader.php (added)
-
tags/1.2.0/includes/class-simpleform-akismet.php (added)
-
tags/1.2.0/includes/index.php (added)
-
tags/1.2.0/index.php (added)
-
tags/1.2.0/languages (added)
-
tags/1.2.0/languages/readme.txt (added)
-
tags/1.2.0/license.txt (added)
-
tags/1.2.0/readme.txt (added)
-
tags/1.2.0/simpleform-akismet.php (added)
-
tags/1.2.0/uninstall.php (added)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/admin/class-simpleform-akismet-admin.php (added)
-
trunk/admin/includes (added)
-
trunk/admin/includes/class-simpleform-akismet-management.php (added)
-
trunk/admin/includes/class-simpleform-akismet-report.php (added)
-
trunk/admin/includes/class-simpleform-akismet-util.php (added)
-
trunk/admin/includes/index.php (added)
-
trunk/admin/index.php (modified) (1 diff)
-
trunk/admin/js/admin.js (modified) (1 diff)
-
trunk/includes/class-simpleform-akismet-activator.php (added)
-
trunk/includes/class-simpleform-akismet-deactivator.php (added)
-
trunk/includes/class-simpleform-akismet-loader.php (added)
-
trunk/includes/class-simpleform-akismet.php (added)
-
trunk/includes/index.php (modified) (1 diff)
-
trunk/index.php (modified) (1 diff)
-
trunk/simpleform-akismet.php (modified) (2 diffs)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
simpleform-akismet/trunk/README.txt
r2712284 r3125336 1 1 === SimpleForm Akismet === 2 Contributors: simpleform 3 Donate link: https://wpsform.com/4 Tags: contact form, spam manager, akismet, anti-spam, simpleform addon , spam, form5 Requires at least: 5. 66 Tested up to: 5.97 Requires PHP: 5.68 Stable tag: 1. 1.22 Contributors: simpleform, gianpic 3 Donate link: paypal.me/simpleformdonation 4 Tags: contact form, spam manager, akismet, anti-spam, simpleform addon 5 Requires at least: 5.9 6 Tested up to: 6.6 7 Requires PHP: 7.4 8 Stable tag: 1.2.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 60 60 == Changelog == 61 61 62 = 1.2.0 (25 July 2024) = 63 * Changed: code refactoring 64 * Added: compatibility with SimpleForm 2.2.0 version 65 * Fixed: general errors 66 62 67 = 1.1.2 (20 April 2022) = 63 68 * Added: compatibility with SimpleForm 2.1.7 version … … 76 81 == Demo == 77 82 78 You don’t know SimpleForm yet? Check out our [Demo]( https://wpsform.com/demo/) and find out how it works.83 You don’t know SimpleForm yet? Check out our [Demo]() and find out how it works. -
simpleform-akismet/trunk/admin/index.php
r2459305 r3125336 1 <?php // Silence is golden 1 <?php 2 /** 3 * Silence is golden. 4 * 5 * @package SimpleForm Akismet/admin 6 */ -
simpleform-akismet/trunk/admin/js/admin.js
r2537256 r3125336 1 /** 2 * JavaScript code delegated to the backend functionality of the plugin. 3 * 4 * @package SimpleForm Akismet 5 * @subpackage SimpleForm Akismet/admin 6 */ 7 1 8 (function( $ ) { 2 9 'use strict'; 3 4 $( window ).load(function() {5 10 6 $("#akismet").on("click", function() { 7 if($(this).prop('checked') == true) { 8 $('.trakismet').removeClass('unseen'); 9 $('#tdakismet').removeClass('last'); 10 if( $('#blocked-message').prop('checked') == true){ 11 $('.trspammark').addClass('unseen'); 12 $('#tdakismetaction').addClass('last'); 13 } 14 else { 15 $('.trspammark').removeClass('unseen'); 16 $('#tdakismetaction').removeClass('last'); 17 } 18 } 19 else { 20 $('.trakismet').addClass('unseen'); 21 $('#tdakismet').addClass('last'); 22 } 23 }); 24 25 $("#blocked-message").on("click", function() { 26 if($(this).prop('checked') == true) { 27 $('.trspammark').addClass('unseen'); 28 $('#tdakismetaction').addClass('last'); 29 } 30 else { 31 $('.trspammark').removeClass('unseen'); 32 $('#tdakismetaction').removeClass('last'); 33 } 34 }); 35 36 $("#flagged-message").on("click", function() { 37 if($(this).prop('checked') == true) { 38 $('.trspammark').removeClass('unseen'); 39 $('#tdakismetaction').removeClass('last'); 40 } 41 else { 42 $('.trspammark').addClass('unseen'); 43 $('#tdakismetaction').addClass('last'); 44 } 45 }); 11 $( window ).on( 12 'load', 13 function() { 46 14 47 $("#blocked-message").on("click", function() { $('#akismet-action-notes').addClass('invisible'); }); 48 $("#flagged-message").on("click", function() { $('#akismet-action-notes').removeClass('invisible'); }); 15 $( '#akismet' ).on( 16 'click', 17 function() { 18 if ( $( this ).prop( 'checked' ) == true ) { 19 $( '.trakismet' ).removeClass( 'unseen' ); 20 $( '#tdakismet' ).removeClass( 'last' ); 21 if ( $( '#blocked-message' ).prop( 'checked' ) == true ) { 22 $( '.trspammark' ).addClass( 'unseen' ); 23 $( '#tdakismetaction' ).addClass( 'last' ); 24 } else { 25 $( '.trspammark' ).removeClass( 'unseen' ); 26 $( '#tdakismetaction' ).removeClass( 'last' ); 27 } 28 } else { 29 $( '.trakismet' ).addClass( 'unseen' ); 30 $( '#tdakismet' ).addClass( 'last' ); 31 } 32 } 33 ); 49 34 50 }); 35 $( '#blocked-message' ).on( 36 'click', 37 function() { 38 $( '#akismet_action_notes' ).addClass( 'invisible' ); 39 if ( $( this ).prop( 'checked' ) == true ) { 40 $( '.trspammark' ).addClass( 'unseen' ); 41 $( '#tdakismetaction' ).addClass( 'last' ); 42 } else { 43 $( '.trspammark' ).removeClass( 'unseen' ); 44 $( '#tdakismetaction' ).removeClass( 'last' ); 45 } 46 } 47 ); 48 49 $( '#flagged-message' ).on( 50 'click', 51 function() { 52 $( '#akismet_action_notes' ).removeClass( 'invisible' ); 53 if ( $( this ).prop( 'checked' ) == true ) { 54 $( '.trspammark' ).removeClass( 'unseen' ); 55 $( '#tdakismetaction' ).removeClass( 'last' ); 56 } else { 57 $( '.trspammark' ).addClass( 'unseen' ); 58 $( '#tdakismetaction' ).addClass( 'last' ); 59 } 60 } 61 ); 62 63 } 64 ); 51 65 52 66 })( jQuery ); -
simpleform-akismet/trunk/includes/index.php
r2459305 r3125336 1 <?php // Silence is golden 1 <?php 2 /** 3 * Silence is golden. 4 * 5 * @package SimpleForm Akismet/includes 6 */ -
simpleform-akismet/trunk/index.php
r2459305 r3125336 1 <?php // Silence is golden 1 <?php 2 /** 3 * Silence is golden. 4 * 5 * @package SimpleForm Akismet 6 */ -
simpleform-akismet/trunk/simpleform-akismet.php
r2712284 r3125336 1 1 <?php 2 3 2 /** 4 3 * 5 * Plugin Name: SimpleForm Akismet 6 * Description: Do you get junk emails through your form? This SimpleForm addon helps prevent spam submission. To work properly you need an Akismet API Key. 7 * Version: 1.1.2 8 * Author: WPSForm Team 9 * Author URI: https://wpsform.com 10 * License: GPL-2.0+ 11 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 12 * Text Domain: simpleform-akismet 13 * Domain Path: /languages 4 * Plugin Name: SimpleForm Akismet 5 * Description: Do you get junk emails through your form? This SimpleForm addon helps prevent spam submission. To work properly you need an Akismet API Key. 6 * Version: 1.2.0 7 * Requires at least: 5.9 8 * Requires PHP: 7.4 9 * Author: SimpleForm Team 10 * License: GPL-2.0+ 11 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 12 * Text Domain: simpleform-akismet 13 * Requires Plugins: simpleform 14 14 * 15 * @package SimpleForm Akismet 15 16 */ 16 17 17 if ( ! defined( 'WPINC' ) ) { die; } 18 defined( 'WPINC' ) || exit; 18 19 19 20 /** 20 21 * Plugin constants. 21 22 * 22 * @since 1.023 * @since 1.0.0 23 24 */ 24 25 define( 'SIMPLEFORM_AKISMET_NAME', 'SimpleForm Akismet' ); 26 define( 'SIMPLEFORM_AKISMET_VERSION', '1. 1.2' );27 define( 'SIMPLEFORM_AKISMET_DB_VERSION', '1. 1.2' );25 26 define( 'SIMPLEFORM_AKISMET_NAME', 'SimpleForm Akismet' ); 27 define( 'SIMPLEFORM_AKISMET_VERSION', '1.2.0' ); 28 define( 'SIMPLEFORM_AKISMET_DB_VERSION', '1.2.0' ); 28 29 define( 'SIMPLEFORM_AKISMET_BASENAME', plugin_basename( __FILE__ ) ); 29 30 define( 'SIMPLEFORM_AKISMET_PATH', plugin_dir_path( __FILE__ ) ); 30 if ( ! defined('SIMPLEFORM_VERSION_REQUIRED') ) { define( 'SFORM_VERSION_REQUIRED', '2.1.7' ); } 31 if ( ! defined( 'SIMPLEFORM_VERSION_REQUIRED' ) ) { 32 define( 'SIMPLEFORM_VERSION_REQUIRED', '2.2.0' ); 33 } 31 34 32 35 /** 33 36 * The code that runs during plugin activation. 34 37 * 35 * @since 1.0 38 * @since 1.0.0 39 * 40 * @param bool $network_wide Whether to enable the plugin for all sites in the network 41 * or just the current site. Multisite only. Default false. 42 * 43 * @return void 36 44 */ 37 38 function activate_simpleform_akismet($network_wide) { 39 require_once plugin_dir_path( __FILE__ ) . 'includes/class-activator.php'; 40 SimpleForm_Akismet_Activator::activate($network_wide); 45 function activate_simpleform_akismet( $network_wide ) { 46 require_once plugin_dir_path( __FILE__ ) . 'includes/class-simpleform-akismet-activator.php'; 47 SimpleForm_Akismet_Activator::activate( $network_wide ); 41 48 } 42 49 43 /** 44 * Changesettings when a new site into a network is created.50 /** 51 * Edit settings when a new site into a network is created. 45 52 * 46 * @since 1.0 47 */ 48 49 function simpleform_akismet_on_create_blog($params) { 50 require_once plugin_dir_path( __FILE__ ) . 'includes/class-activator.php'; 51 SimpleForm_Akismet_Activator::on_create_blog($params); 53 * @since 1.0.0 54 * 55 * @param WP_Site $new_site New site object. 56 * 57 * @return void 58 */ 59 function simpleform_akismet_network( $new_site ) { 60 require_once plugin_dir_path( __FILE__ ) . 'includes/class-simpleform-akismet-activator.php'; 61 SimpleForm_Akismet_Activator::on_create_blog( $new_site ); 52 62 } 53 63 54 add_action( 'wp_insert_site', 'simpleform_akismet_ on_create_blog');64 add_action( 'wp_insert_site', 'simpleform_akismet_network' ); 55 65 56 66 /** 57 67 * The code that runs during plugin deactivation. 58 68 * 59 * @since 1.0 69 * @since 1.0.0 70 * 71 * @return void 60 72 */ 61 62 73 function deactivate_simpleform_akismet() { 63 require_once plugin_dir_path( __FILE__ ) . 'includes/class- deactivator.php';74 require_once plugin_dir_path( __FILE__ ) . 'includes/class-simpleform-akismet-deactivator.php'; 64 75 SimpleForm_Akismet_Deactivator::deactivate(); 65 76 } … … 71 82 * The core plugin class. 72 83 * 73 * @since 1.084 * @since 1.0.0 74 85 */ 75 76 require plugin_dir_path( __FILE__ ) . '/includes/class- core.php';86 87 require plugin_dir_path( __FILE__ ) . '/includes/class-simpleform-akismet.php'; 77 88 78 89 /** 79 90 * Begins execution of the plugin. 80 91 * 81 * @since 1.0 92 * @since 1.0.0 93 * 94 * @return void 82 95 */ 83 84 function run_SimpleForm_Akismet() { 96 function run_simpleform_akismet() { 85 97 86 98 $plugin = new SimpleForm_Akismet(); 87 99 $plugin->run(); 88 89 100 } 90 101 91 run_ SimpleForm_Akismet();102 run_simpleform_akismet(); -
simpleform-akismet/trunk/uninstall.php
r2508855 r3125336 1 1 <?php 2 3 2 /** 4 * Fi red when the plugin is uninstalled.3 * File delegated to the uninstalling the plugin. 5 4 * 6 * @ since 1.05 * @package SimpleForm Akismet 7 6 */ 8 7 9 // Prevent direct access. Exit if file is not called by WordPress. 10 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { 11 exit; 8 defined( 'WP_UNINSTALL_PLUGIN' ) || exit; 9 10 // Detect the simpleform plugin installation. 11 $plugin_file = defined( 'WP_PLUGIN_DIR' ) ? WP_PLUGIN_DIR . '/simpleform/simpleform.php' : ''; 12 13 if ( file_exists( $plugin_file ) ) { 14 15 global $wpdb; 16 17 if ( ! is_multisite() ) { 18 19 $settings = (array) get_option( 'sform_settings', array() ); 20 21 // Detect the parent plugin activation. 22 if ( $settings ) { 23 24 if ( isset( $settings['deletion_data'] ) && $settings['deletion_data'] ) { 25 26 $submissions_table = $wpdb->prefix . 'sform_submissions'; 27 $wpdb->query( "ALTER TABLE {$submissions_table} DROP COLUMN spam_parameters" ); // phpcs:ignore 28 29 } 30 31 $addon_settings = array( 32 'akismet' => $settings['akismet'], 33 'akismet_action' => $settings['akismet_action'], 34 'spam_mark' => $settings['spam_mark'], 35 'akismet_error' => $settings['akismet_error'], 36 ); 37 38 $new_settings = array_diff_key( $settings, $addon_settings ); 39 update_option( 'sform_settings', $new_settings ); 40 41 $shortcodes_table = $wpdb->prefix . 'sform_shortcodes'; 42 43 if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $shortcodes_table ) ) === $shortcodes_table ) { // phpcs:ignore 44 45 $forms = $wpdb->get_col( "SELECT id FROM {$wpdb->prefix}sform_shortcodes WHERE id != '1'" ); // phpcs:ignore 46 47 foreach ( $forms as $form ) { 48 49 $form_settings = (array) get_option( 'sform_' . $form . '_settings', array() ); 50 51 if ( $form_settings ) { 52 53 $addon_settings = array( 54 'akismet' => $form_settings['akismet'], 55 'akismet_action' => $form_settings['akismet_action'], 56 'spam_mark' => $form_settings['spam_mark'], 57 'akismet_error' => $form_settings['akismet_error'], 58 ); 59 60 $new_form_settings = array_diff_key( $form_settings, $addon_settings ); 61 update_option( 'sform_' . $form . '_settings', $new_form_settings ); 62 63 } 64 } 65 } 66 } 67 68 delete_option( 'sform_aks_db_version' ); 69 70 } else { 71 72 $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); // phpcs:ignore 73 $original_blog_id = get_current_blog_id(); 74 75 foreach ( $blog_ids as $blogid ) { 76 77 switch_to_blog( $blogid ); 78 $settings = (array) get_option( 'sform_settings', array() ); 79 80 // Detect the parent plugin activation. 81 if ( $settings ) { 82 83 if ( isset( $settings['deletion_data'] ) && $settings['deletion_data'] ) { 84 85 $submissions_table = $wpdb->prefix . 'sform_submissions'; 86 $wpdb->query( "ALTER TABLE {$submissions_table} DROP COLUMN spam_parameters" ); // phpcs:ignore 87 88 } 89 90 $addon_settings = array( 91 'akismet' => $settings['akismet'], 92 'akismet_action' => $settings['akismet_action'], 93 'spam_mark' => $settings['spam_mark'], 94 'akismet_error' => $settings['akismet_error'], 95 ); 96 97 $new_settings = array_diff_key( $settings, $addon_settings ); 98 update_option( 'sform_settings', $new_settings ); 99 100 $shortcodes_table = $wpdb->prefix . 'sform_shortcodes'; 101 102 if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $shortcodes_table ) ) === $shortcodes_table ) { // phpcs:ignore 103 104 $forms = $wpdb->get_col( "SELECT id FROM {$wpdb->prefix}sform_shortcodes WHERE id != '1'" ); // phpcs:ignore 105 106 foreach ( $forms as $form ) { 107 108 $form_settings = (array) get_option( 'sform_' . $form . '_settings', array() ); 109 110 if ( $form_settings ) { 111 112 $addon_settings = array( 113 'akismet' => $form_settings['akismet'], 114 'akismet_action' => $form_settings['akismet_action'], 115 'spam_mark' => $form_settings['spam_mark'], 116 'akismet_error' => $form_settings['akismet_error'], 117 ); 118 119 $new_form_settings = array_diff_key( $form_settings, $addon_settings ); 120 update_option( 'sform_' . $form . '_settings', $new_form_settings ); 121 122 } 123 } 124 } 125 } 126 127 delete_option( 'sform_aks_db_version' ); 128 129 } 130 131 switch_to_blog( $original_blog_id ); 132 133 } 134 } else { 135 136 global $wpdb; 137 $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'sform_submissions' ); // phpcs:ignore 138 $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'sform_shortcodes' ); // phpcs:ignore 139 $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'sform\_%'" ); // phpcs:ignore 140 $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'sform\-%'" ); // phpcs:ignore 141 $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '%\_sform\_%'" ); // phpcs:ignore 142 12 143 } 13 14 // Detect core plugin15 $plugin_file = 'simpleform/simpleform.php';16 if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_file ) ) {17 18 if ( !is_multisite() ) {19 $settings = get_option('sform_settings');20 if ( $settings ) {21 if ( isset( $settings['deletion_data'] ) && esc_attr($settings['deletion_data']) == 'true' ) {22 global $wpdb;23 $prefix = $wpdb->prefix;24 $submissions_table = $prefix . 'sform_submissions';25 $wpdb->query("ALTER TABLE $submissions_table DROP COLUMN spam_parameters");26 $sform_addon_settings = array( 'akismet' => $settings['akismet'], 'akismet_action' => $settings['akismet_action'], 'spam_mark' => $settings['spam_mark'], 'akismet_error' => $settings['akismet_error'] );27 $sform_core_settings = array_diff_key($settings,$sform_addon_settings);28 update_option('sform_settings', $sform_core_settings);29 $shortcodes_table = $wpdb->prefix . 'sform_shortcodes';30 $ids = $wpdb->get_col("SELECT id FROM `$shortcodes_table` WHERE id != '1'");31 if ( $ids ) {32 foreach ( $ids as $id ) {33 $form_settings = get_option('sform_'.$id.'_settings');34 if ( $form_settings != false ) {35 $form_settings_nv = array_diff_key($form_settings,$sform_addon_settings);36 update_option('sform_'.$id.'_settings', $form_settings_nv);37 }38 }39 }40 }41 }42 else {43 global $wpdb;44 $prefix = $wpdb->prefix;45 $submissions_table = $prefix . 'sform_submissions';46 $wpdb->query("ALTER TABLE $submissions_table DROP COLUMN spam_parameters");47 }48 delete_option( 'sform_aks_db_version' );49 }50 else {51 global $wpdb;52 $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );53 $original_blog_id = get_current_blog_id();54 foreach ( $blog_ids as $blog_id ) {55 switch_to_blog( $blog_id );56 $settings = get_option('sform_settings');57 if ( $settings ) {58 if ( isset( $settings['deletion_data'] ) && esc_attr($settings['deletion_data']) == 'true' ) {59 $prefix = $wpdb->prefix;60 $submissions_table = $prefix . 'sform_submissions';61 $wpdb->query("ALTER TABLE $submissions_table DROP spam_parameters");62 $sform_addon_settings = array( 'akismet' => $settings['akismet'], 'akismet_action' => $settings['akismet_action'], 'akismet_error' => $settings['akismet_error'] );63 $sform_core_settings = array_diff_key($settings,$sform_addon_settings);64 update_option('sform_settings', $sform_core_settings);65 $shortcodes_table = $wpdb->prefix . 'sform_shortcodes';66 $ids = $wpdb->get_col("SELECT id FROM `$shortcodes_table` WHERE id != '1'");67 if ( $ids ) {68 foreach ( $ids as $id ) {69 $form_settings = get_option('sform_'.$id.'_settings');70 if ( $form_settings != false ) {71 $form_settings_nv = array_diff_key($form_settings,$sform_addon_settings);72 update_option('sform_'.$id.'_settings', $form_settings_nv);73 }74 }75 }76 }77 }78 else {79 $prefix = $wpdb->prefix;80 $submissions_table = $prefix . 'sform_submissions';81 $wpdb->query("ALTER TABLE $submissions_table DROP spam_parameters");82 }83 delete_option( 'sform_aks_db_version' );84 }85 switch_to_blog( $original_blog_id );86 }87 }88 else {89 global $wpdb;90 $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'sform_submissions' );91 $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'sform\_%'" );92 $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'sform\-%'" );93 $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '%\_sform\_%'" );94 }
Note: See TracChangeset
for help on using the changeset viewer.