Plugin Directory

Changeset 2961062


Ignore:
Timestamp:
08/31/2023 09:52:24 AM (3 years ago)
Author:
markomaksym
Message:

Tested up to WP 6.3.

Location:
share-buddypress-activity-pluso
Files:
788 added
17 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • share-buddypress-activity-pluso/tags/1.0/includes/admin/assets/css/style.css

    r1998840 r2961062  
    11/*css styles*/
    2 .mx-block_wrap {
     2.mxdnsmsmx_block_wrap {
    33    position: relative;
    44    margin-top: 20px;
     
    1010    background: #fff;
    1111}
    12 .mx-block_wrap textarea {
     12.mxdnsmsmx_block_wrap textarea {
    1313    width: 100%;
    1414    height: 100px;
    1515}
    1616.mx-submit_button_wrap {
    17     text-align: right;
     17    text-align: center;
    1818}
    1919.mx-restore_data {
     
    3434    padding: 6px;
    3535}
    36 .mx-block_wrap .thickbox img {
     36.mxdnsmsmx_block_wrap .thickbox img {
    3737    width: 200px;
    3838}
     39.mxdnsms_countries_wrapper {
     40    display: flex;
     41    flex-wrap: wrap;
     42    justify-content: space-between;
     43}
     44.mxdnsms_countries_wrapper > div {
     45    padding: 10px;
     46    border: 1px solid #333;
     47    margin: 0 5px 5px 0;
     48}
     49.mxdnsms_country_blocked {
     50    background-color: #f5b5b5 !important;
     51}
     52.mx-attention {
     53    background: #f5b5b5 !important;
     54    padding: 20px;
     55}
  • share-buddypress-activity-pluso/tags/1.0/includes/admin/assets/js/script.js

    r1998840 r2961062  
    1 jQuery( document ).ready( function( $ ){
     1jQuery(document).ready(function ($) {
    22
    3     $( '#mxsbap_form_update' ).on( 'submit', function( e ){
     3    // Edit table item
     4    $('#mxdnsms_form_update').on('submit', function (e) {
    45
    56        e.preventDefault();
    67
    7         var nonce = $( '#mxsbap_wpnonce' ).val();
    8         var script_string = $( '#mxsbap_script_body' ).val();
    9         var block_string = $( '#mxsbap_block_body' ).val();
    10         var is_checked_restore = $( '#mxsbap_restore_data' ).prop( 'checked' );
    11         var start_restore = is_checked_restore === true ? 'restore' : '0';
    12         var current_url = $( '#mxsbap_current_url' ).val();
     8        var nonce = $(this).find('#mxdnsms_wpnonce').val();
     9
     10        var countries = [];
     11
     12        $('.mxdnsms_countries').each(function() {
     13            if($(this).is(':checked')) {
     14                countries.push($(this).val());
     15            }
     16        });
    1317
    1418        var data = {
    1519
    16             'action': 'mxsbap_update',
     20            'action': 'mxdnsms_update',
    1721            'nonce': nonce,
    18             'script_string': script_string,
    19             'block_string': block_string,
    20             'is_checked_restore': start_restore,
    21             'current_url': current_url
     22            'countries': countries
    2223
    2324        };
    2425
    25         jQuery.post( ajaxurl, data, function( response ){
     26        jQuery.post(mxdnsms_admin_localize.ajaxurl, data, function (response) {
    2627
     28            // console.log(response);
     29            alert('Saved');
    2730
    28             if( data.is_checked_restore === 'restore' ){
     31        });
    2932
    30                 setTimeout( function(){
     33    });
    3134
    32                     window.location.href = data.current_url;
     35    // highlight block
     36    $( '.mxdnsms_countries' ).on('change', function() {
     37        $(this).parent().toggleClass('mxdnsms_country_blocked');
     38    });
    3339
    34                 }, 100 );
    35                
    36             }
    37 
    38             alert( 'Changes saved!' );
    39 
    40         } );       
    41 
    42     } );
    43 
    44 } );
     40});
  • share-buddypress-activity-pluso/tags/1.0/includes/core/helpers.php

    r1998840 r2961062  
    22
    33// Exit if accessed directly
    4 if ( ! defined( 'ABSPATH' ) ) exit;
     4if (!defined('ABSPATH')) exit;
    55
    66/*
    7 * Require template for admin panel
     7* Require class for admin panel
    88*/
    9 function mxsbap_require_template_admin( $file ) {
     9function mxdnsmsRequireClassFileAdmin( $file ) {
    1010
    11     require_once MXSBAP_PLUGIN_ABS_PATH . 'includes\admin\templates\\' . $file;
     11    require_once MXDNSMS_PLUGIN_ABS_PATH . 'includes/admin/classes/' . $file;
     12
     13}
     14
     15
     16/*
     17* Require class for frontend panel
     18*/
     19function mxdnsmsRequireClassFileFrontend( $file ) {
     20
     21    require_once MXDNSMS_PLUGIN_ABS_PATH . 'includes/frontend/classes/' . $file;
    1222
    1323}
    1424
    1525/*
    16 * Script
     26* Require a Model
    1727*/
    18 function mxsbap_select_script() {
     28function mxdnsmsUseModel( $model ) {
    1929
    20     global $wpdb;
    21 
    22     $table_name = $wpdb->prefix . MXSBAP_TABLE_SLUG;
    23 
    24     $get_scripts_string = $wpdb->get_row( "SELECT script FROM $table_name WHERE id = 1" );
    25 
    26     return $get_scripts_string->script;
     30    require_once MXDNSMS_PLUGIN_ABS_PATH . 'includes/admin/models/' . $model . '.php';
    2731
    2832}
    2933
    3034/*
    31 * Block for icons
     35* Debugging
    3236*/
    33 function mxsbap_select_block_icons() {
     37function mxdnsmsDebugToFile( $content ) {
    3438
    35     global $wpdb;
     39    $content = mxdnsmsContentToString( $content );
    3640
    37     $table_name = $wpdb->prefix . MXSBAP_TABLE_SLUG;
     41    $path = MXDNSMS_PLUGIN_ABS_PATH . 'mx-debug' ;
    3842
    39     $get_scripts_string = $wpdb->get_row( "SELECT block_icons FROM $table_name WHERE id = 1" );
     43    if (!file_exists($path)) {
    4044
    41     return $get_scripts_string->block_icons;
     45        mkdir( $path, 0777, true );
     46
     47        file_put_contents( $path . '/mx-debug.txt', $content );
     48
     49    } else {
     50
     51        file_put_contents( $path . '/mx-debug.txt', $content );
     52
     53    }
     54
     55}
     56    // pretty debug text to the file
     57    function mxdnsmsContentToString( $content ) {
     58
     59        ob_start();
     60
     61        var_dump( $content );
     62
     63        return ob_get_clean();
     64
     65    }
     66
     67/*
     68* Manage posts columns. Add column to position
     69*/
     70function mxdnsmsInsertNewColumnToPosition( array $columns, int $position, array $newColumn ) {
     71
     72    $chunkedArray = array_chunk( $columns, $position, true );
     73
     74    $result = array_merge( $chunkedArray[0], $newColumn, $chunkedArray[1] );
     75
     76    return $result;
    4277
    4378}
    4479
    4580/*
    46 * Decode the line of code
     81* Redirect from admin panel
    4782*/
    48 function mxsbap_decode_line_code( $string_code ) {
     83function mxdnsmsAdminRedirect( $url ) {
    4984
    50     // Get a permanent link to an activity item
    51     $permalink = esc_url( bp_get_activity_thread_permalink() );
     85    if (!$url) return;
    5286
    53     // Get the name of the site
    54     $title = get_bloginfo( 'name' );
    55 
    56     // Get the description of the activity element
    57     $description = trim( substr( strip_tags( bp_get_activity_content_body() ), 0, 400 ) );
    58    
    59     // replace single quotes
    60     $show_single_quotes = str_replace( ''', '\'', $string_code );
    61 
    62     // special string url
    63     $replase_special_string_url = str_replace( '%PAGE-URL%', $permalink, $show_single_quotes );
    64 
    65     // special string title
    66     $replase_special_string_title = str_replace( '%TITLE%', $title, $replase_special_string_url );
    67 
    68     // special string description
    69     $replase_special_string_description = str_replace( '%DESCRIPTION%', $description, $replase_special_string_title );
    70 
    71     return wp_specialchars_decode( $replase_special_string_description, ENT_COMPAT );
     87    add_action( 'admin_footer', function() use ( $url ) {
     88        echo "<script>window.location.href = '$url';</script>";
     89    } );
    7290
    7391}
     92
     93/*
     94* Get black list
     95*/
     96function mxdnsmsGetBlackList() {
     97
     98    return maybe_unserialize( get_option('mxdnsms_black_list', []) );
     99
     100}
  • share-buddypress-activity-pluso/tags/1.0/readme.txt

    r1998840 r2961062  
    1 === Share BuddyPress activity Pluso ===
     1=== Block by Country ===
    22Contributors: markomaksym
    3 Tags: buddypress, buddypress share, buddypress social share
    4 Requires at least: 4.7
    5 Tested up to: 4.9
    6 Stable tag: 1.0
     3Tags: block country, block location, ip address
     4Requires at least: 5.3
     5Tested up to: 6.3
     6Stable tag: 1.5
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     9    WPP Generator Version:        5.3.4
     10    WPP Generator Author:         Maksym Marko
     11    WPP Generator Author Website: https://markomaksym.com.ua/
     12    WPP Generator Video Guide:    https://www.youtube.com/watch?v=6PZbXBhxtN0&list=PLqb2a5jr0z4XRwroV3nA9nAe4596lPjxr
    913
    10 This plugin will help your users share Buddypress activity items.
     14Restrict access to your website to users from certain countries.
    1115
    1216== Description ==
    1317
    14 This plugin will help your users share Buddypress activity items. The plugin is based on the PLUSO-service (http://share.pluso.ru/). You and your users can share news on various social networks.
    15 Buttons "sharing into social networks", displayed in the activity stream* and individually on the page of one item.
    16 *If you click the "Load More" button, it will not work for uploaded items.
     18<p>
     19<strong>This plugin is NOT compatible with most caching plugins.</strong>
     20</p>
     21
     22<p>
     23Make sure you have NOT selected <strong>your own country</strong>. Otherwise, you will not be able to access your site.
     24</p>
     25
     26<p>
     27This plugin helps you restrict access to your website to users from certain countries. You can choose counties which users can not get access to your website from.
     28</p>
    1729
    1830== Installation ==
     
    2133
    22341. Visit 'Plugins > Add New'
    23 2. Search for 'Share BuddyPress activity Pluso'
     352. Search for 'Block by Country'
    24363. Activate the plugin from your Plugins page.
    25 4. In the admin panel you can customize the social buttons you need.
     374. Select the countries you want to block.
    2638
    2739= From WordPress.org =
    2840
    29 1. Download 'Share BuddyPress activity Pluso'.
    30 2. Upload the 'Share BuddyPress activity Pluso' directory to your '/wp-content/plugins/' directory, using your favorite method (ftp, sftp, scp, etc...)
    31 3. Activate 'Share BuddyPress activity Pluso' from your Plugins page.
    32 4. In the admin panel you can customize the social buttons you need.
     411. Download 'Block by Country'.
     422. Upload the 'Block by Country' directory to your '/wp-content/plugins/' directory, using your favorite method (ftp, sftp, scp, etc...)
     433. Activate 'Block by Country' from your Plugins page.
     444. Select the countries you want to block.
    3345
    3446== Screenshots ==
    3547
    36 1. This is a block with buttons
    37 2. Dashboard
     481. Settings page
     492. How blocked users will see your site
    3850
    3951== Changelog ==
    4052
     53= 1.5 =
     54* Block countries.
     55
    4156= 1.0 =
    42 * Block "Share in social networks" for activity elements is added.
     57* Block one country.
  • share-buddypress-activity-pluso/tags/1.0/uninstall.php

    r1998840 r2961062  
    11<?php
    22
    3 // Exit if accessed directly
    4 if ( ! defined( 'ABSPATH' ) ) exit;
    5 
    6 /*
    7 * Uninstall Plugin
    8 */
    9 if ( __FILE__ != WP_UNINSTALL_PLUGIN ) return;
    10            
    11 global $wpdb;
    12 
    13 // table name
    14 $table_names = array();
    15 
    16 $table_names[] = $wpdb->prefix . 'mxsbap_share_table';
    17 
    18 // drop table(s);
    19 foreach( $table_names as $table_name ){
    20 
    21     $sql = 'DROP TABLE IF EXISTS ' . $table_name . ';';
    22 
    23     $wpdb->query($sql);
    24 
    25 }
     3// uninstall
     4if (!defined('WP_UNINSTALL_PLUGIN')) die();
  • share-buddypress-activity-pluso/trunk/includes/admin/assets/css/style.css

    r1869093 r2961062  
    11/*css styles*/
    2 .mx-block_wrap {
     2.mxdnsmsmx_block_wrap {
    33    position: relative;
    44    margin-top: 20px;
     
    1010    background: #fff;
    1111}
    12 .mx-block_wrap textarea {
     12.mxdnsmsmx_block_wrap textarea {
    1313    width: 100%;
    1414    height: 100px;
    1515}
    1616.mx-submit_button_wrap {
    17     text-align: right;
     17    text-align: center;
    1818}
    1919.mx-restore_data {
     
    3434    padding: 6px;
    3535}
    36 .mx-block_wrap .thickbox img {
     36.mxdnsmsmx_block_wrap .thickbox img {
    3737    width: 200px;
    3838}
     39.mxdnsms_countries_wrapper {
     40    display: flex;
     41    flex-wrap: wrap;
     42    justify-content: space-between;
     43}
     44.mxdnsms_countries_wrapper > div {
     45    padding: 10px;
     46    border: 1px solid #333;
     47    margin: 0 5px 5px 0;
     48}
     49.mxdnsms_country_blocked {
     50    background-color: #f5b5b5 !important;
     51}
     52.mx-attention {
     53    background: #f5b5b5 !important;
     54    padding: 20px;
     55}
  • share-buddypress-activity-pluso/trunk/includes/admin/assets/js/script.js

    r1869093 r2961062  
    1 jQuery( document ).ready( function( $ ){
     1jQuery(document).ready(function ($) {
    22
    3     $( '#mxsbap_form_update' ).on( 'submit', function( e ){
     3    // Edit table item
     4    $('#mxdnsms_form_update').on('submit', function (e) {
    45
    56        e.preventDefault();
    67
    7         var nonce = $( '#mxsbap_wpnonce' ).val();
    8         var script_string = $( '#mxsbap_script_body' ).val();
    9         var block_string = $( '#mxsbap_block_body' ).val();
    10         var is_checked_restore = $( '#mxsbap_restore_data' ).prop( 'checked' );
    11         var start_restore = is_checked_restore === true ? 'restore' : '0';
    12         var current_url = $( '#mxsbap_current_url' ).val();
     8        var nonce = $(this).find('#mxdnsms_wpnonce').val();
     9
     10        var countries = [];
     11
     12        $('.mxdnsms_countries').each(function() {
     13            if($(this).is(':checked')) {
     14                countries.push($(this).val());
     15            }
     16        });
    1317
    1418        var data = {
    1519
    16             'action': 'mxsbap_update',
     20            'action': 'mxdnsms_update',
    1721            'nonce': nonce,
    18             'script_string': script_string,
    19             'block_string': block_string,
    20             'is_checked_restore': start_restore,
    21             'current_url': current_url
     22            'countries': countries
    2223
    2324        };
    2425
    25         jQuery.post( ajaxurl, data, function( response ){
     26        jQuery.post(mxdnsms_admin_localize.ajaxurl, data, function (response) {
    2627
     28            // console.log(response);
     29            alert('Saved');
    2730
    28             if( data.is_checked_restore === 'restore' ){
     31        });
    2932
    30                 setTimeout( function(){
     33    });
    3134
    32                     window.location.href = data.current_url;
     35    // highlight block
     36    $( '.mxdnsms_countries' ).on('change', function() {
     37        $(this).parent().toggleClass('mxdnsms_country_blocked');
     38    });
    3339
    34                 }, 100 );
    35                
    36             }
    37 
    38             alert( 'Changes saved!' );
    39 
    40         } );       
    41 
    42     } );
    43 
    44 } );
     40});
  • share-buddypress-activity-pluso/trunk/includes/core/helpers.php

    r1998840 r2961062  
    22
    33// Exit if accessed directly
    4 if ( ! defined( 'ABSPATH' ) ) exit;
     4if (!defined('ABSPATH')) exit;
    55
    66/*
    7 * Require template for admin panel
     7* Require class for admin panel
    88*/
    9 function mxsbap_require_template_admin( $file ) {
     9function mxdnsmsRequireClassFileAdmin( $file ) {
    1010
    11     require_once MXSBAP_PLUGIN_ABS_PATH . 'includes/admin/templates/' . $file;
     11    require_once MXDNSMS_PLUGIN_ABS_PATH . 'includes/admin/classes/' . $file;
     12
     13}
     14
     15
     16/*
     17* Require class for frontend panel
     18*/
     19function mxdnsmsRequireClassFileFrontend( $file ) {
     20
     21    require_once MXDNSMS_PLUGIN_ABS_PATH . 'includes/frontend/classes/' . $file;
    1222
    1323}
    1424
    1525/*
    16 * Script
     26* Require a Model
    1727*/
    18 function mxsbap_select_script() {
     28function mxdnsmsUseModel( $model ) {
    1929
    20     global $wpdb;
    21 
    22     $table_name = $wpdb->prefix . MXSBAP_TABLE_SLUG;
    23 
    24     $get_scripts_string = $wpdb->get_row( "SELECT script FROM $table_name WHERE id = 1" );
    25 
    26     return $get_scripts_string->script;
     30    require_once MXDNSMS_PLUGIN_ABS_PATH . 'includes/admin/models/' . $model . '.php';
    2731
    2832}
    2933
    3034/*
    31 * Block for icons
     35* Debugging
    3236*/
    33 function mxsbap_select_block_icons() {
     37function mxdnsmsDebugToFile( $content ) {
    3438
    35     global $wpdb;
     39    $content = mxdnsmsContentToString( $content );
    3640
    37     $table_name = $wpdb->prefix . MXSBAP_TABLE_SLUG;
     41    $path = MXDNSMS_PLUGIN_ABS_PATH . 'mx-debug' ;
    3842
    39     $get_scripts_string = $wpdb->get_row( "SELECT block_icons FROM $table_name WHERE id = 1" );
     43    if (!file_exists($path)) {
    4044
    41     return $get_scripts_string->block_icons;
     45        mkdir( $path, 0777, true );
     46
     47        file_put_contents( $path . '/mx-debug.txt', $content );
     48
     49    } else {
     50
     51        file_put_contents( $path . '/mx-debug.txt', $content );
     52
     53    }
     54
     55}
     56    // pretty debug text to the file
     57    function mxdnsmsContentToString( $content ) {
     58
     59        ob_start();
     60
     61        var_dump( $content );
     62
     63        return ob_get_clean();
     64
     65    }
     66
     67/*
     68* Manage posts columns. Add column to position
     69*/
     70function mxdnsmsInsertNewColumnToPosition( array $columns, int $position, array $newColumn ) {
     71
     72    $chunkedArray = array_chunk( $columns, $position, true );
     73
     74    $result = array_merge( $chunkedArray[0], $newColumn, $chunkedArray[1] );
     75
     76    return $result;
    4277
    4378}
    4479
    4580/*
    46 * Decode the line of code
     81* Redirect from admin panel
    4782*/
    48 function mxsbap_decode_line_code( $string_code ) {
     83function mxdnsmsAdminRedirect( $url ) {
    4984
    50     // Get a permanent link to an activity item
    51     $permalink = esc_url( bp_get_activity_thread_permalink() );
     85    if (!$url) return;
    5286
    53     // Get the name of the site
    54     $title = get_bloginfo( 'name' );
    55 
    56     // Get the description of the activity element
    57     $description = trim( substr( strip_tags( bp_get_activity_content_body() ), 0, 400 ) );
    58    
    59     // replace single quotes
    60     $show_single_quotes = str_replace( '&#039;', '\'', $string_code );
    61 
    62     // special string url
    63     $replase_special_string_url = str_replace( '%PAGE-URL%', $permalink, $show_single_quotes );
    64 
    65     // special string title
    66     $replase_special_string_title = str_replace( '%TITLE%', $title, $replase_special_string_url );
    67 
    68     // special string description
    69     $replase_special_string_description = str_replace( '%DESCRIPTION%', $description, $replase_special_string_title );
    70 
    71     return wp_specialchars_decode( $replase_special_string_description, ENT_COMPAT );
     87    add_action( 'admin_footer', function() use ( $url ) {
     88        echo "<script>window.location.href = '$url';</script>";
     89    } );
    7290
    7391}
     92
     93/*
     94* Get black list
     95*/
     96function mxdnsmsGetBlackList() {
     97
     98    return maybe_unserialize( get_option('mxdnsms_black_list', []) );
     99
     100}
  • share-buddypress-activity-pluso/trunk/readme.txt

    r1998840 r2961062  
    1 === Share BuddyPress activity Pluso ===
     1=== Block by Country ===
    22Contributors: markomaksym
    3 Tags: buddypress, buddypress share, buddypress social share
    4 Requires at least: 4.7
    5 Tested up to: 5.0
    6 Stable tag: 1.0.1
     3Tags: block country, block location, ip address
     4Requires at least: 5.3
     5Tested up to: 6.3
     6Stable tag: 1.5
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     9    WPP Generator Version:        5.3.4
     10    WPP Generator Author:         Maksym Marko
     11    WPP Generator Author Website: https://markomaksym.com.ua/
     12    WPP Generator Video Guide:    https://www.youtube.com/watch?v=6PZbXBhxtN0&list=PLqb2a5jr0z4XRwroV3nA9nAe4596lPjxr
    913
    10 This plugin will help your users share Buddypress activity items.
     14Restrict access to your website to users from certain countries.
    1115
    1216== Description ==
    1317
    14 This plugin will help your users share Buddypress activity items. The plugin is based on the PLUSO-service (http://share.pluso.ru/). You and your users can share news on various social networks.
    15 Buttons "sharing into social networks", displayed in the activity stream* and individually on the page of one item.
    16 *If you click the "Load More" button, it will not work for uploaded items.
     18<p>
     19<strong>This plugin is NOT compatible with most caching plugins.</strong>
     20</p>
     21
     22<p>
     23Make sure you have NOT selected <strong>your own country</strong>. Otherwise, you will not be able to access your site.
     24</p>
     25
     26<p>
     27This plugin helps you restrict access to your website to users from certain countries. You can choose counties which users can not get access to your website from.
     28</p>
    1729
    1830== Installation ==
     
    2133
    22341. Visit 'Plugins > Add New'
    23 2. Search for 'Share BuddyPress activity Pluso'
     352. Search for 'Block by Country'
    24363. Activate the plugin from your Plugins page.
    25 4. In the admin panel you can customize the social buttons you need.
     374. Select the countries you want to block.
    2638
    2739= From WordPress.org =
    2840
    29 1. Download 'Share BuddyPress activity Pluso'.
    30 2. Upload the 'Share BuddyPress activity Pluso' directory to your '/wp-content/plugins/' directory, using your favorite method (ftp, sftp, scp, etc...)
    31 3. Activate 'Share BuddyPress activity Pluso' from your Plugins page.
    32 4. In the admin panel you can customize the social buttons you need.
     411. Download 'Block by Country'.
     422. Upload the 'Block by Country' directory to your '/wp-content/plugins/' directory, using your favorite method (ftp, sftp, scp, etc...)
     433. Activate 'Block by Country' from your Plugins page.
     444. Select the countries you want to block.
    3345
    3446== Screenshots ==
    3547
    36 1. This is a block with buttons
    37 2. Dashboard
     481. Settings page
     492. How blocked users will see your site
    3850
    3951== Changelog ==
    4052
     53= 1.5 =
     54* Block countries.
     55
    4156= 1.0 =
    42 * Block "Share in social networks" for activity elements is added.
    43 
    44 = 1.0.1 =
    45 * Fixed path error
     57* Block one country.
  • share-buddypress-activity-pluso/trunk/uninstall.php

    r1869093 r2961062  
    11<?php
    22
    3 // Exit if accessed directly
    4 if ( ! defined( 'ABSPATH' ) ) exit;
    5 
    6 /*
    7 * Uninstall Plugin
    8 */
    9 if ( __FILE__ != WP_UNINSTALL_PLUGIN ) return;
    10            
    11 global $wpdb;
    12 
    13 // table name
    14 $table_names = array();
    15 
    16 $table_names[] = $wpdb->prefix . 'mxsbap_share_table';
    17 
    18 // drop table(s);
    19 foreach( $table_names as $table_name ){
    20 
    21     $sql = 'DROP TABLE IF EXISTS ' . $table_name . ';';
    22 
    23     $wpdb->query($sql);
    24 
    25 }
     3// uninstall
     4if (!defined('WP_UNINSTALL_PLUGIN')) die();
Note: See TracChangeset for help on using the changeset viewer.