| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/clients/client2/web6/web/wp-content/plugins/custom-permalinks/ |
Upload File : |
<?php
/**
* CustomPermalinks Uninstall
*
* Deletes Option and Post Permalinks on uninstalling the Plugin.
*
* @package CustomPermalinks
* @since 1.2.18
*/
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
delete_post_meta_by_key( 'custom_permalink' );
delete_option( 'custom_permalink_table' );
$wp_role = get_role( 'administrator' );
if ( ! empty( $wp_role ) ) {
$wp_role->remove_cap( 'cp_view_post_permalinks' );
$wp_role->remove_cap( 'cp_view_category_permalinks' );
}
$wp_role = get_role( 'custom_permalinks_manager' );
if ( ! empty( $wp_role ) ) {
$wp_role->remove_cap( 'cp_view_post_permalinks' );
$wp_role->remove_cap( 'cp_view_category_permalinks' );
remove_role( 'custom_permalinks_manager' );
}
// Clear any cached data that has been removed.
wp_cache_flush();