开发者 | ninetyninew |
---|---|
更新时间 | 2024年11月2日 22:07 |
WordPress版本: | 6.6.2 |
版权: | GNU General Public License v3.0 |
版权网址: | 版权信息 |
manage_options
capability (Premium)manage_options
capability in the free version of this plugin. The premium version logs page request information for all users regardless of their capability.
By default the memory meter will be shown in the admin bar if you are logged in as user with the manage_options
capability such as an administrator (the capability can be modified if required, see the configuration tab via the Memory Meter page).
In this scenario you will see the meter in the admin bar at the top of your WordPress dashboard and the frontend of your website. Note that there is a user profile setting in WordPress to enable the admin bar, it is enabled by default, if this is not enabled you will not be able to view the memory meter in the admin bar.
If you hover over the memory meter you will see a number of options, such as logs and configuration. In addition to the admin bar, a menu item is included in your WordPress dashboard to give access to the logs, confirguration, etc.
Note that the memory meter doesn't need to be displayed to ensure memory usage is logged, this is done regardless of whether the memory meter is being displayed.
(BETA)
label. Functionality with this label should be used with caution and is only recommended to be tested on a staging/development environment. The functionality is included so users can test the functionality/provide feedback before it becomes stable, at which point the (BETA)
label will be removed. Note that there may be occasions where BETA functionality is determined unsuitable for use and removed entirely.
Caching
If you are using any form of caching then it is recommended that the cache lifespan/expiry should be set to 10 hours or less. This is recommended by most major caching solutions to avoid potential issues with WordPress nonces.
Screen Sizes
See the usage information above.
You can use the wpmm_memory_meter_file_size_format
filter hook.
When your website is using greater than 75% of allocated memory the meter will change to orange (warning), if greater than 90% it will change to red (bad). If you want to change these default percentages you can use the wpmm_memory_meter_memory_usage_percentage_warning
and wpmm_memory_meter_memory_usage_percentage_bad
filter hooks.
The memory meter displays by default in the admin bar for any user with the manage_options
capability, which is usually administrators. You can change the capability required to display the memory meter by using the wpmm_memory_meter_capability
filter hook. Note that this filter hook does not effect memory usage logging, and the memory meter being displayed or not doesn't effect memory usage logging.
Yes, you can disable the colors using the wpmm_memory_meter_memory_usage_colors
filter hook.
Yes, you can disable the logs using the wpmm_memory_meter_logs
filter hook.