| @@ -16,8 +16,20 @@ | ||
| 16 | 16 | $wrapper_class = isset( $notices[ $notice ] ) || isset( $plugins_list['wp-rocket/wp-rocket.php'] ) ? 'imagify-have-rocket' : 'imagify-dont-have-rocket'; |
| 17 | 17 | ?> |
| 18 | 18 | <div class="wrap imagify-settings <?php echo esc_attr( $wrapper_class ); ?> imagify-clearfix"> |
| 19 | 19 | |
| 20 | + <?php | |
| 21 | + /** | |
| 22 | + * Core only requires `options-head.php` (which calls `settings_errors()`) when the page | |
| 23 | + * parent is `options-general.php`. That is the case when Imagify is registered with | |
| 24 | + * `add_options_page()`, but not when it is network-activated and registered with | |
| 25 | + * `add_menu_page()`/`add_submenu_page()`. Print the notices ourselves in that case. | |
| 26 | + */ | |
| 27 | + if ( 'options-general.php' !== ( isset( $GLOBALS['parent_file'] ) ? $GLOBALS['parent_file'] : '' ) ) { | |
| 28 | + settings_errors(); | |
| 29 | + } | |
| 30 | + ?> | |
| 31 | + | |
| 20 | 32 | <div class="imagify-col imagify-main"> |
| 21 | 33 | |
| 22 | 34 | <?php $this->print_template( 'part-settings-header' ); ?> |
| 23 | 35 | <div class="imagify-main-content"> |
| @@ -84,8 +96,9 @@ | ||
| 84 | 96 | ] |
| 85 | 97 | ); |
| 86 | 98 | ?> |
| 87 | 99 | </p> |
| 100 | + <?php do_action( 'imagify_settings_after_lossless' ); ?> | |
| 88 | 101 | </div> |
| 89 | 102 | </div> |
| 90 | 103 | |
| 91 | 104 | <?php if ( Imagify_Requirements::is_api_key_valid() ) { ?> |