| 1 |
<?php |
| 2 |
|
| 3 |
// If this file is called directly, abort. |
| 4 |
if (!defined("WPINC")){ |
| 5 |
die; |
| 6 |
} |
| 7 |
|
| 8 |
|
| 9 |
function easyfonts_check_incompatible_plugins() { |
| 10 |
// Check if the 'Local Google Fonts' plugin is active |
| 11 |
if(is_plugin_active('local-google-fonts/local-google-fonts.php')) { |
| 12 |
// Display a notice to deactivate the plugin |
| 13 |
?> |
| 14 |
<div class="notice notice-error is-dismissible"> |
| 15 |
<p>The 'Local Google Fonts' plugin is active and may cause conflicts with the Easy Fonts plugin. Please deactivate the 'Local Google Fonts' plugin to avoid any issues.</p> |
| 16 |
</div> |
| 17 |
<?php |
| 18 |
} |
| 19 |
|
| 20 |
// Check if the 'Host Webfonts Local' plugin is active |
| 21 |
if(is_plugin_active('host-webfonts-local/host-webfonts-local.php')) { |
| 22 |
// Display a notice to deactivate the plugin |
| 23 |
?> |
| 24 |
<div class="notice notice-error is-dismissible"> |
| 25 |
<p>The 'OMGF' plugin is active and may cause conflicts with the Easy Fonts plugin. Please deactivate the 'OMGF' plugin to avoid any issues.</p> |
| 26 |
</div> |
| 27 |
<?php |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
// Display the notices on the options page |
| 32 |
add_action('admin_notices', 'easyfonts_check_incompatible_plugins'); |