Plugin Directory

Changeset 3106187

Timestamp:
06/23/2024 11:50:34 AM (6 weeks ago)
Author:
whiteshadow
Message:

Add an option to automatically delete settings associated with missing roles and users. It's enabled by default on regular sites.

This currently applies only to certain settings, such as login redirects. "Missing" means that the role or user doesn't exist on the current site. This can happen if the role or user is deleted, or if plugin settings are copied from a site where the role/user exists to one where they don't. In Multisite, it can also happen if different subsites have different available roles, so this option is disabled by default in Multisite.

Leaving the option disabled should be safe. Settings associated with missing roles generally don't do anything, they just take up some space in the database.

Location:
admin-menu-editor/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • admin-menu-editor/trunk/includes/menu-editor-core.php

    r3105590 r3106187  
    212212            //but adds decompression overhead to very admin page.
    213213            'compress_custom_menu' => false,
     214
     215
     216
    214217
    215218            //Make custom menu and page titles translatable with WPML. They will appear in the "Strings" section.
     
    27892792                $menu['tree'] = ameMenu::sanitize($menu['tree']);
    27902793
     2794
     2795
     2796
    27912797                //Discard capabilities that refer to unregistered post types or taxonomies.
    27922798                if ( !empty($menu['granted_capabilities']) ) {
    27932799                    $capFilter = new ameGrantedCapabilityFilter();
    27942800                    $menu['granted_capabilities'] = $capFilter->clean_up($menu['granted_capabilities']);
     2801
     2802
     2803
     2804
     2805
     2806
     2807
     2808
     2809
     2810
     2811
     2812
     2813
     2814
     2815
     2816
     2817
     2818
    27952819                }
    27962820
     
    29722996                }
    29732997            }
     2998
     2999
     3000
    29743001
    29753002            //Menu data compression.
  • admin-menu-editor/trunk/includes/menu.php

    r3030217 r3106187  
    553553     * @return array
    554554     */
    555     protected static function map_items($items, $callback, $extra_params = null) {
     555    p static function map_items($items, $callback, $extra_params = null) {
    556556        if ( $extra_params === null ) {
    557557            $extra_params = array();
  • admin-menu-editor/trunk/includes/role-utils.php

    r3105634 r3106187  
    8181    }
    8282}
     83
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
     100
     101
     102
     103
     104
     105
     106
     107
     108
     109
     110
     111
     112
     113
     114
     115
     116
     117
     118
     119
     120
     121
     122
     123
     124
     125
     126
     127
     128
     129
     130
     131
     132
     133
     134
     135
     136
     137
     138
     139
     140
     141
     142
     143
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155
     156
     157
     158
     159
     160
     161
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
     179
     180
     181
     182
     183
  • admin-menu-editor/trunk/includes/settings-page.php

    r2727753 r3106187  
    521521                    <p>
    522522                        <label>
     523
     524
     525
     526
     527
     528
     529
     530
     531
     532
     533
     534
    523535                            <input type="checkbox" name="compress_custom_menu"
    524536                                <?php checked($settings['compress_custom_menu']); ?>>
  • admin-menu-editor/trunk/modules/redirector/redirector.php

    r3105997 r3106187  
    347347
    348348        list($loadedUsers, $hasMoreUsers) = $this->preloadUsers($flattenedRedirects);
     349
     350
     351
     352
     353
     354
     355
     356
    349357
    350358        $scriptData = [
Note: See TracChangeset for help on using the changeset viewer.