开发者 | pexlechris |
---|---|
更新时间 | 2025年6月26日 15:54 |
PHP版本: | 7.0 及以上 |
WordPress版本: | 6.8.1 |
版权: | GPLv2 |
版权网址: | 版权信息 |
Yes, because only administrators have access to WP Adminer. If a guest tries to access the WP Adminer URL, a 404 page will be shown up.
manage_options
capability.manage_network_options
capability.Just use the filter pexlechris_adminer_access_capabilities
and return the array of desired capabilities that you want to have access to WP Adminer.
For roles, just use the corresponding capabilities, while checking against particular roles in place of a capability is supported in part, this practice is discouraged as it may produce unreliable results.
This issue maybe is due to the caching engine that your browser OR server uses!
define( 'PEXLECHRIS_ADMINER_SLUG', 'wp-admin/adminer');
You need to use action pexlechris_adminer_head
as follows:
add_action('pexlechris_adminer_head', function(){ // Use the appropriate get_nonce() function based on your WP Adminer version $nonce = function_exists('Adminer\get_nonce') ? Adminer\get_nonce() // For WP Adminer v4.0.0 and newer : get_nonce(); // For WP Adminer versions below 4.0.0 ?> <script nonce="<?php echo esc_attr( $nonce )?>"> // get_nonce is an adminer function // Place your JS code here </script> <style> /* Place your CSS code here */ </style> <?php });
You can do this using WP filter: pexlechris_adminer_adminbar_dropdown_items
.
Filter's PHPDoc:
`
/**
In Adminer's website there is documentation about Adminer plugins and Adminer extensions.
In order to define function adminer_object() before this plugin define it, you need to define it inside the hook pexlechris_adminer_before_adminer_loads
.
More in the phpDoc below:
`
/**
The answer in this question is complicated. The best solution is to create a Database User with the appropriate privileges. Maybe you can do it also with WordPress actions. Read more in this support ticket.
By default, you haven't access to any database other than the site's database. In order to enable access, you need to add the following line code define('PEXLECHRIS_ADMINER_HAVE_ACCESS_ONLY_IN_WP_DB', false);
in the wp-config.php file.
Replace phpMyAdmin with Adminer and you will get a tidier user interface, better support for MySQL features, higher performance and more security. See detailed comparison. Adminer development priorities are: 1. Security, 2. User experience, 3. Performance, 4. Feature set, 5. Size.
adminer.php
file, always prioritize the plugin's own version instead of accidentally including a root-level adminer.php
if it exists.pexlechris_adminer_head
object method has been removed.
If you were using it to override styles and scripts, please use the pexlechris_adminer_head
action hook instead to add your own CSS and JS.No such file or directory
login error when DB_HOST has been defined with the default MySql/MariaDB port 3306.=
is now correctly added after the username parameter (e.g., https://example.com/wp-adminer?username=).pexle_loginForm
is added by new method Pexlechris_Adminer::loginForm()Adminer
namespace.
If you’ve made any customizations to the plugin, please read carefully:
The main class is nowAdminer\Adminer
. If you're extending my classPexlechris_Adminer
, everything will continue to work fine! However, if you’ve usedget_nonce()
to include custom JavaScript, you must update it toAdminer\get_nonce()
. For more details, check the FAQ: “How to add my own JS and/or CSS in Adminer head?”
get_pexlechris_adminer_url()
. Can be filtered by new below hook:pexlechris_adminer_url
that change the returned value of function get_pexlechris_adminer_url()
.pexlechris_adminer_adminbar_dropdown_items
in order to change the dropdown items.get_pexlechris_adminer_url()
. Can be filtered by new hook pexlechris_adminer_url
.pexlechris_adminer_mu_plugin_version
option even after plugin deactivation. If a developer sets this value to 0
or an empty string, the must-use plugin will no longer be automatically created or updated — including during deactivation, which was previously not prevented.pexlechris_adminer_access_capabilities
filter can now return the capability as a string. Returning an array with the capability is no longer required.pexlechris_adminer_locale
Database Management tool - Adminer
to Adminer for WP - The Database Management tool
Open WP Adminer
link in plugin's action linkspexlechris_adminer_mu_plugin_version option
, ensuring the MU plugin is reinstalled upon reactivation.define( 'PEXLECHRIS_ADMINER_SLUG', 'wp-admin/wp-adminer');
Undefined variable $Ah