Plugin Directory

Changeset 1808742


Ignore:
Timestamp:
01/24/2018 04:22:30 PM (8 years ago)
Author:
madesnappy
Message:

fixed issue causing internal server error when deleting plugin

Location:
snappy-list-builder
Files:
155 added
2 edited

Legend:

Unmodified
Added
Removed
  • snappy-list-builder/trunk/readme.txt

    r1808310 r1808742  
    55Requires at least: 4.0
    66Tested up to: 4.9.2
    7 Stable tag: 1.0.1.3
     7Stable tag: 1.0.1.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8686* Added better compatibility with Advanced Custom Fields plugin
    8787
     88= 1.0.1.4 =
     89* Fixed issue causing internal server error when deleting plugin
     90
    8891== Upgrade Notice ==
    8992
  • snappy-list-builder/trunk/snappy-list-builder.php

    r1808310 r1808742  
    55Plugin URI: http://wordpressplugincourse.com/plugins/snappy-list-builder
    66Description: The ultimate email list building plugin for WordPress. Capture new subscribers. Reward subscribers with a custom download upon opt-in. Build unlimited lists. Import and export subscribers easily with .csv
    7 Version: 1.0.1.3
     7Version: 1.0.1.4
    88Author: Joel Funk @ Made Snappy
    99Author URI: https://madesnappy.com
     
    15211521       
    15221522        // get our custom table name
    1523         $table_name = $wpdb->prefix . "posts";
     1523        $table_name = $wpdb->posts;
    15241524       
    15251525        // set up custom post types array
     
    15311531        // remove data from the posts db table where post types are equal to our custom post types
    15321532        $data_removed = $wpdb->query(
    1533             $wpdb->prepare(
    1534                 "
    1535                     DELETE FROM $table_name
    1536                     WHERE post_type = %s OR post_type = %s
    1537                 ",
    1538                 $custom_post_types[0],
    1539                 $custom_post_types[1]
    1540             )
     1533            "
     1534                DELETE FROM $table_name
     1535                WHERE post_type = {$custom_post_types[0]} OR post_type = {$custom_post_types[1]}
     1536            "
    15411537        );
    15421538       
    15431539        // get the table names for postmet and posts with the correct prefix
    1544         $table_name_1 = $wpdb->prefix . "postmeta";
    1545         $table_name_2 = $wpdb->prefix . "posts";
     1540        $table_name_1 = $wpdb->postmeta;
     1541        $table_name_2 = $wpdb->post;
    15461542       
    15471543        // delete orphaned meta data
    15481544        $wpdb->query(
    1549             $wpdb->prepare(
    1550                 "
    1551                 DELETE pm
    1552                 FROM $table_name_1 pm
    1553                 LEFT JOIN $table_name_1 wp ON wp.ID = pm.post_id
    1554                 WHERE wp.ID IS NULL
    1555                 "
    1556             )
     1545            "
     1546            DELETE pm
     1547            FROM $table_name_1 pm
     1548            LEFT JOIN $table_name_1 wp ON wp.ID = pm.post_id
     1549            WHERE wp.ID IS NULL
     1550            "
    15571551        );
    15581552       
Note: See TracChangeset for help on using the changeset viewer.