array_map_recursive( 'sanitize_text_field', (array) $_GET[ self::DEBUG_PARAM ] ); //phpcs:ignore // Do not allow passing a non-public post type. if ( isset( $overrides['post_type'] ) ) { $type = get_post_type_object( $overrides['post_type'] ); if ( $type && ! $type->public ) { unset( $overrides['post_type'] ); } } return wp_parse_args( $overrides, $instance ); } /** * Print the widget settings as a JS variable. * * @param Menu_Abstract $menu - Menu class. * @param Page|Category $widget - Widget class. * * @return void */ public function print_instance( $menu, $widget ) { $data = [ 'version' => ADVANCED_SIDEBAR_BASIC_VERSION, 'wp-version' => get_bloginfo( 'version' ), ]; if ( defined( 'ADVANCED_SIDEBAR_MENU_PRO_VERSION' ) ) { $data['pro_version'] = ADVANCED_SIDEBAR_MENU_PRO_VERSION; } $data = apply_filters( 'advanced-sidebar-menu/debug/print-instance', $data, $menu, $widget ); ?>