From 6afb3213f7e983d0848c9691173ee72e91993e9f Mon Sep 17 00:00:00 2001 From: Nathan Rice Date: Fri, 3 Mar 2017 10:50:52 -0500 Subject: [PATCH] Account for numeric sidebars. --- includes/class-genesis-simple-sidebars-admin.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/class-genesis-simple-sidebars-admin.php b/includes/class-genesis-simple-sidebars-admin.php index fb9c1f8..88517c9 100644 --- a/includes/class-genesis-simple-sidebars-admin.php +++ b/includes/class-genesis-simple-sidebars-admin.php @@ -231,6 +231,9 @@ class Genesis_Simple_Sidebars_Admin extends Genesis_Admin_Basic { // Strip all but alphanumeric, sanitize with dashes. $id = preg_replace( "/[^a-zA-Z0-9 -]+/", "", sanitize_title_with_dashes( $args['id'] ) ); + // Preface numeric IDs with 'sidebar-'. + $id = is_numeric( $id ) ? 'sidebar-' . $id : $id; + $db = (array) get_option( $this->settings_field ); $new = array(