| 开发者 | macvej |
|---|---|
| 更新时间 | 2026年11月17日 18:33 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
?author= username lookups, 404 redirect guessing, a fast 404 for missing
files, post formats./wp-content/plugins/slimpress/, or install it from the Plugins screen.No. Every feature is off by default and activation writes nothing.
WordPress returns to its default behaviour on the very next request. SlimPress applies its changes through runtime filters and actions, so there are no core settings to restore. Deleted data does not come back: this includes revisions removed by the "Delete old revisions" button (which asks first) or by a revision limit when a post was saved, trash emptied under a shorter retention period, and WooCommerce scheduled actions and logs deleted under shorter retention limits. Image copies omitted during uploads while a Media switch was on are not recreated. Roles removed with the "Remove selected roles" button stay removed until you click "Restore default roles".
Yes. The Tools tab lists Editor, Author, Contributor and Subscriber. A role that no user has, and
that is not the role new users get, can be removed after you confirm. SlimPress keeps a copy of
each removed role, so "Restore default roles" brings it back with its own capabilities. If you
uninstall SlimPress, those copies are deleted, and Restore (after a reinstall) brings the roles
back with WordPress's default capabilities. Administrator and roles added by other plugins are
never listed. Removing or restoring roles changes WordPress's stored role list (the {prefix}user_roles option, wp_user_roles by default). If your site sets its roles in code, SlimPress leaves them alone and says so. It is a one-off action that deactivating SlimPress does not undo, and Reset on the Tools tab keeps the saved role copies.
Every toggle that can cause a visible problem is marked Careful and explains what might stop working. The ones most likely to cause problems are:
wp-cron.php. Set that up first.The version string is what makes browsers fetch a fresh file after an update. Removing it offers
no measurable benefit and can leave visitors with outdated CSS and JavaScript. SlimPress also
has no switch for turning off lazy loading, automatic sizes attributes on lazy-loaded images
or big-image scaling, because disabling these features makes sites slower. The Media tab explains big-image scaling on an info card instead.
No. It works on any site. On a WooCommerce store, it warns you about switches that affect features the shop relies on, and the WooCommerce store preset preserves those features. A WooCommerce tab with its own switches (admin nags, tracking, background jobs and more) appears automatically while WooCommerce is active, and disappears - without losing your choices - if you deactivate it.
SlimPress does not cache, minify or combine anything, so it does not overlap with a caching plugin. The performance test asks for uncached pages, and if a page cache responds anyway, it says so rather than showing you the cache's numbers.
Only if you click the optional PageSpeed button on the performance test tab. See "External services" below.
Yes. The Tools tab exports your settings as a JSON file and imports them on another site. The tab also lets you reset every switch to off.
Experimental: the shape may change in a minor release. If a plugin update changes a toggle's group or context, the change takes effect the next time an administrator opens Settings → SlimPress (or saves any SlimPress setting).
Another plugin can add on/off toggles to an existing tab. A toggle is one entry for
slimpress_register_features plus one function for slimpress_feature_handlers. Both filters
must be added when your plugin file loads, or on plugins_loaded before priority 5, because
SlimPress applies its switches at priority 5. A handler only adds hooks, like any other code. It must be callable. SlimPress calls it with no arguments and does not catch exceptions it throws.
Example (a must-use plugin that hides the "At a Glance" dashboard widget):
add_filter( 'slimpress_register_features', function ( $aFeatures ) {
$aFeatures[] = array(
'id' => 'myplugin_hide_glance',
'group' => 'dashboard',
'source' => 'My Plugin',
'title' => 'Hide the At a Glance widget',
'help' => 'Removes the At a Glance box from the dashboard.',
'breaks' => '',
'context' => 'admin',
);
return $aFeatures;
} );
add_filter( 'slimpress_feature_handlers', function ( $aHandlers ) {
$aHandlers['myplugin_hide_glance'] = function () {
add_action( 'wp_dashboard_setup', function () {
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );
}, 999 );
};
return $aHandlers;
} );
SlimPress skips an entry that breaks a rule. With WP_DEBUG on it also says why.
id: lowercase letters, digits, _ and - only, 3 to 64 characters, not external, not a current or retired SlimPress id, not used by an earlier entry. Prefix the id with your plugin's slug.group: one of the groups that have switches. Not assets. woocommerce only while WooCommerce is active.source (your plugin's name, up to 60 characters) and title: required. Shown as "Added by {source}".help, breaks: optional text. context (front, admin or both; default both) and risk (safe or careful; default careful) are optional too.Open Tools -> Undo a change. SlimPress keeps the last 10 versions of its settings - every save, group pause, preset, import and reset - and restores the version you choose. To find the cause first, pause one group at a time from its tab.
slimpress_register_features and slimpress_feature_handlers filters. See the FAQ.