aliyun-oss-wordpress/uninstall.php

19 lines
523 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
//防止有人恶意访问此文件,所以在没有 WP_UNINSTALL_PLUGIN 常量的情况下结束程序
if (!defined('WP_UNINSTALL_PLUGIN')) {
exit();
}
$obs_options = get_option('oss_options', true);
$upload_url_path = get_option('upload_url_path');
$oss_upload_url_path = esc_attr($obs_options['upload_url_path']);
//如果现在使用的是OSS的URL则恢复原状
if ($upload_url_path == $oss_upload_url_path) {
update_option('upload_url_path', '');
}
//移除配置
delete_option('oss_options');