| @@ -292,22 +292,25 @@ | ||
| 292 | 292 | 'remove_title' => __('Remove Favicon', 'adminify'), |
| 293 | 293 | 'default' => $this->get_default_field('admin_favicon_logo'), |
| 294 | 294 | ]; |
| 295 | 295 | |
| 296 | - // Gutenberg Editor Logo | |
| 297 | - $fields[] = [ | |
| 298 | - 'id' => 'gutenberg_editor_logo', | |
| 299 | - 'type' => 'media', | |
| 300 | - /* translators: %s: pro upgrade badge HTML */ | |
| 301 | - 'title' => sprintf(__('Gutenberg Editor Logo %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 302 | - 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer', | |
| 303 | - 'subtitle' => __('Replace Gutenberg Post/Page WordPress Logo', 'adminify'), | |
| 304 | - 'library' => 'image', | |
| 305 | - 'preview_size' => 'thumbnail', | |
| 306 | - 'button_title' => __('Add Editor Logo', 'adminify'), | |
| 307 | - 'remove_title' => __('Remove Editor Logo', 'adminify'), | |
| 308 | - 'default' => $this->get_default_field('gutenberg_editor_logo'), | |
| 309 | - ]; | |
| 296 | + // Gutenberg Editor Logo. WordPress 7.1 dropped the class this hooks | |
| 297 | + // onto, so the field is only offered where it can still do something. | |
| 298 | + if ( Utils::is_wp_below_7_1() ) { | |
| 299 | + $fields[] = [ | |
| 300 | + 'id' => 'gutenberg_editor_logo', | |
| 301 | + 'type' => 'media', | |
| 302 | + /* translators: %s: pro upgrade badge HTML */ | |
| 303 | + 'title' => sprintf(__('Gutenberg Editor Logo %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 304 | + 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer', | |
| 305 | + 'subtitle' => __('Replace Gutenberg Post/Page WordPress Logo', 'adminify'), | |
| 306 | + 'library' => 'image', | |
| 307 | + 'preview_size' => 'thumbnail', | |
| 308 | + 'button_title' => __('Add Editor Logo', 'adminify'), | |
| 309 | + 'remove_title' => __('Remove Editor Logo', 'adminify'), | |
| 310 | + 'default' => $this->get_default_field('gutenberg_editor_logo'), | |
| 311 | + ]; | |
| 312 | + } | |
| 310 | 313 | |
| 311 | 314 | } |
| 312 | 315 | |
| 313 | 316 | |