name && 'Madara' != $theme->parent_theme ) {
echo '
This plugin requires the "Madara" theme to be installed and active on this site before it can function! Please install it from here: Madara - WordPress Theme for Manga
';
return;
}
if( ! class_exists('WP_MANGA_STORAGE') ) {
echo 'This plugin requires the "Madara Core" plugin to be installed and active on this site before it can function! Please install it from here: Madara - WordPress Theme for Manga
';
return;
}
global $wp_filesystem;
if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base') ){
include_once(ABSPATH . 'wp-admin/includes/file.php');$creds = request_filesystem_credentials( site_url() );
wp_filesystem($creds);
}
if(isset($_POST['ums_delete']))
{
if($wp_filesystem->exists(WP_CONTENT_DIR . '/ums_info.log'))
{
$wp_filesystem->delete(WP_CONTENT_DIR . '/ums_info.log');
}
}
if(isset($_POST['ums_delete_rules']))
{
$running = array();
update_option('ums_running_list', $running);
$flock_disabled = explode(',', ini_get('disable_functions'));
if(!in_array('flock', $flock_disabled))
{
foreach (glob(get_temp_dir() . 'ums_*') as $filename)
{
$f = fopen($filename, 'w');
if($f !== false)
{
flock($f, LOCK_UN);
fclose($f);
}
$wp_filesystem->delete($filename);
}
}
}
if(isset($_POST['ums_restore_defaults']))
{
ums_activation_callback(true);
}
if(isset($_POST['ums_delete_all']))
{
ums_delete_all_posts();
}
?>