<!-- Generated by SpecStory, Markdown v2.1.0 -->

# 2026-02-03 19:51:33Z

<!-- cursoride Session 89ffecb3-8fcd-4cf9-8359-f4943c419ec9 (2026-02-03 19:51:33Z) -->

_**User**_

@class-widget-phones.php (255-257)  does this wp_kses_post() prevent the checkbox controls from being included in output?

---

_**Agent (composer-1)**_

Checking how `$phones_table` is generated and whether `wp_kses_post()` filters out checkbox controls.


_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-phones.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

Yes, `wp_kses_post()` can strip checkbox attributes or remove the checkboxes. Checking what it allows for form inputs:


_**Agent (composer-1)**_

<tool-use data-tool-type="unknown" data-tool-name="semantic_search_full">
<details>
<summary>Tool use: **semantic_search_full**</summary>


Parameters:

```json
{
  "explanation": "",
  "query": "How are widget admin forms output without wp_kses_post sanitization?",
  "topK": 10
}
```
Result:

```json
{
  "codeResults": [
    {
      "codeBlock": {
        "contents": "\t * @param array $instance\n\t */\n\tpublic function widget( $args, $instance ) {\n\t\tif ( empty( $instance['cb_display'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'] );\n\t\t// before and after widget arguments are defined by themes.\n\t\techo wp_kses_post( $args['before_widget'] );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\tif ( isset( $instance['cb_single_line'] ) \u0026\u0026 $instance['cb_single_line'] == 'true' ) {\n\t\t\tforeach ( $instance['cb_display'] as $i =\u003e $term_id ) {\n\t\t\t\t$location = get_term( $term_id, 'location' );\n\t\t\t\tif ( ! is_wp_error( $location ) \u0026\u0026 null != $location ) {\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t'\u003cspan\u003e%s\u003c/span\u003e',\n\t\t\t\t\t\tesc_html( str_replace( PHP_EOL, ', ', trim( $location-\u003edescription ) ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tforeach ( $instance['cb_display'] as $i =\u003e $term_id ) {\n\t\t\t\t$location = get_term( $term_id, 'location' );\n\t\t\t\tif ( ! is_wp_error( $location ) \u0026\u0026 null !== $location ) {\n\t\t\t\t\techo '\u003cdiv\u003e' . wp_kses_post( nl2br( $location-\u003edescription ) ) . '\u003c/div\u003e';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';",
        "detailedLines": [
          {
            "lineNumber": 51,
            "text": "\t * @param array $instance"
          },
          {
            "lineNumber": 52,
            "text": "\t */"
          },
          {
            "lineNumber": 53,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 54,
            "text": "\t\tif ( empty( $instance['cb_display'] ) ) {"
          },
          {
            "lineNumber": 55,
            "text": "\t\t\treturn;"
          },
          {
            "lineNumber": 56,
            "text": "\t\t}"
          },
          {
            "lineNumber": 57
          },
          {
            "lineNumber": 58,
            "text": "\t\t$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'] );"
          },
          {
            "lineNumber": 59,
            "text": "\t\t// before and after widget arguments are defined by themes."
          },
          {
            "lineNumber": 60,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 61,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 62,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 63,
            "text": "\t\t}"
          },
          {
            "lineNumber": 64
          },
          {
            "lineNumber": 65,
            "text": "\t\tif ( isset( $instance['cb_single_line'] ) \u0026\u0026 $instance['cb_single_line'] == 'true' ) {"
          },
          {
            "lineNumber": 66,
            "text": "\t\t\tforeach ( $instance['cb_display'] as $i =\u003e $term_id ) {"
          },
          {
            "lineNumber": 67,
            "text": "\t\t\t\t$location = get_term( $term_id, 'location' );"
          },
          {
            "lineNumber": 68,
            "text": "\t\t\t\tif ( ! is_wp_error( $location ) \u0026\u0026 null != $location ) {"
          },
          {
            "lineNumber": 69,
            "text": "\t\t\t\t\tprintf("
          },
          {
            "lineNumber": 70,
            "text": "\t\t\t\t\t\t'\u003cspan\u003e%s\u003c/span\u003e',"
          },
          {
            "lineNumber": 71,
            "text": "\t\t\t\t\t\tesc_html( str_replace( PHP_EOL, ', ', trim( $location-\u003edescription ) ) )"
          },
          {
            "lineNumber": 72,
            "text": "\t\t\t\t\t);"
          },
          {
            "lineNumber": 73,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 74,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 75,
            "text": "\t\t} else {"
          },
          {
            "lineNumber": 76,
            "text": "\t\t\tforeach ( $instance['cb_display'] as $i =\u003e $term_id ) {"
          },
          {
            "lineNumber": 77,
            "text": "\t\t\t\t$location = get_term( $term_id, 'location' );"
          },
          {
            "lineNumber": 78,
            "text": "\t\t\t\tif ( ! is_wp_error( $location ) \u0026\u0026 null !== $location ) {"
          },
          {
            "lineNumber": 79,
            "text": "\t\t\t\t\techo '\u003cdiv\u003e' . wp_kses_post( nl2br( $location-\u003edescription ) ) . '\u003c/div\u003e';"
          },
          {
            "lineNumber": 80,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 81,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 82,
            "text": "\t\t}"
          },
          {
            "lineNumber": 83
          },
          {
            "lineNumber": 84,
            "text": "\t\techo wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 85,
            "text": "\t}"
          },
          {
            "lineNumber": 86
          },
          {
            "lineNumber": 87,
            "text": "\t/**"
          },
          {
            "lineNumber": 88,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 89,
            "text": "\t *"
          },
          {
            "lineNumber": 90,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 91,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 92,
            "text": "\t */"
          },
          {
            "lineNumber": 93,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 94
          },
          {
            "lineNumber": 95,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';"
          }
        ],
        "range": {
          "endPosition": {
            "line": 95
          },
          "startPosition": {
            "line": 50
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-address.php",
        "signatures": {}
      },
      "score": 0.34780454635620117
    },
    {
      "codeBlock": {
        "contents": "\t\tif ( isset( $_GET['max_price'] ) ) {\n\t\t\tprintf(\n\t\t\t\t'\u003cdiv\u003e\u003ca href=\"%s\"\u003e%s $%s %s\u003c/a\u003e\u003c/div\u003e',\n\t\t\t\tesc_url( remove_query_arg( 'max_price' ) ),\n\t\t\t\tesc_html__( 'Remove', 'inventory-presser' ),\n\t\t\t\tnumber_format( (int) $_GET['max_price'], 0, '.', ',' ),\n\t\t\t\tesc_html__( 'Shop by Price', 'inventory-presser' )\n\t\t\t);\n\t\t}\n\n\t\techo '\u003c/div\u003e' . wp_kses_post( $args['after_widget'] ?? '' );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title              = isset( $instance['title'] ) ? $instance['title'] : __( 'Shop by Price', 'inventory-presser' );\n\t\t$prices             = ( isset( $instance['prices'] ) \u0026\u0026 is_array( $instance['prices'] ) ) ? implode( ',', $instance['prices'] ) : implode( ',', $this-\u003eprice_defaults );\n\t\t$display_type_slugs = array_keys( $this-\u003edisplay_types() );\n\t\t$display_type       = isset( $instance['display_type'] ) ? $instance['display_type'] : $display_type_slugs[0];\n\t\t$orientation_slugs  = array_keys( $this-\u003eorientations() );\n\t\t$orientation        = isset( $instance['orientation'] ) ? $instance['orientation'] : $orientation_slugs[0];\n\n\t\t// Widget admin form.\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'prices' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Price Points (separated by commas)', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'prices' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'prices' ) ); ?\u003e\"\u003e\u003c?php echo esc_html( $prices ); ?\u003e\u003c/textarea\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'display_type' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Display Format:', 'inventory-presser' ); ?\u003e\u003c/label\u003e",
        "detailedLines": [
          {
            "lineNumber": 138,
            "text": "\t\tif ( isset( $_GET['max_price'] ) ) {"
          },
          {
            "lineNumber": 139,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 140,
            "text": "\t\t\t\t'\u003cdiv\u003e\u003ca href=\"%s\"\u003e%s $%s %s\u003c/a\u003e\u003c/div\u003e',"
          },
          {
            "lineNumber": 141,
            "text": "\t\t\t\tesc_url( remove_query_arg( 'max_price' ) ),"
          },
          {
            "lineNumber": 142,
            "text": "\t\t\t\tesc_html__( 'Remove', 'inventory-presser' ),"
          },
          {
            "lineNumber": 143,
            "text": "\t\t\t\tnumber_format( (int) $_GET['max_price'], 0, '.', ',' ),"
          },
          {
            "lineNumber": 144,
            "text": "\t\t\t\tesc_html__( 'Shop by Price', 'inventory-presser' )"
          },
          {
            "lineNumber": 145,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 146,
            "text": "\t\t}"
          },
          {
            "lineNumber": 147
          },
          {
            "lineNumber": 148,
            "text": "\t\techo '\u003c/div\u003e' . wp_kses_post( $args['after_widget'] ?? '' );"
          },
          {
            "lineNumber": 149,
            "text": "\t}"
          },
          {
            "lineNumber": 150
          },
          {
            "lineNumber": 151,
            "text": "\t/**"
          },
          {
            "lineNumber": 152,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 153,
            "text": "\t *"
          },
          {
            "lineNumber": 154,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 155,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 156,
            "text": "\t */"
          },
          {
            "lineNumber": 157,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 158
          },
          {
            "lineNumber": 159,
            "text": "\t\t$title              = isset( $instance['title'] ) ? $instance['title'] : __( 'Shop by Price', 'inventory-presser' );"
          },
          {
            "lineNumber": 160,
            "text": "\t\t$prices             = ( isset( $instance['prices'] ) \u0026\u0026 is_array( $instance['prices'] ) ) ? implode( ',', $instance['prices'] ) : implode( ',', $this-\u003eprice_defaults );"
          },
          {
            "lineNumber": 161,
            "text": "\t\t$display_type_slugs = array_keys( $this-\u003edisplay_types() );"
          },
          {
            "lineNumber": 162,
            "text": "\t\t$display_type       = isset( $instance['display_type'] ) ? $instance['display_type'] : $display_type_slugs[0];"
          },
          {
            "lineNumber": 163,
            "text": "\t\t$orientation_slugs  = array_keys( $this-\u003eorientations() );"
          },
          {
            "lineNumber": 164,
            "text": "\t\t$orientation        = isset( $instance['orientation'] ) ? $instance['orientation'] : $orientation_slugs[0];"
          },
          {
            "lineNumber": 165
          },
          {
            "lineNumber": 166,
            "text": "\t\t// Widget admin form."
          },
          {
            "lineNumber": 167,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 168,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 169,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 170,
            "text": "\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 171,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 172,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 173,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'prices' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Price Points (separated by commas)', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 174,
            "text": "\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'prices' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'prices' ) ); ?\u003e\"\u003e\u003c?php echo esc_html( $prices ); ?\u003e\u003c/textarea\u003e"
          },
          {
            "lineNumber": 175,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 176,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 177,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'display_type' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Display Format:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          }
        ],
        "range": {
          "endPosition": {
            "line": 177
          },
          "startPosition": {
            "line": 137
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-maximum-price-filter.php",
        "signatures": {}
      },
      "score": 0.338461697101593
    },
    {
      "codeBlock": {
        "contents": "\t * @return array\n\t */\n\tpublic function sanitize_options( $input ) {\n\t\t$settings = INVP::settings();\n\n\t\t// Is this the taxonomies page at edit.php?post_type=inventory_vehicle\u0026page=invp-taxonomies?\n\t\tif ( 1 === count( $input ) \u0026\u0026 'taxonomies' === key( $input ) ) {\n\t\t\t// Yes, this is not the main settings page.\n\t\t\tarray_walk_recursive( $input['taxonomies'], array( $this, 'sanitize_taxonomies_walker' ) );\n\t\t\t$sanitary_values = array_merge( $settings, $input );\n\t\t\t// Do not allow the Types taxonomy to be disabled.\n\t\t\t$sanitary_values['taxonomies']['type']['active'] = true;\n\t\t\t// Return early, the rest of this method is sanitizing a different page.\n\t\t\treturn apply_filters( 'invp_options_page_taxonomies_sanitized_values', $sanitary_values, $input );\n\t\t}\n\n\t\t// Sanitize settings from the main settings page at edit.php?post_type=inventory_vehicle\u0026page=dealership-options.\n\t\t$sanitary_values = array(\n\t\t\t'taxonomies' =\u003e $settings['taxonomies'] ?? self::taxonomies_setting_default( $settings ), // Keep the taxonomies settings saved by a separate page.\n\t\t);\n\n\t\t// If the old show_all_taxonomies setting is set, translate it.\n\t\tif ( isset( $settings['show_all_taxonomies'] ) ) {\n\t\t\tunset( $settings['show_all_taxonomies'] );\n\t\t}\n\n\t\t$boolean_settings = array(\n\t\t\t'include_sold_vehicles',\n\t\t\t'provide_templates',\n\t\t\t'skip_trash',\n\t\t\t'use_arranger_gallery',\n\t\t\t'use_carfax',\n\t\t\t'use_carfax_provided_buttons',\n\t\t);\n\t\tforeach ( $boolean_settings as $b ) {\n\t\t\t$sanitary_values[ $b ] = isset( $input[ $b ] );\n\t\t}\n\n\t\t/**\n\t\t * Backwards compatibility. No s. Will arrive when 14.6.0 and\n\t\t * older-saved settings are saved on newer versions.\n\t\t */\n\t\tif ( isset( $input['additional_listings_page'] ) ) {\n\t\t\t$sanitary_values['additional_listings_page'] = filter_var( $input['additional_listings_page'], FILTER_VALIDATE_BOOLEAN );\n\t\t}\n\n\t\tif ( isset( $input['price_display'] ) ) {\n\t\t\t$sanitary_values['price_display'] = $input['price_display'];\n\t\t}\n\n\t\tif ( isset( $input['mapbox_public_token'] ) ) {\n\t\t\t$sanitary_values['mapbox_public_token'] = $input['mapbox_public_token'];\n\t\t}",
        "detailedLines": [
          {
            "lineNumber": 1089,
            "text": "\t * @return array"
          },
          {
            "lineNumber": 1090,
            "text": "\t */"
          },
          {
            "lineNumber": 1091,
            "text": "\tpublic function sanitize_options( $input ) {"
          },
          {
            "lineNumber": 1092,
            "text": "\t\t$settings = INVP::settings();"
          },
          {
            "lineNumber": 1093
          },
          {
            "lineNumber": 1094,
            "text": "\t\t// Is this the taxonomies page at edit.php?post_type=inventory_vehicle\u0026page=invp-taxonomies?"
          },
          {
            "lineNumber": 1095,
            "text": "\t\tif ( 1 === count( $input ) \u0026\u0026 'taxonomies' === key( $input ) ) {"
          },
          {
            "lineNumber": 1096,
            "text": "\t\t\t// Yes, this is not the main settings page."
          },
          {
            "lineNumber": 1097,
            "text": "\t\t\tarray_walk_recursive( $input['taxonomies'], array( $this, 'sanitize_taxonomies_walker' ) );"
          },
          {
            "lineNumber": 1098,
            "text": "\t\t\t$sanitary_values = array_merge( $settings, $input );"
          },
          {
            "lineNumber": 1099,
            "text": "\t\t\t// Do not allow the Types taxonomy to be disabled."
          },
          {
            "lineNumber": 1100,
            "text": "\t\t\t$sanitary_values['taxonomies']['type']['active'] = true;"
          },
          {
            "lineNumber": 1101,
            "text": "\t\t\t// Return early, the rest of this method is sanitizing a different page."
          },
          {
            "lineNumber": 1102,
            "text": "\t\t\treturn apply_filters( 'invp_options_page_taxonomies_sanitized_values', $sanitary_values, $input );"
          },
          {
            "lineNumber": 1103,
            "text": "\t\t}"
          },
          {
            "lineNumber": 1104
          },
          {
            "lineNumber": 1105,
            "text": "\t\t// Sanitize settings from the main settings page at edit.php?post_type=inventory_vehicle\u0026page=dealership-options."
          },
          {
            "lineNumber": 1106,
            "text": "\t\t$sanitary_values = array("
          },
          {
            "lineNumber": 1107,
            "text": "\t\t\t'taxonomies' =\u003e $settings['taxonomies'] ?? self::taxonomies_setting_default( $settings ), // Keep the taxonomies settings saved by a separate page."
          },
          {
            "lineNumber": 1108,
            "text": "\t\t);"
          },
          {
            "lineNumber": 1109
          },
          {
            "lineNumber": 1110,
            "text": "\t\t// If the old show_all_taxonomies setting is set, translate it."
          },
          {
            "lineNumber": 1111,
            "text": "\t\tif ( isset( $settings['show_all_taxonomies'] ) ) {"
          },
          {
            "lineNumber": 1112,
            "text": "\t\t\tunset( $settings['show_all_taxonomies'] );"
          },
          {
            "lineNumber": 1113,
            "text": "\t\t}"
          },
          {
            "lineNumber": 1114
          },
          {
            "lineNumber": 1115,
            "text": "\t\t$boolean_settings = array("
          },
          {
            "lineNumber": 1116,
            "text": "\t\t\t'include_sold_vehicles',"
          },
          {
            "lineNumber": 1117,
            "text": "\t\t\t'provide_templates',"
          },
          {
            "lineNumber": 1118,
            "text": "\t\t\t'skip_trash',"
          },
          {
            "lineNumber": 1119,
            "text": "\t\t\t'use_arranger_gallery',"
          },
          {
            "lineNumber": 1120,
            "text": "\t\t\t'use_carfax',"
          },
          {
            "lineNumber": 1121,
            "text": "\t\t\t'use_carfax_provided_buttons',"
          },
          {
            "lineNumber": 1122,
            "text": "\t\t);"
          },
          {
            "lineNumber": 1123,
            "text": "\t\tforeach ( $boolean_settings as $b ) {"
          },
          {
            "lineNumber": 1124,
            "text": "\t\t\t$sanitary_values[ $b ] = isset( $input[ $b ] );"
          },
          {
            "lineNumber": 1125,
            "text": "\t\t}"
          },
          {
            "lineNumber": 1126
          },
          {
            "lineNumber": 1127,
            "text": "\t\t/**"
          },
          {
            "lineNumber": 1128,
            "text": "\t\t * Backwards compatibility. No s. Will arrive when 14.6.0 and"
          },
          {
            "lineNumber": 1129,
            "text": "\t\t * older-saved settings are saved on newer versions."
          },
          {
            "lineNumber": 1130,
            "text": "\t\t */"
          },
          {
            "lineNumber": 1131,
            "text": "\t\tif ( isset( $input['additional_listings_page'] ) ) {"
          },
          {
            "lineNumber": 1132,
            "text": "\t\t\t$sanitary_values['additional_listings_page'] = filter_var( $input['additional_listings_page'], FILTER_VALIDATE_BOOLEAN );"
          },
          {
            "lineNumber": 1133,
            "text": "\t\t}"
          },
          {
            "lineNumber": 1134
          },
          {
            "lineNumber": 1135,
            "text": "\t\tif ( isset( $input['price_display'] ) ) {"
          },
          {
            "lineNumber": 1136,
            "text": "\t\t\t$sanitary_values['price_display'] = $input['price_display'];"
          },
          {
            "lineNumber": 1137,
            "text": "\t\t}"
          },
          {
            "lineNumber": 1138
          },
          {
            "lineNumber": 1139,
            "text": "\t\tif ( isset( $input['mapbox_public_token'] ) ) {"
          },
          {
            "lineNumber": 1140,
            "text": "\t\t\t$sanitary_values['mapbox_public_token'] = $input['mapbox_public_token'];"
          },
          {
            "lineNumber": 1141,
            "text": "\t\t}"
          }
        ],
        "range": {
          "endPosition": {
            "line": 1142
          },
          "startPosition": {
            "line": 1088
          }
        },
        "relativeWorkspacePath": "./includes/admin/class-admin-options.php",
        "signatures": {}
      },
      "score": 0.3333806097507477
    },
    {
      "codeBlock": {
        "contents": "\t\t// build $args array.\n\t\t$content_args = array();\n\t\tif ( isset( $instance['columns'] ) ) {\n\t\t\t$content_args['columns'] = $instance['columns'];\n\t\t}\n\t\tif ( isset( $instance['limit'] ) ) {\n\t\t\t$content_args['limit'] = $instance['limit'];\n\t\t}\n\t\tif ( isset( $instance['cb_showcaptions'] ) ) {\n\t\t\t$content_args['show_captions'] = ( 'true' === $instance['cb_showcaptions'] );\n\t\t}\n\t\tif ( isset( $instance['cb_showbutton'] ) ) {\n\t\t\t$content_args['show_button'] = ( 'true' === $instance['cb_showbutton'] );\n\t\t}\n\t\tif ( isset( $instance['cb_showprices'] ) ) {\n\t\t\t$content_args['show_prices'] = ( 'true' === $instance['cb_showprices'] );\n\t\t}\n\t\tif ( isset( $instance['newest_first'] ) ) {\n\t\t\t$content_args['newest_first'] = filter_var( $instance['newest_first'], FILTER_VALIDATE_BOOLEAN );\n\t\t}\n\n\t\t// before and after widget arguments are defined by themes.\n\t\techo wp_kses_post( $args['before_widget'] );\n\t\t$title = apply_filters( 'widget_title', $instance['title'] ?? '' );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\techo $this-\u003econtent( $content_args ) . wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance The widget settings.\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title   = isset( $instance['title'] ) ? $instance['title'] : '';",
        "detailedLines": [
          {
            "lineNumber": 228,
            "text": "\t\t// build $args array."
          },
          {
            "lineNumber": 229,
            "text": "\t\t$content_args = array();"
          },
          {
            "lineNumber": 230,
            "text": "\t\tif ( isset( $instance['columns'] ) ) {"
          },
          {
            "lineNumber": 231,
            "text": "\t\t\t$content_args['columns'] = $instance['columns'];"
          },
          {
            "lineNumber": 232,
            "text": "\t\t}"
          },
          {
            "lineNumber": 233,
            "text": "\t\tif ( isset( $instance['limit'] ) ) {"
          },
          {
            "lineNumber": 234,
            "text": "\t\t\t$content_args['limit'] = $instance['limit'];"
          },
          {
            "lineNumber": 235,
            "text": "\t\t}"
          },
          {
            "lineNumber": 236,
            "text": "\t\tif ( isset( $instance['cb_showcaptions'] ) ) {"
          },
          {
            "lineNumber": 237,
            "text": "\t\t\t$content_args['show_captions'] = ( 'true' === $instance['cb_showcaptions'] );"
          },
          {
            "lineNumber": 238,
            "text": "\t\t}"
          },
          {
            "lineNumber": 239,
            "text": "\t\tif ( isset( $instance['cb_showbutton'] ) ) {"
          },
          {
            "lineNumber": 240,
            "text": "\t\t\t$content_args['show_button'] = ( 'true' === $instance['cb_showbutton'] );"
          },
          {
            "lineNumber": 241,
            "text": "\t\t}"
          },
          {
            "lineNumber": 242,
            "text": "\t\tif ( isset( $instance['cb_showprices'] ) ) {"
          },
          {
            "lineNumber": 243,
            "text": "\t\t\t$content_args['show_prices'] = ( 'true' === $instance['cb_showprices'] );"
          },
          {
            "lineNumber": 244,
            "text": "\t\t}"
          },
          {
            "lineNumber": 245,
            "text": "\t\tif ( isset( $instance['newest_first'] ) ) {"
          },
          {
            "lineNumber": 246,
            "text": "\t\t\t$content_args['newest_first'] = filter_var( $instance['newest_first'], FILTER_VALIDATE_BOOLEAN );"
          },
          {
            "lineNumber": 247,
            "text": "\t\t}"
          },
          {
            "lineNumber": 248
          },
          {
            "lineNumber": 249,
            "text": "\t\t// before and after widget arguments are defined by themes."
          },
          {
            "lineNumber": 250,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 251,
            "text": "\t\t$title = apply_filters( 'widget_title', $instance['title'] ?? '' );"
          },
          {
            "lineNumber": 252,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 253,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 254,
            "text": "\t\t}"
          },
          {
            "lineNumber": 255
          },
          {
            "lineNumber": 256,
            "text": "\t\techo $this-\u003econtent( $content_args ) . wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 257,
            "text": "\t}"
          },
          {
            "lineNumber": 258
          },
          {
            "lineNumber": 259,
            "text": "\t/**"
          },
          {
            "lineNumber": 260,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 261,
            "text": "\t *"
          },
          {
            "lineNumber": 262,
            "text": "\t * @param  array $instance The widget settings."
          },
          {
            "lineNumber": 263,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 264,
            "text": "\t */"
          },
          {
            "lineNumber": 265,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 266
          },
          {
            "lineNumber": 267,
            "text": "\t\t$title   = isset( $instance['title'] ) ? $instance['title'] : '';"
          }
        ],
        "range": {
          "endPosition": {
            "line": 267
          },
          "startPosition": {
            "line": 226
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-inventory-grid.php",
        "signatures": {}
      },
      "score": 0.3202696144580841
    },
    {
      "codeBlock": {
        "contents": "\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.\n\t *\n\t * @param  array $new_instance\n\t * @param  array $old_instance\n\t * @return array The updated array full of settings\n\t */\n\tpublic function update( $new_instance, $old_instance ) {\n\t\t$instance          = array();\n\t\t$instance['title'] = wp_strip_all_tags( $new_instance['title'] );\n\t\t$keys              = array();\n\t\tforeach ( INVP::keys() as $key ) {\n\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key );\n\t\t\tif ( isset( $_REQUEST[ 'obpm-key-' . $key ] ) ) {\n\t\t\t\tarray_push( $keys, $key );\n\t\t\t\tif ( isset( $_REQUEST[ 'obpm-label-' . $key ] ) ) {\n\t\t\t\t\t$instance[ 'label-' . $key ] = wp_strip_all_tags( wp_unslash( $_REQUEST[ 'obpm-label-' . $key ] ) );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunset( $instance[ 'label-' . $key ] );\n\t\t\t}\n\t\t}\n\t\t$instance['post-meta-keys'] = implode( '|', $keys );\n\t\treturn $instance;\n\t}\n\n\t/**\n\t * Outputs the widget front-end HTML\n\t *\n\t * @param  array $args\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function widget( $args, $instance ) {\n\n\t\twp_enqueue_script( 'order-by-widget-javascript' );\n\t\t$title = apply_filters( 'widget_title', ( isset( $instance['title'] ) ? $instance['title'] : '' ) );\n\n\t\t$keys_to_list = explode( '|', $instance['post-meta-keys'] );\n\t\tif ( 0 \u003c count( $keys_to_list ) ) {\n\t\t\techo wp_kses_post( $args['before_widget'] );\n\t\t\tif ( $title ) {\n\t\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t\t}\n\t\t\techo '\u003cul class=\"order-by-list list-nostyle\"\u003e';\n\t\t\tforeach ( $keys_to_list as $key ) {\n\t\t\t\techo '\u003cli\u003e\u003ca href=\"javascript:order_by_post_meta(\\'' . esc_attr( $key ) . '\\');\"\u003e'\n\t\t\t\t. esc_html( isset( $instance[ 'label-' . $key ] ) ? $instance[ 'label-' . $key ] : $key )\n\t\t\t\t. '\u003c/a\u003e\u003c/li\u003e';\n\t\t\t}\n\t\t\techo '\u003c/ul\u003e' . wp_kses_post( $args['after_widget'] );\n\t\t}\n\t}\n}",
        "detailedLines": [
          {
            "lineNumber": 145,
            "text": "\t}"
          },
          {
            "lineNumber": 146
          },
          {
            "lineNumber": 147,
            "text": "\t/**"
          },
          {
            "lineNumber": 148,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          },
          {
            "lineNumber": 149,
            "text": "\t *"
          },
          {
            "lineNumber": 150,
            "text": "\t * @param  array $new_instance"
          },
          {
            "lineNumber": 151,
            "text": "\t * @param  array $old_instance"
          },
          {
            "lineNumber": 152,
            "text": "\t * @return array The updated array full of settings"
          },
          {
            "lineNumber": 153,
            "text": "\t */"
          },
          {
            "lineNumber": 154,
            "text": "\tpublic function update( $new_instance, $old_instance ) {"
          },
          {
            "lineNumber": 155,
            "text": "\t\t$instance          = array();"
          },
          {
            "lineNumber": 156,
            "text": "\t\t$instance['title'] = wp_strip_all_tags( $new_instance['title'] );"
          },
          {
            "lineNumber": 157,
            "text": "\t\t$keys              = array();"
          },
          {
            "lineNumber": 158,
            "text": "\t\tforeach ( INVP::keys() as $key ) {"
          },
          {
            "lineNumber": 159,
            "text": "\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key );"
          },
          {
            "lineNumber": 160,
            "text": "\t\t\tif ( isset( $_REQUEST[ 'obpm-key-' . $key ] ) ) {"
          },
          {
            "lineNumber": 161,
            "text": "\t\t\t\tarray_push( $keys, $key );"
          },
          {
            "lineNumber": 162,
            "text": "\t\t\t\tif ( isset( $_REQUEST[ 'obpm-label-' . $key ] ) ) {"
          },
          {
            "lineNumber": 163,
            "text": "\t\t\t\t\t$instance[ 'label-' . $key ] = wp_strip_all_tags( wp_unslash( $_REQUEST[ 'obpm-label-' . $key ] ) );"
          },
          {
            "lineNumber": 164,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 165,
            "text": "\t\t\t} else {"
          },
          {
            "lineNumber": 166,
            "text": "\t\t\t\tunset( $instance[ 'label-' . $key ] );"
          },
          {
            "lineNumber": 167,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 168,
            "text": "\t\t}"
          },
          {
            "lineNumber": 169,
            "text": "\t\t$instance['post-meta-keys'] = implode( '|', $keys );"
          },
          {
            "lineNumber": 170,
            "text": "\t\treturn $instance;"
          },
          {
            "lineNumber": 171,
            "text": "\t}"
          },
          {
            "lineNumber": 172
          },
          {
            "lineNumber": 173,
            "text": "\t/**"
          },
          {
            "lineNumber": 174,
            "text": "\t * Outputs the widget front-end HTML"
          },
          {
            "lineNumber": 175,
            "text": "\t *"
          },
          {
            "lineNumber": 176,
            "text": "\t * @param  array $args"
          },
          {
            "lineNumber": 177,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 178,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 179,
            "text": "\t */"
          },
          {
            "lineNumber": 180,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 181
          },
          {
            "lineNumber": 182,
            "text": "\t\twp_enqueue_script( 'order-by-widget-javascript' );"
          },
          {
            "lineNumber": 183,
            "text": "\t\t$title = apply_filters( 'widget_title', ( isset( $instance['title'] ) ? $instance['title'] : '' ) );"
          },
          {
            "lineNumber": 184
          },
          {
            "lineNumber": 185,
            "text": "\t\t$keys_to_list = explode( '|', $instance['post-meta-keys'] );"
          },
          {
            "lineNumber": 186,
            "text": "\t\tif ( 0 \u003c count( $keys_to_list ) ) {"
          },
          {
            "lineNumber": 187,
            "text": "\t\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 188,
            "text": "\t\t\tif ( $title ) {"
          },
          {
            "lineNumber": 189,
            "text": "\t\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 190,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 191,
            "text": "\t\t\techo '\u003cul class=\"order-by-list list-nostyle\"\u003e';"
          },
          {
            "lineNumber": 192,
            "text": "\t\t\tforeach ( $keys_to_list as $key ) {"
          },
          {
            "lineNumber": 193,
            "text": "\t\t\t\techo '\u003cli\u003e\u003ca href=\"javascript:order_by_post_meta(\\'' . esc_attr( $key ) . '\\');\"\u003e'"
          },
          {
            "lineNumber": 194,
            "text": "\t\t\t\t. esc_html( isset( $instance[ 'label-' . $key ] ) ? $instance[ 'label-' . $key ] : $key )"
          },
          {
            "lineNumber": 195,
            "text": "\t\t\t\t. '\u003c/a\u003e\u003c/li\u003e';"
          },
          {
            "lineNumber": 196,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 197,
            "text": "\t\t\techo '\u003c/ul\u003e' . wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 198,
            "text": "\t\t}"
          },
          {
            "lineNumber": 199,
            "text": "\t}"
          },
          {
            "lineNumber": 200,
            "text": "}"
          }
        ],
        "range": {
          "endPosition": {
            "line": 200
          },
          "startPosition": {
            "line": 144
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-order-by.php",
        "signatures": {}
      },
      "score": 0.31971850991249084
    },
    {
      "codeBlock": {
        "contents": "\t\t/**\n\t\t * Registers every widget that ships with this plugin.\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tpublic function register_widgets() {\n\t\t\t/**\n\t\t\t * Make a widget available to sort vehicles by post meta fields.\n\t\t\t * Or, enable order by year, make, price, odometer, etc.\n\t\t\t */\n\t\t\tregister_widget( 'Inventory_Presser_Order_By_Widget' );\n\n\t\t\t/**\n\t\t\t * Make a widget available to show EPA Fuel Economy data\n\t\t\t */\n\t\t\tregister_widget( 'Inventory_Presser_Fuel_Economy_Widget' );\n\n\t\t\t/**\n\t\t\t * Make a widget available to embed a Google map pointed at one of\n\t\t\t * the addresses in our location taxonomy.\n\t\t\t */\n\t\t\tregister_widget( 'Inventory_Presser_Google_Maps_Widget' );\n\t\t\tregister_widget( 'Inventory_Presser_Google_Maps_Widget_V3' );\n\t\t\tregister_widget( 'Inventory_Presser_Map_Widget' );\n\n\t\t\tregister_widget( 'Inventory_Presser_Carfax_Widget' );\n\t\t\tregister_widget( 'Inventory_Presser_Grid' );\n\t\t\tregister_widget( 'Inventory_Presser_KBB_Widget' );\n\t\t\tregister_widget( 'Inventory_Presser_Location_Address' );\n\t\t\tregister_widget( 'Inventory_Presser_Location_Hours' );\n\t\t\tregister_widget( 'Inventory_Presser_Location_Phones' );\n\t\t\tregister_widget( 'Inventory_Presser_Slider' );\n\t\t\tregister_widget( 'Inventory_Presser_Maximum_Price_Filter' );\n\t\t}\n\n\t\t/**\n\t\t * Sanitizes every member of an array at every level with\n\t\t * sanitize_text_field()\n\t\t *\n\t\t * @param  array $arr\n\t\t * @return array\n\t\t */\n\t\tprotected function sanitize_array( $arr ) {\n\t\t\tforeach ( $arr as $key =\u003e $value ) {\n\t\t\t\tif ( is_array( $value ) ) {\n\t\t\t\t\t$arr[ $key ] = $this-\u003esanitize_array( $value );\n\t\t\t\t} else {\n\t\t\t\t\t$arr[ $key ] = sanitize_text_field( $value );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $arr;\n\t\t}\n\n\t\t/**\n\t\t * Saves vehicle attributes into their corresponding post meta fields when\n\t\t * the Save or Update button is clicked in the editor.\n\t\t *\n\t\t * @param  int     $post_id\n\t\t * @param  WP_Post $post\n\t\t * @param  bool    $is_update\n\t\t * @return void\n\t\t */\n\t\tpublic function save_vehicle_post_meta( $post_id, $post, $is_update ) {\n\t\t\t/**\n\t\t\t * Do not continue if the post is being moved to the trash or if this is",
        "detailedLines": [
          {
            "lineNumber": 1754,
            "text": "\t\t/**"
          },
          {
            "lineNumber": 1755,
            "text": "\t\t * Registers every widget that ships with this plugin."
          },
          {
            "lineNumber": 1756,
            "text": "\t\t *"
          },
          {
            "lineNumber": 1757,
            "text": "\t\t * @return void"
          },
          {
            "lineNumber": 1758,
            "text": "\t\t */"
          },
          {
            "lineNumber": 1759,
            "text": "\t\tpublic function register_widgets() {"
          },
          {
            "lineNumber": 1760,
            "text": "\t\t\t/**"
          },
          {
            "lineNumber": 1761,
            "text": "\t\t\t * Make a widget available to sort vehicles by post meta fields."
          },
          {
            "lineNumber": 1762,
            "text": "\t\t\t * Or, enable order by year, make, price, odometer, etc."
          },
          {
            "lineNumber": 1763,
            "text": "\t\t\t */"
          },
          {
            "lineNumber": 1764,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Order_By_Widget' );"
          },
          {
            "lineNumber": 1765
          },
          {
            "lineNumber": 1766,
            "text": "\t\t\t/**"
          },
          {
            "lineNumber": 1767,
            "text": "\t\t\t * Make a widget available to show EPA Fuel Economy data"
          },
          {
            "lineNumber": 1768,
            "text": "\t\t\t */"
          },
          {
            "lineNumber": 1769,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Fuel_Economy_Widget' );"
          },
          {
            "lineNumber": 1770
          },
          {
            "lineNumber": 1771,
            "text": "\t\t\t/**"
          },
          {
            "lineNumber": 1772,
            "text": "\t\t\t * Make a widget available to embed a Google map pointed at one of"
          },
          {
            "lineNumber": 1773,
            "text": "\t\t\t * the addresses in our location taxonomy."
          },
          {
            "lineNumber": 1774,
            "text": "\t\t\t */"
          },
          {
            "lineNumber": 1775,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Google_Maps_Widget' );"
          },
          {
            "lineNumber": 1776,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Google_Maps_Widget_V3' );"
          },
          {
            "lineNumber": 1777,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Map_Widget' );"
          },
          {
            "lineNumber": 1778
          },
          {
            "lineNumber": 1779,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Carfax_Widget' );"
          },
          {
            "lineNumber": 1780,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Grid' );"
          },
          {
            "lineNumber": 1781,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_KBB_Widget' );"
          },
          {
            "lineNumber": 1782,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Location_Address' );"
          },
          {
            "lineNumber": 1783,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Location_Hours' );"
          },
          {
            "lineNumber": 1784,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Location_Phones' );"
          },
          {
            "lineNumber": 1785,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Slider' );"
          },
          {
            "lineNumber": 1786,
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Maximum_Price_Filter' );"
          },
          {
            "lineNumber": 1787,
            "text": "\t\t}"
          },
          {
            "lineNumber": 1788
          },
          {
            "lineNumber": 1789,
            "text": "\t\t/**"
          },
          {
            "lineNumber": 1790,
            "text": "\t\t * Sanitizes every member of an array at every level with"
          },
          {
            "lineNumber": 1791,
            "text": "\t\t * sanitize_text_field()"
          },
          {
            "lineNumber": 1792,
            "text": "\t\t *"
          },
          {
            "lineNumber": 1793,
            "text": "\t\t * @param  array $arr"
          },
          {
            "lineNumber": 1794,
            "text": "\t\t * @return array"
          },
          {
            "lineNumber": 1795,
            "text": "\t\t */"
          },
          {
            "lineNumber": 1796,
            "text": "\t\tprotected function sanitize_array( $arr ) {"
          },
          {
            "lineNumber": 1797,
            "text": "\t\t\tforeach ( $arr as $key =\u003e $value ) {"
          },
          {
            "lineNumber": 1798,
            "text": "\t\t\t\tif ( is_array( $value ) ) {"
          },
          {
            "lineNumber": 1799,
            "text": "\t\t\t\t\t$arr[ $key ] = $this-\u003esanitize_array( $value );"
          },
          {
            "lineNumber": 1800,
            "text": "\t\t\t\t} else {"
          },
          {
            "lineNumber": 1801,
            "text": "\t\t\t\t\t$arr[ $key ] = sanitize_text_field( $value );"
          },
          {
            "lineNumber": 1802,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 1803,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 1804,
            "text": "\t\t\treturn $arr;"
          },
          {
            "lineNumber": 1805,
            "text": "\t\t}"
          },
          {
            "lineNumber": 1806
          },
          {
            "lineNumber": 1807,
            "text": "\t\t/**"
          },
          {
            "lineNumber": 1808,
            "text": "\t\t * Saves vehicle attributes into their corresponding post meta fields when"
          },
          {
            "lineNumber": 1809,
            "text": "\t\t * the Save or Update button is clicked in the editor."
          },
          {
            "lineNumber": 1810,
            "text": "\t\t *"
          },
          {
            "lineNumber": 1811,
            "text": "\t\t * @param  int     $post_id"
          },
          {
            "lineNumber": 1812,
            "text": "\t\t * @param  WP_Post $post"
          },
          {
            "lineNumber": 1813,
            "text": "\t\t * @param  bool    $is_update"
          },
          {
            "lineNumber": 1814,
            "text": "\t\t * @return void"
          },
          {
            "lineNumber": 1815,
            "text": "\t\t */"
          },
          {
            "lineNumber": 1816,
            "text": "\t\tpublic function save_vehicle_post_meta( $post_id, $post, $is_update ) {"
          },
          {
            "lineNumber": 1817,
            "text": "\t\t\t/**"
          },
          {
            "lineNumber": 1818,
            "text": "\t\t\t * Do not continue if the post is being moved to the trash or if this is"
          }
        ],
        "range": {
          "endPosition": {
            "line": 1818
          },
          "startPosition": {
            "line": 1753
          }
        },
        "relativeWorkspacePath": "./inventory-presser.php",
        "signatures": {}
      },
      "score": 0.3174053430557251
    },
    {
      "codeBlock": {
        "contents": "\tfunction titleStatusOptions()\n\t{\n\t\tvar options = [{label:'',value:''}];\n\t\tfor ( var l = 0; l \u003c invp.title_statuses.length; l++ ) {\n\t\t\toptions.push(\n\t\t\t\t{\n\t\t\t\t\tlabel: invp.title_statuses[l],\n\t\t\t\t\tvalue: invp.title_statuses[l]\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\treturn options;\n\t}\n\n\tfunction ucwords( str )\n\t{\n\t\treturn (str + '').split( ' ' ).map( x =\u003e x.charAt( 0 ).toUpperCase() + x.substring( 1 ) ).join( ' ' );\n\t}\n\n\t// Most text fields.\n\tvar MetaBlockField = compose(\n\t\twithDispatch(\n\t\t\tfunction ( dispatch, props ) {\n\t\t\t\treturn {\n\t\t\t\t\tsetMetaFieldValue: function ( value ) {\n\t\t\t\t\t\t// Is this a numeric meta field? Can't save an empty string in those.\n\t\t\t\t\t\tif ( props.isNumeric \u0026\u0026 '' === value ) {\n\t\t\t\t\t\t\tvalue = '0';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdispatch( 'core/editor' ).editPost(\n\t\t\t\t\t\t\t{ meta: { [ props.fieldName ]: value } }\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t),\n\t\twithSelect(\n\t\t\tfunction ( select, props ) {\n\t\t\t\treturn {\n\t\t\t\t\tmetaFieldValue: select( 'core/editor' )\n\t\t\t\t\t.getEditedPostAttribute( 'meta' )\n\t\t\t\t\t[ props.fieldName ],\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\t)(\n\t\tfunction ( props ) {\n\t\t\treturn el(\n\t\t\t\tText,\n\t\t\t\t{\n\t\t\t\t\tlabel: getLabel( props.fieldName ),\n\t\t\t\t\tvalue: props.metaFieldValue,\n\t\t\t\t\tid: props.id,\n\t\t\t\t\tonChange: function ( content ) {\n\t\t\t\t\t\tprops.setMetaFieldValue( content );\n\t\t\t\t\t},\n\t\t\t\t\tonInput: function ( event ) {\n\t\t\t\t\t\t// Is this the VIN field?\n\t\t\t\t\t\tif ( props.fieldName === invp.meta_prefix + 'vin' ) {\n\t\t\t\t\t\t\t// Yes.\n\t\t\t\t\t\t\t// Is the VIN Decoding plugin active?\n\t\t\t\t\t\t\tif ( typeof window.invp_vin_decoder_maybe_decode === 'function' ) {\n\t\t\t\t\t\t\t\t// Yes.\n\t\t\t\t\t\t\t\twindow.invp_vin_decoder_maybe_decode( event );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t);\n\n\t// Text field that allows only digits.",
        "detailedLines": [
          {
            "lineNumber": 148,
            "text": "\tfunction titleStatusOptions()"
          },
          {
            "lineNumber": 149,
            "text": "\t{"
          },
          {
            "lineNumber": 150,
            "text": "\t\tvar options = [{label:'',value:''}];"
          },
          {
            "lineNumber": 151,
            "text": "\t\tfor ( var l = 0; l \u003c invp.title_statuses.length; l++ ) {"
          },
          {
            "lineNumber": 152,
            "text": "\t\t\toptions.push("
          },
          {
            "lineNumber": 153,
            "text": "\t\t\t\t{"
          },
          {
            "lineNumber": 154,
            "text": "\t\t\t\t\tlabel: invp.title_statuses[l],"
          },
          {
            "lineNumber": 155,
            "text": "\t\t\t\t\tvalue: invp.title_statuses[l]"
          },
          {
            "lineNumber": 156,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 157,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 158,
            "text": "\t\t}"
          },
          {
            "lineNumber": 159,
            "text": "\t\treturn options;"
          },
          {
            "lineNumber": 160,
            "text": "\t}"
          },
          {
            "lineNumber": 161
          },
          {
            "lineNumber": 162,
            "text": "\tfunction ucwords( str )"
          },
          {
            "lineNumber": 163,
            "text": "\t{"
          },
          {
            "lineNumber": 164,
            "text": "\t\treturn (str + '').split( ' ' ).map( x =\u003e x.charAt( 0 ).toUpperCase() + x.substring( 1 ) ).join( ' ' );"
          },
          {
            "lineNumber": 165,
            "text": "\t}"
          },
          {
            "lineNumber": 166
          },
          {
            "lineNumber": 167,
            "text": "\t// Most text fields."
          },
          {
            "lineNumber": 168,
            "text": "\tvar MetaBlockField = compose("
          },
          {
            "lineNumber": 169,
            "text": "\t\twithDispatch("
          },
          {
            "lineNumber": 170,
            "text": "\t\t\tfunction ( dispatch, props ) {"
          },
          {
            "lineNumber": 171,
            "text": "\t\t\t\treturn {"
          },
          {
            "lineNumber": 172,
            "text": "\t\t\t\t\tsetMetaFieldValue: function ( value ) {"
          },
          {
            "lineNumber": 173,
            "text": "\t\t\t\t\t\t// Is this a numeric meta field? Can't save an empty string in those."
          },
          {
            "lineNumber": 174,
            "text": "\t\t\t\t\t\tif ( props.isNumeric \u0026\u0026 '' === value ) {"
          },
          {
            "lineNumber": 175,
            "text": "\t\t\t\t\t\t\tvalue = '0';"
          },
          {
            "lineNumber": 176,
            "text": "\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 177,
            "text": "\t\t\t\t\t\tdispatch( 'core/editor' ).editPost("
          },
          {
            "lineNumber": 178,
            "text": "\t\t\t\t\t\t\t{ meta: { [ props.fieldName ]: value } }"
          },
          {
            "lineNumber": 179,
            "text": "\t\t\t\t\t\t);"
          },
          {
            "lineNumber": 180,
            "text": "\t\t\t\t\t}"
          },
          {
            "lineNumber": 181,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 182,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 183,
            "text": "\t\t),"
          },
          {
            "lineNumber": 184,
            "text": "\t\twithSelect("
          },
          {
            "lineNumber": 185,
            "text": "\t\t\tfunction ( select, props ) {"
          },
          {
            "lineNumber": 186,
            "text": "\t\t\t\treturn {"
          },
          {
            "lineNumber": 187,
            "text": "\t\t\t\t\tmetaFieldValue: select( 'core/editor' )"
          },
          {
            "lineNumber": 188,
            "text": "\t\t\t\t\t.getEditedPostAttribute( 'meta' )"
          },
          {
            "lineNumber": 189,
            "text": "\t\t\t\t\t[ props.fieldName ],"
          },
          {
            "lineNumber": 190,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 191,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 192,
            "text": "\t\t)"
          },
          {
            "lineNumber": 193,
            "text": "\t)("
          },
          {
            "lineNumber": 194,
            "text": "\t\tfunction ( props ) {"
          },
          {
            "lineNumber": 195,
            "text": "\t\t\treturn el("
          },
          {
            "lineNumber": 196,
            "text": "\t\t\t\tText,"
          },
          {
            "lineNumber": 197,
            "text": "\t\t\t\t{"
          },
          {
            "lineNumber": 198,
            "text": "\t\t\t\t\tlabel: getLabel( props.fieldName ),"
          },
          {
            "lineNumber": 199,
            "text": "\t\t\t\t\tvalue: props.metaFieldValue,"
          },
          {
            "lineNumber": 200,
            "text": "\t\t\t\t\tid: props.id,"
          },
          {
            "lineNumber": 201,
            "text": "\t\t\t\t\tonChange: function ( content ) {"
          },
          {
            "lineNumber": 202,
            "text": "\t\t\t\t\t\tprops.setMetaFieldValue( content );"
          },
          {
            "lineNumber": 203,
            "text": "\t\t\t\t\t},"
          },
          {
            "lineNumber": 204,
            "text": "\t\t\t\t\tonInput: function ( event ) {"
          },
          {
            "lineNumber": 205,
            "text": "\t\t\t\t\t\t// Is this the VIN field?"
          },
          {
            "lineNumber": 206,
            "text": "\t\t\t\t\t\tif ( props.fieldName === invp.meta_prefix + 'vin' ) {"
          },
          {
            "lineNumber": 207,
            "text": "\t\t\t\t\t\t\t// Yes."
          },
          {
            "lineNumber": 208,
            "text": "\t\t\t\t\t\t\t// Is the VIN Decoding plugin active?"
          },
          {
            "lineNumber": 209,
            "text": "\t\t\t\t\t\t\tif ( typeof window.invp_vin_decoder_maybe_decode === 'function' ) {"
          },
          {
            "lineNumber": 210,
            "text": "\t\t\t\t\t\t\t\t// Yes."
          },
          {
            "lineNumber": 211,
            "text": "\t\t\t\t\t\t\t\twindow.invp_vin_decoder_maybe_decode( event );"
          },
          {
            "lineNumber": 212,
            "text": "\t\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 213,
            "text": "\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 214,
            "text": "\t\t\t\t\t}"
          },
          {
            "lineNumber": 215,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 216,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 217,
            "text": "\t\t}"
          },
          {
            "lineNumber": 218,
            "text": "\t);"
          },
          {
            "lineNumber": 219
          },
          {
            "lineNumber": 220,
            "text": "\t// Text field that allows only digits."
          }
        ],
        "range": {
          "endPosition": {
            "line": 624
          },
          "startPosition": {
            "line": 75
          }
        },
        "relativeWorkspacePath": "./js/editor-sidebar.js",
        "signatures": {
          "ranges": [
            {
              "endPosition": {
                "column": 1,
                "line": 76
              },
              "startPosition": {
                "column": 1,
                "line": 76
              }
            }
          ]
        }
      },
      "score": 0.3163760006427765
    },
    {
      "codeBlock": {
        "contents": "\t\t\t$sanitary_values['additional_listings_pages'] = $unique_rules;\n\t\t}\n\n\t\tif ( isset( $input['singles_contact_form'] ) ) {\n\t\t\t$sanitary_values['singles_contact_form'] = $input['singles_contact_form'];\n\t\t}\n\n\t\treturn apply_filters( 'invp_options_page_sanitized_values', $sanitary_values, $input );\n\t}\n\n\t/**\n\t * Callback function for array_walk_recursive to sanitize taxonomies settings.\n\t *\n\t * @param  mixed $value\n\t * @param  mixed $index\n\t * @return bool\n\t */\n\tprotected function sanitize_taxonomies_walker( \u0026$value, $index ) {\n\t\t$value = boolval( $value );\n\t}\n\n\t/**\n\t * Registers JavaScript and CSS file that power the settings page.\n\t *\n\t * @return void\n\t */\n\tpublic function scripts_and_styles() {\n\t\t$handle = 'invp_page_settings';\n\t\t$min    = defined( 'SCRIPT_DEBUG' ) \u0026\u0026 SCRIPT_DEBUG ? '' : '.min';\n\t\twp_register_script(\n\t\t\t$handle,\n\t\t\tplugins_url( \"/js/page-settings{$min}.js\", INVP_PLUGIN_FILE_PATH ),\n\t\t\tarray( 'jquery' ),\n\t\t\tINVP_PLUGIN_VERSION,\n\t\t\ttrue\n\t\t);\n\t\twp_add_inline_script(\n\t\t\t$handle,\n\t\t\t'const invp_page_settings = ' . wp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomies' =\u003e Inventory_Presser_Taxonomies::query_vars_array(),\n\t\t\t\t)\n\t\t\t),\n\t\t\t'before'\n\t\t);\n\t\twp_register_style(\n\t\t\t$handle,\n\t\t\tplugins_url( \"/css/page-settings$min}.css\", INVP_PLUGIN_FILE_PATH ),\n\t\t\tarray(),\n\t\t\tINVP_PLUGIN_VERSION\n\t\t);\n\t}\n\n\t/**\n\t * Outputs some instructions for the Taxonomies settings page.\n\t *\n\t * @return void\n\t */\n\tpublic function settings_section_content_taxonomies() {\n\t\tprintf(\n\t\t\t/* translators: 1. An opening anchor tag, 2. A closing anchor tag */\n\t\t\tesc_html__( 'Configure which taxonomies are active, whether they are shown in the dashboard menu, and for which vehicle types they should appear in the editor. Vehicle types can be added and removed %1$shere%2$s. Deleted types provided by the plugin will be restored during plugin activation.', 'inventory-presser' ),\n\t\t\t'\u003ca href=\"' . esc_url( admin_url( 'edit-tags.php?taxonomy=type\u0026post_type=' . INVP::POST_TYPE ) ) . '\"\u003e',\n\t\t\t'\u003c/a\u003e'\n\t\t);\n\t}\n\n\t/**\n\t * Creates a default value for the &#96;taxonomies&#96; key stored in the option.",
        "detailedLines": [
          {
            "lineNumber": 1192,
            "text": "\t\t\t$sanitary_values['additional_listings_pages'] = $unique_rules;"
          },
          {
            "lineNumber": 1193,
            "text": "\t\t}"
          },
          {
            "lineNumber": 1194
          },
          {
            "lineNumber": 1195,
            "text": "\t\tif ( isset( $input['singles_contact_form'] ) ) {"
          },
          {
            "lineNumber": 1196,
            "text": "\t\t\t$sanitary_values['singles_contact_form'] = $input['singles_contact_form'];"
          },
          {
            "lineNumber": 1197,
            "text": "\t\t}"
          },
          {
            "lineNumber": 1198
          },
          {
            "lineNumber": 1199,
            "text": "\t\treturn apply_filters( 'invp_options_page_sanitized_values', $sanitary_values, $input );"
          },
          {
            "lineNumber": 1200,
            "text": "\t}"
          },
          {
            "lineNumber": 1201
          },
          {
            "lineNumber": 1202,
            "text": "\t/**"
          },
          {
            "lineNumber": 1203,
            "text": "\t * Callback function for array_walk_recursive to sanitize taxonomies settings."
          },
          {
            "lineNumber": 1204,
            "text": "\t *"
          },
          {
            "lineNumber": 1205,
            "text": "\t * @param  mixed $value"
          },
          {
            "lineNumber": 1206,
            "text": "\t * @param  mixed $index"
          },
          {
            "lineNumber": 1207,
            "text": "\t * @return bool"
          },
          {
            "lineNumber": 1208,
            "text": "\t */"
          },
          {
            "lineNumber": 1209,
            "text": "\tprotected function sanitize_taxonomies_walker( \u0026$value, $index ) {"
          },
          {
            "lineNumber": 1210,
            "text": "\t\t$value = boolval( $value );"
          },
          {
            "lineNumber": 1211,
            "text": "\t}"
          },
          {
            "lineNumber": 1212
          },
          {
            "lineNumber": 1213,
            "text": "\t/**"
          },
          {
            "lineNumber": 1214,
            "text": "\t * Registers JavaScript and CSS file that power the settings page."
          },
          {
            "lineNumber": 1215,
            "text": "\t *"
          },
          {
            "lineNumber": 1216,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 1217,
            "text": "\t */"
          },
          {
            "lineNumber": 1218,
            "text": "\tpublic function scripts_and_styles() {"
          },
          {
            "lineNumber": 1219,
            "text": "\t\t$handle = 'invp_page_settings';"
          },
          {
            "lineNumber": 1220,
            "text": "\t\t$min    = defined( 'SCRIPT_DEBUG' ) \u0026\u0026 SCRIPT_DEBUG ? '' : '.min';"
          },
          {
            "lineNumber": 1221,
            "text": "\t\twp_register_script("
          },
          {
            "lineNumber": 1222,
            "text": "\t\t\t$handle,"
          },
          {
            "lineNumber": 1223,
            "text": "\t\t\tplugins_url( \"/js/page-settings{$min}.js\", INVP_PLUGIN_FILE_PATH ),"
          },
          {
            "lineNumber": 1224,
            "text": "\t\t\tarray( 'jquery' ),"
          },
          {
            "lineNumber": 1225,
            "text": "\t\t\tINVP_PLUGIN_VERSION,"
          },
          {
            "lineNumber": 1226,
            "text": "\t\t\ttrue"
          },
          {
            "lineNumber": 1227,
            "text": "\t\t);"
          },
          {
            "lineNumber": 1228,
            "text": "\t\twp_add_inline_script("
          },
          {
            "lineNumber": 1229,
            "text": "\t\t\t$handle,"
          },
          {
            "lineNumber": 1230,
            "text": "\t\t\t'const invp_page_settings = ' . wp_json_encode("
          },
          {
            "lineNumber": 1231,
            "text": "\t\t\t\tarray("
          },
          {
            "lineNumber": 1232,
            "text": "\t\t\t\t\t'taxonomies' =\u003e Inventory_Presser_Taxonomies::query_vars_array(),"
          },
          {
            "lineNumber": 1233,
            "text": "\t\t\t\t)"
          },
          {
            "lineNumber": 1234,
            "text": "\t\t\t),"
          },
          {
            "lineNumber": 1235,
            "text": "\t\t\t'before'"
          },
          {
            "lineNumber": 1236,
            "text": "\t\t);"
          },
          {
            "lineNumber": 1237,
            "text": "\t\twp_register_style("
          },
          {
            "lineNumber": 1238,
            "text": "\t\t\t$handle,"
          },
          {
            "lineNumber": 1239,
            "text": "\t\t\tplugins_url( \"/css/page-settings$min}.css\", INVP_PLUGIN_FILE_PATH ),"
          },
          {
            "lineNumber": 1240,
            "text": "\t\t\tarray(),"
          },
          {
            "lineNumber": 1241,
            "text": "\t\t\tINVP_PLUGIN_VERSION"
          },
          {
            "lineNumber": 1242,
            "text": "\t\t);"
          },
          {
            "lineNumber": 1243,
            "text": "\t}"
          },
          {
            "lineNumber": 1244
          },
          {
            "lineNumber": 1245,
            "text": "\t/**"
          },
          {
            "lineNumber": 1246,
            "text": "\t * Outputs some instructions for the Taxonomies settings page."
          },
          {
            "lineNumber": 1247,
            "text": "\t *"
          },
          {
            "lineNumber": 1248,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 1249,
            "text": "\t */"
          },
          {
            "lineNumber": 1250,
            "text": "\tpublic function settings_section_content_taxonomies() {"
          },
          {
            "lineNumber": 1251,
            "text": "\t\tprintf("
          },
          {
            "lineNumber": 1252,
            "text": "\t\t\t/* translators: 1. An opening anchor tag, 2. A closing anchor tag */"
          },
          {
            "lineNumber": 1253,
            "text": "\t\t\tesc_html__( 'Configure which taxonomies are active, whether they are shown in the dashboard menu, and for which vehicle types they should appear in the editor. Vehicle types can be added and removed %1$shere%2$s. Deleted types provided by the plugin will be restored during plugin activation.', 'inventory-presser' ),"
          },
          {
            "lineNumber": 1254,
            "text": "\t\t\t'\u003ca href=\"' . esc_url( admin_url( 'edit-tags.php?taxonomy=type\u0026post_type=' . INVP::POST_TYPE ) ) . '\"\u003e',"
          },
          {
            "lineNumber": 1255,
            "text": "\t\t\t'\u003c/a\u003e'"
          },
          {
            "lineNumber": 1256,
            "text": "\t\t);"
          },
          {
            "lineNumber": 1257,
            "text": "\t}"
          },
          {
            "lineNumber": 1258
          },
          {
            "lineNumber": 1259,
            "text": "\t/**"
          },
          {
            "lineNumber": 1260,
            "text": "\t * Creates a default value for the &#96;taxonomies&#96; key stored in the option."
          }
        ],
        "range": {
          "endPosition": {
            "line": 1260
          },
          "startPosition": {
            "line": 1191
          }
        },
        "relativeWorkspacePath": "./includes/admin/class-admin-options.php",
        "signatures": {}
      },
      "score": 0.3146406412124634
    },
    {
      "codeBlock": {
        "contents": "\tpublic function form( $instance ) {\n\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();\n\t\t// get all locations.\n\t\t$location_info = get_terms(\n\t\t\tarray(\n\t\t\t\t'taxonomy'   =\u003e 'location',\n\t\t\t\t'fields'     =\u003e 'id=\u003ename',\n\t\t\t\t'hide_empty' =\u003e false,\n\t\t\t)\n\t\t);\n\t\t$phones_table  = '\u003ctable\u003e\u003ctbody\u003e';\n\n\t\t// loop through each location, set up form.\n\t\tforeach ( $location_info as $term_id =\u003e $name ) {\n\t\t\t// Output a checkbox for every phone number in this location.\n\t\t\tfor ( $p = 1; $p \u003c= INVP::LOCATION_MAX_PHONES; $p++ ) {\n\t\t\t\t// Is there a phone number in this slot?\n\t\t\t\t$phone_uid = get_term_meta( $term_id, 'phone_' . $p . '_uid', true );\n\t\t\t\tif ( ! $phone_uid ) {\n\t\t\t\t\t// No, we're done with this location.\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Only do this once per location.\n\t\t\t\tif ( 1 == $p ) {\n\t\t\t\t\t$phones_table .= sprintf( '\u003ctr\u003e\u003ctd colspan=\"3\"\u003e\u003cstrong\u003e%s\u003c/strong\u003e\u003c/td\u003e\u003c/tr\u003e', esc_html( $name ) );\n\t\t\t\t}\n\n\t\t\t\t$number      = get_term_meta( $term_id, 'phone_' . $p . '_number', true );\n\t\t\t\t$description = get_term_meta( $term_id, 'phone_' . $p . '_description', true );\n\t\t\t\t$checkbox_id = $this-\u003eget_field_id( 'cb_display_' . $phone_uid );\n\n\t\t\t\t$cb_display_text = sprintf(\n\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',\n\t\t\t\t\tesc_attr( $checkbox_id ),\n\t\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_display[' . $term_id . '][]' ) ),\n\t\t\t\t\tesc_attr( $phone_uid ),\n\t\t\t\t\tchecked( ( isset( $cb_display[ $term_id ] ) \u0026\u0026 is_array( $cb_display[ $term_id ] ) \u0026\u0026 in_array( $phone_uid, $cb_display[ $term_id ], true ) ), true, false )\n\t\t\t\t);\n\n\t\t\t\t$phones_table .= sprintf(\n\t\t\t\t\t'\u003ctr\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e\u003clabel for=\"%s\"\u003e%s\u003c/label\u003e\u003c/td\u003e\u003ctd\u003e\u003clabel for=\"%s\"\u003e%s\u003c/label\u003e\u003c/td\u003e\u003c/tr\u003e',\n\t\t\t\t\t$cb_display_text,\n\t\t\t\t\tesc_attr( $checkbox_id ),\n\t\t\t\t\tesc_html( $description ),\n\t\t\t\t\tesc_attr( $checkbox_id ),\n\t\t\t\t\tesc_html( $number )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$phones_table .= '\u003c/tbody\u003e\u003c/table\u003e';\n\n\t\t// Widget admin form.\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title (optional):', 'inventory-presser' ); ?\u003e\u003c/label\u003e",
        "detailedLines": [
          {
            "lineNumber": 180,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 181,
            "text": "\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();"
          },
          {
            "lineNumber": 182,
            "text": "\t\t// get all locations."
          },
          {
            "lineNumber": 183,
            "text": "\t\t$location_info = get_terms("
          },
          {
            "lineNumber": 184,
            "text": "\t\t\tarray("
          },
          {
            "lineNumber": 185,
            "text": "\t\t\t\t'taxonomy'   =\u003e 'location',"
          },
          {
            "lineNumber": 186,
            "text": "\t\t\t\t'fields'     =\u003e 'id=\u003ename',"
          },
          {
            "lineNumber": 187,
            "text": "\t\t\t\t'hide_empty' =\u003e false,"
          },
          {
            "lineNumber": 188,
            "text": "\t\t\t)"
          },
          {
            "lineNumber": 189,
            "text": "\t\t);"
          },
          {
            "lineNumber": 190,
            "text": "\t\t$phones_table  = '\u003ctable\u003e\u003ctbody\u003e';"
          },
          {
            "lineNumber": 191
          },
          {
            "lineNumber": 192,
            "text": "\t\t// loop through each location, set up form."
          },
          {
            "lineNumber": 193,
            "text": "\t\tforeach ( $location_info as $term_id =\u003e $name ) {"
          },
          {
            "lineNumber": 194,
            "text": "\t\t\t// Output a checkbox for every phone number in this location."
          },
          {
            "lineNumber": 195,
            "text": "\t\t\tfor ( $p = 1; $p \u003c= INVP::LOCATION_MAX_PHONES; $p++ ) {"
          },
          {
            "lineNumber": 196,
            "text": "\t\t\t\t// Is there a phone number in this slot?"
          },
          {
            "lineNumber": 197,
            "text": "\t\t\t\t$phone_uid = get_term_meta( $term_id, 'phone_' . $p . '_uid', true );"
          },
          {
            "lineNumber": 198,
            "text": "\t\t\t\tif ( ! $phone_uid ) {"
          },
          {
            "lineNumber": 199,
            "text": "\t\t\t\t\t// No, we're done with this location."
          },
          {
            "lineNumber": 200,
            "text": "\t\t\t\t\tbreak;"
          },
          {
            "lineNumber": 201,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 202
          },
          {
            "lineNumber": 203,
            "text": "\t\t\t\t// Only do this once per location."
          },
          {
            "lineNumber": 204,
            "text": "\t\t\t\tif ( 1 == $p ) {"
          },
          {
            "lineNumber": 205,
            "text": "\t\t\t\t\t$phones_table .= sprintf( '\u003ctr\u003e\u003ctd colspan=\"3\"\u003e\u003cstrong\u003e%s\u003c/strong\u003e\u003c/td\u003e\u003c/tr\u003e', esc_html( $name ) );"
          },
          {
            "lineNumber": 206,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 207
          },
          {
            "lineNumber": 208,
            "text": "\t\t\t\t$number      = get_term_meta( $term_id, 'phone_' . $p . '_number', true );"
          },
          {
            "lineNumber": 209,
            "text": "\t\t\t\t$description = get_term_meta( $term_id, 'phone_' . $p . '_description', true );"
          },
          {
            "lineNumber": 210,
            "text": "\t\t\t\t$checkbox_id = $this-\u003eget_field_id( 'cb_display_' . $phone_uid );"
          },
          {
            "lineNumber": 211
          },
          {
            "lineNumber": 212,
            "text": "\t\t\t\t$cb_display_text = sprintf("
          },
          {
            "lineNumber": 213,
            "text": "\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',"
          },
          {
            "lineNumber": 214,
            "text": "\t\t\t\t\tesc_attr( $checkbox_id ),"
          },
          {
            "lineNumber": 215,
            "text": "\t\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_display[' . $term_id . '][]' ) ),"
          },
          {
            "lineNumber": 216,
            "text": "\t\t\t\t\tesc_attr( $phone_uid ),"
          },
          {
            "lineNumber": 217,
            "text": "\t\t\t\t\tchecked( ( isset( $cb_display[ $term_id ] ) \u0026\u0026 is_array( $cb_display[ $term_id ] ) \u0026\u0026 in_array( $phone_uid, $cb_display[ $term_id ], true ) ), true, false )"
          },
          {
            "lineNumber": 218,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 219
          },
          {
            "lineNumber": 220,
            "text": "\t\t\t\t$phones_table .= sprintf("
          },
          {
            "lineNumber": 221,
            "text": "\t\t\t\t\t'\u003ctr\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e\u003clabel for=\"%s\"\u003e%s\u003c/label\u003e\u003c/td\u003e\u003ctd\u003e\u003clabel for=\"%s\"\u003e%s\u003c/label\u003e\u003c/td\u003e\u003c/tr\u003e',"
          },
          {
            "lineNumber": 222,
            "text": "\t\t\t\t\t$cb_display_text,"
          },
          {
            "lineNumber": 223,
            "text": "\t\t\t\t\tesc_attr( $checkbox_id ),"
          },
          {
            "lineNumber": 224,
            "text": "\t\t\t\t\tesc_html( $description ),"
          },
          {
            "lineNumber": 225,
            "text": "\t\t\t\t\tesc_attr( $checkbox_id ),"
          },
          {
            "lineNumber": 226,
            "text": "\t\t\t\t\tesc_html( $number )"
          },
          {
            "lineNumber": 227,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 228,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 229,
            "text": "\t\t}"
          },
          {
            "lineNumber": 230
          },
          {
            "lineNumber": 231,
            "text": "\t\t$phones_table .= '\u003c/tbody\u003e\u003c/table\u003e';"
          },
          {
            "lineNumber": 232
          },
          {
            "lineNumber": 233,
            "text": "\t\t// Widget admin form."
          },
          {
            "lineNumber": 234,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';"
          },
          {
            "lineNumber": 235,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 236,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 237,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title (optional):', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          }
        ],
        "range": {
          "endPosition": {
            "line": 237
          },
          "startPosition": {
            "line": 179
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-phones.php",
        "signatures": {}
      },
      "score": 0.31442534923553467
    },
    {
      "codeBlock": {
        "contents": "\t\t$image_keys = array_keys( $this-\u003eimages() );\n\t\t$image      = ( isset( $instance['image'] ) \u0026\u0026 in_array( $instance['image'], $image_keys, true ) ) ? $instance['image'] : $image_keys[0];\n\n\t\t$title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '' );\n\t\t// before and after widget arguments are defined by themes.\n\t\techo wp_kses_post( $args['before_widget'] );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\tif ( isset( $instance['before_image'] ) ) {\n\t\t\techo wp_kses_post( wpautop( $instance['before_image'] ) );\n\t\t}\n\t\tprintf(\n\t\t\t'\u003ca href=\"https://kbb.com\" target=\"_blank\"\u003e\u003cimg src=\"%s\"\u003e\u003c/a\u003e',\n\t\t\tesc_url( plugins_url( '/images/' . $this-\u003eimages()[ $image ]['img'], INVP_PLUGIN_FILE_PATH ) )\n\t\t);\n\t\tif ( isset( $instance['after_image'] ) ) {\n\t\t\techo wp_kses_post( wpautop( $instance['after_image'] ) );\n\t\t}\n\n\t\techo wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$image_keys = array_keys( $this-\u003eimages() );",
        "detailedLines": [
          {
            "lineNumber": 66,
            "text": "\t\t$image_keys = array_keys( $this-\u003eimages() );"
          },
          {
            "lineNumber": 67,
            "text": "\t\t$image      = ( isset( $instance['image'] ) \u0026\u0026 in_array( $instance['image'], $image_keys, true ) ) ? $instance['image'] : $image_keys[0];"
          },
          {
            "lineNumber": 68
          },
          {
            "lineNumber": 69,
            "text": "\t\t$title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '' );"
          },
          {
            "lineNumber": 70,
            "text": "\t\t// before and after widget arguments are defined by themes."
          },
          {
            "lineNumber": 71,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 72,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 73,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 74,
            "text": "\t\t}"
          },
          {
            "lineNumber": 75
          },
          {
            "lineNumber": 76,
            "text": "\t\tif ( isset( $instance['before_image'] ) ) {"
          },
          {
            "lineNumber": 77,
            "text": "\t\t\techo wp_kses_post( wpautop( $instance['before_image'] ) );"
          },
          {
            "lineNumber": 78,
            "text": "\t\t}"
          },
          {
            "lineNumber": 79,
            "text": "\t\tprintf("
          },
          {
            "lineNumber": 80,
            "text": "\t\t\t'\u003ca href=\"https://kbb.com\" target=\"_blank\"\u003e\u003cimg src=\"%s\"\u003e\u003c/a\u003e',"
          },
          {
            "lineNumber": 81,
            "text": "\t\t\tesc_url( plugins_url( '/images/' . $this-\u003eimages()[ $image ]['img'], INVP_PLUGIN_FILE_PATH ) )"
          },
          {
            "lineNumber": 82,
            "text": "\t\t);"
          },
          {
            "lineNumber": 83,
            "text": "\t\tif ( isset( $instance['after_image'] ) ) {"
          },
          {
            "lineNumber": 84,
            "text": "\t\t\techo wp_kses_post( wpautop( $instance['after_image'] ) );"
          },
          {
            "lineNumber": 85,
            "text": "\t\t}"
          },
          {
            "lineNumber": 86
          },
          {
            "lineNumber": 87,
            "text": "\t\techo wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 88,
            "text": "\t}"
          },
          {
            "lineNumber": 89
          },
          {
            "lineNumber": 90,
            "text": "\t/**"
          },
          {
            "lineNumber": 91,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 92,
            "text": "\t *"
          },
          {
            "lineNumber": 93,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 94,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 95,
            "text": "\t */"
          },
          {
            "lineNumber": 96,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 97
          },
          {
            "lineNumber": 98,
            "text": "\t\t$image_keys = array_keys( $this-\u003eimages() );"
          }
        ],
        "range": {
          "endPosition": {
            "line": 98
          },
          "startPosition": {
            "line": 64
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-kbb.php",
        "signatures": {}
      },
      "score": 0.31385159492492676
    },
    {
      "codeBlock": {
        "contents": "\t\t\t\t'hide_empty' =\u003e false,\n\t\t\t)\n\t\t);\n\t\tforeach ( $location_info as $term_id =\u003e $name ) {\n\t\t\t// Does this address even have a phone number displayed by this instance of this widget?\n\t\t\tif ( empty( $instance['cb_display'][ $term_id ] ) ) {\n\t\t\t\t// No.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor ( $p = 1; $p \u003c= INVP::LOCATION_MAX_PHONES; $p++ ) {\n\t\t\t\t$phone_uid = get_term_meta( $term_id, 'phone_' . $p . '_uid', true );\n\t\t\t\tif ( ! $phone_uid ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// There is a phone number is slot $p, has the user configured this widget to display it?\n\t\t\t\tif ( in_array( $phone_uid, $instance['cb_display'][ $term_id ], true ) ) {\n\t\t\t\t\t// Yes, output this number.\n\t\t\t\t\t$number      = get_term_meta( $term_id, 'phone_' . $p . '_number', true );\n\t\t\t\t\t$html        = '';\n\t\t\t\t\t$description = '';\n\t\t\t\t\tif ( $this-\u003eformats()[ $format ]['uses_labels'] ) {\n\t\t\t\t\t\t$description = get_term_meta( $term_id, 'phone_' . $p . '_description', true );\n\t\t\t\t\t\t$html       .= sprintf( $this-\u003eformats()[ $format ]['repeater'], esc_html( $description ), INVP::prepare_phone_number_for_link( $number ), esc_html( $number ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$html .= sprintf( $this-\u003eformats()[ $format ]['repeater'], INVP::prepare_phone_number_for_link( $number ), esc_html( $number ) );\n\t\t\t\t\t}\n\n\t\t\t\t\techo wp_kses_post( apply_filters( 'invp_phone_number_widget_html', $html, $term_id, $phone_uid, $number, $description, $this-\u003eformats()[ $format ] ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo $this-\u003eformats()[ $format ]['after']\n\t\t. '\u003c/div\u003e'\n\t\t. wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();",
        "detailedLines": [
          {
            "lineNumber": 135,
            "text": "\t\t\t\t'hide_empty' =\u003e false,"
          },
          {
            "lineNumber": 136,
            "text": "\t\t\t)"
          },
          {
            "lineNumber": 137,
            "text": "\t\t);"
          },
          {
            "lineNumber": 138,
            "text": "\t\tforeach ( $location_info as $term_id =\u003e $name ) {"
          },
          {
            "lineNumber": 139,
            "text": "\t\t\t// Does this address even have a phone number displayed by this instance of this widget?"
          },
          {
            "lineNumber": 140,
            "text": "\t\t\tif ( empty( $instance['cb_display'][ $term_id ] ) ) {"
          },
          {
            "lineNumber": 141,
            "text": "\t\t\t\t// No."
          },
          {
            "lineNumber": 142,
            "text": "\t\t\t\tcontinue;"
          },
          {
            "lineNumber": 143,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 144
          },
          {
            "lineNumber": 145,
            "text": "\t\t\tfor ( $p = 1; $p \u003c= INVP::LOCATION_MAX_PHONES; $p++ ) {"
          },
          {
            "lineNumber": 146,
            "text": "\t\t\t\t$phone_uid = get_term_meta( $term_id, 'phone_' . $p . '_uid', true );"
          },
          {
            "lineNumber": 147,
            "text": "\t\t\t\tif ( ! $phone_uid ) {"
          },
          {
            "lineNumber": 148,
            "text": "\t\t\t\t\tbreak;"
          },
          {
            "lineNumber": 149,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 150
          },
          {
            "lineNumber": 151,
            "text": "\t\t\t\t// There is a phone number is slot $p, has the user configured this widget to display it?"
          },
          {
            "lineNumber": 152,
            "text": "\t\t\t\tif ( in_array( $phone_uid, $instance['cb_display'][ $term_id ], true ) ) {"
          },
          {
            "lineNumber": 153,
            "text": "\t\t\t\t\t// Yes, output this number."
          },
          {
            "lineNumber": 154,
            "text": "\t\t\t\t\t$number      = get_term_meta( $term_id, 'phone_' . $p . '_number', true );"
          },
          {
            "lineNumber": 155,
            "text": "\t\t\t\t\t$html        = '';"
          },
          {
            "lineNumber": 156,
            "text": "\t\t\t\t\t$description = '';"
          },
          {
            "lineNumber": 157,
            "text": "\t\t\t\t\tif ( $this-\u003eformats()[ $format ]['uses_labels'] ) {"
          },
          {
            "lineNumber": 158,
            "text": "\t\t\t\t\t\t$description = get_term_meta( $term_id, 'phone_' . $p . '_description', true );"
          },
          {
            "lineNumber": 159,
            "text": "\t\t\t\t\t\t$html       .= sprintf( $this-\u003eformats()[ $format ]['repeater'], esc_html( $description ), INVP::prepare_phone_number_for_link( $number ), esc_html( $number ) );"
          },
          {
            "lineNumber": 160,
            "text": "\t\t\t\t\t} else {"
          },
          {
            "lineNumber": 161,
            "text": "\t\t\t\t\t\t$html .= sprintf( $this-\u003eformats()[ $format ]['repeater'], INVP::prepare_phone_number_for_link( $number ), esc_html( $number ) );"
          },
          {
            "lineNumber": 162,
            "text": "\t\t\t\t\t}"
          },
          {
            "lineNumber": 163
          },
          {
            "lineNumber": 164,
            "text": "\t\t\t\t\techo wp_kses_post( apply_filters( 'invp_phone_number_widget_html', $html, $term_id, $phone_uid, $number, $description, $this-\u003eformats()[ $format ] ) );"
          },
          {
            "lineNumber": 165,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 166,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 167,
            "text": "\t\t}"
          },
          {
            "lineNumber": 168
          },
          {
            "lineNumber": 169,
            "text": "\t\techo $this-\u003eformats()[ $format ]['after']"
          },
          {
            "lineNumber": 170,
            "text": "\t\t. '\u003c/div\u003e'"
          },
          {
            "lineNumber": 171,
            "text": "\t\t. wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 172,
            "text": "\t}"
          },
          {
            "lineNumber": 173
          },
          {
            "lineNumber": 174,
            "text": "\t/**"
          },
          {
            "lineNumber": 175,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 176,
            "text": "\t *"
          },
          {
            "lineNumber": 177,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 178,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 179,
            "text": "\t */"
          },
          {
            "lineNumber": 180,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 181,
            "text": "\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();"
          }
        ],
        "range": {
          "endPosition": {
            "line": 181
          },
          "startPosition": {
            "line": 134
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-phones.php",
        "signatures": {}
      },
      "score": 0.31187328696250916
    },
    {
      "codeBlock": {
        "contents": "\t/**\n\t * Outputs the content of the widget\n\t *\n\t * @param array $args\n\t * @param array $instance\n\t */\n\tpublic function widget( $args, $instance ) {\n\n\t\t$image_keys = array_keys( $this-\u003eimages() );\n\t\t$image      = $image_keys[0];\n\t\tif ( ! empty( $instance['image'] ) \u0026\u0026 in_array( $instance['image'], $image_keys, true ) ) {\n\t\t\t$image = $instance['image'];\n\t\t}\n\n\t\t$path = dirname( INVP_PLUGIN_FILE_PATH ) . '/images/' . $this-\u003eimages()[ $image ]['img'];\n\t\tif ( ! file_exists( $path ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$title = apply_filters( 'widget_title', $instance['title'] );\n\t\t// before and after widget arguments are defined by themes.\n\t\techo wp_kses_post( $args['before_widget'] );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\techo wp_kses_post( wpautop( $instance['before_image'] ) );\n\t\tif ( 'svg' === strtolower( pathinfo( $this-\u003eimages()[ $image ]['img'], PATHINFO_EXTENSION ) ) ) {\n\t\t\t// Include the SVG inline instead of using an \u003cimg\u003e element.\n\t\t\t$svg = file_get_contents( $path );\n\t\t\tprintf(\n\t\t\t\t'\u003ca href=\"%s\"\u003e%s\u003c/a\u003e',\n\t\t\t\tesc_url( get_post_type_archive_link( INVP::POST_TYPE ) ),\n\t\t\t\t$svg\n\t\t\t);\n\t\t} else {\n\t\t\tprintf(\n\t\t\t\t'\u003ca href=\"%s\"\u003e\u003cimg src=\"%s\"\u003e\u003c/a\u003e',\n\t\t\t\tesc_url( get_post_type_archive_link( INVP::POST_TYPE ) ),\n\t\t\t\tesc_url( plugins_url( '/images/' . $this-\u003eimages()[ $image ]['img'], INVP_PLUGIN_FILE_PATH ) )\n\t\t\t);\n\t\t}\n\t\techo wp_kses_post( wpautop( $instance['after_image'] ) ) . wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$image_keys = array_keys( $this-\u003eimages() );",
        "detailedLines": [
          {
            "lineNumber": 77,
            "text": "\t/**"
          },
          {
            "lineNumber": 78,
            "text": "\t * Outputs the content of the widget"
          },
          {
            "lineNumber": 79,
            "text": "\t *"
          },
          {
            "lineNumber": 80,
            "text": "\t * @param array $args"
          },
          {
            "lineNumber": 81,
            "text": "\t * @param array $instance"
          },
          {
            "lineNumber": 82,
            "text": "\t */"
          },
          {
            "lineNumber": 83,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 84
          },
          {
            "lineNumber": 85,
            "text": "\t\t$image_keys = array_keys( $this-\u003eimages() );"
          },
          {
            "lineNumber": 86,
            "text": "\t\t$image      = $image_keys[0];"
          },
          {
            "lineNumber": 87,
            "text": "\t\tif ( ! empty( $instance['image'] ) \u0026\u0026 in_array( $instance['image'], $image_keys, true ) ) {"
          },
          {
            "lineNumber": 88,
            "text": "\t\t\t$image = $instance['image'];"
          },
          {
            "lineNumber": 89,
            "text": "\t\t}"
          },
          {
            "lineNumber": 90
          },
          {
            "lineNumber": 91,
            "text": "\t\t$path = dirname( INVP_PLUGIN_FILE_PATH ) . '/images/' . $this-\u003eimages()[ $image ]['img'];"
          },
          {
            "lineNumber": 92,
            "text": "\t\tif ( ! file_exists( $path ) ) {"
          },
          {
            "lineNumber": 93,
            "text": "\t\t\treturn;"
          },
          {
            "lineNumber": 94,
            "text": "\t\t}"
          },
          {
            "lineNumber": 95
          },
          {
            "lineNumber": 96,
            "text": "\t\t$title = apply_filters( 'widget_title', $instance['title'] );"
          },
          {
            "lineNumber": 97,
            "text": "\t\t// before and after widget arguments are defined by themes."
          },
          {
            "lineNumber": 98,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 99,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 100,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 101,
            "text": "\t\t}"
          },
          {
            "lineNumber": 102
          },
          {
            "lineNumber": 103,
            "text": "\t\techo wp_kses_post( wpautop( $instance['before_image'] ) );"
          },
          {
            "lineNumber": 104,
            "text": "\t\tif ( 'svg' === strtolower( pathinfo( $this-\u003eimages()[ $image ]['img'], PATHINFO_EXTENSION ) ) ) {"
          },
          {
            "lineNumber": 105,
            "text": "\t\t\t// Include the SVG inline instead of using an \u003cimg\u003e element."
          },
          {
            "lineNumber": 106,
            "text": "\t\t\t$svg = file_get_contents( $path );"
          },
          {
            "lineNumber": 107,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 108,
            "text": "\t\t\t\t'\u003ca href=\"%s\"\u003e%s\u003c/a\u003e',"
          },
          {
            "lineNumber": 109,
            "text": "\t\t\t\tesc_url( get_post_type_archive_link( INVP::POST_TYPE ) ),"
          },
          {
            "lineNumber": 110,
            "text": "\t\t\t\t$svg"
          },
          {
            "lineNumber": 111,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 112,
            "text": "\t\t} else {"
          },
          {
            "lineNumber": 113,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 114,
            "text": "\t\t\t\t'\u003ca href=\"%s\"\u003e\u003cimg src=\"%s\"\u003e\u003c/a\u003e',"
          },
          {
            "lineNumber": 115,
            "text": "\t\t\t\tesc_url( get_post_type_archive_link( INVP::POST_TYPE ) ),"
          },
          {
            "lineNumber": 116,
            "text": "\t\t\t\tesc_url( plugins_url( '/images/' . $this-\u003eimages()[ $image ]['img'], INVP_PLUGIN_FILE_PATH ) )"
          },
          {
            "lineNumber": 117,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 118,
            "text": "\t\t}"
          },
          {
            "lineNumber": 119,
            "text": "\t\techo wp_kses_post( wpautop( $instance['after_image'] ) ) . wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 120,
            "text": "\t}"
          },
          {
            "lineNumber": 121
          },
          {
            "lineNumber": 122,
            "text": "\t/**"
          },
          {
            "lineNumber": 123,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 124,
            "text": "\t *"
          },
          {
            "lineNumber": 125,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 126,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 127,
            "text": "\t */"
          },
          {
            "lineNumber": 128,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 129
          },
          {
            "lineNumber": 130,
            "text": "\t\t$image_keys = array_keys( $this-\u003eimages() );"
          }
        ],
        "range": {
          "endPosition": {
            "line": 130
          },
          "startPosition": {
            "line": 76
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-carfax.php",
        "signatures": {}
      },
      "score": 0.31099560856819153
    },
    {
      "codeBlock": {
        "contents": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Single Line Display', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003c?php\n\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\techo $address_table;\n\t\t?\u003e\n\t\t\u003c/p\u003e\n\t\t\u003c?php\n\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.\n\t *\n\t * @param  array $new_instance\n\t * @param  array $old_instance\n\t * @return array The updated array full of settings\n\t */\n\tpublic function update( $new_instance, $old_instance ) {\n\t\t$instance                   = array();\n\t\t$instance['title']          = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';\n\t\t$instance['cb_display']     = ( ! empty( $new_instance['cb_display'] ) ) ? $new_instance['cb_display'] : array();\n\t\t$instance['cb_single_line'] = ( ! empty( $new_instance['cb_single_line'] ) ) ? $new_instance['cb_single_line'] : '';\n\t\treturn $instance;\n\t}\n}",
        "detailedLines": [
          {
            "lineNumber": 144,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Single Line Display', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 145,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 146,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 147,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 148,
            "text": "\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped"
          },
          {
            "lineNumber": 149,
            "text": "\t\techo $address_table;"
          },
          {
            "lineNumber": 150,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 151,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 152,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 153,
            "text": "\t}"
          },
          {
            "lineNumber": 154
          },
          {
            "lineNumber": 155,
            "text": "\t/**"
          },
          {
            "lineNumber": 156,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          },
          {
            "lineNumber": 157,
            "text": "\t *"
          },
          {
            "lineNumber": 158,
            "text": "\t * @param  array $new_instance"
          },
          {
            "lineNumber": 159,
            "text": "\t * @param  array $old_instance"
          },
          {
            "lineNumber": 160,
            "text": "\t * @return array The updated array full of settings"
          },
          {
            "lineNumber": 161,
            "text": "\t */"
          },
          {
            "lineNumber": 162,
            "text": "\tpublic function update( $new_instance, $old_instance ) {"
          },
          {
            "lineNumber": 163,
            "text": "\t\t$instance                   = array();"
          },
          {
            "lineNumber": 164,
            "text": "\t\t$instance['title']          = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';"
          },
          {
            "lineNumber": 165,
            "text": "\t\t$instance['cb_display']     = ( ! empty( $new_instance['cb_display'] ) ) ? $new_instance['cb_display'] : array();"
          },
          {
            "lineNumber": 166,
            "text": "\t\t$instance['cb_single_line'] = ( ! empty( $new_instance['cb_single_line'] ) ) ? $new_instance['cb_single_line'] : '';"
          },
          {
            "lineNumber": 167,
            "text": "\t\treturn $instance;"
          },
          {
            "lineNumber": 168,
            "text": "\t}"
          },
          {
            "lineNumber": 169,
            "text": "}"
          }
        ],
        "range": {
          "endPosition": {
            "line": 169
          },
          "startPosition": {
            "line": 143
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-address.php",
        "signatures": {}
      },
      "score": 0.3106726408004761
    },
    {
      "codeBlock": {
        "contents": "\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title (optional):', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'format' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Display Format:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\t\u003cselect class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'format' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'format' ) ); ?\u003e\"\u003e\n\t\t\u003c?php\n\t\t$format = isset( $instance['format'] ) ? $instance['format'] : current( array_keys( $this-\u003eformats() ) );\n\t\tforeach ( $this-\u003eformats() as $key =\u003e $format_array ) {\n\t\t\tprintf(\n\t\t\t\t'\u003coption value=\"%s\"%s\u003e%s\u003c/option\u003e',\n\t\t\t\tesc_attr( $key ),\n\t\t\t\tselected( $format == $key, true, false ),\n\t\t\t\tesc_html( $format_array['selector'] )\n\t\t\t);\n\t\t}\n\t\t?\u003e\n\t\t\t\u003c/select\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\u003c?php echo wp_kses_post( $phones_table ); ?\u003e\u003c/p\u003e\n\t\t\u003c?php\n\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.\n\t *\n\t * @param  array $new_instance\n\t * @param  array $old_instance\n\t * @return array The updated array full of settings\n\t */\n\tpublic function update( $new_instance, $old_instance ) {\n\t\t$instance               = array();\n\t\t$instance['title']      = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';\n\t\t$instance['format']     = ( ! empty( $new_instance['format'] ) ) ? $new_instance['format'] : current( array_keys( $this-\u003eformats() ) );\n\t\t$instance['cb_display'] = ( ! empty( $new_instance['cb_display'] ) ) ? $new_instance['cb_display'] : array();\n\t\treturn $instance;\n\t}\n}",
        "detailedLines": [
          {
            "lineNumber": 236,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 237,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title (optional):', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 238,
            "text": "\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 239,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 240,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 241,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'format' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Display Format:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 242,
            "text": "\t\t\t\u003cselect class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'format' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'format' ) ); ?\u003e\"\u003e"
          },
          {
            "lineNumber": 243,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 244,
            "text": "\t\t$format = isset( $instance['format'] ) ? $instance['format'] : current( array_keys( $this-\u003eformats() ) );"
          },
          {
            "lineNumber": 245,
            "text": "\t\tforeach ( $this-\u003eformats() as $key =\u003e $format_array ) {"
          },
          {
            "lineNumber": 246,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 247,
            "text": "\t\t\t\t'\u003coption value=\"%s\"%s\u003e%s\u003c/option\u003e',"
          },
          {
            "lineNumber": 248,
            "text": "\t\t\t\tesc_attr( $key ),"
          },
          {
            "lineNumber": 249,
            "text": "\t\t\t\tselected( $format == $key, true, false ),"
          },
          {
            "lineNumber": 250,
            "text": "\t\t\t\tesc_html( $format_array['selector'] )"
          },
          {
            "lineNumber": 251,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 252,
            "text": "\t\t}"
          },
          {
            "lineNumber": 253,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 254,
            "text": "\t\t\t\u003c/select\u003e"
          },
          {
            "lineNumber": 255,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 256,
            "text": "\t\t\u003cp\u003e\u003c?php echo wp_kses_post( $phones_table ); ?\u003e\u003c/p\u003e"
          },
          {
            "lineNumber": 257,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 258,
            "text": "\t}"
          },
          {
            "lineNumber": 259
          },
          {
            "lineNumber": 260,
            "text": "\t/**"
          },
          {
            "lineNumber": 261,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          },
          {
            "lineNumber": 262,
            "text": "\t *"
          },
          {
            "lineNumber": 263,
            "text": "\t * @param  array $new_instance"
          },
          {
            "lineNumber": 264,
            "text": "\t * @param  array $old_instance"
          },
          {
            "lineNumber": 265,
            "text": "\t * @return array The updated array full of settings"
          },
          {
            "lineNumber": 266,
            "text": "\t */"
          },
          {
            "lineNumber": 267,
            "text": "\tpublic function update( $new_instance, $old_instance ) {"
          },
          {
            "lineNumber": 268,
            "text": "\t\t$instance               = array();"
          },
          {
            "lineNumber": 269,
            "text": "\t\t$instance['title']      = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';"
          },
          {
            "lineNumber": 270,
            "text": "\t\t$instance['format']     = ( ! empty( $new_instance['format'] ) ) ? $new_instance['format'] : current( array_keys( $this-\u003eformats() ) );"
          },
          {
            "lineNumber": 271,
            "text": "\t\t$instance['cb_display'] = ( ! empty( $new_instance['cb_display'] ) ) ? $new_instance['cb_display'] : array();"
          },
          {
            "lineNumber": 272,
            "text": "\t\treturn $instance;"
          },
          {
            "lineNumber": 273,
            "text": "\t}"
          },
          {
            "lineNumber": 274,
            "text": "}"
          }
        ],
        "range": {
          "endPosition": {
            "line": 274
          },
          "startPosition": {
            "line": 235
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-phones.php",
        "signatures": {}
      },
      "score": 0.3081949055194855
    },
    {
      "codeBlock": {
        "contents": "\tpublic function form( $instance ) {\n\n\t\t$image_keys = array_keys( $this-\u003eimages() );\n\n\t\t$title        = isset( $instance['title'] ) ? $instance['title'] : '';\n\t\t$before_image = isset( $instance['before_image'] ) ? $instance['before_image'] : '';\n\t\t$image        = isset( $instance['image'] ) ? $instance['image'] : $image_keys[0];\n\t\t$after_image  = isset( $instance['after_image'] ) ? $instance['after_image'] : '';\n\n\t\t// Widget admin form.\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'before_image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Text before image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'before_image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'before_image' ) ); ?\u003e\"\u003e\u003c?php echo esc_attr( $before_image ); ?\u003e\u003c/textarea\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\n\t\t\u003cselect class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'image' ) ); ?\u003e\"\u003e\n\t\t\u003c?php\n\t\tforeach ( $this-\u003eimages() as $key =\u003e $imginfo ) {\n\t\t\tprintf(\n\t\t\t\t'\u003coption value=\"%s\"%s\u003e%s\u003c/option\u003e',\n\t\t\t\tesc_attr( $key ),\n\t\t\t\tselected( $key === $image, true, false ),\n\t\t\t\tesc_html( $imginfo['text'] )\n\t\t\t);\n\t\t}\n\t\t?\u003e\n\t\t\u003c/select\u003e\n\n\t\t\u003c/p\u003e\n\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'after_image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Text after image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'after_image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'after_image' ) ); ?\u003e\"\u003e\u003c?php echo esc_attr( $after_image ); ?\u003e\u003c/textarea\u003e\n\t\t\u003c/p\u003e\n\t\t\u003c?php\n\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.",
        "detailedLines": [
          {
            "lineNumber": 96,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 97
          },
          {
            "lineNumber": 98,
            "text": "\t\t$image_keys = array_keys( $this-\u003eimages() );"
          },
          {
            "lineNumber": 99
          },
          {
            "lineNumber": 100,
            "text": "\t\t$title        = isset( $instance['title'] ) ? $instance['title'] : '';"
          },
          {
            "lineNumber": 101,
            "text": "\t\t$before_image = isset( $instance['before_image'] ) ? $instance['before_image'] : '';"
          },
          {
            "lineNumber": 102,
            "text": "\t\t$image        = isset( $instance['image'] ) ? $instance['image'] : $image_keys[0];"
          },
          {
            "lineNumber": 103,
            "text": "\t\t$after_image  = isset( $instance['after_image'] ) ? $instance['after_image'] : '';"
          },
          {
            "lineNumber": 104
          },
          {
            "lineNumber": 105,
            "text": "\t\t// Widget admin form."
          },
          {
            "lineNumber": 106,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 107,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 108,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 109,
            "text": "\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 110,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 111,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 112,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'before_image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Text before image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 113,
            "text": "\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'before_image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'before_image' ) ); ?\u003e\"\u003e\u003c?php echo esc_attr( $before_image ); ?\u003e\u003c/textarea\u003e"
          },
          {
            "lineNumber": 114,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 115,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 116,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 117
          },
          {
            "lineNumber": 118,
            "text": "\t\t\u003cselect class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'image' ) ); ?\u003e\"\u003e"
          },
          {
            "lineNumber": 119,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 120,
            "text": "\t\tforeach ( $this-\u003eimages() as $key =\u003e $imginfo ) {"
          },
          {
            "lineNumber": 121,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 122,
            "text": "\t\t\t\t'\u003coption value=\"%s\"%s\u003e%s\u003c/option\u003e',"
          },
          {
            "lineNumber": 123,
            "text": "\t\t\t\tesc_attr( $key ),"
          },
          {
            "lineNumber": 124,
            "text": "\t\t\t\tselected( $key === $image, true, false ),"
          },
          {
            "lineNumber": 125,
            "text": "\t\t\t\tesc_html( $imginfo['text'] )"
          },
          {
            "lineNumber": 126,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 127,
            "text": "\t\t}"
          },
          {
            "lineNumber": 128,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 129,
            "text": "\t\t\u003c/select\u003e"
          },
          {
            "lineNumber": 130
          },
          {
            "lineNumber": 131,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 132
          },
          {
            "lineNumber": 133,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 134,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'after_image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Text after image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 135,
            "text": "\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'after_image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'after_image' ) ); ?\u003e\"\u003e\u003c?php echo esc_attr( $after_image ); ?\u003e\u003c/textarea\u003e"
          },
          {
            "lineNumber": 136,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 137,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 138,
            "text": "\t}"
          },
          {
            "lineNumber": 139
          },
          {
            "lineNumber": 140,
            "text": "\t/**"
          },
          {
            "lineNumber": 141,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          }
        ],
        "range": {
          "endPosition": {
            "line": 141
          },
          "startPosition": {
            "line": 95
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-kbb.php",
        "signatures": {}
      },
      "score": 0.3081049919128418
    },
    {
      "codeBlock": {
        "contents": "\t *\n\t * @return void\n\t */\n\tpublic function options_page_content() {\n\t\twp_enqueue_script( 'invp_page_settings' );\n\t\twp_enqueue_style( 'invp_page_settings' );\n\n\t\t$this-\u003eoption = INVP::settings();\n\n\t\t?\u003e\n\t\t\u003cdiv class=\"wrap\"\u003e\n\t\t\t\u003ch2\u003e\u003c?php esc_html_e( 'Inventory Presser Settings', 'inventory-presser' ); ?\u003e\u003c/h2\u003e\n\t\t\u003c?php\n\t\tsettings_errors();\n\n\t\t// Can the user change options like Media settings and permalinks?\n\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\t// Are we adding recommendations to the Site Health report?\n\t\t\t$invp_site_health = new Inventory_Presser_Site_Health();\n\t\t\tif ( $invp_site_health-\u003ehave_recommendations() ) {\n\t\t\t\t// Yes. Add an admin notice drawing attention to Site Health.\n\t\t\t\tprintf(\n\t\t\t\t\t'\u003cdiv class=\"notice notice-warning is-dismissible\"\u003e\u003cp\u003e%s\u003c/p\u003e\u003c/div\u003e',\n\t\t\t\t\tesc_html__( 'Site settings can be improved. Visit Tools → Site Health and look for Inventory Presser recommendations.', 'inventory-presser' )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t?\u003e\n\t\t\u003cform method=\"post\" action=\"options.php\"\u003e\n\t\t\u003c?php\n\t\tsettings_fields( INVP::option_group() );\n\t\tdo_settings_sections( INVP::option_page() );\n\t\tsubmit_button();\n\n\t\t?\u003e\n\t\t\u003c/form\u003e\n\t\t\u003c/div\u003e\n\t\t\u003c?php\n\t}\n\n\t/**\n\t * Outputs the settings page HTML content for the taxonomies settings page.\n\t *\n\t * @return void\n\t */\n\tpublic function options_page_content_taxonomies() {\n\t\twp_enqueue_script( 'invp_page_settings' );\n\t\twp_enqueue_style( 'invp_page_settings' );\n\n\t\t$this-\u003eoption = INVP::settings();\n\n\t\t?\u003e\n\t\t\u003cdiv class=\"wrap\"\u003e\n\t\t\t\u003ch2\u003e\u003c?php esc_html_e( 'Inventory Presser Settings', 'inventory-presser' ); ?\u003e\u003c/h2\u003e\n\t\t\u003c?php\n\t\tsettings_errors();\n\n\t\t?\u003e\n\t\t\u003cform method=\"post\" action=\"options.php\"\u003e\n\t\t\u003c?php\n\t\tsettings_fields( INVP::option_group() );\n\t\tdo_settings_sections( 'invp-taxonomies-admin' );\n\t\tsubmit_button();\n\n\t\t?\u003e\n\t\t\u003c/form\u003e\n\t\t\u003c/div\u003e\n\t\t\u003c?php\n\t}\n\n\t/**\n\t * Santitizes the user input into the options inputs before they are saved.\n\t *\n\t * @param  array $input Array of submitted settings page values.\n\t * @return array\n\t */\n\tpublic function sanitize_options( $input ) {\n\t\t$settings = INVP::settings();\n\n\t\t// Is this the taxonomies page at edit.php?post_type=inventory_vehicle\u0026page=invp-taxonomies?",
        "detailedLines": [
          {
            "lineNumber": 1015,
            "text": "\t *"
          },
          {
            "lineNumber": 1016,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 1017,
            "text": "\t */"
          },
          {
            "lineNumber": 1018,
            "text": "\tpublic function options_page_content() {"
          },
          {
            "lineNumber": 1019,
            "text": "\t\twp_enqueue_script( 'invp_page_settings' );"
          },
          {
            "lineNumber": 1020,
            "text": "\t\twp_enqueue_style( 'invp_page_settings' );"
          },
          {
            "lineNumber": 1021
          },
          {
            "lineNumber": 1022,
            "text": "\t\t$this-\u003eoption = INVP::settings();"
          },
          {
            "lineNumber": 1023
          },
          {
            "lineNumber": 1024,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 1025,
            "text": "\t\t\u003cdiv class=\"wrap\"\u003e"
          },
          {
            "lineNumber": 1026,
            "text": "\t\t\t\u003ch2\u003e\u003c?php esc_html_e( 'Inventory Presser Settings', 'inventory-presser' ); ?\u003e\u003c/h2\u003e"
          },
          {
            "lineNumber": 1027,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 1028,
            "text": "\t\tsettings_errors();"
          },
          {
            "lineNumber": 1029
          },
          {
            "lineNumber": 1030,
            "text": "\t\t// Can the user change options like Media settings and permalinks?"
          },
          {
            "lineNumber": 1031,
            "text": "\t\tif ( current_user_can( 'manage_options' ) ) {"
          },
          {
            "lineNumber": 1032,
            "text": "\t\t\t// Are we adding recommendations to the Site Health report?"
          },
          {
            "lineNumber": 1033,
            "text": "\t\t\t$invp_site_health = new Inventory_Presser_Site_Health();"
          },
          {
            "lineNumber": 1034,
            "text": "\t\t\tif ( $invp_site_health-\u003ehave_recommendations() ) {"
          },
          {
            "lineNumber": 1035,
            "text": "\t\t\t\t// Yes. Add an admin notice drawing attention to Site Health."
          },
          {
            "lineNumber": 1036,
            "text": "\t\t\t\tprintf("
          },
          {
            "lineNumber": 1037,
            "text": "\t\t\t\t\t'\u003cdiv class=\"notice notice-warning is-dismissible\"\u003e\u003cp\u003e%s\u003c/p\u003e\u003c/div\u003e',"
          },
          {
            "lineNumber": 1038,
            "text": "\t\t\t\t\tesc_html__( 'Site settings can be improved. Visit Tools → Site Health and look for Inventory Presser recommendations.', 'inventory-presser' )"
          },
          {
            "lineNumber": 1039,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 1040,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 1041,
            "text": "\t\t}"
          },
          {
            "lineNumber": 1042,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 1043,
            "text": "\t\t\u003cform method=\"post\" action=\"options.php\"\u003e"
          },
          {
            "lineNumber": 1044,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 1045,
            "text": "\t\tsettings_fields( INVP::option_group() );"
          },
          {
            "lineNumber": 1046,
            "text": "\t\tdo_settings_sections( INVP::option_page() );"
          },
          {
            "lineNumber": 1047,
            "text": "\t\tsubmit_button();"
          },
          {
            "lineNumber": 1048
          },
          {
            "lineNumber": 1049,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 1050,
            "text": "\t\t\u003c/form\u003e"
          },
          {
            "lineNumber": 1051,
            "text": "\t\t\u003c/div\u003e"
          },
          {
            "lineNumber": 1052,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 1053,
            "text": "\t}"
          },
          {
            "lineNumber": 1054
          },
          {
            "lineNumber": 1055,
            "text": "\t/**"
          },
          {
            "lineNumber": 1056,
            "text": "\t * Outputs the settings page HTML content for the taxonomies settings page."
          },
          {
            "lineNumber": 1057,
            "text": "\t *"
          },
          {
            "lineNumber": 1058,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 1059,
            "text": "\t */"
          },
          {
            "lineNumber": 1060,
            "text": "\tpublic function options_page_content_taxonomies() {"
          },
          {
            "lineNumber": 1061,
            "text": "\t\twp_enqueue_script( 'invp_page_settings' );"
          },
          {
            "lineNumber": 1062,
            "text": "\t\twp_enqueue_style( 'invp_page_settings' );"
          },
          {
            "lineNumber": 1063
          },
          {
            "lineNumber": 1064,
            "text": "\t\t$this-\u003eoption = INVP::settings();"
          },
          {
            "lineNumber": 1065
          },
          {
            "lineNumber": 1066,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 1067,
            "text": "\t\t\u003cdiv class=\"wrap\"\u003e"
          },
          {
            "lineNumber": 1068,
            "text": "\t\t\t\u003ch2\u003e\u003c?php esc_html_e( 'Inventory Presser Settings', 'inventory-presser' ); ?\u003e\u003c/h2\u003e"
          },
          {
            "lineNumber": 1069,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 1070,
            "text": "\t\tsettings_errors();"
          },
          {
            "lineNumber": 1071
          },
          {
            "lineNumber": 1072,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 1073,
            "text": "\t\t\u003cform method=\"post\" action=\"options.php\"\u003e"
          },
          {
            "lineNumber": 1074,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 1075,
            "text": "\t\tsettings_fields( INVP::option_group() );"
          },
          {
            "lineNumber": 1076,
            "text": "\t\tdo_settings_sections( 'invp-taxonomies-admin' );"
          },
          {
            "lineNumber": 1077,
            "text": "\t\tsubmit_button();"
          },
          {
            "lineNumber": 1078
          },
          {
            "lineNumber": 1079,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 1080,
            "text": "\t\t\u003c/form\u003e"
          },
          {
            "lineNumber": 1081,
            "text": "\t\t\u003c/div\u003e"
          },
          {
            "lineNumber": 1082,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 1083,
            "text": "\t}"
          },
          {
            "lineNumber": 1084
          },
          {
            "lineNumber": 1085,
            "text": "\t/**"
          },
          {
            "lineNumber": 1086,
            "text": "\t * Santitizes the user input into the options inputs before they are saved."
          },
          {
            "lineNumber": 1087,
            "text": "\t *"
          },
          {
            "lineNumber": 1088,
            "text": "\t * @param  array $input Array of submitted settings page values."
          },
          {
            "lineNumber": 1089,
            "text": "\t * @return array"
          },
          {
            "lineNumber": 1090,
            "text": "\t */"
          },
          {
            "lineNumber": 1091,
            "text": "\tpublic function sanitize_options( $input ) {"
          },
          {
            "lineNumber": 1092,
            "text": "\t\t$settings = INVP::settings();"
          },
          {
            "lineNumber": 1093
          },
          {
            "lineNumber": 1094,
            "text": "\t\t// Is this the taxonomies page at edit.php?post_type=inventory_vehicle\u0026page=invp-taxonomies?"
          }
        ],
        "range": {
          "endPosition": {
            "line": 1094
          },
          "startPosition": {
            "line": 1014
          }
        },
        "relativeWorkspacePath": "./includes/admin/class-admin-options.php",
        "signatures": {}
      },
      "score": 0.2999434471130371
    },
    {
      "codeBlock": {
        "contents": "\t\t * @return string\n\t\t */\n\t\tprotected function adf_vehicle_xml() {\n\t\t\t$form_post_id = intval( $_POST['wpforms']['id'] ?? '' );\n\t\t\t$fields       = wpforms_get_form_fields( $form_post_id );\n\n\t\t\t$field_id = 0;\n\t\t\tforeach ( $fields as $field ) {\n\t\t\t\tif ( 'vehicle' !== $field['type'] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$field_id = $field['id'];\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( 0 === $field_id ) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\t$value   = sanitize_text_field( wp_unslash( $_POST['wpforms']['fields'][ $field_id ] ?? '' ) );\n\t\t\t$post_id = $this-\u003eextract_post_id_from_value( $value );\n\n\t\t\tif ( empty( $post_id ) ) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\treturn sprintf(\n\t\t\t\t'\u003cvehicle\u003e\u003cid\u003e%s\u003c/id\u003e\u003cyear\u003e%s\u003c/year\u003e\u003cmake\u003e%s\u003c/make\u003e\u003cmodel\u003e%s\u003c/model\u003e\u003cvin\u003e%s\u003c/vin\u003e\u003cstock\u003e%s\u003c/stock\u003e\u003c/vehicle\u003e',\n\t\t\t\tINVP::get_meta( 'car_id', $post_id ),\n\t\t\t\tinvp_get_the_year( $post_id ),\n\t\t\t\tinvp_get_the_make( $post_id ),\n\t\t\t\tinvp_get_the_model( $post_id ),\n\t\t\t\tinvp_get_the_vin( $post_id ),\n\t\t\t\tinvp_get_the_stock_number( $post_id )\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Register Smart Tags with the form builder.\n\t\t *\n\t\t * @link   https://wpforms.com/developers/how-to-create-a-custom-smart-tag/\n\t\t *\n\t\t * @param  array $tags\n\t\t * @return array\n\t\t */\n\t\tpublic function smart_tags_register( $tags ) {\n\t\t\t// Key is the tag, item is the tag name.\n\t\t\tforeach ( $this-\u003etags() as $tag =\u003e $name ) {\n\t\t\t\t$tags[ $tag ] = $name;\n\t\t\t}\n\t\t\treturn $tags;\n\t\t}\n\n\t\t/**\n\t\t * Process the Smart Tags when rendering entries.\n\t\t *\n\t\t * @link   https://wpforms.com/developers/how-to-create-a-custom-smart-tag/\n\t\t */\n\t\tpublic function smart_tags_process( $content, $tag ) {\n\t\t\t$our_tags = array_keys( $this-\u003etags() );\n\t\t\tif ( ! in_array( $tag, $our_tags, true ) ) {\n\t\t\t\treturn $content;\n\t\t\t}\n\t\t\tswitch ( $tag ) {\n\t\t\t\tcase 'invp_adf_vehicle':\n\t\t\t\t\t$content = str_replace( '{invp_adf_vehicle}', $this-\u003eadf_vehicle_xml(), $content );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'invp_site_url':\n\t\t\t\t\t$content = str_replace( '{invp_site_url}', site_url(), $content );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn $content;\n\t\t}\n\n\t\t/**\n\t\t * Returns an array of WP Forms Smart Tags we support.",
        "detailedLines": [
          {
            "lineNumber": 47,
            "text": "\t\t * @return string"
          },
          {
            "lineNumber": 48,
            "text": "\t\t */"
          },
          {
            "lineNumber": 49,
            "text": "\t\tprotected function adf_vehicle_xml() {"
          },
          {
            "lineNumber": 50,
            "text": "\t\t\t$form_post_id = intval( $_POST['wpforms']['id'] ?? '' );"
          },
          {
            "lineNumber": 51,
            "text": "\t\t\t$fields       = wpforms_get_form_fields( $form_post_id );"
          },
          {
            "lineNumber": 52
          },
          {
            "lineNumber": 53,
            "text": "\t\t\t$field_id = 0;"
          },
          {
            "lineNumber": 54,
            "text": "\t\t\tforeach ( $fields as $field ) {"
          },
          {
            "lineNumber": 55,
            "text": "\t\t\t\tif ( 'vehicle' !== $field['type'] ) {"
          },
          {
            "lineNumber": 56,
            "text": "\t\t\t\t\tcontinue;"
          },
          {
            "lineNumber": 57,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 58,
            "text": "\t\t\t\t$field_id = $field['id'];"
          },
          {
            "lineNumber": 59,
            "text": "\t\t\t\tbreak;"
          },
          {
            "lineNumber": 60,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 61
          },
          {
            "lineNumber": 62,
            "text": "\t\t\tif ( 0 === $field_id ) {"
          },
          {
            "lineNumber": 63,
            "text": "\t\t\t\treturn '';"
          },
          {
            "lineNumber": 64,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 65
          },
          {
            "lineNumber": 66,
            "text": "\t\t\t$value   = sanitize_text_field( wp_unslash( $_POST['wpforms']['fields'][ $field_id ] ?? '' ) );"
          },
          {
            "lineNumber": 67,
            "text": "\t\t\t$post_id = $this-\u003eextract_post_id_from_value( $value );"
          },
          {
            "lineNumber": 68
          },
          {
            "lineNumber": 69,
            "text": "\t\t\tif ( empty( $post_id ) ) {"
          },
          {
            "lineNumber": 70,
            "text": "\t\t\t\treturn '';"
          },
          {
            "lineNumber": 71,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 72,
            "text": "\t\t\treturn sprintf("
          },
          {
            "lineNumber": 73,
            "text": "\t\t\t\t'\u003cvehicle\u003e\u003cid\u003e%s\u003c/id\u003e\u003cyear\u003e%s\u003c/year\u003e\u003cmake\u003e%s\u003c/make\u003e\u003cmodel\u003e%s\u003c/model\u003e\u003cvin\u003e%s\u003c/vin\u003e\u003cstock\u003e%s\u003c/stock\u003e\u003c/vehicle\u003e',"
          },
          {
            "lineNumber": 74,
            "text": "\t\t\t\tINVP::get_meta( 'car_id', $post_id ),"
          },
          {
            "lineNumber": 75,
            "text": "\t\t\t\tinvp_get_the_year( $post_id ),"
          },
          {
            "lineNumber": 76,
            "text": "\t\t\t\tinvp_get_the_make( $post_id ),"
          },
          {
            "lineNumber": 77,
            "text": "\t\t\t\tinvp_get_the_model( $post_id ),"
          },
          {
            "lineNumber": 78,
            "text": "\t\t\t\tinvp_get_the_vin( $post_id ),"
          },
          {
            "lineNumber": 79,
            "text": "\t\t\t\tinvp_get_the_stock_number( $post_id )"
          },
          {
            "lineNumber": 80,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 81,
            "text": "\t\t}"
          },
          {
            "lineNumber": 82
          },
          {
            "lineNumber": 83,
            "text": "\t\t/**"
          },
          {
            "lineNumber": 84,
            "text": "\t\t * Register Smart Tags with the form builder."
          },
          {
            "lineNumber": 85,
            "text": "\t\t *"
          },
          {
            "lineNumber": 86,
            "text": "\t\t * @link   https://wpforms.com/developers/how-to-create-a-custom-smart-tag/"
          },
          {
            "lineNumber": 87,
            "text": "\t\t *"
          },
          {
            "lineNumber": 88,
            "text": "\t\t * @param  array $tags"
          },
          {
            "lineNumber": 89,
            "text": "\t\t * @return array"
          },
          {
            "lineNumber": 90,
            "text": "\t\t */"
          },
          {
            "lineNumber": 91,
            "text": "\t\tpublic function smart_tags_register( $tags ) {"
          },
          {
            "lineNumber": 92,
            "text": "\t\t\t// Key is the tag, item is the tag name."
          },
          {
            "lineNumber": 93,
            "text": "\t\t\tforeach ( $this-\u003etags() as $tag =\u003e $name ) {"
          },
          {
            "lineNumber": 94,
            "text": "\t\t\t\t$tags[ $tag ] = $name;"
          },
          {
            "lineNumber": 95,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 96,
            "text": "\t\t\treturn $tags;"
          },
          {
            "lineNumber": 97,
            "text": "\t\t}"
          },
          {
            "lineNumber": 98
          },
          {
            "lineNumber": 99,
            "text": "\t\t/**"
          },
          {
            "lineNumber": 100,
            "text": "\t\t * Process the Smart Tags when rendering entries."
          },
          {
            "lineNumber": 101,
            "text": "\t\t *"
          },
          {
            "lineNumber": 102,
            "text": "\t\t * @link   https://wpforms.com/developers/how-to-create-a-custom-smart-tag/"
          },
          {
            "lineNumber": 103,
            "text": "\t\t */"
          },
          {
            "lineNumber": 104,
            "text": "\t\tpublic function smart_tags_process( $content, $tag ) {"
          },
          {
            "lineNumber": 105,
            "text": "\t\t\t$our_tags = array_keys( $this-\u003etags() );"
          },
          {
            "lineNumber": 106,
            "text": "\t\t\tif ( ! in_array( $tag, $our_tags, true ) ) {"
          },
          {
            "lineNumber": 107,
            "text": "\t\t\t\treturn $content;"
          },
          {
            "lineNumber": 108,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 109,
            "text": "\t\t\tswitch ( $tag ) {"
          },
          {
            "lineNumber": 110,
            "text": "\t\t\t\tcase 'invp_adf_vehicle':"
          },
          {
            "lineNumber": 111,
            "text": "\t\t\t\t\t$content = str_replace( '{invp_adf_vehicle}', $this-\u003eadf_vehicle_xml(), $content );"
          },
          {
            "lineNumber": 112,
            "text": "\t\t\t\t\tbreak;"
          },
          {
            "lineNumber": 113,
            "text": "\t\t\t\tcase 'invp_site_url':"
          },
          {
            "lineNumber": 114,
            "text": "\t\t\t\t\t$content = str_replace( '{invp_site_url}', site_url(), $content );"
          },
          {
            "lineNumber": 115,
            "text": "\t\t\t\t\tbreak;"
          },
          {
            "lineNumber": 116,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 117,
            "text": "\t\t\treturn $content;"
          },
          {
            "lineNumber": 118,
            "text": "\t\t}"
          },
          {
            "lineNumber": 119
          },
          {
            "lineNumber": 120,
            "text": "\t\t/**"
          },
          {
            "lineNumber": 121,
            "text": "\t\t * Returns an array of WP Forms Smart Tags we support."
          }
        ],
        "range": {
          "endPosition": {
            "line": 121
          },
          "startPosition": {
            "line": 46
          }
        },
        "relativeWorkspacePath": "./includes/integrations/class-wpforms.php",
        "signatures": {}
      },
      "score": 0.29706060886383057
    },
    {
      "codeBlock": {
        "contents": "\tpublic function form( $instance ) {\n\t\t$title = ( isset( $instance['title'] ) ? $instance['title'] : '' );\n\t\t?\u003e\n\t\t\u003cp\u003e\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\u003c/p\u003e\n\t\t\u003c?php\n\t\t$args                   = array(\n\t\t\t'public' =\u003e true,\n\t\t);\n\t\t$already_turned_on_keys = array();\n\t\tif ( isset( $instance['post-meta-keys'] ) ) {\n\t\t\t$already_turned_on_keys = explode( '|', $instance['post-meta-keys'] );\n\t\t}\n\n\t\techo '\u003cp\u003e' . esc_html__( 'Which fields should users be allowed to use as sort fields?', 'inventory-presser' )\n\t\t\t. '\u003c/p\u003e\u003cdl\u003e';\n\n\t\tforeach ( $this-\u003eget_post_meta_keys_and_labels( $instance ) as $key =\u003e $label ) {\n\t\t\t// output checkbox for each one.\n\t\t\techo '\u003cdt\u003e';\n\t\t\t$title = 'Allow users to order by ' . $key; // title attribute for checkbox and label.\n\t\t\techo '\u003cinput type=\"checkbox\" id=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-key-' . $key ) )\n\t\t\t. '\" name=\"obpm-key-' . esc_attr( $key ) . '\"'\n\t\t\t. checked( in_array( $key, $already_turned_on_keys, true ), true, false )\n\t\t\t. ' title=\"' . esc_attr( $title ) . '\"/\u003e'\n\t\t\t. '\u003clabel for=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-key-' . $key ) )\n\t\t\t. '\" title=\"' . esc_attr( $title ) . '\"\u003e'\n\t\t\t. esc_html( $this-\u003eprettify_meta_key( $key ) ) . '\u003c/label\u003e'\n\t\t\t. '\u003c/dt\u003e' // and a text box for a label.\n\t\t\t. '\u003cdd\u003e'\n\t\t\t. '\u003clabel for=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-label-' . $key ) )\n\t\t\t. '\"\u003eLabel\u003c/label\u003e '\n\t\t\t. '\u003cinput type=\"text\" id=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-label-' . $key ) ) . '\"'\n\t\t\t. ' name=\"obpm-label-' . esc_attr( $key ) . '\" '\n\t\t\t. 'value=\"' . esc_attr( $label ) . '\" title=\"Label for '\n\t\t\t. esc_attr( $key ) . '\" /\u003e\u003c/dd\u003e';\n\t\t}\n\t\techo '\u003c/dl\u003e';\n\t}\n\n\t/**\n\t * Produces an associative array where the post meta keys are the keys",
        "detailedLines": [
          {
            "lineNumber": 58,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 59,
            "text": "\t\t$title = ( isset( $instance['title'] ) ? $instance['title'] : '' );"
          },
          {
            "lineNumber": 60,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 61,
            "text": "\t\t\u003cp\u003e\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 62,
            "text": "\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\u003c/p\u003e"
          },
          {
            "lineNumber": 63,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 64,
            "text": "\t\t$args                   = array("
          },
          {
            "lineNumber": 65,
            "text": "\t\t\t'public' =\u003e true,"
          },
          {
            "lineNumber": 66,
            "text": "\t\t);"
          },
          {
            "lineNumber": 67,
            "text": "\t\t$already_turned_on_keys = array();"
          },
          {
            "lineNumber": 68,
            "text": "\t\tif ( isset( $instance['post-meta-keys'] ) ) {"
          },
          {
            "lineNumber": 69,
            "text": "\t\t\t$already_turned_on_keys = explode( '|', $instance['post-meta-keys'] );"
          },
          {
            "lineNumber": 70,
            "text": "\t\t}"
          },
          {
            "lineNumber": 71
          },
          {
            "lineNumber": 72,
            "text": "\t\techo '\u003cp\u003e' . esc_html__( 'Which fields should users be allowed to use as sort fields?', 'inventory-presser' )"
          },
          {
            "lineNumber": 73,
            "text": "\t\t\t. '\u003c/p\u003e\u003cdl\u003e';"
          },
          {
            "lineNumber": 74
          },
          {
            "lineNumber": 75,
            "text": "\t\tforeach ( $this-\u003eget_post_meta_keys_and_labels( $instance ) as $key =\u003e $label ) {"
          },
          {
            "lineNumber": 76,
            "text": "\t\t\t// output checkbox for each one."
          },
          {
            "lineNumber": 77,
            "text": "\t\t\techo '\u003cdt\u003e';"
          },
          {
            "lineNumber": 78,
            "text": "\t\t\t$title = 'Allow users to order by ' . $key; // title attribute for checkbox and label."
          },
          {
            "lineNumber": 79,
            "text": "\t\t\techo '\u003cinput type=\"checkbox\" id=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-key-' . $key ) )"
          },
          {
            "lineNumber": 80,
            "text": "\t\t\t. '\" name=\"obpm-key-' . esc_attr( $key ) . '\"'"
          },
          {
            "lineNumber": 81,
            "text": "\t\t\t. checked( in_array( $key, $already_turned_on_keys, true ), true, false )"
          },
          {
            "lineNumber": 82,
            "text": "\t\t\t. ' title=\"' . esc_attr( $title ) . '\"/\u003e'"
          },
          {
            "lineNumber": 83,
            "text": "\t\t\t. '\u003clabel for=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-key-' . $key ) )"
          },
          {
            "lineNumber": 84,
            "text": "\t\t\t. '\" title=\"' . esc_attr( $title ) . '\"\u003e'"
          },
          {
            "lineNumber": 85,
            "text": "\t\t\t. esc_html( $this-\u003eprettify_meta_key( $key ) ) . '\u003c/label\u003e'"
          },
          {
            "lineNumber": 86,
            "text": "\t\t\t. '\u003c/dt\u003e' // and a text box for a label."
          },
          {
            "lineNumber": 87,
            "text": "\t\t\t. '\u003cdd\u003e'"
          },
          {
            "lineNumber": 88,
            "text": "\t\t\t. '\u003clabel for=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-label-' . $key ) )"
          },
          {
            "lineNumber": 89,
            "text": "\t\t\t. '\"\u003eLabel\u003c/label\u003e '"
          },
          {
            "lineNumber": 90,
            "text": "\t\t\t. '\u003cinput type=\"text\" id=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-label-' . $key ) ) . '\"'"
          },
          {
            "lineNumber": 91,
            "text": "\t\t\t. ' name=\"obpm-label-' . esc_attr( $key ) . '\" '"
          },
          {
            "lineNumber": 92,
            "text": "\t\t\t. 'value=\"' . esc_attr( $label ) . '\" title=\"Label for '"
          },
          {
            "lineNumber": 93,
            "text": "\t\t\t. esc_attr( $key ) . '\" /\u003e\u003c/dd\u003e';"
          },
          {
            "lineNumber": 94,
            "text": "\t\t}"
          },
          {
            "lineNumber": 95,
            "text": "\t\techo '\u003c/dl\u003e';"
          },
          {
            "lineNumber": 96,
            "text": "\t}"
          },
          {
            "lineNumber": 97
          },
          {
            "lineNumber": 98,
            "text": "\t/**"
          },
          {
            "lineNumber": 99,
            "text": "\t * Produces an associative array where the post meta keys are the keys"
          }
        ],
        "range": {
          "endPosition": {
            "line": 99
          },
          "startPosition": {
            "line": 57
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-order-by.php",
        "signatures": {}
      },
      "score": 0.2912999093532562
    },
    {
      "codeBlock": {
        "contents": "\tpublic function form( $instance ) {\n\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';\n\n\t\t// get all locations.\n\t\t$location_terms = get_terms(\n\t\t\tarray(\n\t\t\t\t'taxonomy'   =\u003e 'location',\n\t\t\t\t'hide_empty' =\u003e false,\n\t\t\t)\n\t\t);\n\n\t\t// set.\n\t\tif ( isset( $instance['cb_display'] ) ) {\n\t\t\t$cb_display = $instance['cb_display'];\n\t\t} else {\n\t\t\t// majority of dealers will have one address, let's precheck it for them.\n\t\t\tif ( count( $location_terms ) == 1 ) {\n\t\t\t\t$cb_display = array( $location_terms[0]-\u003eterm_id );\n\t\t\t} else {\n\t\t\t\t$cb_display = array();\n\t\t\t}\n\t\t}\n\n\t\t$address_table = '\u003ctable\u003e\u003ctbody\u003e'\n\t\t\t. '\u003ctr\u003e\u003ctd colspan=\"2\"\u003e'\n\t\t\t. esc_html__( 'Select Addresses to Display', 'inventory-presser' )\n\t\t\t. '\u003c/td\u003e\u003c/tr\u003e';\n\n\t\t// loop through each location, set up form.\n\t\tforeach ( $location_terms as $index =\u003e $term_object ) {\n\t\t\t$address_checkbox = sprintf(\n\t\t\t\t'\u003cinput id=\"%s\" name=\"%s\" value=\"%s\" type=\"checkbox\"%s\u003e',\n\t\t\t\tesc_attr( $this-\u003eget_field_id( 'cb_title' ) ),\n\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_display[]' ) ),\n\t\t\t\tesc_attr( $term_object-\u003eterm_id ),\n\t\t\t\tchecked( ( in_array( $term_object-\u003eterm_id, $cb_display ) ), true, false )\n\t\t\t);\n\t\t\t$address_table   .= sprintf( '\u003ctr\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003c/tr\u003e', $address_checkbox, wp_kses_post( nl2br( $term_object-\u003edescription ) ) );\n\t\t}\n\n\t\t$address_table .= '\u003c/tbody\u003e\u003c/table\u003e';\n\n\t\t// Widget admin form.\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003cinput type=\"checkbox\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'cb_single_line' ) ); ?\u003e\" value=\"true\"\u003c?php checked( ( isset( $instance['cb_single_line'] ) \u0026\u0026 'true' === $instance['cb_single_line'] ) ); ?\u003e\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Single Line Display', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003c?php\n\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped",
        "detailedLines": [
          {
            "lineNumber": 93,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 94
          },
          {
            "lineNumber": 95,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';"
          },
          {
            "lineNumber": 96
          },
          {
            "lineNumber": 97,
            "text": "\t\t// get all locations."
          },
          {
            "lineNumber": 98,
            "text": "\t\t$location_terms = get_terms("
          },
          {
            "lineNumber": 99,
            "text": "\t\t\tarray("
          },
          {
            "lineNumber": 100,
            "text": "\t\t\t\t'taxonomy'   =\u003e 'location',"
          },
          {
            "lineNumber": 101,
            "text": "\t\t\t\t'hide_empty' =\u003e false,"
          },
          {
            "lineNumber": 102,
            "text": "\t\t\t)"
          },
          {
            "lineNumber": 103,
            "text": "\t\t);"
          },
          {
            "lineNumber": 104
          },
          {
            "lineNumber": 105,
            "text": "\t\t// set."
          },
          {
            "lineNumber": 106,
            "text": "\t\tif ( isset( $instance['cb_display'] ) ) {"
          },
          {
            "lineNumber": 107,
            "text": "\t\t\t$cb_display = $instance['cb_display'];"
          },
          {
            "lineNumber": 108,
            "text": "\t\t} else {"
          },
          {
            "lineNumber": 109,
            "text": "\t\t\t// majority of dealers will have one address, let's precheck it for them."
          },
          {
            "lineNumber": 110,
            "text": "\t\t\tif ( count( $location_terms ) == 1 ) {"
          },
          {
            "lineNumber": 111,
            "text": "\t\t\t\t$cb_display = array( $location_terms[0]-\u003eterm_id );"
          },
          {
            "lineNumber": 112,
            "text": "\t\t\t} else {"
          },
          {
            "lineNumber": 113,
            "text": "\t\t\t\t$cb_display = array();"
          },
          {
            "lineNumber": 114,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 115,
            "text": "\t\t}"
          },
          {
            "lineNumber": 116
          },
          {
            "lineNumber": 117,
            "text": "\t\t$address_table = '\u003ctable\u003e\u003ctbody\u003e'"
          },
          {
            "lineNumber": 118,
            "text": "\t\t\t. '\u003ctr\u003e\u003ctd colspan=\"2\"\u003e'"
          },
          {
            "lineNumber": 119,
            "text": "\t\t\t. esc_html__( 'Select Addresses to Display', 'inventory-presser' )"
          },
          {
            "lineNumber": 120,
            "text": "\t\t\t. '\u003c/td\u003e\u003c/tr\u003e';"
          },
          {
            "lineNumber": 121
          },
          {
            "lineNumber": 122,
            "text": "\t\t// loop through each location, set up form."
          },
          {
            "lineNumber": 123,
            "text": "\t\tforeach ( $location_terms as $index =\u003e $term_object ) {"
          },
          {
            "lineNumber": 124,
            "text": "\t\t\t$address_checkbox = sprintf("
          },
          {
            "lineNumber": 125,
            "text": "\t\t\t\t'\u003cinput id=\"%s\" name=\"%s\" value=\"%s\" type=\"checkbox\"%s\u003e',"
          },
          {
            "lineNumber": 126,
            "text": "\t\t\t\tesc_attr( $this-\u003eget_field_id( 'cb_title' ) ),"
          },
          {
            "lineNumber": 127,
            "text": "\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_display[]' ) ),"
          },
          {
            "lineNumber": 128,
            "text": "\t\t\t\tesc_attr( $term_object-\u003eterm_id ),"
          },
          {
            "lineNumber": 129,
            "text": "\t\t\t\tchecked( ( in_array( $term_object-\u003eterm_id, $cb_display ) ), true, false )"
          },
          {
            "lineNumber": 130,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 131,
            "text": "\t\t\t$address_table   .= sprintf( '\u003ctr\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003c/tr\u003e', $address_checkbox, wp_kses_post( nl2br( $term_object-\u003edescription ) ) );"
          },
          {
            "lineNumber": 132,
            "text": "\t\t}"
          },
          {
            "lineNumber": 133
          },
          {
            "lineNumber": 134,
            "text": "\t\t$address_table .= '\u003c/tbody\u003e\u003c/table\u003e';"
          },
          {
            "lineNumber": 135
          },
          {
            "lineNumber": 136,
            "text": "\t\t// Widget admin form."
          },
          {
            "lineNumber": 137,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 138,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 139,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 140,
            "text": "\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 141,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 142,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 143,
            "text": "\t\t\u003cinput type=\"checkbox\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'cb_single_line' ) ); ?\u003e\" value=\"true\"\u003c?php checked( ( isset( $instance['cb_single_line'] ) \u0026\u0026 'true' === $instance['cb_single_line'] ) ); ?\u003e\u003e"
          },
          {
            "lineNumber": 144,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Single Line Display', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 145,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 146,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 147,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 148,
            "text": "\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped"
          }
        ],
        "range": {
          "endPosition": {
            "line": 148
          },
          "startPosition": {
            "line": 92
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-address.php",
        "signatures": {}
      },
      "score": 0.2906374931335449
    },
    {
      "codeBlock": {
        "contents": "$options[] = $value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// String data.\n\t\t\t\t\t\t$value = sanitize_text_field( wp_unslash( $_POST[ $key ] ) );\n\n\t\t\t\t\t\t// Some values exist in post meta and taxonomy terms.\n\t\t\t\t\t\t// Check $_POST['tax_input'] in case the user checked a term box.\n\t\t\t\t\t\tif ( '' === $value \u0026\u0026 isset( $_POST['tax_input'] ) ) {\n\t\t\t\t\t\t\t$tax_input = $_POST['tax_input'];\n\t\t\t\t\t\t\tif ( isset( $overlapping_keys[ $unprefixed_key ] ) \u0026\u0026 isset( $tax_input[ $overlapping_keys[ $unprefixed_key ] ] ) ) {\n\t\t\t\t\t\t\t\t$term_id = intval( array_values( array_filter( $tax_input[ $overlapping_keys[ $unprefixed_key ] ] ) )[0] ?? '0' );\n\t\t\t\t\t\t\t\t$term    = get_term_by( 'term_taxonomy_id', $term_id, $overlapping_keys[ $unprefixed_key ] );\n\t\t\t\t\t\t\t\tif ( false !== $term ) {\n\t\t\t\t\t\t\t\t\t$value = $term-\u003ename;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// The values for keys with overlapping taxonomies might be slugs instead of term names.\n\t\t\t\t\t\t// inventory_presser_availability might arrive with a value of \"for-sale\" but we want to save \"For Sale\".\n\t\t\t\t\t\t$overlapping_keys = Inventory_Presser_Taxonomy_Overlapper::overlapping_meta_keys();\n\t\t\t\t\t\tif ( isset( $overlapping_keys[ $unprefixed_key ] ) ) {\n\t\t\t\t\t\t\t$term = get_term_by( 'slug', $value, $overlapping_keys[ $unprefixed_key ] );\n\t\t\t\t\t\t\tif ( false !== $term ) {\n\t\t\t\t\t\t\t\t$value = $term-\u003ename;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tupdate_post_meta( $post-\u003eID, $key, sanitize_text_field( $value ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Adds a contact form to single vehicle pages if a form is saved in the\n\t\t * setting.\n\t\t *\n\t\t * @param  array $sections\n\t\t * @return array\n\t\t */\n\t\tpublic function single_sections_add_form( $sections ) {\n\t\t\t// Does this setting have a value?\n\t\t\t$settings = INVP::settings();",
        "detailedLines": [
          {
            "lineNumber": 1889,
            "text": "$options[] = $value;"
          },
          {
            "lineNumber": 1890,
            "text": "\t\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 1891,
            "text": "\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 1892,
            "text": "\t\t\t\t\t} else {"
          },
          {
            "lineNumber": 1893,
            "text": "\t\t\t\t\t\t// String data."
          },
          {
            "lineNumber": 1894,
            "text": "\t\t\t\t\t\t$value = sanitize_text_field( wp_unslash( $_POST[ $key ] ) );"
          },
          {
            "lineNumber": 1895
          },
          {
            "lineNumber": 1896,
            "text": "\t\t\t\t\t\t// Some values exist in post meta and taxonomy terms."
          },
          {
            "lineNumber": 1897,
            "text": "\t\t\t\t\t\t// Check $_POST['tax_input'] in case the user checked a term box."
          },
          {
            "lineNumber": 1898,
            "text": "\t\t\t\t\t\tif ( '' === $value \u0026\u0026 isset( $_POST['tax_input'] ) ) {"
          },
          {
            "lineNumber": 1899,
            "text": "\t\t\t\t\t\t\t$tax_input = $_POST['tax_input'];"
          },
          {
            "lineNumber": 1900,
            "text": "\t\t\t\t\t\t\tif ( isset( $overlapping_keys[ $unprefixed_key ] ) \u0026\u0026 isset( $tax_input[ $overlapping_keys[ $unprefixed_key ] ] ) ) {"
          },
          {
            "lineNumber": 1901,
            "text": "\t\t\t\t\t\t\t\t$term_id = intval( array_values( array_filter( $tax_input[ $overlapping_keys[ $unprefixed_key ] ] ) )[0] ?? '0' );"
          },
          {
            "lineNumber": 1902,
            "text": "\t\t\t\t\t\t\t\t$term    = get_term_by( 'term_taxonomy_id', $term_id, $overlapping_keys[ $unprefixed_key ] );"
          },
          {
            "lineNumber": 1903,
            "text": "\t\t\t\t\t\t\t\tif ( false !== $term ) {"
          },
          {
            "lineNumber": 1904,
            "text": "\t\t\t\t\t\t\t\t\t$value = $term-\u003ename;"
          },
          {
            "lineNumber": 1905,
            "text": "\t\t\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 1906,
            "text": "\t\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 1907,
            "text": "\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 1908
          },
          {
            "lineNumber": 1909,
            "text": "\t\t\t\t\t\t// The values for keys with overlapping taxonomies might be slugs instead of term names."
          },
          {
            "lineNumber": 1910,
            "text": "\t\t\t\t\t\t// inventory_presser_availability might arrive with a value of \"for-sale\" but we want to save \"For Sale\"."
          },
          {
            "lineNumber": 1911,
            "text": "\t\t\t\t\t\t$overlapping_keys = Inventory_Presser_Taxonomy_Overlapper::overlapping_meta_keys();"
          },
          {
            "lineNumber": 1912,
            "text": "\t\t\t\t\t\tif ( isset( $overlapping_keys[ $unprefixed_key ] ) ) {"
          },
          {
            "lineNumber": 1913,
            "text": "\t\t\t\t\t\t\t$term = get_term_by( 'slug', $value, $overlapping_keys[ $unprefixed_key ] );"
          },
          {
            "lineNumber": 1914,
            "text": "\t\t\t\t\t\t\tif ( false !== $term ) {"
          },
          {
            "lineNumber": 1915,
            "text": "\t\t\t\t\t\t\t\t$value = $term-\u003ename;"
          },
          {
            "lineNumber": 1916,
            "text": "\t\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 1917,
            "text": "\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 1918,
            "text": "\t\t\t\t\t\tupdate_post_meta( $post-\u003eID, $key, sanitize_text_field( $value ) );"
          },
          {
            "lineNumber": 1919,
            "text": "\t\t\t\t\t}"
          },
          {
            "lineNumber": 1920,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 1921,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 1922,
            "text": "\t\t}"
          },
          {
            "lineNumber": 1923
          },
          {
            "lineNumber": 1924,
            "text": "\t\t/**"
          },
          {
            "lineNumber": 1925,
            "text": "\t\t * Adds a contact form to single vehicle pages if a form is saved in the"
          },
          {
            "lineNumber": 1926,
            "text": "\t\t * setting."
          },
          {
            "lineNumber": 1927,
            "text": "\t\t *"
          },
          {
            "lineNumber": 1928,
            "text": "\t\t * @param  array $sections"
          },
          {
            "lineNumber": 1929,
            "text": "\t\t * @return array"
          },
          {
            "lineNumber": 1930,
            "text": "\t\t */"
          },
          {
            "lineNumber": 1931,
            "text": "\t\tpublic function single_sections_add_form( $sections ) {"
          },
          {
            "lineNumber": 1932,
            "text": "\t\t\t// Does this setting have a value?"
          },
          {
            "lineNumber": 1933,
            "text": "\t\t\t$settings = INVP::settings();"
          }
        ],
        "range": {
          "endPosition": {
            "line": 1933
          },
          "startPosition": {
            "column": 8,
            "line": 1888
          }
        },
        "relativeWorkspacePath": "./inventory-presser.php",
        "signatures": {}
      },
      "score": 0.28984129428863525
    },
    {
      "codeBlock": {
        "contents": "\t\twp_enqueue_script( self::ID_BASE );\n\t\twp_add_inline_script(\n\t\t\tself::ID_BASE,\n\t\t\t'const ' . self::ID_BASE . ' = ' . wp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'locations' =\u003e $popups,\n\t\t\t\t)\n\t\t\t),\n\t\t\t'before'\n\t\t);\n\n\t\t// before and after widget arguments are defined by themes\n\t\techo wp_kses_post( $args['before_widget'] );\n\n\t\t$title = apply_filters( 'widget_title', $instance['title'] );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\techo '\u003cdiv id=\"map_canvas\" style=\"min-height: 175px;\"\u003e\u003c/div\u003e' . wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title   = $instance['title'] ?? '';\n\t\t$api_key = $instance['api_key'] ?? '';\n\n\t\t// Title. ?\u003e\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003c?php\n\n\t\t// API Key.\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'api_key' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'API Key:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'api_key' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'api_key' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $api_key ); ?\u003e\" /\u003e\n\t\t\t\u003cp class=\"description\"\u003e\n\t\t\t\u003c?php\n\n\t\t\t\tprintf(\n\t\t\t\t\t'%s \u003ca href=\"https://developers.google.com/maps/documentation/javascript/get-api-key\"\u003e%s\u003c/a\u003e',\n\t\t\t\t\tesc_html__( 'Obtain an API key at', 'inventory-presser' ),\n\t\t\t\t\tesc_html__( 'Google Cloud Console', 'inventory-presser' )\n\t\t\t\t);\n\n\t\t\t?\u003e\n\t\t\t\t\t\t\t\t\t\u003c/p\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\u003c?php esc_html_e( 'Choose addresses to mark:', 'inventory-presser' ); ?\u003e\u003c/p\u003e\n\t\t\t\t\t\t\t\t\t\t\t\t\u003c?php\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// get all location terms.",
        "detailedLines": [
          {
            "lineNumber": 111,
            "text": "\t\twp_enqueue_script( self::ID_BASE );"
          },
          {
            "lineNumber": 112,
            "text": "\t\twp_add_inline_script("
          },
          {
            "lineNumber": 113,
            "text": "\t\t\tself::ID_BASE,"
          },
          {
            "lineNumber": 114,
            "text": "\t\t\t'const ' . self::ID_BASE . ' = ' . wp_json_encode("
          },
          {
            "lineNumber": 115,
            "text": "\t\t\t\tarray("
          },
          {
            "lineNumber": 116,
            "text": "\t\t\t\t\t'locations' =\u003e $popups,"
          },
          {
            "lineNumber": 117,
            "text": "\t\t\t\t)"
          },
          {
            "lineNumber": 118,
            "text": "\t\t\t),"
          },
          {
            "lineNumber": 119,
            "text": "\t\t\t'before'"
          },
          {
            "lineNumber": 120,
            "text": "\t\t);"
          },
          {
            "lineNumber": 121
          },
          {
            "lineNumber": 122,
            "text": "\t\t// before and after widget arguments are defined by themes"
          },
          {
            "lineNumber": 123,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 124
          },
          {
            "lineNumber": 125,
            "text": "\t\t$title = apply_filters( 'widget_title', $instance['title'] );"
          },
          {
            "lineNumber": 126,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 127,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 128,
            "text": "\t\t}"
          },
          {
            "lineNumber": 129
          },
          {
            "lineNumber": 130,
            "text": "\t\techo '\u003cdiv id=\"map_canvas\" style=\"min-height: 175px;\"\u003e\u003c/div\u003e' . wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 131,
            "text": "\t}"
          },
          {
            "lineNumber": 132
          },
          {
            "lineNumber": 133,
            "text": "\t/**"
          },
          {
            "lineNumber": 134,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 135,
            "text": "\t *"
          },
          {
            "lineNumber": 136,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 137,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 138,
            "text": "\t */"
          },
          {
            "lineNumber": 139,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 140
          },
          {
            "lineNumber": 141,
            "text": "\t\t$title   = $instance['title'] ?? '';"
          },
          {
            "lineNumber": 142,
            "text": "\t\t$api_key = $instance['api_key'] ?? '';"
          },
          {
            "lineNumber": 143
          },
          {
            "lineNumber": 144,
            "text": "\t\t// Title. ?\u003e\u003cp\u003e"
          },
          {
            "lineNumber": 145,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 146,
            "text": "\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 147,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 148,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 149
          },
          {
            "lineNumber": 150,
            "text": "\t\t// API Key."
          },
          {
            "lineNumber": 151,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 152,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 153,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'api_key' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'API Key:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 154,
            "text": "\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'api_key' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'api_key' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $api_key ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 155,
            "text": "\t\t\t\u003cp class=\"description\"\u003e"
          },
          {
            "lineNumber": 156,
            "text": "\t\t\t\u003c?php"
          },
          {
            "lineNumber": 157
          },
          {
            "lineNumber": 158,
            "text": "\t\t\t\tprintf("
          },
          {
            "lineNumber": 159,
            "text": "\t\t\t\t\t'%s \u003ca href=\"https://developers.google.com/maps/documentation/javascript/get-api-key\"\u003e%s\u003c/a\u003e',"
          },
          {
            "lineNumber": 160,
            "text": "\t\t\t\t\tesc_html__( 'Obtain an API key at', 'inventory-presser' ),"
          },
          {
            "lineNumber": 161,
            "text": "\t\t\t\t\tesc_html__( 'Google Cloud Console', 'inventory-presser' )"
          },
          {
            "lineNumber": 162,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 163
          },
          {
            "lineNumber": 164,
            "text": "\t\t\t?\u003e"
          },
          {
            "lineNumber": 165,
            "text": "\t\t\t\t\t\t\t\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 166,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 167,
            "text": "\t\t\u003cp\u003e\u003c?php esc_html_e( 'Choose addresses to mark:', 'inventory-presser' ); ?\u003e\u003c/p\u003e"
          },
          {
            "lineNumber": 168,
            "text": "\t\t\t\t\t\t\t\t\t\t\t\t\u003c?php"
          },
          {
            "lineNumber": 169
          },
          {
            "lineNumber": 170,
            "text": "\t\t\t\t\t\t\t\t\t\t\t\t\t// get all location terms."
          }
        ],
        "range": {
          "endPosition": {
            "line": 170
          },
          "startPosition": {
            "line": 110
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-google-maps-v3.php",
        "signatures": {}
      },
      "score": 0.2875705063343048
    },
    {
      "codeBlock": {
        "contents": "\t\t\t\t);\n\n\t\t\t\t$cb_title_text = sprintf(\n\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',\n\t\t\t\t\tesc_attr( $this-\u003eget_field_id( 'cb_title_' . $hours_uid ) ),\n\t\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_title[' . $term_id . '][]' ) ),\n\t\t\t\t\tesc_attr( $hours_uid ),\n\t\t\t\t\tchecked( true, ( isset( $cb_title[ $term_id ] ) \u0026\u0026 is_array( $cb_title[ $term_id ] ) \u0026\u0026 in_array( $hours_uid, $cb_title[ $term_id ], true ) ), false )\n\t\t\t\t);\n\n\t\t\t\t$hours_table .= sprintf(\n\t\t\t\t\t'\u003ctr\u003e\u003ctd\u003e\u003cstrong\u003e%s\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003c/tr\u003e',\n\t\t\t\t\tesc_html( $title ),\n\t\t\t\t\t$cb_display_text,\n\t\t\t\t\t$cb_title_text\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$hours_table .= '\u003c/tbody\u003e\u003c/table\u003e';\n\n\t\t// Widget admin form.\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : __( 'Hours', 'inventory-presser' );\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Main Title', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_showclosed' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Show All Closed Days', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput type=\"checkbox\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_showclosed' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'cb_showclosed' ) ); ?\u003e\" value=\"true\"\u003c?php checked( ( isset( $instance['cb_showclosed'] ) \u0026\u0026 'true' === $instance['cb_showclosed'] ) ); ?\u003e\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\u003c?php echo $hours_table; ?\u003e\u003c/p\u003e\n\t\t\u003c?php\n\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.\n\t *\n\t * @param  array $new_instance\n\t * @param  array $old_instance\n\t * @return array The updated array full of settings\n\t */\n\tpublic function update( $new_instance, $old_instance ) {\n\t\t$instance                  = array();\n\t\t$instance['title']         = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';",
        "detailedLines": [
          {
            "lineNumber": 280,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 281
          },
          {
            "lineNumber": 282,
            "text": "\t\t\t\t$cb_title_text = sprintf("
          },
          {
            "lineNumber": 283,
            "text": "\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',"
          },
          {
            "lineNumber": 284,
            "text": "\t\t\t\t\tesc_attr( $this-\u003eget_field_id( 'cb_title_' . $hours_uid ) ),"
          },
          {
            "lineNumber": 285,
            "text": "\t\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_title[' . $term_id . '][]' ) ),"
          },
          {
            "lineNumber": 286,
            "text": "\t\t\t\t\tesc_attr( $hours_uid ),"
          },
          {
            "lineNumber": 287,
            "text": "\t\t\t\t\tchecked( true, ( isset( $cb_title[ $term_id ] ) \u0026\u0026 is_array( $cb_title[ $term_id ] ) \u0026\u0026 in_array( $hours_uid, $cb_title[ $term_id ], true ) ), false )"
          },
          {
            "lineNumber": 288,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 289
          },
          {
            "lineNumber": 290,
            "text": "\t\t\t\t$hours_table .= sprintf("
          },
          {
            "lineNumber": 291,
            "text": "\t\t\t\t\t'\u003ctr\u003e\u003ctd\u003e\u003cstrong\u003e%s\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003c/tr\u003e',"
          },
          {
            "lineNumber": 292,
            "text": "\t\t\t\t\tesc_html( $title ),"
          },
          {
            "lineNumber": 293,
            "text": "\t\t\t\t\t$cb_display_text,"
          },
          {
            "lineNumber": 294,
            "text": "\t\t\t\t\t$cb_title_text"
          },
          {
            "lineNumber": 295,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 296,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 297,
            "text": "\t\t}"
          },
          {
            "lineNumber": 298
          },
          {
            "lineNumber": 299,
            "text": "\t\t$hours_table .= '\u003c/tbody\u003e\u003c/table\u003e';"
          },
          {
            "lineNumber": 300
          },
          {
            "lineNumber": 301,
            "text": "\t\t// Widget admin form."
          },
          {
            "lineNumber": 302,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : __( 'Hours', 'inventory-presser' );"
          },
          {
            "lineNumber": 303,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 304,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 305,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Main Title', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 306,
            "text": "\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 307,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 308
          },
          {
            "lineNumber": 309,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 310,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_showclosed' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Show All Closed Days', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 311,
            "text": "\t\t\u003cinput type=\"checkbox\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_showclosed' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'cb_showclosed' ) ); ?\u003e\" value=\"true\"\u003c?php checked( ( isset( $instance['cb_showclosed'] ) \u0026\u0026 'true' === $instance['cb_showclosed'] ) ); ?\u003e\u003e"
          },
          {
            "lineNumber": 312,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 313,
            "text": "\t\t\u003cp\u003e\u003c?php echo $hours_table; ?\u003e\u003c/p\u003e"
          },
          {
            "lineNumber": 314,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 315,
            "text": "\t}"
          },
          {
            "lineNumber": 316
          },
          {
            "lineNumber": 317,
            "text": "\t/**"
          },
          {
            "lineNumber": 318,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          },
          {
            "lineNumber": 319,
            "text": "\t *"
          },
          {
            "lineNumber": 320,
            "text": "\t * @param  array $new_instance"
          },
          {
            "lineNumber": 321,
            "text": "\t * @param  array $old_instance"
          },
          {
            "lineNumber": 322,
            "text": "\t * @return array The updated array full of settings"
          },
          {
            "lineNumber": 323,
            "text": "\t */"
          },
          {
            "lineNumber": 324,
            "text": "\tpublic function update( $new_instance, $old_instance ) {"
          },
          {
            "lineNumber": 325,
            "text": "\t\t$instance                  = array();"
          },
          {
            "lineNumber": 326,
            "text": "\t\t$instance['title']         = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';"
          }
        ],
        "range": {
          "endPosition": {
            "line": 326
          },
          "startPosition": {
            "line": 279
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-hours.php",
        "signatures": {}
      },
      "score": 0.2859913110733032
    },
    {
      "codeBlock": {
        "contents": "\tpublic function widget( $args, $instance ) {\n\t\t// abort if we don't have an address to show\n\t\tif ( empty( $instance['location_slug'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$location = get_term_by( 'slug', $instance['location_slug'], 'location' );\n\t\tif ( ! $location ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// before and after widget arguments are defined by themes\n\t\techo wp_kses_post( $args['before_widget'] );\n\n\t\t$title = apply_filters( 'widget_title', $instance['title'] );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\t// remove line breaks from the term description\n\t\t$address_to_search = preg_replace( '#\\R+#', ', ', $location-\u003edescription );\n\n\t\tprintf(\n\t\t\t'\u003cdiv class=\"invp-google-maps\"\u003e\u003ciframe frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"https://maps.google.com/maps?q=%s\u0026t=m\u0026z=%d\u0026output=embed\" aria-label=\"%s\"\u003e\u003c/iframe\u003e\u003c/div\u003e',\n\t\t\trawurlencode( $address_to_search ),\n\t\t\t'13',\n\t\t\tesc_attr( $address_to_search )\n\t\t);\n\n\t\techo wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * form\n\t *\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';",
        "detailedLines": [
          {
            "lineNumber": 59,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 60,
            "text": "\t\t// abort if we don't have an address to show"
          },
          {
            "lineNumber": 61,
            "text": "\t\tif ( empty( $instance['location_slug'] ) ) {"
          },
          {
            "lineNumber": 62,
            "text": "\t\t\treturn;"
          },
          {
            "lineNumber": 63,
            "text": "\t\t}"
          },
          {
            "lineNumber": 64
          },
          {
            "lineNumber": 65,
            "text": "\t\t$location = get_term_by( 'slug', $instance['location_slug'], 'location' );"
          },
          {
            "lineNumber": 66,
            "text": "\t\tif ( ! $location ) {"
          },
          {
            "lineNumber": 67,
            "text": "\t\t\treturn;"
          },
          {
            "lineNumber": 68,
            "text": "\t\t}"
          },
          {
            "lineNumber": 69
          },
          {
            "lineNumber": 70,
            "text": "\t\t// before and after widget arguments are defined by themes"
          },
          {
            "lineNumber": 71,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 72
          },
          {
            "lineNumber": 73,
            "text": "\t\t$title = apply_filters( 'widget_title', $instance['title'] );"
          },
          {
            "lineNumber": 74,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 75,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 76,
            "text": "\t\t}"
          },
          {
            "lineNumber": 77
          },
          {
            "lineNumber": 78,
            "text": "\t\t// remove line breaks from the term description"
          },
          {
            "lineNumber": 79,
            "text": "\t\t$address_to_search = preg_replace( '#\\R+#', ', ', $location-\u003edescription );"
          },
          {
            "lineNumber": 80
          },
          {
            "lineNumber": 81,
            "text": "\t\tprintf("
          },
          {
            "lineNumber": 82,
            "text": "\t\t\t'\u003cdiv class=\"invp-google-maps\"\u003e\u003ciframe frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"https://maps.google.com/maps?q=%s\u0026t=m\u0026z=%d\u0026output=embed\" aria-label=\"%s\"\u003e\u003c/iframe\u003e\u003c/div\u003e',"
          },
          {
            "lineNumber": 83,
            "text": "\t\t\trawurlencode( $address_to_search ),"
          },
          {
            "lineNumber": 84,
            "text": "\t\t\t'13',"
          },
          {
            "lineNumber": 85,
            "text": "\t\t\tesc_attr( $address_to_search )"
          },
          {
            "lineNumber": 86,
            "text": "\t\t);"
          },
          {
            "lineNumber": 87
          },
          {
            "lineNumber": 88,
            "text": "\t\techo wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 89,
            "text": "\t}"
          },
          {
            "lineNumber": 90
          },
          {
            "lineNumber": 91,
            "text": "\t/**"
          },
          {
            "lineNumber": 92,
            "text": "\t * form"
          },
          {
            "lineNumber": 93,
            "text": "\t *"
          },
          {
            "lineNumber": 94,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 95,
            "text": "\t *"
          },
          {
            "lineNumber": 96,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 97,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 98,
            "text": "\t */"
          },
          {
            "lineNumber": 99,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 100
          },
          {
            "lineNumber": 101,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';"
          }
        ],
        "range": {
          "endPosition": {
            "line": 101
          },
          "startPosition": {
            "line": 58
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-google-maps.php",
        "signatures": {}
      },
      "score": 0.2827773094177246
    },
    {
      "codeBlock": {
        "contents": "\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';\n\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003c?php esc_html_e( 'Choose addresses to include:', 'inventory-presser' ); ?\u003e\n\t\t\u003c/p\u003e\n\t\t\u003c?php\n\n\t\t// get all location terms.\n\t\t$location_terms = get_terms(\n\t\t\tarray(\n\t\t\t\t'taxonomy'   =\u003e 'location',\n\t\t\t\t'hide_empty' =\u003e false,\n\t\t\t)\n\t\t);\n\n\t\t$location_slug = isset( $instance['location_slug'] ) ? $instance['location_slug'] : array();\n\t\tif ( ! is_array( $location_slug ) ) {\n\t\t\t$location_slug = array( $location_slug );\n\t\t}\n\n\t\t// loop through each location, set up form.\n\t\tforeach ( $location_terms as $index =\u003e $term_object ) {\n\t\t\tprintf(\n\t\t\t\t'\u003cp\u003e\u003cinput id=\"%1$s\" name=\"%2$s[]\" value=\"%3$s\" type=\"checkbox\"%4$s\u003e \u003clabel for=\"%1$s\"\u003e%5$s\u003c/label\u003e\u003c/p\u003e',\n\t\t\t\tesc_attr( $this-\u003eget_field_id( $term_object-\u003eslug ) ),\n\t\t\t\tesc_attr( $this-\u003eget_field_name( 'location_slug' ) ),\n\t\t\t\tesc_attr( $term_object-\u003eslug ),\n\t\t\t\tchecked( true, in_array( $term_object-\u003eslug, $location_slug, true ), false ),\n\t\t\t\tesc_html( str_replace( \"\\r\", '', str_replace( PHP_EOL, ', ', $term_object-\u003edescription ) ) )\n\t\t\t);\n\t\t}\n\n\t\t// Only show this if the API key is missing.\n\t\t$settings = INVP::settings();\n\t\tif ( empty( $settings['mapbox_public_token'] ) ) {\n\t\t\tprintf( '\u003cp\u003e%s\u003c/p\u003e', esc_html__( 'An API token from mapbox.com is required for this widget to work. Obtain a key at mapbox.com and save it on the Inventory Presser Options page.', 'inventory-presser' ) );\n\t\t}\n\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.",
        "detailedLines": [
          {
            "lineNumber": 166,
            "text": "\t/**"
          },
          {
            "lineNumber": 167,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 168,
            "text": "\t *"
          },
          {
            "lineNumber": 169,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 170,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 171,
            "text": "\t */"
          },
          {
            "lineNumber": 172,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 173
          },
          {
            "lineNumber": 174,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';"
          },
          {
            "lineNumber": 175
          },
          {
            "lineNumber": 176,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 177,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 178,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 179,
            "text": "\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 180,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 181,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 182,
            "text": "\t\t\u003c?php esc_html_e( 'Choose addresses to include:', 'inventory-presser' ); ?\u003e"
          },
          {
            "lineNumber": 183,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 184,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 185
          },
          {
            "lineNumber": 186,
            "text": "\t\t// get all location terms."
          },
          {
            "lineNumber": 187,
            "text": "\t\t$location_terms = get_terms("
          },
          {
            "lineNumber": 188,
            "text": "\t\t\tarray("
          },
          {
            "lineNumber": 189,
            "text": "\t\t\t\t'taxonomy'   =\u003e 'location',"
          },
          {
            "lineNumber": 190,
            "text": "\t\t\t\t'hide_empty' =\u003e false,"
          },
          {
            "lineNumber": 191,
            "text": "\t\t\t)"
          },
          {
            "lineNumber": 192,
            "text": "\t\t);"
          },
          {
            "lineNumber": 193
          },
          {
            "lineNumber": 194,
            "text": "\t\t$location_slug = isset( $instance['location_slug'] ) ? $instance['location_slug'] : array();"
          },
          {
            "lineNumber": 195,
            "text": "\t\tif ( ! is_array( $location_slug ) ) {"
          },
          {
            "lineNumber": 196,
            "text": "\t\t\t$location_slug = array( $location_slug );"
          },
          {
            "lineNumber": 197,
            "text": "\t\t}"
          },
          {
            "lineNumber": 198
          },
          {
            "lineNumber": 199,
            "text": "\t\t// loop through each location, set up form."
          },
          {
            "lineNumber": 200,
            "text": "\t\tforeach ( $location_terms as $index =\u003e $term_object ) {"
          },
          {
            "lineNumber": 201,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 202,
            "text": "\t\t\t\t'\u003cp\u003e\u003cinput id=\"%1$s\" name=\"%2$s[]\" value=\"%3$s\" type=\"checkbox\"%4$s\u003e \u003clabel for=\"%1$s\"\u003e%5$s\u003c/label\u003e\u003c/p\u003e',"
          },
          {
            "lineNumber": 203,
            "text": "\t\t\t\tesc_attr( $this-\u003eget_field_id( $term_object-\u003eslug ) ),"
          },
          {
            "lineNumber": 204,
            "text": "\t\t\t\tesc_attr( $this-\u003eget_field_name( 'location_slug' ) ),"
          },
          {
            "lineNumber": 205,
            "text": "\t\t\t\tesc_attr( $term_object-\u003eslug ),"
          },
          {
            "lineNumber": 206,
            "text": "\t\t\t\tchecked( true, in_array( $term_object-\u003eslug, $location_slug, true ), false ),"
          },
          {
            "lineNumber": 207,
            "text": "\t\t\t\tesc_html( str_replace( \"\\r\", '', str_replace( PHP_EOL, ', ', $term_object-\u003edescription ) ) )"
          },
          {
            "lineNumber": 208,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 209,
            "text": "\t\t}"
          },
          {
            "lineNumber": 210
          },
          {
            "lineNumber": 211,
            "text": "\t\t// Only show this if the API key is missing."
          },
          {
            "lineNumber": 212,
            "text": "\t\t$settings = INVP::settings();"
          },
          {
            "lineNumber": 213,
            "text": "\t\tif ( empty( $settings['mapbox_public_token'] ) ) {"
          },
          {
            "lineNumber": 214,
            "text": "\t\t\tprintf( '\u003cp\u003e%s\u003c/p\u003e', esc_html__( 'An API token from mapbox.com is required for this widget to work. Obtain a key at mapbox.com and save it on the Inventory Presser Options page.', 'inventory-presser' ) );"
          },
          {
            "lineNumber": 215,
            "text": "\t\t}"
          },
          {
            "lineNumber": 216,
            "text": "\t}"
          },
          {
            "lineNumber": 217
          },
          {
            "lineNumber": 218,
            "text": "\t/**"
          },
          {
            "lineNumber": 219,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          }
        ],
        "range": {
          "endPosition": {
            "line": 219
          },
          "startPosition": {
            "line": 165
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-map.php",
        "signatures": {}
      },
      "score": 0.28205180168151855
    },
    {
      "codeBlock": {
        "contents": "\t\t *\n\t\t * @return string\n\t\t */\n\t\tpublic function get_field_input( $form, $value = '', $entry = null ) {\n\t\t\t$form_id         = $form['id'];\n\t\t\t$is_entry_detail = $this-\u003eis_entry_detail();\n\t\t\t$is_form_editor  = $this-\u003eis_form_editor();\n\n\t\t\t$id       = (int) $this-\u003eid;\n\t\t\t$field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? \"input_$id\" : 'input_' . $form_id . \"_$id\";\n\n\t\t\t$disabled_text = $is_form_editor ? 'disabled=\"disabled\"' : '';\n\n\t\t\t$field_type         = $is_entry_detail || $is_form_editor ? 'text' : 'hidden';\n\t\t\t$class_attribute    = $is_entry_detail || $is_form_editor ? '' : 'class=\"gform_hidden\"';\n\t\t\t$required_attribute = $this-\u003eisRequired ? 'aria-required=\"true\"' : '';\n\t\t\t$invalid_attribute  = $this-\u003efailed_validation ? 'aria-invalid=\"true\"' : 'aria-invalid=\"false\"';\n\n\t\t\tif ( is_singular( INVP::POST_TYPE ) ) {\n\t\t\t\t$value = sprintf(\n\t\t\t\t\t'%s %s %s %s, %s',\n\t\t\t\t\tinvp_get_the_year(),\n\t\t\t\t\tinvp_get_the_make(),\n\t\t\t\t\tinvp_get_the_model(),\n\t\t\t\t\tinvp_get_the_trim(),\n\t\t\t\t\tinvp_get_the_stock_number()\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$field = sprintf(\n\t\t\t\t'\u003cinput name=\"input_%d\" id=\"%s\" type=\"%s\" {$class_attribute} {$required_attribute} {$invalid_attribute} aria-invalid=\"%s\" value=\"%s\" %s/\u003e',\n\t\t\t\tesc_attr( $id ),\n\t\t\t\tesc_attr( $field_id ),\n\t\t\t\tesc_attr( $field_type ),\n\t\t\t\tesc_attr( $this-\u003efailed_validation ? 'true' : 'false' ),\n\t\t\t\tesc_attr( $value ),\n\t\t\t\t$disabled_text\n\t\t\t);\n\n\t\t\t// Is this a single vehicle page?\n\t\t\tif ( ! is_singular( INVP::POST_TYPE ) \u0026\u0026 ! $is_form_editor ) {\n\t\t\t\t// No.\n\t\t\t\t// The field is a select.\n\t\t\t\t$field_type = 'select';",
        "detailedLines": [
          {
            "lineNumber": 109,
            "text": "\t\t *"
          },
          {
            "lineNumber": 110,
            "text": "\t\t * @return string"
          },
          {
            "lineNumber": 111,
            "text": "\t\t */"
          },
          {
            "lineNumber": 112,
            "text": "\t\tpublic function get_field_input( $form, $value = '', $entry = null ) {"
          },
          {
            "lineNumber": 113,
            "text": "\t\t\t$form_id         = $form['id'];"
          },
          {
            "lineNumber": 114,
            "text": "\t\t\t$is_entry_detail = $this-\u003eis_entry_detail();"
          },
          {
            "lineNumber": 115,
            "text": "\t\t\t$is_form_editor  = $this-\u003eis_form_editor();"
          },
          {
            "lineNumber": 116
          },
          {
            "lineNumber": 117,
            "text": "\t\t\t$id       = (int) $this-\u003eid;"
          },
          {
            "lineNumber": 118,
            "text": "\t\t\t$field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? \"input_$id\" : 'input_' . $form_id . \"_$id\";"
          },
          {
            "lineNumber": 119
          },
          {
            "lineNumber": 120,
            "text": "\t\t\t$disabled_text = $is_form_editor ? 'disabled=\"disabled\"' : '';"
          },
          {
            "lineNumber": 121
          },
          {
            "lineNumber": 122,
            "text": "\t\t\t$field_type         = $is_entry_detail || $is_form_editor ? 'text' : 'hidden';"
          },
          {
            "lineNumber": 123,
            "text": "\t\t\t$class_attribute    = $is_entry_detail || $is_form_editor ? '' : 'class=\"gform_hidden\"';"
          },
          {
            "lineNumber": 124,
            "text": "\t\t\t$required_attribute = $this-\u003eisRequired ? 'aria-required=\"true\"' : '';"
          },
          {
            "lineNumber": 125,
            "text": "\t\t\t$invalid_attribute  = $this-\u003efailed_validation ? 'aria-invalid=\"true\"' : 'aria-invalid=\"false\"';"
          },
          {
            "lineNumber": 126
          },
          {
            "lineNumber": 127,
            "text": "\t\t\tif ( is_singular( INVP::POST_TYPE ) ) {"
          },
          {
            "lineNumber": 128,
            "text": "\t\t\t\t$value = sprintf("
          },
          {
            "lineNumber": 129,
            "text": "\t\t\t\t\t'%s %s %s %s, %s',"
          },
          {
            "lineNumber": 130,
            "text": "\t\t\t\t\tinvp_get_the_year(),"
          },
          {
            "lineNumber": 131,
            "text": "\t\t\t\t\tinvp_get_the_make(),"
          },
          {
            "lineNumber": 132,
            "text": "\t\t\t\t\tinvp_get_the_model(),"
          },
          {
            "lineNumber": 133,
            "text": "\t\t\t\t\tinvp_get_the_trim(),"
          },
          {
            "lineNumber": 134,
            "text": "\t\t\t\t\tinvp_get_the_stock_number()"
          },
          {
            "lineNumber": 135,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 136,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 137
          },
          {
            "lineNumber": 138,
            "text": "\t\t\t$field = sprintf("
          },
          {
            "lineNumber": 139,
            "text": "\t\t\t\t'\u003cinput name=\"input_%d\" id=\"%s\" type=\"%s\" {$class_attribute} {$required_attribute} {$invalid_attribute} aria-invalid=\"%s\" value=\"%s\" %s/\u003e',"
          },
          {
            "lineNumber": 140,
            "text": "\t\t\t\tesc_attr( $id ),"
          },
          {
            "lineNumber": 141,
            "text": "\t\t\t\tesc_attr( $field_id ),"
          },
          {
            "lineNumber": 142,
            "text": "\t\t\t\tesc_attr( $field_type ),"
          },
          {
            "lineNumber": 143,
            "text": "\t\t\t\tesc_attr( $this-\u003efailed_validation ? 'true' : 'false' ),"
          },
          {
            "lineNumber": 144,
            "text": "\t\t\t\tesc_attr( $value ),"
          },
          {
            "lineNumber": 145,
            "text": "\t\t\t\t$disabled_text"
          },
          {
            "lineNumber": 146,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 147
          },
          {
            "lineNumber": 148,
            "text": "\t\t\t// Is this a single vehicle page?"
          },
          {
            "lineNumber": 149,
            "text": "\t\t\tif ( ! is_singular( INVP::POST_TYPE ) \u0026\u0026 ! $is_form_editor ) {"
          },
          {
            "lineNumber": 150,
            "text": "\t\t\t\t// No."
          },
          {
            "lineNumber": 151,
            "text": "\t\t\t\t// The field is a select."
          },
          {
            "lineNumber": 152,
            "text": "\t\t\t\t$field_type = 'select';"
          }
        ],
        "range": {
          "endPosition": {
            "line": 152
          },
          "startPosition": {
            "line": 108
          }
        },
        "relativeWorkspacePath": "./includes/integrations/class-gravityforms-field-vehicle.php",
        "signatures": {}
      },
      "score": 0.28117260336875916
    }
  ]
}
```
Status: **completed**


</details>
</tool-use>

<tool-use data-tool-type="unknown" data-tool-name="semantic_search_full"><details>
<summary>Tool use: **semantic_search_full**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="unknown" data-tool-name="web_search">
<details>
<summary>Tool use: **web_search**</summary>


Parameters:

```json
{
  "searchTerm": "wp_kses_post checkbox input form attributes WordPress"
}
```
Result:

```json
{
  "isFinal": true,
  "references": [
    {
      "chunk": "Links:\n1. [wp_kses allow checkbox class and checked](https://wordpress.stackexchange.com/questions/251009/wp-kses-allow-checkbox-class-and-checked)\n2. [wp_kses_post(  string   $data  ):  string](https://developer.wordpress.org/reference/functions/wp_kses_post/)\n3. [$allowedposttags doesn't allow form inputs](https://core.trac.wordpress.org/ticket/37085)\n4. [wp_kses(  string   $content ,   array[]|string   $allowed_html ,   string[]   $allowed_protocols  =  array()  ):  string](https://developer.wordpress.org/reference/functions/wp_kses/)\n5. [What are allowed HTML in wp_kses_post function?](https://stackoverflow.com/questions/66561592/what-are-allowed-html-in-wp-kses-post-function)\n\n# wp_kses_post and Checkbox Input Form Attributes\n\n## Key Limitations\n\n&#96;wp_kses_post()&#96; does **not** allow form inputs by default.[2][3] It sanitizes content using the 'post' context, which includes tags like &#96;\u003cform\u003e&#96;, &#96;\u003clabel\u003e&#96;, &#96;\u003clegend\u003e&#96;, and &#96;\u003ctextarea\u003e&#96;, but excludes &#96;\u003cinput\u003e&#96;, &#96;\u003cselect\u003e&#96;, and &#96;\u003coption\u003e&#96; tags.[3]\n\n## Using wp_kses for Checkbox Inputs\n\nTo allow checkbox inputs and their attributes, use &#96;wp_kses()&#96; instead with a custom allowed HTML array:[1][4]\n\n&#96;&#96;&#96;php\n$allowed_html = array(\n    'input' =\u003e array(\n        'type' =\u003e array(),\n        'name' =\u003e array(),\n        'value' =\u003e array(),\n        'class' =\u003e array(),\n        'id' =\u003e array(),\n        'checked' =\u003e array()\n    ),\n);\n$filtered_content = wp_kses( $content, $allowed_html );\n&#96;&#96;&#96;\n\n## Important Attribute Format\n\nUse empty arrays &#96;array()&#96; for attribute values rather than &#96;true&#96;.[1] This allows the attributes while filtering their content.\n\n## Alternative: Check Allowed Tags\n\nTo see what &#96;wp_kses_post()&#96; actually allows, use:[5]\n&#96;&#96;&#96;php\nprint_r( wp_kses_allowed_html( 'post' ) );\n&#96;&#96;&#96;",
      "title": "Web search results for query: wp_kses_post checkbox input form attributes WordPress"
    }
  ],
  "rejected": false
}
```
User decision: **accepted**

Status: **completed**


</details>
</tool-use>

<tool-use data-tool-type="unknown" data-tool-name="web_search"><details>
<summary>Tool use: **web_search**</summary>

</details></tool-use>

_**Agent (composer-1)**_

Yes. `wp_kses_post()` does not allow `<input>` tags by default, so it strips the checkboxes from `$phones_table`.

Since this is admin-only content (the widget settings form), we don't need `wp_kses_post()` here. Removing it and outputting the table directly:


_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-phones.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

Checking how other widgets handle similar form output:


_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-address.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-address.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

The address widget outputs its checkbox table directly without `wp_kses_post()` (line 148-149), with a phpcs:ignore comment. Applying the same fix here:


_**Agent (composer-1)**_

<tool-use data-tool-type="write" data-tool-name="edit_file_v2">

<details><summary>Tool use: **edit_file_v2** • Edit file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-phones.php</summary>

</details>

</tool-use>

<tool-use data-tool-type="write" data-tool-name="edit_file_v2"><details>
<summary>Tool use: **edit_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

Fixed. `wp_kses_post()` was stripping the checkboxes because it doesn't allow `<input>` tags by default.

**The fix:**
- Removed `wp_kses_post()` from the output
- Output the table directly (safe since this is admin-only content and we control the HTML)
- Added a `phpcs:ignore` comment to match the pattern used in the similar address widget (`class-widget-address.php`)

The checkboxes should now display correctly in the widget admin form. This matches how the address widget handles its checkbox table.

---

_**User**_

well is there any escaped data that users can edit at risk of being output without escaping now?

---

_**Agent (composer-1)**_

Checking how `$phones_table` is built to see if any user data is escaped:


_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-phones.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

All user-editable data is properly escaped:

1. Line 205: `$name` (location name) — uses `esc_html()`
2. Line 214: `$checkbox_id` — uses `esc_attr()`
3. Line 215: `get_field_name()` — uses `esc_attr()`
4. Line 216: `$phone_uid` — uses `esc_attr()`
5. Line 224: `$description` — uses `esc_html()`
6. Line 226: `$number` — uses `esc_html()`

The data comes from:
- `$name` — taxonomy term name from `get_terms()`
- `$phone_uid`, `$number`, `$description` — stored term meta (user-editable)

All values are escaped with `esc_html()` or `esc_attr()` before being inserted into the HTML string. `wp_kses_post()` was only stripping the `<input>` tags, not sanitizing the data values.

So there's no security risk — the data is properly escaped. The `phpcs:ignore` comment is appropriate here since the escaping is handled at the point where each value is inserted into the string.

---

_**User**_

check all the other widgets in this plugin for this same problem, wp_kses_post() preventing our form() methods from rendering the controls for users in the dashboard widgets settings.

---

_**Agent (composer-1)**_


Searching for widget files and checking their `form()` methods for `wp_kses_post()` usage:


_**Agent (composer-1)**_

<tool-use data-tool-type="search" data-tool-name="glob_file_search">
<details>
<summary>Tool use: **glob_file_search** • Searched codebase "" • **13** results in **1** directory</summary>

Directory: **** (13 files)

| File |
|------|
| `./includes/widget/class-widget-phones.php` |
| `./includes/widget/class-widget-order-by.php` |
| `./includes/widget/class-widget-maximum-price-filter.php` |
| `./includes/widget/class-widget-kbb.php` |
| `./includes/widget/class-widget-inventory-slider.php` |
| `./includes/widget/class-widget-map.php` |
| `./includes/widget/class-widget-hours.php` |
| `./includes/widget/class-widget-fuel-economy.php` |
| `./includes/widget/class-widget-carfax.php` |
| `./includes/widget/class-widget-google-maps-v3.php` |
| `./includes/widget/class-widget-address.php` |
| `./includes/widget/class-widget-google-maps.php` |
| `./includes/widget/class-widget-inventory-grid.php` |

</details>
</tool-use>

<tool-use data-tool-type="search" data-tool-name="glob_file_search"><details>
<summary>Tool use: **glob_file_search**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="unknown" data-tool-name="ripgrep_raw_search">
<details>
<summary>Tool use: **ripgrep_raw_search**</summary>


Parameters:

```json
{
  "caseInsensitive": false,
  "path": "includes/widget",
  "pattern": "wp_kses_post"
}
```
Result:

```json
{
  "success": {
    "outputMode": "content",
    "path": "includes/widget",
    "pattern": "wp_kses_post",
    "workspaceResults": {
      "/Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser": {
        "content": {
          "matches": [
            {
              "file": "includes/widget/class-widget-phones.php",
              "matches": [
                {
                  "content": "\t\techo wp_kses_post( $args['before_widget'] );",
                  "lineNumber": 114
                },
                {
                  "content": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );",
                  "lineNumber": 118
                },
                {
                  "content": "\t\t\t\t\techo wp_kses_post( apply_filters( 'invp_phone_number_widget_html', $html, $term_id, $phone_uid, $number, $description, $this-\u003eformats()[ $format ] ) );",
                  "lineNumber": 164
                },
                {
                  "content": "\t\t. wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 171
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-order-by.php",
              "matches": [
                {
                  "content": "\t\t\techo wp_kses_post( $args['before_widget'] );",
                  "lineNumber": 187
                },
                {
                  "content": "\t\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );",
                  "lineNumber": 189
                },
                {
                  "content": "\t\t\techo '\u003c/ul\u003e' . wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 197
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-maximum-price-filter.php",
              "matches": [
                {
                  "content": "\t\techo wp_kses_post( $args['before_widget'] ?? '' );",
                  "lineNumber": 99
                },
                {
                  "content": "\t\t\t\twp_kses_post( $args['before_title'] ?? '' ),",
                  "lineNumber": 107
                },
                {
                  "content": "\t\t\t\twp_kses_post( $args['after_title'] ?? '' )",
                  "lineNumber": 109
                },
                {
                  "content": "\t\techo '\u003c/div\u003e' . wp_kses_post( $args['after_widget'] ?? '' );",
                  "lineNumber": 148
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-kbb.php",
              "matches": [
                {
                  "content": "\t\techo wp_kses_post( $args['before_widget'] );",
                  "lineNumber": 71
                },
                {
                  "content": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );",
                  "lineNumber": 73
                },
                {
                  "content": "\t\t\techo wp_kses_post( wpautop( $instance['before_image'] ) );",
                  "lineNumber": 77
                },
                {
                  "content": "\t\t\techo wp_kses_post( wpautop( $instance['after_image'] ) );",
                  "lineNumber": 84
                },
                {
                  "content": "\t\techo wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 87
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-inventory-slider.php",
              "matches": [
                {
                  "content": "\t\techo wp_kses_post( $args['before_widget'] );",
                  "lineNumber": 175
                },
                {
                  "content": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );",
                  "lineNumber": 177
                },
                {
                  "content": "\t\techo '\u003c/ul\u003e\u003c/div\u003e' . wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 204
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-map.php",
              "matches": [
                {
                  "content": "\t\t\t$popup-\u003eaddress = wp_kses_post( str_replace( \"\\r\", '', str_replace( PHP_EOL, '\u003cbr /\u003e', $location_terms[ $t ]-\u003edescription ) ) );",
                  "lineNumber": 99
                },
                {
                  "content": "\t\techo wp_kses_post( $args['before_widget'] );",
                  "lineNumber": 155
                },
                {
                  "content": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );",
                  "lineNumber": 159
                },
                {
                  "content": "\t\techo wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 163
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-hours.php",
              "matches": [
                {
                  "content": "\t\t\t\techo wp_kses_post( apply_filters( 'invp_hours_title', $hours_title, $hours_uid ) );",
                  "lineNumber": 117
                },
                {
                  "content": "\t\t\techo '\u003c/div\u003e' . wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 223
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-fuel-economy.php",
              "matches": [
                {
                  "content": "\t\techo wp_kses_post( $args['before_widget'] )",
                  "lineNumber": 102
                },
                {
                  "content": "\t\t. wp_kses_post( $args['before_title'] )",
                  "lineNumber": 103
                },
                {
                  "content": "\t\t. wp_kses_post( $args['after_title'] );",
                  "lineNumber": 105
                },
                {
                  "content": "\t\techo wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 223
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-carfax.php",
              "matches": [
                {
                  "content": "\t\techo wp_kses_post( $args['before_widget'] );",
                  "lineNumber": 98
                },
                {
                  "content": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );",
                  "lineNumber": 100
                },
                {
                  "content": "\t\techo wp_kses_post( wpautop( $instance['before_image'] ) );",
                  "lineNumber": 103
                },
                {
                  "content": "\t\techo wp_kses_post( wpautop( $instance['after_image'] ) ) . wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 119
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-google-maps-v3.php",
              "matches": [
                {
                  "content": "\t\t\t$popup-\u003eaddress = wp_kses_post( str_replace( \"\\r\", '', str_replace( PHP_EOL, '\u003cbr /\u003e', $location_terms[ $t ]-\u003edescription ) ) );",
                  "lineNumber": 85
                },
                {
                  "content": "\t\techo wp_kses_post( $args['before_widget'] );",
                  "lineNumber": 123
                },
                {
                  "content": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );",
                  "lineNumber": 127
                },
                {
                  "content": "\t\techo '\u003cdiv id=\"map_canvas\" style=\"min-height: 175px;\"\u003e\u003c/div\u003e' . wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 130
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-address.php",
              "matches": [
                {
                  "content": "\t\techo wp_kses_post( $args['before_widget'] );",
                  "lineNumber": 60
                },
                {
                  "content": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );",
                  "lineNumber": 62
                },
                {
                  "content": "\t\t\t\t\techo '\u003cdiv\u003e' . wp_kses_post( nl2br( $location-\u003edescription ) ) . '\u003c/div\u003e';",
                  "lineNumber": 79
                },
                {
                  "content": "\t\techo wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 84
                },
                {
                  "content": "\t\t\t$address_table   .= sprintf( '\u003ctr\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003c/tr\u003e', $address_checkbox, wp_kses_post( nl2br( $term_object-\u003edescription ) ) );",
                  "lineNumber": 131
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-google-maps.php",
              "matches": [
                {
                  "content": "\t\techo wp_kses_post( $args['before_widget'] );",
                  "lineNumber": 71
                },
                {
                  "content": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );",
                  "lineNumber": 75
                },
                {
                  "content": "\t\techo wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 88
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-inventory-grid.php",
              "matches": [
                {
                  "content": "\t\techo wp_kses_post( $args['before_widget'] );",
                  "lineNumber": 250
                },
                {
                  "content": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );",
                  "lineNumber": 253
                },
                {
                  "content": "\t\techo $this-\u003econtent( $content_args ) . wp_kses_post( $args['after_widget'] );",
                  "lineNumber": 256
                }
              ]
            }
          ],
          "totalLines": 48,
          "totalMatchedLines": 48
        }
      }
    }
  }
}
```
Status: **completed**


</details>
</tool-use>

<tool-use data-tool-type="unknown" data-tool-name="ripgrep_raw_search"><details>
<summary>Tool use: **ripgrep_raw_search**</summary>

</details></tool-use>

_**Agent (composer-1)**_


Checking each widget's `form()` method for `wp_kses_post()` usage:


_**Agent (composer-1)**_

<tool-use data-tool-type="unknown" data-tool-name="ripgrep_raw_search">
<details>
<summary>Tool use: **ripgrep_raw_search**</summary>


Parameters:

```json
{
  "caseInsensitive": false,
  "path": "includes/widget",
  "pattern": "public function form"
}
```
Result:

```json
{
  "success": {
    "outputMode": "content",
    "path": "includes/widget",
    "pattern": "public function form",
    "workspaceResults": {
      "/Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser": {
        "content": {
          "matches": [
            {
              "file": "includes/widget/class-widget-phones.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 180
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-order-by.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 58
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-maximum-price-filter.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 157
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-kbb.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 96
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-inventory-slider.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 213
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-map.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 172
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-hours.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 233
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-fuel-economy.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 48
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-carfax.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 128
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-google-maps-v3.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 139
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-address.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 93
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-google-maps.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 99
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-inventory-grid.php",
              "matches": [
                {
                  "content": "\tpublic function form( $instance ) {",
                  "lineNumber": 265
                }
              ]
            }
          ],
          "totalLines": 13,
          "totalMatchedLines": 13
        }
      }
    }
  }
}
```
Status: **completed**


</details>
</tool-use>

<tool-use data-tool-type="unknown" data-tool-name="ripgrep_raw_search"><details>
<summary>Tool use: **ripgrep_raw_search**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="unknown" data-tool-name="semantic_search_full">
<details>
<summary>Tool use: **semantic_search_full**</summary>


Parameters:

```json
{
  "explanation": "",
  "includePattern": "includes/widget",
  "query": "widget form method outputting HTML tables or form controls with wp_kses_post",
  "topK": 10
}
```
Result:

```json
{
  "codeResults": [
    {
      "codeBlock": {
        "contents": "\t\t// build $args array.\n\t\t$content_args = array();\n\t\tif ( isset( $instance['columns'] ) ) {\n\t\t\t$content_args['columns'] = $instance['columns'];\n\t\t}\n\t\tif ( isset( $instance['limit'] ) ) {\n\t\t\t$content_args['limit'] = $instance['limit'];\n\t\t}\n\t\tif ( isset( $instance['cb_showcaptions'] ) ) {\n\t\t\t$content_args['show_captions'] = ( 'true' === $instance['cb_showcaptions'] );\n\t\t}\n\t\tif ( isset( $instance['cb_showbutton'] ) ) {\n\t\t\t$content_args['show_button'] = ( 'true' === $instance['cb_showbutton'] );\n\t\t}\n\t\tif ( isset( $instance['cb_showprices'] ) ) {\n\t\t\t$content_args['show_prices'] = ( 'true' === $instance['cb_showprices'] );\n\t\t}\n\t\tif ( isset( $instance['newest_first'] ) ) {\n\t\t\t$content_args['newest_first'] = filter_var( $instance['newest_first'], FILTER_VALIDATE_BOOLEAN );\n\t\t}\n\n\t\t// before and after widget arguments are defined by themes.\n\t\techo wp_kses_post( $args['before_widget'] );\n\t\t$title = apply_filters( 'widget_title', $instance['title'] ?? '' );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\techo $this-\u003econtent( $content_args ) . wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance The widget settings.\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title   = isset( $instance['title'] ) ? $instance['title'] : '';",
        "detailedLines": [
          {
            "lineNumber": 228,
            "text": "\t\t// build $args array."
          },
          {
            "lineNumber": 229,
            "text": "\t\t$content_args = array();"
          },
          {
            "lineNumber": 230,
            "text": "\t\tif ( isset( $instance['columns'] ) ) {"
          },
          {
            "lineNumber": 231,
            "text": "\t\t\t$content_args['columns'] = $instance['columns'];"
          },
          {
            "lineNumber": 232,
            "text": "\t\t}"
          },
          {
            "lineNumber": 233,
            "text": "\t\tif ( isset( $instance['limit'] ) ) {"
          },
          {
            "lineNumber": 234,
            "text": "\t\t\t$content_args['limit'] = $instance['limit'];"
          },
          {
            "lineNumber": 235,
            "text": "\t\t}"
          },
          {
            "lineNumber": 236,
            "text": "\t\tif ( isset( $instance['cb_showcaptions'] ) ) {"
          },
          {
            "lineNumber": 237,
            "text": "\t\t\t$content_args['show_captions'] = ( 'true' === $instance['cb_showcaptions'] );"
          },
          {
            "lineNumber": 238,
            "text": "\t\t}"
          },
          {
            "lineNumber": 239,
            "text": "\t\tif ( isset( $instance['cb_showbutton'] ) ) {"
          },
          {
            "lineNumber": 240,
            "text": "\t\t\t$content_args['show_button'] = ( 'true' === $instance['cb_showbutton'] );"
          },
          {
            "lineNumber": 241,
            "text": "\t\t}"
          },
          {
            "lineNumber": 242,
            "text": "\t\tif ( isset( $instance['cb_showprices'] ) ) {"
          },
          {
            "lineNumber": 243,
            "text": "\t\t\t$content_args['show_prices'] = ( 'true' === $instance['cb_showprices'] );"
          },
          {
            "lineNumber": 244,
            "text": "\t\t}"
          },
          {
            "lineNumber": 245,
            "text": "\t\tif ( isset( $instance['newest_first'] ) ) {"
          },
          {
            "lineNumber": 246,
            "text": "\t\t\t$content_args['newest_first'] = filter_var( $instance['newest_first'], FILTER_VALIDATE_BOOLEAN );"
          },
          {
            "lineNumber": 247,
            "text": "\t\t}"
          },
          {
            "lineNumber": 248
          },
          {
            "lineNumber": 249,
            "text": "\t\t// before and after widget arguments are defined by themes."
          },
          {
            "lineNumber": 250,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 251,
            "text": "\t\t$title = apply_filters( 'widget_title', $instance['title'] ?? '' );"
          },
          {
            "lineNumber": 252,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 253,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 254,
            "text": "\t\t}"
          },
          {
            "lineNumber": 255
          },
          {
            "lineNumber": 256,
            "text": "\t\techo $this-\u003econtent( $content_args ) . wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 257,
            "text": "\t}"
          },
          {
            "lineNumber": 258
          },
          {
            "lineNumber": 259,
            "text": "\t/**"
          },
          {
            "lineNumber": 260,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 261,
            "text": "\t *"
          },
          {
            "lineNumber": 262,
            "text": "\t * @param  array $instance The widget settings."
          },
          {
            "lineNumber": 263,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 264,
            "text": "\t */"
          },
          {
            "lineNumber": 265,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 266
          },
          {
            "lineNumber": 267,
            "text": "\t\t$title   = isset( $instance['title'] ) ? $instance['title'] : '';"
          }
        ],
        "range": {
          "endPosition": {
            "line": 267
          },
          "startPosition": {
            "line": 226
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-inventory-grid.php",
        "signatures": {}
      },
      "score": 0.3256148099899292
    },
    {
      "codeBlock": {
        "contents": "\t * @param array $instance\n\t */\n\tpublic function widget( $args, $instance ) {\n\t\tif ( empty( $instance['cb_display'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'] );\n\t\t// before and after widget arguments are defined by themes.\n\t\techo wp_kses_post( $args['before_widget'] );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\tif ( isset( $instance['cb_single_line'] ) \u0026\u0026 $instance['cb_single_line'] == 'true' ) {\n\t\t\tforeach ( $instance['cb_display'] as $i =\u003e $term_id ) {\n\t\t\t\t$location = get_term( $term_id, 'location' );\n\t\t\t\tif ( ! is_wp_error( $location ) \u0026\u0026 null != $location ) {\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t'\u003cspan\u003e%s\u003c/span\u003e',\n\t\t\t\t\t\tesc_html( str_replace( PHP_EOL, ', ', trim( $location-\u003edescription ) ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tforeach ( $instance['cb_display'] as $i =\u003e $term_id ) {\n\t\t\t\t$location = get_term( $term_id, 'location' );\n\t\t\t\tif ( ! is_wp_error( $location ) \u0026\u0026 null !== $location ) {\n\t\t\t\t\techo '\u003cdiv\u003e' . wp_kses_post( nl2br( $location-\u003edescription ) ) . '\u003c/div\u003e';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';",
        "detailedLines": [
          {
            "lineNumber": 51,
            "text": "\t * @param array $instance"
          },
          {
            "lineNumber": 52,
            "text": "\t */"
          },
          {
            "lineNumber": 53,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 54,
            "text": "\t\tif ( empty( $instance['cb_display'] ) ) {"
          },
          {
            "lineNumber": 55,
            "text": "\t\t\treturn;"
          },
          {
            "lineNumber": 56,
            "text": "\t\t}"
          },
          {
            "lineNumber": 57
          },
          {
            "lineNumber": 58,
            "text": "\t\t$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'] );"
          },
          {
            "lineNumber": 59,
            "text": "\t\t// before and after widget arguments are defined by themes."
          },
          {
            "lineNumber": 60,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 61,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 62,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 63,
            "text": "\t\t}"
          },
          {
            "lineNumber": 64
          },
          {
            "lineNumber": 65,
            "text": "\t\tif ( isset( $instance['cb_single_line'] ) \u0026\u0026 $instance['cb_single_line'] == 'true' ) {"
          },
          {
            "lineNumber": 66,
            "text": "\t\t\tforeach ( $instance['cb_display'] as $i =\u003e $term_id ) {"
          },
          {
            "lineNumber": 67,
            "text": "\t\t\t\t$location = get_term( $term_id, 'location' );"
          },
          {
            "lineNumber": 68,
            "text": "\t\t\t\tif ( ! is_wp_error( $location ) \u0026\u0026 null != $location ) {"
          },
          {
            "lineNumber": 69,
            "text": "\t\t\t\t\tprintf("
          },
          {
            "lineNumber": 70,
            "text": "\t\t\t\t\t\t'\u003cspan\u003e%s\u003c/span\u003e',"
          },
          {
            "lineNumber": 71,
            "text": "\t\t\t\t\t\tesc_html( str_replace( PHP_EOL, ', ', trim( $location-\u003edescription ) ) )"
          },
          {
            "lineNumber": 72,
            "text": "\t\t\t\t\t);"
          },
          {
            "lineNumber": 73,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 74,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 75,
            "text": "\t\t} else {"
          },
          {
            "lineNumber": 76,
            "text": "\t\t\tforeach ( $instance['cb_display'] as $i =\u003e $term_id ) {"
          },
          {
            "lineNumber": 77,
            "text": "\t\t\t\t$location = get_term( $term_id, 'location' );"
          },
          {
            "lineNumber": 78,
            "text": "\t\t\t\tif ( ! is_wp_error( $location ) \u0026\u0026 null !== $location ) {"
          },
          {
            "lineNumber": 79,
            "text": "\t\t\t\t\techo '\u003cdiv\u003e' . wp_kses_post( nl2br( $location-\u003edescription ) ) . '\u003c/div\u003e';"
          },
          {
            "lineNumber": 80,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 81,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 82,
            "text": "\t\t}"
          },
          {
            "lineNumber": 83
          },
          {
            "lineNumber": 84,
            "text": "\t\techo wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 85,
            "text": "\t}"
          },
          {
            "lineNumber": 86
          },
          {
            "lineNumber": 87,
            "text": "\t/**"
          },
          {
            "lineNumber": 88,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 89,
            "text": "\t *"
          },
          {
            "lineNumber": 90,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 91,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 92,
            "text": "\t */"
          },
          {
            "lineNumber": 93,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 94
          },
          {
            "lineNumber": 95,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';"
          }
        ],
        "range": {
          "endPosition": {
            "line": 95
          },
          "startPosition": {
            "line": 50
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-address.php",
        "signatures": {}
      },
      "score": 0.32409679889678955
    },
    {
      "codeBlock": {
        "contents": "\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.\n\t *\n\t * @param  array $new_instance\n\t * @param  array $old_instance\n\t * @return array The updated array full of settings\n\t */\n\tpublic function update( $new_instance, $old_instance ) {\n\t\t$instance          = array();\n\t\t$instance['title'] = wp_strip_all_tags( $new_instance['title'] );\n\t\t$keys              = array();\n\t\tforeach ( INVP::keys() as $key ) {\n\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key );\n\t\t\tif ( isset( $_REQUEST[ 'obpm-key-' . $key ] ) ) {\n\t\t\t\tarray_push( $keys, $key );\n\t\t\t\tif ( isset( $_REQUEST[ 'obpm-label-' . $key ] ) ) {\n\t\t\t\t\t$instance[ 'label-' . $key ] = wp_strip_all_tags( wp_unslash( $_REQUEST[ 'obpm-label-' . $key ] ) );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunset( $instance[ 'label-' . $key ] );\n\t\t\t}\n\t\t}\n\t\t$instance['post-meta-keys'] = implode( '|', $keys );\n\t\treturn $instance;\n\t}\n\n\t/**\n\t * Outputs the widget front-end HTML\n\t *\n\t * @param  array $args\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function widget( $args, $instance ) {\n\n\t\twp_enqueue_script( 'order-by-widget-javascript' );\n\t\t$title = apply_filters( 'widget_title', ( isset( $instance['title'] ) ? $instance['title'] : '' ) );\n\n\t\t$keys_to_list = explode( '|', $instance['post-meta-keys'] );\n\t\tif ( 0 \u003c count( $keys_to_list ) ) {\n\t\t\techo wp_kses_post( $args['before_widget'] );\n\t\t\tif ( $title ) {\n\t\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t\t}\n\t\t\techo '\u003cul class=\"order-by-list list-nostyle\"\u003e';\n\t\t\tforeach ( $keys_to_list as $key ) {\n\t\t\t\techo '\u003cli\u003e\u003ca href=\"javascript:order_by_post_meta(\\'' . esc_attr( $key ) . '\\');\"\u003e'\n\t\t\t\t. esc_html( isset( $instance[ 'label-' . $key ] ) ? $instance[ 'label-' . $key ] : $key )\n\t\t\t\t. '\u003c/a\u003e\u003c/li\u003e';\n\t\t\t}\n\t\t\techo '\u003c/ul\u003e' . wp_kses_post( $args['after_widget'] );\n\t\t}\n\t}\n}",
        "detailedLines": [
          {
            "lineNumber": 145,
            "text": "\t}"
          },
          {
            "lineNumber": 146
          },
          {
            "lineNumber": 147,
            "text": "\t/**"
          },
          {
            "lineNumber": 148,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          },
          {
            "lineNumber": 149,
            "text": "\t *"
          },
          {
            "lineNumber": 150,
            "text": "\t * @param  array $new_instance"
          },
          {
            "lineNumber": 151,
            "text": "\t * @param  array $old_instance"
          },
          {
            "lineNumber": 152,
            "text": "\t * @return array The updated array full of settings"
          },
          {
            "lineNumber": 153,
            "text": "\t */"
          },
          {
            "lineNumber": 154,
            "text": "\tpublic function update( $new_instance, $old_instance ) {"
          },
          {
            "lineNumber": 155,
            "text": "\t\t$instance          = array();"
          },
          {
            "lineNumber": 156,
            "text": "\t\t$instance['title'] = wp_strip_all_tags( $new_instance['title'] );"
          },
          {
            "lineNumber": 157,
            "text": "\t\t$keys              = array();"
          },
          {
            "lineNumber": 158,
            "text": "\t\tforeach ( INVP::keys() as $key ) {"
          },
          {
            "lineNumber": 159,
            "text": "\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key );"
          },
          {
            "lineNumber": 160,
            "text": "\t\t\tif ( isset( $_REQUEST[ 'obpm-key-' . $key ] ) ) {"
          },
          {
            "lineNumber": 161,
            "text": "\t\t\t\tarray_push( $keys, $key );"
          },
          {
            "lineNumber": 162,
            "text": "\t\t\t\tif ( isset( $_REQUEST[ 'obpm-label-' . $key ] ) ) {"
          },
          {
            "lineNumber": 163,
            "text": "\t\t\t\t\t$instance[ 'label-' . $key ] = wp_strip_all_tags( wp_unslash( $_REQUEST[ 'obpm-label-' . $key ] ) );"
          },
          {
            "lineNumber": 164,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 165,
            "text": "\t\t\t} else {"
          },
          {
            "lineNumber": 166,
            "text": "\t\t\t\tunset( $instance[ 'label-' . $key ] );"
          },
          {
            "lineNumber": 167,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 168,
            "text": "\t\t}"
          },
          {
            "lineNumber": 169,
            "text": "\t\t$instance['post-meta-keys'] = implode( '|', $keys );"
          },
          {
            "lineNumber": 170,
            "text": "\t\treturn $instance;"
          },
          {
            "lineNumber": 171,
            "text": "\t}"
          },
          {
            "lineNumber": 172
          },
          {
            "lineNumber": 173,
            "text": "\t/**"
          },
          {
            "lineNumber": 174,
            "text": "\t * Outputs the widget front-end HTML"
          },
          {
            "lineNumber": 175,
            "text": "\t *"
          },
          {
            "lineNumber": 176,
            "text": "\t * @param  array $args"
          },
          {
            "lineNumber": 177,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 178,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 179,
            "text": "\t */"
          },
          {
            "lineNumber": 180,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 181
          },
          {
            "lineNumber": 182,
            "text": "\t\twp_enqueue_script( 'order-by-widget-javascript' );"
          },
          {
            "lineNumber": 183,
            "text": "\t\t$title = apply_filters( 'widget_title', ( isset( $instance['title'] ) ? $instance['title'] : '' ) );"
          },
          {
            "lineNumber": 184
          },
          {
            "lineNumber": 185,
            "text": "\t\t$keys_to_list = explode( '|', $instance['post-meta-keys'] );"
          },
          {
            "lineNumber": 186,
            "text": "\t\tif ( 0 \u003c count( $keys_to_list ) ) {"
          },
          {
            "lineNumber": 187,
            "text": "\t\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 188,
            "text": "\t\t\tif ( $title ) {"
          },
          {
            "lineNumber": 189,
            "text": "\t\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 190,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 191,
            "text": "\t\t\techo '\u003cul class=\"order-by-list list-nostyle\"\u003e';"
          },
          {
            "lineNumber": 192,
            "text": "\t\t\tforeach ( $keys_to_list as $key ) {"
          },
          {
            "lineNumber": 193,
            "text": "\t\t\t\techo '\u003cli\u003e\u003ca href=\"javascript:order_by_post_meta(\\'' . esc_attr( $key ) . '\\');\"\u003e'"
          },
          {
            "lineNumber": 194,
            "text": "\t\t\t\t. esc_html( isset( $instance[ 'label-' . $key ] ) ? $instance[ 'label-' . $key ] : $key )"
          },
          {
            "lineNumber": 195,
            "text": "\t\t\t\t. '\u003c/a\u003e\u003c/li\u003e';"
          },
          {
            "lineNumber": 196,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 197,
            "text": "\t\t\techo '\u003c/ul\u003e' . wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 198,
            "text": "\t\t}"
          },
          {
            "lineNumber": 199,
            "text": "\t}"
          },
          {
            "lineNumber": 200,
            "text": "}"
          }
        ],
        "range": {
          "endPosition": {
            "line": 200
          },
          "startPosition": {
            "line": 144
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-order-by.php",
        "signatures": {}
      },
      "score": 0.32130300998687744
    },
    {
      "codeBlock": {
        "contents": "\t\t\t\t'hide_empty' =\u003e false,\n\t\t\t)\n\t\t);\n\t\tforeach ( $location_info as $term_id =\u003e $name ) {\n\t\t\t// Does this address even have a phone number displayed by this instance of this widget?\n\t\t\tif ( empty( $instance['cb_display'][ $term_id ] ) ) {\n\t\t\t\t// No.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor ( $p = 1; $p \u003c= INVP::LOCATION_MAX_PHONES; $p++ ) {\n\t\t\t\t$phone_uid = get_term_meta( $term_id, 'phone_' . $p . '_uid', true );\n\t\t\t\tif ( ! $phone_uid ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// There is a phone number is slot $p, has the user configured this widget to display it?\n\t\t\t\tif ( in_array( $phone_uid, $instance['cb_display'][ $term_id ], true ) ) {\n\t\t\t\t\t// Yes, output this number.\n\t\t\t\t\t$number      = get_term_meta( $term_id, 'phone_' . $p . '_number', true );\n\t\t\t\t\t$html        = '';\n\t\t\t\t\t$description = '';\n\t\t\t\t\tif ( $this-\u003eformats()[ $format ]['uses_labels'] ) {\n\t\t\t\t\t\t$description = get_term_meta( $term_id, 'phone_' . $p . '_description', true );\n\t\t\t\t\t\t$html       .= sprintf( $this-\u003eformats()[ $format ]['repeater'], esc_html( $description ), INVP::prepare_phone_number_for_link( $number ), esc_html( $number ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$html .= sprintf( $this-\u003eformats()[ $format ]['repeater'], INVP::prepare_phone_number_for_link( $number ), esc_html( $number ) );\n\t\t\t\t\t}\n\n\t\t\t\t\techo wp_kses_post( apply_filters( 'invp_phone_number_widget_html', $html, $term_id, $phone_uid, $number, $description, $this-\u003eformats()[ $format ] ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo $this-\u003eformats()[ $format ]['after']\n\t\t. '\u003c/div\u003e'\n\t\t. wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();",
        "detailedLines": [
          {
            "lineNumber": 135,
            "text": "\t\t\t\t'hide_empty' =\u003e false,"
          },
          {
            "lineNumber": 136,
            "text": "\t\t\t)"
          },
          {
            "lineNumber": 137,
            "text": "\t\t);"
          },
          {
            "lineNumber": 138,
            "text": "\t\tforeach ( $location_info as $term_id =\u003e $name ) {"
          },
          {
            "lineNumber": 139,
            "text": "\t\t\t// Does this address even have a phone number displayed by this instance of this widget?"
          },
          {
            "lineNumber": 140,
            "text": "\t\t\tif ( empty( $instance['cb_display'][ $term_id ] ) ) {"
          },
          {
            "lineNumber": 141,
            "text": "\t\t\t\t// No."
          },
          {
            "lineNumber": 142,
            "text": "\t\t\t\tcontinue;"
          },
          {
            "lineNumber": 143,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 144
          },
          {
            "lineNumber": 145,
            "text": "\t\t\tfor ( $p = 1; $p \u003c= INVP::LOCATION_MAX_PHONES; $p++ ) {"
          },
          {
            "lineNumber": 146,
            "text": "\t\t\t\t$phone_uid = get_term_meta( $term_id, 'phone_' . $p . '_uid', true );"
          },
          {
            "lineNumber": 147,
            "text": "\t\t\t\tif ( ! $phone_uid ) {"
          },
          {
            "lineNumber": 148,
            "text": "\t\t\t\t\tbreak;"
          },
          {
            "lineNumber": 149,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 150
          },
          {
            "lineNumber": 151,
            "text": "\t\t\t\t// There is a phone number is slot $p, has the user configured this widget to display it?"
          },
          {
            "lineNumber": 152,
            "text": "\t\t\t\tif ( in_array( $phone_uid, $instance['cb_display'][ $term_id ], true ) ) {"
          },
          {
            "lineNumber": 153,
            "text": "\t\t\t\t\t// Yes, output this number."
          },
          {
            "lineNumber": 154,
            "text": "\t\t\t\t\t$number      = get_term_meta( $term_id, 'phone_' . $p . '_number', true );"
          },
          {
            "lineNumber": 155,
            "text": "\t\t\t\t\t$html        = '';"
          },
          {
            "lineNumber": 156,
            "text": "\t\t\t\t\t$description = '';"
          },
          {
            "lineNumber": 157,
            "text": "\t\t\t\t\tif ( $this-\u003eformats()[ $format ]['uses_labels'] ) {"
          },
          {
            "lineNumber": 158,
            "text": "\t\t\t\t\t\t$description = get_term_meta( $term_id, 'phone_' . $p . '_description', true );"
          },
          {
            "lineNumber": 159,
            "text": "\t\t\t\t\t\t$html       .= sprintf( $this-\u003eformats()[ $format ]['repeater'], esc_html( $description ), INVP::prepare_phone_number_for_link( $number ), esc_html( $number ) );"
          },
          {
            "lineNumber": 160,
            "text": "\t\t\t\t\t} else {"
          },
          {
            "lineNumber": 161,
            "text": "\t\t\t\t\t\t$html .= sprintf( $this-\u003eformats()[ $format ]['repeater'], INVP::prepare_phone_number_for_link( $number ), esc_html( $number ) );"
          },
          {
            "lineNumber": 162,
            "text": "\t\t\t\t\t}"
          },
          {
            "lineNumber": 163
          },
          {
            "lineNumber": 164,
            "text": "\t\t\t\t\techo wp_kses_post( apply_filters( 'invp_phone_number_widget_html', $html, $term_id, $phone_uid, $number, $description, $this-\u003eformats()[ $format ] ) );"
          },
          {
            "lineNumber": 165,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 166,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 167,
            "text": "\t\t}"
          },
          {
            "lineNumber": 168
          },
          {
            "lineNumber": 169,
            "text": "\t\techo $this-\u003eformats()[ $format ]['after']"
          },
          {
            "lineNumber": 170,
            "text": "\t\t. '\u003c/div\u003e'"
          },
          {
            "lineNumber": 171,
            "text": "\t\t. wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 172,
            "text": "\t}"
          },
          {
            "lineNumber": 173
          },
          {
            "lineNumber": 174,
            "text": "\t/**"
          },
          {
            "lineNumber": 175,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 176,
            "text": "\t *"
          },
          {
            "lineNumber": 177,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 178,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 179,
            "text": "\t */"
          },
          {
            "lineNumber": 180,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 181,
            "text": "\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();"
          }
        ],
        "range": {
          "endPosition": {
            "line": 181
          },
          "startPosition": {
            "line": 134
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-phones.php",
        "signatures": {}
      },
      "score": 0.3103032112121582
    },
    {
      "codeBlock": {
        "contents": "\t\t$image_keys = array_keys( $this-\u003eimages() );\n\t\t$image      = ( isset( $instance['image'] ) \u0026\u0026 in_array( $instance['image'], $image_keys, true ) ) ? $instance['image'] : $image_keys[0];\n\n\t\t$title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '' );\n\t\t// before and after widget arguments are defined by themes.\n\t\techo wp_kses_post( $args['before_widget'] );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\tif ( isset( $instance['before_image'] ) ) {\n\t\t\techo wp_kses_post( wpautop( $instance['before_image'] ) );\n\t\t}\n\t\tprintf(\n\t\t\t'\u003ca href=\"https://kbb.com\" target=\"_blank\"\u003e\u003cimg src=\"%s\"\u003e\u003c/a\u003e',\n\t\t\tesc_url( plugins_url( '/images/' . $this-\u003eimages()[ $image ]['img'], INVP_PLUGIN_FILE_PATH ) )\n\t\t);\n\t\tif ( isset( $instance['after_image'] ) ) {\n\t\t\techo wp_kses_post( wpautop( $instance['after_image'] ) );\n\t\t}\n\n\t\techo wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$image_keys = array_keys( $this-\u003eimages() );",
        "detailedLines": [
          {
            "lineNumber": 66,
            "text": "\t\t$image_keys = array_keys( $this-\u003eimages() );"
          },
          {
            "lineNumber": 67,
            "text": "\t\t$image      = ( isset( $instance['image'] ) \u0026\u0026 in_array( $instance['image'], $image_keys, true ) ) ? $instance['image'] : $image_keys[0];"
          },
          {
            "lineNumber": 68
          },
          {
            "lineNumber": 69,
            "text": "\t\t$title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '' );"
          },
          {
            "lineNumber": 70,
            "text": "\t\t// before and after widget arguments are defined by themes."
          },
          {
            "lineNumber": 71,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 72,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 73,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 74,
            "text": "\t\t}"
          },
          {
            "lineNumber": 75
          },
          {
            "lineNumber": 76,
            "text": "\t\tif ( isset( $instance['before_image'] ) ) {"
          },
          {
            "lineNumber": 77,
            "text": "\t\t\techo wp_kses_post( wpautop( $instance['before_image'] ) );"
          },
          {
            "lineNumber": 78,
            "text": "\t\t}"
          },
          {
            "lineNumber": 79,
            "text": "\t\tprintf("
          },
          {
            "lineNumber": 80,
            "text": "\t\t\t'\u003ca href=\"https://kbb.com\" target=\"_blank\"\u003e\u003cimg src=\"%s\"\u003e\u003c/a\u003e',"
          },
          {
            "lineNumber": 81,
            "text": "\t\t\tesc_url( plugins_url( '/images/' . $this-\u003eimages()[ $image ]['img'], INVP_PLUGIN_FILE_PATH ) )"
          },
          {
            "lineNumber": 82,
            "text": "\t\t);"
          },
          {
            "lineNumber": 83,
            "text": "\t\tif ( isset( $instance['after_image'] ) ) {"
          },
          {
            "lineNumber": 84,
            "text": "\t\t\techo wp_kses_post( wpautop( $instance['after_image'] ) );"
          },
          {
            "lineNumber": 85,
            "text": "\t\t}"
          },
          {
            "lineNumber": 86
          },
          {
            "lineNumber": 87,
            "text": "\t\techo wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 88,
            "text": "\t}"
          },
          {
            "lineNumber": 89
          },
          {
            "lineNumber": 90,
            "text": "\t/**"
          },
          {
            "lineNumber": 91,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 92,
            "text": "\t *"
          },
          {
            "lineNumber": 93,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 94,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 95,
            "text": "\t */"
          },
          {
            "lineNumber": 96,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 97
          },
          {
            "lineNumber": 98,
            "text": "\t\t$image_keys = array_keys( $this-\u003eimages() );"
          }
        ],
        "range": {
          "endPosition": {
            "line": 98
          },
          "startPosition": {
            "line": 64
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-kbb.php",
        "signatures": {}
      },
      "score": 0.30699849128723145
    },
    {
      "codeBlock": {
        "contents": "\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title (optional):', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'format' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Display Format:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\t\u003cselect class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'format' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'format' ) ); ?\u003e\"\u003e\n\t\t\u003c?php\n\t\t$format = isset( $instance['format'] ) ? $instance['format'] : current( array_keys( $this-\u003eformats() ) );\n\t\tforeach ( $this-\u003eformats() as $key =\u003e $format_array ) {\n\t\t\tprintf(\n\t\t\t\t'\u003coption value=\"%s\"%s\u003e%s\u003c/option\u003e',\n\t\t\t\tesc_attr( $key ),\n\t\t\t\tselected( $format == $key, true, false ),\n\t\t\t\tesc_html( $format_array['selector'] )\n\t\t\t);\n\t\t}\n\t\t?\u003e\n\t\t\t\u003c/select\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003c?php\n\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\techo $phones_table;\n\t\t?\u003e\n\t\t\u003c/p\u003e\n\t\t\u003c?php\n\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.\n\t *\n\t * @param  array $new_instance\n\t * @param  array $old_instance\n\t * @return array The updated array full of settings\n\t */\n\tpublic function update( $new_instance, $old_instance ) {\n\t\t$instance               = array();\n\t\t$instance['title']      = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';\n\t\t$instance['format']     = ( ! empty( $new_instance['format'] ) ) ? $new_instance['format'] : current( array_keys( $this-\u003eformats() ) );\n\t\t$instance['cb_display'] = ( ! empty( $new_instance['cb_display'] ) ) ? $new_instance['cb_display'] : array();\n\t\treturn $instance;\n\t}\n}",
        "detailedLines": [
          {
            "lineNumber": 236,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 237,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title (optional):', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 238,
            "text": "\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 239,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 240,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 241,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'format' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Display Format:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 242,
            "text": "\t\t\t\u003cselect class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'format' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'format' ) ); ?\u003e\"\u003e"
          },
          {
            "lineNumber": 243,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 244,
            "text": "\t\t$format = isset( $instance['format'] ) ? $instance['format'] : current( array_keys( $this-\u003eformats() ) );"
          },
          {
            "lineNumber": 245,
            "text": "\t\tforeach ( $this-\u003eformats() as $key =\u003e $format_array ) {"
          },
          {
            "lineNumber": 246,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 247,
            "text": "\t\t\t\t'\u003coption value=\"%s\"%s\u003e%s\u003c/option\u003e',"
          },
          {
            "lineNumber": 248,
            "text": "\t\t\t\tesc_attr( $key ),"
          },
          {
            "lineNumber": 249,
            "text": "\t\t\t\tselected( $format == $key, true, false ),"
          },
          {
            "lineNumber": 250,
            "text": "\t\t\t\tesc_html( $format_array['selector'] )"
          },
          {
            "lineNumber": 251,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 252,
            "text": "\t\t}"
          },
          {
            "lineNumber": 253,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 254,
            "text": "\t\t\t\u003c/select\u003e"
          },
          {
            "lineNumber": 255,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 256,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 257,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 258,
            "text": "\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped"
          },
          {
            "lineNumber": 259,
            "text": "\t\techo $phones_table;"
          },
          {
            "lineNumber": 260,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 261,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 262,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 263,
            "text": "\t}"
          },
          {
            "lineNumber": 264
          },
          {
            "lineNumber": 265,
            "text": "\t/**"
          },
          {
            "lineNumber": 266,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          },
          {
            "lineNumber": 267,
            "text": "\t *"
          },
          {
            "lineNumber": 268,
            "text": "\t * @param  array $new_instance"
          },
          {
            "lineNumber": 269,
            "text": "\t * @param  array $old_instance"
          },
          {
            "lineNumber": 270,
            "text": "\t * @return array The updated array full of settings"
          },
          {
            "lineNumber": 271,
            "text": "\t */"
          },
          {
            "lineNumber": 272,
            "text": "\tpublic function update( $new_instance, $old_instance ) {"
          },
          {
            "lineNumber": 273,
            "text": "\t\t$instance               = array();"
          },
          {
            "lineNumber": 274,
            "text": "\t\t$instance['title']      = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';"
          },
          {
            "lineNumber": 275,
            "text": "\t\t$instance['format']     = ( ! empty( $new_instance['format'] ) ) ? $new_instance['format'] : current( array_keys( $this-\u003eformats() ) );"
          },
          {
            "lineNumber": 276,
            "text": "\t\t$instance['cb_display'] = ( ! empty( $new_instance['cb_display'] ) ) ? $new_instance['cb_display'] : array();"
          },
          {
            "lineNumber": 277,
            "text": "\t\treturn $instance;"
          },
          {
            "lineNumber": 278,
            "text": "\t}"
          },
          {
            "lineNumber": 279,
            "text": "}"
          }
        ],
        "range": {
          "endPosition": {
            "line": 279
          },
          "startPosition": {
            "line": 235
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-phones.php",
        "signatures": {}
      },
      "score": 0.3007030487060547
    },
    {
      "codeBlock": {
        "contents": "\tpublic function form( $instance ) {\n\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();\n\t\t// get all locations.\n\t\t$location_info = get_terms(\n\t\t\tarray(\n\t\t\t\t'taxonomy'   =\u003e 'location',\n\t\t\t\t'fields'     =\u003e 'id=\u003ename',\n\t\t\t\t'hide_empty' =\u003e false,\n\t\t\t)\n\t\t);\n\t\t$phones_table  = '\u003ctable\u003e\u003ctbody\u003e';\n\n\t\t// loop through each location, set up form.\n\t\tforeach ( $location_info as $term_id =\u003e $name ) {\n\t\t\t// Output a checkbox for every phone number in this location.\n\t\t\tfor ( $p = 1; $p \u003c= INVP::LOCATION_MAX_PHONES; $p++ ) {\n\t\t\t\t// Is there a phone number in this slot?\n\t\t\t\t$phone_uid = get_term_meta( $term_id, 'phone_' . $p . '_uid', true );\n\t\t\t\tif ( ! $phone_uid ) {\n\t\t\t\t\t// No, we're done with this location.\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Only do this once per location.\n\t\t\t\tif ( 1 == $p ) {\n\t\t\t\t\t$phones_table .= sprintf( '\u003ctr\u003e\u003ctd colspan=\"3\"\u003e\u003cstrong\u003e%s\u003c/strong\u003e\u003c/td\u003e\u003c/tr\u003e', esc_html( $name ) );\n\t\t\t\t}\n\n\t\t\t\t$number      = get_term_meta( $term_id, 'phone_' . $p . '_number', true );\n\t\t\t\t$description = get_term_meta( $term_id, 'phone_' . $p . '_description', true );\n\t\t\t\t$checkbox_id = $this-\u003eget_field_id( 'cb_display_' . $phone_uid );\n\n\t\t\t\t$cb_display_text = sprintf(\n\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',\n\t\t\t\t\tesc_attr( $checkbox_id ),\n\t\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_display[' . $term_id . '][]' ) ),\n\t\t\t\t\tesc_attr( $phone_uid ),\n\t\t\t\t\tchecked( ( isset( $cb_display[ $term_id ] ) \u0026\u0026 is_array( $cb_display[ $term_id ] ) \u0026\u0026 in_array( $phone_uid, $cb_display[ $term_id ], true ) ), true, false )\n\t\t\t\t);\n\n\t\t\t\t$phones_table .= sprintf(\n\t\t\t\t\t'\u003ctr\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e\u003clabel for=\"%s\"\u003e%s\u003c/label\u003e\u003c/td\u003e\u003ctd\u003e\u003clabel for=\"%s\"\u003e%s\u003c/label\u003e\u003c/td\u003e\u003c/tr\u003e',\n\t\t\t\t\t$cb_display_text,\n\t\t\t\t\tesc_attr( $checkbox_id ),\n\t\t\t\t\tesc_html( $description ),\n\t\t\t\t\tesc_attr( $checkbox_id ),\n\t\t\t\t\tesc_html( $number )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$phones_table .= '\u003c/tbody\u003e\u003c/table\u003e';\n\n\t\t// Widget admin form.\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title (optional):', 'inventory-presser' ); ?\u003e\u003c/label\u003e",
        "detailedLines": [
          {
            "lineNumber": 180,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 181,
            "text": "\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();"
          },
          {
            "lineNumber": 182,
            "text": "\t\t// get all locations."
          },
          {
            "lineNumber": 183,
            "text": "\t\t$location_info = get_terms("
          },
          {
            "lineNumber": 184,
            "text": "\t\t\tarray("
          },
          {
            "lineNumber": 185,
            "text": "\t\t\t\t'taxonomy'   =\u003e 'location',"
          },
          {
            "lineNumber": 186,
            "text": "\t\t\t\t'fields'     =\u003e 'id=\u003ename',"
          },
          {
            "lineNumber": 187,
            "text": "\t\t\t\t'hide_empty' =\u003e false,"
          },
          {
            "lineNumber": 188,
            "text": "\t\t\t)"
          },
          {
            "lineNumber": 189,
            "text": "\t\t);"
          },
          {
            "lineNumber": 190,
            "text": "\t\t$phones_table  = '\u003ctable\u003e\u003ctbody\u003e';"
          },
          {
            "lineNumber": 191
          },
          {
            "lineNumber": 192,
            "text": "\t\t// loop through each location, set up form."
          },
          {
            "lineNumber": 193,
            "text": "\t\tforeach ( $location_info as $term_id =\u003e $name ) {"
          },
          {
            "lineNumber": 194,
            "text": "\t\t\t// Output a checkbox for every phone number in this location."
          },
          {
            "lineNumber": 195,
            "text": "\t\t\tfor ( $p = 1; $p \u003c= INVP::LOCATION_MAX_PHONES; $p++ ) {"
          },
          {
            "lineNumber": 196,
            "text": "\t\t\t\t// Is there a phone number in this slot?"
          },
          {
            "lineNumber": 197,
            "text": "\t\t\t\t$phone_uid = get_term_meta( $term_id, 'phone_' . $p . '_uid', true );"
          },
          {
            "lineNumber": 198,
            "text": "\t\t\t\tif ( ! $phone_uid ) {"
          },
          {
            "lineNumber": 199,
            "text": "\t\t\t\t\t// No, we're done with this location."
          },
          {
            "lineNumber": 200,
            "text": "\t\t\t\t\tbreak;"
          },
          {
            "lineNumber": 201,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 202
          },
          {
            "lineNumber": 203,
            "text": "\t\t\t\t// Only do this once per location."
          },
          {
            "lineNumber": 204,
            "text": "\t\t\t\tif ( 1 == $p ) {"
          },
          {
            "lineNumber": 205,
            "text": "\t\t\t\t\t$phones_table .= sprintf( '\u003ctr\u003e\u003ctd colspan=\"3\"\u003e\u003cstrong\u003e%s\u003c/strong\u003e\u003c/td\u003e\u003c/tr\u003e', esc_html( $name ) );"
          },
          {
            "lineNumber": 206,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 207
          },
          {
            "lineNumber": 208,
            "text": "\t\t\t\t$number      = get_term_meta( $term_id, 'phone_' . $p . '_number', true );"
          },
          {
            "lineNumber": 209,
            "text": "\t\t\t\t$description = get_term_meta( $term_id, 'phone_' . $p . '_description', true );"
          },
          {
            "lineNumber": 210,
            "text": "\t\t\t\t$checkbox_id = $this-\u003eget_field_id( 'cb_display_' . $phone_uid );"
          },
          {
            "lineNumber": 211
          },
          {
            "lineNumber": 212,
            "text": "\t\t\t\t$cb_display_text = sprintf("
          },
          {
            "lineNumber": 213,
            "text": "\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',"
          },
          {
            "lineNumber": 214,
            "text": "\t\t\t\t\tesc_attr( $checkbox_id ),"
          },
          {
            "lineNumber": 215,
            "text": "\t\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_display[' . $term_id . '][]' ) ),"
          },
          {
            "lineNumber": 216,
            "text": "\t\t\t\t\tesc_attr( $phone_uid ),"
          },
          {
            "lineNumber": 217,
            "text": "\t\t\t\t\tchecked( ( isset( $cb_display[ $term_id ] ) \u0026\u0026 is_array( $cb_display[ $term_id ] ) \u0026\u0026 in_array( $phone_uid, $cb_display[ $term_id ], true ) ), true, false )"
          },
          {
            "lineNumber": 218,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 219
          },
          {
            "lineNumber": 220,
            "text": "\t\t\t\t$phones_table .= sprintf("
          },
          {
            "lineNumber": 221,
            "text": "\t\t\t\t\t'\u003ctr\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e\u003clabel for=\"%s\"\u003e%s\u003c/label\u003e\u003c/td\u003e\u003ctd\u003e\u003clabel for=\"%s\"\u003e%s\u003c/label\u003e\u003c/td\u003e\u003c/tr\u003e',"
          },
          {
            "lineNumber": 222,
            "text": "\t\t\t\t\t$cb_display_text,"
          },
          {
            "lineNumber": 223,
            "text": "\t\t\t\t\tesc_attr( $checkbox_id ),"
          },
          {
            "lineNumber": 224,
            "text": "\t\t\t\t\tesc_html( $description ),"
          },
          {
            "lineNumber": 225,
            "text": "\t\t\t\t\tesc_attr( $checkbox_id ),"
          },
          {
            "lineNumber": 226,
            "text": "\t\t\t\t\tesc_html( $number )"
          },
          {
            "lineNumber": 227,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 228,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 229,
            "text": "\t\t}"
          },
          {
            "lineNumber": 230
          },
          {
            "lineNumber": 231,
            "text": "\t\t$phones_table .= '\u003c/tbody\u003e\u003c/table\u003e';"
          },
          {
            "lineNumber": 232
          },
          {
            "lineNumber": 233,
            "text": "\t\t// Widget admin form."
          },
          {
            "lineNumber": 234,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';"
          },
          {
            "lineNumber": 235,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 236,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 237,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title (optional):', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          }
        ],
        "range": {
          "endPosition": {
            "line": 237
          },
          "startPosition": {
            "line": 179
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-phones.php",
        "signatures": {}
      },
      "score": 0.2988356351852417
    },
    {
      "codeBlock": {
        "contents": "\tpublic function form( $instance ) {\n\t\t$title = ( isset( $instance['title'] ) ? $instance['title'] : '' );\n\t\t?\u003e\n\t\t\u003cp\u003e\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\u003c/p\u003e\n\t\t\u003c?php\n\t\t$args                   = array(\n\t\t\t'public' =\u003e true,\n\t\t);\n\t\t$already_turned_on_keys = array();\n\t\tif ( isset( $instance['post-meta-keys'] ) ) {\n\t\t\t$already_turned_on_keys = explode( '|', $instance['post-meta-keys'] );\n\t\t}\n\n\t\techo '\u003cp\u003e' . esc_html__( 'Which fields should users be allowed to use as sort fields?', 'inventory-presser' )\n\t\t\t. '\u003c/p\u003e\u003cdl\u003e';\n\n\t\tforeach ( $this-\u003eget_post_meta_keys_and_labels( $instance ) as $key =\u003e $label ) {\n\t\t\t// output checkbox for each one.\n\t\t\techo '\u003cdt\u003e';\n\t\t\t$title = 'Allow users to order by ' . $key; // title attribute for checkbox and label.\n\t\t\techo '\u003cinput type=\"checkbox\" id=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-key-' . $key ) )\n\t\t\t. '\" name=\"obpm-key-' . esc_attr( $key ) . '\"'\n\t\t\t. checked( in_array( $key, $already_turned_on_keys, true ), true, false )\n\t\t\t. ' title=\"' . esc_attr( $title ) . '\"/\u003e'\n\t\t\t. '\u003clabel for=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-key-' . $key ) )\n\t\t\t. '\" title=\"' . esc_attr( $title ) . '\"\u003e'\n\t\t\t. esc_html( $this-\u003eprettify_meta_key( $key ) ) . '\u003c/label\u003e'\n\t\t\t. '\u003c/dt\u003e' // and a text box for a label.\n\t\t\t. '\u003cdd\u003e'\n\t\t\t. '\u003clabel for=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-label-' . $key ) )\n\t\t\t. '\"\u003eLabel\u003c/label\u003e '\n\t\t\t. '\u003cinput type=\"text\" id=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-label-' . $key ) ) . '\"'\n\t\t\t. ' name=\"obpm-label-' . esc_attr( $key ) . '\" '\n\t\t\t. 'value=\"' . esc_attr( $label ) . '\" title=\"Label for '\n\t\t\t. esc_attr( $key ) . '\" /\u003e\u003c/dd\u003e';\n\t\t}\n\t\techo '\u003c/dl\u003e';\n\t}\n\n\t/**\n\t * Produces an associative array where the post meta keys are the keys",
        "detailedLines": [
          {
            "lineNumber": 58,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 59,
            "text": "\t\t$title = ( isset( $instance['title'] ) ? $instance['title'] : '' );"
          },
          {
            "lineNumber": 60,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 61,
            "text": "\t\t\u003cp\u003e\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 62,
            "text": "\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\u003c/p\u003e"
          },
          {
            "lineNumber": 63,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 64,
            "text": "\t\t$args                   = array("
          },
          {
            "lineNumber": 65,
            "text": "\t\t\t'public' =\u003e true,"
          },
          {
            "lineNumber": 66,
            "text": "\t\t);"
          },
          {
            "lineNumber": 67,
            "text": "\t\t$already_turned_on_keys = array();"
          },
          {
            "lineNumber": 68,
            "text": "\t\tif ( isset( $instance['post-meta-keys'] ) ) {"
          },
          {
            "lineNumber": 69,
            "text": "\t\t\t$already_turned_on_keys = explode( '|', $instance['post-meta-keys'] );"
          },
          {
            "lineNumber": 70,
            "text": "\t\t}"
          },
          {
            "lineNumber": 71
          },
          {
            "lineNumber": 72,
            "text": "\t\techo '\u003cp\u003e' . esc_html__( 'Which fields should users be allowed to use as sort fields?', 'inventory-presser' )"
          },
          {
            "lineNumber": 73,
            "text": "\t\t\t. '\u003c/p\u003e\u003cdl\u003e';"
          },
          {
            "lineNumber": 74
          },
          {
            "lineNumber": 75,
            "text": "\t\tforeach ( $this-\u003eget_post_meta_keys_and_labels( $instance ) as $key =\u003e $label ) {"
          },
          {
            "lineNumber": 76,
            "text": "\t\t\t// output checkbox for each one."
          },
          {
            "lineNumber": 77,
            "text": "\t\t\techo '\u003cdt\u003e';"
          },
          {
            "lineNumber": 78,
            "text": "\t\t\t$title = 'Allow users to order by ' . $key; // title attribute for checkbox and label."
          },
          {
            "lineNumber": 79,
            "text": "\t\t\techo '\u003cinput type=\"checkbox\" id=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-key-' . $key ) )"
          },
          {
            "lineNumber": 80,
            "text": "\t\t\t. '\" name=\"obpm-key-' . esc_attr( $key ) . '\"'"
          },
          {
            "lineNumber": 81,
            "text": "\t\t\t. checked( in_array( $key, $already_turned_on_keys, true ), true, false )"
          },
          {
            "lineNumber": 82,
            "text": "\t\t\t. ' title=\"' . esc_attr( $title ) . '\"/\u003e'"
          },
          {
            "lineNumber": 83,
            "text": "\t\t\t. '\u003clabel for=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-key-' . $key ) )"
          },
          {
            "lineNumber": 84,
            "text": "\t\t\t. '\" title=\"' . esc_attr( $title ) . '\"\u003e'"
          },
          {
            "lineNumber": 85,
            "text": "\t\t\t. esc_html( $this-\u003eprettify_meta_key( $key ) ) . '\u003c/label\u003e'"
          },
          {
            "lineNumber": 86,
            "text": "\t\t\t. '\u003c/dt\u003e' // and a text box for a label."
          },
          {
            "lineNumber": 87,
            "text": "\t\t\t. '\u003cdd\u003e'"
          },
          {
            "lineNumber": 88,
            "text": "\t\t\t. '\u003clabel for=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-label-' . $key ) )"
          },
          {
            "lineNumber": 89,
            "text": "\t\t\t. '\"\u003eLabel\u003c/label\u003e '"
          },
          {
            "lineNumber": 90,
            "text": "\t\t\t. '\u003cinput type=\"text\" id=\"' . esc_attr( $this-\u003eget_field_id( 'obpm-label-' . $key ) ) . '\"'"
          },
          {
            "lineNumber": 91,
            "text": "\t\t\t. ' name=\"obpm-label-' . esc_attr( $key ) . '\" '"
          },
          {
            "lineNumber": 92,
            "text": "\t\t\t. 'value=\"' . esc_attr( $label ) . '\" title=\"Label for '"
          },
          {
            "lineNumber": 93,
            "text": "\t\t\t. esc_attr( $key ) . '\" /\u003e\u003c/dd\u003e';"
          },
          {
            "lineNumber": 94,
            "text": "\t\t}"
          },
          {
            "lineNumber": 95,
            "text": "\t\techo '\u003c/dl\u003e';"
          },
          {
            "lineNumber": 96,
            "text": "\t}"
          },
          {
            "lineNumber": 97
          },
          {
            "lineNumber": 98,
            "text": "\t/**"
          },
          {
            "lineNumber": 99,
            "text": "\t * Produces an associative array where the post meta keys are the keys"
          }
        ],
        "range": {
          "endPosition": {
            "line": 99
          },
          "startPosition": {
            "line": 57
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-order-by.php",
        "signatures": {}
      },
      "score": 0.29781436920166016
    },
    {
      "codeBlock": {
        "contents": "\t\tif ( isset( $_GET['max_price'] ) ) {\n\t\t\tprintf(\n\t\t\t\t'\u003cdiv\u003e\u003ca href=\"%s\"\u003e%s $%s %s\u003c/a\u003e\u003c/div\u003e',\n\t\t\t\tesc_url( remove_query_arg( 'max_price' ) ),\n\t\t\t\tesc_html__( 'Remove', 'inventory-presser' ),\n\t\t\t\tnumber_format( (int) $_GET['max_price'], 0, '.', ',' ),\n\t\t\t\tesc_html__( 'Shop by Price', 'inventory-presser' )\n\t\t\t);\n\t\t}\n\n\t\techo '\u003c/div\u003e' . wp_kses_post( $args['after_widget'] ?? '' );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title              = isset( $instance['title'] ) ? $instance['title'] : __( 'Shop by Price', 'inventory-presser' );\n\t\t$prices             = ( isset( $instance['prices'] ) \u0026\u0026 is_array( $instance['prices'] ) ) ? implode( ',', $instance['prices'] ) : implode( ',', $this-\u003eprice_defaults );\n\t\t$display_type_slugs = array_keys( $this-\u003edisplay_types() );\n\t\t$display_type       = isset( $instance['display_type'] ) ? $instance['display_type'] : $display_type_slugs[0];\n\t\t$orientation_slugs  = array_keys( $this-\u003eorientations() );\n\t\t$orientation        = isset( $instance['orientation'] ) ? $instance['orientation'] : $orientation_slugs[0];\n\n\t\t// Widget admin form.\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'prices' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Price Points (separated by commas)', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'prices' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'prices' ) ); ?\u003e\"\u003e\u003c?php echo esc_html( $prices ); ?\u003e\u003c/textarea\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'display_type' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Display Format:', 'inventory-presser' ); ?\u003e\u003c/label\u003e",
        "detailedLines": [
          {
            "lineNumber": 138,
            "text": "\t\tif ( isset( $_GET['max_price'] ) ) {"
          },
          {
            "lineNumber": 139,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 140,
            "text": "\t\t\t\t'\u003cdiv\u003e\u003ca href=\"%s\"\u003e%s $%s %s\u003c/a\u003e\u003c/div\u003e',"
          },
          {
            "lineNumber": 141,
            "text": "\t\t\t\tesc_url( remove_query_arg( 'max_price' ) ),"
          },
          {
            "lineNumber": 142,
            "text": "\t\t\t\tesc_html__( 'Remove', 'inventory-presser' ),"
          },
          {
            "lineNumber": 143,
            "text": "\t\t\t\tnumber_format( (int) $_GET['max_price'], 0, '.', ',' ),"
          },
          {
            "lineNumber": 144,
            "text": "\t\t\t\tesc_html__( 'Shop by Price', 'inventory-presser' )"
          },
          {
            "lineNumber": 145,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 146,
            "text": "\t\t}"
          },
          {
            "lineNumber": 147
          },
          {
            "lineNumber": 148,
            "text": "\t\techo '\u003c/div\u003e' . wp_kses_post( $args['after_widget'] ?? '' );"
          },
          {
            "lineNumber": 149,
            "text": "\t}"
          },
          {
            "lineNumber": 150
          },
          {
            "lineNumber": 151,
            "text": "\t/**"
          },
          {
            "lineNumber": 152,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 153,
            "text": "\t *"
          },
          {
            "lineNumber": 154,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 155,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 156,
            "text": "\t */"
          },
          {
            "lineNumber": 157,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 158
          },
          {
            "lineNumber": 159,
            "text": "\t\t$title              = isset( $instance['title'] ) ? $instance['title'] : __( 'Shop by Price', 'inventory-presser' );"
          },
          {
            "lineNumber": 160,
            "text": "\t\t$prices             = ( isset( $instance['prices'] ) \u0026\u0026 is_array( $instance['prices'] ) ) ? implode( ',', $instance['prices'] ) : implode( ',', $this-\u003eprice_defaults );"
          },
          {
            "lineNumber": 161,
            "text": "\t\t$display_type_slugs = array_keys( $this-\u003edisplay_types() );"
          },
          {
            "lineNumber": 162,
            "text": "\t\t$display_type       = isset( $instance['display_type'] ) ? $instance['display_type'] : $display_type_slugs[0];"
          },
          {
            "lineNumber": 163,
            "text": "\t\t$orientation_slugs  = array_keys( $this-\u003eorientations() );"
          },
          {
            "lineNumber": 164,
            "text": "\t\t$orientation        = isset( $instance['orientation'] ) ? $instance['orientation'] : $orientation_slugs[0];"
          },
          {
            "lineNumber": 165
          },
          {
            "lineNumber": 166,
            "text": "\t\t// Widget admin form."
          },
          {
            "lineNumber": 167,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 168,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 169,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 170,
            "text": "\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 171,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 172,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 173,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'prices' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Price Points (separated by commas)', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 174,
            "text": "\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'prices' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'prices' ) ); ?\u003e\"\u003e\u003c?php echo esc_html( $prices ); ?\u003e\u003c/textarea\u003e"
          },
          {
            "lineNumber": 175,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 176,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 177,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'display_type' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Display Format:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          }
        ],
        "range": {
          "endPosition": {
            "line": 177
          },
          "startPosition": {
            "line": 137
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-maximum-price-filter.php",
        "signatures": {}
      },
      "score": 0.291861891746521
    },
    {
      "codeBlock": {
        "contents": "\tpublic function form( $instance ) {\n\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();\n\t\t$cb_title   = isset( $instance['cb_title'] ) ? $instance['cb_title'] : array();\n\n\t\t// get all locations.\n\t\t$location_info = get_terms(\n\t\t\tarray(\n\t\t\t\t'taxonomy'   =\u003e 'location',\n\t\t\t\t'fields'     =\u003e 'id=\u003ename',\n\t\t\t\t'hide_empty' =\u003e false,\n\t\t\t)\n\t\t);\n\n\t\t$hours_table = '\u003ctable\u003e\u003ctbody\u003e';\n\n\t\t// loop through each location, set up form.\n\t\tforeach ( $location_info as $term_id =\u003e $name ) {\n\t\t\t// Output a checkbox for every set of hours in this location.\n\t\t\tfor ( $h = 1; $h \u003c= INVP::LOCATION_MAX_HOURS; $h++ ) {\n\t\t\t\t// Are there hours in this slot?\n\t\t\t\t$hours_uid = get_term_meta( $term_id, 'hours_' . $h . '_uid', true );\n\t\t\t\tif ( ! $hours_uid ) {\n\t\t\t\t\t// No, we're done with this location.\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Only do this once per location.\n\t\t\t\tif ( 1 === $h ) {\n\t\t\t\t\t$hours_table .= sprintf(\n\t\t\t\t\t\t'\u003ctr\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003c/tr\u003e',\n\t\t\t\t\t\tesc_html( $name ),\n\t\t\t\t\t\tesc_html__( 'Display', 'inventory-presser' ),\n\t\t\t\t\t\tesc_html__( 'Title', 'inventory-presser' )\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t$title = get_term_meta( $term_id, 'hours_' . $h . '_title', true );\n\t\t\t\tif ( empty( $title ) ) {\n\t\t\t\t\t$title = __( 'No title entered', 'inventory-presser' );\n\t\t\t\t}\n\n\t\t\t\t$cb_display_text = sprintf(\n\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',\n\t\t\t\t\tesc_attr( $this-\u003eget_field_id( 'cb_display_' . $hours_uid ) ),\n\t\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_display[' . $term_id . '][]' ) ),\n\t\t\t\t\tesc_attr( $hours_uid ),\n\t\t\t\t\tchecked( true, ( isset( $cb_display[ $term_id ] ) \u0026\u0026 is_array( $cb_display[ $term_id ] ) \u0026\u0026 in_array( $hours_uid, $cb_display[ $term_id ], true ) ), false )\n\t\t\t\t);\n\n\t\t\t\t$cb_title_text = sprintf(\n\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',",
        "detailedLines": [
          {
            "lineNumber": 233,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 234,
            "text": "\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();"
          },
          {
            "lineNumber": 235,
            "text": "\t\t$cb_title   = isset( $instance['cb_title'] ) ? $instance['cb_title'] : array();"
          },
          {
            "lineNumber": 236
          },
          {
            "lineNumber": 237,
            "text": "\t\t// get all locations."
          },
          {
            "lineNumber": 238,
            "text": "\t\t$location_info = get_terms("
          },
          {
            "lineNumber": 239,
            "text": "\t\t\tarray("
          },
          {
            "lineNumber": 240,
            "text": "\t\t\t\t'taxonomy'   =\u003e 'location',"
          },
          {
            "lineNumber": 241,
            "text": "\t\t\t\t'fields'     =\u003e 'id=\u003ename',"
          },
          {
            "lineNumber": 242,
            "text": "\t\t\t\t'hide_empty' =\u003e false,"
          },
          {
            "lineNumber": 243,
            "text": "\t\t\t)"
          },
          {
            "lineNumber": 244,
            "text": "\t\t);"
          },
          {
            "lineNumber": 245
          },
          {
            "lineNumber": 246,
            "text": "\t\t$hours_table = '\u003ctable\u003e\u003ctbody\u003e';"
          },
          {
            "lineNumber": 247
          },
          {
            "lineNumber": 248,
            "text": "\t\t// loop through each location, set up form."
          },
          {
            "lineNumber": 249,
            "text": "\t\tforeach ( $location_info as $term_id =\u003e $name ) {"
          },
          {
            "lineNumber": 250,
            "text": "\t\t\t// Output a checkbox for every set of hours in this location."
          },
          {
            "lineNumber": 251,
            "text": "\t\t\tfor ( $h = 1; $h \u003c= INVP::LOCATION_MAX_HOURS; $h++ ) {"
          },
          {
            "lineNumber": 252,
            "text": "\t\t\t\t// Are there hours in this slot?"
          },
          {
            "lineNumber": 253,
            "text": "\t\t\t\t$hours_uid = get_term_meta( $term_id, 'hours_' . $h . '_uid', true );"
          },
          {
            "lineNumber": 254,
            "text": "\t\t\t\tif ( ! $hours_uid ) {"
          },
          {
            "lineNumber": 255,
            "text": "\t\t\t\t\t// No, we're done with this location."
          },
          {
            "lineNumber": 256,
            "text": "\t\t\t\t\tbreak;"
          },
          {
            "lineNumber": 257,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 258
          },
          {
            "lineNumber": 259,
            "text": "\t\t\t\t// Only do this once per location."
          },
          {
            "lineNumber": 260,
            "text": "\t\t\t\tif ( 1 === $h ) {"
          },
          {
            "lineNumber": 261,
            "text": "\t\t\t\t\t$hours_table .= sprintf("
          },
          {
            "lineNumber": 262,
            "text": "\t\t\t\t\t\t'\u003ctr\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003c/tr\u003e',"
          },
          {
            "lineNumber": 263,
            "text": "\t\t\t\t\t\tesc_html( $name ),"
          },
          {
            "lineNumber": 264,
            "text": "\t\t\t\t\t\tesc_html__( 'Display', 'inventory-presser' ),"
          },
          {
            "lineNumber": 265,
            "text": "\t\t\t\t\t\tesc_html__( 'Title', 'inventory-presser' )"
          },
          {
            "lineNumber": 266,
            "text": "\t\t\t\t\t);"
          },
          {
            "lineNumber": 267,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 268
          },
          {
            "lineNumber": 269,
            "text": "\t\t\t\t$title = get_term_meta( $term_id, 'hours_' . $h . '_title', true );"
          },
          {
            "lineNumber": 270,
            "text": "\t\t\t\tif ( empty( $title ) ) {"
          },
          {
            "lineNumber": 271,
            "text": "\t\t\t\t\t$title = __( 'No title entered', 'inventory-presser' );"
          },
          {
            "lineNumber": 272,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 273
          },
          {
            "lineNumber": 274,
            "text": "\t\t\t\t$cb_display_text = sprintf("
          },
          {
            "lineNumber": 275,
            "text": "\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',"
          },
          {
            "lineNumber": 276,
            "text": "\t\t\t\t\tesc_attr( $this-\u003eget_field_id( 'cb_display_' . $hours_uid ) ),"
          },
          {
            "lineNumber": 277,
            "text": "\t\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_display[' . $term_id . '][]' ) ),"
          },
          {
            "lineNumber": 278,
            "text": "\t\t\t\t\tesc_attr( $hours_uid ),"
          },
          {
            "lineNumber": 279,
            "text": "\t\t\t\t\tchecked( true, ( isset( $cb_display[ $term_id ] ) \u0026\u0026 is_array( $cb_display[ $term_id ] ) \u0026\u0026 in_array( $hours_uid, $cb_display[ $term_id ], true ) ), false )"
          },
          {
            "lineNumber": 280,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 281
          },
          {
            "lineNumber": 282,
            "text": "\t\t\t\t$cb_title_text = sprintf("
          },
          {
            "lineNumber": 283,
            "text": "\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',"
          }
        ],
        "range": {
          "endPosition": {
            "line": 283
          },
          "startPosition": {
            "line": 232
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-hours.php",
        "signatures": {}
      },
      "score": 0.2913283109664917
    },
    {
      "codeBlock": {
        "contents": "\tpublic function form( $instance ) {\n\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';\n\n\t\t// get all locations.\n\t\t$location_terms = get_terms(\n\t\t\tarray(\n\t\t\t\t'taxonomy'   =\u003e 'location',\n\t\t\t\t'hide_empty' =\u003e false,\n\t\t\t)\n\t\t);\n\n\t\t// set.\n\t\tif ( isset( $instance['cb_display'] ) ) {\n\t\t\t$cb_display = $instance['cb_display'];\n\t\t} else {\n\t\t\t// majority of dealers will have one address, let's precheck it for them.\n\t\t\tif ( count( $location_terms ) == 1 ) {\n\t\t\t\t$cb_display = array( $location_terms[0]-\u003eterm_id );\n\t\t\t} else {\n\t\t\t\t$cb_display = array();\n\t\t\t}\n\t\t}\n\n\t\t$address_table = '\u003ctable\u003e\u003ctbody\u003e'\n\t\t\t. '\u003ctr\u003e\u003ctd colspan=\"2\"\u003e'\n\t\t\t. esc_html__( 'Select Addresses to Display', 'inventory-presser' )\n\t\t\t. '\u003c/td\u003e\u003c/tr\u003e';\n\n\t\t// loop through each location, set up form.\n\t\tforeach ( $location_terms as $index =\u003e $term_object ) {\n\t\t\t$address_checkbox = sprintf(\n\t\t\t\t'\u003cinput id=\"%s\" name=\"%s\" value=\"%s\" type=\"checkbox\"%s\u003e',\n\t\t\t\tesc_attr( $this-\u003eget_field_id( 'cb_title' ) ),\n\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_display[]' ) ),\n\t\t\t\tesc_attr( $term_object-\u003eterm_id ),\n\t\t\t\tchecked( ( in_array( $term_object-\u003eterm_id, $cb_display ) ), true, false )\n\t\t\t);\n\t\t\t$address_table   .= sprintf( '\u003ctr\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003c/tr\u003e', $address_checkbox, wp_kses_post( nl2br( $term_object-\u003edescription ) ) );\n\t\t}\n\n\t\t$address_table .= '\u003c/tbody\u003e\u003c/table\u003e';\n\n\t\t// Widget admin form.\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003cinput type=\"checkbox\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'cb_single_line' ) ); ?\u003e\" value=\"true\"\u003c?php checked( ( isset( $instance['cb_single_line'] ) \u0026\u0026 'true' === $instance['cb_single_line'] ) ); ?\u003e\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Single Line Display', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003c?php\n\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped",
        "detailedLines": [
          {
            "lineNumber": 93,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 94
          },
          {
            "lineNumber": 95,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';"
          },
          {
            "lineNumber": 96
          },
          {
            "lineNumber": 97,
            "text": "\t\t// get all locations."
          },
          {
            "lineNumber": 98,
            "text": "\t\t$location_terms = get_terms("
          },
          {
            "lineNumber": 99,
            "text": "\t\t\tarray("
          },
          {
            "lineNumber": 100,
            "text": "\t\t\t\t'taxonomy'   =\u003e 'location',"
          },
          {
            "lineNumber": 101,
            "text": "\t\t\t\t'hide_empty' =\u003e false,"
          },
          {
            "lineNumber": 102,
            "text": "\t\t\t)"
          },
          {
            "lineNumber": 103,
            "text": "\t\t);"
          },
          {
            "lineNumber": 104
          },
          {
            "lineNumber": 105,
            "text": "\t\t// set."
          },
          {
            "lineNumber": 106,
            "text": "\t\tif ( isset( $instance['cb_display'] ) ) {"
          },
          {
            "lineNumber": 107,
            "text": "\t\t\t$cb_display = $instance['cb_display'];"
          },
          {
            "lineNumber": 108,
            "text": "\t\t} else {"
          },
          {
            "lineNumber": 109,
            "text": "\t\t\t// majority of dealers will have one address, let's precheck it for them."
          },
          {
            "lineNumber": 110,
            "text": "\t\t\tif ( count( $location_terms ) == 1 ) {"
          },
          {
            "lineNumber": 111,
            "text": "\t\t\t\t$cb_display = array( $location_terms[0]-\u003eterm_id );"
          },
          {
            "lineNumber": 112,
            "text": "\t\t\t} else {"
          },
          {
            "lineNumber": 113,
            "text": "\t\t\t\t$cb_display = array();"
          },
          {
            "lineNumber": 114,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 115,
            "text": "\t\t}"
          },
          {
            "lineNumber": 116
          },
          {
            "lineNumber": 117,
            "text": "\t\t$address_table = '\u003ctable\u003e\u003ctbody\u003e'"
          },
          {
            "lineNumber": 118,
            "text": "\t\t\t. '\u003ctr\u003e\u003ctd colspan=\"2\"\u003e'"
          },
          {
            "lineNumber": 119,
            "text": "\t\t\t. esc_html__( 'Select Addresses to Display', 'inventory-presser' )"
          },
          {
            "lineNumber": 120,
            "text": "\t\t\t. '\u003c/td\u003e\u003c/tr\u003e';"
          },
          {
            "lineNumber": 121
          },
          {
            "lineNumber": 122,
            "text": "\t\t// loop through each location, set up form."
          },
          {
            "lineNumber": 123,
            "text": "\t\tforeach ( $location_terms as $index =\u003e $term_object ) {"
          },
          {
            "lineNumber": 124,
            "text": "\t\t\t$address_checkbox = sprintf("
          },
          {
            "lineNumber": 125,
            "text": "\t\t\t\t'\u003cinput id=\"%s\" name=\"%s\" value=\"%s\" type=\"checkbox\"%s\u003e',"
          },
          {
            "lineNumber": 126,
            "text": "\t\t\t\tesc_attr( $this-\u003eget_field_id( 'cb_title' ) ),"
          },
          {
            "lineNumber": 127,
            "text": "\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_display[]' ) ),"
          },
          {
            "lineNumber": 128,
            "text": "\t\t\t\tesc_attr( $term_object-\u003eterm_id ),"
          },
          {
            "lineNumber": 129,
            "text": "\t\t\t\tchecked( ( in_array( $term_object-\u003eterm_id, $cb_display ) ), true, false )"
          },
          {
            "lineNumber": 130,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 131,
            "text": "\t\t\t$address_table   .= sprintf( '\u003ctr\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003c/tr\u003e', $address_checkbox, wp_kses_post( nl2br( $term_object-\u003edescription ) ) );"
          },
          {
            "lineNumber": 132,
            "text": "\t\t}"
          },
          {
            "lineNumber": 133
          },
          {
            "lineNumber": 134,
            "text": "\t\t$address_table .= '\u003c/tbody\u003e\u003c/table\u003e';"
          },
          {
            "lineNumber": 135
          },
          {
            "lineNumber": 136,
            "text": "\t\t// Widget admin form."
          },
          {
            "lineNumber": 137,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 138,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 139,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 140,
            "text": "\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 141,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 142,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 143,
            "text": "\t\t\u003cinput type=\"checkbox\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'cb_single_line' ) ); ?\u003e\" value=\"true\"\u003c?php checked( ( isset( $instance['cb_single_line'] ) \u0026\u0026 'true' === $instance['cb_single_line'] ) ); ?\u003e\u003e"
          },
          {
            "lineNumber": 144,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Single Line Display', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 145,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 146,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 147,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 148,
            "text": "\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped"
          }
        ],
        "range": {
          "endPosition": {
            "line": 148
          },
          "startPosition": {
            "line": 92
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-address.php",
        "signatures": {}
      },
      "score": 0.2825407385826111
    },
    {
      "codeBlock": {
        "contents": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Single Line Display', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003c?php\n\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\techo $address_table;\n\t\t?\u003e\n\t\t\u003c/p\u003e\n\t\t\u003c?php\n\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.\n\t *\n\t * @param  array $new_instance\n\t * @param  array $old_instance\n\t * @return array The updated array full of settings\n\t */\n\tpublic function update( $new_instance, $old_instance ) {\n\t\t$instance                   = array();\n\t\t$instance['title']          = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';\n\t\t$instance['cb_display']     = ( ! empty( $new_instance['cb_display'] ) ) ? $new_instance['cb_display'] : array();\n\t\t$instance['cb_single_line'] = ( ! empty( $new_instance['cb_single_line'] ) ) ? $new_instance['cb_single_line'] : '';\n\t\treturn $instance;\n\t}\n}",
        "detailedLines": [
          {
            "lineNumber": 144,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_single_line' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Single Line Display', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 145,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 146,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 147,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 148,
            "text": "\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped"
          },
          {
            "lineNumber": 149,
            "text": "\t\techo $address_table;"
          },
          {
            "lineNumber": 150,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 151,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 152,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 153,
            "text": "\t}"
          },
          {
            "lineNumber": 154
          },
          {
            "lineNumber": 155,
            "text": "\t/**"
          },
          {
            "lineNumber": 156,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          },
          {
            "lineNumber": 157,
            "text": "\t *"
          },
          {
            "lineNumber": 158,
            "text": "\t * @param  array $new_instance"
          },
          {
            "lineNumber": 159,
            "text": "\t * @param  array $old_instance"
          },
          {
            "lineNumber": 160,
            "text": "\t * @return array The updated array full of settings"
          },
          {
            "lineNumber": 161,
            "text": "\t */"
          },
          {
            "lineNumber": 162,
            "text": "\tpublic function update( $new_instance, $old_instance ) {"
          },
          {
            "lineNumber": 163,
            "text": "\t\t$instance                   = array();"
          },
          {
            "lineNumber": 164,
            "text": "\t\t$instance['title']          = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';"
          },
          {
            "lineNumber": 165,
            "text": "\t\t$instance['cb_display']     = ( ! empty( $new_instance['cb_display'] ) ) ? $new_instance['cb_display'] : array();"
          },
          {
            "lineNumber": 166,
            "text": "\t\t$instance['cb_single_line'] = ( ! empty( $new_instance['cb_single_line'] ) ) ? $new_instance['cb_single_line'] : '';"
          },
          {
            "lineNumber": 167,
            "text": "\t\treturn $instance;"
          },
          {
            "lineNumber": 168,
            "text": "\t}"
          },
          {
            "lineNumber": 169,
            "text": "}"
          }
        ],
        "range": {
          "endPosition": {
            "line": 169
          },
          "startPosition": {
            "line": 143
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-address.php",
        "signatures": {}
      },
      "score": 0.27548515796661377
    },
    {
      "codeBlock": {
        "contents": "\t\t\t\t\tif ( $echo_row ) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Highlight this row if it's today and we have not\n\t\t\t\t\t\t * passed closing time, or highlight it if we're\n\t\t\t\t\t\t * not open today or closed for the day and $i is\n\t\t\t\t\t\t * $next_open_day\n\t\t\t\t\t\t */\n\t\t\t\t\t\t$current_row_class = '';\n\t\t\t\t\t\tif ( ! $highlighted_a_row\n\t\t\t\t\t\t\t\u0026\u0026 ( ( ! empty( $days[ $i ] )\n\t\t\t\t\t\t\t\u0026\u0026 $days[ $i ]-\u003eopen_right_now()\n\t\t\t\t\t\t\t\u0026\u0026 $current_weekday === $i ) // if it's today and we're open, highlight the row.\n\t\t\t\t\t\t\t|| ( $current_weekday !== $i\n\t\t\t\t\t\t\t\u0026\u0026 ! empty( $next_open_day )\n\t\t\t\t\t\t\t\u0026\u0026 $next_open_day-\u003eweekday - 1 === $i ) // it's not today, it's the next open day though.\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$current_row_class = ' class=\"day-highlight\"';\n\t\t\t\t\t\t\t$highlighted_a_row = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tprintf(\n\t\t\t\t\t\t\t'\u003ctr%s\u003e\u003cth scope=\"row\"\u003e%s\u003c/th\u003e',\n\t\t\t\t\t\t\t$current_row_class,\n\t\t\t\t\t\t\tesc_html( array_values( INVP::weekdays() )[ $i ] )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( 1 === $open_by_appt \u0026\u0026 ! empty( $open ) \u0026\u0026 ! empty( $close ) ) {\n\t\t\t\t\t\t\tprintf(\n\t\t\t\t\t\t\t\t'\u003ctd colspan=\"2\"\u003e%s - %s \u0026amp; %s\u003c/td\u003e',\n\t\t\t\t\t\t\t\tesc_html( $open ),\n\t\t\t\t\t\t\t\tesc_html( $close ),\n\t\t\t\t\t\t\t\tesc_html__( 'Appointment', 'inventory-presser' )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} elseif ( 1 === $open_by_appt ) {\n\t\t\t\t\t\t\tprintf( '\u003ctd colspan=\"2\"\u003e%s\u003c/td\u003e', esc_html__( 'Appointment Only', 'inventory-presser' ) );\n\t\t\t\t\t\t} elseif ( ! empty( $open ) \u0026\u0026 ! empty( $close ) ) {\n\t\t\t\t\t\t\tprintf(\n\t\t\t\t\t\t\t\t'\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e',\n\t\t\t\t\t\t\t\tesc_html( $open ),\n\t\t\t\t\t\t\t\tesc_html( $close )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprintf( '\u003ctd colspan=\"2\"\u003e%s\u003c/td\u003e', esc_html__( 'Closed', 'inventory-presser' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '\u003c/tr\u003e';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo '\u003c/tbody\u003e\u003c/table\u003e';\n\t\t\t}\n\t\t}\n\t\t// Only output HTML here if $html has been emptied, that means it was echoed.\n\t\tif ( empty( $html ) ) {\n\t\t\techo '\u003c/div\u003e' . wp_kses_post( $args['after_widget'] );\n\t\t}\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();",
        "detailedLines": [
          {
            "lineNumber": 170,
            "text": "\t\t\t\t\tif ( $echo_row ) {"
          },
          {
            "lineNumber": 171,
            "text": "\t\t\t\t\t\t/**"
          },
          {
            "lineNumber": 172,
            "text": "\t\t\t\t\t\t * Highlight this row if it's today and we have not"
          },
          {
            "lineNumber": 173,
            "text": "\t\t\t\t\t\t * passed closing time, or highlight it if we're"
          },
          {
            "lineNumber": 174,
            "text": "\t\t\t\t\t\t * not open today or closed for the day and $i is"
          },
          {
            "lineNumber": 175,
            "text": "\t\t\t\t\t\t * $next_open_day"
          },
          {
            "lineNumber": 176,
            "text": "\t\t\t\t\t\t */"
          },
          {
            "lineNumber": 177,
            "text": "\t\t\t\t\t\t$current_row_class = '';"
          },
          {
            "lineNumber": 178,
            "text": "\t\t\t\t\t\tif ( ! $highlighted_a_row"
          },
          {
            "lineNumber": 179,
            "text": "\t\t\t\t\t\t\t\u0026\u0026 ( ( ! empty( $days[ $i ] )"
          },
          {
            "lineNumber": 180,
            "text": "\t\t\t\t\t\t\t\u0026\u0026 $days[ $i ]-\u003eopen_right_now()"
          },
          {
            "lineNumber": 181,
            "text": "\t\t\t\t\t\t\t\u0026\u0026 $current_weekday === $i ) // if it's today and we're open, highlight the row."
          },
          {
            "lineNumber": 182,
            "text": "\t\t\t\t\t\t\t|| ( $current_weekday !== $i"
          },
          {
            "lineNumber": 183,
            "text": "\t\t\t\t\t\t\t\u0026\u0026 ! empty( $next_open_day )"
          },
          {
            "lineNumber": 184,
            "text": "\t\t\t\t\t\t\t\u0026\u0026 $next_open_day-\u003eweekday - 1 === $i ) // it's not today, it's the next open day though."
          },
          {
            "lineNumber": 185,
            "text": "\t\t\t\t\t\t\t)"
          },
          {
            "lineNumber": 186,
            "text": "\t\t\t\t\t\t) {"
          },
          {
            "lineNumber": 187,
            "text": "\t\t\t\t\t\t\t$current_row_class = ' class=\"day-highlight\"';"
          },
          {
            "lineNumber": 188,
            "text": "\t\t\t\t\t\t\t$highlighted_a_row = true;"
          },
          {
            "lineNumber": 189,
            "text": "\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 190
          },
          {
            "lineNumber": 191,
            "text": "\t\t\t\t\t\tprintf("
          },
          {
            "lineNumber": 192,
            "text": "\t\t\t\t\t\t\t'\u003ctr%s\u003e\u003cth scope=\"row\"\u003e%s\u003c/th\u003e',"
          },
          {
            "lineNumber": 193,
            "text": "\t\t\t\t\t\t\t$current_row_class,"
          },
          {
            "lineNumber": 194,
            "text": "\t\t\t\t\t\t\tesc_html( array_values( INVP::weekdays() )[ $i ] )"
          },
          {
            "lineNumber": 195,
            "text": "\t\t\t\t\t\t);"
          },
          {
            "lineNumber": 196
          },
          {
            "lineNumber": 197,
            "text": "\t\t\t\t\t\tif ( 1 === $open_by_appt \u0026\u0026 ! empty( $open ) \u0026\u0026 ! empty( $close ) ) {"
          },
          {
            "lineNumber": 198,
            "text": "\t\t\t\t\t\t\tprintf("
          },
          {
            "lineNumber": 199,
            "text": "\t\t\t\t\t\t\t\t'\u003ctd colspan=\"2\"\u003e%s - %s \u0026amp; %s\u003c/td\u003e',"
          },
          {
            "lineNumber": 200,
            "text": "\t\t\t\t\t\t\t\tesc_html( $open ),"
          },
          {
            "lineNumber": 201,
            "text": "\t\t\t\t\t\t\t\tesc_html( $close ),"
          },
          {
            "lineNumber": 202,
            "text": "\t\t\t\t\t\t\t\tesc_html__( 'Appointment', 'inventory-presser' )"
          },
          {
            "lineNumber": 203,
            "text": "\t\t\t\t\t\t\t);"
          },
          {
            "lineNumber": 204,
            "text": "\t\t\t\t\t\t} elseif ( 1 === $open_by_appt ) {"
          },
          {
            "lineNumber": 205,
            "text": "\t\t\t\t\t\t\tprintf( '\u003ctd colspan=\"2\"\u003e%s\u003c/td\u003e', esc_html__( 'Appointment Only', 'inventory-presser' ) );"
          },
          {
            "lineNumber": 206,
            "text": "\t\t\t\t\t\t} elseif ( ! empty( $open ) \u0026\u0026 ! empty( $close ) ) {"
          },
          {
            "lineNumber": 207,
            "text": "\t\t\t\t\t\t\tprintf("
          },
          {
            "lineNumber": 208,
            "text": "\t\t\t\t\t\t\t\t'\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e',"
          },
          {
            "lineNumber": 209,
            "text": "\t\t\t\t\t\t\t\tesc_html( $open ),"
          },
          {
            "lineNumber": 210,
            "text": "\t\t\t\t\t\t\t\tesc_html( $close )"
          },
          {
            "lineNumber": 211,
            "text": "\t\t\t\t\t\t\t);"
          },
          {
            "lineNumber": 212,
            "text": "\t\t\t\t\t\t} else {"
          },
          {
            "lineNumber": 213,
            "text": "\t\t\t\t\t\t\tprintf( '\u003ctd colspan=\"2\"\u003e%s\u003c/td\u003e', esc_html__( 'Closed', 'inventory-presser' ) );"
          },
          {
            "lineNumber": 214,
            "text": "\t\t\t\t\t\t}"
          },
          {
            "lineNumber": 215,
            "text": "\t\t\t\t\t\techo '\u003c/tr\u003e';"
          },
          {
            "lineNumber": 216,
            "text": "\t\t\t\t\t}"
          },
          {
            "lineNumber": 217,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 218,
            "text": "\t\t\t\techo '\u003c/tbody\u003e\u003c/table\u003e';"
          },
          {
            "lineNumber": 219,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 220,
            "text": "\t\t}"
          },
          {
            "lineNumber": 221,
            "text": "\t\t// Only output HTML here if $html has been emptied, that means it was echoed."
          },
          {
            "lineNumber": 222,
            "text": "\t\tif ( empty( $html ) ) {"
          },
          {
            "lineNumber": 223,
            "text": "\t\t\techo '\u003c/div\u003e' . wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 224,
            "text": "\t\t}"
          },
          {
            "lineNumber": 225,
            "text": "\t}"
          },
          {
            "lineNumber": 226
          },
          {
            "lineNumber": 227,
            "text": "\t/**"
          },
          {
            "lineNumber": 228,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 229,
            "text": "\t *"
          },
          {
            "lineNumber": 230,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 231,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 232,
            "text": "\t */"
          },
          {
            "lineNumber": 233,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 234,
            "text": "\t\t$cb_display = isset( $instance['cb_display'] ) ? $instance['cb_display'] : array();"
          }
        ],
        "range": {
          "endPosition": {
            "line": 234
          },
          "startPosition": {
            "line": 169
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-hours.php",
        "signatures": {}
      },
      "score": 0.2737542390823364
    },
    {
      "codeBlock": {
        "contents": "\t\t\t\t);\n\n\t\t\t\t$cb_title_text = sprintf(\n\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',\n\t\t\t\t\tesc_attr( $this-\u003eget_field_id( 'cb_title_' . $hours_uid ) ),\n\t\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_title[' . $term_id . '][]' ) ),\n\t\t\t\t\tesc_attr( $hours_uid ),\n\t\t\t\t\tchecked( true, ( isset( $cb_title[ $term_id ] ) \u0026\u0026 is_array( $cb_title[ $term_id ] ) \u0026\u0026 in_array( $hours_uid, $cb_title[ $term_id ], true ) ), false )\n\t\t\t\t);\n\n\t\t\t\t$hours_table .= sprintf(\n\t\t\t\t\t'\u003ctr\u003e\u003ctd\u003e\u003cstrong\u003e%s\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003c/tr\u003e',\n\t\t\t\t\tesc_html( $title ),\n\t\t\t\t\t$cb_display_text,\n\t\t\t\t\t$cb_title_text\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$hours_table .= '\u003c/tbody\u003e\u003c/table\u003e';\n\n\t\t// Widget admin form.\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : __( 'Hours', 'inventory-presser' );\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Main Title', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_showclosed' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Show All Closed Days', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput type=\"checkbox\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_showclosed' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'cb_showclosed' ) ); ?\u003e\" value=\"true\"\u003c?php checked( ( isset( $instance['cb_showclosed'] ) \u0026\u0026 'true' === $instance['cb_showclosed'] ) ); ?\u003e\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\u003c?php echo $hours_table; ?\u003e\u003c/p\u003e\n\t\t\u003c?php\n\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.\n\t *\n\t * @param  array $new_instance\n\t * @param  array $old_instance\n\t * @return array The updated array full of settings\n\t */\n\tpublic function update( $new_instance, $old_instance ) {\n\t\t$instance                  = array();\n\t\t$instance['title']         = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';",
        "detailedLines": [
          {
            "lineNumber": 280,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 281
          },
          {
            "lineNumber": 282,
            "text": "\t\t\t\t$cb_title_text = sprintf("
          },
          {
            "lineNumber": 283,
            "text": "\t\t\t\t\t'\u003cinput type=\"checkbox\" id=\"%s\" name=\"%s\" value=\"%s\"%s /\u003e',"
          },
          {
            "lineNumber": 284,
            "text": "\t\t\t\t\tesc_attr( $this-\u003eget_field_id( 'cb_title_' . $hours_uid ) ),"
          },
          {
            "lineNumber": 285,
            "text": "\t\t\t\t\tesc_attr( $this-\u003eget_field_name( 'cb_title[' . $term_id . '][]' ) ),"
          },
          {
            "lineNumber": 286,
            "text": "\t\t\t\t\tesc_attr( $hours_uid ),"
          },
          {
            "lineNumber": 287,
            "text": "\t\t\t\t\tchecked( true, ( isset( $cb_title[ $term_id ] ) \u0026\u0026 is_array( $cb_title[ $term_id ] ) \u0026\u0026 in_array( $hours_uid, $cb_title[ $term_id ], true ) ), false )"
          },
          {
            "lineNumber": 288,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 289
          },
          {
            "lineNumber": 290,
            "text": "\t\t\t\t$hours_table .= sprintf("
          },
          {
            "lineNumber": 291,
            "text": "\t\t\t\t\t'\u003ctr\u003e\u003ctd\u003e\u003cstrong\u003e%s\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003ctd\u003e%s\u003c/td\u003e\u003c/tr\u003e',"
          },
          {
            "lineNumber": 292,
            "text": "\t\t\t\t\tesc_html( $title ),"
          },
          {
            "lineNumber": 293,
            "text": "\t\t\t\t\t$cb_display_text,"
          },
          {
            "lineNumber": 294,
            "text": "\t\t\t\t\t$cb_title_text"
          },
          {
            "lineNumber": 295,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 296,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 297,
            "text": "\t\t}"
          },
          {
            "lineNumber": 298
          },
          {
            "lineNumber": 299,
            "text": "\t\t$hours_table .= '\u003c/tbody\u003e\u003c/table\u003e';"
          },
          {
            "lineNumber": 300
          },
          {
            "lineNumber": 301,
            "text": "\t\t// Widget admin form."
          },
          {
            "lineNumber": 302,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : __( 'Hours', 'inventory-presser' );"
          },
          {
            "lineNumber": 303,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 304,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 305,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Main Title', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 306,
            "text": "\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 307,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 308
          },
          {
            "lineNumber": 309,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 310,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_showclosed' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Show All Closed Days', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 311,
            "text": "\t\t\u003cinput type=\"checkbox\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'cb_showclosed' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'cb_showclosed' ) ); ?\u003e\" value=\"true\"\u003c?php checked( ( isset( $instance['cb_showclosed'] ) \u0026\u0026 'true' === $instance['cb_showclosed'] ) ); ?\u003e\u003e"
          },
          {
            "lineNumber": 312,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 313,
            "text": "\t\t\u003cp\u003e\u003c?php echo $hours_table; ?\u003e\u003c/p\u003e"
          },
          {
            "lineNumber": 314,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 315,
            "text": "\t}"
          },
          {
            "lineNumber": 316
          },
          {
            "lineNumber": 317,
            "text": "\t/**"
          },
          {
            "lineNumber": 318,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          },
          {
            "lineNumber": 319,
            "text": "\t *"
          },
          {
            "lineNumber": 320,
            "text": "\t * @param  array $new_instance"
          },
          {
            "lineNumber": 321,
            "text": "\t * @param  array $old_instance"
          },
          {
            "lineNumber": 322,
            "text": "\t * @return array The updated array full of settings"
          },
          {
            "lineNumber": 323,
            "text": "\t */"
          },
          {
            "lineNumber": 324,
            "text": "\tpublic function update( $new_instance, $old_instance ) {"
          },
          {
            "lineNumber": 325,
            "text": "\t\t$instance                  = array();"
          },
          {
            "lineNumber": 326,
            "text": "\t\t$instance['title']         = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';"
          }
        ],
        "range": {
          "endPosition": {
            "line": 326
          },
          "startPosition": {
            "line": 279
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-hours.php",
        "signatures": {}
      },
      "score": 0.2724699079990387
    },
    {
      "codeBlock": {
        "contents": "\t\tforeach ( $location_info as $term_id =\u003e $name ) {\n\t\t\t// Does this address even have hours displayed by this instance of this widget?\n\t\t\tif ( empty( $instance['cb_display'][ $term_id ] ) ) {\n\t\t\t\t// No.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor ( $h = 1; $h \u003c= INVP::LOCATION_MAX_HOURS; $h++ ) {\n\t\t\t\t$hours_uid = get_term_meta( $term_id, 'hours_' . $h . '_uid', true );\n\t\t\t\tif ( ! $hours_uid ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// There are hours in is slot $h, has the user configured this widget to display it?\n\t\t\t\tif ( ! in_array( $hours_uid, $instance['cb_display'][ $term_id ], true ) ) {\n\t\t\t\t\t// No.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * The first time we reach this block, we can be sure we have\n\t\t\t\t * some hours content to output in the widget, so dump the\n\t\t\t\t * preamble $html.\n\t\t\t\t */\n\t\t\t\tif ( ! empty( $html ) ) {\n\t\t\t\t\techo $html;\n\t\t\t\t\t$html = '';\n\t\t\t\t}\n\n\t\t\t\t$hours_title = '';\n\t\t\t\tif ( ! empty( $instance['cb_title'][ $term_id ] )\n\t\t\t\t\t\u0026\u0026 is_array( $instance['cb_title'][ $term_id ] )\n\t\t\t\t\t\u0026\u0026 in_array( $hours_uid, $instance['cb_title'][ $term_id ], true )\n\t\t\t\t) {\n\t\t\t\t\t$hours_title = sprintf( '\u003cstrong\u003e%s\u003c/strong\u003e', esc_html( get_term_meta( $term_id, 'hours_' . $h . '_title', true ) ) );\n\t\t\t\t}\n\t\t\t\techo wp_kses_post( apply_filters( 'invp_hours_title', $hours_title, $hours_uid ) );\n\n\t\t\t\t// get current day number, starting on a monday.\n\t\t\t\t$current_weekday = gmdate( 'w' ) - 1;\n\t\t\t\t$current_weekday = ( -1 === $current_weekday ) ? 6 : $current_weekday;\n\n\t\t\t\t$start_of_week = get_option( 'start_of_week' ) - 1;\n\n\t\t\t\t$hours_sets = INVP::get_hours( $term_id );\n\t\t\t\t$hours_set  = array();\n\t\t\t\tforeach ( $hours_sets as $set ) {\n\t\t\t\t\tif ( $hours_uid === $set['uid'] ) {\n\t\t\t\t\t\t$hours_set = $set;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$days          = Inventory_Presser_Shortcode_Hours_Today::create_days_array_from_hours_array( $hours_set );\n\t\t\t\t$next_open_day = Inventory_Presser_Shortcode_Hours_Today::find_next_open_day( $days );\n\n\t\t\t\techo '\u003ctable class=\"table\"\u003e\u003ctbody\u003e';\n\n\t\t\t\t// output a row for each day.\n\t\t\t\t$highlighted_a_row = false;\n\t\t\t\tfor ( $z = $start_of_week; $z \u003c ( $start_of_week + 7 ); $z++ ) {\n\t\t\t\t\t",
        "detailedLines": [
          {
            "lineNumber": 81,
            "text": "\t\tforeach ( $location_info as $term_id =\u003e $name ) {"
          },
          {
            "lineNumber": 82,
            "text": "\t\t\t// Does this address even have hours displayed by this instance of this widget?"
          },
          {
            "lineNumber": 83,
            "text": "\t\t\tif ( empty( $instance['cb_display'][ $term_id ] ) ) {"
          },
          {
            "lineNumber": 84,
            "text": "\t\t\t\t// No."
          },
          {
            "lineNumber": 85,
            "text": "\t\t\t\tcontinue;"
          },
          {
            "lineNumber": 86,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 87
          },
          {
            "lineNumber": 88,
            "text": "\t\t\tfor ( $h = 1; $h \u003c= INVP::LOCATION_MAX_HOURS; $h++ ) {"
          },
          {
            "lineNumber": 89,
            "text": "\t\t\t\t$hours_uid = get_term_meta( $term_id, 'hours_' . $h . '_uid', true );"
          },
          {
            "lineNumber": 90,
            "text": "\t\t\t\tif ( ! $hours_uid ) {"
          },
          {
            "lineNumber": 91,
            "text": "\t\t\t\t\tbreak;"
          },
          {
            "lineNumber": 92,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 93
          },
          {
            "lineNumber": 94,
            "text": "\t\t\t\t// There are hours in is slot $h, has the user configured this widget to display it?"
          },
          {
            "lineNumber": 95,
            "text": "\t\t\t\tif ( ! in_array( $hours_uid, $instance['cb_display'][ $term_id ], true ) ) {"
          },
          {
            "lineNumber": 96,
            "text": "\t\t\t\t\t// No."
          },
          {
            "lineNumber": 97,
            "text": "\t\t\t\t\tcontinue;"
          },
          {
            "lineNumber": 98,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 99
          },
          {
            "lineNumber": 100,
            "text": "\t\t\t\t/**"
          },
          {
            "lineNumber": 101,
            "text": "\t\t\t\t * The first time we reach this block, we can be sure we have"
          },
          {
            "lineNumber": 102,
            "text": "\t\t\t\t * some hours content to output in the widget, so dump the"
          },
          {
            "lineNumber": 103,
            "text": "\t\t\t\t * preamble $html."
          },
          {
            "lineNumber": 104,
            "text": "\t\t\t\t */"
          },
          {
            "lineNumber": 105,
            "text": "\t\t\t\tif ( ! empty( $html ) ) {"
          },
          {
            "lineNumber": 106,
            "text": "\t\t\t\t\techo $html;"
          },
          {
            "lineNumber": 107,
            "text": "\t\t\t\t\t$html = '';"
          },
          {
            "lineNumber": 108,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 109
          },
          {
            "lineNumber": 110,
            "text": "\t\t\t\t$hours_title = '';"
          },
          {
            "lineNumber": 111,
            "text": "\t\t\t\tif ( ! empty( $instance['cb_title'][ $term_id ] )"
          },
          {
            "lineNumber": 112,
            "text": "\t\t\t\t\t\u0026\u0026 is_array( $instance['cb_title'][ $term_id ] )"
          },
          {
            "lineNumber": 113,
            "text": "\t\t\t\t\t\u0026\u0026 in_array( $hours_uid, $instance['cb_title'][ $term_id ], true )"
          },
          {
            "lineNumber": 114,
            "text": "\t\t\t\t) {"
          },
          {
            "lineNumber": 115,
            "text": "\t\t\t\t\t$hours_title = sprintf( '\u003cstrong\u003e%s\u003c/strong\u003e', esc_html( get_term_meta( $term_id, 'hours_' . $h . '_title', true ) ) );"
          },
          {
            "lineNumber": 116,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 117,
            "text": "\t\t\t\techo wp_kses_post( apply_filters( 'invp_hours_title', $hours_title, $hours_uid ) );"
          },
          {
            "lineNumber": 118
          },
          {
            "lineNumber": 119,
            "text": "\t\t\t\t// get current day number, starting on a monday."
          },
          {
            "lineNumber": 120,
            "text": "\t\t\t\t$current_weekday = gmdate( 'w' ) - 1;"
          },
          {
            "lineNumber": 121,
            "text": "\t\t\t\t$current_weekday = ( -1 === $current_weekday ) ? 6 : $current_weekday;"
          },
          {
            "lineNumber": 122
          },
          {
            "lineNumber": 123,
            "text": "\t\t\t\t$start_of_week = get_option( 'start_of_week' ) - 1;"
          },
          {
            "lineNumber": 124
          },
          {
            "lineNumber": 125,
            "text": "\t\t\t\t$hours_sets = INVP::get_hours( $term_id );"
          },
          {
            "lineNumber": 126,
            "text": "\t\t\t\t$hours_set  = array();"
          },
          {
            "lineNumber": 127,
            "text": "\t\t\t\tforeach ( $hours_sets as $set ) {"
          },
          {
            "lineNumber": 128,
            "text": "\t\t\t\t\tif ( $hours_uid === $set['uid'] ) {"
          },
          {
            "lineNumber": 129,
            "text": "\t\t\t\t\t\t$hours_set = $set;"
          },
          {
            "lineNumber": 130,
            "text": "\t\t\t\t\t\tbreak;"
          },
          {
            "lineNumber": 131,
            "text": "\t\t\t\t\t}"
          },
          {
            "lineNumber": 132,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 133,
            "text": "\t\t\t\t$days          = Inventory_Presser_Shortcode_Hours_Today::create_days_array_from_hours_array( $hours_set );"
          },
          {
            "lineNumber": 134,
            "text": "\t\t\t\t$next_open_day = Inventory_Presser_Shortcode_Hours_Today::find_next_open_day( $days );"
          },
          {
            "lineNumber": 135
          },
          {
            "lineNumber": 136,
            "text": "\t\t\t\techo '\u003ctable class=\"table\"\u003e\u003ctbody\u003e';"
          },
          {
            "lineNumber": 137
          },
          {
            "lineNumber": 138,
            "text": "\t\t\t\t// output a row for each day."
          },
          {
            "lineNumber": 139,
            "text": "\t\t\t\t$highlighted_a_row = false;"
          },
          {
            "lineNumber": 140,
            "text": "\t\t\t\tfor ( $z = $start_of_week; $z \u003c ( $start_of_week + 7 ); $z++ ) {"
          },
          {
            "lineNumber": 141,
            "text": "\t\t\t\t\t"
          }
        ],
        "range": {
          "endPosition": {
            "column": 5,
            "line": 140
          },
          "startPosition": {
            "line": 80
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-hours.php",
        "signatures": {}
      },
      "score": 0.2686415910720825
    },
    {
      "codeBlock": {
        "contents": "\t/**\n\t * Outputs the content of the widget\n\t *\n\t * @param array $args\n\t * @param array $instance\n\t */\n\tpublic function widget( $args, $instance ) {\n\n\t\t$image_keys = array_keys( $this-\u003eimages() );\n\t\t$image      = $image_keys[0];\n\t\tif ( ! empty( $instance['image'] ) \u0026\u0026 in_array( $instance['image'], $image_keys, true ) ) {\n\t\t\t$image = $instance['image'];\n\t\t}\n\n\t\t$path = dirname( INVP_PLUGIN_FILE_PATH ) . '/images/' . $this-\u003eimages()[ $image ]['img'];\n\t\tif ( ! file_exists( $path ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$title = apply_filters( 'widget_title', $instance['title'] );\n\t\t// before and after widget arguments are defined by themes.\n\t\techo wp_kses_post( $args['before_widget'] );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\techo wp_kses_post( wpautop( $instance['before_image'] ) );\n\t\tif ( 'svg' === strtolower( pathinfo( $this-\u003eimages()[ $image ]['img'], PATHINFO_EXTENSION ) ) ) {\n\t\t\t// Include the SVG inline instead of using an \u003cimg\u003e element.\n\t\t\t$svg = file_get_contents( $path );\n\t\t\tprintf(\n\t\t\t\t'\u003ca href=\"%s\"\u003e%s\u003c/a\u003e',\n\t\t\t\tesc_url( get_post_type_archive_link( INVP::POST_TYPE ) ),\n\t\t\t\t$svg\n\t\t\t);\n\t\t} else {\n\t\t\tprintf(\n\t\t\t\t'\u003ca href=\"%s\"\u003e\u003cimg src=\"%s\"\u003e\u003c/a\u003e',\n\t\t\t\tesc_url( get_post_type_archive_link( INVP::POST_TYPE ) ),\n\t\t\t\tesc_url( plugins_url( '/images/' . $this-\u003eimages()[ $image ]['img'], INVP_PLUGIN_FILE_PATH ) )\n\t\t\t);\n\t\t}\n\t\techo wp_kses_post( wpautop( $instance['after_image'] ) ) . wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$image_keys = array_keys( $this-\u003eimages() );",
        "detailedLines": [
          {
            "lineNumber": 77,
            "text": "\t/**"
          },
          {
            "lineNumber": 78,
            "text": "\t * Outputs the content of the widget"
          },
          {
            "lineNumber": 79,
            "text": "\t *"
          },
          {
            "lineNumber": 80,
            "text": "\t * @param array $args"
          },
          {
            "lineNumber": 81,
            "text": "\t * @param array $instance"
          },
          {
            "lineNumber": 82,
            "text": "\t */"
          },
          {
            "lineNumber": 83,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 84
          },
          {
            "lineNumber": 85,
            "text": "\t\t$image_keys = array_keys( $this-\u003eimages() );"
          },
          {
            "lineNumber": 86,
            "text": "\t\t$image      = $image_keys[0];"
          },
          {
            "lineNumber": 87,
            "text": "\t\tif ( ! empty( $instance['image'] ) \u0026\u0026 in_array( $instance['image'], $image_keys, true ) ) {"
          },
          {
            "lineNumber": 88,
            "text": "\t\t\t$image = $instance['image'];"
          },
          {
            "lineNumber": 89,
            "text": "\t\t}"
          },
          {
            "lineNumber": 90
          },
          {
            "lineNumber": 91,
            "text": "\t\t$path = dirname( INVP_PLUGIN_FILE_PATH ) . '/images/' . $this-\u003eimages()[ $image ]['img'];"
          },
          {
            "lineNumber": 92,
            "text": "\t\tif ( ! file_exists( $path ) ) {"
          },
          {
            "lineNumber": 93,
            "text": "\t\t\treturn;"
          },
          {
            "lineNumber": 94,
            "text": "\t\t}"
          },
          {
            "lineNumber": 95
          },
          {
            "lineNumber": 96,
            "text": "\t\t$title = apply_filters( 'widget_title', $instance['title'] );"
          },
          {
            "lineNumber": 97,
            "text": "\t\t// before and after widget arguments are defined by themes."
          },
          {
            "lineNumber": 98,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 99,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 100,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 101,
            "text": "\t\t}"
          },
          {
            "lineNumber": 102
          },
          {
            "lineNumber": 103,
            "text": "\t\techo wp_kses_post( wpautop( $instance['before_image'] ) );"
          },
          {
            "lineNumber": 104,
            "text": "\t\tif ( 'svg' === strtolower( pathinfo( $this-\u003eimages()[ $image ]['img'], PATHINFO_EXTENSION ) ) ) {"
          },
          {
            "lineNumber": 105,
            "text": "\t\t\t// Include the SVG inline instead of using an \u003cimg\u003e element."
          },
          {
            "lineNumber": 106,
            "text": "\t\t\t$svg = file_get_contents( $path );"
          },
          {
            "lineNumber": 107,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 108,
            "text": "\t\t\t\t'\u003ca href=\"%s\"\u003e%s\u003c/a\u003e',"
          },
          {
            "lineNumber": 109,
            "text": "\t\t\t\tesc_url( get_post_type_archive_link( INVP::POST_TYPE ) ),"
          },
          {
            "lineNumber": 110,
            "text": "\t\t\t\t$svg"
          },
          {
            "lineNumber": 111,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 112,
            "text": "\t\t} else {"
          },
          {
            "lineNumber": 113,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 114,
            "text": "\t\t\t\t'\u003ca href=\"%s\"\u003e\u003cimg src=\"%s\"\u003e\u003c/a\u003e',"
          },
          {
            "lineNumber": 115,
            "text": "\t\t\t\tesc_url( get_post_type_archive_link( INVP::POST_TYPE ) ),"
          },
          {
            "lineNumber": 116,
            "text": "\t\t\t\tesc_url( plugins_url( '/images/' . $this-\u003eimages()[ $image ]['img'], INVP_PLUGIN_FILE_PATH ) )"
          },
          {
            "lineNumber": 117,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 118,
            "text": "\t\t}"
          },
          {
            "lineNumber": 119,
            "text": "\t\techo wp_kses_post( wpautop( $instance['after_image'] ) ) . wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 120,
            "text": "\t}"
          },
          {
            "lineNumber": 121
          },
          {
            "lineNumber": 122,
            "text": "\t/**"
          },
          {
            "lineNumber": 123,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 124,
            "text": "\t *"
          },
          {
            "lineNumber": 125,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 126,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 127,
            "text": "\t */"
          },
          {
            "lineNumber": 128,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 129
          },
          {
            "lineNumber": 130,
            "text": "\t\t$image_keys = array_keys( $this-\u003eimages() );"
          }
        ],
        "range": {
          "endPosition": {
            "line": 130
          },
          "startPosition": {
            "line": 76
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-carfax.php",
        "signatures": {}
      },
      "score": 0.26619136333465576
    },
    {
      "codeBlock": {
        "contents": "\tpublic function widget( $args, $instance ) {\n\t\t// abort if we don't have an address to show\n\t\tif ( empty( $instance['location_slug'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$location = get_term_by( 'slug', $instance['location_slug'], 'location' );\n\t\tif ( ! $location ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// before and after widget arguments are defined by themes\n\t\techo wp_kses_post( $args['before_widget'] );\n\n\t\t$title = apply_filters( 'widget_title', $instance['title'] );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\t// remove line breaks from the term description\n\t\t$address_to_search = preg_replace( '#\\R+#', ', ', $location-\u003edescription );\n\n\t\tprintf(\n\t\t\t'\u003cdiv class=\"invp-google-maps\"\u003e\u003ciframe frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"https://maps.google.com/maps?q=%s\u0026t=m\u0026z=%d\u0026output=embed\" aria-label=\"%s\"\u003e\u003c/iframe\u003e\u003c/div\u003e',\n\t\t\trawurlencode( $address_to_search ),\n\t\t\t'13',\n\t\t\tesc_attr( $address_to_search )\n\t\t);\n\n\t\techo wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * form\n\t *\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';",
        "detailedLines": [
          {
            "lineNumber": 59,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 60,
            "text": "\t\t// abort if we don't have an address to show"
          },
          {
            "lineNumber": 61,
            "text": "\t\tif ( empty( $instance['location_slug'] ) ) {"
          },
          {
            "lineNumber": 62,
            "text": "\t\t\treturn;"
          },
          {
            "lineNumber": 63,
            "text": "\t\t}"
          },
          {
            "lineNumber": 64
          },
          {
            "lineNumber": 65,
            "text": "\t\t$location = get_term_by( 'slug', $instance['location_slug'], 'location' );"
          },
          {
            "lineNumber": 66,
            "text": "\t\tif ( ! $location ) {"
          },
          {
            "lineNumber": 67,
            "text": "\t\t\treturn;"
          },
          {
            "lineNumber": 68,
            "text": "\t\t}"
          },
          {
            "lineNumber": 69
          },
          {
            "lineNumber": 70,
            "text": "\t\t// before and after widget arguments are defined by themes"
          },
          {
            "lineNumber": 71,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 72
          },
          {
            "lineNumber": 73,
            "text": "\t\t$title = apply_filters( 'widget_title', $instance['title'] );"
          },
          {
            "lineNumber": 74,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 75,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 76,
            "text": "\t\t}"
          },
          {
            "lineNumber": 77
          },
          {
            "lineNumber": 78,
            "text": "\t\t// remove line breaks from the term description"
          },
          {
            "lineNumber": 79,
            "text": "\t\t$address_to_search = preg_replace( '#\\R+#', ', ', $location-\u003edescription );"
          },
          {
            "lineNumber": 80
          },
          {
            "lineNumber": 81,
            "text": "\t\tprintf("
          },
          {
            "lineNumber": 82,
            "text": "\t\t\t'\u003cdiv class=\"invp-google-maps\"\u003e\u003ciframe frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"https://maps.google.com/maps?q=%s\u0026t=m\u0026z=%d\u0026output=embed\" aria-label=\"%s\"\u003e\u003c/iframe\u003e\u003c/div\u003e',"
          },
          {
            "lineNumber": 83,
            "text": "\t\t\trawurlencode( $address_to_search ),"
          },
          {
            "lineNumber": 84,
            "text": "\t\t\t'13',"
          },
          {
            "lineNumber": 85,
            "text": "\t\t\tesc_attr( $address_to_search )"
          },
          {
            "lineNumber": 86,
            "text": "\t\t);"
          },
          {
            "lineNumber": 87
          },
          {
            "lineNumber": 88,
            "text": "\t\techo wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 89,
            "text": "\t}"
          },
          {
            "lineNumber": 90
          },
          {
            "lineNumber": 91,
            "text": "\t/**"
          },
          {
            "lineNumber": 92,
            "text": "\t * form"
          },
          {
            "lineNumber": 93,
            "text": "\t *"
          },
          {
            "lineNumber": 94,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 95,
            "text": "\t *"
          },
          {
            "lineNumber": 96,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 97,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 98,
            "text": "\t */"
          },
          {
            "lineNumber": 99,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 100
          },
          {
            "lineNumber": 101,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';"
          }
        ],
        "range": {
          "endPosition": {
            "line": 101
          },
          "startPosition": {
            "line": 58
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-google-maps.php",
        "signatures": {}
      },
      "score": 0.2652978003025055
    },
    {
      "codeBlock": {
        "contents": "\t\twp_enqueue_script( self::ID_BASE );\n\t\twp_add_inline_script(\n\t\t\tself::ID_BASE,\n\t\t\t'const ' . self::ID_BASE . ' = ' . wp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'locations' =\u003e $popups,\n\t\t\t\t)\n\t\t\t),\n\t\t\t'before'\n\t\t);\n\n\t\t// before and after widget arguments are defined by themes\n\t\techo wp_kses_post( $args['before_widget'] );\n\n\t\t$title = apply_filters( 'widget_title', $instance['title'] );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\techo '\u003cdiv id=\"map_canvas\" style=\"min-height: 175px;\"\u003e\u003c/div\u003e' . wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title   = $instance['title'] ?? '';\n\t\t$api_key = $instance['api_key'] ?? '';\n\n\t\t// Title. ?\u003e\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003c?php\n\n\t\t// API Key.\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'api_key' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'API Key:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'api_key' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'api_key' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $api_key ); ?\u003e\" /\u003e\n\t\t\t\u003cp class=\"description\"\u003e\n\t\t\t\u003c?php\n\n\t\t\t\tprintf(\n\t\t\t\t\t'%s \u003ca href=\"https://developers.google.com/maps/documentation/javascript/get-api-key\"\u003e%s\u003c/a\u003e',\n\t\t\t\t\tesc_html__( 'Obtain an API key at', 'inventory-presser' ),\n\t\t\t\t\tesc_html__( 'Google Cloud Console', 'inventory-presser' )\n\t\t\t\t);\n\n\t\t\t?\u003e\n\t\t\t\t\t\t\t\t\t\u003c/p\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\u003c?php esc_html_e( 'Choose addresses to mark:', 'inventory-presser' ); ?\u003e\u003c/p\u003e\n\t\t\t\t\t\t\t\t\t\t\t\t\u003c?php\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// get all location terms.",
        "detailedLines": [
          {
            "lineNumber": 111,
            "text": "\t\twp_enqueue_script( self::ID_BASE );"
          },
          {
            "lineNumber": 112,
            "text": "\t\twp_add_inline_script("
          },
          {
            "lineNumber": 113,
            "text": "\t\t\tself::ID_BASE,"
          },
          {
            "lineNumber": 114,
            "text": "\t\t\t'const ' . self::ID_BASE . ' = ' . wp_json_encode("
          },
          {
            "lineNumber": 115,
            "text": "\t\t\t\tarray("
          },
          {
            "lineNumber": 116,
            "text": "\t\t\t\t\t'locations' =\u003e $popups,"
          },
          {
            "lineNumber": 117,
            "text": "\t\t\t\t)"
          },
          {
            "lineNumber": 118,
            "text": "\t\t\t),"
          },
          {
            "lineNumber": 119,
            "text": "\t\t\t'before'"
          },
          {
            "lineNumber": 120,
            "text": "\t\t);"
          },
          {
            "lineNumber": 121
          },
          {
            "lineNumber": 122,
            "text": "\t\t// before and after widget arguments are defined by themes"
          },
          {
            "lineNumber": 123,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 124
          },
          {
            "lineNumber": 125,
            "text": "\t\t$title = apply_filters( 'widget_title', $instance['title'] );"
          },
          {
            "lineNumber": 126,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 127,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 128,
            "text": "\t\t}"
          },
          {
            "lineNumber": 129
          },
          {
            "lineNumber": 130,
            "text": "\t\techo '\u003cdiv id=\"map_canvas\" style=\"min-height: 175px;\"\u003e\u003c/div\u003e' . wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 131,
            "text": "\t}"
          },
          {
            "lineNumber": 132
          },
          {
            "lineNumber": 133,
            "text": "\t/**"
          },
          {
            "lineNumber": 134,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 135,
            "text": "\t *"
          },
          {
            "lineNumber": 136,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 137,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 138,
            "text": "\t */"
          },
          {
            "lineNumber": 139,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 140
          },
          {
            "lineNumber": 141,
            "text": "\t\t$title   = $instance['title'] ?? '';"
          },
          {
            "lineNumber": 142,
            "text": "\t\t$api_key = $instance['api_key'] ?? '';"
          },
          {
            "lineNumber": 143
          },
          {
            "lineNumber": 144,
            "text": "\t\t// Title. ?\u003e\u003cp\u003e"
          },
          {
            "lineNumber": 145,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 146,
            "text": "\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 147,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 148,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 149
          },
          {
            "lineNumber": 150,
            "text": "\t\t// API Key."
          },
          {
            "lineNumber": 151,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 152,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 153,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'api_key' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'API Key:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 154,
            "text": "\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'api_key' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'api_key' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $api_key ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 155,
            "text": "\t\t\t\u003cp class=\"description\"\u003e"
          },
          {
            "lineNumber": 156,
            "text": "\t\t\t\u003c?php"
          },
          {
            "lineNumber": 157
          },
          {
            "lineNumber": 158,
            "text": "\t\t\t\tprintf("
          },
          {
            "lineNumber": 159,
            "text": "\t\t\t\t\t'%s \u003ca href=\"https://developers.google.com/maps/documentation/javascript/get-api-key\"\u003e%s\u003c/a\u003e',"
          },
          {
            "lineNumber": 160,
            "text": "\t\t\t\t\tesc_html__( 'Obtain an API key at', 'inventory-presser' ),"
          },
          {
            "lineNumber": 161,
            "text": "\t\t\t\t\tesc_html__( 'Google Cloud Console', 'inventory-presser' )"
          },
          {
            "lineNumber": 162,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 163
          },
          {
            "lineNumber": 164,
            "text": "\t\t\t?\u003e"
          },
          {
            "lineNumber": 165,
            "text": "\t\t\t\t\t\t\t\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 166,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 167,
            "text": "\t\t\u003cp\u003e\u003c?php esc_html_e( 'Choose addresses to mark:', 'inventory-presser' ); ?\u003e\u003c/p\u003e"
          },
          {
            "lineNumber": 168,
            "text": "\t\t\t\t\t\t\t\t\t\t\t\t\u003c?php"
          },
          {
            "lineNumber": 169
          },
          {
            "lineNumber": 170,
            "text": "\t\t\t\t\t\t\t\t\t\t\t\t\t// get all location terms."
          }
        ],
        "range": {
          "endPosition": {
            "line": 170
          },
          "startPosition": {
            "line": 110
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-google-maps-v3.php",
        "signatures": {}
      },
      "score": 0.26433736085891724
    },
    {
      "codeBlock": {
        "contents": "\tpublic function widget( $args, $instance ) {\n\t\tif ( empty( $instance['cb_display'] ) || ! is_array( $instance['cb_display'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// before and after widget arguments are defined by themes.\n\t\techo wp_kses_post( $args['before_widget'] );\n\n\t\t$title = apply_filters( 'widget_title', $instance['title'] );\n\t\tif ( ! empty( $title ) ) {\n\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );\n\t\t}\n\n\t\t$format_slugs = array_keys( $this-\u003eformats() );\n\t\t$format       = in_array( $instance['format'], $format_slugs ) ? $instance['format'] : $format_slugs[0];\n\n\t\tprintf(\n\t\t\t'\u003cdiv class=\"invp-%s\"\u003e%s',\n\t\t\tesc_attr( $format ),\n\t\t\t$this-\u003eformats()[ $format ]['before']\n\t\t);\n\n\t\t// loop through each location.\n\t\t$location_info = get_terms(\n\t\t\tarray(\n\t\t\t\t'taxonomy'   =\u003e 'location',\n\t\t\t\t'fields'     =\u003e 'id=\u003ename',\n\t\t\t\t'hide_empty' =\u003e false,\n\t\t\t)\n\t\t);\n\t\tforeach ( $location_info as $term_id =\u003e $name ) {\n\t\t\t// Does this address even have a phone number displayed by this instance of this widget?",
        "detailedLines": [
          {
            "lineNumber": 108,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 109,
            "text": "\t\tif ( empty( $instance['cb_display'] ) || ! is_array( $instance['cb_display'] ) ) {"
          },
          {
            "lineNumber": 110,
            "text": "\t\t\treturn;"
          },
          {
            "lineNumber": 111,
            "text": "\t\t}"
          },
          {
            "lineNumber": 112
          },
          {
            "lineNumber": 113,
            "text": "\t\t// before and after widget arguments are defined by themes."
          },
          {
            "lineNumber": 114,
            "text": "\t\techo wp_kses_post( $args['before_widget'] );"
          },
          {
            "lineNumber": 115
          },
          {
            "lineNumber": 116,
            "text": "\t\t$title = apply_filters( 'widget_title', $instance['title'] );"
          },
          {
            "lineNumber": 117,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 118,
            "text": "\t\t\techo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] );"
          },
          {
            "lineNumber": 119,
            "text": "\t\t}"
          },
          {
            "lineNumber": 120
          },
          {
            "lineNumber": 121,
            "text": "\t\t$format_slugs = array_keys( $this-\u003eformats() );"
          },
          {
            "lineNumber": 122,
            "text": "\t\t$format       = in_array( $instance['format'], $format_slugs ) ? $instance['format'] : $format_slugs[0];"
          },
          {
            "lineNumber": 123
          },
          {
            "lineNumber": 124,
            "text": "\t\tprintf("
          },
          {
            "lineNumber": 125,
            "text": "\t\t\t'\u003cdiv class=\"invp-%s\"\u003e%s',"
          },
          {
            "lineNumber": 126,
            "text": "\t\t\tesc_attr( $format ),"
          },
          {
            "lineNumber": 127,
            "text": "\t\t\t$this-\u003eformats()[ $format ]['before']"
          },
          {
            "lineNumber": 128,
            "text": "\t\t);"
          },
          {
            "lineNumber": 129
          },
          {
            "lineNumber": 130,
            "text": "\t\t// loop through each location."
          },
          {
            "lineNumber": 131,
            "text": "\t\t$location_info = get_terms("
          },
          {
            "lineNumber": 132,
            "text": "\t\t\tarray("
          },
          {
            "lineNumber": 133,
            "text": "\t\t\t\t'taxonomy'   =\u003e 'location',"
          },
          {
            "lineNumber": 134,
            "text": "\t\t\t\t'fields'     =\u003e 'id=\u003ename',"
          },
          {
            "lineNumber": 135,
            "text": "\t\t\t\t'hide_empty' =\u003e false,"
          },
          {
            "lineNumber": 136,
            "text": "\t\t\t)"
          },
          {
            "lineNumber": 137,
            "text": "\t\t);"
          },
          {
            "lineNumber": 138,
            "text": "\t\tforeach ( $location_info as $term_id =\u003e $name ) {"
          },
          {
            "lineNumber": 139,
            "text": "\t\t\t// Does this address even have a phone number displayed by this instance of this widget?"
          }
        ],
        "range": {
          "endPosition": {
            "line": 139
          },
          "startPosition": {
            "line": 107
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-phones.php",
        "signatures": {}
      },
      "score": 0.26266366243362427
    },
    {
      "codeBlock": {
        "contents": "\tpublic function form( $instance ) {\n\n\t\t$image_keys = array_keys( $this-\u003eimages() );\n\n\t\t$title        = isset( $instance['title'] ) ? $instance['title'] : '';\n\t\t$before_image = isset( $instance['before_image'] ) ? $instance['before_image'] : '';\n\t\t$image        = isset( $instance['image'] ) ? $instance['image'] : $image_keys[0];\n\t\t$after_image  = isset( $instance['after_image'] ) ? $instance['after_image'] : '';\n\n\t\t// Widget admin form.\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'before_image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Text before image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'before_image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'before_image' ) ); ?\u003e\"\u003e\u003c?php echo esc_attr( $before_image ); ?\u003e\u003c/textarea\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\n\t\t\u003cselect class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'image' ) ); ?\u003e\"\u003e\n\t\t\u003c?php\n\t\tforeach ( $this-\u003eimages() as $key =\u003e $imginfo ) {\n\t\t\tprintf(\n\t\t\t\t'\u003coption value=\"%s\"%s\u003e%s\u003c/option\u003e',\n\t\t\t\tesc_attr( $key ),\n\t\t\t\tselected( $key === $image, true, false ),\n\t\t\t\tesc_html( $imginfo['text'] )\n\t\t\t);\n\t\t}\n\t\t?\u003e\n\t\t\u003c/select\u003e\n\n\t\t\u003c/p\u003e\n\n\t\t\u003cp\u003e\n\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'after_image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Text after image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'after_image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'after_image' ) ); ?\u003e\"\u003e\u003c?php echo esc_attr( $after_image ); ?\u003e\u003c/textarea\u003e\n\t\t\u003c/p\u003e\n\t\t\u003c?php\n\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.",
        "detailedLines": [
          {
            "lineNumber": 96,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 97
          },
          {
            "lineNumber": 98,
            "text": "\t\t$image_keys = array_keys( $this-\u003eimages() );"
          },
          {
            "lineNumber": 99
          },
          {
            "lineNumber": 100,
            "text": "\t\t$title        = isset( $instance['title'] ) ? $instance['title'] : '';"
          },
          {
            "lineNumber": 101,
            "text": "\t\t$before_image = isset( $instance['before_image'] ) ? $instance['before_image'] : '';"
          },
          {
            "lineNumber": 102,
            "text": "\t\t$image        = isset( $instance['image'] ) ? $instance['image'] : $image_keys[0];"
          },
          {
            "lineNumber": 103,
            "text": "\t\t$after_image  = isset( $instance['after_image'] ) ? $instance['after_image'] : '';"
          },
          {
            "lineNumber": 104
          },
          {
            "lineNumber": 105,
            "text": "\t\t// Widget admin form."
          },
          {
            "lineNumber": 106,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 107,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 108,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 109,
            "text": "\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 110,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 111,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 112,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'before_image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Text before image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 113,
            "text": "\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'before_image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'before_image' ) ); ?\u003e\"\u003e\u003c?php echo esc_attr( $before_image ); ?\u003e\u003c/textarea\u003e"
          },
          {
            "lineNumber": 114,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 115,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 116,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 117
          },
          {
            "lineNumber": 118,
            "text": "\t\t\u003cselect class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'image' ) ); ?\u003e\"\u003e"
          },
          {
            "lineNumber": 119,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 120,
            "text": "\t\tforeach ( $this-\u003eimages() as $key =\u003e $imginfo ) {"
          },
          {
            "lineNumber": 121,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 122,
            "text": "\t\t\t\t'\u003coption value=\"%s\"%s\u003e%s\u003c/option\u003e',"
          },
          {
            "lineNumber": 123,
            "text": "\t\t\t\tesc_attr( $key ),"
          },
          {
            "lineNumber": 124,
            "text": "\t\t\t\tselected( $key === $image, true, false ),"
          },
          {
            "lineNumber": 125,
            "text": "\t\t\t\tesc_html( $imginfo['text'] )"
          },
          {
            "lineNumber": 126,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 127,
            "text": "\t\t}"
          },
          {
            "lineNumber": 128,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 129,
            "text": "\t\t\u003c/select\u003e"
          },
          {
            "lineNumber": 130
          },
          {
            "lineNumber": 131,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 132
          },
          {
            "lineNumber": 133,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 134,
            "text": "\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'after_image' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Text after image:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 135,
            "text": "\t\t\u003ctextarea class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'after_image' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'after_image' ) ); ?\u003e\"\u003e\u003c?php echo esc_attr( $after_image ); ?\u003e\u003c/textarea\u003e"
          },
          {
            "lineNumber": 136,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 137,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 138,
            "text": "\t}"
          },
          {
            "lineNumber": 139
          },
          {
            "lineNumber": 140,
            "text": "\t/**"
          },
          {
            "lineNumber": 141,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          }
        ],
        "range": {
          "endPosition": {
            "line": 141
          },
          "startPosition": {
            "line": 95
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-kbb.php",
        "signatures": {}
      },
      "score": 0.25678059458732605
    },
    {
      "codeBlock": {
        "contents": "\t/**\n\t * Outputs the widget front-end HTML\n\t *\n\t * @param  array $args\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function widget( $args, $instance ) {\n\n\t\t// Need the stylesheet for this content.\n\t\twp_enqueue_style( 'invp-maximum-price-filters' );\n\n\t\t$reset_link_only = ( isset( $instance['cb_reset_link_only'] ) \u0026\u0026 'true' === $instance['cb_reset_link_only'] );\n\n\t\tif ( $reset_link_only \u0026\u0026 ! isset( $_GET['max_price'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\techo wp_kses_post( $args['before_widget'] ?? '' );\n\n\t\t$title = apply_filters( 'widget_title', $instance['title'] ?? '' );\n\n\t\tprintf( '\u003cdiv class=\"price-filter price-filter-%s\"\u003e', esc_attr( $instance['orientation'] ?? '' ) );\n\t\tif ( ! empty( $title ) ) {\n\t\t\tprintf(\n\t\t\t\t'\u003cdiv class=\"price-title\"\u003e%s%s%s\u003c/div\u003e',\n\t\t\t\twp_kses_post( $args['before_title'] ?? '' ),\n\t\t\t\tesc_html( $title ),\n\t\t\t\twp_kses_post( $args['after_title'] ?? '' )\n\t\t\t);\n\t\t}\n\n\t\tif ( ! $reset_link_only ) {\n\n\t\t\t$price_points = ( isset( $instance['prices'] ) \u0026\u0026 is_array( $instance['prices'] ) ) ? $instance['prices'] : $this-\u003eprice_defaults;\n\n\t\t\t$base_link = add_query_arg(\n\t\t\t\tarray(\n\t\t\t\t\t'orderby' =\u003e apply_filters( 'invp_prefix_meta_key', 'price' ),\n\t\t\t\t\t'order'   =\u003e 'DESC',\n\t\t\t\t),\n\t\t\t\tget_post_type_archive_link( INVP::POST_TYPE )\n\t\t\t);\n\n\t\t\t$class_string = ( 'buttons' === ( $instance['display_type'] ?? '' ) ) ? '_button _button-med btn' : 'price-filter-text';\n\n\t\t\tforeach ( $price_points as $price_point ) {\n\t\t\t\t$this_link = add_query_arg( 'max_price', $price_point, $base_link );\n\t\t\t\tprintf(\n\t\t\t\t\t'\u003cdiv\u003e\u003ca href=\"%s\" class=\"%s\"\u003e\u003cspan class=\"dashicons dashicons-arrow-down-alt\"\u003e\u003c/span\u003e\u0026nbsp;$%s\u003c/a\u003e\u003c/div\u003e',\n\t\t\t\t\tesc_url( $this_link ),\n\t\t\t\t\tesc_attr( $class_string ),\n\t\t\t\t\tesc_html( number_format( $price_point, 0, '.', ',' ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $_GET['max_price'] ) ) {\n\t\t\tprintf(\n\t\t\t\t'\u003cdiv\u003e\u003ca href=\"%s\"\u003e%s $%s %s\u003c/a\u003e\u003c/div\u003e',",
        "detailedLines": [
          {
            "lineNumber": 81,
            "text": "\t/**"
          },
          {
            "lineNumber": 82,
            "text": "\t * Outputs the widget front-end HTML"
          },
          {
            "lineNumber": 83,
            "text": "\t *"
          },
          {
            "lineNumber": 84,
            "text": "\t * @param  array $args"
          },
          {
            "lineNumber": 85,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 86,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 87,
            "text": "\t */"
          },
          {
            "lineNumber": 88,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 89
          },
          {
            "lineNumber": 90,
            "text": "\t\t// Need the stylesheet for this content."
          },
          {
            "lineNumber": 91,
            "text": "\t\twp_enqueue_style( 'invp-maximum-price-filters' );"
          },
          {
            "lineNumber": 92
          },
          {
            "lineNumber": 93,
            "text": "\t\t$reset_link_only = ( isset( $instance['cb_reset_link_only'] ) \u0026\u0026 'true' === $instance['cb_reset_link_only'] );"
          },
          {
            "lineNumber": 94
          },
          {
            "lineNumber": 95,
            "text": "\t\tif ( $reset_link_only \u0026\u0026 ! isset( $_GET['max_price'] ) ) {"
          },
          {
            "lineNumber": 96,
            "text": "\t\t\treturn;"
          },
          {
            "lineNumber": 97,
            "text": "\t\t}"
          },
          {
            "lineNumber": 98
          },
          {
            "lineNumber": 99,
            "text": "\t\techo wp_kses_post( $args['before_widget'] ?? '' );"
          },
          {
            "lineNumber": 100
          },
          {
            "lineNumber": 101,
            "text": "\t\t$title = apply_filters( 'widget_title', $instance['title'] ?? '' );"
          },
          {
            "lineNumber": 102
          },
          {
            "lineNumber": 103,
            "text": "\t\tprintf( '\u003cdiv class=\"price-filter price-filter-%s\"\u003e', esc_attr( $instance['orientation'] ?? '' ) );"
          },
          {
            "lineNumber": 104,
            "text": "\t\tif ( ! empty( $title ) ) {"
          },
          {
            "lineNumber": 105,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 106,
            "text": "\t\t\t\t'\u003cdiv class=\"price-title\"\u003e%s%s%s\u003c/div\u003e',"
          },
          {
            "lineNumber": 107,
            "text": "\t\t\t\twp_kses_post( $args['before_title'] ?? '' ),"
          },
          {
            "lineNumber": 108,
            "text": "\t\t\t\tesc_html( $title ),"
          },
          {
            "lineNumber": 109,
            "text": "\t\t\t\twp_kses_post( $args['after_title'] ?? '' )"
          },
          {
            "lineNumber": 110,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 111,
            "text": "\t\t}"
          },
          {
            "lineNumber": 112
          },
          {
            "lineNumber": 113,
            "text": "\t\tif ( ! $reset_link_only ) {"
          },
          {
            "lineNumber": 114
          },
          {
            "lineNumber": 115,
            "text": "\t\t\t$price_points = ( isset( $instance['prices'] ) \u0026\u0026 is_array( $instance['prices'] ) ) ? $instance['prices'] : $this-\u003eprice_defaults;"
          },
          {
            "lineNumber": 116
          },
          {
            "lineNumber": 117,
            "text": "\t\t\t$base_link = add_query_arg("
          },
          {
            "lineNumber": 118,
            "text": "\t\t\t\tarray("
          },
          {
            "lineNumber": 119,
            "text": "\t\t\t\t\t'orderby' =\u003e apply_filters( 'invp_prefix_meta_key', 'price' ),"
          },
          {
            "lineNumber": 120,
            "text": "\t\t\t\t\t'order'   =\u003e 'DESC',"
          },
          {
            "lineNumber": 121,
            "text": "\t\t\t\t),"
          },
          {
            "lineNumber": 122,
            "text": "\t\t\t\tget_post_type_archive_link( INVP::POST_TYPE )"
          },
          {
            "lineNumber": 123,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 124
          },
          {
            "lineNumber": 125,
            "text": "\t\t\t$class_string = ( 'buttons' === ( $instance['display_type'] ?? '' ) ) ? '_button _button-med btn' : 'price-filter-text';"
          },
          {
            "lineNumber": 126
          },
          {
            "lineNumber": 127,
            "text": "\t\t\tforeach ( $price_points as $price_point ) {"
          },
          {
            "lineNumber": 128,
            "text": "\t\t\t\t$this_link = add_query_arg( 'max_price', $price_point, $base_link );"
          },
          {
            "lineNumber": 129,
            "text": "\t\t\t\tprintf("
          },
          {
            "lineNumber": 130,
            "text": "\t\t\t\t\t'\u003cdiv\u003e\u003ca href=\"%s\" class=\"%s\"\u003e\u003cspan class=\"dashicons dashicons-arrow-down-alt\"\u003e\u003c/span\u003e\u0026nbsp;$%s\u003c/a\u003e\u003c/div\u003e',"
          },
          {
            "lineNumber": 131,
            "text": "\t\t\t\t\tesc_url( $this_link ),"
          },
          {
            "lineNumber": 132,
            "text": "\t\t\t\t\tesc_attr( $class_string ),"
          },
          {
            "lineNumber": 133,
            "text": "\t\t\t\t\tesc_html( number_format( $price_point, 0, '.', ',' ) )"
          },
          {
            "lineNumber": 134,
            "text": "\t\t\t\t);"
          },
          {
            "lineNumber": 135,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 136,
            "text": "\t\t}"
          },
          {
            "lineNumber": 137
          },
          {
            "lineNumber": 138,
            "text": "\t\tif ( isset( $_GET['max_price'] ) ) {"
          },
          {
            "lineNumber": 139,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 140,
            "text": "\t\t\t\t'\u003cdiv\u003e\u003ca href=\"%s\"\u003e%s $%s %s\u003c/a\u003e\u003c/div\u003e',"
          }
        ],
        "range": {
          "endPosition": {
            "line": 140
          },
          "startPosition": {
            "line": 80
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-maximum-price-filter.php",
        "signatures": {}
      },
      "score": 0.24672353267669678
    },
    {
      "codeBlock": {
        "contents": "\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';\n\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\n\t\t\u003cp\u003e\n\t\t\u003c?php esc_html_e( 'Choose addresses to include:', 'inventory-presser' ); ?\u003e\n\t\t\u003c/p\u003e\n\t\t\u003c?php\n\n\t\t// get all location terms.\n\t\t$location_terms = get_terms(\n\t\t\tarray(\n\t\t\t\t'taxonomy'   =\u003e 'location',\n\t\t\t\t'hide_empty' =\u003e false,\n\t\t\t)\n\t\t);\n\n\t\t$location_slug = isset( $instance['location_slug'] ) ? $instance['location_slug'] : array();\n\t\tif ( ! is_array( $location_slug ) ) {\n\t\t\t$location_slug = array( $location_slug );\n\t\t}\n\n\t\t// loop through each location, set up form.\n\t\tforeach ( $location_terms as $index =\u003e $term_object ) {\n\t\t\tprintf(\n\t\t\t\t'\u003cp\u003e\u003cinput id=\"%1$s\" name=\"%2$s[]\" value=\"%3$s\" type=\"checkbox\"%4$s\u003e \u003clabel for=\"%1$s\"\u003e%5$s\u003c/label\u003e\u003c/p\u003e',\n\t\t\t\tesc_attr( $this-\u003eget_field_id( $term_object-\u003eslug ) ),\n\t\t\t\tesc_attr( $this-\u003eget_field_name( 'location_slug' ) ),\n\t\t\t\tesc_attr( $term_object-\u003eslug ),\n\t\t\t\tchecked( true, in_array( $term_object-\u003eslug, $location_slug, true ), false ),\n\t\t\t\tesc_html( str_replace( \"\\r\", '', str_replace( PHP_EOL, ', ', $term_object-\u003edescription ) ) )\n\t\t\t);\n\t\t}\n\n\t\t// Only show this if the API key is missing.\n\t\t$settings = INVP::settings();\n\t\tif ( empty( $settings['mapbox_public_token'] ) ) {\n\t\t\tprintf( '\u003cp\u003e%s\u003c/p\u003e', esc_html__( 'An API token from mapbox.com is required for this widget to work. Obtain a key at mapbox.com and save it on the Inventory Presser Options page.', 'inventory-presser' ) );\n\t\t}\n\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.",
        "detailedLines": [
          {
            "lineNumber": 166,
            "text": "\t/**"
          },
          {
            "lineNumber": 167,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 168,
            "text": "\t *"
          },
          {
            "lineNumber": 169,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 170,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 171,
            "text": "\t */"
          },
          {
            "lineNumber": 172,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 173
          },
          {
            "lineNumber": 174,
            "text": "\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';"
          },
          {
            "lineNumber": 175
          },
          {
            "lineNumber": 176,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 177,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 178,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 179,
            "text": "\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 180,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 181,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 182,
            "text": "\t\t\u003c?php esc_html_e( 'Choose addresses to include:', 'inventory-presser' ); ?\u003e"
          },
          {
            "lineNumber": 183,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 184,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 185
          },
          {
            "lineNumber": 186,
            "text": "\t\t// get all location terms."
          },
          {
            "lineNumber": 187,
            "text": "\t\t$location_terms = get_terms("
          },
          {
            "lineNumber": 188,
            "text": "\t\t\tarray("
          },
          {
            "lineNumber": 189,
            "text": "\t\t\t\t'taxonomy'   =\u003e 'location',"
          },
          {
            "lineNumber": 190,
            "text": "\t\t\t\t'hide_empty' =\u003e false,"
          },
          {
            "lineNumber": 191,
            "text": "\t\t\t)"
          },
          {
            "lineNumber": 192,
            "text": "\t\t);"
          },
          {
            "lineNumber": 193
          },
          {
            "lineNumber": 194,
            "text": "\t\t$location_slug = isset( $instance['location_slug'] ) ? $instance['location_slug'] : array();"
          },
          {
            "lineNumber": 195,
            "text": "\t\tif ( ! is_array( $location_slug ) ) {"
          },
          {
            "lineNumber": 196,
            "text": "\t\t\t$location_slug = array( $location_slug );"
          },
          {
            "lineNumber": 197,
            "text": "\t\t}"
          },
          {
            "lineNumber": 198
          },
          {
            "lineNumber": 199,
            "text": "\t\t// loop through each location, set up form."
          },
          {
            "lineNumber": 200,
            "text": "\t\tforeach ( $location_terms as $index =\u003e $term_object ) {"
          },
          {
            "lineNumber": 201,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 202,
            "text": "\t\t\t\t'\u003cp\u003e\u003cinput id=\"%1$s\" name=\"%2$s[]\" value=\"%3$s\" type=\"checkbox\"%4$s\u003e \u003clabel for=\"%1$s\"\u003e%5$s\u003c/label\u003e\u003c/p\u003e',"
          },
          {
            "lineNumber": 203,
            "text": "\t\t\t\tesc_attr( $this-\u003eget_field_id( $term_object-\u003eslug ) ),"
          },
          {
            "lineNumber": 204,
            "text": "\t\t\t\tesc_attr( $this-\u003eget_field_name( 'location_slug' ) ),"
          },
          {
            "lineNumber": 205,
            "text": "\t\t\t\tesc_attr( $term_object-\u003eslug ),"
          },
          {
            "lineNumber": 206,
            "text": "\t\t\t\tchecked( true, in_array( $term_object-\u003eslug, $location_slug, true ), false ),"
          },
          {
            "lineNumber": 207,
            "text": "\t\t\t\tesc_html( str_replace( \"\\r\", '', str_replace( PHP_EOL, ', ', $term_object-\u003edescription ) ) )"
          },
          {
            "lineNumber": 208,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 209,
            "text": "\t\t}"
          },
          {
            "lineNumber": 210
          },
          {
            "lineNumber": 211,
            "text": "\t\t// Only show this if the API key is missing."
          },
          {
            "lineNumber": 212,
            "text": "\t\t$settings = INVP::settings();"
          },
          {
            "lineNumber": 213,
            "text": "\t\tif ( empty( $settings['mapbox_public_token'] ) ) {"
          },
          {
            "lineNumber": 214,
            "text": "\t\t\tprintf( '\u003cp\u003e%s\u003c/p\u003e', esc_html__( 'An API token from mapbox.com is required for this widget to work. Obtain a key at mapbox.com and save it on the Inventory Presser Options page.', 'inventory-presser' ) );"
          },
          {
            "lineNumber": 215,
            "text": "\t\t}"
          },
          {
            "lineNumber": 216,
            "text": "\t}"
          },
          {
            "lineNumber": 217
          },
          {
            "lineNumber": 218,
            "text": "\t/**"
          },
          {
            "lineNumber": 219,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          }
        ],
        "range": {
          "endPosition": {
            "line": 219
          },
          "startPosition": {
            "line": 165
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-map.php",
        "signatures": {}
      },
      "score": 0.2387177050113678
    },
    {
      "codeBlock": {
        "contents": "\t\t}\n\t\techo '\u003cdiv id=\"slider-width\"\u003e\u003c/div\u003e\u003cdiv id=\"widget_slider\" class=\"flexslider\"\u003e\u003cul class=\"slides\"\u003e';\n\n\t\tforeach ( $inventory_ids as $inventory_id ) {\n\t\t\tprintf(\n\t\t\t\t'\u003cli style=\"position: relative\"\u003e\u003ca href=\"%s\"\u003e%s',\n\t\t\t\tesc_url( get_the_permalink( $inventory_id ) ),\n\t\t\t\tget_the_post_thumbnail( $inventory_id, 'large' )\n\t\t\t);\n\t\t\tif ( $showtext != 'none' ) {\n\t\t\t\tprintf( '\u003cdiv class=\"flex-caption flex-caption-%s\"\u003e', esc_attr( $showtext ) );\n\t\t\t\tif ( $showtitle ) {\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t'\u003ch3\u003e%s %s %s\u003c/h3\u003e',\n\t\t\t\t\t\tesc_html( invp_get_the_year( $inventory_id ) ),\n\t\t\t\t\t\tesc_html( invp_get_the_make( $inventory_id ) ),\n\t\t\t\t\t\tesc_html( invp_get_the_model( $inventory_id ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif ( $showprice ) {\n\t\t\t\t\tprintf( '\u003ch2\u003e%s\u003c/h2\u003e', esc_html( invp_get_the_price( '', $inventory_id ) ) );\n\t\t\t\t}\n\t\t\t\techo '\u003c/div\u003e';\n\t\t\t}\n\t\t\techo '\u003c/a\u003e\u003c/li\u003e';\n\t\t}\n\t\techo '\u003c/ul\u003e\u003c/div\u003e' . wp_kses_post( $args['after_widget'] );\n\t}\n\n\t/**\n\t * Outputs the widget settings form that is shown in the dashboard.\n\t *\n\t * @param  array $instance\n\t * @return void\n\t */\n\tpublic function form( $instance ) {\n\n\t\t$title     = isset( $instance['title'] ) ? $instance['title'] : '';",
        "detailedLines": [
          {
            "lineNumber": 178,
            "text": "\t\t}"
          },
          {
            "lineNumber": 179,
            "text": "\t\techo '\u003cdiv id=\"slider-width\"\u003e\u003c/div\u003e\u003cdiv id=\"widget_slider\" class=\"flexslider\"\u003e\u003cul class=\"slides\"\u003e';"
          },
          {
            "lineNumber": 180
          },
          {
            "lineNumber": 181,
            "text": "\t\tforeach ( $inventory_ids as $inventory_id ) {"
          },
          {
            "lineNumber": 182,
            "text": "\t\t\tprintf("
          },
          {
            "lineNumber": 183,
            "text": "\t\t\t\t'\u003cli style=\"position: relative\"\u003e\u003ca href=\"%s\"\u003e%s',"
          },
          {
            "lineNumber": 184,
            "text": "\t\t\t\tesc_url( get_the_permalink( $inventory_id ) ),"
          },
          {
            "lineNumber": 185,
            "text": "\t\t\t\tget_the_post_thumbnail( $inventory_id, 'large' )"
          },
          {
            "lineNumber": 186,
            "text": "\t\t\t);"
          },
          {
            "lineNumber": 187,
            "text": "\t\t\tif ( $showtext != 'none' ) {"
          },
          {
            "lineNumber": 188,
            "text": "\t\t\t\tprintf( '\u003cdiv class=\"flex-caption flex-caption-%s\"\u003e', esc_attr( $showtext ) );"
          },
          {
            "lineNumber": 189,
            "text": "\t\t\t\tif ( $showtitle ) {"
          },
          {
            "lineNumber": 190,
            "text": "\t\t\t\t\tprintf("
          },
          {
            "lineNumber": 191,
            "text": "\t\t\t\t\t\t'\u003ch3\u003e%s %s %s\u003c/h3\u003e',"
          },
          {
            "lineNumber": 192,
            "text": "\t\t\t\t\t\tesc_html( invp_get_the_year( $inventory_id ) ),"
          },
          {
            "lineNumber": 193,
            "text": "\t\t\t\t\t\tesc_html( invp_get_the_make( $inventory_id ) ),"
          },
          {
            "lineNumber": 194,
            "text": "\t\t\t\t\t\tesc_html( invp_get_the_model( $inventory_id ) )"
          },
          {
            "lineNumber": 195,
            "text": "\t\t\t\t\t);"
          },
          {
            "lineNumber": 196,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 197,
            "text": "\t\t\t\tif ( $showprice ) {"
          },
          {
            "lineNumber": 198,
            "text": "\t\t\t\t\tprintf( '\u003ch2\u003e%s\u003c/h2\u003e', esc_html( invp_get_the_price( '', $inventory_id ) ) );"
          },
          {
            "lineNumber": 199,
            "text": "\t\t\t\t}"
          },
          {
            "lineNumber": 200,
            "text": "\t\t\t\techo '\u003c/div\u003e';"
          },
          {
            "lineNumber": 201,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 202,
            "text": "\t\t\techo '\u003c/a\u003e\u003c/li\u003e';"
          },
          {
            "lineNumber": 203,
            "text": "\t\t}"
          },
          {
            "lineNumber": 204,
            "text": "\t\techo '\u003c/ul\u003e\u003c/div\u003e' . wp_kses_post( $args['after_widget'] );"
          },
          {
            "lineNumber": 205,
            "text": "\t}"
          },
          {
            "lineNumber": 206
          },
          {
            "lineNumber": 207,
            "text": "\t/**"
          },
          {
            "lineNumber": 208,
            "text": "\t * Outputs the widget settings form that is shown in the dashboard."
          },
          {
            "lineNumber": 209,
            "text": "\t *"
          },
          {
            "lineNumber": 210,
            "text": "\t * @param  array $instance"
          },
          {
            "lineNumber": 211,
            "text": "\t * @return void"
          },
          {
            "lineNumber": 212,
            "text": "\t */"
          },
          {
            "lineNumber": 213,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 214
          },
          {
            "lineNumber": 215,
            "text": "\t\t$title     = isset( $instance['title'] ) ? $instance['title'] : '';"
          }
        ],
        "range": {
          "endPosition": {
            "line": 215
          },
          "startPosition": {
            "line": 177
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-inventory-slider.php",
        "signatures": {}
      },
      "score": 0.23084139823913574
    },
    {
      "codeBlock": {
        "contents": "\tpublic function form( $instance ) {\n\t\t$title = ( isset( $instance['title'] ) ? $instance['title'] : '' );\n\t\t?\u003e\n\t\t\u003cp\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e\n\t\t\u003c/p\u003e\u003cp\u003e\n\t\t\t\u003cinput type=\"checkbox\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'include_annual_stats' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'include_annual_stats' ) ); ?\u003e\" value=\"true\"\u003c?php checked( 'true', ( isset( $instance['include_annual_stats'] ) ? $instance['include_annual_stats'] : '' ) ); ?\u003e\u003e\n\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'include_annual_stats' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Include annual consumption, cost \u0026amp; emissions', 'inventory-presser' ); ?\u003e\u003c/label\u003e\n\t\t\u003c/p\u003e\n\t\t\u003c?php\n\t}\n\n\t/**\n\t * Saves the widget settings when a dashboard user clicks the Save button.\n\t *\n\t * @param  array $new_instance\n\t * @param  array $old_instance\n\t * @return array The updated array full of settings\n\t */\n\tpublic function update( $new_instance, $old_instance ) {\n\t\t$instance          = array();\n\t\t$instance['title'] = sanitize_text_field( $new_instance['title'] );\n\t\tif ( ! empty( $new_instance['include_annual_stats'] ) ) {\n\t\t\t$instance['include_annual_stats'] = 'true';\n\t\t}\n\t\treturn $instance;\n\t}\n\n\t/**\n\t * Outputs the content of the widget\n\t *\n\t * @param array $args\n\t * @param array $instance\n\t */\n\tpublic function widget( $args, $instance ) {\n\t\t// if we aren't looking at a single vehicle, abort.",
        "detailedLines": [
          {
            "lineNumber": 48,
            "text": "\tpublic function form( $instance ) {"
          },
          {
            "lineNumber": 49,
            "text": "\t\t$title = ( isset( $instance['title'] ) ? $instance['title'] : '' );"
          },
          {
            "lineNumber": 50,
            "text": "\t\t?\u003e"
          },
          {
            "lineNumber": 51,
            "text": "\t\t\u003cp\u003e"
          },
          {
            "lineNumber": 52,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Title:', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 53,
            "text": "\t\t\t\u003cinput class=\"widefat\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'title' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'title' ) ); ?\u003e\" type=\"text\" value=\"\u003c?php echo esc_attr( $title ); ?\u003e\" /\u003e"
          },
          {
            "lineNumber": 54,
            "text": "\t\t\u003c/p\u003e\u003cp\u003e"
          },
          {
            "lineNumber": 55,
            "text": "\t\t\t\u003cinput type=\"checkbox\" id=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'include_annual_stats' ) ); ?\u003e\" name=\"\u003c?php echo esc_attr( $this-\u003eget_field_name( 'include_annual_stats' ) ); ?\u003e\" value=\"true\"\u003c?php checked( 'true', ( isset( $instance['include_annual_stats'] ) ? $instance['include_annual_stats'] : '' ) ); ?\u003e\u003e"
          },
          {
            "lineNumber": 56,
            "text": "\t\t\t\u003clabel for=\"\u003c?php echo esc_attr( $this-\u003eget_field_id( 'include_annual_stats' ) ); ?\u003e\"\u003e\u003c?php esc_html_e( 'Include annual consumption, cost \u0026amp; emissions', 'inventory-presser' ); ?\u003e\u003c/label\u003e"
          },
          {
            "lineNumber": 57,
            "text": "\t\t\u003c/p\u003e"
          },
          {
            "lineNumber": 58,
            "text": "\t\t\u003c?php"
          },
          {
            "lineNumber": 59,
            "text": "\t}"
          },
          {
            "lineNumber": 60
          },
          {
            "lineNumber": 61,
            "text": "\t/**"
          },
          {
            "lineNumber": 62,
            "text": "\t * Saves the widget settings when a dashboard user clicks the Save button."
          },
          {
            "lineNumber": 63,
            "text": "\t *"
          },
          {
            "lineNumber": 64,
            "text": "\t * @param  array $new_instance"
          },
          {
            "lineNumber": 65,
            "text": "\t * @param  array $old_instance"
          },
          {
            "lineNumber": 66,
            "text": "\t * @return array The updated array full of settings"
          },
          {
            "lineNumber": 67,
            "text": "\t */"
          },
          {
            "lineNumber": 68,
            "text": "\tpublic function update( $new_instance, $old_instance ) {"
          },
          {
            "lineNumber": 69,
            "text": "\t\t$instance          = array();"
          },
          {
            "lineNumber": 70,
            "text": "\t\t$instance['title'] = sanitize_text_field( $new_instance['title'] );"
          },
          {
            "lineNumber": 71,
            "text": "\t\tif ( ! empty( $new_instance['include_annual_stats'] ) ) {"
          },
          {
            "lineNumber": 72,
            "text": "\t\t\t$instance['include_annual_stats'] = 'true';"
          },
          {
            "lineNumber": 73,
            "text": "\t\t}"
          },
          {
            "lineNumber": 74,
            "text": "\t\treturn $instance;"
          },
          {
            "lineNumber": 75,
            "text": "\t}"
          },
          {
            "lineNumber": 76
          },
          {
            "lineNumber": 77,
            "text": "\t/**"
          },
          {
            "lineNumber": 78,
            "text": "\t * Outputs the content of the widget"
          },
          {
            "lineNumber": 79,
            "text": "\t *"
          },
          {
            "lineNumber": 80,
            "text": "\t * @param array $args"
          },
          {
            "lineNumber": 81,
            "text": "\t * @param array $instance"
          },
          {
            "lineNumber": 82,
            "text": "\t */"
          },
          {
            "lineNumber": 83,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 84,
            "text": "\t\t// if we aren't looking at a single vehicle, abort."
          }
        ],
        "range": {
          "endPosition": {
            "line": 84
          },
          "startPosition": {
            "line": 47
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-fuel-economy.php",
        "signatures": {}
      },
      "score": 0.22944630682468414
    },
    {
      "codeBlock": {
        "contents": "\tpublic function widget( $args, $instance ) {\n\t\t// If there is no API key, we're not showing anything\n\t\tif ( empty( $instance['api_key'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Turn an array of location term slugs into an array of address data\n\t\t$popups         = array();\n\t\t$location_terms = get_terms(\n\t\t\tarray(\n\t\t\t\t'hide_empty' =\u003e false,\n\t\t\t\t'slug'       =\u003e $instance['location_slugs'],\n\t\t\t\t'taxonomy'   =\u003e 'location',\n\t\t\t)\n\t\t);\n\t\t$location_count = count( $location_terms );\n\t\tfor ( $t = 0; $t \u003c $location_count; $t++ ) {\n\t\t\t$popup = new stdClass();\n\t\t\t/**\n\t\t\t * Store the widget ID in case there are two instances of this\n\t\t\t * widget on the same page.\n\t\t\t */\n\t\t\t$popup-\u003ewidget_id = $args['widget_id'] ?? 0;\n\t\t\t// Location title/dealership name - escape to prevent XSS.\n\t\t\t$popup-\u003ename = esc_html( $location_terms[ $t ]-\u003ename );\n\t\t\t// Address - allow \u003cbr /\u003e tags but escape other HTML to prevent XSS.\n\t\t\t$popup-\u003eaddress = wp_kses_post( str_replace( \"\\r\", '', str_replace( PHP_EOL, '\u003cbr /\u003e', $location_terms[ $t ]-\u003edescription ) ) );\n\t\t\t// Get the latitude and longitude coordinates for this address.\n\t\t\t$location = INVP::fetch_latitude_and_longitude( $location_terms[ $t ]-\u003eterm_id );\n\t\t\tif ( false !== $location ) {\n\t\t\t\t$popup-\u003ecoords      = new stdClass();\n\t\t\t\t$popup-\u003ecoords-\u003elat = $location-\u003elat;\n\t\t\t\t$popup-\u003ecoords-\u003elon = $location-\u003elon;\n\t\t\t}\n\n\t\t\t$meta         = get_term_meta( $location_terms[ $t ]-\u003eterm_id );\n\t\t\t$popup-\u003ecity  = $meta['address_city'][0] ?? '';\n\t\t\t$popup-\u003estate = $meta['address_state'][0] ?? '';\n\t\t\t$popup-\u003ezip   = $meta['address_zip'][0] ?? '';\n\n\t\t\t$popups[] = $popup;\n\t\t}\n\n\t\t// Enqueue JavaScript.\n\t\twp_register_script(\n\t\t\tself::ID_BASE . '_goog',\n\t\t\t'https://maps.googleapis.com/maps/api/js?key=' . $instance['api_key'],\n\t\t\tarray(),\n\t\t\tINVP_PLUGIN_VERSION,\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script( self::ID_BASE . '_goog' );\n\t\twp_enqueue_script( self::ID_BASE );\n\t\twp_add_inline_script(\n\t\t\tself::ID_BASE,\n\t\t\t'const ' . self::ID_BASE . ' = ' . wp_json_encode(\n\t\t\t\t",
        "detailedLines": [
          {
            "lineNumber": 59,
            "text": "\tpublic function widget( $args, $instance ) {"
          },
          {
            "lineNumber": 60,
            "text": "\t\t// If there is no API key, we're not showing anything"
          },
          {
            "lineNumber": 61,
            "text": "\t\tif ( empty( $instance['api_key'] ) ) {"
          },
          {
            "lineNumber": 62,
            "text": "\t\t\treturn;"
          },
          {
            "lineNumber": 63,
            "text": "\t\t}"
          },
          {
            "lineNumber": 64
          },
          {
            "lineNumber": 65,
            "text": "\t\t// Turn an array of location term slugs into an array of address data"
          },
          {
            "lineNumber": 66,
            "text": "\t\t$popups         = array();"
          },
          {
            "lineNumber": 67,
            "text": "\t\t$location_terms = get_terms("
          },
          {
            "lineNumber": 68,
            "text": "\t\t\tarray("
          },
          {
            "lineNumber": 69,
            "text": "\t\t\t\t'hide_empty' =\u003e false,"
          },
          {
            "lineNumber": 70,
            "text": "\t\t\t\t'slug'       =\u003e $instance['location_slugs'],"
          },
          {
            "lineNumber": 71,
            "text": "\t\t\t\t'taxonomy'   =\u003e 'location',"
          },
          {
            "lineNumber": 72,
            "text": "\t\t\t)"
          },
          {
            "lineNumber": 73,
            "text": "\t\t);"
          },
          {
            "lineNumber": 74,
            "text": "\t\t$location_count = count( $location_terms );"
          },
          {
            "lineNumber": 75,
            "text": "\t\tfor ( $t = 0; $t \u003c $location_count; $t++ ) {"
          },
          {
            "lineNumber": 76,
            "text": "\t\t\t$popup = new stdClass();"
          },
          {
            "lineNumber": 77,
            "text": "\t\t\t/**"
          },
          {
            "lineNumber": 78,
            "text": "\t\t\t * Store the widget ID in case there are two instances of this"
          },
          {
            "lineNumber": 79,
            "text": "\t\t\t * widget on the same page."
          },
          {
            "lineNumber": 80,
            "text": "\t\t\t */"
          },
          {
            "lineNumber": 81,
            "text": "\t\t\t$popup-\u003ewidget_id = $args['widget_id'] ?? 0;"
          },
          {
            "lineNumber": 82,
            "text": "\t\t\t// Location title/dealership name - escape to prevent XSS."
          },
          {
            "lineNumber": 83,
            "text": "\t\t\t$popup-\u003ename = esc_html( $location_terms[ $t ]-\u003ename );"
          },
          {
            "lineNumber": 84,
            "text": "\t\t\t// Address - allow \u003cbr /\u003e tags but escape other HTML to prevent XSS."
          },
          {
            "lineNumber": 85,
            "text": "\t\t\t$popup-\u003eaddress = wp_kses_post( str_replace( \"\\r\", '', str_replace( PHP_EOL, '\u003cbr /\u003e', $location_terms[ $t ]-\u003edescription ) ) );"
          },
          {
            "lineNumber": 86,
            "text": "\t\t\t// Get the latitude and longitude coordinates for this address."
          },
          {
            "lineNumber": 87,
            "text": "\t\t\t$location = INVP::fetch_latitude_and_longitude( $location_terms[ $t ]-\u003eterm_id );"
          },
          {
            "lineNumber": 88,
            "text": "\t\t\tif ( false !== $location ) {"
          },
          {
            "lineNumber": 89,
            "text": "\t\t\t\t$popup-\u003ecoords      = new stdClass();"
          },
          {
            "lineNumber": 90,
            "text": "\t\t\t\t$popup-\u003ecoords-\u003elat = $location-\u003elat;"
          },
          {
            "lineNumber": 91,
            "text": "\t\t\t\t$popup-\u003ecoords-\u003elon = $location-\u003elon;"
          },
          {
            "lineNumber": 92,
            "text": "\t\t\t}"
          },
          {
            "lineNumber": 93
          },
          {
            "lineNumber": 94,
            "text": "\t\t\t$meta         = get_term_meta( $location_terms[ $t ]-\u003eterm_id );"
          },
          {
            "lineNumber": 95,
            "text": "\t\t\t$popup-\u003ecity  = $meta['address_city'][0] ?? '';"
          },
          {
            "lineNumber": 96,
            "text": "\t\t\t$popup-\u003estate = $meta['address_state'][0] ?? '';"
          },
          {
            "lineNumber": 97,
            "text": "\t\t\t$popup-\u003ezip   = $meta['address_zip'][0] ?? '';"
          },
          {
            "lineNumber": 98
          },
          {
            "lineNumber": 99,
            "text": "\t\t\t$popups[] = $popup;"
          },
          {
            "lineNumber": 100,
            "text": "\t\t}"
          },
          {
            "lineNumber": 101
          },
          {
            "lineNumber": 102,
            "text": "\t\t// Enqueue JavaScript."
          },
          {
            "lineNumber": 103,
            "text": "\t\twp_register_script("
          },
          {
            "lineNumber": 104,
            "text": "\t\t\tself::ID_BASE . '_goog',"
          },
          {
            "lineNumber": 105,
            "text": "\t\t\t'https://maps.googleapis.com/maps/api/js?key=' . $instance['api_key'],"
          },
          {
            "lineNumber": 106,
            "text": "\t\t\tarray(),"
          },
          {
            "lineNumber": 107,
            "text": "\t\t\tINVP_PLUGIN_VERSION,"
          },
          {
            "lineNumber": 108,
            "text": "\t\t\ttrue"
          },
          {
            "lineNumber": 109,
            "text": "\t\t);"
          },
          {
            "lineNumber": 110,
            "text": "\t\twp_enqueue_script( self::ID_BASE . '_goog' );"
          },
          {
            "lineNumber": 111,
            "text": "\t\twp_enqueue_script( self::ID_BASE );"
          },
          {
            "lineNumber": 112,
            "text": "\t\twp_add_inline_script("
          },
          {
            "lineNumber": 113,
            "text": "\t\t\tself::ID_BASE,"
          },
          {
            "lineNumber": 114,
            "text": "\t\t\t'const ' . self::ID_BASE . ' = ' . wp_json_encode("
          },
          {
            "lineNumber": 115,
            "text": "\t\t\t\t"
          }
        ],
        "range": {
          "endPosition": {
            "column": 4,
            "line": 114
          },
          "startPosition": {
            "line": 58
          }
        },
        "relativeWorkspacePath": "./includes/widget/class-widget-google-maps-v3.php",
        "signatures": {}
      },
      "score": 0.22242559492588043
    }
  ]
}
```
Status: **completed**


</details>
</tool-use>

<tool-use data-tool-type="unknown" data-tool-name="semantic_search_full"><details>
<summary>Tool use: **semantic_search_full**</summary>

</details></tool-use>

_**Agent (composer-1)**_


Reading each widget's `form()` method to check for `wp_kses_post()` usage on form controls:


_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-address.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-hours.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-order-by.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-inventory-grid.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_


Checking the remaining widgets:


_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-kbb.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-carfax.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-maximum-price-filter.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-inventory-slider.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-map.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-fuel-economy.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-google-maps.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-google-maps-v3.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_


Checking for `wp_kses_post` wrapping form controls in `form()` methods:


_**Agent (composer-1)**_

<tool-use data-tool-type="unknown" data-tool-name="ripgrep_raw_search">
<details>
<summary>Tool use: **ripgrep_raw_search**</summary>


Parameters:

```json
{
  "caseInsensitive": true,
  "path": "includes/widget",
  "pattern": "echo.*wp_kses_post.*table|wp_kses_post.*input|wp_kses_post.*checkbox|wp_kses_post.*select"
}
```
Result:

```json
{
  "success": {
    "outputMode": "content",
    "path": "includes/widget",
    "pattern": "echo.*wp_kses_post.*table|wp_kses_post.*input|wp_kses_post.*checkbox|wp_kses_post.*select",
    "workspaceResults": {
      "/Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser": {
        "content": {}
      }
    }
  }
}
```
Status: **completed**


</details>
</tool-use>

<tool-use data-tool-type="unknown" data-tool-name="ripgrep_raw_search"><details>
<summary>Tool use: **ripgrep_raw_search**</summary>

</details></tool-use>

_**Agent (composer-1)**_

<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/includes/widget/class-widget-address.php</summary>

</details>
</tool-use>

<tool-use data-tool-type="read" data-tool-name="read_file_v2"><details>
<summary>Tool use: **read_file_v2**</summary>

</details></tool-use>

_**Agent (composer-1)**_


Summary: Only `class-widget-phones.php` had this issue, and it's fixed.

Findings:
1. `class-widget-phones.php` — fixed (was using `wp_kses_post()` on a table containing checkboxes)
2. `class-widget-address.php` — OK (`wp_kses_post()` only on description text, not the checkbox)
3. `class-widget-hours.php` — OK (table output directly without `wp_kses_post()`)
4. All other widgets — OK (no `wp_kses_post()` wrapping form controls in their `form()` methods)

All widgets output form controls directly or build HTML strings with properly escaped values, then output them without `wp_kses_post()` wrapping the controls. This is correct for admin forms.

The only issue was in the phones widget, which is now fixed.
