Browse files

Updated to url_filters. Added stripslashes to URL Filters.

  • Loading branch information...
1 parent 2020f9b commit 201c9531290ba3c46499379a8e433978cf2b3c61 @mvied committed Mar 31, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/WordPressHTTPS/Module/UrlFilters.php
View
7 lib/WordPressHTTPS/Module/UrlFilters.php
@@ -20,8 +20,8 @@ class WordPressHTTPS_Module_UrlFilters extends Mvied_Plugin_Module {
*/
public function init() {
if ( is_admin() ) {
- add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_filters_save', array(&$this, 'save'));
- add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_filters_reset', array(&$this, 'reset'));
+ add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_url_filters_save', array(&$this, 'save'));
+ add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_url_filters_reset', array(&$this, 'reset'));
if ( isset($_GET['page']) && strpos($_GET['page'], $this->getPlugin()->getSlug()) !== false ) {
// Add meta boxes
add_action('admin_init', array(&$this, 'add_meta_boxes'));
@@ -66,7 +66,7 @@ public function add_meta_boxes() {
'toplevel_page_' . $this->getPlugin()->getSlug(),
'main',
'default',
- array( 'metabox' => 'filters' )
+ array( 'metabox' => 'url_filters' )
);
}
@@ -107,6 +107,7 @@ public function save() {
$filters = array_map('trim', explode("\n", $_POST['secure_filter']));
$filters = array_filter($filters); // Removes blank array items
+ $filters = stripslashes_deep($filters);
$this->getPlugin()->setSetting('secure_filter', $filters);
$this->getPlugin()->renderView('ajax_message', array('message' => $message, 'errors' => $errors, 'reload' => $reload));

0 comments on commit 201c953

Please sign in to comment.