Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
data->user_pass, get_current_user_id());
}
public function resetSettings()
{
if (!current_user_can(self::PERMISSION) || !wp_verify_nonce($_POST['ag_reset_settings'] ?? '', 'ag_reset_settings')) {
wp_die('Disallowed action');
}
if (!$this->auth($_POST['pwd'])) {
$this->redirect($_POST['_wp_http_referer'], 0, 'tools');
}
foreach (Immutable::AGE_GATE_OPTIONS as $option) {
delete_option($option);
}
delete_option('age_gate_version');
Activate::activate();
$this->redirect($_POST['_wp_http_referer'], 1, 'tools');
}
public function resetPosts()
{
if (!current_user_can(self::PERMISSION) || !wp_verify_nonce($_POST['ag_reset_post'] ?? '', 'ag_reset_post')) {
wp_die('Disallowed action');
}
if (!$this->auth($_POST['pwd'])) {
$this->redirect($_POST['_wp_http_referer'], 0, 'tools');
}
global $wpdb;
$wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE meta_key LIKE '_age_gate-%'");
$wpdb->query("DELETE FROM {$wpdb->termmeta} WHERE meta_key LIKE '_age_gate-%'");
$wpdb->query("DELETE FROM {$wpdb->usermeta} WHERE meta_key LIKE '_age_gate-%'");
$this->redirect($_POST['_wp_http_referer'], 1, 'tools');
}
}