Plugin Directory

Changeset 3442109


Ignore:
Timestamp:
01/18/2026 09:06:41 PM (7 weeks ago)
Author:
vzisis
Message:

Fix warnings in uninstall.php and bump version to 0.3.3

Location:
editorial-workflow-manager/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • editorial-workflow-manager/trunk/editorial-workflow-manager.php

    r3442098 r3442109  
    44 * Plugin Name: Editorial Workflow Manager
    55 * Description: Add editorial checklists and approvals to the WordPress editor.
    6  * Version:     0.3.2
     6 * Version:     0.3.3
    77 * Author:      Vasileios Zisis
    88 * Author URI:  https://profiles.wordpress.org/vzisis/
     
    2020{
    2121
    22     const VERSION = '0.3.2';
     22    const VERSION = '0.3.3';
    2323
    2424    private static $instance = null;
  • editorial-workflow-manager/trunk/readme.txt

    r3442098 r3442109  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 0.3.2
     7Stable tag: 0.3.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    101101== Changelog ==
    102102
     103= 0.3.3 =
     104* Small syntax fix in uninstall.php.
     105
    103106= 0.3.2 =
    104107* Added uninstall.php cleanup to remove plugin data when the plugin is deleted.
  • editorial-workflow-manager/trunk/uninstall.php

    r3442098 r3442109  
    5252}
    5353
    54 if (is_multisite()) {
    55     $sites = get_sites(
    56         [
    57             'fields' => 'ids',
    58         ]
    59     );
     54/**
     55 * Run uninstall for single-site or multisite.
     56 *
     57 * @return void
     58 */
     59function ediworman_uninstall()
     60{
     61    if (is_multisite()) {
     62        $ediworman_site_ids = get_sites(
     63            [
     64                'fields' => 'ids',
     65            ]
     66        );
    6067
    61     foreach ($sites as $site_id) {
    62         switch_to_blog((int) $site_id);
    63         ediworman_uninstall_cleanup_site();
    64         restore_current_blog();
     68        foreach ($ediworman_site_ids as $ediworman_site_id) {
     69            switch_to_blog((int) $ediworman_site_id);
     70            ediworman_uninstall_cleanup_site();
     71            restore_current_blog();
     72        }
     73
     74        // In case anything was stored at network level in the future.
     75        delete_site_option('ediworman_settings');
     76        return;
    6577    }
    6678
    67     // In case anything was stored at network level in the future.
    68     delete_site_option('ediworman_settings');
    69 } else {
    7079    ediworman_uninstall_cleanup_site();
    7180}
     81
     82ediworman_uninstall();
Note: See TracChangeset for help on using the changeset viewer.