Fix image fields to open the real media library picker (v2.1.1)
wp_enqueue_media() was never called on the Settings page, so wp.media
was undefined client-side and every image field (Logo, Dark mode logo,
Login logo, Admin favicon) silently fell back to a plain URL prompt
instead of the WordPress media library. Also relabeled the picker
button ("Choose from media library" instead of "{label} url") so it
reads as a picker, not a URL field.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
55d1788471
commit
deab644e38
@@ -5,6 +5,14 @@ version bump. Starts at 2.1.0 — earlier history (the theming rebuild,
|
|||||||
window chrome/taskbar, Site Editor support, etc.) lives in `git log` and
|
window chrome/taskbar, Site Editor support, etc.) lives in `git log` and
|
||||||
`PROJECT_STATUS.md`, not reconstructed here.
|
`PROJECT_STATUS.md`, not reconstructed here.
|
||||||
|
|
||||||
|
## [2.1.1] - 2026-07-04
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Image fields (Logo, Dark mode logo, Login logo, Admin favicon) now open
|
||||||
|
the real WordPress media library picker. `wp_enqueue_media()` was never
|
||||||
|
called, so `wp.media` was undefined client-side and every image field
|
||||||
|
silently fell back to a plain URL prompt instead.
|
||||||
|
|
||||||
## [2.1.0] - 2026-07-04
|
## [2.1.0] - 2026-07-04
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -39,6 +39,12 @@ class SettingsPage
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Without this, window.wp.media is undefined client-side and every
|
||||||
|
// image field (Logo, Dark mode logo, Login logo, Admin favicon)
|
||||||
|
// silently falls back to a plain URL prompt instead of the real media
|
||||||
|
// library picker (see SettingsField.vue's pickImage()).
|
||||||
|
wp_enqueue_media();
|
||||||
|
|
||||||
Assets::enqueue("aurora-admin-settings", "entries/settings.js");
|
Assets::enqueue("aurora-admin-settings", "entries/settings.js");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "aurora-admin-app",
|
"name": "aurora-admin-app",
|
||||||
"version": "2.1.0",
|
"version": "2.1.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ const openFontList = () => {
|
|||||||
>
|
>
|
||||||
<img v-if="val" :src="val" alt="" />
|
<img v-if="val" :src="val" alt="" />
|
||||||
<span v-else class="dashicons dashicons-format-image field__image-ph" />
|
<span v-else class="dashicons dashicons-format-image field__image-ph" />
|
||||||
<span class="field__image-label">{{ val ? 'Change' : (field.label + ' url') }}</span>
|
<span class="field__image-label">{{ val ? 'Change' : 'Choose from media library' }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Multiselect (checkbox list) -->
|
<!-- Multiselect (checkbox list) -->
|
||||||
|
|||||||
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: Aurora Admin
|
* Plugin Name: Aurora Admin
|
||||||
* Plugin URI: https://aurora.co
|
* Plugin URI: https://aurora.co
|
||||||
* Description: A modern, fast WordPress admin interface.
|
* Description: A modern, fast WordPress admin interface.
|
||||||
* Version: 2.1.0
|
* Version: 2.1.1
|
||||||
* Author: Aurora
|
* Author: Aurora
|
||||||
* Text Domain: aurora-admin
|
* Text Domain: aurora-admin
|
||||||
* Domain Path: /languages/
|
* Domain Path: /languages/
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
defined("ABSPATH") || exit();
|
defined("ABSPATH") || exit();
|
||||||
|
|
||||||
define("AURORA_ADMIN_VERSION", "2.1.0");
|
define("AURORA_ADMIN_VERSION", "2.1.1");
|
||||||
define("AURORA_ADMIN_PATH", plugin_dir_path(__FILE__));
|
define("AURORA_ADMIN_PATH", plugin_dir_path(__FILE__));
|
||||||
define("AURORA_ADMIN_URL", plugins_url("aurora-admin/"));
|
define("AURORA_ADMIN_URL", plugins_url("aurora-admin/"));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user