Пример #1
0
    }
    unset($current_plugins[md5($plugin_file)]);
    $data = new DataHandler();
    $data->save('plugins.data', serialize($current_plugins));
    return true;
}
if (isset($_REQUEST['activate_plugin'])) {
    activate_plugin($_REQUEST['activate_plugin']);
} elseif (isset($_REQUEST['deactivate_plugin'])) {
    deactivate_plugin($_REQUEST['deactivate_plugin']);
}
if (!empty($_POST['action']) && $_POST['action'] == 'settings' && !empty($_POST['_nonce'])) {
    if (!check_nonce($_POST['_nonce'])) {
        lilina_nice_die('Nonces do not match.');
    }
    clear_html_cache();
    /** Needs better validation */
    if (!empty($_POST['sitename'])) {
        update_option('sitename', $_REQUEST['sitename']);
    }
    if (!empty($_POST['template'])) {
        update_option('template', $_REQUEST['template']);
    }
    if (!empty($_POST['locale'])) {
        update_option('locale', $_REQUEST['locale']);
    }
    if (!empty($_POST['timezone'])) {
        update_option('timezone', $_REQUEST['timezone']);
    }
    header('HTTP/1.1 302 Found', true, 302);
    header('Location: ' . get_option('baseurl') . 'admin/settings.php?updated=1');
Пример #2
0
 /**
  * Callback for feeds.remove
  */
 public static function feeds_remove($feed_id)
 {
     $success = Feeds::get_instance()->delete($feed_id);
     clear_html_cache();
     return array('success' => 1, 'msg' => $success);
 }
Пример #3
0
 /**
  * Callback for feeds.remove
  */
 public static function feeds_remove($remove)
 {
     $success = remove_feed((int) $remove);
     clear_html_cache();
     return array('success' => 1, 'msg' => $result);
 }