| 1 |
<?php |
| 2 |
// Check that code was called from WordPress with |
| 3 |
// uninstallation constant declared |
| 4 |
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) |
| 5 |
exit; |
| 6 |
|
| 7 |
// Check if options exist and delete them if present |
| 8 |
if ( get_option( 'LinkLibraryGeneral' ) != false ) { |
| 9 |
|
| 10 |
$genoptions = get_option( 'LinkLibraryGeneral' ); |
| 11 |
|
| 12 |
for ($i = 1; $i <= $genoptions['numberstylesets']; $i++) { |
| 13 |
$settingsname = 'LinkLibraryPP' . $i; |
| 14 |
|
| 15 |
delete_option( $settingsname ); |
| 16 |
} |
| 17 |
|
| 18 |
delete_option( 'LinkLibraryGeneral' ); |
| 19 |
} |
| 20 |
|
| 21 |
wp_clear_scheduled_hook( 'link_library_import_links' ); |
| 22 |
wp_clear_scheduled_hook( 'link_library_gen_thumbs' ); |