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

<!-- cursor Session 9e32ff47-edb0-4a0c-bc66-6aec6fcfbe14 (2026-01-29 14:12Z) -->

# Inventory slider shortcode arguments (2026-01-29 14:12Z)

_**User**_

@includes/shortcode/class-shortcode-inventory-slider.php this short code needs more arguments like make and model. i want to add type and condition. both are meta fields managed elsewhere in this plugin. type="SUV" or type="car". condition="used" condition="new" 

---

_**Agent (model composer-1, mode Agent)**_


Reviewing the shortcode file to understand its structure, then adding `type` and `condition` arguments.


---

<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/shortcode/class-shortcode-inventory-slider.php</summary>

</details>
</tool-use>

---

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


Parameters:

```json
{
  "query": "How are vehicle type and condition meta fields used in queries and filters?",
  "topK": 10,
  "explanation": ""
}
```
Result:

```json
{
  "codeResults": [
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-range-filters.php",
        "range": {
          "startPosition": {
            "line": 74
          },
          "endPosition": {
            "line": 155
          }
        },
        "contents": "\t\t\treturn null;\n\t\t}\n\n\t\t/**\n\t\t * Modifies the queries with the vehicle post type to include price and\n\t\t * odometer ranges, if they're also provided.\n\t\t *\n\t\t * @param  mixed $query\n\t\t * @return void\n\t\t */\n\t\tpublic static function modify_query_for_price_and_odometer_ranges( $query ) {\n\t\t\t// Is this query for vehicles?\n\t\t\tif ( INVP::POST_TYPE !== $query-&gt;get( 'post_type', '' ) ) {\n\t\t\t\t// No.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( is_admin() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only filter the main query unless an override filter.\n\t\t\tif ( ! $query-&gt;is_main_query() &amp;&amp; apply_filters( 'invp_range_filters_main_query', true ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Is there a filter in the query string?\n\t\t\tif ( ! isset( $_GET['min_price'] )\n\t\t\t\t&amp;&amp; ! isset( $_GET['max_price'] )\n\t\t\t\t&amp;&amp; ! isset( $_GET['min_odometer'] )\n\t\t\t\t&amp;&amp; ! isset( $_GET['max_odometer'] )\n\t\t\t\t&amp;&amp; ! isset( $_GET['min_down'] )\n\t\t\t\t&amp;&amp; ! isset( $_GET['max_down'] )\n\t\t\t) {\n\t\t\t\t// No.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Get original meta query.\n\t\t\t$meta_query = $query-&gt;get( 'meta_query', array() );\n\t\t\tif ( ! is_array( $meta_query ) ) {\n\t\t\t\t$meta_query = array();\n\t\t\t}\n\n\t\t\t$meta_query['relation'] = 'AND';\n\n\t\t\t// Price filters.\n\t\t\tif ( isset( $_GET['max_price'] ) ) {\n\t\t\t\t$meta_query = self::add_meta_query(\n\t\t\t\t\t$meta_query,\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'price' ),\n\t\t\t\t\t(int) $_GET['max_price'],\n\t\t\t\t\t'&lt;=',\n\t\t\t\t\t'numeric'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( isset( $_GET['min_price'] ) ) {\n\t\t\t\t$meta_query = self::add_meta_query(\n\t\t\t\t\t$meta_query,\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'price' ),\n\t\t\t\t\t(int) $_GET['min_price'],\n\t\t\t\t\t'&gt;=',\n\t\t\t\t\t'numeric'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Odometer filters.\n\t\t\tif ( isset( $_GET['min_odometer'] ) ) {\n\t\t\t\t$meta_query = self::add_meta_query(\n\t\t\t\t\t$meta_query,\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'odometer' ),\n\t\t\t\t\t(int) $_GET['min_odometer'],\n\t\t\t\t\t'&gt;=',\n\t\t\t\t\t'numeric'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( isset( $_GET['max_odometer'] ) ) {\n\t\t\t\t$meta_query = self::add_meta_query(\n\t\t\t\t\t$meta_query,",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\treturn null;",
            "lineNumber": 75
          },
          {
            "text": "\t\t}",
            "lineNumber": 76
          },
          {
            "lineNumber": 77
          },
          {
            "text": "\t\t/**",
            "lineNumber": 78
          },
          {
            "text": "\t\t * Modifies the queries with the vehicle post type to include price and",
            "lineNumber": 79
          },
          {
            "text": "\t\t * odometer ranges, if they're also provided.",
            "lineNumber": 80
          },
          {
            "text": "\t\t *",
            "lineNumber": 81
          },
          {
            "text": "\t\t * @param  mixed $query",
            "lineNumber": 82
          },
          {
            "text": "\t\t * @return void",
            "lineNumber": 83
          },
          {
            "text": "\t\t */",
            "lineNumber": 84
          },
          {
            "text": "\t\tpublic static function modify_query_for_price_and_odometer_ranges( $query ) {",
            "lineNumber": 85
          },
          {
            "text": "\t\t\t// Is this query for vehicles?",
            "lineNumber": 86
          },
          {
            "text": "\t\t\tif ( INVP::POST_TYPE !== $query-&gt;get( 'post_type', '' ) ) {",
            "lineNumber": 87
          },
          {
            "text": "\t\t\t\t// No.",
            "lineNumber": 88
          },
          {
            "text": "\t\t\t\treturn;",
            "lineNumber": 89
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 90
          },
          {
            "lineNumber": 91
          },
          {
            "text": "\t\t\tif ( is_admin() ) {",
            "lineNumber": 92
          },
          {
            "text": "\t\t\t\treturn;",
            "lineNumber": 93
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 94
          },
          {
            "lineNumber": 95
          },
          {
            "text": "\t\t\t// Only filter the main query unless an override filter.",
            "lineNumber": 96
          },
          {
            "text": "\t\t\tif ( ! $query-&gt;is_main_query() &amp;&amp; apply_filters( 'invp_range_filters_main_query', true ) ) {",
            "lineNumber": 97
          },
          {
            "text": "\t\t\t\treturn;",
            "lineNumber": 98
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 99
          },
          {
            "lineNumber": 100
          },
          {
            "text": "\t\t\t// Is there a filter in the query string?",
            "lineNumber": 101
          },
          {
            "text": "\t\t\tif ( ! isset( $_GET['min_price'] )",
            "lineNumber": 102
          },
          {
            "text": "\t\t\t\t&amp;&amp; ! isset( $_GET['max_price'] )",
            "lineNumber": 103
          },
          {
            "text": "\t\t\t\t&amp;&amp; ! isset( $_GET['min_odometer'] )",
            "lineNumber": 104
          },
          {
            "text": "\t\t\t\t&amp;&amp; ! isset( $_GET['max_odometer'] )",
            "lineNumber": 105
          },
          {
            "text": "\t\t\t\t&amp;&amp; ! isset( $_GET['min_down'] )",
            "lineNumber": 106
          },
          {
            "text": "\t\t\t\t&amp;&amp; ! isset( $_GET['max_down'] )",
            "lineNumber": 107
          },
          {
            "text": "\t\t\t) {",
            "lineNumber": 108
          },
          {
            "text": "\t\t\t\t// No.",
            "lineNumber": 109
          },
          {
            "text": "\t\t\t\treturn;",
            "lineNumber": 110
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 111
          },
          {
            "lineNumber": 112
          },
          {
            "text": "\t\t\t// Get original meta query.",
            "lineNumber": 113
          },
          {
            "text": "\t\t\t$meta_query = $query-&gt;get( 'meta_query', array() );",
            "lineNumber": 114
          },
          {
            "text": "\t\t\tif ( ! is_array( $meta_query ) ) {",
            "lineNumber": 115
          },
          {
            "text": "\t\t\t\t$meta_query = array();",
            "lineNumber": 116
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 117
          },
          {
            "lineNumber": 118
          },
          {
            "text": "\t\t\t$meta_query['relation'] = 'AND';",
            "lineNumber": 119
          },
          {
            "lineNumber": 120
          },
          {
            "text": "\t\t\t// Price filters.",
            "lineNumber": 121
          },
          {
            "text": "\t\t\tif ( isset( $_GET['max_price'] ) ) {",
            "lineNumber": 122
          },
          {
            "text": "\t\t\t\t$meta_query = self::add_meta_query(",
            "lineNumber": 123
          },
          {
            "text": "\t\t\t\t\t$meta_query,",
            "lineNumber": 124
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'price' ),",
            "lineNumber": 125
          },
          {
            "text": "\t\t\t\t\t(int) $_GET['max_price'],",
            "lineNumber": 126
          },
          {
            "text": "\t\t\t\t\t'&lt;=',",
            "lineNumber": 127
          },
          {
            "text": "\t\t\t\t\t'numeric'",
            "lineNumber": 128
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 129
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 130
          },
          {
            "lineNumber": 131
          },
          {
            "text": "\t\t\tif ( isset( $_GET['min_price'] ) ) {",
            "lineNumber": 132
          },
          {
            "text": "\t\t\t\t$meta_query = self::add_meta_query(",
            "lineNumber": 133
          },
          {
            "text": "\t\t\t\t\t$meta_query,",
            "lineNumber": 134
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'price' ),",
            "lineNumber": 135
          },
          {
            "text": "\t\t\t\t\t(int) $_GET['min_price'],",
            "lineNumber": 136
          },
          {
            "text": "\t\t\t\t\t'&gt;=',",
            "lineNumber": 137
          },
          {
            "text": "\t\t\t\t\t'numeric'",
            "lineNumber": 138
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 139
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 140
          },
          {
            "lineNumber": 141
          },
          {
            "text": "\t\t\t// Odometer filters.",
            "lineNumber": 142
          },
          {
            "text": "\t\t\tif ( isset( $_GET['min_odometer'] ) ) {",
            "lineNumber": 143
          },
          {
            "text": "\t\t\t\t$meta_query = self::add_meta_query(",
            "lineNumber": 144
          },
          {
            "text": "\t\t\t\t\t$meta_query,",
            "lineNumber": 145
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'odometer' ),",
            "lineNumber": 146
          },
          {
            "text": "\t\t\t\t\t(int) $_GET['min_odometer'],",
            "lineNumber": 147
          },
          {
            "text": "\t\t\t\t\t'&gt;=',",
            "lineNumber": 148
          },
          {
            "text": "\t\t\t\t\t'numeric'",
            "lineNumber": 149
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 150
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 151
          },
          {
            "lineNumber": 152
          },
          {
            "text": "\t\t\tif ( isset( $_GET['max_odometer'] ) ) {",
            "lineNumber": 153
          },
          {
            "text": "\t\t\t\t$meta_query = self::add_meta_query(",
            "lineNumber": 154
          },
          {
            "text": "\t\t\t\t\t$meta_query,",
            "lineNumber": 155
          }
        ]
      },
      "score": 0.4355405569076538
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 258
          },
          "endPosition": {
            "line": 311
          }
        },
        "contents": "\t\t\t\t\t);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t// Boat fields might not exist on all vehicles. Do not require them.\r\n\t\t\t\tcase 'beam':\r\n\t\t\t\tcase 'condition_boat':\r\n\t\t\t\tcase 'draft':\r\n\t\t\t\tcase 'engine_count':\r\n\t\t\t\tcase 'engine_make':\r\n\t\t\t\tcase 'engine_model':\r\n\t\t\t\tcase 'horsepower':\r\n\t\t\t\tcase 'hull_material':\r\n\t\t\t\tcase 'length':\r\n\t\t\t\t\t$query-&gt;set( 'meta_key', '' );\r\n\t\t\t\t\t$query-&gt;set(\r\n\t\t\t\t\t\t'meta_query',\r\n\t\t\t\t\t\tarray_merge(\r\n\t\t\t\t\t\t\t$old,\r\n\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'key'     =&gt; $key,\r\n\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'key'     =&gt; $key,\r\n\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t$meta_value_or_meta_value_num = 'meta_value';\r\n\t\t\t$key_is_odometer              = apply_filters( 'invp_prefix_meta_key', 'odometer' ) === $key;\r\n\r\n\t\t\tif ( INVP::meta_value_is_number( $key ) || $key_is_odometer ) {\r\n\t\t\t\t$meta_value_or_meta_value_num .= '_num';\r\n\t\t\t}\r\n\r\n\t\t\t// Customize the ORDER BY to remove non-digits from the odometer.\r\n\t\t\tif ( $key_is_odometer ) {\r\n\t\t\t\tadd_filter( 'posts_orderby', array( $this, 'change_order_by_for_odometer' ), 10, 2 );\r\n\t\t\t}\r\n\r\n\t\t\t// Allow other developers to decide if the post meta values are numbers.\r\n\t\t\t$query-&gt;set( 'orderby', apply_filters( 'invp_meta_value_or_meta_value_num', $meta_value_or_meta_value_num, $key ) );\r\n\t\t\t$query-&gt;set( 'order', $direction );\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Removes commas from the meta value used in the ORDER BY of the query so\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t\t\t);\r",
            "lineNumber": 259
          },
          {
            "text": "\t\t\t\t\tbreak;\r",
            "lineNumber": 260
          },
          {
            "text": "\r",
            "lineNumber": 261
          },
          {
            "text": "\t\t\t\t// Boat fields might not exist on all vehicles. Do not require them.\r",
            "lineNumber": 262
          },
          {
            "text": "\t\t\t\tcase 'beam':\r",
            "lineNumber": 263
          },
          {
            "text": "\t\t\t\tcase 'condition_boat':\r",
            "lineNumber": 264
          },
          {
            "text": "\t\t\t\tcase 'draft':\r",
            "lineNumber": 265
          },
          {
            "text": "\t\t\t\tcase 'engine_count':\r",
            "lineNumber": 266
          },
          {
            "text": "\t\t\t\tcase 'engine_make':\r",
            "lineNumber": 267
          },
          {
            "text": "\t\t\t\tcase 'engine_model':\r",
            "lineNumber": 268
          },
          {
            "text": "\t\t\t\tcase 'horsepower':\r",
            "lineNumber": 269
          },
          {
            "text": "\t\t\t\tcase 'hull_material':\r",
            "lineNumber": 270
          },
          {
            "text": "\t\t\t\tcase 'length':\r",
            "lineNumber": 271
          },
          {
            "text": "\t\t\t\t\t$query-&gt;set( 'meta_key', '' );\r",
            "lineNumber": 272
          },
          {
            "text": "\t\t\t\t\t$query-&gt;set(\r",
            "lineNumber": 273
          },
          {
            "text": "\t\t\t\t\t\t'meta_query',\r",
            "lineNumber": 274
          },
          {
            "text": "\t\t\t\t\t\tarray_merge(\r",
            "lineNumber": 275
          },
          {
            "text": "\t\t\t\t\t\t\t$old,\r",
            "lineNumber": 276
          },
          {
            "text": "\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 277
          },
          {
            "text": "\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r",
            "lineNumber": 278
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 279
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'key'     =&gt; $key,\r",
            "lineNumber": 280
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r",
            "lineNumber": 281
          },
          {
            "text": "\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 282
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 283
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'key'     =&gt; $key,\r",
            "lineNumber": 284
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r",
            "lineNumber": 285
          },
          {
            "text": "\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 286
          },
          {
            "text": "\t\t\t\t\t\t\t)\r",
            "lineNumber": 287
          },
          {
            "text": "\t\t\t\t\t\t)\r",
            "lineNumber": 288
          },
          {
            "text": "\t\t\t\t\t);\r",
            "lineNumber": 289
          },
          {
            "text": "\t\t\t\t\tbreak;\r",
            "lineNumber": 290
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 291
          },
          {
            "text": "\r",
            "lineNumber": 292
          },
          {
            "text": "\t\t\t$meta_value_or_meta_value_num = 'meta_value';\r",
            "lineNumber": 293
          },
          {
            "text": "\t\t\t$key_is_odometer              = apply_filters( 'invp_prefix_meta_key', 'odometer' ) === $key;\r",
            "lineNumber": 294
          },
          {
            "text": "\r",
            "lineNumber": 295
          },
          {
            "text": "\t\t\tif ( INVP::meta_value_is_number( $key ) || $key_is_odometer ) {\r",
            "lineNumber": 296
          },
          {
            "text": "\t\t\t\t$meta_value_or_meta_value_num .= '_num';\r",
            "lineNumber": 297
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 298
          },
          {
            "text": "\r",
            "lineNumber": 299
          },
          {
            "text": "\t\t\t// Customize the ORDER BY to remove non-digits from the odometer.\r",
            "lineNumber": 300
          },
          {
            "text": "\t\t\tif ( $key_is_odometer ) {\r",
            "lineNumber": 301
          },
          {
            "text": "\t\t\t\tadd_filter( 'posts_orderby', array( $this, 'change_order_by_for_odometer' ), 10, 2 );\r",
            "lineNumber": 302
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 303
          },
          {
            "text": "\r",
            "lineNumber": 304
          },
          {
            "text": "\t\t\t// Allow other developers to decide if the post meta values are numbers.\r",
            "lineNumber": 305
          },
          {
            "text": "\t\t\t$query-&gt;set( 'orderby', apply_filters( 'invp_meta_value_or_meta_value_num', $meta_value_or_meta_value_num, $key ) );\r",
            "lineNumber": 306
          },
          {
            "text": "\t\t\t$query-&gt;set( 'order', $direction );\r",
            "lineNumber": 307
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 308
          },
          {
            "text": "\r",
            "lineNumber": 309
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 310
          },
          {
            "text": "\t\t * Removes commas from the meta value used in the ORDER BY of the query so\r",
            "lineNumber": 311
          }
        ]
      },
      "score": 0.391679048538208
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-additional-listings-pages.php",
        "range": {
          "startPosition": {
            "line": 153
          },
          "endPosition": {
            "line": 237
          }
        },
        "contents": "\tpublic static function get_query_meta_array( $rule ) {\n\t\t// There may be no filter in the rule.\n\t\tif ( '' === $rule['key'] ) {\n\t\t\treturn array();\n\t\t}\n\t\t$new = null;\n\t\tswitch ( $rule['operator'] ) {\n\t\t\tcase 'contains':\n\t\t\t\t$new = array(\n\t\t\t\t\t'relation' =&gt; 'AND',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),\n\t\t\t\t\t\t'compare' =&gt; 'LIKE',\n\t\t\t\t\t\t'value'   =&gt; $rule['value'],\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'does_not_exist':\n\t\t\t\t$new = array(\n\t\t\t\t\t'relation' =&gt; 'AND',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),\n\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'equal_to':\n\t\t\tcase 'not_equal_to':\n\t\t\t\t$new = array(\n\t\t\t\t\t'relation' =&gt; 'AND',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),\n\t\t\t\t\t\t'compare' =&gt; ( 'equal_to' === $rule['operator'] ? '=' : '!=' ),\n\t\t\t\t\t\t'value'   =&gt; $rule['value'],\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'exists':\n\t\t\t\t$new = array(\n\t\t\t\t\t'relation' =&gt; 'AND',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),\n\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),\n\t\t\t\t\t\t'value'   =&gt; array( '', 0 ),\n\t\t\t\t\t\t'compare' =&gt; 'NOT IN',\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'greater_than':\n\t\t\tcase 'less_than':\n\t\t\t\t$new = array(\n\t\t\t\t\t'relation' =&gt; 'AND',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),\n\t\t\t\t\t\t'compare' =&gt; ( 'greater_than' === $rule['operator'] ? '&gt;' : '&lt;' ),\n\t\t\t\t\t\t'value'   =&gt; ( (float) $rule['value'] ),\n\t\t\t\t\t\t'type'    =&gt; 'NUMERIC',\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $new;\n\t}\n\n\t/**\n\t * Returns true if the additional listing page is active or too old to have\n\t * and active switch.\n\t *\n\t * @param  array $rule\n\t * @return bool\n\t */\n\tpublic static function is_active_rule( $rule ) {\n\t\treturn ! isset( $rule['active'] ) || $rule['active'];\n\t}\n\n\t/**\n\t * True or false, a given additional listing page rule has settings that",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\tpublic static function get_query_meta_array( $rule ) {",
            "lineNumber": 154
          },
          {
            "text": "\t\t// There may be no filter in the rule.",
            "lineNumber": 155
          },
          {
            "text": "\t\tif ( '' === $rule['key'] ) {",
            "lineNumber": 156
          },
          {
            "text": "\t\t\treturn array();",
            "lineNumber": 157
          },
          {
            "text": "\t\t}",
            "lineNumber": 158
          },
          {
            "text": "\t\t$new = null;",
            "lineNumber": 159
          },
          {
            "text": "\t\tswitch ( $rule['operator'] ) {",
            "lineNumber": 160
          },
          {
            "text": "\t\t\tcase 'contains':",
            "lineNumber": 161
          },
          {
            "text": "\t\t\t\t$new = array(",
            "lineNumber": 162
          },
          {
            "text": "\t\t\t\t\t'relation' =&gt; 'AND',",
            "lineNumber": 163
          },
          {
            "text": "\t\t\t\t\tarray(",
            "lineNumber": 164
          },
          {
            "text": "\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),",
            "lineNumber": 165
          },
          {
            "text": "\t\t\t\t\t\t'compare' =&gt; 'LIKE',",
            "lineNumber": 166
          },
          {
            "text": "\t\t\t\t\t\t'value'   =&gt; $rule['value'],",
            "lineNumber": 167
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 168
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 169
          },
          {
            "text": "\t\t\t\tbreak;",
            "lineNumber": 170
          },
          {
            "lineNumber": 171
          },
          {
            "text": "\t\t\tcase 'does_not_exist':",
            "lineNumber": 172
          },
          {
            "text": "\t\t\t\t$new = array(",
            "lineNumber": 173
          },
          {
            "text": "\t\t\t\t\t'relation' =&gt; 'AND',",
            "lineNumber": 174
          },
          {
            "text": "\t\t\t\t\tarray(",
            "lineNumber": 175
          },
          {
            "text": "\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),",
            "lineNumber": 176
          },
          {
            "text": "\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',",
            "lineNumber": 177
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 178
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 179
          },
          {
            "text": "\t\t\t\tbreak;",
            "lineNumber": 180
          },
          {
            "lineNumber": 181
          },
          {
            "text": "\t\t\tcase 'equal_to':",
            "lineNumber": 182
          },
          {
            "text": "\t\t\tcase 'not_equal_to':",
            "lineNumber": 183
          },
          {
            "text": "\t\t\t\t$new = array(",
            "lineNumber": 184
          },
          {
            "text": "\t\t\t\t\t'relation' =&gt; 'AND',",
            "lineNumber": 185
          },
          {
            "text": "\t\t\t\t\tarray(",
            "lineNumber": 186
          },
          {
            "text": "\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),",
            "lineNumber": 187
          },
          {
            "text": "\t\t\t\t\t\t'compare' =&gt; ( 'equal_to' === $rule['operator'] ? '=' : '!=' ),",
            "lineNumber": 188
          },
          {
            "text": "\t\t\t\t\t\t'value'   =&gt; $rule['value'],",
            "lineNumber": 189
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 190
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 191
          },
          {
            "text": "\t\t\t\tbreak;",
            "lineNumber": 192
          },
          {
            "lineNumber": 193
          },
          {
            "text": "\t\t\tcase 'exists':",
            "lineNumber": 194
          },
          {
            "text": "\t\t\t\t$new = array(",
            "lineNumber": 195
          },
          {
            "text": "\t\t\t\t\t'relation' =&gt; 'AND',",
            "lineNumber": 196
          },
          {
            "text": "\t\t\t\t\tarray(",
            "lineNumber": 197
          },
          {
            "text": "\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),",
            "lineNumber": 198
          },
          {
            "text": "\t\t\t\t\t\t'compare' =&gt; 'EXISTS',",
            "lineNumber": 199
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 200
          },
          {
            "text": "\t\t\t\t\tarray(",
            "lineNumber": 201
          },
          {
            "text": "\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),",
            "lineNumber": 202
          },
          {
            "text": "\t\t\t\t\t\t'value'   =&gt; array( '', 0 ),",
            "lineNumber": 203
          },
          {
            "text": "\t\t\t\t\t\t'compare' =&gt; 'NOT IN',",
            "lineNumber": 204
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 205
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 206
          },
          {
            "text": "\t\t\t\tbreak;",
            "lineNumber": 207
          },
          {
            "lineNumber": 208
          },
          {
            "text": "\t\t\tcase 'greater_than':",
            "lineNumber": 209
          },
          {
            "text": "\t\t\tcase 'less_than':",
            "lineNumber": 210
          },
          {
            "text": "\t\t\t\t$new = array(",
            "lineNumber": 211
          },
          {
            "text": "\t\t\t\t\t'relation' =&gt; 'AND',",
            "lineNumber": 212
          },
          {
            "text": "\t\t\t\t\tarray(",
            "lineNumber": 213
          },
          {
            "text": "\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', $rule['key'] ),",
            "lineNumber": 214
          },
          {
            "text": "\t\t\t\t\t\t'compare' =&gt; ( 'greater_than' === $rule['operator'] ? '&gt;' : '&lt;' ),",
            "lineNumber": 215
          },
          {
            "text": "\t\t\t\t\t\t'value'   =&gt; ( (float) $rule['value'] ),",
            "lineNumber": 216
          },
          {
            "text": "\t\t\t\t\t\t'type'    =&gt; 'NUMERIC',",
            "lineNumber": 217
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 218
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 219
          },
          {
            "text": "\t\t\t\tbreak;",
            "lineNumber": 220
          },
          {
            "text": "\t\t}",
            "lineNumber": 221
          },
          {
            "text": "\t\treturn $new;",
            "lineNumber": 222
          },
          {
            "text": "\t}",
            "lineNumber": 223
          },
          {
            "lineNumber": 224
          },
          {
            "text": "\t/**",
            "lineNumber": 225
          },
          {
            "text": "\t * Returns true if the additional listing page is active or too old to have",
            "lineNumber": 226
          },
          {
            "text": "\t * and active switch.",
            "lineNumber": 227
          },
          {
            "text": "\t *",
            "lineNumber": 228
          },
          {
            "text": "\t * @param  array $rule",
            "lineNumber": 229
          },
          {
            "text": "\t * @return bool",
            "lineNumber": 230
          },
          {
            "text": "\t */",
            "lineNumber": 231
          },
          {
            "text": "\tpublic static function is_active_rule( $rule ) {",
            "lineNumber": 232
          },
          {
            "text": "\t\treturn ! isset( $rule['active'] ) || $rule['active'];",
            "lineNumber": 233
          },
          {
            "text": "\t}",
            "lineNumber": 234
          },
          {
            "lineNumber": 235
          },
          {
            "text": "\t/**",
            "lineNumber": 236
          },
          {
            "text": "\t * True or false, a given additional listing page rule has settings that",
            "lineNumber": 237
          }
        ]
      },
      "score": 0.3672359883785248
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/widget/class-widget-inventory-grid.php",
        "range": {
          "startPosition": {
            "line": 110
          },
          "endPosition": {
            "line": 172
          }
        },
        "contents": "\t\tif ( $args['newest_first'] ) {\n\t\t\t// Change the order to last_modified date.\n\t\t\t$post_args['meta_key'] = apply_filters( 'invp_prefix_meta_key', 'last_modified' );\n\t\t\tglobal $wpdb;\n\t\t\t$post_args['orderby'] = \"STR_TO_DATE( {$wpdb-&gt;postmeta}.meta_value, '%a, %d %b %Y %T' )\";\n\t\t\t$post_args['order']   = 'DESC';\n\t\t}\n\n\t\t// Do we want featured vehicles only?\n\t\tif ( $args['featured_only'] ) {\n\t\t\t$post_args['meta_query'][] = array(\n\t\t\t\t'key'   =&gt; apply_filters( 'invp_prefix_meta_key', 'featured' ),\n\t\t\t\t'value' =&gt; '1',\n\t\t\t);\n\t\t}\n\n\t\t// Are we only showing 1 make?\n\t\tif ( ! empty( $args['make'] ) ) {\n\t\t\t$post_args['tax_query'][] = array(\n\t\t\t\t'taxonomy' =&gt; 'make',\n\t\t\t\t'field'    =&gt; 'slug',\n\t\t\t\t'terms'    =&gt; $args['make'],\n\t\t\t);\n\t\t}\n\n\t\t// Are we only showing 1 model?\n\t\tif ( ! empty( $args['model'] ) ) {\n\t\t\t$post_args['meta_query'][] = array(\n\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\n\t\t\t\t'value'   =&gt; $args['model'],\n\t\t\t\t'compare' =&gt; 'LIKE',\n\t\t\t);\n\t\t}\n\n\t\t// Should we exclude sold vehicles?\n\t\t$plugin_settings = INVP::settings();\n\t\tif ( isset( $plugin_settings['include_sold_vehicles'] ) &amp;&amp; ! $plugin_settings['include_sold_vehicles'] ) {\n\t\t\t$post_args['tax_query'][] = Inventory_Presser_Taxonomies::tax_query_exclude_sold();\n\t\t}\n\n\t\t$inventory_ids = get_posts( $post_args );\n\t\tif ( empty( $inventory_ids ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do we want priced vehicles first?\n\t\tif ( $args['priced_first'] ) {\n\t\t\t// Yes. Scan the results for vehicles without prices.\n\t\t\t$ids_without_prices = array();\n\t\t\tforeach ( $inventory_ids as $inventory_id ) {\n\t\t\t\tif ( empty( get_post_meta( $inventory_id, apply_filters( 'invp_prefix_meta_key', 'price' ) ) ) ) {\n\t\t\t\t\t$ids_without_prices[] = $inventory_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! empty( $ids_without_prices ) ) {\n\t\t\t\t// Remove IDs and then add them to the end of the array.\n\t\t\t\t$inventory_ids = array_merge( array_diff( $inventory_ids, $ids_without_prices ), $ids_without_prices );\n\t\t\t}\n\t\t}\n\n\t\t$grid_html = sprintf(\n\t\t\t'&lt;div class=\"invp-grid\"&gt;&lt;ul class=\"grid-slides columns-%s\"&gt;',",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\tif ( $args['newest_first'] ) {",
            "lineNumber": 111
          },
          {
            "text": "\t\t\t// Change the order to last_modified date.",
            "lineNumber": 112
          },
          {
            "text": "\t\t\t$post_args['meta_key'] = apply_filters( 'invp_prefix_meta_key', 'last_modified' );",
            "lineNumber": 113
          },
          {
            "text": "\t\t\tglobal $wpdb;",
            "lineNumber": 114
          },
          {
            "text": "\t\t\t$post_args['orderby'] = \"STR_TO_DATE( {$wpdb-&gt;postmeta}.meta_value, '%a, %d %b %Y %T' )\";",
            "lineNumber": 115
          },
          {
            "text": "\t\t\t$post_args['order']   = 'DESC';",
            "lineNumber": 116
          },
          {
            "text": "\t\t}",
            "lineNumber": 117
          },
          {
            "lineNumber": 118
          },
          {
            "text": "\t\t// Do we want featured vehicles only?",
            "lineNumber": 119
          },
          {
            "text": "\t\tif ( $args['featured_only'] ) {",
            "lineNumber": 120
          },
          {
            "text": "\t\t\t$post_args['meta_query'][] = array(",
            "lineNumber": 121
          },
          {
            "text": "\t\t\t\t'key'   =&gt; apply_filters( 'invp_prefix_meta_key', 'featured' ),",
            "lineNumber": 122
          },
          {
            "text": "\t\t\t\t'value' =&gt; '1',",
            "lineNumber": 123
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 124
          },
          {
            "text": "\t\t}",
            "lineNumber": 125
          },
          {
            "lineNumber": 126
          },
          {
            "text": "\t\t// Are we only showing 1 make?",
            "lineNumber": 127
          },
          {
            "text": "\t\tif ( ! empty( $args['make'] ) ) {",
            "lineNumber": 128
          },
          {
            "text": "\t\t\t$post_args['tax_query'][] = array(",
            "lineNumber": 129
          },
          {
            "text": "\t\t\t\t'taxonomy' =&gt; 'make',",
            "lineNumber": 130
          },
          {
            "text": "\t\t\t\t'field'    =&gt; 'slug',",
            "lineNumber": 131
          },
          {
            "text": "\t\t\t\t'terms'    =&gt; $args['make'],",
            "lineNumber": 132
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 133
          },
          {
            "text": "\t\t}",
            "lineNumber": 134
          },
          {
            "lineNumber": 135
          },
          {
            "text": "\t\t// Are we only showing 1 model?",
            "lineNumber": 136
          },
          {
            "text": "\t\tif ( ! empty( $args['model'] ) ) {",
            "lineNumber": 137
          },
          {
            "text": "\t\t\t$post_args['meta_query'][] = array(",
            "lineNumber": 138
          },
          {
            "text": "\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),",
            "lineNumber": 139
          },
          {
            "text": "\t\t\t\t'value'   =&gt; $args['model'],",
            "lineNumber": 140
          },
          {
            "text": "\t\t\t\t'compare' =&gt; 'LIKE',",
            "lineNumber": 141
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 142
          },
          {
            "text": "\t\t}",
            "lineNumber": 143
          },
          {
            "lineNumber": 144
          },
          {
            "text": "\t\t// Should we exclude sold vehicles?",
            "lineNumber": 145
          },
          {
            "text": "\t\t$plugin_settings = INVP::settings();",
            "lineNumber": 146
          },
          {
            "text": "\t\tif ( isset( $plugin_settings['include_sold_vehicles'] ) &amp;&amp; ! $plugin_settings['include_sold_vehicles'] ) {",
            "lineNumber": 147
          },
          {
            "text": "\t\t\t$post_args['tax_query'][] = Inventory_Presser_Taxonomies::tax_query_exclude_sold();",
            "lineNumber": 148
          },
          {
            "text": "\t\t}",
            "lineNumber": 149
          },
          {
            "lineNumber": 150
          },
          {
            "text": "\t\t$inventory_ids = get_posts( $post_args );",
            "lineNumber": 151
          },
          {
            "text": "\t\tif ( empty( $inventory_ids ) ) {",
            "lineNumber": 152
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 153
          },
          {
            "text": "\t\t}",
            "lineNumber": 154
          },
          {
            "lineNumber": 155
          },
          {
            "text": "\t\t// Do we want priced vehicles first?",
            "lineNumber": 156
          },
          {
            "text": "\t\tif ( $args['priced_first'] ) {",
            "lineNumber": 157
          },
          {
            "text": "\t\t\t// Yes. Scan the results for vehicles without prices.",
            "lineNumber": 158
          },
          {
            "text": "\t\t\t$ids_without_prices = array();",
            "lineNumber": 159
          },
          {
            "text": "\t\t\tforeach ( $inventory_ids as $inventory_id ) {",
            "lineNumber": 160
          },
          {
            "text": "\t\t\t\tif ( empty( get_post_meta( $inventory_id, apply_filters( 'invp_prefix_meta_key', 'price' ) ) ) ) {",
            "lineNumber": 161
          },
          {
            "text": "\t\t\t\t\t$ids_without_prices[] = $inventory_id;",
            "lineNumber": 162
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 163
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 164
          },
          {
            "text": "\t\t\tif ( ! empty( $ids_without_prices ) ) {",
            "lineNumber": 165
          },
          {
            "text": "\t\t\t\t// Remove IDs and then add them to the end of the array.",
            "lineNumber": 166
          },
          {
            "text": "\t\t\t\t$inventory_ids = array_merge( array_diff( $inventory_ids, $ids_without_prices ), $ids_without_prices );",
            "lineNumber": 167
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 168
          },
          {
            "text": "\t\t}",
            "lineNumber": 169
          },
          {
            "lineNumber": 170
          },
          {
            "text": "\t\t$grid_html = sprintf(",
            "lineNumber": 171
          },
          {
            "text": "\t\t\t'&lt;div class=\"invp-grid\"&gt;&lt;ul class=\"grid-slides columns-%s\"&gt;',",
            "lineNumber": 172
          }
        ]
      },
      "score": 0.33913135528564453
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 202
          },
          "endPosition": {
            "line": 262
          }
        },
        "contents": "\t\t\t\t\t);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'year':\r\n\t\t\t\t\t$query-&gt;set(\r\n\t\t\t\t\t\t'meta_query',\r\n\t\t\t\t\t\tarray_merge(\r\n\t\t\t\t\t\t\t$old,\r\n\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t'relation' =&gt; 'AND',\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'year' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'year' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'make' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'make' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t// Boat fields might not exist on all vehicles. Do not require them.\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t\t\t);\r",
            "lineNumber": 203
          },
          {
            "text": "\t\t\t\t\tbreak;\r",
            "lineNumber": 204
          },
          {
            "text": "\r",
            "lineNumber": 205
          },
          {
            "text": "\t\t\t\tcase 'year':\r",
            "lineNumber": 206
          },
          {
            "text": "\t\t\t\t\t$query-&gt;set(\r",
            "lineNumber": 207
          },
          {
            "text": "\t\t\t\t\t\t'meta_query',\r",
            "lineNumber": 208
          },
          {
            "text": "\t\t\t\t\t\tarray_merge(\r",
            "lineNumber": 209
          },
          {
            "text": "\t\t\t\t\t\t\t$old,\r",
            "lineNumber": 210
          },
          {
            "text": "\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 211
          },
          {
            "text": "\t\t\t\t\t\t\t\t'relation' =&gt; 'AND',\r",
            "lineNumber": 212
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 213
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r",
            "lineNumber": 214
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 215
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'year' ),\r",
            "lineNumber": 216
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r",
            "lineNumber": 217
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 218
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 219
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'year' ),\r",
            "lineNumber": 220
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r",
            "lineNumber": 221
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 222
          },
          {
            "text": "\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 223
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 224
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r",
            "lineNumber": 225
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 226
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'make' ),\r",
            "lineNumber": 227
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r",
            "lineNumber": 228
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 229
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 230
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'make' ),\r",
            "lineNumber": 231
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r",
            "lineNumber": 232
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 233
          },
          {
            "text": "\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 234
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 235
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r",
            "lineNumber": 236
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 237
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r",
            "lineNumber": 238
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r",
            "lineNumber": 239
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 240
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 241
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r",
            "lineNumber": 242
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r",
            "lineNumber": 243
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 244
          },
          {
            "text": "\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 245
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 246
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r",
            "lineNumber": 247
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 248
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r",
            "lineNumber": 249
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r",
            "lineNumber": 250
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 251
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 252
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r",
            "lineNumber": 253
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r",
            "lineNumber": 254
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 255
          },
          {
            "text": "\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 256
          },
          {
            "text": "\t\t\t\t\t\t\t)\r",
            "lineNumber": 257
          },
          {
            "text": "\t\t\t\t\t\t)\r",
            "lineNumber": 258
          },
          {
            "text": "\t\t\t\t\t);\r",
            "lineNumber": 259
          },
          {
            "text": "\t\t\t\t\tbreak;\r",
            "lineNumber": 260
          },
          {
            "text": "\r",
            "lineNumber": 261
          },
          {
            "text": "\t\t\t\t// Boat fields might not exist on all vehicles. Do not require them.\r",
            "lineNumber": 262
          }
        ]
      },
      "score": 0.33601638674736023
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 127
          },
          "endPosition": {
            "line": 172,
            "column": 5
          }
        },
        "contents": "\t\t\t$query-&gt;set( 'meta_key', $key );\r\n\r\n\t\t\t/**\r\n\t\t\t * Maybe append to the meta_query if it is already set. If we are\r\n\t\t\t * sorting by make, then we want to also add a secondary sort of model\r\n\t\t\t * and a tertiary sort of trim. That's what users want. Apply the same\r\n\t\t\t * logic to sorts by year and model.\r\n\t\t\t */\r\n\t\t\t$old = $query-&gt;get( 'meta_query', array() );\r\n\t\t\tswitch ( apply_filters( 'invp_unprefix_meta_key', $query-&gt;get( 'meta_key' ) ) ) {\r\n\t\t\t\tcase 'make':\r\n\t\t\t\t\t$query-&gt;set(\r\n\t\t\t\t\t\t'meta_query',\r\n\t\t\t\t\t\tarray_merge(\r\n\t\t\t\t\t\t\t$old,\r\n\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t'relation' =&gt; 'AND',\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'model':\r\n\t\t\t\t\t",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t$query-&gt;set( 'meta_key', $key );\r",
            "lineNumber": 128
          },
          {
            "text": "\r",
            "lineNumber": 129
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 130
          },
          {
            "text": "\t\t\t * Maybe append to the meta_query if it is already set. If we are\r",
            "lineNumber": 131
          },
          {
            "text": "\t\t\t * sorting by make, then we want to also add a secondary sort of model\r",
            "lineNumber": 132
          },
          {
            "text": "\t\t\t * and a tertiary sort of trim. That's what users want. Apply the same\r",
            "lineNumber": 133
          },
          {
            "text": "\t\t\t * logic to sorts by year and model.\r",
            "lineNumber": 134
          },
          {
            "text": "\t\t\t */\r",
            "lineNumber": 135
          },
          {
            "text": "\t\t\t$old = $query-&gt;get( 'meta_query', array() );\r",
            "lineNumber": 136
          },
          {
            "text": "\t\t\tswitch ( apply_filters( 'invp_unprefix_meta_key', $query-&gt;get( 'meta_key' ) ) ) {\r",
            "lineNumber": 137
          },
          {
            "text": "\t\t\t\tcase 'make':\r",
            "lineNumber": 138
          },
          {
            "text": "\t\t\t\t\t$query-&gt;set(\r",
            "lineNumber": 139
          },
          {
            "text": "\t\t\t\t\t\t'meta_query',\r",
            "lineNumber": 140
          },
          {
            "text": "\t\t\t\t\t\tarray_merge(\r",
            "lineNumber": 141
          },
          {
            "text": "\t\t\t\t\t\t\t$old,\r",
            "lineNumber": 142
          },
          {
            "text": "\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 143
          },
          {
            "text": "\t\t\t\t\t\t\t\t'relation' =&gt; 'AND',\r",
            "lineNumber": 144
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 145
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r",
            "lineNumber": 146
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 147
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r",
            "lineNumber": 148
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r",
            "lineNumber": 149
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 150
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 151
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r",
            "lineNumber": 152
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r",
            "lineNumber": 153
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 154
          },
          {
            "text": "\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 155
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 156
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r",
            "lineNumber": 157
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 158
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r",
            "lineNumber": 159
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r",
            "lineNumber": 160
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 161
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 162
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r",
            "lineNumber": 163
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r",
            "lineNumber": 164
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 165
          },
          {
            "text": "\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 166
          },
          {
            "text": "\t\t\t\t\t\t\t)\r",
            "lineNumber": 167
          },
          {
            "text": "\t\t\t\t\t\t)\r",
            "lineNumber": 168
          },
          {
            "text": "\t\t\t\t\t);\r",
            "lineNumber": 169
          },
          {
            "text": "\t\t\t\t\tbreak;\r",
            "lineNumber": 170
          },
          {
            "text": "\r",
            "lineNumber": 171
          },
          {
            "text": "\t\t\t\tcase 'model':\r",
            "lineNumber": 172
          },
          {
            "text": "\t\t\t\t\t",
            "lineNumber": 173
          }
        ]
      },
      "score": 0.3270389139652252
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/integrations/class-gravityforms-field-vehicle.php",
        "range": {
          "startPosition": {
            "line": 243
          },
          "endPosition": {
            "line": 277
          }
        },
        "contents": "\t\t *\n\t\t * @return array\n\t\t */\n\t\tprotected function get_vehicle_post_ids() {\n\t\t\tglobal $wpdb;\n\t\t\treturn $wpdb-&gt;get_col(\n\t\t\t\t$wpdb-&gt;prepare(\n\t\t\t\t\t\"\n\t\t\t\t\tSELECT \t\tID\n\n\t\t\t\t\tFROM\t\t$wpdb-&gt;posts\n\t\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta1 ON $wpdb-&gt;posts.ID = meta1.post_id\n\t\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta2 ON $wpdb-&gt;posts.ID = meta2.post_id\n\t\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta3 ON $wpdb-&gt;posts.ID = meta3.post_id\n\n\t\t\t\t\tWHERE \t\tpost_type = %s\n\t\t\t\t\t\t\t\tAND post_status = 'publish'\n\t\t\t\t\t\t\t\tAND meta1.meta_key = %s\n\t\t\t\t\t\t\t\tAND meta2.meta_key = %s\n\t\t\t\t\t\t\t\tAND meta3.meta_key = %s\n\n\t\t\t\t\tORDER BY\tmeta1.meta_value DESC,\n\t\t\t\t\t\t\t\tmeta2.meta_value ASC,\n\t\t\t\t\t\t\t\tmeta3.meta_value ASC;\n\t\t\t\t\",\n\t\t\t\t\tINVP::POST_TYPE,\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'year' ),\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'make' ),\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'model' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t *",
            "lineNumber": 244
          },
          {
            "text": "\t\t * @return array",
            "lineNumber": 245
          },
          {
            "text": "\t\t */",
            "lineNumber": 246
          },
          {
            "text": "\t\tprotected function get_vehicle_post_ids() {",
            "lineNumber": 247
          },
          {
            "text": "\t\t\tglobal $wpdb;",
            "lineNumber": 248
          },
          {
            "text": "\t\t\treturn $wpdb-&gt;get_col(",
            "lineNumber": 249
          },
          {
            "text": "\t\t\t\t$wpdb-&gt;prepare(",
            "lineNumber": 250
          },
          {
            "text": "\t\t\t\t\t\"",
            "lineNumber": 251
          },
          {
            "text": "\t\t\t\t\tSELECT \t\tID",
            "lineNumber": 252
          },
          {
            "lineNumber": 253
          },
          {
            "text": "\t\t\t\t\tFROM\t\t$wpdb-&gt;posts",
            "lineNumber": 254
          },
          {
            "text": "\t\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta1 ON $wpdb-&gt;posts.ID = meta1.post_id",
            "lineNumber": 255
          },
          {
            "text": "\t\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta2 ON $wpdb-&gt;posts.ID = meta2.post_id",
            "lineNumber": 256
          },
          {
            "text": "\t\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta3 ON $wpdb-&gt;posts.ID = meta3.post_id",
            "lineNumber": 257
          },
          {
            "lineNumber": 258
          },
          {
            "text": "\t\t\t\t\tWHERE \t\tpost_type = %s",
            "lineNumber": 259
          },
          {
            "text": "\t\t\t\t\t\t\t\tAND post_status = 'publish'",
            "lineNumber": 260
          },
          {
            "text": "\t\t\t\t\t\t\t\tAND meta1.meta_key = %s",
            "lineNumber": 261
          },
          {
            "text": "\t\t\t\t\t\t\t\tAND meta2.meta_key = %s",
            "lineNumber": 262
          },
          {
            "text": "\t\t\t\t\t\t\t\tAND meta3.meta_key = %s",
            "lineNumber": 263
          },
          {
            "lineNumber": 264
          },
          {
            "text": "\t\t\t\t\tORDER BY\tmeta1.meta_value DESC,",
            "lineNumber": 265
          },
          {
            "text": "\t\t\t\t\t\t\t\tmeta2.meta_value ASC,",
            "lineNumber": 266
          },
          {
            "text": "\t\t\t\t\t\t\t\tmeta3.meta_value ASC;",
            "lineNumber": 267
          },
          {
            "text": "\t\t\t\t\",",
            "lineNumber": 268
          },
          {
            "text": "\t\t\t\t\tINVP::POST_TYPE,",
            "lineNumber": 269
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'year' ),",
            "lineNumber": 270
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'make' ),",
            "lineNumber": 271
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'model' ),",
            "lineNumber": 272
          },
          {
            "text": "\t\t\t\t)",
            "lineNumber": 273
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 274
          },
          {
            "text": "\t\t}",
            "lineNumber": 275
          },
          {
            "text": "\t}",
            "lineNumber": 276
          },
          {
            "text": "}",
            "lineNumber": 277
          }
        ]
      },
      "score": 0.3231149911880493
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-range-filters.php",
        "range": {
          "startPosition": {},
          "endPosition": {
            "line": 79
          }
        },
        "contents": "&lt;?php\n/**\n * Range Filters\n *\n * Adds min_price, max_price, min_odometer, and max_odometer query parameters.\n * Modifies archive queries to adhere to the filters.\n *\n * @package taxonomy-filters-widget\n */\n\ndefined( 'ABSPATH' ) || exit;\n\nif ( ! class_exists( 'Inventory_Presser_Range_Filters' ) ) {\n\t/**\n\t * Inventory_Presser_Range_Filters\n\t */\n\tclass Inventory_Presser_Range_Filters {\n\n\t\t/**\n\t\t * Adds hooks that power the feature.\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tpublic static function add_hooks() {\n\t\t\tif ( has_action( 'pre_get_posts', array( __CLASS__, 'modify_query_for_price_and_odometer_ranges' ) ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Modify the query to implement the price and odometer ranges.\n\t\t\tadd_action( 'pre_get_posts', array( __CLASS__, 'modify_query_for_price_and_odometer_ranges' ), 99, 1 );\n\t\t}\n\n\t\t/**\n\t\t * Change a query's meta_query value if the meta_query does not already\n\t\t * contain the provided key.\n\t\t *\n\t\t * @param  mixed $meta_query\n\t\t * @param  mixed $key\n\t\t * @param  mixed $value\n\t\t * @param  mixed $compare\n\t\t * @param  mixed $type\n\t\t * @return array\n\t\t */\n\t\tprotected static function add_meta_query( $meta_query, $key, $value, $compare, $type ) {\n\t\t\t// Make sure there is not already $key item in the meta_query.\n\t\t\tif ( self::meta_query_contains_key( $meta_query, $key ) ) {\n\t\t\t\treturn $meta_query;\n\t\t\t}\n\n\t\t\t$meta_query[] = array(\n\t\t\t\t'key'     =&gt; $key,\n\t\t\t\t'value'   =&gt; $value,\n\t\t\t\t'compare' =&gt; $compare,\n\t\t\t\t'type'    =&gt; $type,\n\t\t\t);\n\t\t\treturn $meta_query;\n\t\t}\n\n\t\t/**\n\t\t * Does a WP_Query's meta_query contain a specific key?\n\t\t *\n\t\t * @param  mixed $meta_query\n\t\t * @param  mixed $key\n\t\t * @return bool|null\n\t\t */\n\t\tprotected static function meta_query_contains_key( $meta_query, $key ) {\n\t\t\tif ( is_array( $meta_query ) ) {\n\t\t\t\tif ( isset( $meta_query['key'] ) ) {\n\t\t\t\t\treturn $meta_query['key'] === $key;\n\t\t\t\t}\n\n\t\t\t\tforeach ( $meta_query as $another ) {\n\t\t\t\t\treturn self::meta_query_contains_key( $another, $key );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n\t\t * Modifies the queries with the vehicle post type to include price and",
        "signatures": {},
        "detailedLines": [
          {
            "text": "&lt;?php",
            "lineNumber": 1
          },
          {
            "text": "/**",
            "lineNumber": 2
          },
          {
            "text": " * Range Filters",
            "lineNumber": 3
          },
          {
            "text": " *",
            "lineNumber": 4
          },
          {
            "text": " * Adds min_price, max_price, min_odometer, and max_odometer query parameters.",
            "lineNumber": 5
          },
          {
            "text": " * Modifies archive queries to adhere to the filters.",
            "lineNumber": 6
          },
          {
            "text": " *",
            "lineNumber": 7
          },
          {
            "text": " * @package taxonomy-filters-widget",
            "lineNumber": 8
          },
          {
            "text": " */",
            "lineNumber": 9
          },
          {
            "lineNumber": 10
          },
          {
            "text": "defined( 'ABSPATH' ) || exit;",
            "lineNumber": 11
          },
          {
            "lineNumber": 12
          },
          {
            "text": "if ( ! class_exists( 'Inventory_Presser_Range_Filters' ) ) {",
            "lineNumber": 13
          },
          {
            "text": "\t/**",
            "lineNumber": 14
          },
          {
            "text": "\t * Inventory_Presser_Range_Filters",
            "lineNumber": 15
          },
          {
            "text": "\t */",
            "lineNumber": 16
          },
          {
            "text": "\tclass Inventory_Presser_Range_Filters {",
            "lineNumber": 17
          },
          {
            "lineNumber": 18
          },
          {
            "text": "\t\t/**",
            "lineNumber": 19
          },
          {
            "text": "\t\t * Adds hooks that power the feature.",
            "lineNumber": 20
          },
          {
            "text": "\t\t *",
            "lineNumber": 21
          },
          {
            "text": "\t\t * @return void",
            "lineNumber": 22
          },
          {
            "text": "\t\t */",
            "lineNumber": 23
          },
          {
            "text": "\t\tpublic static function add_hooks() {",
            "lineNumber": 24
          },
          {
            "text": "\t\t\tif ( has_action( 'pre_get_posts', array( __CLASS__, 'modify_query_for_price_and_odometer_ranges' ) ) ) {",
            "lineNumber": 25
          },
          {
            "text": "\t\t\t\treturn;",
            "lineNumber": 26
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 27
          },
          {
            "text": "\t\t\t// Modify the query to implement the price and odometer ranges.",
            "lineNumber": 28
          },
          {
            "text": "\t\t\tadd_action( 'pre_get_posts', array( __CLASS__, 'modify_query_for_price_and_odometer_ranges' ), 99, 1 );",
            "lineNumber": 29
          },
          {
            "text": "\t\t}",
            "lineNumber": 30
          },
          {
            "lineNumber": 31
          },
          {
            "text": "\t\t/**",
            "lineNumber": 32
          },
          {
            "text": "\t\t * Change a query's meta_query value if the meta_query does not already",
            "lineNumber": 33
          },
          {
            "text": "\t\t * contain the provided key.",
            "lineNumber": 34
          },
          {
            "text": "\t\t *",
            "lineNumber": 35
          },
          {
            "text": "\t\t * @param  mixed $meta_query",
            "lineNumber": 36
          },
          {
            "text": "\t\t * @param  mixed $key",
            "lineNumber": 37
          },
          {
            "text": "\t\t * @param  mixed $value",
            "lineNumber": 38
          },
          {
            "text": "\t\t * @param  mixed $compare",
            "lineNumber": 39
          },
          {
            "text": "\t\t * @param  mixed $type",
            "lineNumber": 40
          },
          {
            "text": "\t\t * @return array",
            "lineNumber": 41
          },
          {
            "text": "\t\t */",
            "lineNumber": 42
          },
          {
            "text": "\t\tprotected static function add_meta_query( $meta_query, $key, $value, $compare, $type ) {",
            "lineNumber": 43
          },
          {
            "text": "\t\t\t// Make sure there is not already $key item in the meta_query.",
            "lineNumber": 44
          },
          {
            "text": "\t\t\tif ( self::meta_query_contains_key( $meta_query, $key ) ) {",
            "lineNumber": 45
          },
          {
            "text": "\t\t\t\treturn $meta_query;",
            "lineNumber": 46
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 47
          },
          {
            "lineNumber": 48
          },
          {
            "text": "\t\t\t$meta_query[] = array(",
            "lineNumber": 49
          },
          {
            "text": "\t\t\t\t'key'     =&gt; $key,",
            "lineNumber": 50
          },
          {
            "text": "\t\t\t\t'value'   =&gt; $value,",
            "lineNumber": 51
          },
          {
            "text": "\t\t\t\t'compare' =&gt; $compare,",
            "lineNumber": 52
          },
          {
            "text": "\t\t\t\t'type'    =&gt; $type,",
            "lineNumber": 53
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 54
          },
          {
            "text": "\t\t\treturn $meta_query;",
            "lineNumber": 55
          },
          {
            "text": "\t\t}",
            "lineNumber": 56
          },
          {
            "lineNumber": 57
          },
          {
            "text": "\t\t/**",
            "lineNumber": 58
          },
          {
            "text": "\t\t * Does a WP_Query's meta_query contain a specific key?",
            "lineNumber": 59
          },
          {
            "text": "\t\t *",
            "lineNumber": 60
          },
          {
            "text": "\t\t * @param  mixed $meta_query",
            "lineNumber": 61
          },
          {
            "text": "\t\t * @param  mixed $key",
            "lineNumber": 62
          },
          {
            "text": "\t\t * @return bool|null",
            "lineNumber": 63
          },
          {
            "text": "\t\t */",
            "lineNumber": 64
          },
          {
            "text": "\t\tprotected static function meta_query_contains_key( $meta_query, $key ) {",
            "lineNumber": 65
          },
          {
            "text": "\t\t\tif ( is_array( $meta_query ) ) {",
            "lineNumber": 66
          },
          {
            "text": "\t\t\t\tif ( isset( $meta_query['key'] ) ) {",
            "lineNumber": 67
          },
          {
            "text": "\t\t\t\t\treturn $meta_query['key'] === $key;",
            "lineNumber": 68
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 69
          },
          {
            "lineNumber": 70
          },
          {
            "text": "\t\t\t\tforeach ( $meta_query as $another ) {",
            "lineNumber": 71
          },
          {
            "text": "\t\t\t\t\treturn self::meta_query_contains_key( $another, $key );",
            "lineNumber": 72
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 73
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 74
          },
          {
            "text": "\t\t\treturn null;",
            "lineNumber": 75
          },
          {
            "text": "\t\t}",
            "lineNumber": 76
          },
          {
            "lineNumber": 77
          },
          {
            "text": "\t\t/**",
            "lineNumber": 78
          },
          {
            "text": "\t\t * Modifies the queries with the vehicle post type to include price and",
            "lineNumber": 79
          }
        ]
      },
      "score": 0.32286420464515686
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/template-tags.php",
        "range": {
          "startPosition": {
            "line": 1293
          },
          "endPosition": {
            "line": 1317
          }
        },
        "contents": "}\n\n/**\n * Returns true if this vehicle is used.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool\n */\nfunction invp_is_used( $post_ID = null ) {\n\tif ( empty( $post_ID ) ) {\n\t\t$post_ID = get_the_ID();\n\t}\n\treturn has_term( 'used', 'condition', $post_ID );\n}\n\n/**\n * Returns true if this vehicle is marked wholesale.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool\n */\nfunction invp_is_wholesale( $post_ID = null ) {\n\treturn false !== strpos( strtolower( INVP::get_meta( 'availability', $post_ID ) ) ?? '', 'wholesale' );\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "}",
            "lineNumber": 1294
          },
          {
            "lineNumber": 1295
          },
          {
            "text": "/**",
            "lineNumber": 1296
          },
          {
            "text": " * Returns true if this vehicle is used.",
            "lineNumber": 1297
          },
          {
            "text": " *",
            "lineNumber": 1298
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1299
          },
          {
            "text": " * @return bool",
            "lineNumber": 1300
          },
          {
            "text": " */",
            "lineNumber": 1301
          },
          {
            "text": "function invp_is_used( $post_ID = null ) {",
            "lineNumber": 1302
          },
          {
            "text": "\tif ( empty( $post_ID ) ) {",
            "lineNumber": 1303
          },
          {
            "text": "\t\t$post_ID = get_the_ID();",
            "lineNumber": 1304
          },
          {
            "text": "\t}",
            "lineNumber": 1305
          },
          {
            "text": "\treturn has_term( 'used', 'condition', $post_ID );",
            "lineNumber": 1306
          },
          {
            "text": "}",
            "lineNumber": 1307
          },
          {
            "lineNumber": 1308
          },
          {
            "text": "/**",
            "lineNumber": 1309
          },
          {
            "text": " * Returns true if this vehicle is marked wholesale.",
            "lineNumber": 1310
          },
          {
            "text": " *",
            "lineNumber": 1311
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1312
          },
          {
            "text": " * @return bool",
            "lineNumber": 1313
          },
          {
            "text": " */",
            "lineNumber": 1314
          },
          {
            "text": "function invp_is_wholesale( $post_ID = null ) {",
            "lineNumber": 1315
          },
          {
            "text": "\treturn false !== strpos( strtolower( INVP::get_meta( 'availability', $post_ID ) ) ?? '', 'wholesale' );",
            "lineNumber": 1316
          },
          {
            "text": "}",
            "lineNumber": 1317
          }
        ]
      },
      "score": 0.3228510916233063
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 168
          },
          "endPosition": {
            "line": 206,
            "column": 5
          }
        },
        "contents": "\t\t\t\t\t);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'model':\r\n\t\t\t\t\t$query-&gt;set(\r\n\t\t\t\t\t\t'meta_query',\r\n\t\t\t\t\t\tarray_merge(\r\n\t\t\t\t\t\t\t$old,\r\n\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t'relation' =&gt; 'AND',\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r\n\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'year':\r\n\t\t\t\t\t",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t\t\t);\r",
            "lineNumber": 169
          },
          {
            "text": "\t\t\t\t\tbreak;\r",
            "lineNumber": 170
          },
          {
            "text": "\r",
            "lineNumber": 171
          },
          {
            "text": "\t\t\t\tcase 'model':\r",
            "lineNumber": 172
          },
          {
            "text": "\t\t\t\t\t$query-&gt;set(\r",
            "lineNumber": 173
          },
          {
            "text": "\t\t\t\t\t\t'meta_query',\r",
            "lineNumber": 174
          },
          {
            "text": "\t\t\t\t\t\tarray_merge(\r",
            "lineNumber": 175
          },
          {
            "text": "\t\t\t\t\t\t\t$old,\r",
            "lineNumber": 176
          },
          {
            "text": "\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 177
          },
          {
            "text": "\t\t\t\t\t\t\t\t'relation' =&gt; 'AND',\r",
            "lineNumber": 178
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 179
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r",
            "lineNumber": 180
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 181
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r",
            "lineNumber": 182
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r",
            "lineNumber": 183
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 184
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 185
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'model' ),\r",
            "lineNumber": 186
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r",
            "lineNumber": 187
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 188
          },
          {
            "text": "\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 189
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 190
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'relation' =&gt; 'OR',\r",
            "lineNumber": 191
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 192
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r",
            "lineNumber": 193
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'NOT EXISTS',\r",
            "lineNumber": 194
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 195
          },
          {
            "text": "\t\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 196
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'key'     =&gt; apply_filters( 'invp_prefix_meta_key', 'trim' ),\r",
            "lineNumber": 197
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t\t'compare' =&gt; 'EXISTS',\r",
            "lineNumber": 198
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 199
          },
          {
            "text": "\t\t\t\t\t\t\t\t),\r",
            "lineNumber": 200
          },
          {
            "text": "\t\t\t\t\t\t\t)\r",
            "lineNumber": 201
          },
          {
            "text": "\t\t\t\t\t\t)\r",
            "lineNumber": 202
          },
          {
            "text": "\t\t\t\t\t);\r",
            "lineNumber": 203
          },
          {
            "text": "\t\t\t\t\tbreak;\r",
            "lineNumber": 204
          },
          {
            "text": "\r",
            "lineNumber": 205
          },
          {
            "text": "\t\t\t\tcase 'year':\r",
            "lineNumber": 206
          },
          {
            "text": "\t\t\t\t\t",
            "lineNumber": 207
          }
        ]
      },
      "score": 0.3209648132324219
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-invp.php",
        "range": {
          "startPosition": {
            "line": 431,
            "column": 4
          },
          "endPosition": {
            "line": 493
          }
        },
        "contents": "// No, we're done with this location.\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$phones[] = array(\n\t\t\t\t'uid'         =&gt; $term_meta[ 'phone_' . $p . '_uid' ][0],\n\t\t\t\t'description' =&gt; self::meta_array_value_single( $term_meta, 'phone_' . $p . '_description' ),\n\t\t\t\t'number'      =&gt; self::meta_array_value_single( $term_meta, 'phone_' . $p . '_number' ),\n\t\t\t);\n\t\t}\n\t\treturn $phones;\n\t}\n\n\t/**\n\t * Checks if there are both 'new' and 'used' vehicles in the inventory.\n\t *\n\t * @return bool True if both new and used vehicles exist, false otherwise.\n\t */\n\tpublic static function have_new_and_used_vehicles() {\n\t\t$new_query  = new WP_Query(\n\t\t\tarray(\n\t\t\t\t'post_type'      =&gt; self::POST_TYPE,\n\t\t\t\t'post_status'    =&gt; 'publish',\n\t\t\t\t'posts_per_page' =&gt; 1,\n\t\t\t\t'tax_query'      =&gt; array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' =&gt; 'condition',\n\t\t\t\t\t\t'field'    =&gt; 'slug',\n\t\t\t\t\t\t'terms'    =&gt; 'new',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$used_query = new WP_Query(\n\t\t\tarray(\n\t\t\t\t'post_type'      =&gt; self::POST_TYPE,\n\t\t\t\t'post_status'    =&gt; 'publish',\n\t\t\t\t'posts_per_page' =&gt; 1,\n\t\t\t\t'tax_query'      =&gt; array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' =&gt; 'condition',\n\t\t\t\t\t\t'field'    =&gt; 'slug',\n\t\t\t\t\t\t'terms'    =&gt; 'used',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\treturn ( $new_query-&gt;have_posts() &amp;&amp; $used_query-&gt;have_posts() );\n\t}\n\n\t/**\n\t * This is an array of the post meta keys this object uses. These keys\n\t * must be prefixed by an apply_filters() call before use.\n\t *\n\t * @return array An array of the post meta keys this vehicle object uses\n\t */\n\tpublic static function keys() {\n\t\treturn array_column( self::keys_and_types(), 'name' );\n\t}\n\n\t/**\n\t * Produces an array of arrays that define all the meta fields that",
        "signatures": {},
        "detailedLines": [
          {
            "text": "// No, we're done with this location.",
            "lineNumber": 432
          },
          {
            "text": "\t\t\t\tbreak;",
            "lineNumber": 433
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 434
          },
          {
            "lineNumber": 435
          },
          {
            "text": "\t\t\t$phones[] = array(",
            "lineNumber": 436
          },
          {
            "text": "\t\t\t\t'uid'         =&gt; $term_meta[ 'phone_' . $p . '_uid' ][0],",
            "lineNumber": 437
          },
          {
            "text": "\t\t\t\t'description' =&gt; self::meta_array_value_single( $term_meta, 'phone_' . $p . '_description' ),",
            "lineNumber": 438
          },
          {
            "text": "\t\t\t\t'number'      =&gt; self::meta_array_value_single( $term_meta, 'phone_' . $p . '_number' ),",
            "lineNumber": 439
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 440
          },
          {
            "text": "\t\t}",
            "lineNumber": 441
          },
          {
            "text": "\t\treturn $phones;",
            "lineNumber": 442
          },
          {
            "text": "\t}",
            "lineNumber": 443
          },
          {
            "lineNumber": 444
          },
          {
            "text": "\t/**",
            "lineNumber": 445
          },
          {
            "text": "\t * Checks if there are both 'new' and 'used' vehicles in the inventory.",
            "lineNumber": 446
          },
          {
            "text": "\t *",
            "lineNumber": 447
          },
          {
            "text": "\t * @return bool True if both new and used vehicles exist, false otherwise.",
            "lineNumber": 448
          },
          {
            "text": "\t */",
            "lineNumber": 449
          },
          {
            "text": "\tpublic static function have_new_and_used_vehicles() {",
            "lineNumber": 450
          },
          {
            "text": "\t\t$new_query  = new WP_Query(",
            "lineNumber": 451
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 452
          },
          {
            "text": "\t\t\t\t'post_type'      =&gt; self::POST_TYPE,",
            "lineNumber": 453
          },
          {
            "text": "\t\t\t\t'post_status'    =&gt; 'publish',",
            "lineNumber": 454
          },
          {
            "text": "\t\t\t\t'posts_per_page' =&gt; 1,",
            "lineNumber": 455
          },
          {
            "text": "\t\t\t\t'tax_query'      =&gt; array(",
            "lineNumber": 456
          },
          {
            "text": "\t\t\t\t\tarray(",
            "lineNumber": 457
          },
          {
            "text": "\t\t\t\t\t\t'taxonomy' =&gt; 'condition',",
            "lineNumber": 458
          },
          {
            "text": "\t\t\t\t\t\t'field'    =&gt; 'slug',",
            "lineNumber": 459
          },
          {
            "text": "\t\t\t\t\t\t'terms'    =&gt; 'new',",
            "lineNumber": 460
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 461
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 462
          },
          {
            "text": "\t\t\t)",
            "lineNumber": 463
          },
          {
            "text": "\t\t);",
            "lineNumber": 464
          },
          {
            "text": "\t\t$used_query = new WP_Query(",
            "lineNumber": 465
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 466
          },
          {
            "text": "\t\t\t\t'post_type'      =&gt; self::POST_TYPE,",
            "lineNumber": 467
          },
          {
            "text": "\t\t\t\t'post_status'    =&gt; 'publish',",
            "lineNumber": 468
          },
          {
            "text": "\t\t\t\t'posts_per_page' =&gt; 1,",
            "lineNumber": 469
          },
          {
            "text": "\t\t\t\t'tax_query'      =&gt; array(",
            "lineNumber": 470
          },
          {
            "text": "\t\t\t\t\tarray(",
            "lineNumber": 471
          },
          {
            "text": "\t\t\t\t\t\t'taxonomy' =&gt; 'condition',",
            "lineNumber": 472
          },
          {
            "text": "\t\t\t\t\t\t'field'    =&gt; 'slug',",
            "lineNumber": 473
          },
          {
            "text": "\t\t\t\t\t\t'terms'    =&gt; 'used',",
            "lineNumber": 474
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 475
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 476
          },
          {
            "text": "\t\t\t)",
            "lineNumber": 477
          },
          {
            "text": "\t\t);",
            "lineNumber": 478
          },
          {
            "text": "\t\treturn ( $new_query-&gt;have_posts() &amp;&amp; $used_query-&gt;have_posts() );",
            "lineNumber": 479
          },
          {
            "text": "\t}",
            "lineNumber": 480
          },
          {
            "lineNumber": 481
          },
          {
            "text": "\t/**",
            "lineNumber": 482
          },
          {
            "text": "\t * This is an array of the post meta keys this object uses. These keys",
            "lineNumber": 483
          },
          {
            "text": "\t * must be prefixed by an apply_filters() call before use.",
            "lineNumber": 484
          },
          {
            "text": "\t *",
            "lineNumber": 485
          },
          {
            "text": "\t * @return array An array of the post meta keys this vehicle object uses",
            "lineNumber": 486
          },
          {
            "text": "\t */",
            "lineNumber": 487
          },
          {
            "text": "\tpublic static function keys() {",
            "lineNumber": 488
          },
          {
            "text": "\t\treturn array_column( self::keys_and_types(), 'name' );",
            "lineNumber": 489
          },
          {
            "text": "\t}",
            "lineNumber": 490
          },
          {
            "lineNumber": 491
          },
          {
            "text": "\t/**",
            "lineNumber": 492
          },
          {
            "text": "\t * Produces an array of arrays that define all the meta fields that",
            "lineNumber": 493
          }
        ]
      },
      "score": 0.3208433985710144
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-range-filters.php",
        "range": {
          "startPosition": {
            "line": 152
          },
          "endPosition": {
            "line": 188
          }
        },
        "contents": "\t\t\tif ( isset( $_GET['max_odometer'] ) ) {\n\t\t\t\t$meta_query = self::add_meta_query(\n\t\t\t\t\t$meta_query,\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'odometer' ),\n\t\t\t\t\t(int) $_GET['max_odometer'],\n\t\t\t\t\t'&lt;=',\n\t\t\t\t\t'numeric'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Down payment filters.\n\t\t\tif ( isset( $_GET['min_down'] ) ) {\n\t\t\t\t$meta_query = self::add_meta_query(\n\t\t\t\t\t$meta_query,\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'down_payment' ),\n\t\t\t\t\t(int) $_GET['min_down'],\n\t\t\t\t\t'&gt;=',\n\t\t\t\t\t'numeric'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( isset( $_GET['max_down'] ) ) {\n\t\t\t\t$meta_query = self::add_meta_query(\n\t\t\t\t\t$meta_query,\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'down_payment' ),\n\t\t\t\t\t(int) $_GET['max_down'],\n\t\t\t\t\t'&lt;=',\n\t\t\t\t\t'numeric'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$query-&gt;set( 'meta_query', $meta_query );\n\t\t}\n\t}\n\tInventory_Presser_Range_Filters::add_hooks();\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\tif ( isset( $_GET['max_odometer'] ) ) {",
            "lineNumber": 153
          },
          {
            "text": "\t\t\t\t$meta_query = self::add_meta_query(",
            "lineNumber": 154
          },
          {
            "text": "\t\t\t\t\t$meta_query,",
            "lineNumber": 155
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'odometer' ),",
            "lineNumber": 156
          },
          {
            "text": "\t\t\t\t\t(int) $_GET['max_odometer'],",
            "lineNumber": 157
          },
          {
            "text": "\t\t\t\t\t'&lt;=',",
            "lineNumber": 158
          },
          {
            "text": "\t\t\t\t\t'numeric'",
            "lineNumber": 159
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 160
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 161
          },
          {
            "lineNumber": 162
          },
          {
            "text": "\t\t\t// Down payment filters.",
            "lineNumber": 163
          },
          {
            "text": "\t\t\tif ( isset( $_GET['min_down'] ) ) {",
            "lineNumber": 164
          },
          {
            "text": "\t\t\t\t$meta_query = self::add_meta_query(",
            "lineNumber": 165
          },
          {
            "text": "\t\t\t\t\t$meta_query,",
            "lineNumber": 166
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'down_payment' ),",
            "lineNumber": 167
          },
          {
            "text": "\t\t\t\t\t(int) $_GET['min_down'],",
            "lineNumber": 168
          },
          {
            "text": "\t\t\t\t\t'&gt;=',",
            "lineNumber": 169
          },
          {
            "text": "\t\t\t\t\t'numeric'",
            "lineNumber": 170
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 171
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 172
          },
          {
            "lineNumber": 173
          },
          {
            "text": "\t\t\tif ( isset( $_GET['max_down'] ) ) {",
            "lineNumber": 174
          },
          {
            "text": "\t\t\t\t$meta_query = self::add_meta_query(",
            "lineNumber": 175
          },
          {
            "text": "\t\t\t\t\t$meta_query,",
            "lineNumber": 176
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'down_payment' ),",
            "lineNumber": 177
          },
          {
            "text": "\t\t\t\t\t(int) $_GET['max_down'],",
            "lineNumber": 178
          },
          {
            "text": "\t\t\t\t\t'&lt;=',",
            "lineNumber": 179
          },
          {
            "text": "\t\t\t\t\t'numeric'",
            "lineNumber": 180
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 181
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 182
          },
          {
            "lineNumber": 183
          },
          {
            "text": "\t\t\t$query-&gt;set( 'meta_query', $meta_query );",
            "lineNumber": 184
          },
          {
            "text": "\t\t}",
            "lineNumber": 185
          },
          {
            "text": "\t}",
            "lineNumber": 186
          },
          {
            "text": "\tInventory_Presser_Range_Filters::add_hooks();",
            "lineNumber": 187
          },
          {
            "text": "}",
            "lineNumber": 188
          }
        ]
      },
      "score": 0.31859660148620605
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-invp.php",
        "range": {
          "startPosition": {
            "line": 489
          },
          "endPosition": {
            "line": 552
          }
        },
        "contents": "\t}\n\n\t/**\n\t * Produces an array of arrays that define all the meta fields that\n\t * define our vehicle post type for all vehicle types including boats.\n\t *\n\t * @return array An array of arrays, defining the meta fields that are registered and used by this class.\n\t */\n\tpublic static function keys_and_types() {\n\t\treturn apply_filters(\n\t\t\t'invp_meta_fields',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Availability', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'availability',\n\t\t\t\t\t'sample' =&gt; __( 'For Sale', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Beam', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'beam', // for boats.\n\t\t\t\t\t'type'  =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Body Style', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'body_style',\n\t\t\t\t\t'sample' =&gt; __( 'EXTENDED CAB PICKUP', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'KBB Book Value', 'inventory-presser' ), // Kelley Blue Book.\n\t\t\t\t\t'name'   =&gt; 'book_value_kbb',\n\t\t\t\t\t'sample' =&gt; 13500,\n\t\t\t\t\t'type'   =&gt; 'number',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'NADA Book Value', 'inventory-presser' ), // NADA Guides.\n\t\t\t\t\t'name'   =&gt; 'book_value_nada',\n\t\t\t\t\t'sample' =&gt; 13500,\n\t\t\t\t\t'type'   =&gt; 'number',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Car ID', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'car_id', // unique identifier.\n\t\t\t\t\t'type'  =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax Accident Free', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_accident_free',\n\t\t\t\t\t'type'  =&gt; 'boolean',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax Have Report', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_have_report',\n\t\t\t\t\t'type'  =&gt; 'boolean',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax One Owner', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_one_owner',\n\t\t\t\t\t'type'  =&gt; 'boolean',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax Top Condition', 'inventory-presser' ),",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t}",
            "lineNumber": 490
          },
          {
            "lineNumber": 491
          },
          {
            "text": "\t/**",
            "lineNumber": 492
          },
          {
            "text": "\t * Produces an array of arrays that define all the meta fields that",
            "lineNumber": 493
          },
          {
            "text": "\t * define our vehicle post type for all vehicle types including boats.",
            "lineNumber": 494
          },
          {
            "text": "\t *",
            "lineNumber": 495
          },
          {
            "text": "\t * @return array An array of arrays, defining the meta fields that are registered and used by this class.",
            "lineNumber": 496
          },
          {
            "text": "\t */",
            "lineNumber": 497
          },
          {
            "text": "\tpublic static function keys_and_types() {",
            "lineNumber": 498
          },
          {
            "text": "\t\treturn apply_filters(",
            "lineNumber": 499
          },
          {
            "text": "\t\t\t'invp_meta_fields',",
            "lineNumber": 500
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 501
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 502
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Availability', 'inventory-presser' ),",
            "lineNumber": 503
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'availability',",
            "lineNumber": 504
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'For Sale', 'inventory-presser' ),",
            "lineNumber": 505
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 506
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 507
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 508
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Beam', 'inventory-presser' ),",
            "lineNumber": 509
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'beam', // for boats.",
            "lineNumber": 510
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'string',",
            "lineNumber": 511
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 512
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 513
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Body Style', 'inventory-presser' ),",
            "lineNumber": 514
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'body_style',",
            "lineNumber": 515
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'EXTENDED CAB PICKUP', 'inventory-presser' ),",
            "lineNumber": 516
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 517
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 518
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 519
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'KBB Book Value', 'inventory-presser' ), // Kelley Blue Book.",
            "lineNumber": 520
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'book_value_kbb',",
            "lineNumber": 521
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; 13500,",
            "lineNumber": 522
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'number',",
            "lineNumber": 523
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 524
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 525
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'NADA Book Value', 'inventory-presser' ), // NADA Guides.",
            "lineNumber": 526
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'book_value_nada',",
            "lineNumber": 527
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; 13500,",
            "lineNumber": 528
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'number',",
            "lineNumber": 529
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 530
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 531
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Car ID', 'inventory-presser' ),",
            "lineNumber": 532
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'car_id', // unique identifier.",
            "lineNumber": 533
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'string',",
            "lineNumber": 534
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 535
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 536
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax Accident Free', 'inventory-presser' ),",
            "lineNumber": 537
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_accident_free',",
            "lineNumber": 538
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'boolean',",
            "lineNumber": 539
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 540
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 541
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax Have Report', 'inventory-presser' ),",
            "lineNumber": 542
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_have_report',",
            "lineNumber": 543
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'boolean',",
            "lineNumber": 544
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 545
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 546
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax One Owner', 'inventory-presser' ),",
            "lineNumber": 547
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_one_owner',",
            "lineNumber": 548
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'boolean',",
            "lineNumber": 549
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 550
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 551
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax Top Condition', 'inventory-presser' ),",
            "lineNumber": 552
          }
        ]
      },
      "score": 0.31221920251846313
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-taxonomy-overlapper.php",
        "range": {
          "startPosition": {
            "line": 293
          },
          "endPosition": {
            "line": 357,
            "column": 3
          }
        },
        "contents": "\t\t$this-&gt;hooks_add();\n\t}\n\n\t/**\n\t * Returns an array containing keys that are post meta field suffixes. The\n\t * values are the overlapping taxonomy names.\n\t *\n\t * @return array\n\t */\n\tpublic static function overlapping_meta_keys() {\n\t\treturn apply_filters(\n\t\t\t'invp_overlapping_keys',\n\t\t\tarray(\n\t\t\t\t'body_style'      =&gt; 'style',\n\t\t\t\t'make'            =&gt; 'make',\n\t\t\t\t'model'           =&gt; 'model',\n\t\t\t\t'year'            =&gt; 'model_year',\n\n\t\t\t\t'availability'    =&gt; 'availability',\n\t\t\t\t'color_base'      =&gt; 'colors',\n\t\t\t\t'condition'       =&gt; 'condition',\n\t\t\t\t'cylinders'       =&gt; 'cylinders',\n\t\t\t\t'drive_type'      =&gt; 'drive_type',\n\t\t\t\t'fuel'            =&gt; 'fuel',\n\t\t\t\t'location'        =&gt; 'location',\n\t\t\t\t'propulsion_type' =&gt; 'propulsion_type',\n\t\t\t\t'transmission'    =&gt; 'transmission',\n\t\t\t\t'type'            =&gt; 'type',\n\t\t\t\t'wholesale'       =&gt; 'availability', // Wholesale is a meta field and also a valid Availability taxonomy term.\n\n\t\t\t\t'condition_boat'  =&gt; 'condition_boat',\n\t\t\t\t'engine_count'    =&gt; 'engine_count',\n\t\t\t\t'engine_make'     =&gt; 'engine_make',\n\t\t\t\t'engine_model'    =&gt; 'engine_model',\n\t\t\t\t'horsepower'      =&gt; 'horsepower',\n\t\t\t\t'hull_material'   =&gt; 'hull_material',\n\t\t\t)\n\t\t);\n\t}\n\n\t/**\n\t * Returns an array_flip() equivalent of the array returned by\n\t * overlapping_meta_keys_flipped().\n\t *\n\t * @return array\n\t */\n\tprivate static function overlapping_meta_keys_flipped() {\n\t\t$arr = self::overlapping_meta_keys();\n\t\tunset( $arr['wholesale'] ); // Wholesale is a meta field and also a valid Availability taxonomy term.\n\t\treturn array_flip( $arr );\n\t}\n\n\t/**\n\t * If the term relationship that was just deleted was in a vehicle taxonomy,\n\t * also delete the meta value that contains the same value.\n\t *\n\t * @param  int    $object_id Object ID.\n\t * @param  array  $tt_ids    An array of term taxonomy IDs.\n\t * @param  string $taxonomy  Taxonomy slug.\n\t * @return void\n\t */\n\tpublic function term_relationship_deleted( $object_id, $tt_ids, $taxonomy ) {\n\t\t// Does $object_id belong to a vehicle?\n\t\tif ( INVP::POST_TYPE !== get_post_type( $object_id ) ) {\n\t\t\t",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t$this-&gt;hooks_add();",
            "lineNumber": 294
          },
          {
            "text": "\t}",
            "lineNumber": 295
          },
          {
            "lineNumber": 296
          },
          {
            "text": "\t/**",
            "lineNumber": 297
          },
          {
            "text": "\t * Returns an array containing keys that are post meta field suffixes. The",
            "lineNumber": 298
          },
          {
            "text": "\t * values are the overlapping taxonomy names.",
            "lineNumber": 299
          },
          {
            "text": "\t *",
            "lineNumber": 300
          },
          {
            "text": "\t * @return array",
            "lineNumber": 301
          },
          {
            "text": "\t */",
            "lineNumber": 302
          },
          {
            "text": "\tpublic static function overlapping_meta_keys() {",
            "lineNumber": 303
          },
          {
            "text": "\t\treturn apply_filters(",
            "lineNumber": 304
          },
          {
            "text": "\t\t\t'invp_overlapping_keys',",
            "lineNumber": 305
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 306
          },
          {
            "text": "\t\t\t\t'body_style'      =&gt; 'style',",
            "lineNumber": 307
          },
          {
            "text": "\t\t\t\t'make'            =&gt; 'make',",
            "lineNumber": 308
          },
          {
            "text": "\t\t\t\t'model'           =&gt; 'model',",
            "lineNumber": 309
          },
          {
            "text": "\t\t\t\t'year'            =&gt; 'model_year',",
            "lineNumber": 310
          },
          {
            "lineNumber": 311
          },
          {
            "text": "\t\t\t\t'availability'    =&gt; 'availability',",
            "lineNumber": 312
          },
          {
            "text": "\t\t\t\t'color_base'      =&gt; 'colors',",
            "lineNumber": 313
          },
          {
            "text": "\t\t\t\t'condition'       =&gt; 'condition',",
            "lineNumber": 314
          },
          {
            "text": "\t\t\t\t'cylinders'       =&gt; 'cylinders',",
            "lineNumber": 315
          },
          {
            "text": "\t\t\t\t'drive_type'      =&gt; 'drive_type',",
            "lineNumber": 316
          },
          {
            "text": "\t\t\t\t'fuel'            =&gt; 'fuel',",
            "lineNumber": 317
          },
          {
            "text": "\t\t\t\t'location'        =&gt; 'location',",
            "lineNumber": 318
          },
          {
            "text": "\t\t\t\t'propulsion_type' =&gt; 'propulsion_type',",
            "lineNumber": 319
          },
          {
            "text": "\t\t\t\t'transmission'    =&gt; 'transmission',",
            "lineNumber": 320
          },
          {
            "text": "\t\t\t\t'type'            =&gt; 'type',",
            "lineNumber": 321
          },
          {
            "text": "\t\t\t\t'wholesale'       =&gt; 'availability', // Wholesale is a meta field and also a valid Availability taxonomy term.",
            "lineNumber": 322
          },
          {
            "lineNumber": 323
          },
          {
            "text": "\t\t\t\t'condition_boat'  =&gt; 'condition_boat',",
            "lineNumber": 324
          },
          {
            "text": "\t\t\t\t'engine_count'    =&gt; 'engine_count',",
            "lineNumber": 325
          },
          {
            "text": "\t\t\t\t'engine_make'     =&gt; 'engine_make',",
            "lineNumber": 326
          },
          {
            "text": "\t\t\t\t'engine_model'    =&gt; 'engine_model',",
            "lineNumber": 327
          },
          {
            "text": "\t\t\t\t'horsepower'      =&gt; 'horsepower',",
            "lineNumber": 328
          },
          {
            "text": "\t\t\t\t'hull_material'   =&gt; 'hull_material',",
            "lineNumber": 329
          },
          {
            "text": "\t\t\t)",
            "lineNumber": 330
          },
          {
            "text": "\t\t);",
            "lineNumber": 331
          },
          {
            "text": "\t}",
            "lineNumber": 332
          },
          {
            "lineNumber": 333
          },
          {
            "text": "\t/**",
            "lineNumber": 334
          },
          {
            "text": "\t * Returns an array_flip() equivalent of the array returned by",
            "lineNumber": 335
          },
          {
            "text": "\t * overlapping_meta_keys_flipped().",
            "lineNumber": 336
          },
          {
            "text": "\t *",
            "lineNumber": 337
          },
          {
            "text": "\t * @return array",
            "lineNumber": 338
          },
          {
            "text": "\t */",
            "lineNumber": 339
          },
          {
            "text": "\tprivate static function overlapping_meta_keys_flipped() {",
            "lineNumber": 340
          },
          {
            "text": "\t\t$arr = self::overlapping_meta_keys();",
            "lineNumber": 341
          },
          {
            "text": "\t\tunset( $arr['wholesale'] ); // Wholesale is a meta field and also a valid Availability taxonomy term.",
            "lineNumber": 342
          },
          {
            "text": "\t\treturn array_flip( $arr );",
            "lineNumber": 343
          },
          {
            "text": "\t}",
            "lineNumber": 344
          },
          {
            "lineNumber": 345
          },
          {
            "text": "\t/**",
            "lineNumber": 346
          },
          {
            "text": "\t * If the term relationship that was just deleted was in a vehicle taxonomy,",
            "lineNumber": 347
          },
          {
            "text": "\t * also delete the meta value that contains the same value.",
            "lineNumber": 348
          },
          {
            "text": "\t *",
            "lineNumber": 349
          },
          {
            "text": "\t * @param  int    $object_id Object ID.",
            "lineNumber": 350
          },
          {
            "text": "\t * @param  array  $tt_ids    An array of term taxonomy IDs.",
            "lineNumber": 351
          },
          {
            "text": "\t * @param  string $taxonomy  Taxonomy slug.",
            "lineNumber": 352
          },
          {
            "text": "\t * @return void",
            "lineNumber": 353
          },
          {
            "text": "\t */",
            "lineNumber": 354
          },
          {
            "text": "\tpublic function term_relationship_deleted( $object_id, $tt_ids, $taxonomy ) {",
            "lineNumber": 355
          },
          {
            "text": "\t\t// Does $object_id belong to a vehicle?",
            "lineNumber": 356
          },
          {
            "text": "\t\tif ( INVP::POST_TYPE !== get_post_type( $object_id ) ) {",
            "lineNumber": 357
          },
          {
            "text": "\t\t\t",
            "lineNumber": 358
          }
        ]
      },
      "score": 0.30704736709594727
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-rest.php",
        "range": {
          "startPosition": {
            "line": 51
          },
          "endPosition": {
            "line": 96
          }
        },
        "contents": "\t\t\t\t\t'type'        =&gt; 'string',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}\n\n\t/**\n\t * Adds the photo_number meta field to the allowed orderby values.\n\t *\n\t * @param  array $params\n\t * @return array\n\t */\n\tpublic function allow_orderby_photo_number( $params ) {\n\t\t$params['orderby']['enum'][] = apply_filters( 'invp_prefix_meta_key', 'photo_number' );\n\t\treturn $params;\n\t}\n\n\t/**\n\t * Allow vehicles to be returned in a random order.\n\t *\n\t * @param  array        $query_params\n\t * @param  WP_Post_Type $post_type\n\t * @return array\n\t */\n\tpublic function allow_orderby_rand( $query_params ) {\n\t\t$query_params['orderby']['enum'][] = 'rand';\n\t\treturn $query_params;\n\t}\n\n\t/**\n\t * Given a post object, returns the term slugs of the type taxonomy.\n\t *\n\t * @param  array $post_object An array representing a post object.\n\t * @return array Term slugs of the type taxonomy.\n\t */\n\tpublic function get_the_type_slugs( $post_object ) {\n\t\t$terms = get_the_terms( $post_object['id'], 'type' );\n\t\tif ( is_array( $terms ) ) {\n\t\t\treturn wp_list_pluck( $terms, 'slug' );\n\t\t}\n\t\treturn array();\n\t}\n\n\t/**\n\t * Handles deleted vehicles in REST API responses to prevent warnings.",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t\t\t'type'        =&gt; 'string',",
            "lineNumber": 52
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 53
          },
          {
            "text": "\t\t\t)",
            "lineNumber": 54
          },
          {
            "text": "\t\t);",
            "lineNumber": 55
          },
          {
            "text": "\t}",
            "lineNumber": 56
          },
          {
            "lineNumber": 57
          },
          {
            "text": "\t/**",
            "lineNumber": 58
          },
          {
            "text": "\t * Adds the photo_number meta field to the allowed orderby values.",
            "lineNumber": 59
          },
          {
            "text": "\t *",
            "lineNumber": 60
          },
          {
            "text": "\t * @param  array $params",
            "lineNumber": 61
          },
          {
            "text": "\t * @return array",
            "lineNumber": 62
          },
          {
            "text": "\t */",
            "lineNumber": 63
          },
          {
            "text": "\tpublic function allow_orderby_photo_number( $params ) {",
            "lineNumber": 64
          },
          {
            "text": "\t\t$params['orderby']['enum'][] = apply_filters( 'invp_prefix_meta_key', 'photo_number' );",
            "lineNumber": 65
          },
          {
            "text": "\t\treturn $params;",
            "lineNumber": 66
          },
          {
            "text": "\t}",
            "lineNumber": 67
          },
          {
            "lineNumber": 68
          },
          {
            "text": "\t/**",
            "lineNumber": 69
          },
          {
            "text": "\t * Allow vehicles to be returned in a random order.",
            "lineNumber": 70
          },
          {
            "text": "\t *",
            "lineNumber": 71
          },
          {
            "text": "\t * @param  array        $query_params",
            "lineNumber": 72
          },
          {
            "text": "\t * @param  WP_Post_Type $post_type",
            "lineNumber": 73
          },
          {
            "text": "\t * @return array",
            "lineNumber": 74
          },
          {
            "text": "\t */",
            "lineNumber": 75
          },
          {
            "text": "\tpublic function allow_orderby_rand( $query_params ) {",
            "lineNumber": 76
          },
          {
            "text": "\t\t$query_params['orderby']['enum'][] = 'rand';",
            "lineNumber": 77
          },
          {
            "text": "\t\treturn $query_params;",
            "lineNumber": 78
          },
          {
            "text": "\t}",
            "lineNumber": 79
          },
          {
            "lineNumber": 80
          },
          {
            "text": "\t/**",
            "lineNumber": 81
          },
          {
            "text": "\t * Given a post object, returns the term slugs of the type taxonomy.",
            "lineNumber": 82
          },
          {
            "text": "\t *",
            "lineNumber": 83
          },
          {
            "text": "\t * @param  array $post_object An array representing a post object.",
            "lineNumber": 84
          },
          {
            "text": "\t * @return array Term slugs of the type taxonomy.",
            "lineNumber": 85
          },
          {
            "text": "\t */",
            "lineNumber": 86
          },
          {
            "text": "\tpublic function get_the_type_slugs( $post_object ) {",
            "lineNumber": 87
          },
          {
            "text": "\t\t$terms = get_the_terms( $post_object['id'], 'type' );",
            "lineNumber": 88
          },
          {
            "text": "\t\tif ( is_array( $terms ) ) {",
            "lineNumber": 89
          },
          {
            "text": "\t\t\treturn wp_list_pluck( $terms, 'slug' );",
            "lineNumber": 90
          },
          {
            "text": "\t\t}",
            "lineNumber": 91
          },
          {
            "text": "\t\treturn array();",
            "lineNumber": 92
          },
          {
            "text": "\t}",
            "lineNumber": 93
          },
          {
            "lineNumber": 94
          },
          {
            "text": "\t/**",
            "lineNumber": 95
          },
          {
            "text": "\t * Handles deleted vehicles in REST API responses to prevent warnings.",
            "lineNumber": 96
          }
        ]
      },
      "score": 0.3065933883190155
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/integrations/class-contact-form-7.php",
        "range": {
          "startPosition": {
            "line": 259
          },
          "endPosition": {
            "line": 318
          }
        },
        "contents": "\t\t\t}\n\n\t\t\t/**\n\t\t\t * Here's a query to get the post IDs of the vehicles we want\n\t\t\t * in the order we want. The reason we are not using get_posts\n\t\t\t * is because we want to sort by 3 post meta values\n\t\t\t */\n\t\t\tglobal $wpdb;\n\t\t\t$post_ids = $wpdb-&gt;get_col(\n\t\t\t\t$wpdb-&gt;prepare(\n\t\t\t\t\t\"\n\t\t\t\tSELECT \t\tDISTINCT ID\n\t\t\t\tFROM\t\t$wpdb-&gt;posts\n\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta1 ON $wpdb-&gt;posts.ID = meta1.post_id\n\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta2 ON $wpdb-&gt;posts.ID = meta2.post_id\n\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta3 ON $wpdb-&gt;posts.ID = meta3.post_id\n\t\t\t\tWHERE \t\tpost_type = %s\n\t\t\t\t\t\t\tAND post_status = 'publish'\n\t\t\t\t\t\t\tAND meta1.meta_key = %s\n\t\t\t\t\t\t\tAND meta2.meta_key = %s\n\t\t\t\t\t\t\tAND meta3.meta_key = %s\n\t\t\t\tORDER BY\tmeta1.meta_value DESC,\n\t\t\t\t\t\t\tmeta2.meta_value ASC,\n\t\t\t\t\t\t\tmeta3.meta_value ASC\n\t\t\t\t\",\n\t\t\t\t\tINVP::POST_TYPE,\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'year' ),\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'make' ),\n\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'model' )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// no results? no HTML.\n\t\t\tif ( empty( $post_ids ) ) {\n\t\t\t\treturn apply_filters( 'invp_cf7_field_vehicle_html', '' . $validation_error, $atts );\n\t\t\t}\n\n\t\t\t// build a drop down select.\n\t\t\t$select_atts = array(\n\t\t\t\t'name'  =&gt; $tag-&gt;name,\n\t\t\t\t'class' =&gt; wpcf7_form_controls_class( 'select' ),\n\t\t\t);\n\t\t\tif ( ! empty( $atts['id'] ) ) {\n\t\t\t\t$select_atts['id'] = $atts['id'];\n\t\t\t}\n\t\t\t$html = sprintf(\n\t\t\t\t'&lt;span class=\"wpcf7-form-control-wrap\" data-name=\"%s\"&gt;&lt;select %s&gt;&lt;option value=\"\"&gt;%s&lt;/option&gt;',\n\t\t\t\tesc_attr( $tag-&gt;name ),\n\t\t\t\twpcf7_format_atts( $select_atts ),\n\t\t\t\t__( 'Please choose a vehicle...', 'inventory-presser' )\n\t\t\t);\n\t\t\tforeach ( $post_ids as $post_id ) {\n\t\t\t\t// is this vehicle sold?\n\t\t\t\tif ( has_term( 'sold', 'availability', $post_id ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$meta = get_metadata( 'post', $post_id );\n\n\t\t\t\t// label is \"2005 Subaru Baja Turbo, Blue, #12022\".",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t}",
            "lineNumber": 260
          },
          {
            "lineNumber": 261
          },
          {
            "text": "\t\t\t/**",
            "lineNumber": 262
          },
          {
            "text": "\t\t\t * Here's a query to get the post IDs of the vehicles we want",
            "lineNumber": 263
          },
          {
            "text": "\t\t\t * in the order we want. The reason we are not using get_posts",
            "lineNumber": 264
          },
          {
            "text": "\t\t\t * is because we want to sort by 3 post meta values",
            "lineNumber": 265
          },
          {
            "text": "\t\t\t */",
            "lineNumber": 266
          },
          {
            "text": "\t\t\tglobal $wpdb;",
            "lineNumber": 267
          },
          {
            "text": "\t\t\t$post_ids = $wpdb-&gt;get_col(",
            "lineNumber": 268
          },
          {
            "text": "\t\t\t\t$wpdb-&gt;prepare(",
            "lineNumber": 269
          },
          {
            "text": "\t\t\t\t\t\"",
            "lineNumber": 270
          },
          {
            "text": "\t\t\t\tSELECT \t\tDISTINCT ID",
            "lineNumber": 271
          },
          {
            "text": "\t\t\t\tFROM\t\t$wpdb-&gt;posts",
            "lineNumber": 272
          },
          {
            "text": "\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta1 ON $wpdb-&gt;posts.ID = meta1.post_id",
            "lineNumber": 273
          },
          {
            "text": "\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta2 ON $wpdb-&gt;posts.ID = meta2.post_id",
            "lineNumber": 274
          },
          {
            "text": "\t\t\t\t\t\t\tLEFT JOIN $wpdb-&gt;postmeta meta3 ON $wpdb-&gt;posts.ID = meta3.post_id",
            "lineNumber": 275
          },
          {
            "text": "\t\t\t\tWHERE \t\tpost_type = %s",
            "lineNumber": 276
          },
          {
            "text": "\t\t\t\t\t\t\tAND post_status = 'publish'",
            "lineNumber": 277
          },
          {
            "text": "\t\t\t\t\t\t\tAND meta1.meta_key = %s",
            "lineNumber": 278
          },
          {
            "text": "\t\t\t\t\t\t\tAND meta2.meta_key = %s",
            "lineNumber": 279
          },
          {
            "text": "\t\t\t\t\t\t\tAND meta3.meta_key = %s",
            "lineNumber": 280
          },
          {
            "text": "\t\t\t\tORDER BY\tmeta1.meta_value DESC,",
            "lineNumber": 281
          },
          {
            "text": "\t\t\t\t\t\t\tmeta2.meta_value ASC,",
            "lineNumber": 282
          },
          {
            "text": "\t\t\t\t\t\t\tmeta3.meta_value ASC",
            "lineNumber": 283
          },
          {
            "text": "\t\t\t\t\",",
            "lineNumber": 284
          },
          {
            "text": "\t\t\t\t\tINVP::POST_TYPE,",
            "lineNumber": 285
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'year' ),",
            "lineNumber": 286
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'make' ),",
            "lineNumber": 287
          },
          {
            "text": "\t\t\t\t\tapply_filters( 'invp_prefix_meta_key', 'model' )",
            "lineNumber": 288
          },
          {
            "text": "\t\t\t\t)",
            "lineNumber": 289
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 290
          },
          {
            "lineNumber": 291
          },
          {
            "text": "\t\t\t// no results? no HTML.",
            "lineNumber": 292
          },
          {
            "text": "\t\t\tif ( empty( $post_ids ) ) {",
            "lineNumber": 293
          },
          {
            "text": "\t\t\t\treturn apply_filters( 'invp_cf7_field_vehicle_html', '' . $validation_error, $atts );",
            "lineNumber": 294
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 295
          },
          {
            "lineNumber": 296
          },
          {
            "text": "\t\t\t// build a drop down select.",
            "lineNumber": 297
          },
          {
            "text": "\t\t\t$select_atts = array(",
            "lineNumber": 298
          },
          {
            "text": "\t\t\t\t'name'  =&gt; $tag-&gt;name,",
            "lineNumber": 299
          },
          {
            "text": "\t\t\t\t'class' =&gt; wpcf7_form_controls_class( 'select' ),",
            "lineNumber": 300
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 301
          },
          {
            "text": "\t\t\tif ( ! empty( $atts['id'] ) ) {",
            "lineNumber": 302
          },
          {
            "text": "\t\t\t\t$select_atts['id'] = $atts['id'];",
            "lineNumber": 303
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 304
          },
          {
            "text": "\t\t\t$html = sprintf(",
            "lineNumber": 305
          },
          {
            "text": "\t\t\t\t'&lt;span class=\"wpcf7-form-control-wrap\" data-name=\"%s\"&gt;&lt;select %s&gt;&lt;option value=\"\"&gt;%s&lt;/option&gt;',",
            "lineNumber": 306
          },
          {
            "text": "\t\t\t\tesc_attr( $tag-&gt;name ),",
            "lineNumber": 307
          },
          {
            "text": "\t\t\t\twpcf7_format_atts( $select_atts ),",
            "lineNumber": 308
          },
          {
            "text": "\t\t\t\t__( 'Please choose a vehicle...', 'inventory-presser' )",
            "lineNumber": 309
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 310
          },
          {
            "text": "\t\t\tforeach ( $post_ids as $post_id ) {",
            "lineNumber": 311
          },
          {
            "text": "\t\t\t\t// is this vehicle sold?",
            "lineNumber": 312
          },
          {
            "text": "\t\t\t\tif ( has_term( 'sold', 'availability', $post_id ) ) {",
            "lineNumber": 313
          },
          {
            "text": "\t\t\t\t\tcontinue;",
            "lineNumber": 314
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 315
          },
          {
            "text": "\t\t\t\t$meta = get_metadata( 'post', $post_id );",
            "lineNumber": 316
          },
          {
            "lineNumber": 317
          },
          {
            "text": "\t\t\t\t// label is \"2005 Subaru Baja Turbo, Blue, #12022\".",
            "lineNumber": 318
          }
        ]
      },
      "score": 0.30201441049575806
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/template-tags.php",
        "range": {
          "startPosition": {
            "line": 1171
          },
          "endPosition": {
            "line": 1242
          }
        },
        "contents": " * @return string\n */\nfunction invp_get_the_type( $post_ID = null ) {\n\treturn INVP::get_meta( 'type', $post_ID );\n}\n\n/**\n * Template tag. Returns the vehicles VIN.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_VIN( $post_ID = null ) {\n\treturn INVP::get_meta( 'vin', $post_ID );\n}\n\n/**\n * invp_get_the_year\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_year( $post_ID = null ) {\n\treturn INVP::get_meta( 'year', $post_ID );\n}\n\n/**\n * Returns the YouTube embed code for this vehicle or an empty string.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_youtube_embed( $post_ID = null ) {\n\treturn INVP::get_meta( 'youtube_embed', $post_ID );\n}\n\n/**\n * Returns this vehicle's YouTube video URL or empty string.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string This vehicle's YouTube URL or empty string\n */\nfunction invp_get_the_youtube_url( $post_ID = null ) {\n\t$video_id = INVP::get_meta( 'youtube', $post_ID );\n\tif ( empty( $video_id ) ) {\n\t\treturn '';\n\t}\n\n\treturn 'https://www.youtube.com/watch?v=' . $video_id;\n}\n\n/**\n * invp_have_carfax_report\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool\n */\nfunction invp_have_carfax_report( $post_ID = null ) {\n\treturn ! empty( INVP::get_meta( 'carfax_have_report', $post_ID ) );\n}\n\n/**\n * Is this vehicle a boat?\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool True if this vehicle's type is boat.\n */\nfunction invp_is_boat( $post_ID = null ) {\n\treturn 'boat' === strtolower( invp_get_the_type( $post_ID ) );\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": " * @return string",
            "lineNumber": 1172
          },
          {
            "text": " */",
            "lineNumber": 1173
          },
          {
            "text": "function invp_get_the_type( $post_ID = null ) {",
            "lineNumber": 1174
          },
          {
            "text": "\treturn INVP::get_meta( 'type', $post_ID );",
            "lineNumber": 1175
          },
          {
            "text": "}",
            "lineNumber": 1176
          },
          {
            "lineNumber": 1177
          },
          {
            "text": "/**",
            "lineNumber": 1178
          },
          {
            "text": " * Template tag. Returns the vehicles VIN.",
            "lineNumber": 1179
          },
          {
            "text": " *",
            "lineNumber": 1180
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1181
          },
          {
            "text": " * @return string",
            "lineNumber": 1182
          },
          {
            "text": " */",
            "lineNumber": 1183
          },
          {
            "text": "function invp_get_the_VIN( $post_ID = null ) {",
            "lineNumber": 1184
          },
          {
            "text": "\treturn INVP::get_meta( 'vin', $post_ID );",
            "lineNumber": 1185
          },
          {
            "text": "}",
            "lineNumber": 1186
          },
          {
            "lineNumber": 1187
          },
          {
            "text": "/**",
            "lineNumber": 1188
          },
          {
            "text": " * invp_get_the_year",
            "lineNumber": 1189
          },
          {
            "text": " *",
            "lineNumber": 1190
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1191
          },
          {
            "text": " * @return string",
            "lineNumber": 1192
          },
          {
            "text": " */",
            "lineNumber": 1193
          },
          {
            "text": "function invp_get_the_year( $post_ID = null ) {",
            "lineNumber": 1194
          },
          {
            "text": "\treturn INVP::get_meta( 'year', $post_ID );",
            "lineNumber": 1195
          },
          {
            "text": "}",
            "lineNumber": 1196
          },
          {
            "lineNumber": 1197
          },
          {
            "text": "/**",
            "lineNumber": 1198
          },
          {
            "text": " * Returns the YouTube embed code for this vehicle or an empty string.",
            "lineNumber": 1199
          },
          {
            "text": " *",
            "lineNumber": 1200
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1201
          },
          {
            "text": " * @return string",
            "lineNumber": 1202
          },
          {
            "text": " */",
            "lineNumber": 1203
          },
          {
            "text": "function invp_get_the_youtube_embed( $post_ID = null ) {",
            "lineNumber": 1204
          },
          {
            "text": "\treturn INVP::get_meta( 'youtube_embed', $post_ID );",
            "lineNumber": 1205
          },
          {
            "text": "}",
            "lineNumber": 1206
          },
          {
            "lineNumber": 1207
          },
          {
            "text": "/**",
            "lineNumber": 1208
          },
          {
            "text": " * Returns this vehicle's YouTube video URL or empty string.",
            "lineNumber": 1209
          },
          {
            "text": " *",
            "lineNumber": 1210
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1211
          },
          {
            "text": " * @return string This vehicle's YouTube URL or empty string",
            "lineNumber": 1212
          },
          {
            "text": " */",
            "lineNumber": 1213
          },
          {
            "text": "function invp_get_the_youtube_url( $post_ID = null ) {",
            "lineNumber": 1214
          },
          {
            "text": "\t$video_id = INVP::get_meta( 'youtube', $post_ID );",
            "lineNumber": 1215
          },
          {
            "text": "\tif ( empty( $video_id ) ) {",
            "lineNumber": 1216
          },
          {
            "text": "\t\treturn '';",
            "lineNumber": 1217
          },
          {
            "text": "\t}",
            "lineNumber": 1218
          },
          {
            "lineNumber": 1219
          },
          {
            "text": "\treturn 'https://www.youtube.com/watch?v=' . $video_id;",
            "lineNumber": 1220
          },
          {
            "text": "}",
            "lineNumber": 1221
          },
          {
            "lineNumber": 1222
          },
          {
            "text": "/**",
            "lineNumber": 1223
          },
          {
            "text": " * invp_have_carfax_report",
            "lineNumber": 1224
          },
          {
            "text": " *",
            "lineNumber": 1225
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1226
          },
          {
            "text": " * @return bool",
            "lineNumber": 1227
          },
          {
            "text": " */",
            "lineNumber": 1228
          },
          {
            "text": "function invp_have_carfax_report( $post_ID = null ) {",
            "lineNumber": 1229
          },
          {
            "text": "\treturn ! empty( INVP::get_meta( 'carfax_have_report', $post_ID ) );",
            "lineNumber": 1230
          },
          {
            "text": "}",
            "lineNumber": 1231
          },
          {
            "lineNumber": 1232
          },
          {
            "text": "/**",
            "lineNumber": 1233
          },
          {
            "text": " * Is this vehicle a boat?",
            "lineNumber": 1234
          },
          {
            "text": " *",
            "lineNumber": 1235
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1236
          },
          {
            "text": " * @return bool True if this vehicle's type is boat.",
            "lineNumber": 1237
          },
          {
            "text": " */",
            "lineNumber": 1238
          },
          {
            "text": "function invp_is_boat( $post_ID = null ) {",
            "lineNumber": 1239
          },
          {
            "text": "\treturn 'boat' === strtolower( invp_get_the_type( $post_ID ) );",
            "lineNumber": 1240
          },
          {
            "text": "}",
            "lineNumber": 1241
          }
        ]
      },
      "score": 0.2873570919036865
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/shortcode/class-shortcode-archive.php",
        "range": {
          "startPosition": {
            "line": 66
          },
          "endPosition": {
            "line": 112
          }
        },
        "contents": "\t\twp_enqueue_style( 'invp_archive_vehicle' );\n\n\t\t$atts = shortcode_atts(\n\t\t\tarray(\n\t\t\t\t'location'       =&gt; '',\n\t\t\t\t'order'          =&gt; get_query_var( 'order' ),\n\t\t\t\t'paged'          =&gt; ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1,\n\t\t\t\t'posts_per_page' =&gt; get_option( 'posts_per_page' ),\n\t\t\t\t'post_status'    =&gt; 'publish',\n\t\t\t\t'show_titles'    =&gt; true,\n\t\t\t\t'style'          =&gt; 'a',\n\t\t\t),\n\t\t\t$atts,\n\t\t\t'invp_archive'\n\t\t);\n\n\t\t// Allow orderby and order $_GET parameters to change the sort order.\n\t\t$orderby = get_query_var( 'orderby' );\n\t\tif ( '' !== $orderby &amp;&amp; 'meta_value' !== $orderby ) {\n\t\t\t$atts['meta_key'] = apply_filters( 'invp_prefix_meta_key', $orderby );\n\t\t\t$atts['orderby']  = 'meta_value';\n\t\t}\n\n\t\t// Parse boolean values to make life easy on users.\n\t\t$atts['show_titles'] = filter_var( $atts['show_titles'], FILTER_VALIDATE_BOOLEAN );\n\t\t$atts['post_type']   = INVP::POST_TYPE;\n\n\t\t// Ensure style is \"a\" or \"b\".\n\t\t$atts['style'] = in_array( $atts['style'], array( 'a', 'b' ), true ) ? $atts['style'] : 'a';\n\n\t\t// Add all taxonomy query vars to $atts so filters work.\n\t\t$taxonomies = get_object_taxonomies( $atts['post_type'], 'objects' );\n\t\tforeach ( $taxonomies as $taxonomy ) {\n\t\t\t$query_value = get_query_var( $taxonomy-&gt;query_var );\n\t\t\tif ( '' !== $query_value ) {\n\t\t\t\t$atts[ $taxonomy-&gt;query_var ] = $query_value;\n\t\t\t}\n\t\t}\n\n\t\t// Query vehicles.\n\t\tadd_filter( 'invp_range_filters_main_query', '__return_false' );\n\t\t$vehicles_query = new WP_Query( $this-&gt;clean_attributes_for_query( $atts ) );\n\t\tremove_filter( 'invp_range_filters_main_query', '__return_false' );\n\n\t\t// Create the HTML output.\n\t\t$have_posts = $vehicles_query-&gt;have_posts();",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\twp_enqueue_style( 'invp_archive_vehicle' );",
            "lineNumber": 67
          },
          {
            "lineNumber": 68
          },
          {
            "text": "\t\t$atts = shortcode_atts(",
            "lineNumber": 69
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 70
          },
          {
            "text": "\t\t\t\t'location'       =&gt; '',",
            "lineNumber": 71
          },
          {
            "text": "\t\t\t\t'order'          =&gt; get_query_var( 'order' ),",
            "lineNumber": 72
          },
          {
            "text": "\t\t\t\t'paged'          =&gt; ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1,",
            "lineNumber": 73
          },
          {
            "text": "\t\t\t\t'posts_per_page' =&gt; get_option( 'posts_per_page' ),",
            "lineNumber": 74
          },
          {
            "text": "\t\t\t\t'post_status'    =&gt; 'publish',",
            "lineNumber": 75
          },
          {
            "text": "\t\t\t\t'show_titles'    =&gt; true,",
            "lineNumber": 76
          },
          {
            "text": "\t\t\t\t'style'          =&gt; 'a',",
            "lineNumber": 77
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 78
          },
          {
            "text": "\t\t\t$atts,",
            "lineNumber": 79
          },
          {
            "text": "\t\t\t'invp_archive'",
            "lineNumber": 80
          },
          {
            "text": "\t\t);",
            "lineNumber": 81
          },
          {
            "lineNumber": 82
          },
          {
            "text": "\t\t// Allow orderby and order $_GET parameters to change the sort order.",
            "lineNumber": 83
          },
          {
            "text": "\t\t$orderby = get_query_var( 'orderby' );",
            "lineNumber": 84
          },
          {
            "text": "\t\tif ( '' !== $orderby &amp;&amp; 'meta_value' !== $orderby ) {",
            "lineNumber": 85
          },
          {
            "text": "\t\t\t$atts['meta_key'] = apply_filters( 'invp_prefix_meta_key', $orderby );",
            "lineNumber": 86
          },
          {
            "text": "\t\t\t$atts['orderby']  = 'meta_value';",
            "lineNumber": 87
          },
          {
            "text": "\t\t}",
            "lineNumber": 88
          },
          {
            "lineNumber": 89
          },
          {
            "text": "\t\t// Parse boolean values to make life easy on users.",
            "lineNumber": 90
          },
          {
            "text": "\t\t$atts['show_titles'] = filter_var( $atts['show_titles'], FILTER_VALIDATE_BOOLEAN );",
            "lineNumber": 91
          },
          {
            "text": "\t\t$atts['post_type']   = INVP::POST_TYPE;",
            "lineNumber": 92
          },
          {
            "lineNumber": 93
          },
          {
            "text": "\t\t// Ensure style is \"a\" or \"b\".",
            "lineNumber": 94
          },
          {
            "text": "\t\t$atts['style'] = in_array( $atts['style'], array( 'a', 'b' ), true ) ? $atts['style'] : 'a';",
            "lineNumber": 95
          },
          {
            "lineNumber": 96
          },
          {
            "text": "\t\t// Add all taxonomy query vars to $atts so filters work.",
            "lineNumber": 97
          },
          {
            "text": "\t\t$taxonomies = get_object_taxonomies( $atts['post_type'], 'objects' );",
            "lineNumber": 98
          },
          {
            "text": "\t\tforeach ( $taxonomies as $taxonomy ) {",
            "lineNumber": 99
          },
          {
            "text": "\t\t\t$query_value = get_query_var( $taxonomy-&gt;query_var );",
            "lineNumber": 100
          },
          {
            "text": "\t\t\tif ( '' !== $query_value ) {",
            "lineNumber": 101
          },
          {
            "text": "\t\t\t\t$atts[ $taxonomy-&gt;query_var ] = $query_value;",
            "lineNumber": 102
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 103
          },
          {
            "text": "\t\t}",
            "lineNumber": 104
          },
          {
            "lineNumber": 105
          },
          {
            "text": "\t\t// Query vehicles.",
            "lineNumber": 106
          },
          {
            "text": "\t\tadd_filter( 'invp_range_filters_main_query', '__return_false' );",
            "lineNumber": 107
          },
          {
            "text": "\t\t$vehicles_query = new WP_Query( $this-&gt;clean_attributes_for_query( $atts ) );",
            "lineNumber": 108
          },
          {
            "text": "\t\tremove_filter( 'invp_range_filters_main_query', '__return_false' );",
            "lineNumber": 109
          },
          {
            "lineNumber": 110
          },
          {
            "text": "\t\t// Create the HTML output.",
            "lineNumber": 111
          },
          {
            "text": "\t\t$have_posts = $vehicles_query-&gt;have_posts();",
            "lineNumber": 112
          }
        ]
      },
      "score": 0.2823168933391571
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-additional-listings-pages.php",
        "range": {
          "startPosition": {
            "line": 235
          },
          "endPosition": {
            "line": 303
          }
        },
        "contents": "\t/**\n\t * True or false, a given additional listing page rule has settings that\n\t * allow us to create the page. User might not provide the URL path, for\n\t * example.\n\t *\n\t * @param  array $rule\n\t * @return bool\n\t */\n\tpublic static function is_valid_rule( $rule ) {\n\t\tif ( empty( $rule ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $rule['url_path'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// We allow no filter at all.\n\t\tif ( '' === $rule['key'] ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n\t\t * If the operator is greater than or less than and there is no\n\t\t * comparison value or a comparison value that is not a number, you\n\t\t * might have a bad time.\n\t\t */\n\t\tif ( ( empty( $rule['value'] ) || ! is_numeric( $rule['value'] ) )\n\t\t\t&amp;&amp; ( 'less_than' === $rule['operator'] || 'greater_than' === $rule['operator'] )\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * If the key points to a value that is not a number and the operator\n\t\t * is less than or greater than, you might have a bad time.\n\t\t */\n\t\tif ( ! INVP::meta_value_is_number( apply_filters( 'invp_prefix_meta_key', $rule['key'] ) )\n\t\t\t&amp;&amp; ( 'less_than' === $rule['operator'] || 'greater_than' === $rule['operator'] )\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Changes the query to satisfy the rule for this listings page\n\t *\n\t * @param  WP_Query $query\n\t * @return WP_Query\n\t */\n\tpublic function modify_query( $query ) {\n\t\t$additional_listing = self::get_current_matched_rule( $query );\n\t\tif ( ! $additional_listing ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// found it, require the key &amp; enforce the logic in the rule.\n\t\t$old = $query-&gt;get( 'meta_query', array() );\n\t\t$new = self::get_query_meta_array( $additional_listing );\n\n\t\tif ( ! empty( $new ) ) {\n\t\t\t$query-&gt;set( 'meta_query', array_merge( $old, $new ) );\n\t\t}\n\t\treturn $query;\n\t}\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t/**",
            "lineNumber": 236
          },
          {
            "text": "\t * True or false, a given additional listing page rule has settings that",
            "lineNumber": 237
          },
          {
            "text": "\t * allow us to create the page. User might not provide the URL path, for",
            "lineNumber": 238
          },
          {
            "text": "\t * example.",
            "lineNumber": 239
          },
          {
            "text": "\t *",
            "lineNumber": 240
          },
          {
            "text": "\t * @param  array $rule",
            "lineNumber": 241
          },
          {
            "text": "\t * @return bool",
            "lineNumber": 242
          },
          {
            "text": "\t */",
            "lineNumber": 243
          },
          {
            "text": "\tpublic static function is_valid_rule( $rule ) {",
            "lineNumber": 244
          },
          {
            "text": "\t\tif ( empty( $rule ) ) {",
            "lineNumber": 245
          },
          {
            "text": "\t\t\treturn false;",
            "lineNumber": 246
          },
          {
            "text": "\t\t}",
            "lineNumber": 247
          },
          {
            "lineNumber": 248
          },
          {
            "text": "\t\tif ( empty( $rule['url_path'] ) ) {",
            "lineNumber": 249
          },
          {
            "text": "\t\t\treturn false;",
            "lineNumber": 250
          },
          {
            "text": "\t\t}",
            "lineNumber": 251
          },
          {
            "lineNumber": 252
          },
          {
            "text": "\t\t// We allow no filter at all.",
            "lineNumber": 253
          },
          {
            "text": "\t\tif ( '' === $rule['key'] ) {",
            "lineNumber": 254
          },
          {
            "text": "\t\t\treturn true;",
            "lineNumber": 255
          },
          {
            "text": "\t\t}",
            "lineNumber": 256
          },
          {
            "lineNumber": 257
          },
          {
            "text": "\t\t/**",
            "lineNumber": 258
          },
          {
            "text": "\t\t * If the operator is greater than or less than and there is no",
            "lineNumber": 259
          },
          {
            "text": "\t\t * comparison value or a comparison value that is not a number, you",
            "lineNumber": 260
          },
          {
            "text": "\t\t * might have a bad time.",
            "lineNumber": 261
          },
          {
            "text": "\t\t */",
            "lineNumber": 262
          },
          {
            "text": "\t\tif ( ( empty( $rule['value'] ) || ! is_numeric( $rule['value'] ) )",
            "lineNumber": 263
          },
          {
            "text": "\t\t\t&amp;&amp; ( 'less_than' === $rule['operator'] || 'greater_than' === $rule['operator'] )",
            "lineNumber": 264
          },
          {
            "text": "\t\t) {",
            "lineNumber": 265
          },
          {
            "text": "\t\t\treturn false;",
            "lineNumber": 266
          },
          {
            "text": "\t\t}",
            "lineNumber": 267
          },
          {
            "lineNumber": 268
          },
          {
            "text": "\t\t/**",
            "lineNumber": 269
          },
          {
            "text": "\t\t * If the key points to a value that is not a number and the operator",
            "lineNumber": 270
          },
          {
            "text": "\t\t * is less than or greater than, you might have a bad time.",
            "lineNumber": 271
          },
          {
            "text": "\t\t */",
            "lineNumber": 272
          },
          {
            "text": "\t\tif ( ! INVP::meta_value_is_number( apply_filters( 'invp_prefix_meta_key', $rule['key'] ) )",
            "lineNumber": 273
          },
          {
            "text": "\t\t\t&amp;&amp; ( 'less_than' === $rule['operator'] || 'greater_than' === $rule['operator'] )",
            "lineNumber": 274
          },
          {
            "text": "\t\t) {",
            "lineNumber": 275
          },
          {
            "text": "\t\t\treturn false;",
            "lineNumber": 276
          },
          {
            "text": "\t\t}",
            "lineNumber": 277
          },
          {
            "lineNumber": 278
          },
          {
            "text": "\t\treturn true;",
            "lineNumber": 279
          },
          {
            "text": "\t}",
            "lineNumber": 280
          },
          {
            "lineNumber": 281
          },
          {
            "text": "\t/**",
            "lineNumber": 282
          },
          {
            "text": "\t * Changes the query to satisfy the rule for this listings page",
            "lineNumber": 283
          },
          {
            "text": "\t *",
            "lineNumber": 284
          },
          {
            "text": "\t * @param  WP_Query $query",
            "lineNumber": 285
          },
          {
            "text": "\t * @return WP_Query",
            "lineNumber": 286
          },
          {
            "text": "\t */",
            "lineNumber": 287
          },
          {
            "text": "\tpublic function modify_query( $query ) {",
            "lineNumber": 288
          },
          {
            "text": "\t\t$additional_listing = self::get_current_matched_rule( $query );",
            "lineNumber": 289
          },
          {
            "text": "\t\tif ( ! $additional_listing ) {",
            "lineNumber": 290
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 291
          },
          {
            "text": "\t\t}",
            "lineNumber": 292
          },
          {
            "lineNumber": 293
          },
          {
            "text": "\t\t// found it, require the key &amp; enforce the logic in the rule.",
            "lineNumber": 294
          },
          {
            "text": "\t\t$old = $query-&gt;get( 'meta_query', array() );",
            "lineNumber": 295
          },
          {
            "text": "\t\t$new = self::get_query_meta_array( $additional_listing );",
            "lineNumber": 296
          },
          {
            "lineNumber": 297
          },
          {
            "text": "\t\tif ( ! empty( $new ) ) {",
            "lineNumber": 298
          },
          {
            "text": "\t\t\t$query-&gt;set( 'meta_query', array_merge( $old, $new ) );",
            "lineNumber": 299
          },
          {
            "text": "\t\t}",
            "lineNumber": 300
          },
          {
            "text": "\t\treturn $query;",
            "lineNumber": 301
          },
          {
            "text": "\t}",
            "lineNumber": 302
          },
          {
            "text": "}",
            "lineNumber": 303
          }
        ]
      },
      "score": 0.2802198529243469
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-rest.php",
        "range": {
          "startPosition": {},
          "endPosition": {
            "line": 60
          }
        },
        "contents": "&lt;?php\ndefined( 'ABSPATH' ) || exit;\n\n/**\n * Inventory_Presser_REST\n *\n * Adds routes to the REST API at /wp-json/invp/\n */\nclass Inventory_Presser_REST {\n\t/**\n\t * add_hooks\n\t *\n\t * @return void\n\t */\n\tpublic function add_hooks() {\n\t\t/*\n\t\t\tAdds\n\t\t\t\t/invp/v1/settings\n\t\t\t\t/invp/v1/feed-complete routes.\n\t\t*/\n\t\tadd_action( 'rest_api_init', array( $this, 'add_routes' ) );\n\t\t// Adds the inventory_type_slugs field to the response of the /wp-json/wp/v2/inventory_vehicle route.\n\t\tadd_action( 'rest_api_init', array( $this, 'add_inventory_type_slugs_to_posts' ) );\n\n\t\t// Allow attachments to be ordered by the inventory_presser_photo_number meta value.\n\t\tadd_filter( 'rest_attachment_collection_params', array( $this, 'allow_orderby_photo_number' ) );\n\t\tadd_filter( 'rest_attachment_query', array( $this, 'orderby_photo_number' ), 10, 2 );\n\n\t\tif ( defined( 'INVP::POST_TYPE' ) ) {\n\t\t\t// Allow vehicles to be returned in a random order.\n\t\t\tadd_filter( 'rest_' . INVP::POST_TYPE . '_collection_params', array( $this, 'allow_orderby_rand' ) );\n\n\t\t\t// Prevent REST API warnings when vehicles are deleted during request processing.\n\t\t\tadd_filter( 'rest_prepare_' . INVP::POST_TYPE, array( $this, 'handle_null_post' ), 10, 3 );\n\t\t}\n\t}\n\n\t/**\n\t * Adds an attribute &#96;inventory_type_slugs&#96; to the response of the\n\t * /wp-json/wp/v2/inventory route.\n\t *\n\t * @return void\n\t */\n\tpublic function add_inventory_type_slugs_to_posts() {\n\t\tregister_rest_field(\n\t\t\tINVP::POST_TYPE,\n\t\t\t'inventory_type_slugs',\n\t\t\tarray(\n\t\t\t\t'get_callback' =&gt; array( $this, 'get_the_type_slugs' ),\n\t\t\t\t'schema'       =&gt; array(\n\t\t\t\t\t'description' =&gt; __( 'The type taxonomy term slugs.', 'inventory-presser' ),\n\t\t\t\t\t'type'        =&gt; 'string',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}\n\n\t/**\n\t * Adds the photo_number meta field to the allowed orderby values.\n\t *",
        "signatures": {},
        "detailedLines": [
          {
            "text": "&lt;?php",
            "lineNumber": 1
          },
          {
            "text": "defined( 'ABSPATH' ) || exit;",
            "lineNumber": 2
          },
          {
            "lineNumber": 3
          },
          {
            "text": "/**",
            "lineNumber": 4
          },
          {
            "text": " * Inventory_Presser_REST",
            "lineNumber": 5
          },
          {
            "text": " *",
            "lineNumber": 6
          },
          {
            "text": " * Adds routes to the REST API at /wp-json/invp/",
            "lineNumber": 7
          },
          {
            "text": " */",
            "lineNumber": 8
          },
          {
            "text": "class Inventory_Presser_REST {",
            "lineNumber": 9
          },
          {
            "text": "\t/**",
            "lineNumber": 10
          },
          {
            "text": "\t * add_hooks",
            "lineNumber": 11
          },
          {
            "text": "\t *",
            "lineNumber": 12
          },
          {
            "text": "\t * @return void",
            "lineNumber": 13
          },
          {
            "text": "\t */",
            "lineNumber": 14
          },
          {
            "text": "\tpublic function add_hooks() {",
            "lineNumber": 15
          },
          {
            "text": "\t\t/*",
            "lineNumber": 16
          },
          {
            "text": "\t\t\tAdds",
            "lineNumber": 17
          },
          {
            "text": "\t\t\t\t/invp/v1/settings",
            "lineNumber": 18
          },
          {
            "text": "\t\t\t\t/invp/v1/feed-complete routes.",
            "lineNumber": 19
          },
          {
            "text": "\t\t*/",
            "lineNumber": 20
          },
          {
            "text": "\t\tadd_action( 'rest_api_init', array( $this, 'add_routes' ) );",
            "lineNumber": 21
          },
          {
            "text": "\t\t// Adds the inventory_type_slugs field to the response of the /wp-json/wp/v2/inventory_vehicle route.",
            "lineNumber": 22
          },
          {
            "text": "\t\tadd_action( 'rest_api_init', array( $this, 'add_inventory_type_slugs_to_posts' ) );",
            "lineNumber": 23
          },
          {
            "lineNumber": 24
          },
          {
            "text": "\t\t// Allow attachments to be ordered by the inventory_presser_photo_number meta value.",
            "lineNumber": 25
          },
          {
            "text": "\t\tadd_filter( 'rest_attachment_collection_params', array( $this, 'allow_orderby_photo_number' ) );",
            "lineNumber": 26
          },
          {
            "text": "\t\tadd_filter( 'rest_attachment_query', array( $this, 'orderby_photo_number' ), 10, 2 );",
            "lineNumber": 27
          },
          {
            "lineNumber": 28
          },
          {
            "text": "\t\tif ( defined( 'INVP::POST_TYPE' ) ) {",
            "lineNumber": 29
          },
          {
            "text": "\t\t\t// Allow vehicles to be returned in a random order.",
            "lineNumber": 30
          },
          {
            "text": "\t\t\tadd_filter( 'rest_' . INVP::POST_TYPE . '_collection_params', array( $this, 'allow_orderby_rand' ) );",
            "lineNumber": 31
          },
          {
            "lineNumber": 32
          },
          {
            "text": "\t\t\t// Prevent REST API warnings when vehicles are deleted during request processing.",
            "lineNumber": 33
          },
          {
            "text": "\t\t\tadd_filter( 'rest_prepare_' . INVP::POST_TYPE, array( $this, 'handle_null_post' ), 10, 3 );",
            "lineNumber": 34
          },
          {
            "text": "\t\t}",
            "lineNumber": 35
          },
          {
            "text": "\t}",
            "lineNumber": 36
          },
          {
            "lineNumber": 37
          },
          {
            "text": "\t/**",
            "lineNumber": 38
          },
          {
            "text": "\t * Adds an attribute &#96;inventory_type_slugs&#96; to the response of the",
            "lineNumber": 39
          },
          {
            "text": "\t * /wp-json/wp/v2/inventory route.",
            "lineNumber": 40
          },
          {
            "text": "\t *",
            "lineNumber": 41
          },
          {
            "text": "\t * @return void",
            "lineNumber": 42
          },
          {
            "text": "\t */",
            "lineNumber": 43
          },
          {
            "text": "\tpublic function add_inventory_type_slugs_to_posts() {",
            "lineNumber": 44
          },
          {
            "text": "\t\tregister_rest_field(",
            "lineNumber": 45
          },
          {
            "text": "\t\t\tINVP::POST_TYPE,",
            "lineNumber": 46
          },
          {
            "text": "\t\t\t'inventory_type_slugs',",
            "lineNumber": 47
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 48
          },
          {
            "text": "\t\t\t\t'get_callback' =&gt; array( $this, 'get_the_type_slugs' ),",
            "lineNumber": 49
          },
          {
            "text": "\t\t\t\t'schema'       =&gt; array(",
            "lineNumber": 50
          },
          {
            "text": "\t\t\t\t\t'description' =&gt; __( 'The type taxonomy term slugs.', 'inventory-presser' ),",
            "lineNumber": 51
          },
          {
            "text": "\t\t\t\t\t'type'        =&gt; 'string',",
            "lineNumber": 52
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 53
          },
          {
            "text": "\t\t\t)",
            "lineNumber": 54
          },
          {
            "text": "\t\t);",
            "lineNumber": 55
          },
          {
            "text": "\t}",
            "lineNumber": 56
          },
          {
            "lineNumber": 57
          },
          {
            "text": "\t/**",
            "lineNumber": 58
          },
          {
            "text": "\t * Adds the photo_number meta field to the allowed orderby values.",
            "lineNumber": 59
          },
          {
            "text": "\t *",
            "lineNumber": 60
          }
        ]
      },
      "score": 0.2797602415084839
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-add-custom-fields-to-search.php",
        "range": {
          "startPosition": {
            "line": 69,
            "column": 4
          },
          "endPosition": {
            "line": 102
          }
        },
        "contents": "return $join;\n\t\t\t}\n\n\t\t\t// join to search post meta values like year, make, model, trim, etc.\n\t\t\t$join .= \" LEFT JOIN $wpdb-&gt;postmeta searchmeta ON $wpdb-&gt;posts.ID = searchmeta.post_id \";\n\t\t\treturn $join;\n\t\t}\n\n\t\t/**\n\t\t * Modify the search query with posts_where\n\t\t *\n\t\t * @see https://codex.wordpress.org/Plugin_API/Filter_Reference/posts_where\n\t\t *\n\t\t * @param  string $where\n\t\t * @return string\n\t\t */\n\t\tpublic function cf_search_where( $where ) {\n\n\t\t\tif ( ! is_search() || $this-&gt;is_media_library() ) {\n\t\t\t\treturn $where;\n\t\t\t}\n\n\t\t\tglobal $wpdb;\n\t\t\t$where = preg_replace(\n\t\t\t\t\"/\\(\\s*$wpdb-&gt;posts.post_title\\s+LIKE\\s*(\\'[^\\']+\\')\\s*\\)/\",\n\t\t\t\t\"($wpdb-&gt;posts.post_title LIKE $1) OR ( searchmeta.meta_value LIKE $1 ) \",\n\t\t\t\t$where\n\t\t\t);\n\n\t\t\treturn $where;\n\t\t}\n\t}\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "return $join;",
            "lineNumber": 70
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 71
          },
          {
            "lineNumber": 72
          },
          {
            "text": "\t\t\t// join to search post meta values like year, make, model, trim, etc.",
            "lineNumber": 73
          },
          {
            "text": "\t\t\t$join .= \" LEFT JOIN $wpdb-&gt;postmeta searchmeta ON $wpdb-&gt;posts.ID = searchmeta.post_id \";",
            "lineNumber": 74
          },
          {
            "text": "\t\t\treturn $join;",
            "lineNumber": 75
          },
          {
            "text": "\t\t}",
            "lineNumber": 76
          },
          {
            "lineNumber": 77
          },
          {
            "text": "\t\t/**",
            "lineNumber": 78
          },
          {
            "text": "\t\t * Modify the search query with posts_where",
            "lineNumber": 79
          },
          {
            "text": "\t\t *",
            "lineNumber": 80
          },
          {
            "text": "\t\t * @see https://codex.wordpress.org/Plugin_API/Filter_Reference/posts_where",
            "lineNumber": 81
          },
          {
            "text": "\t\t *",
            "lineNumber": 82
          },
          {
            "text": "\t\t * @param  string $where",
            "lineNumber": 83
          },
          {
            "text": "\t\t * @return string",
            "lineNumber": 84
          },
          {
            "text": "\t\t */",
            "lineNumber": 85
          },
          {
            "text": "\t\tpublic function cf_search_where( $where ) {",
            "lineNumber": 86
          },
          {
            "lineNumber": 87
          },
          {
            "text": "\t\t\tif ( ! is_search() || $this-&gt;is_media_library() ) {",
            "lineNumber": 88
          },
          {
            "text": "\t\t\t\treturn $where;",
            "lineNumber": 89
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 90
          },
          {
            "lineNumber": 91
          },
          {
            "text": "\t\t\tglobal $wpdb;",
            "lineNumber": 92
          },
          {
            "text": "\t\t\t$where = preg_replace(",
            "lineNumber": 93
          },
          {
            "text": "\t\t\t\t\"/\\(\\s*$wpdb-&gt;posts.post_title\\s+LIKE\\s*(\\'[^\\']+\\')\\s*\\)/\",",
            "lineNumber": 94
          },
          {
            "text": "\t\t\t\t\"($wpdb-&gt;posts.post_title LIKE $1) OR ( searchmeta.meta_value LIKE $1 ) \",",
            "lineNumber": 95
          },
          {
            "text": "\t\t\t\t$where",
            "lineNumber": 96
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 97
          },
          {
            "lineNumber": 98
          },
          {
            "text": "\t\t\treturn $where;",
            "lineNumber": 99
          },
          {
            "text": "\t\t}",
            "lineNumber": 100
          },
          {
            "text": "\t}",
            "lineNumber": 101
          },
          {
            "text": "}",
            "lineNumber": 102
          }
        ]
      },
      "score": 0.27509284019470215
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/template-tags.php",
        "range": {
          "startPosition": {
            "line": 1238
          },
          "endPosition": {
            "line": 1298
          }
        },
        "contents": "function invp_is_boat( $post_ID = null ) {\n\treturn 'boat' === strtolower( invp_get_the_type( $post_ID ) );\n}\n\n/**\n * Is this vehicle designated a \"one owner\" by Carfax?\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool True if this vehicle is designated as a \"one owner\" by Carfax\n */\nfunction invp_is_carfax_one_owner( $post_ID = null ) {\n\treturn ! empty( INVP::get_meta( 'carfax_one_owner', $post_ID ) );\n}\n\n/**\n * Is this vehicle certified pre-owned?\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool True if this vehicle is certified pre-owned\n */\nfunction invp_is_certified_preowned( $post_ID = null ) {\n\treturn ! empty( INVP::get_meta( 'certified_preowned', $post_ID ) );\n}\n\n/**\n * Is this vehicle featured in slideshows?\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool\n */\nfunction invp_is_featured( $post_ID = null ) {\n\treturn ! empty( INVP::get_meta( 'featured', $post_ID ) );\n}\n\n/**\n * Returns true if this vehicle is pending.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool\n */\nfunction invp_is_pending( $post_ID = null ) {\n\tif ( empty( $post_ID ) ) {\n\t\t$post_ID = get_the_ID();\n\t}\n\treturn has_term( 'sale-pending', 'availability', $post_ID );\n}\n\n/**\n * Returns true if this vehicle is sold.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool\n */\nfunction invp_is_sold( $post_ID = null ) {\n\treturn false !== strpos( strtolower( INVP::get_meta( 'availability', $post_ID ) ) ?? '', 'sold' );\n}\n\n/**\n * Returns true if this vehicle is used.\n *",
        "signatures": {},
        "detailedLines": [
          {
            "text": "function invp_is_boat( $post_ID = null ) {",
            "lineNumber": 1239
          },
          {
            "text": "\treturn 'boat' === strtolower( invp_get_the_type( $post_ID ) );",
            "lineNumber": 1240
          },
          {
            "text": "}",
            "lineNumber": 1241
          },
          {
            "lineNumber": 1242
          },
          {
            "text": "/**",
            "lineNumber": 1243
          },
          {
            "text": " * Is this vehicle designated a \"one owner\" by Carfax?",
            "lineNumber": 1244
          },
          {
            "text": " *",
            "lineNumber": 1245
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1246
          },
          {
            "text": " * @return bool True if this vehicle is designated as a \"one owner\" by Carfax",
            "lineNumber": 1247
          },
          {
            "text": " */",
            "lineNumber": 1248
          },
          {
            "text": "function invp_is_carfax_one_owner( $post_ID = null ) {",
            "lineNumber": 1249
          },
          {
            "text": "\treturn ! empty( INVP::get_meta( 'carfax_one_owner', $post_ID ) );",
            "lineNumber": 1250
          },
          {
            "text": "}",
            "lineNumber": 1251
          },
          {
            "lineNumber": 1252
          },
          {
            "text": "/**",
            "lineNumber": 1253
          },
          {
            "text": " * Is this vehicle certified pre-owned?",
            "lineNumber": 1254
          },
          {
            "text": " *",
            "lineNumber": 1255
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1256
          },
          {
            "text": " * @return bool True if this vehicle is certified pre-owned",
            "lineNumber": 1257
          },
          {
            "text": " */",
            "lineNumber": 1258
          },
          {
            "text": "function invp_is_certified_preowned( $post_ID = null ) {",
            "lineNumber": 1259
          },
          {
            "text": "\treturn ! empty( INVP::get_meta( 'certified_preowned', $post_ID ) );",
            "lineNumber": 1260
          },
          {
            "text": "}",
            "lineNumber": 1261
          },
          {
            "lineNumber": 1262
          },
          {
            "text": "/**",
            "lineNumber": 1263
          },
          {
            "text": " * Is this vehicle featured in slideshows?",
            "lineNumber": 1264
          },
          {
            "text": " *",
            "lineNumber": 1265
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1266
          },
          {
            "text": " * @return bool",
            "lineNumber": 1267
          },
          {
            "text": " */",
            "lineNumber": 1268
          },
          {
            "text": "function invp_is_featured( $post_ID = null ) {",
            "lineNumber": 1269
          },
          {
            "text": "\treturn ! empty( INVP::get_meta( 'featured', $post_ID ) );",
            "lineNumber": 1270
          },
          {
            "text": "}",
            "lineNumber": 1271
          },
          {
            "lineNumber": 1272
          },
          {
            "text": "/**",
            "lineNumber": 1273
          },
          {
            "text": " * Returns true if this vehicle is pending.",
            "lineNumber": 1274
          },
          {
            "text": " *",
            "lineNumber": 1275
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1276
          },
          {
            "text": " * @return bool",
            "lineNumber": 1277
          },
          {
            "text": " */",
            "lineNumber": 1278
          },
          {
            "text": "function invp_is_pending( $post_ID = null ) {",
            "lineNumber": 1279
          },
          {
            "text": "\tif ( empty( $post_ID ) ) {",
            "lineNumber": 1280
          },
          {
            "text": "\t\t$post_ID = get_the_ID();",
            "lineNumber": 1281
          },
          {
            "text": "\t}",
            "lineNumber": 1282
          },
          {
            "text": "\treturn has_term( 'sale-pending', 'availability', $post_ID );",
            "lineNumber": 1283
          },
          {
            "text": "}",
            "lineNumber": 1284
          },
          {
            "lineNumber": 1285
          },
          {
            "text": "/**",
            "lineNumber": 1286
          },
          {
            "text": " * Returns true if this vehicle is sold.",
            "lineNumber": 1287
          },
          {
            "text": " *",
            "lineNumber": 1288
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1289
          },
          {
            "text": " * @return bool",
            "lineNumber": 1290
          },
          {
            "text": " */",
            "lineNumber": 1291
          },
          {
            "text": "function invp_is_sold( $post_ID = null ) {",
            "lineNumber": 1292
          },
          {
            "text": "\treturn false !== strpos( strtolower( INVP::get_meta( 'availability', $post_ID ) ) ?? '', 'sold' );",
            "lineNumber": 1293
          },
          {
            "text": "}",
            "lineNumber": 1294
          },
          {
            "lineNumber": 1295
          },
          {
            "text": "/**",
            "lineNumber": 1296
          },
          {
            "text": " * Returns true if this vehicle is used.",
            "lineNumber": 1297
          },
          {
            "text": " *",
            "lineNumber": 1298
          }
        ]
      },
      "score": 0.27044105529785156
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-taxonomies.php",
        "range": {
          "startPosition": {
            "line": 1222
          },
          "endPosition": {
            "line": 1272
          }
        },
        "contents": "\t\t\t$saved_term_slug = self::get_term_slug( $taxonomy_name, $post-&gt;ID );\n\n\t\t\tforeach ( $terms as $term ) {\n\t\t\t\t$html .= sprintf(\n\t\t\t\t\t'&lt;option value=\"%s\"%s&gt;%s&lt;/option&gt;',\n\t\t\t\t\tesc_attr( $term-&gt;slug ),\n\t\t\t\t\tselected( strtolower( $term-&gt;slug ), strtolower( $saved_term_slug ), false ),\n\t\t\t\t\tesc_html( $term-&gt;name )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $html . '&lt;/select&gt;';\n\t}\n\n\t/**\n\t * Uses the type of the vehicle loaded into the editor to show or hide other\n\t * taxonomies.\n\t *\n\t * @return void\n\t */\n\tpublic function editor_remove_meta_boxes() {\n\t\tglobal $wp_meta_boxes;\n\t\tif ( ! isset( $wp_meta_boxes[ INVP::POST_TYPE ]['side']['core'] ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$settings = INVP::settings();\n\t\tif ( empty( $settings['taxonomies'] ) ) {\n\t\t\treturn;\n\t\t}\n\t\t// What is the type of the vehicle we are editing?\n\t\t$type = $this-&gt;get_term_slug( 'type', get_the_ID() );\n\t\tif ( '' === $type ) {\n\t\t\t/**\n\t\t\t * Type not set, or user just pressed \"Add New Vehicle\". Lie so the\n\t\t\t * editor looks ready for a car.\n\t\t\t */\n\t\t\t$type = 'car';\n\t\t}\n\t\tforeach ( self::query_vars_array() as $query_var ) {\n\t\t\t$is_active = $settings['taxonomies'][ $query_var ][ $type ] ?? false;\n\t\t\tif ( ! $is_active ) {\n\t\t\t\t$id = str_replace( '-', '_', $query_var ) . 'div';\n\t\t\t\tif ( 'location' === $query_var ) {\n\t\t\t\t\t$id = 'tagsdiv-location';\n\t\t\t\t}\n\t\t\t\tunset( $wp_meta_boxes[ INVP::POST_TYPE ]['side']['core'][ $id ] );\n\t\t\t}\n\t\t}\n\t}\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t$saved_term_slug = self::get_term_slug( $taxonomy_name, $post-&gt;ID );",
            "lineNumber": 1223
          },
          {
            "lineNumber": 1224
          },
          {
            "text": "\t\t\tforeach ( $terms as $term ) {",
            "lineNumber": 1225
          },
          {
            "text": "\t\t\t\t$html .= sprintf(",
            "lineNumber": 1226
          },
          {
            "text": "\t\t\t\t\t'&lt;option value=\"%s\"%s&gt;%s&lt;/option&gt;',",
            "lineNumber": 1227
          },
          {
            "text": "\t\t\t\t\tesc_attr( $term-&gt;slug ),",
            "lineNumber": 1228
          },
          {
            "text": "\t\t\t\t\tselected( strtolower( $term-&gt;slug ), strtolower( $saved_term_slug ), false ),",
            "lineNumber": 1229
          },
          {
            "text": "\t\t\t\t\tesc_html( $term-&gt;name )",
            "lineNumber": 1230
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 1231
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 1232
          },
          {
            "text": "\t\t}",
            "lineNumber": 1233
          },
          {
            "text": "\t\treturn $html . '&lt;/select&gt;';",
            "lineNumber": 1234
          },
          {
            "text": "\t}",
            "lineNumber": 1235
          },
          {
            "lineNumber": 1236
          },
          {
            "text": "\t/**",
            "lineNumber": 1237
          },
          {
            "text": "\t * Uses the type of the vehicle loaded into the editor to show or hide other",
            "lineNumber": 1238
          },
          {
            "text": "\t * taxonomies.",
            "lineNumber": 1239
          },
          {
            "text": "\t *",
            "lineNumber": 1240
          },
          {
            "text": "\t * @return void",
            "lineNumber": 1241
          },
          {
            "text": "\t */",
            "lineNumber": 1242
          },
          {
            "text": "\tpublic function editor_remove_meta_boxes() {",
            "lineNumber": 1243
          },
          {
            "text": "\t\tglobal $wp_meta_boxes;",
            "lineNumber": 1244
          },
          {
            "text": "\t\tif ( ! isset( $wp_meta_boxes[ INVP::POST_TYPE ]['side']['core'] ) ) {",
            "lineNumber": 1245
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 1246
          },
          {
            "text": "\t\t}",
            "lineNumber": 1247
          },
          {
            "text": "\t\t$settings = INVP::settings();",
            "lineNumber": 1248
          },
          {
            "text": "\t\tif ( empty( $settings['taxonomies'] ) ) {",
            "lineNumber": 1249
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 1250
          },
          {
            "text": "\t\t}",
            "lineNumber": 1251
          },
          {
            "text": "\t\t// What is the type of the vehicle we are editing?",
            "lineNumber": 1252
          },
          {
            "text": "\t\t$type = $this-&gt;get_term_slug( 'type', get_the_ID() );",
            "lineNumber": 1253
          },
          {
            "text": "\t\tif ( '' === $type ) {",
            "lineNumber": 1254
          },
          {
            "text": "\t\t\t/**",
            "lineNumber": 1255
          },
          {
            "text": "\t\t\t * Type not set, or user just pressed \"Add New Vehicle\". Lie so the",
            "lineNumber": 1256
          },
          {
            "text": "\t\t\t * editor looks ready for a car.",
            "lineNumber": 1257
          },
          {
            "text": "\t\t\t */",
            "lineNumber": 1258
          },
          {
            "text": "\t\t\t$type = 'car';",
            "lineNumber": 1259
          },
          {
            "text": "\t\t}",
            "lineNumber": 1260
          },
          {
            "text": "\t\tforeach ( self::query_vars_array() as $query_var ) {",
            "lineNumber": 1261
          },
          {
            "text": "\t\t\t$is_active = $settings['taxonomies'][ $query_var ][ $type ] ?? false;",
            "lineNumber": 1262
          },
          {
            "text": "\t\t\tif ( ! $is_active ) {",
            "lineNumber": 1263
          },
          {
            "text": "\t\t\t\t$id = str_replace( '-', '_', $query_var ) . 'div';",
            "lineNumber": 1264
          },
          {
            "text": "\t\t\t\tif ( 'location' === $query_var ) {",
            "lineNumber": 1265
          },
          {
            "text": "\t\t\t\t\t$id = 'tagsdiv-location';",
            "lineNumber": 1266
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 1267
          },
          {
            "text": "\t\t\t\tunset( $wp_meta_boxes[ INVP::POST_TYPE ]['side']['core'][ $id ] );",
            "lineNumber": 1268
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 1269
          },
          {
            "text": "\t\t}",
            "lineNumber": 1270
          },
          {
            "text": "\t}",
            "lineNumber": 1271
          },
          {
            "text": "}",
            "lineNumber": 1272
          }
        ]
      },
      "score": 0.27041390538215637
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1696
          },
          "endPosition": {
            "line": 1772
          }
        },
        "contents": "\r\n\t\t/**\r\n\t\t * Registers all meta fields our custom post type uses to define a vehicle\r\n\t\t * and its attachments.\r\n\t\t *\r\n\t\t * @return void\r\n\t\t */\r\n\t\tpublic function register_meta_fields() {\r\n\t\t\t// Add meta fields to our post type.\r\n\t\t\tforeach ( INVP::keys_and_types( true ) as $key_arr ) {\r\n\r\n\t\t\t\tif ( empty( $key_arr['name'] ) ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key_arr['name'] );\r\n\t\t\t\tregister_post_meta(\r\n\t\t\t\t\tINVP::POST_TYPE,\r\n\t\t\t\t\t$key,\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'show_in_rest' =&gt; true,\r\n\t\t\t\t\t\t'single'       =&gt; 'options_array' !== $key_arr['name'],\r\n\t\t\t\t\t\t'type'         =&gt; $key_arr['type'] ?? 'string',\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t// Add a couple fields that are used on media attachments.\r\n\t\t\t$attachment_keys   = array();\r\n\t\t\t$attachment_keys[] = array(\r\n\t\t\t\t'name' =&gt; 'hash',\r\n\t\t\t\t'type' =&gt; 'string',\r\n\t\t\t);\r\n\t\t\t$attachment_keys[] = array(\r\n\t\t\t\t'name' =&gt; 'photo_number',\r\n\t\t\t\t'type' =&gt; 'integer',\r\n\t\t\t);\r\n\t\t\t$attachment_keys[] = array(\r\n\t\t\t\t'name' =&gt; 'vin',\r\n\t\t\t\t'type' =&gt; 'string',\r\n\t\t\t);\r\n\r\n\t\t\t// Add meta fields to attachments.\r\n\t\t\tforeach ( $attachment_keys as $key_arr ) {\r\n\t\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key_arr['name'] );\r\n\t\t\t\tregister_post_meta(\r\n\t\t\t\t\t'attachment',\r\n\t\t\t\t\t$key,\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'sanitize_callback' =&gt; 'sanitize_text_field',\r\n\t\t\t\t\t\t'show_in_rest'      =&gt; true,\r\n\t\t\t\t\t\t'single'            =&gt; true,\r\n\t\t\t\t\t\t'type'              =&gt; $key_arr['type'],\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Registers every widget that ships with this plugin.\r\n\t\t *\r\n\t\t * @return void\r\n\t\t */\r\n\t\tpublic function register_widgets() {\r\n\t\t\t/**\r\n\t\t\t * Make a widget available to sort vehicles by post meta fields.\r\n\t\t\t * Or, enable order by year, make, price, odometer, etc.\r\n\t\t\t */\r\n\t\t\tregister_widget( 'Inventory_Presser_Order_By_Widget' );\r\n\r\n\t\t\t/**\r\n\t\t\t * Make a widget available to show EPA Fuel Economy data\r\n\t\t\t */\r\n\t\t\tregister_widget( 'Inventory_Presser_Fuel_Economy_Widget' );\r\n\r\n\t\t\t/**\r\n\t\t\t * Make a widget available to embed a Google map pointed at one of\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\r",
            "lineNumber": 1697
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 1698
          },
          {
            "text": "\t\t * Registers all meta fields our custom post type uses to define a vehicle\r",
            "lineNumber": 1699
          },
          {
            "text": "\t\t * and its attachments.\r",
            "lineNumber": 1700
          },
          {
            "text": "\t\t *\r",
            "lineNumber": 1701
          },
          {
            "text": "\t\t * @return void\r",
            "lineNumber": 1702
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 1703
          },
          {
            "text": "\t\tpublic function register_meta_fields() {\r",
            "lineNumber": 1704
          },
          {
            "text": "\t\t\t// Add meta fields to our post type.\r",
            "lineNumber": 1705
          },
          {
            "text": "\t\t\tforeach ( INVP::keys_and_types( true ) as $key_arr ) {\r",
            "lineNumber": 1706
          },
          {
            "text": "\r",
            "lineNumber": 1707
          },
          {
            "text": "\t\t\t\tif ( empty( $key_arr['name'] ) ) {\r",
            "lineNumber": 1708
          },
          {
            "text": "\t\t\t\t\tcontinue;\r",
            "lineNumber": 1709
          },
          {
            "text": "\t\t\t\t}\r",
            "lineNumber": 1710
          },
          {
            "text": "\t\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key_arr['name'] );\r",
            "lineNumber": 1711
          },
          {
            "text": "\t\t\t\tregister_post_meta(\r",
            "lineNumber": 1712
          },
          {
            "text": "\t\t\t\t\tINVP::POST_TYPE,\r",
            "lineNumber": 1713
          },
          {
            "text": "\t\t\t\t\t$key,\r",
            "lineNumber": 1714
          },
          {
            "text": "\t\t\t\t\tarray(\r",
            "lineNumber": 1715
          },
          {
            "text": "\t\t\t\t\t\t'show_in_rest' =&gt; true,\r",
            "lineNumber": 1716
          },
          {
            "text": "\t\t\t\t\t\t'single'       =&gt; 'options_array' !== $key_arr['name'],\r",
            "lineNumber": 1717
          },
          {
            "text": "\t\t\t\t\t\t'type'         =&gt; $key_arr['type'] ?? 'string',\r",
            "lineNumber": 1718
          },
          {
            "text": "\t\t\t\t\t)\r",
            "lineNumber": 1719
          },
          {
            "text": "\t\t\t\t);\r",
            "lineNumber": 1720
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1721
          },
          {
            "text": "\r",
            "lineNumber": 1722
          },
          {
            "text": "\t\t\t// Add a couple fields that are used on media attachments.\r",
            "lineNumber": 1723
          },
          {
            "text": "\t\t\t$attachment_keys   = array();\r",
            "lineNumber": 1724
          },
          {
            "text": "\t\t\t$attachment_keys[] = array(\r",
            "lineNumber": 1725
          },
          {
            "text": "\t\t\t\t'name' =&gt; 'hash',\r",
            "lineNumber": 1726
          },
          {
            "text": "\t\t\t\t'type' =&gt; 'string',\r",
            "lineNumber": 1727
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1728
          },
          {
            "text": "\t\t\t$attachment_keys[] = array(\r",
            "lineNumber": 1729
          },
          {
            "text": "\t\t\t\t'name' =&gt; 'photo_number',\r",
            "lineNumber": 1730
          },
          {
            "text": "\t\t\t\t'type' =&gt; 'integer',\r",
            "lineNumber": 1731
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1732
          },
          {
            "text": "\t\t\t$attachment_keys[] = array(\r",
            "lineNumber": 1733
          },
          {
            "text": "\t\t\t\t'name' =&gt; 'vin',\r",
            "lineNumber": 1734
          },
          {
            "text": "\t\t\t\t'type' =&gt; 'string',\r",
            "lineNumber": 1735
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1736
          },
          {
            "text": "\r",
            "lineNumber": 1737
          },
          {
            "text": "\t\t\t// Add meta fields to attachments.\r",
            "lineNumber": 1738
          },
          {
            "text": "\t\t\tforeach ( $attachment_keys as $key_arr ) {\r",
            "lineNumber": 1739
          },
          {
            "text": "\t\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key_arr['name'] );\r",
            "lineNumber": 1740
          },
          {
            "text": "\t\t\t\tregister_post_meta(\r",
            "lineNumber": 1741
          },
          {
            "text": "\t\t\t\t\t'attachment',\r",
            "lineNumber": 1742
          },
          {
            "text": "\t\t\t\t\t$key,\r",
            "lineNumber": 1743
          },
          {
            "text": "\t\t\t\t\tarray(\r",
            "lineNumber": 1744
          },
          {
            "text": "\t\t\t\t\t\t'sanitize_callback' =&gt; 'sanitize_text_field',\r",
            "lineNumber": 1745
          },
          {
            "text": "\t\t\t\t\t\t'show_in_rest'      =&gt; true,\r",
            "lineNumber": 1746
          },
          {
            "text": "\t\t\t\t\t\t'single'            =&gt; true,\r",
            "lineNumber": 1747
          },
          {
            "text": "\t\t\t\t\t\t'type'              =&gt; $key_arr['type'],\r",
            "lineNumber": 1748
          },
          {
            "text": "\t\t\t\t\t)\r",
            "lineNumber": 1749
          },
          {
            "text": "\t\t\t\t);\r",
            "lineNumber": 1750
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1751
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 1752
          },
          {
            "text": "\r",
            "lineNumber": 1753
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 1754
          },
          {
            "text": "\t\t * Registers every widget that ships with this plugin.\r",
            "lineNumber": 1755
          },
          {
            "text": "\t\t *\r",
            "lineNumber": 1756
          },
          {
            "text": "\t\t * @return void\r",
            "lineNumber": 1757
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 1758
          },
          {
            "text": "\t\tpublic function register_widgets() {\r",
            "lineNumber": 1759
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 1760
          },
          {
            "text": "\t\t\t * Make a widget available to sort vehicles by post meta fields.\r",
            "lineNumber": 1761
          },
          {
            "text": "\t\t\t * Or, enable order by year, make, price, odometer, etc.\r",
            "lineNumber": 1762
          },
          {
            "text": "\t\t\t */\r",
            "lineNumber": 1763
          },
          {
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Order_By_Widget' );\r",
            "lineNumber": 1764
          },
          {
            "text": "\r",
            "lineNumber": 1765
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 1766
          },
          {
            "text": "\t\t\t * Make a widget available to show EPA Fuel Economy data\r",
            "lineNumber": 1767
          },
          {
            "text": "\t\t\t */\r",
            "lineNumber": 1768
          },
          {
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Fuel_Economy_Widget' );\r",
            "lineNumber": 1769
          },
          {
            "text": "\r",
            "lineNumber": 1770
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 1771
          },
          {
            "text": "\t\t\t * Make a widget available to embed a Google map pointed at one of\r",
            "lineNumber": 1772
          }
        ]
      },
      "score": 0.26789119839668274
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-taxonomies.php",
        "range": {
          "startPosition": {
            "line": 170,
            "column": 4
          },
          "endPosition": {
            "line": 236
          }
        },
        "contents": "} else {\n\t\t\t\t\t++$filter_count;\n\t\t\t\t}\n\n\t\t\t\t// More than one?\n\t\t\t\tif ( $filter_count &gt; 1 ) {\n\t\t\t\t\t$robots['noindex'] = $robots['nofollow'] = true;\n\t\t\t\t\treturn $robots;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $robots;\n\t}\n\n\t/**\n\t * Filter callback. Implements the \"include sold vehicles\" checkbox feature\n\t * in vehicle archives and search results.\n\t *\n\t * @param  WP_Query $query The posts query object.\n\t * @return void\n\t */\n\tpublic function maybe_exclude_sold_vehicles( $query ) {\n\t\tif ( is_admin() || ! $query-&gt;is_main_query()\n\t\t\t|| ! ( is_search() || is_post_type_archive( INVP::POST_TYPE ) )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there is already a tax_query for taxonomy availability, abort.\n\t\tif ( $query-&gt;is_tax( 'availability' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the checkbox to include sold vehicles is checked, abort.\n\t\t$plugin_settings = INVP::settings();\n\t\tif ( isset( $plugin_settings['include_sold_vehicles'] ) &amp;&amp; $plugin_settings['include_sold_vehicles'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$query-&gt;set( 'tax_query', self::tax_query_exclude_sold() );\n\t}\n\n\t/**\n\t * Outputs HTML that renders a meta box in the Classic Editor for all our taxonomies.\n\t *\n\t * @param  WP_Post $post Current post object.\n\t * @param  array   $box  Categories meta box arguments.\n\t * @return void\n\t */\n\tpublic static function meta_box_html( $post, $box ) {\n\t\t$taxonomy = $box['args']['taxonomy'] ?? '';\n\t\tif ( '' === $taxonomy ) {\n\t\t\treturn;\n\t\t}\n\t\tprintf(\n\t\t\t'%1$s &lt;a href=\"edit-tags.php?taxonomy=%2$s&amp;post_type=%3$s\"&gt;%4$s&lt;/a&gt;',\n\t\t\tself::taxonomy_meta_box_html( $taxonomy, apply_filters( 'invp_prefix_meta_key', $taxonomy ), $post ),\n\t\t\tesc_attr( $taxonomy ),\n\t\t\tesc_attr( INVP::POST_TYPE ),\n\t\t\tesc_html__( 'Manage', 'inventory-presser' )\n\t\t);\n\t}\n\n\t/**\n\t * Outputs HTML that renders a meta box for the type taxonomy\n\t *",
        "signatures": {},
        "detailedLines": [
          {
            "text": "} else {",
            "lineNumber": 171
          },
          {
            "text": "\t\t\t\t\t++$filter_count;",
            "lineNumber": 172
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 173
          },
          {
            "lineNumber": 174
          },
          {
            "text": "\t\t\t\t// More than one?",
            "lineNumber": 175
          },
          {
            "text": "\t\t\t\tif ( $filter_count &gt; 1 ) {",
            "lineNumber": 176
          },
          {
            "text": "\t\t\t\t\t$robots['noindex'] = $robots['nofollow'] = true;",
            "lineNumber": 177
          },
          {
            "text": "\t\t\t\t\treturn $robots;",
            "lineNumber": 178
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 179
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 180
          },
          {
            "text": "\t\t}",
            "lineNumber": 181
          },
          {
            "text": "\t\treturn $robots;",
            "lineNumber": 182
          },
          {
            "text": "\t}",
            "lineNumber": 183
          },
          {
            "lineNumber": 184
          },
          {
            "text": "\t/**",
            "lineNumber": 185
          },
          {
            "text": "\t * Filter callback. Implements the \"include sold vehicles\" checkbox feature",
            "lineNumber": 186
          },
          {
            "text": "\t * in vehicle archives and search results.",
            "lineNumber": 187
          },
          {
            "text": "\t *",
            "lineNumber": 188
          },
          {
            "text": "\t * @param  WP_Query $query The posts query object.",
            "lineNumber": 189
          },
          {
            "text": "\t * @return void",
            "lineNumber": 190
          },
          {
            "text": "\t */",
            "lineNumber": 191
          },
          {
            "text": "\tpublic function maybe_exclude_sold_vehicles( $query ) {",
            "lineNumber": 192
          },
          {
            "text": "\t\tif ( is_admin() || ! $query-&gt;is_main_query()",
            "lineNumber": 193
          },
          {
            "text": "\t\t\t|| ! ( is_search() || is_post_type_archive( INVP::POST_TYPE ) )",
            "lineNumber": 194
          },
          {
            "text": "\t\t) {",
            "lineNumber": 195
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 196
          },
          {
            "text": "\t\t}",
            "lineNumber": 197
          },
          {
            "lineNumber": 198
          },
          {
            "text": "\t\t// If there is already a tax_query for taxonomy availability, abort.",
            "lineNumber": 199
          },
          {
            "text": "\t\tif ( $query-&gt;is_tax( 'availability' ) ) {",
            "lineNumber": 200
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 201
          },
          {
            "text": "\t\t}",
            "lineNumber": 202
          },
          {
            "lineNumber": 203
          },
          {
            "text": "\t\t// If the checkbox to include sold vehicles is checked, abort.",
            "lineNumber": 204
          },
          {
            "text": "\t\t$plugin_settings = INVP::settings();",
            "lineNumber": 205
          },
          {
            "text": "\t\tif ( isset( $plugin_settings['include_sold_vehicles'] ) &amp;&amp; $plugin_settings['include_sold_vehicles'] ) {",
            "lineNumber": 206
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 207
          },
          {
            "text": "\t\t}",
            "lineNumber": 208
          },
          {
            "lineNumber": 209
          },
          {
            "text": "\t\t$query-&gt;set( 'tax_query', self::tax_query_exclude_sold() );",
            "lineNumber": 210
          },
          {
            "text": "\t}",
            "lineNumber": 211
          },
          {
            "lineNumber": 212
          },
          {
            "text": "\t/**",
            "lineNumber": 213
          },
          {
            "text": "\t * Outputs HTML that renders a meta box in the Classic Editor for all our taxonomies.",
            "lineNumber": 214
          },
          {
            "text": "\t *",
            "lineNumber": 215
          },
          {
            "text": "\t * @param  WP_Post $post Current post object.",
            "lineNumber": 216
          },
          {
            "text": "\t * @param  array   $box  Categories meta box arguments.",
            "lineNumber": 217
          },
          {
            "text": "\t * @return void",
            "lineNumber": 218
          },
          {
            "text": "\t */",
            "lineNumber": 219
          },
          {
            "text": "\tpublic static function meta_box_html( $post, $box ) {",
            "lineNumber": 220
          },
          {
            "text": "\t\t$taxonomy = $box['args']['taxonomy'] ?? '';",
            "lineNumber": 221
          },
          {
            "text": "\t\tif ( '' === $taxonomy ) {",
            "lineNumber": 222
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 223
          },
          {
            "text": "\t\t}",
            "lineNumber": 224
          },
          {
            "text": "\t\tprintf(",
            "lineNumber": 225
          },
          {
            "text": "\t\t\t'%1$s &lt;a href=\"edit-tags.php?taxonomy=%2$s&amp;post_type=%3$s\"&gt;%4$s&lt;/a&gt;',",
            "lineNumber": 226
          },
          {
            "text": "\t\t\tself::taxonomy_meta_box_html( $taxonomy, apply_filters( 'invp_prefix_meta_key', $taxonomy ), $post ),",
            "lineNumber": 227
          },
          {
            "text": "\t\t\tesc_attr( $taxonomy ),",
            "lineNumber": 228
          },
          {
            "text": "\t\t\tesc_attr( INVP::POST_TYPE ),",
            "lineNumber": 229
          },
          {
            "text": "\t\t\tesc_html__( 'Manage', 'inventory-presser' )",
            "lineNumber": 230
          },
          {
            "text": "\t\t);",
            "lineNumber": 231
          },
          {
            "text": "\t}",
            "lineNumber": 232
          },
          {
            "lineNumber": 233
          },
          {
            "text": "\t/**",
            "lineNumber": 234
          },
          {
            "text": "\t * Outputs HTML that renders a meta box for the type taxonomy",
            "lineNumber": 235
          },
          {
            "text": "\t *",
            "lineNumber": 236
          }
        ]
      },
      "score": 0.2657053470611572
    }
  ]
}
```
Status: **completed**


</details>
</tool-use>

---


Searching for how `type` and `condition` meta fields are used:


---

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


Parameters:

```json
{
  "pattern": "invp_prefix_meta_key.*type|meta_key.*type|'type'|\"type\"",
  "path": "includes",
  "caseInsensitive": true
}
```
Result:

```json
{
  "success": {
    "pattern": "invp_prefix_meta_key.*type|meta_key.*type|'type'|\"type\"",
    "path": "includes",
    "outputMode": "content",
    "workspaceResults": {
      "/Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser": {
        "content": {
          "matches": [
            {
              "file": "includes/class-taxonomies.php",
              "matches": [
                {
                  "lineNumber": 241,
                  "content": "\t\t$taxonomy = 'type';"
                },
                {
                  "lineNumber": 333,
                  "content": "\t\t\t\t\t'type'              =&gt; 'string',"
                },
                {
                  "lineNumber": 349,
                  "content": "\t\t\t\t'type'              =&gt; 'integer',"
                },
                {
                  "lineNumber": 375,
                  "content": "\t\t\t\t\t\t'type'              =&gt; 'string',"
                },
                {
                  "lineNumber": 423,
                  "content": "\t\t\t\t\t\t'type'              =&gt; 'string',"
                },
                {
                  "lineNumber": 701,
                  "content": "\t\t\t\t\t\t'singular_name' =&gt; __( 'Type', 'inventory-presser' ),"
                },
                {
                  "lineNumber": 712,
                  "content": "\t\t\t\t\t'query_var'      =&gt; 'type',"
                },
                {
                  "lineNumber": 714,
                  "content": "\t\t\t\t\t'singular_label' =&gt; __( 'Type', 'inventory-presser' ),"
                },
                {
                  "lineNumber": 1253,
                  "content": "\t\t$type = $this-&gt;get_term_slug( 'type', get_the_ID() );"
                }
              ]
            },
            {
              "file": "includes/class-invp.php",
              "matches": [
                {
                  "lineNumber": 506,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 511,
                  "content": "\t\t\t\t\t'type'  =&gt; 'string',"
                },
                {
                  "lineNumber": 517,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 523,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 529,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 534,
                  "content": "\t\t\t\t\t'type'  =&gt; 'string',"
                },
                {
                  "lineNumber": 539,
                  "content": "\t\t\t\t\t'type'  =&gt; 'boolean',"
                },
                {
                  "lineNumber": 544,
                  "content": "\t\t\t\t\t'type'  =&gt; 'boolean',"
                },
                {
                  "lineNumber": 549,
                  "content": "\t\t\t\t\t'type'  =&gt; 'boolean',"
                },
                {
                  "lineNumber": 554,
                  "content": "\t\t\t\t\t'type'  =&gt; 'boolean',"
                },
                {
                  "lineNumber": 559,
                  "content": "\t\t\t\t\t'type'  =&gt; 'string',"
                },
                {
                  "lineNumber": 564,
                  "content": "\t\t\t\t\t'type'  =&gt; 'string',"
                },
                {
                  "lineNumber": 569,
                  "content": "\t\t\t\t\t'type'  =&gt; 'string',"
                },
                {
                  "lineNumber": 574,
                  "content": "\t\t\t\t\t'type'  =&gt; 'string',"
                },
                {
                  "lineNumber": 579,
                  "content": "\t\t\t\t\t'type'  =&gt; 'string',"
                },
                {
                  "lineNumber": 584,
                  "content": "\t\t\t\t\t'type'  =&gt; 'boolean',"
                },
                {
                  "lineNumber": 590,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 596,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 602,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 608,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 614,
                  "content": "\t\t\t\t\t'type'   =&gt; 'integer',"
                },
                {
                  "lineNumber": 620,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 625,
                  "content": "\t\t\t\t\t'type'  =&gt; 'integer',"
                },
                {
                  "lineNumber": 631,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 637,
                  "content": "\t\t\t\t\t'type'   =&gt; 'integer',"
                },
                {
                  "lineNumber": 643,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 649,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 654,
                  "content": "\t\t\t\t\t'type'  =&gt; 'integer',"
                },
                {
                  "lineNumber": 660,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 666,
                  "content": "\t\t\t\t\t'type'   =&gt; 'integer',"
                },
                {
                  "lineNumber": 672,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 678,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 683,
                  "content": "\t\t\t\t\t'type'  =&gt; 'boolean',"
                },
                {
                  "lineNumber": 689,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 695,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 701,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 707,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 713,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 719,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 725,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 731,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 737,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 743,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 749,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 755,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 761,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 767,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 773,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 779,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 784,
                  "content": "\t\t\t\t\t'type'  =&gt; 'integer',"
                },
                {
                  "lineNumber": 789,
                  "content": "\t\t\t\t\t'type'  =&gt; 'string',"
                },
                {
                  "lineNumber": 795,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 801,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 806,
                  "content": "\t\t\t\t\t'type'  =&gt; 'integer',"
                },
                {
                  "lineNumber": 811,
                  "content": "\t\t\t\t\t'type'  =&gt; 'string',"
                },
                {
                  "lineNumber": 817,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 823,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 829,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 835,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 841,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 846,
                  "content": "\t\t\t\t\t'type'  =&gt; 'string',"
                },
                {
                  "lineNumber": 852,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 858,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 864,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 870,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 876,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 882,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 888,
                  "content": "\t\t\t\t\t'type'   =&gt; 'number',"
                },
                {
                  "lineNumber": 894,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 900,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 906,
                  "content": "\t\t\t\t\t'type'   =&gt; 'integer',"
                },
                {
                  "lineNumber": 912,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 918,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 924,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 930,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 933,
                  "content": "\t\t\t\t\t'label'  =&gt; __( 'Type', 'inventory-presser' ),"
                },
                {
                  "lineNumber": 934,
                  "content": "\t\t\t\t\t'name'   =&gt; 'type',"
                },
                {
                  "lineNumber": 936,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 942,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 947,
                  "content": "\t\t\t\t\t'type'  =&gt; 'boolean',"
                },
                {
                  "lineNumber": 953,
                  "content": "\t\t\t\t\t'type'   =&gt; 'integer',"
                },
                {
                  "lineNumber": 959,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 965,
                  "content": "\t\t\t\t\t'type'   =&gt; 'string',"
                },
                {
                  "lineNumber": 1134,
                  "content": "\t * @return bool True if the given $post_meta_key is a number data type."
                },
                {
                  "lineNumber": 1138,
                  "content": "\t\t\tif ( apply_filters( 'invp_prefix_meta_key', $key_and_type['name'] ?? '' ) === $post_meta_key ) {"
                },
                {
                  "lineNumber": 1139,
                  "content": "\t\t\t\treturn 'number' === $key_and_type['type'] ?? '' || 'integer' === $key_and_type['type'] ?? '';"
                }
              ]
            },
            {
              "file": "includes/template-tags.php",
              "matches": [
                {
                  "lineNumber": 385,
                  "content": "\t\t\t'taxonomy' =&gt; 'type',"
                },
                {
                  "lineNumber": 402,
                  "content": "\t\t\t\t\t\t\t'taxonomy' =&gt; 'type',"
                },
                {
                  "lineNumber": 1175,
                  "content": "\treturn INVP::get_meta( 'type', $post_ID );"
                }
              ]
            },
            {
              "file": "includes/class-rest.php",
              "matches": [
                {
                  "lineNumber": 52,
                  "content": "\t\t\t\t\t'type'        =&gt; 'string',"
                },
                {
                  "lineNumber": 88,
                  "content": "\t\t$terms = get_the_terms( $post_object['id'], 'type' );"
                }
              ]
            },
            {
              "file": "includes/admin/class-admin-options.php",
              "matches": [
                {
                  "lineNumber": 768,
                  "content": "\t\t\t\t'taxonomy'   =&gt; 'type',"
                },
                {
                  "lineNumber": 817,
                  "content": "\t\t\t\tdisabled( true, 'type' === $taxonomy_data[ $i ]['args']['query_var'], false ) // Disable the checkbox for the Type taxonomy."
                },
                {
                  "lineNumber": 1100,
                  "content": "\t\t\t$sanitary_values['taxonomies']['type']['active'] = true;"
                },
                {
                  "lineNumber": 1290,
                  "content": "\t\t\t'type'            =&gt; $common,"
                }
              ]
            },
            {
              "file": "includes/integrations/class-contact-form-7.php",
              "matches": [
                {
                  "lineNumber": 235,
                  "content": "\t\t\t\t\t'type'  =&gt; 'hidden',"
                },
                {
                  "lineNumber": 250,
                  "content": "\t\t\t\t\t'type'  =&gt; 'hidden',"
                }
              ]
            },
            {
              "file": "includes/integrations/class-classic-editor.php",
              "matches": [
                {
                  "lineNumber": 694,
                  "content": "\t\t$type = $custom[ apply_filters( 'invp_prefix_meta_key', 'type' ) ][0] ?? '';"
                }
              ]
            },
            {
              "file": "includes/integrations/class-wpforms.php",
              "matches": [
                {
                  "lineNumber": 55,
                  "content": "\t\t\t\tif ( 'vehicle' !== $field['type'] ) {"
                }
              ]
            },
            {
              "file": "includes/integrations/class-wpforms-field-vehicle.php",
              "matches": [
                {
                  "lineNumber": 387,
                  "content": "\t\t\t$field['type'] = 'select';"
                },
                {
                  "lineNumber": 532,
                  "content": "\t\t\t\t'type'      =&gt; $this-&gt;type,"
                },
                {
                  "lineNumber": 734,
                  "content": "\t\t\t\t\t! empty( $field['type'] ) &amp;&amp;"
                },
                {
                  "lineNumber": 735,
                  "content": "\t\t\t\t\t$field['type'] === $this-&gt;type &amp;&amp;"
                },
                {
                  "lineNumber": 761,
                  "content": "\t\t\tif ( ! isset( $field['type'] ) || 'vehicle' !== $field['type'] ) {"
                }
              ]
            },
            {
              "file": "includes/class-taxonomy-overlapper.php",
              "matches": [
                {
                  "lineNumber": 321,
                  "content": "\t\t\t\t'type'            =&gt; 'type',"
                }
              ]
            },
            {
              "file": "includes/class-range-filters.php",
              "matches": [
                {
                  "lineNumber": 53,
                  "content": "\t\t\t\t'type'    =&gt; $type,"
                }
              ]
            },
            {
              "file": "includes/class-additional-listings-pages.php",
              "matches": [
                {
                  "lineNumber": 217,
                  "content": "\t\t\t\t\t\t'type'    =&gt; 'NUMERIC',"
                }
              ]
            }
          ],
          "totalLines": 116,
          "totalMatchedLines": 116
        }
      }
    }
  }
}
```
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>


Parameters:

```json
{
  "pattern": "invp_prefix_meta_key.*condition|meta_key.*condition|'condition'|\"condition\"",
  "path": "includes",
  "caseInsensitive": true
}
```
Result:

```json
{
  "success": {
    "pattern": "invp_prefix_meta_key.*condition|meta_key.*condition|'condition'|\"condition\"",
    "path": "includes",
    "outputMode": "content",
    "workspaceResults": {
      "/Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser": {
        "content": {
          "matches": [
            {
              "file": "includes/class-taxonomies.php",
              "matches": [
                {
                  "lineNumber": 673,
                  "content": "\t\t\t\t\t\t'singular_name' =&gt; __( 'Condition', 'inventory-presser' ),"
                },
                {
                  "lineNumber": 684,
                  "content": "\t\t\t\t\t'query_var'      =&gt; 'condition',"
                },
                {
                  "lineNumber": 685,
                  "content": "\t\t\t\t\t'singular_label' =&gt; __( 'Condition', 'inventory-presser' ),"
                },
                {
                  "lineNumber": 1018,
                  "content": "\t\t\t\t\t'label'          =&gt; __( 'Condition', 'inventory-presser' ),"
                },
                {
                  "lineNumber": 1020,
                  "content": "\t\t\t\t\t\t'name'          =&gt; __( 'Condition', 'inventory-presser' ),"
                },
                {
                  "lineNumber": 1021,
                  "content": "\t\t\t\t\t\t'singular_name' =&gt; __( 'Condition', 'inventory-presser' ),"
                },
                {
                  "lineNumber": 1033,
                  "content": "\t\t\t\t\t'singular_label' =&gt; __( 'Condition', 'inventory-presser' ),"
                }
              ]
            },
            {
              "file": "includes/class-invp.php",
              "matches": [
                {
                  "lineNumber": 458,
                  "content": "\t\t\t\t\t\t'taxonomy' =&gt; 'condition',"
                },
                {
                  "lineNumber": 472,
                  "content": "\t\t\t\t\t\t'taxonomy' =&gt; 'condition',"
                },
                {
                  "lineNumber": 605,
                  "content": "\t\t\t\t\t'label'  =&gt; __( 'Condition', 'inventory-presser' ),"
                },
                {
                  "lineNumber": 606,
                  "content": "\t\t\t\t\t'name'   =&gt; 'condition',"
                }
              ]
            },
            {
              "file": "includes/template-tags.php",
              "matches": [
                {
                  "lineNumber": 167,
                  "content": "\treturn INVP::get_meta( 'condition', $post_ID );"
                },
                {
                  "lineNumber": 1306,
                  "content": "\treturn has_term( 'used', 'condition', $post_ID );"
                }
              ]
            },
            {
              "file": "includes/admin/class-admin-options.php",
              "matches": [
                {
                  "lineNumber": 1289,
                  "content": "\t\t\t'condition'       =&gt; $common,"
                }
              ]
            },
            {
              "file": "includes/shortcode/class-shortcode-attribute-table.php",
              "matches": [
                {
                  "lineNumber": 212,
                  "content": "\t\t\t\t\t'label'  =&gt; __( 'Condition', 'inventory-presser' ),"
                }
              ]
            },
            {
              "file": "includes/integrations/class-classic-editor.php",
              "matches": [
                {
                  "lineNumber": 737,
                  "content": "\t\t\t\t/*  4 */ esc_attr( apply_filters( 'invp_prefix_meta_key', 'condition_boat' ) ),"
                }
              ]
            },
            {
              "file": "includes/class-taxonomy-overlapper.php",
              "matches": [
                {
                  "lineNumber": 314,
                  "content": "\t\t\t\t'condition'       =&gt; 'condition',"
                }
              ]
            }
          ],
          "totalLines": 17,
          "totalMatchedLines": 17
        }
      }
    }
  }
}
```
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>


Parameters:

```json
{
  "query": "What are the meta field names for vehicle type and condition?",
  "topK": 10,
  "explanation": ""
}
```
Result:

```json
{
  "codeResults": [
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-invp.php",
        "range": {
          "startPosition": {
            "line": 489
          },
          "endPosition": {
            "line": 552
          }
        },
        "contents": "\t}\n\n\t/**\n\t * Produces an array of arrays that define all the meta fields that\n\t * define our vehicle post type for all vehicle types including boats.\n\t *\n\t * @return array An array of arrays, defining the meta fields that are registered and used by this class.\n\t */\n\tpublic static function keys_and_types() {\n\t\treturn apply_filters(\n\t\t\t'invp_meta_fields',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Availability', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'availability',\n\t\t\t\t\t'sample' =&gt; __( 'For Sale', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Beam', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'beam', // for boats.\n\t\t\t\t\t'type'  =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Body Style', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'body_style',\n\t\t\t\t\t'sample' =&gt; __( 'EXTENDED CAB PICKUP', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'KBB Book Value', 'inventory-presser' ), // Kelley Blue Book.\n\t\t\t\t\t'name'   =&gt; 'book_value_kbb',\n\t\t\t\t\t'sample' =&gt; 13500,\n\t\t\t\t\t'type'   =&gt; 'number',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'NADA Book Value', 'inventory-presser' ), // NADA Guides.\n\t\t\t\t\t'name'   =&gt; 'book_value_nada',\n\t\t\t\t\t'sample' =&gt; 13500,\n\t\t\t\t\t'type'   =&gt; 'number',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Car ID', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'car_id', // unique identifier.\n\t\t\t\t\t'type'  =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax Accident Free', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_accident_free',\n\t\t\t\t\t'type'  =&gt; 'boolean',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax Have Report', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_have_report',\n\t\t\t\t\t'type'  =&gt; 'boolean',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax One Owner', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_one_owner',\n\t\t\t\t\t'type'  =&gt; 'boolean',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax Top Condition', 'inventory-presser' ),",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t}",
            "lineNumber": 490
          },
          {
            "lineNumber": 491
          },
          {
            "text": "\t/**",
            "lineNumber": 492
          },
          {
            "text": "\t * Produces an array of arrays that define all the meta fields that",
            "lineNumber": 493
          },
          {
            "text": "\t * define our vehicle post type for all vehicle types including boats.",
            "lineNumber": 494
          },
          {
            "text": "\t *",
            "lineNumber": 495
          },
          {
            "text": "\t * @return array An array of arrays, defining the meta fields that are registered and used by this class.",
            "lineNumber": 496
          },
          {
            "text": "\t */",
            "lineNumber": 497
          },
          {
            "text": "\tpublic static function keys_and_types() {",
            "lineNumber": 498
          },
          {
            "text": "\t\treturn apply_filters(",
            "lineNumber": 499
          },
          {
            "text": "\t\t\t'invp_meta_fields',",
            "lineNumber": 500
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 501
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 502
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Availability', 'inventory-presser' ),",
            "lineNumber": 503
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'availability',",
            "lineNumber": 504
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'For Sale', 'inventory-presser' ),",
            "lineNumber": 505
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 506
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 507
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 508
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Beam', 'inventory-presser' ),",
            "lineNumber": 509
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'beam', // for boats.",
            "lineNumber": 510
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'string',",
            "lineNumber": 511
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 512
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 513
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Body Style', 'inventory-presser' ),",
            "lineNumber": 514
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'body_style',",
            "lineNumber": 515
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'EXTENDED CAB PICKUP', 'inventory-presser' ),",
            "lineNumber": 516
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 517
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 518
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 519
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'KBB Book Value', 'inventory-presser' ), // Kelley Blue Book.",
            "lineNumber": 520
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'book_value_kbb',",
            "lineNumber": 521
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; 13500,",
            "lineNumber": 522
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'number',",
            "lineNumber": 523
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 524
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 525
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'NADA Book Value', 'inventory-presser' ), // NADA Guides.",
            "lineNumber": 526
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'book_value_nada',",
            "lineNumber": 527
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; 13500,",
            "lineNumber": 528
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'number',",
            "lineNumber": 529
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 530
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 531
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Car ID', 'inventory-presser' ),",
            "lineNumber": 532
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'car_id', // unique identifier.",
            "lineNumber": 533
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'string',",
            "lineNumber": 534
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 535
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 536
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax Accident Free', 'inventory-presser' ),",
            "lineNumber": 537
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_accident_free',",
            "lineNumber": 538
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'boolean',",
            "lineNumber": 539
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 540
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 541
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax Have Report', 'inventory-presser' ),",
            "lineNumber": 542
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_have_report',",
            "lineNumber": 543
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'boolean',",
            "lineNumber": 544
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 545
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 546
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax One Owner', 'inventory-presser' ),",
            "lineNumber": 547
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_one_owner',",
            "lineNumber": 548
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'boolean',",
            "lineNumber": 549
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 550
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 551
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax Top Condition', 'inventory-presser' ),",
            "lineNumber": 552
          }
        ]
      },
      "score": 0.46305346488952637
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-taxonomy-overlapper.php",
        "range": {
          "startPosition": {
            "line": 293
          },
          "endPosition": {
            "line": 357,
            "column": 3
          }
        },
        "contents": "\t\t$this-&gt;hooks_add();\n\t}\n\n\t/**\n\t * Returns an array containing keys that are post meta field suffixes. The\n\t * values are the overlapping taxonomy names.\n\t *\n\t * @return array\n\t */\n\tpublic static function overlapping_meta_keys() {\n\t\treturn apply_filters(\n\t\t\t'invp_overlapping_keys',\n\t\t\tarray(\n\t\t\t\t'body_style'      =&gt; 'style',\n\t\t\t\t'make'            =&gt; 'make',\n\t\t\t\t'model'           =&gt; 'model',\n\t\t\t\t'year'            =&gt; 'model_year',\n\n\t\t\t\t'availability'    =&gt; 'availability',\n\t\t\t\t'color_base'      =&gt; 'colors',\n\t\t\t\t'condition'       =&gt; 'condition',\n\t\t\t\t'cylinders'       =&gt; 'cylinders',\n\t\t\t\t'drive_type'      =&gt; 'drive_type',\n\t\t\t\t'fuel'            =&gt; 'fuel',\n\t\t\t\t'location'        =&gt; 'location',\n\t\t\t\t'propulsion_type' =&gt; 'propulsion_type',\n\t\t\t\t'transmission'    =&gt; 'transmission',\n\t\t\t\t'type'            =&gt; 'type',\n\t\t\t\t'wholesale'       =&gt; 'availability', // Wholesale is a meta field and also a valid Availability taxonomy term.\n\n\t\t\t\t'condition_boat'  =&gt; 'condition_boat',\n\t\t\t\t'engine_count'    =&gt; 'engine_count',\n\t\t\t\t'engine_make'     =&gt; 'engine_make',\n\t\t\t\t'engine_model'    =&gt; 'engine_model',\n\t\t\t\t'horsepower'      =&gt; 'horsepower',\n\t\t\t\t'hull_material'   =&gt; 'hull_material',\n\t\t\t)\n\t\t);\n\t}\n\n\t/**\n\t * Returns an array_flip() equivalent of the array returned by\n\t * overlapping_meta_keys_flipped().\n\t *\n\t * @return array\n\t */\n\tprivate static function overlapping_meta_keys_flipped() {\n\t\t$arr = self::overlapping_meta_keys();\n\t\tunset( $arr['wholesale'] ); // Wholesale is a meta field and also a valid Availability taxonomy term.\n\t\treturn array_flip( $arr );\n\t}\n\n\t/**\n\t * If the term relationship that was just deleted was in a vehicle taxonomy,\n\t * also delete the meta value that contains the same value.\n\t *\n\t * @param  int    $object_id Object ID.\n\t * @param  array  $tt_ids    An array of term taxonomy IDs.\n\t * @param  string $taxonomy  Taxonomy slug.\n\t * @return void\n\t */\n\tpublic function term_relationship_deleted( $object_id, $tt_ids, $taxonomy ) {\n\t\t// Does $object_id belong to a vehicle?\n\t\tif ( INVP::POST_TYPE !== get_post_type( $object_id ) ) {\n\t\t\t",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t$this-&gt;hooks_add();",
            "lineNumber": 294
          },
          {
            "text": "\t}",
            "lineNumber": 295
          },
          {
            "lineNumber": 296
          },
          {
            "text": "\t/**",
            "lineNumber": 297
          },
          {
            "text": "\t * Returns an array containing keys that are post meta field suffixes. The",
            "lineNumber": 298
          },
          {
            "text": "\t * values are the overlapping taxonomy names.",
            "lineNumber": 299
          },
          {
            "text": "\t *",
            "lineNumber": 300
          },
          {
            "text": "\t * @return array",
            "lineNumber": 301
          },
          {
            "text": "\t */",
            "lineNumber": 302
          },
          {
            "text": "\tpublic static function overlapping_meta_keys() {",
            "lineNumber": 303
          },
          {
            "text": "\t\treturn apply_filters(",
            "lineNumber": 304
          },
          {
            "text": "\t\t\t'invp_overlapping_keys',",
            "lineNumber": 305
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 306
          },
          {
            "text": "\t\t\t\t'body_style'      =&gt; 'style',",
            "lineNumber": 307
          },
          {
            "text": "\t\t\t\t'make'            =&gt; 'make',",
            "lineNumber": 308
          },
          {
            "text": "\t\t\t\t'model'           =&gt; 'model',",
            "lineNumber": 309
          },
          {
            "text": "\t\t\t\t'year'            =&gt; 'model_year',",
            "lineNumber": 310
          },
          {
            "lineNumber": 311
          },
          {
            "text": "\t\t\t\t'availability'    =&gt; 'availability',",
            "lineNumber": 312
          },
          {
            "text": "\t\t\t\t'color_base'      =&gt; 'colors',",
            "lineNumber": 313
          },
          {
            "text": "\t\t\t\t'condition'       =&gt; 'condition',",
            "lineNumber": 314
          },
          {
            "text": "\t\t\t\t'cylinders'       =&gt; 'cylinders',",
            "lineNumber": 315
          },
          {
            "text": "\t\t\t\t'drive_type'      =&gt; 'drive_type',",
            "lineNumber": 316
          },
          {
            "text": "\t\t\t\t'fuel'            =&gt; 'fuel',",
            "lineNumber": 317
          },
          {
            "text": "\t\t\t\t'location'        =&gt; 'location',",
            "lineNumber": 318
          },
          {
            "text": "\t\t\t\t'propulsion_type' =&gt; 'propulsion_type',",
            "lineNumber": 319
          },
          {
            "text": "\t\t\t\t'transmission'    =&gt; 'transmission',",
            "lineNumber": 320
          },
          {
            "text": "\t\t\t\t'type'            =&gt; 'type',",
            "lineNumber": 321
          },
          {
            "text": "\t\t\t\t'wholesale'       =&gt; 'availability', // Wholesale is a meta field and also a valid Availability taxonomy term.",
            "lineNumber": 322
          },
          {
            "lineNumber": 323
          },
          {
            "text": "\t\t\t\t'condition_boat'  =&gt; 'condition_boat',",
            "lineNumber": 324
          },
          {
            "text": "\t\t\t\t'engine_count'    =&gt; 'engine_count',",
            "lineNumber": 325
          },
          {
            "text": "\t\t\t\t'engine_make'     =&gt; 'engine_make',",
            "lineNumber": 326
          },
          {
            "text": "\t\t\t\t'engine_model'    =&gt; 'engine_model',",
            "lineNumber": 327
          },
          {
            "text": "\t\t\t\t'horsepower'      =&gt; 'horsepower',",
            "lineNumber": 328
          },
          {
            "text": "\t\t\t\t'hull_material'   =&gt; 'hull_material',",
            "lineNumber": 329
          },
          {
            "text": "\t\t\t)",
            "lineNumber": 330
          },
          {
            "text": "\t\t);",
            "lineNumber": 331
          },
          {
            "text": "\t}",
            "lineNumber": 332
          },
          {
            "lineNumber": 333
          },
          {
            "text": "\t/**",
            "lineNumber": 334
          },
          {
            "text": "\t * Returns an array_flip() equivalent of the array returned by",
            "lineNumber": 335
          },
          {
            "text": "\t * overlapping_meta_keys_flipped().",
            "lineNumber": 336
          },
          {
            "text": "\t *",
            "lineNumber": 337
          },
          {
            "text": "\t * @return array",
            "lineNumber": 338
          },
          {
            "text": "\t */",
            "lineNumber": 339
          },
          {
            "text": "\tprivate static function overlapping_meta_keys_flipped() {",
            "lineNumber": 340
          },
          {
            "text": "\t\t$arr = self::overlapping_meta_keys();",
            "lineNumber": 341
          },
          {
            "text": "\t\tunset( $arr['wholesale'] ); // Wholesale is a meta field and also a valid Availability taxonomy term.",
            "lineNumber": 342
          },
          {
            "text": "\t\treturn array_flip( $arr );",
            "lineNumber": 343
          },
          {
            "text": "\t}",
            "lineNumber": 344
          },
          {
            "lineNumber": 345
          },
          {
            "text": "\t/**",
            "lineNumber": 346
          },
          {
            "text": "\t * If the term relationship that was just deleted was in a vehicle taxonomy,",
            "lineNumber": 347
          },
          {
            "text": "\t * also delete the meta value that contains the same value.",
            "lineNumber": 348
          },
          {
            "text": "\t *",
            "lineNumber": 349
          },
          {
            "text": "\t * @param  int    $object_id Object ID.",
            "lineNumber": 350
          },
          {
            "text": "\t * @param  array  $tt_ids    An array of term taxonomy IDs.",
            "lineNumber": 351
          },
          {
            "text": "\t * @param  string $taxonomy  Taxonomy slug.",
            "lineNumber": 352
          },
          {
            "text": "\t * @return void",
            "lineNumber": 353
          },
          {
            "text": "\t */",
            "lineNumber": 354
          },
          {
            "text": "\tpublic function term_relationship_deleted( $object_id, $tt_ids, $taxonomy ) {",
            "lineNumber": 355
          },
          {
            "text": "\t\t// Does $object_id belong to a vehicle?",
            "lineNumber": 356
          },
          {
            "text": "\t\tif ( INVP::POST_TYPE !== get_post_type( $object_id ) ) {",
            "lineNumber": 357
          },
          {
            "text": "\t\t\t",
            "lineNumber": 358
          }
        ]
      },
      "score": 0.3829461336135864
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1696
          },
          "endPosition": {
            "line": 1772
          }
        },
        "contents": "\r\n\t\t/**\r\n\t\t * Registers all meta fields our custom post type uses to define a vehicle\r\n\t\t * and its attachments.\r\n\t\t *\r\n\t\t * @return void\r\n\t\t */\r\n\t\tpublic function register_meta_fields() {\r\n\t\t\t// Add meta fields to our post type.\r\n\t\t\tforeach ( INVP::keys_and_types( true ) as $key_arr ) {\r\n\r\n\t\t\t\tif ( empty( $key_arr['name'] ) ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key_arr['name'] );\r\n\t\t\t\tregister_post_meta(\r\n\t\t\t\t\tINVP::POST_TYPE,\r\n\t\t\t\t\t$key,\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'show_in_rest' =&gt; true,\r\n\t\t\t\t\t\t'single'       =&gt; 'options_array' !== $key_arr['name'],\r\n\t\t\t\t\t\t'type'         =&gt; $key_arr['type'] ?? 'string',\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t// Add a couple fields that are used on media attachments.\r\n\t\t\t$attachment_keys   = array();\r\n\t\t\t$attachment_keys[] = array(\r\n\t\t\t\t'name' =&gt; 'hash',\r\n\t\t\t\t'type' =&gt; 'string',\r\n\t\t\t);\r\n\t\t\t$attachment_keys[] = array(\r\n\t\t\t\t'name' =&gt; 'photo_number',\r\n\t\t\t\t'type' =&gt; 'integer',\r\n\t\t\t);\r\n\t\t\t$attachment_keys[] = array(\r\n\t\t\t\t'name' =&gt; 'vin',\r\n\t\t\t\t'type' =&gt; 'string',\r\n\t\t\t);\r\n\r\n\t\t\t// Add meta fields to attachments.\r\n\t\t\tforeach ( $attachment_keys as $key_arr ) {\r\n\t\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key_arr['name'] );\r\n\t\t\t\tregister_post_meta(\r\n\t\t\t\t\t'attachment',\r\n\t\t\t\t\t$key,\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'sanitize_callback' =&gt; 'sanitize_text_field',\r\n\t\t\t\t\t\t'show_in_rest'      =&gt; true,\r\n\t\t\t\t\t\t'single'            =&gt; true,\r\n\t\t\t\t\t\t'type'              =&gt; $key_arr['type'],\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Registers every widget that ships with this plugin.\r\n\t\t *\r\n\t\t * @return void\r\n\t\t */\r\n\t\tpublic function register_widgets() {\r\n\t\t\t/**\r\n\t\t\t * Make a widget available to sort vehicles by post meta fields.\r\n\t\t\t * Or, enable order by year, make, price, odometer, etc.\r\n\t\t\t */\r\n\t\t\tregister_widget( 'Inventory_Presser_Order_By_Widget' );\r\n\r\n\t\t\t/**\r\n\t\t\t * Make a widget available to show EPA Fuel Economy data\r\n\t\t\t */\r\n\t\t\tregister_widget( 'Inventory_Presser_Fuel_Economy_Widget' );\r\n\r\n\t\t\t/**\r\n\t\t\t * Make a widget available to embed a Google map pointed at one of\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\r",
            "lineNumber": 1697
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 1698
          },
          {
            "text": "\t\t * Registers all meta fields our custom post type uses to define a vehicle\r",
            "lineNumber": 1699
          },
          {
            "text": "\t\t * and its attachments.\r",
            "lineNumber": 1700
          },
          {
            "text": "\t\t *\r",
            "lineNumber": 1701
          },
          {
            "text": "\t\t * @return void\r",
            "lineNumber": 1702
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 1703
          },
          {
            "text": "\t\tpublic function register_meta_fields() {\r",
            "lineNumber": 1704
          },
          {
            "text": "\t\t\t// Add meta fields to our post type.\r",
            "lineNumber": 1705
          },
          {
            "text": "\t\t\tforeach ( INVP::keys_and_types( true ) as $key_arr ) {\r",
            "lineNumber": 1706
          },
          {
            "text": "\r",
            "lineNumber": 1707
          },
          {
            "text": "\t\t\t\tif ( empty( $key_arr['name'] ) ) {\r",
            "lineNumber": 1708
          },
          {
            "text": "\t\t\t\t\tcontinue;\r",
            "lineNumber": 1709
          },
          {
            "text": "\t\t\t\t}\r",
            "lineNumber": 1710
          },
          {
            "text": "\t\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key_arr['name'] );\r",
            "lineNumber": 1711
          },
          {
            "text": "\t\t\t\tregister_post_meta(\r",
            "lineNumber": 1712
          },
          {
            "text": "\t\t\t\t\tINVP::POST_TYPE,\r",
            "lineNumber": 1713
          },
          {
            "text": "\t\t\t\t\t$key,\r",
            "lineNumber": 1714
          },
          {
            "text": "\t\t\t\t\tarray(\r",
            "lineNumber": 1715
          },
          {
            "text": "\t\t\t\t\t\t'show_in_rest' =&gt; true,\r",
            "lineNumber": 1716
          },
          {
            "text": "\t\t\t\t\t\t'single'       =&gt; 'options_array' !== $key_arr['name'],\r",
            "lineNumber": 1717
          },
          {
            "text": "\t\t\t\t\t\t'type'         =&gt; $key_arr['type'] ?? 'string',\r",
            "lineNumber": 1718
          },
          {
            "text": "\t\t\t\t\t)\r",
            "lineNumber": 1719
          },
          {
            "text": "\t\t\t\t);\r",
            "lineNumber": 1720
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1721
          },
          {
            "text": "\r",
            "lineNumber": 1722
          },
          {
            "text": "\t\t\t// Add a couple fields that are used on media attachments.\r",
            "lineNumber": 1723
          },
          {
            "text": "\t\t\t$attachment_keys   = array();\r",
            "lineNumber": 1724
          },
          {
            "text": "\t\t\t$attachment_keys[] = array(\r",
            "lineNumber": 1725
          },
          {
            "text": "\t\t\t\t'name' =&gt; 'hash',\r",
            "lineNumber": 1726
          },
          {
            "text": "\t\t\t\t'type' =&gt; 'string',\r",
            "lineNumber": 1727
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1728
          },
          {
            "text": "\t\t\t$attachment_keys[] = array(\r",
            "lineNumber": 1729
          },
          {
            "text": "\t\t\t\t'name' =&gt; 'photo_number',\r",
            "lineNumber": 1730
          },
          {
            "text": "\t\t\t\t'type' =&gt; 'integer',\r",
            "lineNumber": 1731
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1732
          },
          {
            "text": "\t\t\t$attachment_keys[] = array(\r",
            "lineNumber": 1733
          },
          {
            "text": "\t\t\t\t'name' =&gt; 'vin',\r",
            "lineNumber": 1734
          },
          {
            "text": "\t\t\t\t'type' =&gt; 'string',\r",
            "lineNumber": 1735
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1736
          },
          {
            "text": "\r",
            "lineNumber": 1737
          },
          {
            "text": "\t\t\t// Add meta fields to attachments.\r",
            "lineNumber": 1738
          },
          {
            "text": "\t\t\tforeach ( $attachment_keys as $key_arr ) {\r",
            "lineNumber": 1739
          },
          {
            "text": "\t\t\t\t$key = apply_filters( 'invp_prefix_meta_key', $key_arr['name'] );\r",
            "lineNumber": 1740
          },
          {
            "text": "\t\t\t\tregister_post_meta(\r",
            "lineNumber": 1741
          },
          {
            "text": "\t\t\t\t\t'attachment',\r",
            "lineNumber": 1742
          },
          {
            "text": "\t\t\t\t\t$key,\r",
            "lineNumber": 1743
          },
          {
            "text": "\t\t\t\t\tarray(\r",
            "lineNumber": 1744
          },
          {
            "text": "\t\t\t\t\t\t'sanitize_callback' =&gt; 'sanitize_text_field',\r",
            "lineNumber": 1745
          },
          {
            "text": "\t\t\t\t\t\t'show_in_rest'      =&gt; true,\r",
            "lineNumber": 1746
          },
          {
            "text": "\t\t\t\t\t\t'single'            =&gt; true,\r",
            "lineNumber": 1747
          },
          {
            "text": "\t\t\t\t\t\t'type'              =&gt; $key_arr['type'],\r",
            "lineNumber": 1748
          },
          {
            "text": "\t\t\t\t\t)\r",
            "lineNumber": 1749
          },
          {
            "text": "\t\t\t\t);\r",
            "lineNumber": 1750
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1751
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 1752
          },
          {
            "text": "\r",
            "lineNumber": 1753
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 1754
          },
          {
            "text": "\t\t * Registers every widget that ships with this plugin.\r",
            "lineNumber": 1755
          },
          {
            "text": "\t\t *\r",
            "lineNumber": 1756
          },
          {
            "text": "\t\t * @return void\r",
            "lineNumber": 1757
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 1758
          },
          {
            "text": "\t\tpublic function register_widgets() {\r",
            "lineNumber": 1759
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 1760
          },
          {
            "text": "\t\t\t * Make a widget available to sort vehicles by post meta fields.\r",
            "lineNumber": 1761
          },
          {
            "text": "\t\t\t * Or, enable order by year, make, price, odometer, etc.\r",
            "lineNumber": 1762
          },
          {
            "text": "\t\t\t */\r",
            "lineNumber": 1763
          },
          {
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Order_By_Widget' );\r",
            "lineNumber": 1764
          },
          {
            "text": "\r",
            "lineNumber": 1765
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 1766
          },
          {
            "text": "\t\t\t * Make a widget available to show EPA Fuel Economy data\r",
            "lineNumber": 1767
          },
          {
            "text": "\t\t\t */\r",
            "lineNumber": 1768
          },
          {
            "text": "\t\t\tregister_widget( 'Inventory_Presser_Fuel_Economy_Widget' );\r",
            "lineNumber": 1769
          },
          {
            "text": "\r",
            "lineNumber": 1770
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 1771
          },
          {
            "text": "\t\t\t * Make a widget available to embed a Google map pointed at one of\r",
            "lineNumber": 1772
          }
        ]
      },
      "score": 0.3809075355529785
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-invp.php",
        "range": {
          "startPosition": {
            "line": 907
          },
          "endPosition": {
            "line": 962
          }
        },
        "contents": "\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Title Status', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'title_status',\n\t\t\t\t\t'sample' =&gt; __( 'Clean', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Transmission', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'transmission',\n\t\t\t\t\t'sample' =&gt; __( 'Automatic', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Transmission Speeds', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'transmission_speeds',\n\t\t\t\t\t'sample' =&gt; '4',\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Trim Level', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'trim',\n\t\t\t\t\t'sample' =&gt; __( 'SLE-1 Ext. Cab 4WD', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Type', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'type',\n\t\t\t\t\t'sample' =&gt; __( 'Car', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'VIN', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'vin',\n\t\t\t\t\t'sample' =&gt; '1GTKTCDE1A8147907',\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Is Wholesale', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'wholesale',\n\t\t\t\t\t'type'  =&gt; 'boolean',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Year', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'year',\n\t\t\t\t\t'sample' =&gt; 2010,\n\t\t\t\t\t'type'   =&gt; 'integer',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'YouTube Video ID', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'youtube',\n\t\t\t\t\t'sample' =&gt; '9pBPgt4VOzM',\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'YouTube Embed HTML', 'inventory-presser' ),",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 908
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Title Status', 'inventory-presser' ),",
            "lineNumber": 909
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'title_status',",
            "lineNumber": 910
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'Clean', 'inventory-presser' ),",
            "lineNumber": 911
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 912
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 913
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 914
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Transmission', 'inventory-presser' ),",
            "lineNumber": 915
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'transmission',",
            "lineNumber": 916
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'Automatic', 'inventory-presser' ),",
            "lineNumber": 917
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 918
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 919
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 920
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Transmission Speeds', 'inventory-presser' ),",
            "lineNumber": 921
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'transmission_speeds',",
            "lineNumber": 922
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; '4',",
            "lineNumber": 923
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 924
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 925
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 926
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Trim Level', 'inventory-presser' ),",
            "lineNumber": 927
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'trim',",
            "lineNumber": 928
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'SLE-1 Ext. Cab 4WD', 'inventory-presser' ),",
            "lineNumber": 929
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 930
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 931
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 932
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Type', 'inventory-presser' ),",
            "lineNumber": 933
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'type',",
            "lineNumber": 934
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'Car', 'inventory-presser' ),",
            "lineNumber": 935
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 936
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 937
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 938
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'VIN', 'inventory-presser' ),",
            "lineNumber": 939
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'vin',",
            "lineNumber": 940
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; '1GTKTCDE1A8147907',",
            "lineNumber": 941
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 942
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 943
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 944
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Is Wholesale', 'inventory-presser' ),",
            "lineNumber": 945
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'wholesale',",
            "lineNumber": 946
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'boolean',",
            "lineNumber": 947
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 948
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 949
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Year', 'inventory-presser' ),",
            "lineNumber": 950
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'year',",
            "lineNumber": 951
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; 2010,",
            "lineNumber": 952
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'integer',",
            "lineNumber": 953
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 954
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 955
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'YouTube Video ID', 'inventory-presser' ),",
            "lineNumber": 956
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'youtube',",
            "lineNumber": 957
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; '9pBPgt4VOzM',",
            "lineNumber": 958
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 959
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 960
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 961
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'YouTube Embed HTML', 'inventory-presser' ),",
            "lineNumber": 962
          }
        ]
      },
      "score": 0.36259761452674866
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-invp.php",
        "range": {
          "startPosition": {
            "line": 550
          },
          "endPosition": {
            "line": 611
          }
        },
        "contents": "\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax Top Condition', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_top_condition',\n\t\t\t\t\t'type'  =&gt; 'boolean',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax Icon URL', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_url_icon',\n\t\t\t\t\t'type'  =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax Accident-Free Badge URL', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_url_icon_accident_free',\n\t\t\t\t\t'type'  =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax One-Owner Badge URL', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_url_icon_one_owner',\n\t\t\t\t\t'type'  =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax Top-Condition Badge URL', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_url_icon_top_condition',\n\t\t\t\t\t'type'  =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Carfax Report URL', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'carfax_url_report',\n\t\t\t\t\t'type'  =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' =&gt; __( 'Certified Pre-owned', 'inventory-presser' ),\n\t\t\t\t\t'name'  =&gt; 'certified_preowned',\n\t\t\t\t\t'type'  =&gt; 'boolean',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Color', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'color',\n\t\t\t\t\t'sample' =&gt; __( 'Merlot Jewel Metallic', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Base Color', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'color_base',\n\t\t\t\t\t'sample' =&gt; __( 'Red', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Boat Condition', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'condition_boat', // for boats.\n\t\t\t\t\t'sample' =&gt; __( 'Excellent', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Condition', 'inventory-presser' ),\n\t\t\t\t\t'name'   =&gt; 'condition',\n\t\t\t\t\t'sample' =&gt; __( 'Used', 'inventory-presser' ),\n\t\t\t\t\t'type'   =&gt; 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label'  =&gt; __( 'Cylinders', 'inventory-presser' ),",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 551
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax Top Condition', 'inventory-presser' ),",
            "lineNumber": 552
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_top_condition',",
            "lineNumber": 553
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'boolean',",
            "lineNumber": 554
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 555
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 556
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax Icon URL', 'inventory-presser' ),",
            "lineNumber": 557
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_url_icon',",
            "lineNumber": 558
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'string',",
            "lineNumber": 559
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 560
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 561
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax Accident-Free Badge URL', 'inventory-presser' ),",
            "lineNumber": 562
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_url_icon_accident_free',",
            "lineNumber": 563
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'string',",
            "lineNumber": 564
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 565
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 566
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax One-Owner Badge URL', 'inventory-presser' ),",
            "lineNumber": 567
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_url_icon_one_owner',",
            "lineNumber": 568
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'string',",
            "lineNumber": 569
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 570
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 571
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax Top-Condition Badge URL', 'inventory-presser' ),",
            "lineNumber": 572
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_url_icon_top_condition',",
            "lineNumber": 573
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'string',",
            "lineNumber": 574
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 575
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 576
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Carfax Report URL', 'inventory-presser' ),",
            "lineNumber": 577
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'carfax_url_report',",
            "lineNumber": 578
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'string',",
            "lineNumber": 579
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 580
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 581
          },
          {
            "text": "\t\t\t\t\t'label' =&gt; __( 'Certified Pre-owned', 'inventory-presser' ),",
            "lineNumber": 582
          },
          {
            "text": "\t\t\t\t\t'name'  =&gt; 'certified_preowned',",
            "lineNumber": 583
          },
          {
            "text": "\t\t\t\t\t'type'  =&gt; 'boolean',",
            "lineNumber": 584
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 585
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 586
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Color', 'inventory-presser' ),",
            "lineNumber": 587
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'color',",
            "lineNumber": 588
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'Merlot Jewel Metallic', 'inventory-presser' ),",
            "lineNumber": 589
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 590
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 591
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 592
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Base Color', 'inventory-presser' ),",
            "lineNumber": 593
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'color_base',",
            "lineNumber": 594
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'Red', 'inventory-presser' ),",
            "lineNumber": 595
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 596
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 597
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 598
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Boat Condition', 'inventory-presser' ),",
            "lineNumber": 599
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'condition_boat', // for boats.",
            "lineNumber": 600
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'Excellent', 'inventory-presser' ),",
            "lineNumber": 601
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 602
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 603
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 604
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Condition', 'inventory-presser' ),",
            "lineNumber": 605
          },
          {
            "text": "\t\t\t\t\t'name'   =&gt; 'condition',",
            "lineNumber": 606
          },
          {
            "text": "\t\t\t\t\t'sample' =&gt; __( 'Used', 'inventory-presser' ),",
            "lineNumber": 607
          },
          {
            "text": "\t\t\t\t\t'type'   =&gt; 'string',",
            "lineNumber": 608
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 609
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 610
          },
          {
            "text": "\t\t\t\t\t'label'  =&gt; __( 'Cylinders', 'inventory-presser' ),",
            "lineNumber": 611
          }
        ]
      },
      "score": 0.36203354597091675
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-taxonomies.php",
        "range": {
          "startPosition": {
            "line": 694
          },
          "endPosition": {
            "line": 736
          }
        },
        "contents": "\t\t\tarray(\n\t\t\t\t'args'      =&gt; array(\n\t\t\t\t\t'hierarchical'   =&gt; true,\n\t\t\t\t\t'label'          =&gt; __( 'Types', 'inventory-presser' ),\n\t\t\t\t\t'labels'         =&gt; array(\n\t\t\t\t\t\t'name'          =&gt; __( 'Types', 'inventory-presser' ),\n\t\t\t\t\t\t'singular_name' =&gt; __( 'Type', 'inventory-presser' ),\n\t\t\t\t\t\t'search_items'  =&gt; __( 'Search types', 'inventory-presser' ),\n\t\t\t\t\t\t'popular_items' =&gt; __( 'Popular types', 'inventory-presser' ),\n\t\t\t\t\t\t'all_items'     =&gt; __( 'All types', 'inventory-presser' ),\n\t\t\t\t\t\t'parent_item'   =&gt; __( 'Parent Type', 'inventory-presser' ),\n\t\t\t\t\t\t'edit_item'     =&gt; __( 'Edit Type', 'inventory-presser' ),\n\t\t\t\t\t\t'add_new_item'  =&gt; __( 'Add New Type', 'inventory-presser' ),\n\t\t\t\t\t\t'new_item_name' =&gt; __( 'New Type Name', 'inventory-presser' ),\n\t\t\t\t\t\t'back_to_items' =&gt; __( '&amp;larr; Go to types', 'inventory-presser' ),\n\t\t\t\t\t),\n\t\t\t\t\t'meta_box_cb'    =&gt; array( 'Inventory_Presser_Taxonomies', 'meta_box_html_type' ),\n\t\t\t\t\t'query_var'      =&gt; 'type',\n\t\t\t\t\t'rest_base'      =&gt; 'inventory_type',\n\t\t\t\t\t'singular_label' =&gt; __( 'Type', 'inventory-presser' ),\n\t\t\t\t\t'show_in_menu'   =&gt; false,\n\t\t\t\t\t'show_in_rest'   =&gt; true,\n\t\t\t\t\t'show_ui'        =&gt; true,\n\t\t\t\t),\n\t\t\t\t'term_data' =&gt; array(\n\t\t\t\t\t'ATV'  =&gt; 'All Terrain Vehicle',\n\t\t\t\t\t'BOAT' =&gt; 'Boat',\n\t\t\t\t\t'BUS'  =&gt; 'Bus',\n\t\t\t\t\t'CAR'  =&gt; 'Car',\n\t\t\t\t\t'MOT'  =&gt; 'Motorcycle',\n\t\t\t\t\t'MOW'  =&gt; 'Mower',\n\t\t\t\t\t'OTH'  =&gt; 'Other',\n\t\t\t\t\t'RV'   =&gt; 'Recreational Vehicle',\n\t\t\t\t\t'SUV'  =&gt; 'SUV',\n\t\t\t\t\t'TRLR' =&gt; 'Trailer',\n\t\t\t\t\t'TRU'  =&gt; 'Truck',\n\t\t\t\t\t'VAN'  =&gt; 'Van',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'args'      =&gt; array(\n\t\t\t\t\t'hierarchical'   =&gt; true,",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\tarray(",
            "lineNumber": 695
          },
          {
            "text": "\t\t\t\t'args'      =&gt; array(",
            "lineNumber": 696
          },
          {
            "text": "\t\t\t\t\t'hierarchical'   =&gt; true,",
            "lineNumber": 697
          },
          {
            "text": "\t\t\t\t\t'label'          =&gt; __( 'Types', 'inventory-presser' ),",
            "lineNumber": 698
          },
          {
            "text": "\t\t\t\t\t'labels'         =&gt; array(",
            "lineNumber": 699
          },
          {
            "text": "\t\t\t\t\t\t'name'          =&gt; __( 'Types', 'inventory-presser' ),",
            "lineNumber": 700
          },
          {
            "text": "\t\t\t\t\t\t'singular_name' =&gt; __( 'Type', 'inventory-presser' ),",
            "lineNumber": 701
          },
          {
            "text": "\t\t\t\t\t\t'search_items'  =&gt; __( 'Search types', 'inventory-presser' ),",
            "lineNumber": 702
          },
          {
            "text": "\t\t\t\t\t\t'popular_items' =&gt; __( 'Popular types', 'inventory-presser' ),",
            "lineNumber": 703
          },
          {
            "text": "\t\t\t\t\t\t'all_items'     =&gt; __( 'All types', 'inventory-presser' ),",
            "lineNumber": 704
          },
          {
            "text": "\t\t\t\t\t\t'parent_item'   =&gt; __( 'Parent Type', 'inventory-presser' ),",
            "lineNumber": 705
          },
          {
            "text": "\t\t\t\t\t\t'edit_item'     =&gt; __( 'Edit Type', 'inventory-presser' ),",
            "lineNumber": 706
          },
          {
            "text": "\t\t\t\t\t\t'add_new_item'  =&gt; __( 'Add New Type', 'inventory-presser' ),",
            "lineNumber": 707
          },
          {
            "text": "\t\t\t\t\t\t'new_item_name' =&gt; __( 'New Type Name', 'inventory-presser' ),",
            "lineNumber": 708
          },
          {
            "text": "\t\t\t\t\t\t'back_to_items' =&gt; __( '&amp;larr; Go to types', 'inventory-presser' ),",
            "lineNumber": 709
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 710
          },
          {
            "text": "\t\t\t\t\t'meta_box_cb'    =&gt; array( 'Inventory_Presser_Taxonomies', 'meta_box_html_type' ),",
            "lineNumber": 711
          },
          {
            "text": "\t\t\t\t\t'query_var'      =&gt; 'type',",
            "lineNumber": 712
          },
          {
            "text": "\t\t\t\t\t'rest_base'      =&gt; 'inventory_type',",
            "lineNumber": 713
          },
          {
            "text": "\t\t\t\t\t'singular_label' =&gt; __( 'Type', 'inventory-presser' ),",
            "lineNumber": 714
          },
          {
            "text": "\t\t\t\t\t'show_in_menu'   =&gt; false,",
            "lineNumber": 715
          },
          {
            "text": "\t\t\t\t\t'show_in_rest'   =&gt; true,",
            "lineNumber": 716
          },
          {
            "text": "\t\t\t\t\t'show_ui'        =&gt; true,",
            "lineNumber": 717
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 718
          },
          {
            "text": "\t\t\t\t'term_data' =&gt; array(",
            "lineNumber": 719
          },
          {
            "text": "\t\t\t\t\t'ATV'  =&gt; 'All Terrain Vehicle',",
            "lineNumber": 720
          },
          {
            "text": "\t\t\t\t\t'BOAT' =&gt; 'Boat',",
            "lineNumber": 721
          },
          {
            "text": "\t\t\t\t\t'BUS'  =&gt; 'Bus',",
            "lineNumber": 722
          },
          {
            "text": "\t\t\t\t\t'CAR'  =&gt; 'Car',",
            "lineNumber": 723
          },
          {
            "text": "\t\t\t\t\t'MOT'  =&gt; 'Motorcycle',",
            "lineNumber": 724
          },
          {
            "text": "\t\t\t\t\t'MOW'  =&gt; 'Mower',",
            "lineNumber": 725
          },
          {
            "text": "\t\t\t\t\t'OTH'  =&gt; 'Other',",
            "lineNumber": 726
          },
          {
            "text": "\t\t\t\t\t'RV'   =&gt; 'Recreational Vehicle',",
            "lineNumber": 727
          },
          {
            "text": "\t\t\t\t\t'SUV'  =&gt; 'SUV',",
            "lineNumber": 728
          },
          {
            "text": "\t\t\t\t\t'TRLR' =&gt; 'Trailer',",
            "lineNumber": 729
          },
          {
            "text": "\t\t\t\t\t'TRU'  =&gt; 'Truck',",
            "lineNumber": 730
          },
          {
            "text": "\t\t\t\t\t'VAN'  =&gt; 'Van',",
            "lineNumber": 731
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 732
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 733
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 734
          },
          {
            "text": "\t\t\t\t'args'      =&gt; array(",
            "lineNumber": 735
          },
          {
            "text": "\t\t\t\t\t'hierarchical'   =&gt; true,",
            "lineNumber": 736
          }
        ]
      },
      "score": 0.3157232999801636
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./js/editor-sidebar.js",
        "range": {
          "startPosition": {
            "line": 66
          },
          "endPosition": {
            "line": 615
          }
        },
        "contents": "\t\t{\n\t\t\trender: function() {\n\t\t\t\t// Check if we're in a post editor context (not widgets editor)\n\t\t\t\tvar editorStore = wp.data.select( 'core/editor' );\n\t\t\t\tif ( ! editorStore ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Check if getCurrentPostType exists and returns the correct post type\n\t\t\t\tif ( ! editorStore.getCurrentPostType || editorStore.getCurrentPostType() !== 'inventory_vehicle' ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Additional safety check: verify getEditedPostAttribute works and returns meta\n\t\t\t\tif ( ! editorStore.getEditedPostAttribute ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tvar testMeta = editorStore.getEditedPostAttribute( 'meta' );\n\t\t\t\tif ( ! testMeta || typeof testMeta !== 'object' ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tvar fields = el(\n\t\t\t\t\twp.element.Fragment,\n\t\t\t\t\t{},\n\t\t\t\t\tel(\n\t\t\t\t\t\t'h2',\n\t\t\t\t\t\t{},\n\t\t\t\t\t\t'Attributes'\n\t\t\t\t\t),\n\t\t\t\t\tel(\n\t\t\t\t\t\tMetaBlockField,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'vin',\n\t\t\t\t\t\t\tid:        invp.meta_prefix + 'vin',\n\t\t\t\t\t\t\tisNumeric: false,\n\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t\tel(\n\t\t\t\t\t\tMetaBlockField,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'stock_number',\n\t\t\t\t\t\t\tid:        invp.meta_prefix + 'stock_number',\n\t\t\t\t\t\t\tisNumeric: false,\n\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t\tel(\n\t\t\t\t\t\tMetaBlockField,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'trim',\n\t\t\t\t\t\t\tid:        invp.meta_prefix + 'trim',\n\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t\tel(\n\t\t\t\t\t\tMetaBlockField,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'engine',\n\t\t\t\t\t\t\tid:        invp.meta_prefix + 'engine',\n\t\t\t\t\t\t\tisNumeric: false,\n\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t\tel(\n\t\t\t\t\t\tMetaBlockField,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'doors',\n\t\t\t\t\t\t\tid:        invp.meta_prefix + 'doors',\n\t\t\t\t\t\t\tisNumeric: true,\n\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t\tel(\n\t\t\t\t\t\tMetaBlockField,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'color',\n\t\t\t\t\t\t\tid:        invp.meta_prefix + 'color',\n\t\t\t\t\t\t\tisNumeric: false,\n\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t\tel(\n\t\t\t\t\t\tMetaBlockField,\n\t\t\t\t\t\t{",
        "signatures": {
          "ranges": [
            {
              "startPosition": {
                "line": 67,
                "column": 1
              },
              "endPosition": {
                "line": 67,
                "column": 1
              }
            },
            {
              "startPosition": {
                "line": 324,
                "column": 2
              },
              "endPosition": {
                "line": 324,
                "column": 2
              }
            }
          ]
        },
        "detailedLines": [
          {
            "text": "\t\t{",
            "lineNumber": 326
          },
          {
            "text": "\t\t\trender: function() {",
            "lineNumber": 327
          },
          {
            "text": "\t\t\t\t// Check if we're in a post editor context (not widgets editor)",
            "lineNumber": 328
          },
          {
            "text": "\t\t\t\tvar editorStore = wp.data.select( 'core/editor' );",
            "lineNumber": 329
          },
          {
            "text": "\t\t\t\tif ( ! editorStore ) {",
            "lineNumber": 330
          },
          {
            "text": "\t\t\t\t\treturn null;",
            "lineNumber": 331
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 332
          },
          {
            "lineNumber": 333
          },
          {
            "text": "\t\t\t\t// Check if getCurrentPostType exists and returns the correct post type",
            "lineNumber": 334
          },
          {
            "text": "\t\t\t\tif ( ! editorStore.getCurrentPostType || editorStore.getCurrentPostType() !== 'inventory_vehicle' ) {",
            "lineNumber": 335
          },
          {
            "text": "\t\t\t\t\treturn null;",
            "lineNumber": 336
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 337
          },
          {
            "lineNumber": 338
          },
          {
            "text": "\t\t\t\t// Additional safety check: verify getEditedPostAttribute works and returns meta",
            "lineNumber": 339
          },
          {
            "text": "\t\t\t\tif ( ! editorStore.getEditedPostAttribute ) {",
            "lineNumber": 340
          },
          {
            "text": "\t\t\t\t\treturn null;",
            "lineNumber": 341
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 342
          },
          {
            "text": "\t\t\t\tvar testMeta = editorStore.getEditedPostAttribute( 'meta' );",
            "lineNumber": 343
          },
          {
            "text": "\t\t\t\tif ( ! testMeta || typeof testMeta !== 'object' ) {",
            "lineNumber": 344
          },
          {
            "text": "\t\t\t\t\treturn null;",
            "lineNumber": 345
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 346
          },
          {
            "lineNumber": 347
          },
          {
            "text": "\t\t\t\tvar fields = el(",
            "lineNumber": 348
          },
          {
            "text": "\t\t\t\t\twp.element.Fragment,",
            "lineNumber": 349
          },
          {
            "text": "\t\t\t\t\t{},",
            "lineNumber": 350
          },
          {
            "text": "\t\t\t\t\tel(",
            "lineNumber": 351
          },
          {
            "text": "\t\t\t\t\t\t'h2',",
            "lineNumber": 352
          },
          {
            "text": "\t\t\t\t\t\t{},",
            "lineNumber": 353
          },
          {
            "text": "\t\t\t\t\t\t'Attributes'",
            "lineNumber": 354
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 355
          },
          {
            "text": "\t\t\t\t\tel(",
            "lineNumber": 356
          },
          {
            "text": "\t\t\t\t\t\tMetaBlockField,",
            "lineNumber": 357
          },
          {
            "text": "\t\t\t\t\t\t{",
            "lineNumber": 358
          },
          {
            "text": "\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'vin',",
            "lineNumber": 359
          },
          {
            "text": "\t\t\t\t\t\t\tid:        invp.meta_prefix + 'vin',",
            "lineNumber": 360
          },
          {
            "text": "\t\t\t\t\t\t\tisNumeric: false,",
            "lineNumber": 361
          },
          {
            "text": "\t\t\t\t\t\t}",
            "lineNumber": 362
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 363
          },
          {
            "text": "\t\t\t\t\tel(",
            "lineNumber": 364
          },
          {
            "text": "\t\t\t\t\t\tMetaBlockField,",
            "lineNumber": 365
          },
          {
            "text": "\t\t\t\t\t\t{",
            "lineNumber": 366
          },
          {
            "text": "\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'stock_number',",
            "lineNumber": 367
          },
          {
            "text": "\t\t\t\t\t\t\tid:        invp.meta_prefix + 'stock_number',",
            "lineNumber": 368
          },
          {
            "text": "\t\t\t\t\t\t\tisNumeric: false,",
            "lineNumber": 369
          },
          {
            "text": "\t\t\t\t\t\t}",
            "lineNumber": 370
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 371
          },
          {
            "text": "\t\t\t\t\tel(",
            "lineNumber": 372
          },
          {
            "text": "\t\t\t\t\t\tMetaBlockField,",
            "lineNumber": 373
          },
          {
            "text": "\t\t\t\t\t\t{",
            "lineNumber": 374
          },
          {
            "text": "\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'trim',",
            "lineNumber": 375
          },
          {
            "text": "\t\t\t\t\t\t\tid:        invp.meta_prefix + 'trim',",
            "lineNumber": 376
          },
          {
            "text": "\t\t\t\t\t\t}",
            "lineNumber": 377
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 378
          },
          {
            "text": "\t\t\t\t\tel(",
            "lineNumber": 379
          },
          {
            "text": "\t\t\t\t\t\tMetaBlockField,",
            "lineNumber": 380
          },
          {
            "text": "\t\t\t\t\t\t{",
            "lineNumber": 381
          },
          {
            "text": "\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'engine',",
            "lineNumber": 382
          },
          {
            "text": "\t\t\t\t\t\t\tid:        invp.meta_prefix + 'engine',",
            "lineNumber": 383
          },
          {
            "text": "\t\t\t\t\t\t\tisNumeric: false,",
            "lineNumber": 384
          },
          {
            "text": "\t\t\t\t\t\t}",
            "lineNumber": 385
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 386
          },
          {
            "text": "\t\t\t\t\tel(",
            "lineNumber": 387
          },
          {
            "text": "\t\t\t\t\t\tMetaBlockField,",
            "lineNumber": 388
          },
          {
            "text": "\t\t\t\t\t\t{",
            "lineNumber": 389
          },
          {
            "text": "\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'doors',",
            "lineNumber": 390
          },
          {
            "text": "\t\t\t\t\t\t\tid:        invp.meta_prefix + 'doors',",
            "lineNumber": 391
          },
          {
            "text": "\t\t\t\t\t\t\tisNumeric: true,",
            "lineNumber": 392
          },
          {
            "text": "\t\t\t\t\t\t}",
            "lineNumber": 393
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 394
          },
          {
            "text": "\t\t\t\t\tel(",
            "lineNumber": 395
          },
          {
            "text": "\t\t\t\t\t\tMetaBlockField,",
            "lineNumber": 396
          },
          {
            "text": "\t\t\t\t\t\t{",
            "lineNumber": 397
          },
          {
            "text": "\t\t\t\t\t\t\tfieldName: invp.meta_prefix + 'color',",
            "lineNumber": 398
          },
          {
            "text": "\t\t\t\t\t\t\tid:        invp.meta_prefix + 'color',",
            "lineNumber": 399
          },
          {
            "text": "\t\t\t\t\t\t\tisNumeric: false,",
            "lineNumber": 400
          },
          {
            "text": "\t\t\t\t\t\t}",
            "lineNumber": 401
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 402
          },
          {
            "text": "\t\t\t\t\tel(",
            "lineNumber": 403
          },
          {
            "text": "\t\t\t\t\t\tMetaBlockField,",
            "lineNumber": 404
          },
          {
            "text": "\t\t\t\t\t\t{",
            "lineNumber": 405
          }
        ]
      },
      "score": 0.315407395362854
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/integrations/class-classic-editor.php",
        "range": {
          "startPosition": {
            "line": 450,
            "column": 3
          },
          "endPosition": {
            "line": 530,
            "column": 3
          }
        },
        "contents": "$meta_key = apply_filters( 'invp_prefix_meta_key', $key );\n\n\t\t\tprintf(\n\t\t\t\t'&lt;tr&gt;&lt;th scope=\"row\"&gt;&lt;label for=\"%1$s\"&gt;%2$s&lt;/label&gt;&lt;/th&gt;'\n\t\t\t\t. '&lt;td&gt;&lt;input type=\"text\" name=\"%1$s\" value=\"%3$s\" onkeypress=\"return is_number(event)\"&gt;&lt;/td&gt;&lt;/tr&gt;',\n\t\t\t\tesc_attr( $meta_key ),\n\t\t\t\tesc_html( $label ),\n\t\t\t\tesc_attr( INVP::get_meta( $key, $post-&gt;ID ) )\n\t\t\t);\n\t\t}\n\n\t\t// Payment frequency is a drop-down.\n\t\t$meta_key = apply_filters( 'invp_prefix_meta_key', 'payment_frequency' );\n\t\tprintf(\n\t\t\t'&lt;tr&gt;&lt;th scope=\"row\"&gt;&lt;label for=\"%1$s\"&gt;Payment frequency&lt;/label&gt;&lt;/th&gt;'\n\t\t\t. '&lt;td&gt;&lt;select name=\"%1$s\"&gt;&lt;option&gt;&lt;/option&gt;',\n\t\t\tesc_attr( $meta_key )\n\t\t);\n\n\t\t$frequencies = apply_filters(\n\t\t\t'invp_default_payment_frequencies',\n\t\t\tarray(\n\t\t\t\t'Monthly'      =&gt; 'monthly',\n\t\t\t\t'Weekly'       =&gt; 'weekly',\n\t\t\t\t'Bi-weekly'    =&gt; 'biweekly',\n\t\t\t\t'Semi-monthly' =&gt; 'semimonthly',\n\t\t\t)\n\t\t);\n\t\tforeach ( $frequencies as $key =&gt; $value ) {\n\t\t\tprintf(\n\t\t\t\t'&lt;option value=\"%s\"%s&gt;%s&lt;/option&gt;',\n\t\t\t\tesc_attr( $value ),\n\t\t\t\tselected( invp_get_the_payment_frequency( $post-&gt;ID ), $value, false ),\n\t\t\t\tesc_html( $key )\n\t\t\t);\n\t\t}\n\t\techo '&lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;'\n\t\t. '&lt;/tbody&gt;&lt;/table&gt;';\n\t}\n\n\t/**\n\t * Creates a meta box to help the user manage the bulk of the meta fields\n\t * that define a vehicle.\n\t *\n\t * @param  WP_Post $post\n\t * @param  mixed   $meta_box\n\t * @return void\n\t */\n\tpublic function meta_box_html_vehicle( $post, $meta_box ) {\n\t\t// Get the post meta and flatten some of our keys into an array.\n\t\t$custom = get_post_custom( $post-&gt;ID );\n\t\t$meta   = array();\n\t\t$keys   = array(\n\t\t\t'body_style',\n\t\t\t'color',\n\t\t\t'color_base',\n\t\t\t'description',\n\t\t\t'engine',\n\t\t\t'interior_color',\n\t\t\t'make',\n\t\t\t'model',\n\t\t\t'odometer',\n\t\t\t'stock_number',\n\t\t\t'trim',\n\t\t\t'vin',\n\t\t\t'year',\n\t\t\t'youtube',\n\t\t\t// Boat fields.\n\t\t\t'beam',\n\t\t\t'condition_boat',\n\t\t\t'draft',\n\t\t\t'engine_count',\n\t\t\t'engine_make',\n\t\t\t'engine_model',\n\t\t\t'horsepower',\n\t\t\t'hull_material',\n\t\t\t'length',\n\t\t);\n\n\t\tforeach ( $keys as $key ) {\n\t\t\t",
        "signatures": {},
        "detailedLines": [
          {
            "text": "$meta_key = apply_filters( 'invp_prefix_meta_key', $key );",
            "lineNumber": 451
          },
          {
            "lineNumber": 452
          },
          {
            "text": "\t\t\tprintf(",
            "lineNumber": 453
          },
          {
            "text": "\t\t\t\t'&lt;tr&gt;&lt;th scope=\"row\"&gt;&lt;label for=\"%1$s\"&gt;%2$s&lt;/label&gt;&lt;/th&gt;'",
            "lineNumber": 454
          },
          {
            "text": "\t\t\t\t. '&lt;td&gt;&lt;input type=\"text\" name=\"%1$s\" value=\"%3$s\" onkeypress=\"return is_number(event)\"&gt;&lt;/td&gt;&lt;/tr&gt;',",
            "lineNumber": 455
          },
          {
            "text": "\t\t\t\tesc_attr( $meta_key ),",
            "lineNumber": 456
          },
          {
            "text": "\t\t\t\tesc_html( $label ),",
            "lineNumber": 457
          },
          {
            "text": "\t\t\t\tesc_attr( INVP::get_meta( $key, $post-&gt;ID ) )",
            "lineNumber": 458
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 459
          },
          {
            "text": "\t\t}",
            "lineNumber": 460
          },
          {
            "lineNumber": 461
          },
          {
            "text": "\t\t// Payment frequency is a drop-down.",
            "lineNumber": 462
          },
          {
            "text": "\t\t$meta_key = apply_filters( 'invp_prefix_meta_key', 'payment_frequency' );",
            "lineNumber": 463
          },
          {
            "text": "\t\tprintf(",
            "lineNumber": 464
          },
          {
            "text": "\t\t\t'&lt;tr&gt;&lt;th scope=\"row\"&gt;&lt;label for=\"%1$s\"&gt;Payment frequency&lt;/label&gt;&lt;/th&gt;'",
            "lineNumber": 465
          },
          {
            "text": "\t\t\t. '&lt;td&gt;&lt;select name=\"%1$s\"&gt;&lt;option&gt;&lt;/option&gt;',",
            "lineNumber": 466
          },
          {
            "text": "\t\t\tesc_attr( $meta_key )",
            "lineNumber": 467
          },
          {
            "text": "\t\t);",
            "lineNumber": 468
          },
          {
            "lineNumber": 469
          },
          {
            "text": "\t\t$frequencies = apply_filters(",
            "lineNumber": 470
          },
          {
            "text": "\t\t\t'invp_default_payment_frequencies',",
            "lineNumber": 471
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 472
          },
          {
            "text": "\t\t\t\t'Monthly'      =&gt; 'monthly',",
            "lineNumber": 473
          },
          {
            "text": "\t\t\t\t'Weekly'       =&gt; 'weekly',",
            "lineNumber": 474
          },
          {
            "text": "\t\t\t\t'Bi-weekly'    =&gt; 'biweekly',",
            "lineNumber": 475
          },
          {
            "text": "\t\t\t\t'Semi-monthly' =&gt; 'semimonthly',",
            "lineNumber": 476
          },
          {
            "text": "\t\t\t)",
            "lineNumber": 477
          },
          {
            "text": "\t\t);",
            "lineNumber": 478
          },
          {
            "text": "\t\tforeach ( $frequencies as $key =&gt; $value ) {",
            "lineNumber": 479
          },
          {
            "text": "\t\t\tprintf(",
            "lineNumber": 480
          },
          {
            "text": "\t\t\t\t'&lt;option value=\"%s\"%s&gt;%s&lt;/option&gt;',",
            "lineNumber": 481
          },
          {
            "text": "\t\t\t\tesc_attr( $value ),",
            "lineNumber": 482
          },
          {
            "text": "\t\t\t\tselected( invp_get_the_payment_frequency( $post-&gt;ID ), $value, false ),",
            "lineNumber": 483
          },
          {
            "text": "\t\t\t\tesc_html( $key )",
            "lineNumber": 484
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 485
          },
          {
            "text": "\t\t}",
            "lineNumber": 486
          },
          {
            "text": "\t\techo '&lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;'",
            "lineNumber": 487
          },
          {
            "text": "\t\t. '&lt;/tbody&gt;&lt;/table&gt;';",
            "lineNumber": 488
          },
          {
            "text": "\t}",
            "lineNumber": 489
          },
          {
            "lineNumber": 490
          },
          {
            "text": "\t/**",
            "lineNumber": 491
          },
          {
            "text": "\t * Creates a meta box to help the user manage the bulk of the meta fields",
            "lineNumber": 492
          },
          {
            "text": "\t * that define a vehicle.",
            "lineNumber": 493
          },
          {
            "text": "\t *",
            "lineNumber": 494
          },
          {
            "text": "\t * @param  WP_Post $post",
            "lineNumber": 495
          },
          {
            "text": "\t * @param  mixed   $meta_box",
            "lineNumber": 496
          },
          {
            "text": "\t * @return void",
            "lineNumber": 497
          },
          {
            "text": "\t */",
            "lineNumber": 498
          },
          {
            "text": "\tpublic function meta_box_html_vehicle( $post, $meta_box ) {",
            "lineNumber": 499
          },
          {
            "text": "\t\t// Get the post meta and flatten some of our keys into an array.",
            "lineNumber": 500
          },
          {
            "text": "\t\t$custom = get_post_custom( $post-&gt;ID );",
            "lineNumber": 501
          },
          {
            "text": "\t\t$meta   = array();",
            "lineNumber": 502
          },
          {
            "text": "\t\t$keys   = array(",
            "lineNumber": 503
          },
          {
            "text": "\t\t\t'body_style',",
            "lineNumber": 504
          },
          {
            "text": "\t\t\t'color',",
            "lineNumber": 505
          },
          {
            "text": "\t\t\t'color_base',",
            "lineNumber": 506
          },
          {
            "text": "\t\t\t'description',",
            "lineNumber": 507
          },
          {
            "text": "\t\t\t'engine',",
            "lineNumber": 508
          },
          {
            "text": "\t\t\t'interior_color',",
            "lineNumber": 509
          },
          {
            "text": "\t\t\t'make',",
            "lineNumber": 510
          },
          {
            "text": "\t\t\t'model',",
            "lineNumber": 511
          },
          {
            "text": "\t\t\t'odometer',",
            "lineNumber": 512
          },
          {
            "text": "\t\t\t'stock_number',",
            "lineNumber": 513
          },
          {
            "text": "\t\t\t'trim',",
            "lineNumber": 514
          },
          {
            "text": "\t\t\t'vin',",
            "lineNumber": 515
          },
          {
            "text": "\t\t\t'year',",
            "lineNumber": 516
          },
          {
            "text": "\t\t\t'youtube',",
            "lineNumber": 517
          },
          {
            "text": "\t\t\t// Boat fields.",
            "lineNumber": 518
          },
          {
            "text": "\t\t\t'beam',",
            "lineNumber": 519
          },
          {
            "text": "\t\t\t'condition_boat',",
            "lineNumber": 520
          },
          {
            "text": "\t\t\t'draft',",
            "lineNumber": 521
          },
          {
            "text": "\t\t\t'engine_count',",
            "lineNumber": 522
          },
          {
            "text": "\t\t\t'engine_make',",
            "lineNumber": 523
          },
          {
            "text": "\t\t\t'engine_model',",
            "lineNumber": 524
          },
          {
            "text": "\t\t\t'horsepower',",
            "lineNumber": 525
          },
          {
            "text": "\t\t\t'hull_material',",
            "lineNumber": 526
          },
          {
            "text": "\t\t\t'length',",
            "lineNumber": 527
          },
          {
            "text": "\t\t);",
            "lineNumber": 528
          },
          {
            "lineNumber": 529
          },
          {
            "text": "\t\tforeach ( $keys as $key ) {",
            "lineNumber": 530
          },
          {
            "text": "\t\t\t",
            "lineNumber": 531
          }
        ]
      },
      "score": 0.3123842477798462
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/template-tags.php",
        "range": {
          "startPosition": {
            "line": 1171
          },
          "endPosition": {
            "line": 1242
          }
        },
        "contents": " * @return string\n */\nfunction invp_get_the_type( $post_ID = null ) {\n\treturn INVP::get_meta( 'type', $post_ID );\n}\n\n/**\n * Template tag. Returns the vehicles VIN.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_VIN( $post_ID = null ) {\n\treturn INVP::get_meta( 'vin', $post_ID );\n}\n\n/**\n * invp_get_the_year\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_year( $post_ID = null ) {\n\treturn INVP::get_meta( 'year', $post_ID );\n}\n\n/**\n * Returns the YouTube embed code for this vehicle or an empty string.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_youtube_embed( $post_ID = null ) {\n\treturn INVP::get_meta( 'youtube_embed', $post_ID );\n}\n\n/**\n * Returns this vehicle's YouTube video URL or empty string.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string This vehicle's YouTube URL or empty string\n */\nfunction invp_get_the_youtube_url( $post_ID = null ) {\n\t$video_id = INVP::get_meta( 'youtube', $post_ID );\n\tif ( empty( $video_id ) ) {\n\t\treturn '';\n\t}\n\n\treturn 'https://www.youtube.com/watch?v=' . $video_id;\n}\n\n/**\n * invp_have_carfax_report\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool\n */\nfunction invp_have_carfax_report( $post_ID = null ) {\n\treturn ! empty( INVP::get_meta( 'carfax_have_report', $post_ID ) );\n}\n\n/**\n * Is this vehicle a boat?\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool True if this vehicle's type is boat.\n */\nfunction invp_is_boat( $post_ID = null ) {\n\treturn 'boat' === strtolower( invp_get_the_type( $post_ID ) );\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": " * @return string",
            "lineNumber": 1172
          },
          {
            "text": " */",
            "lineNumber": 1173
          },
          {
            "text": "function invp_get_the_type( $post_ID = null ) {",
            "lineNumber": 1174
          },
          {
            "text": "\treturn INVP::get_meta( 'type', $post_ID );",
            "lineNumber": 1175
          },
          {
            "text": "}",
            "lineNumber": 1176
          },
          {
            "lineNumber": 1177
          },
          {
            "text": "/**",
            "lineNumber": 1178
          },
          {
            "text": " * Template tag. Returns the vehicles VIN.",
            "lineNumber": 1179
          },
          {
            "text": " *",
            "lineNumber": 1180
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1181
          },
          {
            "text": " * @return string",
            "lineNumber": 1182
          },
          {
            "text": " */",
            "lineNumber": 1183
          },
          {
            "text": "function invp_get_the_VIN( $post_ID = null ) {",
            "lineNumber": 1184
          },
          {
            "text": "\treturn INVP::get_meta( 'vin', $post_ID );",
            "lineNumber": 1185
          },
          {
            "text": "}",
            "lineNumber": 1186
          },
          {
            "lineNumber": 1187
          },
          {
            "text": "/**",
            "lineNumber": 1188
          },
          {
            "text": " * invp_get_the_year",
            "lineNumber": 1189
          },
          {
            "text": " *",
            "lineNumber": 1190
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1191
          },
          {
            "text": " * @return string",
            "lineNumber": 1192
          },
          {
            "text": " */",
            "lineNumber": 1193
          },
          {
            "text": "function invp_get_the_year( $post_ID = null ) {",
            "lineNumber": 1194
          },
          {
            "text": "\treturn INVP::get_meta( 'year', $post_ID );",
            "lineNumber": 1195
          },
          {
            "text": "}",
            "lineNumber": 1196
          },
          {
            "lineNumber": 1197
          },
          {
            "text": "/**",
            "lineNumber": 1198
          },
          {
            "text": " * Returns the YouTube embed code for this vehicle or an empty string.",
            "lineNumber": 1199
          },
          {
            "text": " *",
            "lineNumber": 1200
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1201
          },
          {
            "text": " * @return string",
            "lineNumber": 1202
          },
          {
            "text": " */",
            "lineNumber": 1203
          },
          {
            "text": "function invp_get_the_youtube_embed( $post_ID = null ) {",
            "lineNumber": 1204
          },
          {
            "text": "\treturn INVP::get_meta( 'youtube_embed', $post_ID );",
            "lineNumber": 1205
          },
          {
            "text": "}",
            "lineNumber": 1206
          },
          {
            "lineNumber": 1207
          },
          {
            "text": "/**",
            "lineNumber": 1208
          },
          {
            "text": " * Returns this vehicle's YouTube video URL or empty string.",
            "lineNumber": 1209
          },
          {
            "text": " *",
            "lineNumber": 1210
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1211
          },
          {
            "text": " * @return string This vehicle's YouTube URL or empty string",
            "lineNumber": 1212
          },
          {
            "text": " */",
            "lineNumber": 1213
          },
          {
            "text": "function invp_get_the_youtube_url( $post_ID = null ) {",
            "lineNumber": 1214
          },
          {
            "text": "\t$video_id = INVP::get_meta( 'youtube', $post_ID );",
            "lineNumber": 1215
          },
          {
            "text": "\tif ( empty( $video_id ) ) {",
            "lineNumber": 1216
          },
          {
            "text": "\t\treturn '';",
            "lineNumber": 1217
          },
          {
            "text": "\t}",
            "lineNumber": 1218
          },
          {
            "lineNumber": 1219
          },
          {
            "text": "\treturn 'https://www.youtube.com/watch?v=' . $video_id;",
            "lineNumber": 1220
          },
          {
            "text": "}",
            "lineNumber": 1221
          },
          {
            "lineNumber": 1222
          },
          {
            "text": "/**",
            "lineNumber": 1223
          },
          {
            "text": " * invp_have_carfax_report",
            "lineNumber": 1224
          },
          {
            "text": " *",
            "lineNumber": 1225
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1226
          },
          {
            "text": " * @return bool",
            "lineNumber": 1227
          },
          {
            "text": " */",
            "lineNumber": 1228
          },
          {
            "text": "function invp_have_carfax_report( $post_ID = null ) {",
            "lineNumber": 1229
          },
          {
            "text": "\treturn ! empty( INVP::get_meta( 'carfax_have_report', $post_ID ) );",
            "lineNumber": 1230
          },
          {
            "text": "}",
            "lineNumber": 1231
          },
          {
            "lineNumber": 1232
          },
          {
            "text": "/**",
            "lineNumber": 1233
          },
          {
            "text": " * Is this vehicle a boat?",
            "lineNumber": 1234
          },
          {
            "text": " *",
            "lineNumber": 1235
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1236
          },
          {
            "text": " * @return bool True if this vehicle's type is boat.",
            "lineNumber": 1237
          },
          {
            "text": " */",
            "lineNumber": 1238
          },
          {
            "text": "function invp_is_boat( $post_ID = null ) {",
            "lineNumber": 1239
          },
          {
            "text": "\treturn 'boat' === strtolower( invp_get_the_type( $post_ID ) );",
            "lineNumber": 1240
          },
          {
            "text": "}",
            "lineNumber": 1241
          }
        ]
      },
      "score": 0.30298081040382385
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-invp.php",
        "range": {
          "startPosition": {
            "line": 431,
            "column": 4
          },
          "endPosition": {
            "line": 493
          }
        },
        "contents": "// No, we're done with this location.\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$phones[] = array(\n\t\t\t\t'uid'         =&gt; $term_meta[ 'phone_' . $p . '_uid' ][0],\n\t\t\t\t'description' =&gt; self::meta_array_value_single( $term_meta, 'phone_' . $p . '_description' ),\n\t\t\t\t'number'      =&gt; self::meta_array_value_single( $term_meta, 'phone_' . $p . '_number' ),\n\t\t\t);\n\t\t}\n\t\treturn $phones;\n\t}\n\n\t/**\n\t * Checks if there are both 'new' and 'used' vehicles in the inventory.\n\t *\n\t * @return bool True if both new and used vehicles exist, false otherwise.\n\t */\n\tpublic static function have_new_and_used_vehicles() {\n\t\t$new_query  = new WP_Query(\n\t\t\tarray(\n\t\t\t\t'post_type'      =&gt; self::POST_TYPE,\n\t\t\t\t'post_status'    =&gt; 'publish',\n\t\t\t\t'posts_per_page' =&gt; 1,\n\t\t\t\t'tax_query'      =&gt; array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' =&gt; 'condition',\n\t\t\t\t\t\t'field'    =&gt; 'slug',\n\t\t\t\t\t\t'terms'    =&gt; 'new',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$used_query = new WP_Query(\n\t\t\tarray(\n\t\t\t\t'post_type'      =&gt; self::POST_TYPE,\n\t\t\t\t'post_status'    =&gt; 'publish',\n\t\t\t\t'posts_per_page' =&gt; 1,\n\t\t\t\t'tax_query'      =&gt; array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' =&gt; 'condition',\n\t\t\t\t\t\t'field'    =&gt; 'slug',\n\t\t\t\t\t\t'terms'    =&gt; 'used',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\treturn ( $new_query-&gt;have_posts() &amp;&amp; $used_query-&gt;have_posts() );\n\t}\n\n\t/**\n\t * This is an array of the post meta keys this object uses. These keys\n\t * must be prefixed by an apply_filters() call before use.\n\t *\n\t * @return array An array of the post meta keys this vehicle object uses\n\t */\n\tpublic static function keys() {\n\t\treturn array_column( self::keys_and_types(), 'name' );\n\t}\n\n\t/**\n\t * Produces an array of arrays that define all the meta fields that",
        "signatures": {},
        "detailedLines": [
          {
            "text": "// No, we're done with this location.",
            "lineNumber": 432
          },
          {
            "text": "\t\t\t\tbreak;",
            "lineNumber": 433
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 434
          },
          {
            "lineNumber": 435
          },
          {
            "text": "\t\t\t$phones[] = array(",
            "lineNumber": 436
          },
          {
            "text": "\t\t\t\t'uid'         =&gt; $term_meta[ 'phone_' . $p . '_uid' ][0],",
            "lineNumber": 437
          },
          {
            "text": "\t\t\t\t'description' =&gt; self::meta_array_value_single( $term_meta, 'phone_' . $p . '_description' ),",
            "lineNumber": 438
          },
          {
            "text": "\t\t\t\t'number'      =&gt; self::meta_array_value_single( $term_meta, 'phone_' . $p . '_number' ),",
            "lineNumber": 439
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 440
          },
          {
            "text": "\t\t}",
            "lineNumber": 441
          },
          {
            "text": "\t\treturn $phones;",
            "lineNumber": 442
          },
          {
            "text": "\t}",
            "lineNumber": 443
          },
          {
            "lineNumber": 444
          },
          {
            "text": "\t/**",
            "lineNumber": 445
          },
          {
            "text": "\t * Checks if there are both 'new' and 'used' vehicles in the inventory.",
            "lineNumber": 446
          },
          {
            "text": "\t *",
            "lineNumber": 447
          },
          {
            "text": "\t * @return bool True if both new and used vehicles exist, false otherwise.",
            "lineNumber": 448
          },
          {
            "text": "\t */",
            "lineNumber": 449
          },
          {
            "text": "\tpublic static function have_new_and_used_vehicles() {",
            "lineNumber": 450
          },
          {
            "text": "\t\t$new_query  = new WP_Query(",
            "lineNumber": 451
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 452
          },
          {
            "text": "\t\t\t\t'post_type'      =&gt; self::POST_TYPE,",
            "lineNumber": 453
          },
          {
            "text": "\t\t\t\t'post_status'    =&gt; 'publish',",
            "lineNumber": 454
          },
          {
            "text": "\t\t\t\t'posts_per_page' =&gt; 1,",
            "lineNumber": 455
          },
          {
            "text": "\t\t\t\t'tax_query'      =&gt; array(",
            "lineNumber": 456
          },
          {
            "text": "\t\t\t\t\tarray(",
            "lineNumber": 457
          },
          {
            "text": "\t\t\t\t\t\t'taxonomy' =&gt; 'condition',",
            "lineNumber": 458
          },
          {
            "text": "\t\t\t\t\t\t'field'    =&gt; 'slug',",
            "lineNumber": 459
          },
          {
            "text": "\t\t\t\t\t\t'terms'    =&gt; 'new',",
            "lineNumber": 460
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 461
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 462
          },
          {
            "text": "\t\t\t)",
            "lineNumber": 463
          },
          {
            "text": "\t\t);",
            "lineNumber": 464
          },
          {
            "text": "\t\t$used_query = new WP_Query(",
            "lineNumber": 465
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 466
          },
          {
            "text": "\t\t\t\t'post_type'      =&gt; self::POST_TYPE,",
            "lineNumber": 467
          },
          {
            "text": "\t\t\t\t'post_status'    =&gt; 'publish',",
            "lineNumber": 468
          },
          {
            "text": "\t\t\t\t'posts_per_page' =&gt; 1,",
            "lineNumber": 469
          },
          {
            "text": "\t\t\t\t'tax_query'      =&gt; array(",
            "lineNumber": 470
          },
          {
            "text": "\t\t\t\t\tarray(",
            "lineNumber": 471
          },
          {
            "text": "\t\t\t\t\t\t'taxonomy' =&gt; 'condition',",
            "lineNumber": 472
          },
          {
            "text": "\t\t\t\t\t\t'field'    =&gt; 'slug',",
            "lineNumber": 473
          },
          {
            "text": "\t\t\t\t\t\t'terms'    =&gt; 'used',",
            "lineNumber": 474
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 475
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 476
          },
          {
            "text": "\t\t\t)",
            "lineNumber": 477
          },
          {
            "text": "\t\t);",
            "lineNumber": 478
          },
          {
            "text": "\t\treturn ( $new_query-&gt;have_posts() &amp;&amp; $used_query-&gt;have_posts() );",
            "lineNumber": 479
          },
          {
            "text": "\t}",
            "lineNumber": 480
          },
          {
            "lineNumber": 481
          },
          {
            "text": "\t/**",
            "lineNumber": 482
          },
          {
            "text": "\t * This is an array of the post meta keys this object uses. These keys",
            "lineNumber": 483
          },
          {
            "text": "\t * must be prefixed by an apply_filters() call before use.",
            "lineNumber": 484
          },
          {
            "text": "\t *",
            "lineNumber": 485
          },
          {
            "text": "\t * @return array An array of the post meta keys this vehicle object uses",
            "lineNumber": 486
          },
          {
            "text": "\t */",
            "lineNumber": 487
          },
          {
            "text": "\tpublic static function keys() {",
            "lineNumber": 488
          },
          {
            "text": "\t\treturn array_column( self::keys_and_types(), 'name' );",
            "lineNumber": 489
          },
          {
            "text": "\t}",
            "lineNumber": 490
          },
          {
            "lineNumber": 491
          },
          {
            "text": "\t/**",
            "lineNumber": 492
          },
          {
            "text": "\t * Produces an array of arrays that define all the meta fields that",
            "lineNumber": 493
          }
        ]
      },
      "score": 0.2976889908313751
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/integrations/class-gravityforms-field-vehicle.php",
        "range": {
          "startPosition": {},
          "endPosition": {
            "line": 85
          }
        },
        "contents": "&lt;?php\n/**\n * Gravity Forms Field Vehicle\n *\n * @package inventory-presser\n */\n\ndefined( 'ABSPATH' ) || exit;\n\nif ( class_exists( 'GF_Field' ) ) {\n\n\t/**\n\t * GF_Field_Vehicle\n\t */\n\tclass GF_Field_Vehicle extends GF_Field {\n\n\t\t/**\n\t\t * Field type.\n\t\t *\n\t\t * @var string\n\t\t */\n\t\tpublic $type = 'invp_vehicle';\n\n\t\t/**\n\t\t * Returns the field title.\n\t\t *\n\t\t * @return string\n\t\t */\n\t\tpublic function get_form_editor_field_title() {\n\t\t\treturn esc_attr__( 'Vehicle', 'inventory-presser' );\n\t\t}\n\n\t\t/**\n\t\t * Returns the field button properties for the form editor. The array\n\t\t * contains two elements:\n\t\t * 'group' =&gt; 'standard_fields'|'advanced_fields'|'post_fields'|'pricing_fields'\n\t\t * 'text'  =&gt; 'Button text'\n\t\t *\n\t\t * @since 2.4\n\t\t *\n\t\t * @return array\n\t\t */\n\t\tpublic function get_form_editor_button() {\n\t\t\treturn array(\n\t\t\t\t'group' =&gt; 'advanced_fields',\n\t\t\t\t'text'  =&gt; $this-&gt;get_form_editor_field_title(),\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Adds conditional logic support.\n\t\t *\n\t\t * @return bool\n\t\t */\n\t\tpublic function is_conditional_logic_supported() {\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n\t\t * Returns the field's form editor description.\n\t\t *\n\t\t * @return string\n\t\t */\n\t\tpublic function get_form_editor_field_description() {\n\t\t\treturn esc_attr__( 'Allows users to select one vehicle from a list. Hidden field on vehicle details pages.', 'inventory-presser' );\n\t\t}\n\n\t\t/**\n\t\t * Returns the field's form editor icon.\n\t\t *\n\t\t * @return string\n\t\t */\n\t\tpublic function get_form_editor_field_icon() {\n\t\t\treturn 'gform-icon--shipping'; // Truck icon.\n\t\t}\n\n\t\t/**\n\t\t * The class names of the settings which should be available on the field in\n\t\t * the form editor.\n\t\t *\n\t\t * @return array\n\t\t */\n\t\tpublic function get_form_editor_field_settings() {\n\t\t\treturn array(\n\t\t\t\t'conditional_logic_field_setting',",
        "signatures": {},
        "detailedLines": [
          {
            "text": "&lt;?php",
            "lineNumber": 1
          },
          {
            "text": "/**",
            "lineNumber": 2
          },
          {
            "text": " * Gravity Forms Field Vehicle",
            "lineNumber": 3
          },
          {
            "text": " *",
            "lineNumber": 4
          },
          {
            "text": " * @package inventory-presser",
            "lineNumber": 5
          },
          {
            "text": " */",
            "lineNumber": 6
          },
          {
            "lineNumber": 7
          },
          {
            "text": "defined( 'ABSPATH' ) || exit;",
            "lineNumber": 8
          },
          {
            "lineNumber": 9
          },
          {
            "text": "if ( class_exists( 'GF_Field' ) ) {",
            "lineNumber": 10
          },
          {
            "lineNumber": 11
          },
          {
            "text": "\t/**",
            "lineNumber": 12
          },
          {
            "text": "\t * GF_Field_Vehicle",
            "lineNumber": 13
          },
          {
            "text": "\t */",
            "lineNumber": 14
          },
          {
            "text": "\tclass GF_Field_Vehicle extends GF_Field {",
            "lineNumber": 15
          },
          {
            "lineNumber": 16
          },
          {
            "text": "\t\t/**",
            "lineNumber": 17
          },
          {
            "text": "\t\t * Field type.",
            "lineNumber": 18
          },
          {
            "text": "\t\t *",
            "lineNumber": 19
          },
          {
            "text": "\t\t * @var string",
            "lineNumber": 20
          },
          {
            "text": "\t\t */",
            "lineNumber": 21
          },
          {
            "text": "\t\tpublic $type = 'invp_vehicle';",
            "lineNumber": 22
          },
          {
            "lineNumber": 23
          },
          {
            "text": "\t\t/**",
            "lineNumber": 24
          },
          {
            "text": "\t\t * Returns the field title.",
            "lineNumber": 25
          },
          {
            "text": "\t\t *",
            "lineNumber": 26
          },
          {
            "text": "\t\t * @return string",
            "lineNumber": 27
          },
          {
            "text": "\t\t */",
            "lineNumber": 28
          },
          {
            "text": "\t\tpublic function get_form_editor_field_title() {",
            "lineNumber": 29
          },
          {
            "text": "\t\t\treturn esc_attr__( 'Vehicle', 'inventory-presser' );",
            "lineNumber": 30
          },
          {
            "text": "\t\t}",
            "lineNumber": 31
          },
          {
            "lineNumber": 32
          },
          {
            "text": "\t\t/**",
            "lineNumber": 33
          },
          {
            "text": "\t\t * Returns the field button properties for the form editor. The array",
            "lineNumber": 34
          },
          {
            "text": "\t\t * contains two elements:",
            "lineNumber": 35
          },
          {
            "text": "\t\t * 'group' =&gt; 'standard_fields'|'advanced_fields'|'post_fields'|'pricing_fields'",
            "lineNumber": 36
          },
          {
            "text": "\t\t * 'text'  =&gt; 'Button text'",
            "lineNumber": 37
          },
          {
            "text": "\t\t *",
            "lineNumber": 38
          },
          {
            "text": "\t\t * @since 2.4",
            "lineNumber": 39
          },
          {
            "text": "\t\t *",
            "lineNumber": 40
          },
          {
            "text": "\t\t * @return array",
            "lineNumber": 41
          },
          {
            "text": "\t\t */",
            "lineNumber": 42
          },
          {
            "text": "\t\tpublic function get_form_editor_button() {",
            "lineNumber": 43
          },
          {
            "text": "\t\t\treturn array(",
            "lineNumber": 44
          },
          {
            "text": "\t\t\t\t'group' =&gt; 'advanced_fields',",
            "lineNumber": 45
          },
          {
            "text": "\t\t\t\t'text'  =&gt; $this-&gt;get_form_editor_field_title(),",
            "lineNumber": 46
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 47
          },
          {
            "text": "\t\t}",
            "lineNumber": 48
          },
          {
            "lineNumber": 49
          },
          {
            "text": "\t\t/**",
            "lineNumber": 50
          },
          {
            "text": "\t\t * Adds conditional logic support.",
            "lineNumber": 51
          },
          {
            "text": "\t\t *",
            "lineNumber": 52
          },
          {
            "text": "\t\t * @return bool",
            "lineNumber": 53
          },
          {
            "text": "\t\t */",
            "lineNumber": 54
          },
          {
            "text": "\t\tpublic function is_conditional_logic_supported() {",
            "lineNumber": 55
          },
          {
            "text": "\t\t\treturn true;",
            "lineNumber": 56
          },
          {
            "text": "\t\t}",
            "lineNumber": 57
          },
          {
            "lineNumber": 58
          },
          {
            "text": "\t\t/**",
            "lineNumber": 59
          },
          {
            "text": "\t\t * Returns the field's form editor description.",
            "lineNumber": 60
          },
          {
            "text": "\t\t *",
            "lineNumber": 61
          },
          {
            "text": "\t\t * @return string",
            "lineNumber": 62
          },
          {
            "text": "\t\t */",
            "lineNumber": 63
          },
          {
            "text": "\t\tpublic function get_form_editor_field_description() {",
            "lineNumber": 64
          },
          {
            "text": "\t\t\treturn esc_attr__( 'Allows users to select one vehicle from a list. Hidden field on vehicle details pages.', 'inventory-presser' );",
            "lineNumber": 65
          },
          {
            "text": "\t\t}",
            "lineNumber": 66
          },
          {
            "lineNumber": 67
          },
          {
            "text": "\t\t/**",
            "lineNumber": 68
          },
          {
            "text": "\t\t * Returns the field's form editor icon.",
            "lineNumber": 69
          },
          {
            "text": "\t\t *",
            "lineNumber": 70
          },
          {
            "text": "\t\t * @return string",
            "lineNumber": 71
          },
          {
            "text": "\t\t */",
            "lineNumber": 72
          },
          {
            "text": "\t\tpublic function get_form_editor_field_icon() {",
            "lineNumber": 73
          },
          {
            "text": "\t\t\treturn 'gform-icon--shipping'; // Truck icon.",
            "lineNumber": 74
          },
          {
            "text": "\t\t}",
            "lineNumber": 75
          },
          {
            "lineNumber": 76
          },
          {
            "text": "\t\t/**",
            "lineNumber": 77
          },
          {
            "text": "\t\t * The class names of the settings which should be available on the field in",
            "lineNumber": 78
          },
          {
            "text": "\t\t * the form editor.",
            "lineNumber": 79
          },
          {
            "text": "\t\t *",
            "lineNumber": 80
          },
          {
            "text": "\t\t * @return array",
            "lineNumber": 81
          },
          {
            "text": "\t\t */",
            "lineNumber": 82
          },
          {
            "text": "\t\tpublic function get_form_editor_field_settings() {",
            "lineNumber": 83
          },
          {
            "text": "\t\t\treturn array(",
            "lineNumber": 84
          },
          {
            "text": "\t\t\t\t'conditional_logic_field_setting',",
            "lineNumber": 85
          }
        ]
      },
      "score": 0.29644960165023804
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/template-tags.php",
        "range": {
          "startPosition": {
            "line": 169
          },
          "endPosition": {
            "line": 237
          }
        },
        "contents": "/**\n * Template tag. Returns the condition of the boat, usually \"Excellent\" or \"Good\".\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_condition_boat( $post_ID = null ) {\n\treturn INVP::get_meta( 'condition_boat', $post_ID );\n}\n\n/**\n * invp_get_the_dealer_id\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_dealer_id( $post_ID = null ) {\n\treturn INVP::get_meta( 'dealer_id', $post_ID );\n}\n\n/**\n * invp_get_the_description\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_description( $post_ID = null ) {\n\treturn INVP::get_meta( 'description', $post_ID );\n}\n\n/**\n * invp_get_the_doors\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_doors( $post_ID = null ) {\n\t$value = INVP::get_meta( 'doors', $post_ID );\n\treturn 0 === (int) $value ? '' : $value;\n}\n\n/**\n * invp_get_the_down_payment\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_down_payment( $post_ID = null ) {\n\t$down_payment = INVP::get_meta( 'down_payment', $post_ID );\n\tif ( empty( $down_payment ) ) {\n\t\treturn '';\n\t}\n\n\treturn INVP::currency_symbol() . number_format( $down_payment, 0, '.', ',' );\n}\n\n/**\n * invp_get_the_draft\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_draft( $post_ID = null ) {\n\treturn INVP::get_meta( 'draft', $post_ID );\n}\n\n/**\n * Template tag. Returns the drive type, or a description of how many driven",
        "signatures": {},
        "detailedLines": [
          {
            "text": "/**",
            "lineNumber": 170
          },
          {
            "text": " * Template tag. Returns the condition of the boat, usually \"Excellent\" or \"Good\".",
            "lineNumber": 171
          },
          {
            "text": " *",
            "lineNumber": 172
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 173
          },
          {
            "text": " * @return string",
            "lineNumber": 174
          },
          {
            "text": " */",
            "lineNumber": 175
          },
          {
            "text": "function invp_get_the_condition_boat( $post_ID = null ) {",
            "lineNumber": 176
          },
          {
            "text": "\treturn INVP::get_meta( 'condition_boat', $post_ID );",
            "lineNumber": 177
          },
          {
            "text": "}",
            "lineNumber": 178
          },
          {
            "lineNumber": 179
          },
          {
            "text": "/**",
            "lineNumber": 180
          },
          {
            "text": " * invp_get_the_dealer_id",
            "lineNumber": 181
          },
          {
            "text": " *",
            "lineNumber": 182
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 183
          },
          {
            "text": " * @return string",
            "lineNumber": 184
          },
          {
            "text": " */",
            "lineNumber": 185
          },
          {
            "text": "function invp_get_the_dealer_id( $post_ID = null ) {",
            "lineNumber": 186
          },
          {
            "text": "\treturn INVP::get_meta( 'dealer_id', $post_ID );",
            "lineNumber": 187
          },
          {
            "text": "}",
            "lineNumber": 188
          },
          {
            "lineNumber": 189
          },
          {
            "text": "/**",
            "lineNumber": 190
          },
          {
            "text": " * invp_get_the_description",
            "lineNumber": 191
          },
          {
            "text": " *",
            "lineNumber": 192
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 193
          },
          {
            "text": " * @return string",
            "lineNumber": 194
          },
          {
            "text": " */",
            "lineNumber": 195
          },
          {
            "text": "function invp_get_the_description( $post_ID = null ) {",
            "lineNumber": 196
          },
          {
            "text": "\treturn INVP::get_meta( 'description', $post_ID );",
            "lineNumber": 197
          },
          {
            "text": "}",
            "lineNumber": 198
          },
          {
            "lineNumber": 199
          },
          {
            "text": "/**",
            "lineNumber": 200
          },
          {
            "text": " * invp_get_the_doors",
            "lineNumber": 201
          },
          {
            "text": " *",
            "lineNumber": 202
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 203
          },
          {
            "text": " * @return string",
            "lineNumber": 204
          },
          {
            "text": " */",
            "lineNumber": 205
          },
          {
            "text": "function invp_get_the_doors( $post_ID = null ) {",
            "lineNumber": 206
          },
          {
            "text": "\t$value = INVP::get_meta( 'doors', $post_ID );",
            "lineNumber": 207
          },
          {
            "text": "\treturn 0 === (int) $value ? '' : $value;",
            "lineNumber": 208
          },
          {
            "text": "}",
            "lineNumber": 209
          },
          {
            "lineNumber": 210
          },
          {
            "text": "/**",
            "lineNumber": 211
          },
          {
            "text": " * invp_get_the_down_payment",
            "lineNumber": 212
          },
          {
            "text": " *",
            "lineNumber": 213
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 214
          },
          {
            "text": " * @return string",
            "lineNumber": 215
          },
          {
            "text": " */",
            "lineNumber": 216
          },
          {
            "text": "function invp_get_the_down_payment( $post_ID = null ) {",
            "lineNumber": 217
          },
          {
            "text": "\t$down_payment = INVP::get_meta( 'down_payment', $post_ID );",
            "lineNumber": 218
          },
          {
            "text": "\tif ( empty( $down_payment ) ) {",
            "lineNumber": 219
          },
          {
            "text": "\t\treturn '';",
            "lineNumber": 220
          },
          {
            "text": "\t}",
            "lineNumber": 221
          },
          {
            "lineNumber": 222
          },
          {
            "text": "\treturn INVP::currency_symbol() . number_format( $down_payment, 0, '.', ',' );",
            "lineNumber": 223
          },
          {
            "text": "}",
            "lineNumber": 224
          },
          {
            "lineNumber": 225
          },
          {
            "text": "/**",
            "lineNumber": 226
          },
          {
            "text": " * invp_get_the_draft",
            "lineNumber": 227
          },
          {
            "text": " *",
            "lineNumber": 228
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 229
          },
          {
            "text": " * @return string",
            "lineNumber": 230
          },
          {
            "text": " */",
            "lineNumber": 231
          },
          {
            "text": "function invp_get_the_draft( $post_ID = null ) {",
            "lineNumber": 232
          },
          {
            "text": "\treturn INVP::get_meta( 'draft', $post_ID );",
            "lineNumber": 233
          },
          {
            "text": "}",
            "lineNumber": 234
          },
          {
            "lineNumber": 235
          },
          {
            "text": "/**",
            "lineNumber": 236
          },
          {
            "text": " * Template tag. Returns the drive type, or a description of how many driven",
            "lineNumber": 237
          }
        ]
      },
      "score": 0.2915058135986328
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-taxonomies.php",
        "range": {
          "startPosition": {
            "line": 229
          },
          "endPosition": {
            "line": 286,
            "column": 2
          }
        },
        "contents": "\t\t\tesc_html__( 'Manage', 'inventory-presser' )\n\t\t);\n\t}\n\n\t/**\n\t * Outputs HTML that renders a meta box for the type taxonomy\n\t *\n\t * @param  WP_Post $post Current post object.\n\t * @return void\n\t */\n\tpublic static function meta_box_html_type( $post ) {\n\t\t$taxonomy = 'type';\n\t\t$html     = sprintf(\n\t\t\t'%1$s &lt;a href=\"edit-tags.php?taxonomy=%2$s&amp;post_type=%3$s\"&gt;%4$s&lt;/a&gt;',\n\t\t\tself::taxonomy_meta_box_html( $taxonomy, apply_filters( 'invp_prefix_meta_key', $taxonomy ), $post ),\n\t\t\tesc_attr( $taxonomy ),\n\t\t\tesc_attr( INVP::POST_TYPE ),\n\t\t\tesc_html__( 'Manage', 'inventory-presser' )\n\t\t);\n\t\t// add an onchange attribute to the select.\n\t\t$html = str_replace( '&lt;select', '&lt;select onchange=\"invp_vehicle_type_changed( this.value );\" ', $html );\n\t\techo $html;\n\t}\n\n\t/**\n\t * Populate our taxonomies with terms if they do not already exist\n\t *\n\t * @return void\n\t */\n\tpublic static function populate_default_terms() {\n\t\t// create the taxonomies or else our wp_insert_term calls will fail.\n\t\tself::register_taxonomies();\n\n\t\t$taxonomy_data = self::taxonomy_data();\n\t\t$count         = count( $taxonomy_data );\n\t\tfor ( $i = 0; $i &lt; $count; $i++ ) {\n\t\t\tif ( ! isset( $taxonomy_data[ $i ]['term_data'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ( $taxonomy_data[ $i ]['term_data'] as $abbr =&gt; $desc ) {\n\t\t\t\t$taxonomy_name = str_replace( '-', '_', $taxonomy_data[ $i ]['args']['query_var'] ?? '' );\n\t\t\t\tif ( ! is_array( term_exists( $desc, $taxonomy_name ) ) ) {\n\t\t\t\t\t$term_exists = wp_insert_term(\n\t\t\t\t\t\t$desc,\n\t\t\t\t\t\t$taxonomy_name,\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'description' =&gt; $desc,\n\t\t\t\t\t\t\t'slug'        =&gt; $abbr,\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/**\n\t ",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\tesc_html__( 'Manage', 'inventory-presser' )",
            "lineNumber": 230
          },
          {
            "text": "\t\t);",
            "lineNumber": 231
          },
          {
            "text": "\t}",
            "lineNumber": 232
          },
          {
            "lineNumber": 233
          },
          {
            "text": "\t/**",
            "lineNumber": 234
          },
          {
            "text": "\t * Outputs HTML that renders a meta box for the type taxonomy",
            "lineNumber": 235
          },
          {
            "text": "\t *",
            "lineNumber": 236
          },
          {
            "text": "\t * @param  WP_Post $post Current post object.",
            "lineNumber": 237
          },
          {
            "text": "\t * @return void",
            "lineNumber": 238
          },
          {
            "text": "\t */",
            "lineNumber": 239
          },
          {
            "text": "\tpublic static function meta_box_html_type( $post ) {",
            "lineNumber": 240
          },
          {
            "text": "\t\t$taxonomy = 'type';",
            "lineNumber": 241
          },
          {
            "text": "\t\t$html     = sprintf(",
            "lineNumber": 242
          },
          {
            "text": "\t\t\t'%1$s &lt;a href=\"edit-tags.php?taxonomy=%2$s&amp;post_type=%3$s\"&gt;%4$s&lt;/a&gt;',",
            "lineNumber": 243
          },
          {
            "text": "\t\t\tself::taxonomy_meta_box_html( $taxonomy, apply_filters( 'invp_prefix_meta_key', $taxonomy ), $post ),",
            "lineNumber": 244
          },
          {
            "text": "\t\t\tesc_attr( $taxonomy ),",
            "lineNumber": 245
          },
          {
            "text": "\t\t\tesc_attr( INVP::POST_TYPE ),",
            "lineNumber": 246
          },
          {
            "text": "\t\t\tesc_html__( 'Manage', 'inventory-presser' )",
            "lineNumber": 247
          },
          {
            "text": "\t\t);",
            "lineNumber": 248
          },
          {
            "text": "\t\t// add an onchange attribute to the select.",
            "lineNumber": 249
          },
          {
            "text": "\t\t$html = str_replace( '&lt;select', '&lt;select onchange=\"invp_vehicle_type_changed( this.value );\" ', $html );",
            "lineNumber": 250
          },
          {
            "text": "\t\techo $html;",
            "lineNumber": 251
          },
          {
            "text": "\t}",
            "lineNumber": 252
          },
          {
            "lineNumber": 253
          },
          {
            "text": "\t/**",
            "lineNumber": 254
          },
          {
            "text": "\t * Populate our taxonomies with terms if they do not already exist",
            "lineNumber": 255
          },
          {
            "text": "\t *",
            "lineNumber": 256
          },
          {
            "text": "\t * @return void",
            "lineNumber": 257
          },
          {
            "text": "\t */",
            "lineNumber": 258
          },
          {
            "text": "\tpublic static function populate_default_terms() {",
            "lineNumber": 259
          },
          {
            "text": "\t\t// create the taxonomies or else our wp_insert_term calls will fail.",
            "lineNumber": 260
          },
          {
            "text": "\t\tself::register_taxonomies();",
            "lineNumber": 261
          },
          {
            "lineNumber": 262
          },
          {
            "text": "\t\t$taxonomy_data = self::taxonomy_data();",
            "lineNumber": 263
          },
          {
            "text": "\t\t$count         = count( $taxonomy_data );",
            "lineNumber": 264
          },
          {
            "text": "\t\tfor ( $i = 0; $i &lt; $count; $i++ ) {",
            "lineNumber": 265
          },
          {
            "text": "\t\t\tif ( ! isset( $taxonomy_data[ $i ]['term_data'] ) ) {",
            "lineNumber": 266
          },
          {
            "text": "\t\t\t\tcontinue;",
            "lineNumber": 267
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 268
          },
          {
            "lineNumber": 269
          },
          {
            "text": "\t\t\tforeach ( $taxonomy_data[ $i ]['term_data'] as $abbr =&gt; $desc ) {",
            "lineNumber": 270
          },
          {
            "text": "\t\t\t\t$taxonomy_name = str_replace( '-', '_', $taxonomy_data[ $i ]['args']['query_var'] ?? '' );",
            "lineNumber": 271
          },
          {
            "text": "\t\t\t\tif ( ! is_array( term_exists( $desc, $taxonomy_name ) ) ) {",
            "lineNumber": 272
          },
          {
            "text": "\t\t\t\t\t$term_exists = wp_insert_term(",
            "lineNumber": 273
          },
          {
            "text": "\t\t\t\t\t\t$desc,",
            "lineNumber": 274
          },
          {
            "text": "\t\t\t\t\t\t$taxonomy_name,",
            "lineNumber": 275
          },
          {
            "text": "\t\t\t\t\t\tarray(",
            "lineNumber": 276
          },
          {
            "text": "\t\t\t\t\t\t\t'description' =&gt; $desc,",
            "lineNumber": 277
          },
          {
            "text": "\t\t\t\t\t\t\t'slug'        =&gt; $abbr,",
            "lineNumber": 278
          },
          {
            "text": "\t\t\t\t\t\t)",
            "lineNumber": 279
          },
          {
            "text": "\t\t\t\t\t);",
            "lineNumber": 280
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 281
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 282
          },
          {
            "text": "\t\t}",
            "lineNumber": 283
          },
          {
            "text": "\t}",
            "lineNumber": 284
          },
          {
            "lineNumber": 285
          },
          {
            "text": "\t/**",
            "lineNumber": 286
          },
          {
            "text": "\t ",
            "lineNumber": 287
          }
        ]
      },
      "score": 0.28651881217956543
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/template-tags.php",
        "range": {
          "startPosition": {
            "line": 1293
          },
          "endPosition": {
            "line": 1317
          }
        },
        "contents": "}\n\n/**\n * Returns true if this vehicle is used.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool\n */\nfunction invp_is_used( $post_ID = null ) {\n\tif ( empty( $post_ID ) ) {\n\t\t$post_ID = get_the_ID();\n\t}\n\treturn has_term( 'used', 'condition', $post_ID );\n}\n\n/**\n * Returns true if this vehicle is marked wholesale.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return bool\n */\nfunction invp_is_wholesale( $post_ID = null ) {\n\treturn false !== strpos( strtolower( INVP::get_meta( 'availability', $post_ID ) ) ?? '', 'wholesale' );\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "}",
            "lineNumber": 1294
          },
          {
            "lineNumber": 1295
          },
          {
            "text": "/**",
            "lineNumber": 1296
          },
          {
            "text": " * Returns true if this vehicle is used.",
            "lineNumber": 1297
          },
          {
            "text": " *",
            "lineNumber": 1298
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1299
          },
          {
            "text": " * @return bool",
            "lineNumber": 1300
          },
          {
            "text": " */",
            "lineNumber": 1301
          },
          {
            "text": "function invp_is_used( $post_ID = null ) {",
            "lineNumber": 1302
          },
          {
            "text": "\tif ( empty( $post_ID ) ) {",
            "lineNumber": 1303
          },
          {
            "text": "\t\t$post_ID = get_the_ID();",
            "lineNumber": 1304
          },
          {
            "text": "\t}",
            "lineNumber": 1305
          },
          {
            "text": "\treturn has_term( 'used', 'condition', $post_ID );",
            "lineNumber": 1306
          },
          {
            "text": "}",
            "lineNumber": 1307
          },
          {
            "lineNumber": 1308
          },
          {
            "text": "/**",
            "lineNumber": 1309
          },
          {
            "text": " * Returns true if this vehicle is marked wholesale.",
            "lineNumber": 1310
          },
          {
            "text": " *",
            "lineNumber": 1311
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 1312
          },
          {
            "text": " * @return bool",
            "lineNumber": 1313
          },
          {
            "text": " */",
            "lineNumber": 1314
          },
          {
            "text": "function invp_is_wholesale( $post_ID = null ) {",
            "lineNumber": 1315
          },
          {
            "text": "\treturn false !== strpos( strtolower( INVP::get_meta( 'availability', $post_ID ) ) ?? '', 'wholesale' );",
            "lineNumber": 1316
          },
          {
            "text": "}",
            "lineNumber": 1317
          }
        ]
      },
      "score": 0.2859260141849518
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-taxonomies.php",
        "range": {
          "startPosition": {
            "line": 1222
          },
          "endPosition": {
            "line": 1272
          }
        },
        "contents": "\t\t\t$saved_term_slug = self::get_term_slug( $taxonomy_name, $post-&gt;ID );\n\n\t\t\tforeach ( $terms as $term ) {\n\t\t\t\t$html .= sprintf(\n\t\t\t\t\t'&lt;option value=\"%s\"%s&gt;%s&lt;/option&gt;',\n\t\t\t\t\tesc_attr( $term-&gt;slug ),\n\t\t\t\t\tselected( strtolower( $term-&gt;slug ), strtolower( $saved_term_slug ), false ),\n\t\t\t\t\tesc_html( $term-&gt;name )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $html . '&lt;/select&gt;';\n\t}\n\n\t/**\n\t * Uses the type of the vehicle loaded into the editor to show or hide other\n\t * taxonomies.\n\t *\n\t * @return void\n\t */\n\tpublic function editor_remove_meta_boxes() {\n\t\tglobal $wp_meta_boxes;\n\t\tif ( ! isset( $wp_meta_boxes[ INVP::POST_TYPE ]['side']['core'] ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$settings = INVP::settings();\n\t\tif ( empty( $settings['taxonomies'] ) ) {\n\t\t\treturn;\n\t\t}\n\t\t// What is the type of the vehicle we are editing?\n\t\t$type = $this-&gt;get_term_slug( 'type', get_the_ID() );\n\t\tif ( '' === $type ) {\n\t\t\t/**\n\t\t\t * Type not set, or user just pressed \"Add New Vehicle\". Lie so the\n\t\t\t * editor looks ready for a car.\n\t\t\t */\n\t\t\t$type = 'car';\n\t\t}\n\t\tforeach ( self::query_vars_array() as $query_var ) {\n\t\t\t$is_active = $settings['taxonomies'][ $query_var ][ $type ] ?? false;\n\t\t\tif ( ! $is_active ) {\n\t\t\t\t$id = str_replace( '-', '_', $query_var ) . 'div';\n\t\t\t\tif ( 'location' === $query_var ) {\n\t\t\t\t\t$id = 'tagsdiv-location';\n\t\t\t\t}\n\t\t\t\tunset( $wp_meta_boxes[ INVP::POST_TYPE ]['side']['core'][ $id ] );\n\t\t\t}\n\t\t}\n\t}\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t$saved_term_slug = self::get_term_slug( $taxonomy_name, $post-&gt;ID );",
            "lineNumber": 1223
          },
          {
            "lineNumber": 1224
          },
          {
            "text": "\t\t\tforeach ( $terms as $term ) {",
            "lineNumber": 1225
          },
          {
            "text": "\t\t\t\t$html .= sprintf(",
            "lineNumber": 1226
          },
          {
            "text": "\t\t\t\t\t'&lt;option value=\"%s\"%s&gt;%s&lt;/option&gt;',",
            "lineNumber": 1227
          },
          {
            "text": "\t\t\t\t\tesc_attr( $term-&gt;slug ),",
            "lineNumber": 1228
          },
          {
            "text": "\t\t\t\t\tselected( strtolower( $term-&gt;slug ), strtolower( $saved_term_slug ), false ),",
            "lineNumber": 1229
          },
          {
            "text": "\t\t\t\t\tesc_html( $term-&gt;name )",
            "lineNumber": 1230
          },
          {
            "text": "\t\t\t\t);",
            "lineNumber": 1231
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 1232
          },
          {
            "text": "\t\t}",
            "lineNumber": 1233
          },
          {
            "text": "\t\treturn $html . '&lt;/select&gt;';",
            "lineNumber": 1234
          },
          {
            "text": "\t}",
            "lineNumber": 1235
          },
          {
            "lineNumber": 1236
          },
          {
            "text": "\t/**",
            "lineNumber": 1237
          },
          {
            "text": "\t * Uses the type of the vehicle loaded into the editor to show or hide other",
            "lineNumber": 1238
          },
          {
            "text": "\t * taxonomies.",
            "lineNumber": 1239
          },
          {
            "text": "\t *",
            "lineNumber": 1240
          },
          {
            "text": "\t * @return void",
            "lineNumber": 1241
          },
          {
            "text": "\t */",
            "lineNumber": 1242
          },
          {
            "text": "\tpublic function editor_remove_meta_boxes() {",
            "lineNumber": 1243
          },
          {
            "text": "\t\tglobal $wp_meta_boxes;",
            "lineNumber": 1244
          },
          {
            "text": "\t\tif ( ! isset( $wp_meta_boxes[ INVP::POST_TYPE ]['side']['core'] ) ) {",
            "lineNumber": 1245
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 1246
          },
          {
            "text": "\t\t}",
            "lineNumber": 1247
          },
          {
            "text": "\t\t$settings = INVP::settings();",
            "lineNumber": 1248
          },
          {
            "text": "\t\tif ( empty( $settings['taxonomies'] ) ) {",
            "lineNumber": 1249
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 1250
          },
          {
            "text": "\t\t}",
            "lineNumber": 1251
          },
          {
            "text": "\t\t// What is the type of the vehicle we are editing?",
            "lineNumber": 1252
          },
          {
            "text": "\t\t$type = $this-&gt;get_term_slug( 'type', get_the_ID() );",
            "lineNumber": 1253
          },
          {
            "text": "\t\tif ( '' === $type ) {",
            "lineNumber": 1254
          },
          {
            "text": "\t\t\t/**",
            "lineNumber": 1255
          },
          {
            "text": "\t\t\t * Type not set, or user just pressed \"Add New Vehicle\". Lie so the",
            "lineNumber": 1256
          },
          {
            "text": "\t\t\t * editor looks ready for a car.",
            "lineNumber": 1257
          },
          {
            "text": "\t\t\t */",
            "lineNumber": 1258
          },
          {
            "text": "\t\t\t$type = 'car';",
            "lineNumber": 1259
          },
          {
            "text": "\t\t}",
            "lineNumber": 1260
          },
          {
            "text": "\t\tforeach ( self::query_vars_array() as $query_var ) {",
            "lineNumber": 1261
          },
          {
            "text": "\t\t\t$is_active = $settings['taxonomies'][ $query_var ][ $type ] ?? false;",
            "lineNumber": 1262
          },
          {
            "text": "\t\t\tif ( ! $is_active ) {",
            "lineNumber": 1263
          },
          {
            "text": "\t\t\t\t$id = str_replace( '-', '_', $query_var ) . 'div';",
            "lineNumber": 1264
          },
          {
            "text": "\t\t\t\tif ( 'location' === $query_var ) {",
            "lineNumber": 1265
          },
          {
            "text": "\t\t\t\t\t$id = 'tagsdiv-location';",
            "lineNumber": 1266
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 1267
          },
          {
            "text": "\t\t\t\tunset( $wp_meta_boxes[ INVP::POST_TYPE ]['side']['core'][ $id ] );",
            "lineNumber": 1268
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 1269
          },
          {
            "text": "\t\t}",
            "lineNumber": 1270
          },
          {
            "text": "\t}",
            "lineNumber": 1271
          },
          {
            "text": "}",
            "lineNumber": 1272
          }
        ]
      },
      "score": 0.284676730632782
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-invp.php",
        "range": {
          "startPosition": {
            "line": 1100,
            "column": 5
          },
          "endPosition": {
            "line": 1166
          }
        },
        "contents": "set_post_thumbnail( $id, $media_id );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\t/**\n\t * Given a $meta array collection of a post's entire meta data, retrieves\n\t * the single or first value stored in $key.\n\t *\n\t * @param  array  $meta\n\t * @param  string $key  A meta key.\n\t * @return string|bool A single meta value or false if the value does not exist\n\t */\n\tprotected static function meta_array_value_single( $meta, $key ) {\n\t\treturn isset( $meta[ $key ][0] ) ? $meta[ $key ][0] : false;\n\t}\n\n\t/**\n\t * Returns the prefix added to all vehicle post meta keys.\n\t *\n\t * @return string The prefix added to all vehicle post meta keys\n\t */\n\tpublic static function meta_prefix() {\n\t\treturn apply_filters( 'invp_meta_prefix', 'inventory_presser_' );\n\t}\n\n\t/**\n\t * Indicates whether or not a provided $post_meta_key is a number data\n\t * type.\n\t *\n\t * @param  string $post_meta_key\n\t * @return bool True if the given $post_meta_key is a number data type.\n\t */\n\tpublic static function meta_value_is_number( $post_meta_key ) {\n\t\tforeach ( self::keys_and_types() as $key_and_type ) {\n\t\t\tif ( apply_filters( 'invp_prefix_meta_key', $key_and_type['name'] ?? '' ) === $post_meta_key ) {\n\t\t\t\treturn 'number' === $key_and_type['type'] ?? '' || 'integer' === $key_and_type['type'] ?? '';\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Provides the option group string that is needed for register_setting()\n\t * calls.\n\t *\n\t * @return string\n\t */\n\tpublic static function option_group() {\n\t\treturn apply_filters( 'invp_option_group', 'dealership_options_option_group' );\n\t}\n\n\t/**\n\t * Provides the option page string that determines where the settings\n\t * sections are rendered.\n\t *\n\t * @return string\n\t */\n\tpublic static function option_page() {\n\t\treturn apply_filters( 'invp_option_page', self::OPTION_PAGE . '-admin' );\n\t}\n\n\t/**\n\t * Creates HTML to help navigate listings pages. \"Older\" and \"Newer\" don't",
        "signatures": {},
        "detailedLines": [
          {
            "text": "set_post_thumbnail( $id, $media_id );",
            "lineNumber": 1101
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 1102
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 1103
          },
          {
            "text": "\t\t}",
            "lineNumber": 1104
          },
          {
            "text": "\t}",
            "lineNumber": 1105
          },
          {
            "lineNumber": 1106
          },
          {
            "lineNumber": 1107
          },
          {
            "text": "\t/**",
            "lineNumber": 1108
          },
          {
            "text": "\t * Given a $meta array collection of a post's entire meta data, retrieves",
            "lineNumber": 1109
          },
          {
            "text": "\t * the single or first value stored in $key.",
            "lineNumber": 1110
          },
          {
            "text": "\t *",
            "lineNumber": 1111
          },
          {
            "text": "\t * @param  array  $meta",
            "lineNumber": 1112
          },
          {
            "text": "\t * @param  string $key  A meta key.",
            "lineNumber": 1113
          },
          {
            "text": "\t * @return string|bool A single meta value or false if the value does not exist",
            "lineNumber": 1114
          },
          {
            "text": "\t */",
            "lineNumber": 1115
          },
          {
            "text": "\tprotected static function meta_array_value_single( $meta, $key ) {",
            "lineNumber": 1116
          },
          {
            "text": "\t\treturn isset( $meta[ $key ][0] ) ? $meta[ $key ][0] : false;",
            "lineNumber": 1117
          },
          {
            "text": "\t}",
            "lineNumber": 1118
          },
          {
            "lineNumber": 1119
          },
          {
            "text": "\t/**",
            "lineNumber": 1120
          },
          {
            "text": "\t * Returns the prefix added to all vehicle post meta keys.",
            "lineNumber": 1121
          },
          {
            "text": "\t *",
            "lineNumber": 1122
          },
          {
            "text": "\t * @return string The prefix added to all vehicle post meta keys",
            "lineNumber": 1123
          },
          {
            "text": "\t */",
            "lineNumber": 1124
          },
          {
            "text": "\tpublic static function meta_prefix() {",
            "lineNumber": 1125
          },
          {
            "text": "\t\treturn apply_filters( 'invp_meta_prefix', 'inventory_presser_' );",
            "lineNumber": 1126
          },
          {
            "text": "\t}",
            "lineNumber": 1127
          },
          {
            "lineNumber": 1128
          },
          {
            "text": "\t/**",
            "lineNumber": 1129
          },
          {
            "text": "\t * Indicates whether or not a provided $post_meta_key is a number data",
            "lineNumber": 1130
          },
          {
            "text": "\t * type.",
            "lineNumber": 1131
          },
          {
            "text": "\t *",
            "lineNumber": 1132
          },
          {
            "text": "\t * @param  string $post_meta_key",
            "lineNumber": 1133
          },
          {
            "text": "\t * @return bool True if the given $post_meta_key is a number data type.",
            "lineNumber": 1134
          },
          {
            "text": "\t */",
            "lineNumber": 1135
          },
          {
            "text": "\tpublic static function meta_value_is_number( $post_meta_key ) {",
            "lineNumber": 1136
          },
          {
            "text": "\t\tforeach ( self::keys_and_types() as $key_and_type ) {",
            "lineNumber": 1137
          },
          {
            "text": "\t\t\tif ( apply_filters( 'invp_prefix_meta_key', $key_and_type['name'] ?? '' ) === $post_meta_key ) {",
            "lineNumber": 1138
          },
          {
            "text": "\t\t\t\treturn 'number' === $key_and_type['type'] ?? '' || 'integer' === $key_and_type['type'] ?? '';",
            "lineNumber": 1139
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 1140
          },
          {
            "text": "\t\t}",
            "lineNumber": 1141
          },
          {
            "text": "\t\treturn false;",
            "lineNumber": 1142
          },
          {
            "text": "\t}",
            "lineNumber": 1143
          },
          {
            "lineNumber": 1144
          },
          {
            "text": "\t/**",
            "lineNumber": 1145
          },
          {
            "text": "\t * Provides the option group string that is needed for register_setting()",
            "lineNumber": 1146
          },
          {
            "text": "\t * calls.",
            "lineNumber": 1147
          },
          {
            "text": "\t *",
            "lineNumber": 1148
          },
          {
            "text": "\t * @return string",
            "lineNumber": 1149
          },
          {
            "text": "\t */",
            "lineNumber": 1150
          },
          {
            "text": "\tpublic static function option_group() {",
            "lineNumber": 1151
          },
          {
            "text": "\t\treturn apply_filters( 'invp_option_group', 'dealership_options_option_group' );",
            "lineNumber": 1152
          },
          {
            "text": "\t}",
            "lineNumber": 1153
          },
          {
            "lineNumber": 1154
          },
          {
            "text": "\t/**",
            "lineNumber": 1155
          },
          {
            "text": "\t * Provides the option page string that determines where the settings",
            "lineNumber": 1156
          },
          {
            "text": "\t * sections are rendered.",
            "lineNumber": 1157
          },
          {
            "text": "\t *",
            "lineNumber": 1158
          },
          {
            "text": "\t * @return string",
            "lineNumber": 1159
          },
          {
            "text": "\t */",
            "lineNumber": 1160
          },
          {
            "text": "\tpublic static function option_page() {",
            "lineNumber": 1161
          },
          {
            "text": "\t\treturn apply_filters( 'invp_option_page', self::OPTION_PAGE . '-admin' );",
            "lineNumber": 1162
          },
          {
            "text": "\t}",
            "lineNumber": 1163
          },
          {
            "lineNumber": 1164
          },
          {
            "text": "\t/**",
            "lineNumber": 1165
          },
          {
            "text": "\t * Creates HTML to help navigate listings pages. \"Older\" and \"Newer\" don't",
            "lineNumber": 1166
          }
        ]
      },
      "score": 0.280714213848114
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./js/editor-sidebar.js",
        "range": {
          "startPosition": {
            "line": 66
          },
          "endPosition": {
            "line": 615
          }
        },
        "contents": "\tfunction titleStatusOptions()\n\t{\n\t\tvar options = [{label:'',value:''}];\n\t\tfor ( var l = 0; l &lt; 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 =&gt; 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 &amp;&amp; '' === 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\t props.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.",
        "signatures": {
          "ranges": [
            {
              "startPosition": {
                "line": 67,
                "column": 1
              },
              "endPosition": {
                "line": 67,
                "column": 1
              }
            }
          ]
        },
        "detailedLines": [
          {
            "text": "\tfunction titleStatusOptions()",
            "lineNumber": 139
          },
          {
            "text": "\t{",
            "lineNumber": 140
          },
          {
            "text": "\t\tvar options = [{label:'',value:''}];",
            "lineNumber": 141
          },
          {
            "text": "\t\tfor ( var l = 0; l &lt; invp.title_statuses.length; l++ ) {",
            "lineNumber": 142
          },
          {
            "text": "\t\t\toptions.push(",
            "lineNumber": 143
          },
          {
            "text": "\t\t\t\t{",
            "lineNumber": 144
          },
          {
            "text": "\t\t\t\t\tlabel: invp.title_statuses[l],",
            "lineNumber": 145
          },
          {
            "text": "\t\t\t\t\tvalue: invp.title_statuses[l]",
            "lineNumber": 146
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 147
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 148
          },
          {
            "text": "\t\t}",
            "lineNumber": 149
          },
          {
            "text": "\t\treturn options;",
            "lineNumber": 150
          },
          {
            "text": "\t}",
            "lineNumber": 151
          },
          {
            "lineNumber": 152
          },
          {
            "text": "\tfunction ucwords( str )",
            "lineNumber": 153
          },
          {
            "text": "\t{",
            "lineNumber": 154
          },
          {
            "text": "\t\treturn (str + '').split( ' ' ).map( x =&gt; x.charAt( 0 ).toUpperCase() + x.substring( 1 ) ).join( ' ' );",
            "lineNumber": 155
          },
          {
            "text": "\t}",
            "lineNumber": 156
          },
          {
            "lineNumber": 157
          },
          {
            "text": "\t// Most text fields.",
            "lineNumber": 158
          },
          {
            "text": "\tvar MetaBlockField = compose(",
            "lineNumber": 159
          },
          {
            "text": "\t\twithDispatch(",
            "lineNumber": 160
          },
          {
            "text": "\t\t\tfunction( dispatch, props ) {",
            "lineNumber": 161
          },
          {
            "text": "\t\t\t\treturn {",
            "lineNumber": 162
          },
          {
            "text": "\t\t\t\t\tsetMetaFieldValue: function( value ) {",
            "lineNumber": 163
          },
          {
            "text": "\t\t\t\t\t\t// Is this a numeric meta field? Can't save an empty string in those.",
            "lineNumber": 164
          },
          {
            "text": "\t\t\t\t\t\tif ( props.isNumeric &amp;&amp; '' === value ) {",
            "lineNumber": 165
          },
          {
            "text": "\t\t\t\t\t\t\tvalue = '0';",
            "lineNumber": 166
          },
          {
            "text": "\t\t\t\t\t\t}",
            "lineNumber": 167
          },
          {
            "text": "\t\t\t\t\t\tdispatch( 'core/editor' ).editPost(",
            "lineNumber": 168
          },
          {
            "text": "\t\t\t\t\t\t\t{ meta: { [ props.fieldName ]: value } }",
            "lineNumber": 169
          },
          {
            "text": "\t\t\t\t\t\t);",
            "lineNumber": 170
          },
          {
            "text": "\t\t\t\t\t}",
            "lineNumber": 171
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 172
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 173
          },
          {
            "text": "\t\t),",
            "lineNumber": 174
          },
          {
            "text": "\t\twithSelect(",
            "lineNumber": 175
          },
          {
            "text": "\t\t\tfunction( select, props ) {",
            "lineNumber": 176
          },
          {
            "text": "\t\t\t\treturn {",
            "lineNumber": 177
          },
          {
            "text": "\t\t\t\t\tmetaFieldValue: select( 'core/editor' )",
            "lineNumber": 178
          },
          {
            "text": "\t\t\t\t\t .getEditedPostAttribute( 'meta' )",
            "lineNumber": 179
          },
          {
            "text": "\t\t\t\t\t [ props.fieldName ],",
            "lineNumber": 180
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 181
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 182
          },
          {
            "text": "\t\t)",
            "lineNumber": 183
          },
          {
            "text": "\t)(",
            "lineNumber": 184
          },
          {
            "text": "\t\tfunction( props ) {",
            "lineNumber": 185
          },
          {
            "text": "\t\t\treturn el(",
            "lineNumber": 186
          },
          {
            "text": "\t\t\t\tText,",
            "lineNumber": 187
          },
          {
            "text": "\t\t\t\t{",
            "lineNumber": 188
          },
          {
            "text": "\t\t\t\t\tlabel: getLabel( props.fieldName ),",
            "lineNumber": 189
          },
          {
            "text": "\t\t\t\t\tvalue: props.metaFieldValue,",
            "lineNumber": 190
          },
          {
            "text": "\t\t\t\t\tid: props.id,",
            "lineNumber": 191
          },
          {
            "text": "\t\t\t\t\tonChange: function( content ) {",
            "lineNumber": 192
          },
          {
            "text": "\t\t\t\t\t\t props.setMetaFieldValue( content );",
            "lineNumber": 193
          },
          {
            "text": "\t\t\t\t\t},",
            "lineNumber": 194
          },
          {
            "text": "\t\t\t\t\tonInput: function( event ) {",
            "lineNumber": 195
          },
          {
            "text": "\t\t\t\t\t\t// Is this the VIN field?",
            "lineNumber": 196
          },
          {
            "text": "\t\t\t\t\t\tif ( props.fieldName === invp.meta_prefix + 'vin' ) {",
            "lineNumber": 197
          },
          {
            "text": "\t\t\t\t\t\t\t// Yes.",
            "lineNumber": 198
          },
          {
            "text": "\t\t\t\t\t\t\t// Is the VIN Decoding plugin active?",
            "lineNumber": 199
          },
          {
            "text": "\t\t\t\t\t\t\tif ( typeof window.invp_vin_decoder_maybe_decode === 'function' ) {",
            "lineNumber": 200
          },
          {
            "text": "\t\t\t\t\t\t\t\t// Yes.",
            "lineNumber": 201
          },
          {
            "text": "\t\t\t\t\t\t\t\twindow.invp_vin_decoder_maybe_decode( event );",
            "lineNumber": 202
          },
          {
            "text": "\t\t\t\t\t\t\t}",
            "lineNumber": 203
          },
          {
            "text": "\t\t\t\t\t\t}",
            "lineNumber": 204
          },
          {
            "text": "\t\t\t\t\t}",
            "lineNumber": 205
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 206
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 207
          },
          {
            "text": "\t\t}",
            "lineNumber": 208
          },
          {
            "text": "\t);",
            "lineNumber": 209
          },
          {
            "lineNumber": 210
          },
          {
            "text": "\t// Text field that allows only digits.",
            "lineNumber": 211
          }
        ]
      },
      "score": 0.2771190106868744
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./js/classic-editor.js",
        "range": {
          "startPosition": {
            "line": 26,
            "column": 1
          },
          "endPosition": {
            "line": 67,
            "column": 1
          }
        },
        "contents": "function invp_vehicle_type_changed( type_slug ) {\n\tvar is_boat = 'boat' == type_slug;\n\n\t// show or hide the boat-specific fields\n\tjQuery( 'tr.boat-postmeta' ).toggle( is_boat );\n\n\t// HIN or VIN?\n\tjQuery( 'label[for=\"' + invp.meta_prefix + 'vin\"]' ).text( is_boat ? 'HIN' : 'VIN' );\n\n\t// Odometer units are usually miles, but can be changed.\n\tjQuery( '.invp_odometer_units' ).text( invp.odometer_units );\n\n\tif ( is_boat ) {\n\n\t\t// Change the interface for boats\n\t\tjQuery( 'select#' + invp.meta_prefix + 'body_style_hidden' )\n\t\t\t.attr( 'name', invp.meta_prefix + 'body_style' )\n\t\t\t.attr( 'id', invp.meta_prefix + 'body_style' );\n\n\t\tjQuery( 'input#' + invp.meta_prefix + 'body_style' )\n\t\t\t.attr( 'name', invp.meta_prefix + 'body_style_hidden' )\n\t\t\t.attr( 'id', invp.meta_prefix + 'body_style_hidden' );\n\t} else {\n\n\t\t// Reverse all those boat changes\n\t\tjQuery( 'input#' + invp.meta_prefix + 'body_style_hidden' )\n\t\t\t.attr( 'name', invp.meta_prefix + 'body_style' )\n\t\t\t.attr( 'id', invp.meta_prefix + 'body_style' );\n\n\t\tjQuery( 'select#' + invp.meta_prefix + 'body_style' )\n\t\t\t.attr( 'name', invp.meta_prefix + 'body_style_hidden' )\n\t\t\t.attr( 'id', invp.meta_prefix + 'body_style_hidden' );\n\t}\n}\n\nfunction is_number( evt ) {\n\tevt          = (evt) ? evt : window.event;\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "function invp_vehicle_type_changed( type_slug ) {",
            "lineNumber": 29,
            "isSignature": true
          },
          {
            "text": "\tvar is_boat = 'boat' == type_slug;",
            "lineNumber": 30
          },
          {
            "lineNumber": 31
          },
          {
            "text": "\t// show or hide the boat-specific fields",
            "lineNumber": 32
          },
          {
            "text": "\tjQuery( 'tr.boat-postmeta' ).toggle( is_boat );",
            "lineNumber": 33
          },
          {
            "lineNumber": 34
          },
          {
            "text": "\t// HIN or VIN?",
            "lineNumber": 35
          },
          {
            "text": "\tjQuery( 'label[for=\"' + invp.meta_prefix + 'vin\"]' ).text( is_boat ? 'HIN' : 'VIN' );",
            "lineNumber": 36
          },
          {
            "lineNumber": 37
          },
          {
            "text": "\t// Odometer units are usually miles, but can be changed.",
            "lineNumber": 38
          },
          {
            "text": "\tjQuery( '.invp_odometer_units' ).text( invp.odometer_units );",
            "lineNumber": 39
          },
          {
            "lineNumber": 40
          },
          {
            "text": "\tif ( is_boat ) {",
            "lineNumber": 41
          },
          {
            "lineNumber": 42
          },
          {
            "text": "\t\t// Change the interface for boats",
            "lineNumber": 43
          },
          {
            "text": "\t\tjQuery( 'select#' + invp.meta_prefix + 'body_style_hidden' )",
            "lineNumber": 44
          },
          {
            "text": "\t\t\t.attr( 'name', invp.meta_prefix + 'body_style' )",
            "lineNumber": 45
          },
          {
            "text": "\t\t\t.attr( 'id', invp.meta_prefix + 'body_style' );",
            "lineNumber": 46
          },
          {
            "lineNumber": 47
          },
          {
            "text": "\t\tjQuery( 'input#' + invp.meta_prefix + 'body_style' )",
            "lineNumber": 48
          },
          {
            "text": "\t\t\t.attr( 'name', invp.meta_prefix + 'body_style_hidden' )",
            "lineNumber": 49
          },
          {
            "text": "\t\t\t.attr( 'id', invp.meta_prefix + 'body_style_hidden' );",
            "lineNumber": 50
          },
          {
            "text": "\t} else {",
            "lineNumber": 51
          },
          {
            "lineNumber": 52
          },
          {
            "text": "\t\t// Reverse all those boat changes",
            "lineNumber": 53
          },
          {
            "text": "\t\tjQuery( 'input#' + invp.meta_prefix + 'body_style_hidden' )",
            "lineNumber": 54
          },
          {
            "text": "\t\t\t.attr( 'name', invp.meta_prefix + 'body_style' )",
            "lineNumber": 55
          },
          {
            "text": "\t\t\t.attr( 'id', invp.meta_prefix + 'body_style' );",
            "lineNumber": 56
          },
          {
            "lineNumber": 57
          },
          {
            "text": "\t\tjQuery( 'select#' + invp.meta_prefix + 'body_style' )",
            "lineNumber": 58
          },
          {
            "text": "\t\t\t.attr( 'name', invp.meta_prefix + 'body_style_hidden' )",
            "lineNumber": 59
          },
          {
            "text": "\t\t\t.attr( 'id', invp.meta_prefix + 'body_style_hidden' );",
            "lineNumber": 60
          },
          {
            "text": "\t}",
            "lineNumber": 61
          },
          {
            "text": "}",
            "lineNumber": 62,
            "isSignature": true
          },
          {
            "lineNumber": 63
          },
          {
            "text": "function is_number( evt ) {",
            "lineNumber": 64,
            "isSignature": true
          },
          {
            "text": "\tevt          = (evt) ? evt : window.event;",
            "lineNumber": 65
          },
          {
            "text": "}",
            "lineNumber": 68,
            "isSignature": true
          }
        ]
      },
      "score": 0.2756902873516083
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-invp.php",
        "range": {
          "startPosition": {
            "line": 371
          },
          "endPosition": {
            "line": 437
          }
        },
        "contents": "\t\t\t}\n\n\t\t\t$hours[] = $set;\n\t\t}\n\t\treturn $hours;\n\t}\n\n\t/**\n\t * Retrieves post meta values.\n\t *\n\t * @param  string $unprefixed_meta_key A meta key suffix like 'vin' or 'date_entered'.\n\t * @param  int    $post_id A vehicle post ID.\n\t * @return string|int|double|array\n\t */\n\tpublic static function get_meta( $unprefixed_meta_key, $post_id = null ) {\n\t\tif ( empty( $post_id ) ) {\n\t\t\t$post_id = get_the_ID();\n\t\t}\n\n\t\t$meta_key = apply_filters( 'invp_prefix_meta_key', $unprefixed_meta_key );\n\n\t\t// Options are stored as a multi-valued meta field.\n\t\t$single = 'options_array' !== $unprefixed_meta_key;\n\n\t\t$meta_value = get_post_meta( $post_id, $meta_key, $single );\n\t\t// Kill dupes for singles. Added after finding duplicate date_entered and last_modified dates.\n\t\tif ( $single ) {\n\t\t\t$array_value = get_post_meta( $post_id, $meta_key );\n\t\t\tif ( $array_value &amp;&amp; 1 &lt; count( $array_value ) ) {\n\t\t\t\tdelete_post_meta( $post_id, $meta_key );\n\t\t\t\tupdate_post_meta( $post_id, $meta_key, $meta_value );\n\t\t\t}\n\t\t}\n\n\t\t// If key is a number, return a number/zero instead of empty string.\n\t\tif ( self::meta_value_is_number( $meta_key ) ) {\n\t\t\tif ( empty( $meta_value ) ) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif ( false === strpos( $meta_value ?? '', '.' ) ) {\n\t\t\t\treturn (int) $meta_value;\n\t\t\t}\n\t\t\treturn (float) $meta_value;\n\t\t}\n\t\treturn $meta_value;\n\t}\n\n\t/**\n\t * Loads phone numbers from post meta into an array.\n\t *\n\t * @param  int $term_id The location term ID from which to extract phones.\n\t * @return array An array of arrays describing phone numbers\n\t */\n\tpublic static function get_phones( $term_id ) {\n\t\t$phones    = array();\n\t\t$term_meta = get_term_meta( $term_id );\n\n\t\tfor ( $p = 1; $p &lt;= self::LOCATION_MAX_PHONES; $p++ ) {\n\t\t\t// Is there a phone number in this slot?\n\t\t\tif ( empty( $term_meta[ 'phone_' . $p . '_uid' ][0] ) ) {\n\t\t\t\t// No, we're done with this location.\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$phones[] = array(\n\t\t\t\t'uid'         =&gt; $term_meta[ 'phone_' . $p . '_uid' ][0],",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t}",
            "lineNumber": 372
          },
          {
            "lineNumber": 373
          },
          {
            "text": "\t\t\t$hours[] = $set;",
            "lineNumber": 374
          },
          {
            "text": "\t\t}",
            "lineNumber": 375
          },
          {
            "text": "\t\treturn $hours;",
            "lineNumber": 376
          },
          {
            "text": "\t}",
            "lineNumber": 377
          },
          {
            "lineNumber": 378
          },
          {
            "text": "\t/**",
            "lineNumber": 379
          },
          {
            "text": "\t * Retrieves post meta values.",
            "lineNumber": 380
          },
          {
            "text": "\t *",
            "lineNumber": 381
          },
          {
            "text": "\t * @param  string $unprefixed_meta_key A meta key suffix like 'vin' or 'date_entered'.",
            "lineNumber": 382
          },
          {
            "text": "\t * @param  int    $post_id A vehicle post ID.",
            "lineNumber": 383
          },
          {
            "text": "\t * @return string|int|double|array",
            "lineNumber": 384
          },
          {
            "text": "\t */",
            "lineNumber": 385
          },
          {
            "text": "\tpublic static function get_meta( $unprefixed_meta_key, $post_id = null ) {",
            "lineNumber": 386
          },
          {
            "text": "\t\tif ( empty( $post_id ) ) {",
            "lineNumber": 387
          },
          {
            "text": "\t\t\t$post_id = get_the_ID();",
            "lineNumber": 388
          },
          {
            "text": "\t\t}",
            "lineNumber": 389
          },
          {
            "lineNumber": 390
          },
          {
            "text": "\t\t$meta_key = apply_filters( 'invp_prefix_meta_key', $unprefixed_meta_key );",
            "lineNumber": 391
          },
          {
            "lineNumber": 392
          },
          {
            "text": "\t\t// Options are stored as a multi-valued meta field.",
            "lineNumber": 393
          },
          {
            "text": "\t\t$single = 'options_array' !== $unprefixed_meta_key;",
            "lineNumber": 394
          },
          {
            "lineNumber": 395
          },
          {
            "text": "\t\t$meta_value = get_post_meta( $post_id, $meta_key, $single );",
            "lineNumber": 396
          },
          {
            "text": "\t\t// Kill dupes for singles. Added after finding duplicate date_entered and last_modified dates.",
            "lineNumber": 397
          },
          {
            "text": "\t\tif ( $single ) {",
            "lineNumber": 398
          },
          {
            "text": "\t\t\t$array_value = get_post_meta( $post_id, $meta_key );",
            "lineNumber": 399
          },
          {
            "text": "\t\t\tif ( $array_value &amp;&amp; 1 &lt; count( $array_value ) ) {",
            "lineNumber": 400
          },
          {
            "text": "\t\t\t\tdelete_post_meta( $post_id, $meta_key );",
            "lineNumber": 401
          },
          {
            "text": "\t\t\t\tupdate_post_meta( $post_id, $meta_key, $meta_value );",
            "lineNumber": 402
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 403
          },
          {
            "text": "\t\t}",
            "lineNumber": 404
          },
          {
            "lineNumber": 405
          },
          {
            "text": "\t\t// If key is a number, return a number/zero instead of empty string.",
            "lineNumber": 406
          },
          {
            "text": "\t\tif ( self::meta_value_is_number( $meta_key ) ) {",
            "lineNumber": 407
          },
          {
            "text": "\t\t\tif ( empty( $meta_value ) ) {",
            "lineNumber": 408
          },
          {
            "text": "\t\t\t\treturn 0;",
            "lineNumber": 409
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 410
          },
          {
            "text": "\t\t\tif ( false === strpos( $meta_value ?? '', '.' ) ) {",
            "lineNumber": 411
          },
          {
            "text": "\t\t\t\treturn (int) $meta_value;",
            "lineNumber": 412
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 413
          },
          {
            "text": "\t\t\treturn (float) $meta_value;",
            "lineNumber": 414
          },
          {
            "text": "\t\t}",
            "lineNumber": 415
          },
          {
            "text": "\t\treturn $meta_value;",
            "lineNumber": 416
          },
          {
            "text": "\t}",
            "lineNumber": 417
          },
          {
            "lineNumber": 418
          },
          {
            "text": "\t/**",
            "lineNumber": 419
          },
          {
            "text": "\t * Loads phone numbers from post meta into an array.",
            "lineNumber": 420
          },
          {
            "text": "\t *",
            "lineNumber": 421
          },
          {
            "text": "\t * @param  int $term_id The location term ID from which to extract phones.",
            "lineNumber": 422
          },
          {
            "text": "\t * @return array An array of arrays describing phone numbers",
            "lineNumber": 423
          },
          {
            "text": "\t */",
            "lineNumber": 424
          },
          {
            "text": "\tpublic static function get_phones( $term_id ) {",
            "lineNumber": 425
          },
          {
            "text": "\t\t$phones    = array();",
            "lineNumber": 426
          },
          {
            "text": "\t\t$term_meta = get_term_meta( $term_id );",
            "lineNumber": 427
          },
          {
            "lineNumber": 428
          },
          {
            "text": "\t\tfor ( $p = 1; $p &lt;= self::LOCATION_MAX_PHONES; $p++ ) {",
            "lineNumber": 429
          },
          {
            "text": "\t\t\t// Is there a phone number in this slot?",
            "lineNumber": 430
          },
          {
            "text": "\t\t\tif ( empty( $term_meta[ 'phone_' . $p . '_uid' ][0] ) ) {",
            "lineNumber": 431
          },
          {
            "text": "\t\t\t\t// No, we're done with this location.",
            "lineNumber": 432
          },
          {
            "text": "\t\t\t\tbreak;",
            "lineNumber": 433
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 434
          },
          {
            "lineNumber": 435
          },
          {
            "text": "\t\t\t$phones[] = array(",
            "lineNumber": 436
          },
          {
            "text": "\t\t\t\t'uid'         =&gt; $term_meta[ 'phone_' . $p . '_uid' ][0],",
            "lineNumber": 437
          }
        ]
      },
      "score": 0.2753249406814575
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-taxonomies.php",
        "range": {
          "startPosition": {
            "line": 1009
          },
          "endPosition": {
            "line": 1047
          }
        },
        "contents": "\t\t\t\t\t'show_ui'        =&gt; true,\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t// Boat Condition.\n\t\t\tarray(\n\t\t\t\t'args'      =&gt; array(\n\t\t\t\t\t'hierarchical'   =&gt; true,\n\t\t\t\t\t'label'          =&gt; __( 'Condition', 'inventory-presser' ),\n\t\t\t\t\t'labels'         =&gt; array(\n\t\t\t\t\t\t'name'          =&gt; __( 'Condition', 'inventory-presser' ),\n\t\t\t\t\t\t'singular_name' =&gt; __( 'Condition', 'inventory-presser' ),\n\t\t\t\t\t\t'search_items'  =&gt; __( 'Search conditions', 'inventory-presser' ),\n\t\t\t\t\t\t'popular_items' =&gt; __( 'Popular conditions', 'inventory-presser' ),\n\t\t\t\t\t\t'all_items'     =&gt; __( 'All conditions', 'inventory-presser' ),\n\t\t\t\t\t\t'parent_item'   =&gt; __( 'Parent Condition', 'inventory-presser' ),\n\t\t\t\t\t\t'edit_item'     =&gt; __( 'Edit Condition', 'inventory-presser' ),\n\t\t\t\t\t\t'add_new_item'  =&gt; __( 'Add New Condition', 'inventory-presser' ),\n\t\t\t\t\t\t'new_item_name' =&gt; __( 'New Condition Name', 'inventory-presser' ),\n\t\t\t\t\t\t'back_to_items' =&gt; __( '&amp;larr; Go to condition', 'inventory-presser' ),\n\t\t\t\t\t),\n\t\t\t\t\t'meta_box_cb'    =&gt; array( 'Inventory_Presser_Taxonomies', 'meta_box_html' ),\n\t\t\t\t\t'query_var'      =&gt; 'condition_boat',\n\t\t\t\t\t'singular_label' =&gt; __( 'Condition', 'inventory-presser' ),\n\t\t\t\t\t'show_in_menu'   =&gt; false,\n\t\t\t\t\t'show_in_rest'   =&gt; true,\n\t\t\t\t\t'show_ui'        =&gt; true,\n\t\t\t\t),\n\t\t\t\t'term_data' =&gt; array(\n\t\t\t\t\t'New'       =&gt; 'New',\n\t\t\t\t\t'Excellent' =&gt; 'Excellent',\n\t\t\t\t\t'Good'      =&gt; 'Good',\n\t\t\t\t\t'Fair'      =&gt; 'Fair',\n\t\t\t\t\t'Poor'      =&gt; 'Poor',\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t// Number of Engines (boats).",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t\t\t'show_ui'        =&gt; true,",
            "lineNumber": 1010
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 1011
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 1012
          },
          {
            "lineNumber": 1013
          },
          {
            "text": "\t\t\t// Boat Condition.",
            "lineNumber": 1014
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 1015
          },
          {
            "text": "\t\t\t\t'args'      =&gt; array(",
            "lineNumber": 1016
          },
          {
            "text": "\t\t\t\t\t'hierarchical'   =&gt; true,",
            "lineNumber": 1017
          },
          {
            "text": "\t\t\t\t\t'label'          =&gt; __( 'Condition', 'inventory-presser' ),",
            "lineNumber": 1018
          },
          {
            "text": "\t\t\t\t\t'labels'         =&gt; array(",
            "lineNumber": 1019
          },
          {
            "text": "\t\t\t\t\t\t'name'          =&gt; __( 'Condition', 'inventory-presser' ),",
            "lineNumber": 1020
          },
          {
            "text": "\t\t\t\t\t\t'singular_name' =&gt; __( 'Condition', 'inventory-presser' ),",
            "lineNumber": 1021
          },
          {
            "text": "\t\t\t\t\t\t'search_items'  =&gt; __( 'Search conditions', 'inventory-presser' ),",
            "lineNumber": 1022
          },
          {
            "text": "\t\t\t\t\t\t'popular_items' =&gt; __( 'Popular conditions', 'inventory-presser' ),",
            "lineNumber": 1023
          },
          {
            "text": "\t\t\t\t\t\t'all_items'     =&gt; __( 'All conditions', 'inventory-presser' ),",
            "lineNumber": 1024
          },
          {
            "text": "\t\t\t\t\t\t'parent_item'   =&gt; __( 'Parent Condition', 'inventory-presser' ),",
            "lineNumber": 1025
          },
          {
            "text": "\t\t\t\t\t\t'edit_item'     =&gt; __( 'Edit Condition', 'inventory-presser' ),",
            "lineNumber": 1026
          },
          {
            "text": "\t\t\t\t\t\t'add_new_item'  =&gt; __( 'Add New Condition', 'inventory-presser' ),",
            "lineNumber": 1027
          },
          {
            "text": "\t\t\t\t\t\t'new_item_name' =&gt; __( 'New Condition Name', 'inventory-presser' ),",
            "lineNumber": 1028
          },
          {
            "text": "\t\t\t\t\t\t'back_to_items' =&gt; __( '&amp;larr; Go to condition', 'inventory-presser' ),",
            "lineNumber": 1029
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 1030
          },
          {
            "text": "\t\t\t\t\t'meta_box_cb'    =&gt; array( 'Inventory_Presser_Taxonomies', 'meta_box_html' ),",
            "lineNumber": 1031
          },
          {
            "text": "\t\t\t\t\t'query_var'      =&gt; 'condition_boat',",
            "lineNumber": 1032
          },
          {
            "text": "\t\t\t\t\t'singular_label' =&gt; __( 'Condition', 'inventory-presser' ),",
            "lineNumber": 1033
          },
          {
            "text": "\t\t\t\t\t'show_in_menu'   =&gt; false,",
            "lineNumber": 1034
          },
          {
            "text": "\t\t\t\t\t'show_in_rest'   =&gt; true,",
            "lineNumber": 1035
          },
          {
            "text": "\t\t\t\t\t'show_ui'        =&gt; true,",
            "lineNumber": 1036
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 1037
          },
          {
            "text": "\t\t\t\t'term_data' =&gt; array(",
            "lineNumber": 1038
          },
          {
            "text": "\t\t\t\t\t'New'       =&gt; 'New',",
            "lineNumber": 1039
          },
          {
            "text": "\t\t\t\t\t'Excellent' =&gt; 'Excellent',",
            "lineNumber": 1040
          },
          {
            "text": "\t\t\t\t\t'Good'      =&gt; 'Good',",
            "lineNumber": 1041
          },
          {
            "text": "\t\t\t\t\t'Fair'      =&gt; 'Fair',",
            "lineNumber": 1042
          },
          {
            "text": "\t\t\t\t\t'Poor'      =&gt; 'Poor',",
            "lineNumber": 1043
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 1044
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 1045
          },
          {
            "lineNumber": 1046
          },
          {
            "text": "\t\t\t// Number of Engines (boats).",
            "lineNumber": 1047
          }
        ]
      },
      "score": 0.2731682062149048
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/integrations/class-classic-editor.php",
        "range": {
          "startPosition": {
            "line": 61,
            "column": 3
          },
          "endPosition": {
            "line": 102
          }
        },
        "contents": "// No. Not adding or editing editing a vehicle.\n\t\t\treturn;\n\t\t}\n\n\t\tadd_action( 'add_meta_boxes', array( $this, 'add_meta_boxes_to_cpt' ) );\n\n\t\t// Move all \"advanced\" meta boxes above the default editor.\n\t\t// https://wordpress.stackexchange.com/a/88103.\n\t\tadd_action( 'edit_form_after_title', array( $this, 'move_advanced_meta_boxes' ) );\n\n\t\t// Move the \"Tags\" metabox below the meta boxes for vehicle custom taxonomies.\n\t\tadd_action( 'add_meta_boxes', array( $this, 'move_tags_meta_box' ), 0 );\n\n\t\t// Load our scripts.\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'scripts_and_styles' ) );\n\n\t\t// Add some content next to the \"Add Media\" button.\n\t\tadd_action( 'media_buttons', array( $this, 'annotate_add_media_button' ) );\n\t}\n\n\t/**\n\t * Adds meta boxes to the editor when editing vehicles.\n\t *\n\t * @return void\n\t */\n\tpublic function add_meta_boxes_to_cpt() {\n\t\t// Add a meta box to the New/Edit post page.\n\t\tadd_meta_box( 'vehicle-meta', 'Attributes', array( $this, 'meta_box_html_vehicle' ), INVP::POST_TYPE, 'normal', 'high' );\n\n\t\t// And another for prices.\n\t\tadd_meta_box( 'prices-meta', 'Prices', array( $this, 'meta_box_html_prices' ), INVP::POST_TYPE, 'normal', 'high' );\n\n\t\t// Add another meta box to the New/Edit post page.\n\t\tadd_meta_box( 'options-meta', 'Optional equipment', array( $this, 'meta_box_html_options' ), INVP::POST_TYPE, 'normal', 'high' );\n\n\t\t// Add a meta box to the side column for a featured vehicle checkbox.\n\t\tadd_meta_box( 'featured', 'Featured Vehicle', array( $this, 'meta_box_html_featured' ), INVP::POST_TYPE, 'side', 'low' );\n\t}\n\n\t/**\n\t * Don't add media HTML to the post body when the Add Media button is used",
        "signatures": {},
        "detailedLines": [
          {
            "text": "// No. Not adding or editing editing a vehicle.",
            "lineNumber": 62
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 63
          },
          {
            "text": "\t\t}",
            "lineNumber": 64
          },
          {
            "lineNumber": 65
          },
          {
            "text": "\t\tadd_action( 'add_meta_boxes', array( $this, 'add_meta_boxes_to_cpt' ) );",
            "lineNumber": 66
          },
          {
            "lineNumber": 67
          },
          {
            "text": "\t\t// Move all \"advanced\" meta boxes above the default editor.",
            "lineNumber": 68
          },
          {
            "text": "\t\t// https://wordpress.stackexchange.com/a/88103.",
            "lineNumber": 69
          },
          {
            "text": "\t\tadd_action( 'edit_form_after_title', array( $this, 'move_advanced_meta_boxes' ) );",
            "lineNumber": 70
          },
          {
            "lineNumber": 71
          },
          {
            "text": "\t\t// Move the \"Tags\" metabox below the meta boxes for vehicle custom taxonomies.",
            "lineNumber": 72
          },
          {
            "text": "\t\tadd_action( 'add_meta_boxes', array( $this, 'move_tags_meta_box' ), 0 );",
            "lineNumber": 73
          },
          {
            "lineNumber": 74
          },
          {
            "text": "\t\t// Load our scripts.",
            "lineNumber": 75
          },
          {
            "text": "\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'scripts_and_styles' ) );",
            "lineNumber": 76
          },
          {
            "lineNumber": 77
          },
          {
            "text": "\t\t// Add some content next to the \"Add Media\" button.",
            "lineNumber": 78
          },
          {
            "text": "\t\tadd_action( 'media_buttons', array( $this, 'annotate_add_media_button' ) );",
            "lineNumber": 79
          },
          {
            "text": "\t}",
            "lineNumber": 80
          },
          {
            "lineNumber": 81
          },
          {
            "text": "\t/**",
            "lineNumber": 82
          },
          {
            "text": "\t * Adds meta boxes to the editor when editing vehicles.",
            "lineNumber": 83
          },
          {
            "text": "\t *",
            "lineNumber": 84
          },
          {
            "text": "\t * @return void",
            "lineNumber": 85
          },
          {
            "text": "\t */",
            "lineNumber": 86
          },
          {
            "text": "\tpublic function add_meta_boxes_to_cpt() {",
            "lineNumber": 87
          },
          {
            "text": "\t\t// Add a meta box to the New/Edit post page.",
            "lineNumber": 88
          },
          {
            "text": "\t\tadd_meta_box( 'vehicle-meta', 'Attributes', array( $this, 'meta_box_html_vehicle' ), INVP::POST_TYPE, 'normal', 'high' );",
            "lineNumber": 89
          },
          {
            "lineNumber": 90
          },
          {
            "text": "\t\t// And another for prices.",
            "lineNumber": 91
          },
          {
            "text": "\t\tadd_meta_box( 'prices-meta', 'Prices', array( $this, 'meta_box_html_prices' ), INVP::POST_TYPE, 'normal', 'high' );",
            "lineNumber": 92
          },
          {
            "lineNumber": 93
          },
          {
            "text": "\t\t// Add another meta box to the New/Edit post page.",
            "lineNumber": 94
          },
          {
            "text": "\t\tadd_meta_box( 'options-meta', 'Optional equipment', array( $this, 'meta_box_html_options' ), INVP::POST_TYPE, 'normal', 'high' );",
            "lineNumber": 95
          },
          {
            "lineNumber": 96
          },
          {
            "text": "\t\t// Add a meta box to the side column for a featured vehicle checkbox.",
            "lineNumber": 97
          },
          {
            "text": "\t\tadd_meta_box( 'featured', 'Featured Vehicle', array( $this, 'meta_box_html_featured' ), INVP::POST_TYPE, 'side', 'low' );",
            "lineNumber": 98
          },
          {
            "text": "\t}",
            "lineNumber": 99
          },
          {
            "lineNumber": 100
          },
          {
            "text": "\t/**",
            "lineNumber": 101
          },
          {
            "text": "\t * Don't add media HTML to the post body when the Add Media button is used",
            "lineNumber": 102
          }
        ]
      },
      "score": 0.27230221033096313
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-schema-org-generator.php",
        "range": {
          "startPosition": {
            "line": 78
          },
          "endPosition": {
            "line": 140
          }
        },
        "contents": "\tprotected function schema_org_json_ld( $post_ID ) {\n\t\t$obj = array(\n\t\t\t'@context' =&gt; 'https://schema.org/',\n\t\t\t'@type'    =&gt; 'Vehicle',\n\t\t);\n\n\t\t$obj['name'] = wp_strip_all_tags( get_the_title( $post_ID ) );\n\n\t\t$make = invp_get_the_make( $post_ID );\n\t\tif ( '' !== $make ) {\n\t\t\t$obj['brand'] = array(\n\t\t\t\t'@type' =&gt; 'Thing',\n\t\t\t\t'name'  =&gt; wp_strip_all_tags( $make ),\n\t\t\t);\n\t\t}\n\n\t\t$vin = invp_get_the_VIN( $post_ID );\n\t\tif ( '' !== $vin ) {\n\t\t\t$obj['vehicleIdentificationNumber'] = wp_strip_all_tags( $vin );\n\t\t}\n\n\t\t$year = invp_get_the_year( $post_ID );\n\t\tif ( 0 !== $year ) {\n\t\t\t$obj['vehicleModelDate'] = $year;\n\t\t}\n\n\t\t// Do we have photos?\n\t\tif ( 0 &lt; invp_get_the_photo_count( $post_ID ) ) {\n\t\t\t$obj['image'] = esc_url_raw( invp_get_the_photo_url( $post_ID ) );\n\t\t}\n\n\t\t$odometer = invp_get_the_odometer( '', $post_ID );\n\t\tif ( '' !== $odometer ) {\n\t\t\t// Extract just digits from the odometer value.\n\t\t\t$odometer_digits            = abs( (int) filter_var( $odometer, FILTER_SANITIZE_NUMBER_INT ) );\n\t\t\t$obj['mileageFromOdometer'] = array(\n\t\t\t\t'@type'    =&gt; 'QuantitativeValue',\n\t\t\t\t'value'    =&gt; $odometer_digits,\n\t\t\t\t'unitCode' =&gt; 'SMI',\n\t\t\t);\n\t\t}\n\n\t\tif ( '' !== invp_get_the_engine( $post_ID ) || '' !== invp_get_the_fuel( $post_ID ) ) {\n\t\t\t$obj['vehicleEngine'] = array();\n\t\t\tif ( '' !== invp_get_the_engine( $post_ID ) ) {\n\t\t\t\t$obj['vehicleEngine']['engineType'] = wp_strip_all_tags( invp_get_the_engine( $post_ID ) );\n\t\t\t}\n\t\t\tif ( '' !== invp_get_the_fuel( $post_ID ) ) {\n\t\t\t\t$obj['vehicleEngine']['fuelType'] = wp_strip_all_tags( invp_get_the_fuel( $post_ID ) );\n\t\t\t}\n\t\t}\n\n\t\tif ( '' !== invp_get_the_body_style( $post_ID ) ) {\n\t\t\t$obj['bodyType'] = wp_strip_all_tags( invp_get_the_body_style( $post_ID ) );\n\t\t}\n\n\t\tif ( '' !== invp_get_the_color( $post_ID ) ) {\n\t\t\t$obj['color'] = wp_strip_all_tags( invp_get_the_color( $post_ID ) );\n\t\t}\n\n\t\tif ( '' !== invp_get_the_interior_color( $post_ID ) ) {\n\t\t\t$obj['vehicleInteriorColor'] = wp_strip_all_tags( invp_get_the_interior_color( $post_ID ) );",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\tprotected function schema_org_json_ld( $post_ID ) {",
            "lineNumber": 79
          },
          {
            "text": "\t\t$obj = array(",
            "lineNumber": 80
          },
          {
            "text": "\t\t\t'@context' =&gt; 'https://schema.org/',",
            "lineNumber": 81
          },
          {
            "text": "\t\t\t'@type'    =&gt; 'Vehicle',",
            "lineNumber": 82
          },
          {
            "text": "\t\t);",
            "lineNumber": 83
          },
          {
            "lineNumber": 84
          },
          {
            "text": "\t\t$obj['name'] = wp_strip_all_tags( get_the_title( $post_ID ) );",
            "lineNumber": 85
          },
          {
            "lineNumber": 86
          },
          {
            "text": "\t\t$make = invp_get_the_make( $post_ID );",
            "lineNumber": 87
          },
          {
            "text": "\t\tif ( '' !== $make ) {",
            "lineNumber": 88
          },
          {
            "text": "\t\t\t$obj['brand'] = array(",
            "lineNumber": 89
          },
          {
            "text": "\t\t\t\t'@type' =&gt; 'Thing',",
            "lineNumber": 90
          },
          {
            "text": "\t\t\t\t'name'  =&gt; wp_strip_all_tags( $make ),",
            "lineNumber": 91
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 92
          },
          {
            "text": "\t\t}",
            "lineNumber": 93
          },
          {
            "lineNumber": 94
          },
          {
            "text": "\t\t$vin = invp_get_the_VIN( $post_ID );",
            "lineNumber": 95
          },
          {
            "text": "\t\tif ( '' !== $vin ) {",
            "lineNumber": 96
          },
          {
            "text": "\t\t\t$obj['vehicleIdentificationNumber'] = wp_strip_all_tags( $vin );",
            "lineNumber": 97
          },
          {
            "text": "\t\t}",
            "lineNumber": 98
          },
          {
            "lineNumber": 99
          },
          {
            "text": "\t\t$year = invp_get_the_year( $post_ID );",
            "lineNumber": 100
          },
          {
            "text": "\t\tif ( 0 !== $year ) {",
            "lineNumber": 101
          },
          {
            "text": "\t\t\t$obj['vehicleModelDate'] = $year;",
            "lineNumber": 102
          },
          {
            "text": "\t\t}",
            "lineNumber": 103
          },
          {
            "lineNumber": 104
          },
          {
            "text": "\t\t// Do we have photos?",
            "lineNumber": 105
          },
          {
            "text": "\t\tif ( 0 &lt; invp_get_the_photo_count( $post_ID ) ) {",
            "lineNumber": 106
          },
          {
            "text": "\t\t\t$obj['image'] = esc_url_raw( invp_get_the_photo_url( $post_ID ) );",
            "lineNumber": 107
          },
          {
            "text": "\t\t}",
            "lineNumber": 108
          },
          {
            "lineNumber": 109
          },
          {
            "text": "\t\t$odometer = invp_get_the_odometer( '', $post_ID );",
            "lineNumber": 110
          },
          {
            "text": "\t\tif ( '' !== $odometer ) {",
            "lineNumber": 111
          },
          {
            "text": "\t\t\t// Extract just digits from the odometer value.",
            "lineNumber": 112
          },
          {
            "text": "\t\t\t$odometer_digits            = abs( (int) filter_var( $odometer, FILTER_SANITIZE_NUMBER_INT ) );",
            "lineNumber": 113
          },
          {
            "text": "\t\t\t$obj['mileageFromOdometer'] = array(",
            "lineNumber": 114
          },
          {
            "text": "\t\t\t\t'@type'    =&gt; 'QuantitativeValue',",
            "lineNumber": 115
          },
          {
            "text": "\t\t\t\t'value'    =&gt; $odometer_digits,",
            "lineNumber": 116
          },
          {
            "text": "\t\t\t\t'unitCode' =&gt; 'SMI',",
            "lineNumber": 117
          },
          {
            "text": "\t\t\t);",
            "lineNumber": 118
          },
          {
            "text": "\t\t}",
            "lineNumber": 119
          },
          {
            "lineNumber": 120
          },
          {
            "text": "\t\tif ( '' !== invp_get_the_engine( $post_ID ) || '' !== invp_get_the_fuel( $post_ID ) ) {",
            "lineNumber": 121
          },
          {
            "text": "\t\t\t$obj['vehicleEngine'] = array();",
            "lineNumber": 122
          },
          {
            "text": "\t\t\tif ( '' !== invp_get_the_engine( $post_ID ) ) {",
            "lineNumber": 123
          },
          {
            "text": "\t\t\t\t$obj['vehicleEngine']['engineType'] = wp_strip_all_tags( invp_get_the_engine( $post_ID ) );",
            "lineNumber": 124
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 125
          },
          {
            "text": "\t\t\tif ( '' !== invp_get_the_fuel( $post_ID ) ) {",
            "lineNumber": 126
          },
          {
            "text": "\t\t\t\t$obj['vehicleEngine']['fuelType'] = wp_strip_all_tags( invp_get_the_fuel( $post_ID ) );",
            "lineNumber": 127
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 128
          },
          {
            "text": "\t\t}",
            "lineNumber": 129
          },
          {
            "lineNumber": 130
          },
          {
            "text": "\t\tif ( '' !== invp_get_the_body_style( $post_ID ) ) {",
            "lineNumber": 131
          },
          {
            "text": "\t\t\t$obj['bodyType'] = wp_strip_all_tags( invp_get_the_body_style( $post_ID ) );",
            "lineNumber": 132
          },
          {
            "text": "\t\t}",
            "lineNumber": 133
          },
          {
            "lineNumber": 134
          },
          {
            "text": "\t\tif ( '' !== invp_get_the_color( $post_ID ) ) {",
            "lineNumber": 135
          },
          {
            "text": "\t\t\t$obj['color'] = wp_strip_all_tags( invp_get_the_color( $post_ID ) );",
            "lineNumber": 136
          },
          {
            "text": "\t\t}",
            "lineNumber": 137
          },
          {
            "lineNumber": 138
          },
          {
            "text": "\t\tif ( '' !== invp_get_the_interior_color( $post_ID ) ) {",
            "lineNumber": 139
          },
          {
            "text": "\t\t\t$obj['vehicleInteriorColor'] = wp_strip_all_tags( invp_get_the_interior_color( $post_ID ) );",
            "lineNumber": 140
          }
        ]
      },
      "score": 0.27093780040740967
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/admin/class-admin-options.php",
        "range": {
          "startPosition": {
            "line": 1262
          },
          "endPosition": {
            "line": 1329
          }
        },
        "contents": "\t * @return array\n\t */\n\tpublic static function taxonomies_setting_default( $settings = null ) {\n\t\t// Backwards compatibility with a deleted setting.\n\t\t$show_menu = $settings['show_all_taxonomies'] ?? false;\n\t\t// This array is used 10 times below.\n\t\t$common = array(\n\t\t\t'active'     =&gt; true,\n\t\t\t'admin_menu' =&gt; $show_menu,\n\t\t\t'atv'        =&gt; true,\n\t\t\t'boat'       =&gt; true,\n\t\t\t'bus'        =&gt; true,\n\t\t\t'mot'        =&gt; true,\n\t\t\t'mow'        =&gt; true,\n\t\t\t'oth'        =&gt; true,\n\t\t\t'car'        =&gt; true,\n\t\t\t'rv'         =&gt; true,\n\t\t\t'suv'        =&gt; true,\n\t\t\t'trlr'       =&gt; true,\n\t\t\t'tru'        =&gt; true,\n\t\t\t'van'        =&gt; true,\n\t\t);\n\t\treturn array(\n\t\t\t'model-year'      =&gt; $common,\n\t\t\t'make'            =&gt; $common,\n\t\t\t'model'           =&gt; $common,\n\t\t\t'condition'       =&gt; $common,\n\t\t\t'type'            =&gt; $common,\n\t\t\t'availability'    =&gt; $common,\n\t\t\t'drive-type'      =&gt; array(\n\t\t\t\t'active'     =&gt; true,\n\t\t\t\t'admin_menu' =&gt; $show_menu,\n\t\t\t\t'atv'        =&gt; true,\n\t\t\t\t'bus'        =&gt; true,\n\t\t\t\t'mot'        =&gt; true,\n\t\t\t\t'mow'        =&gt; true,\n\t\t\t\t'oth'        =&gt; true,\n\t\t\t\t'car'        =&gt; true,\n\t\t\t\t'rv'         =&gt; true,\n\t\t\t\t'suv'        =&gt; true,\n\t\t\t\t'trlr'       =&gt; true,\n\t\t\t\t'tru'        =&gt; true,\n\t\t\t\t'van'        =&gt; true,\n\t\t\t),\n\t\t\t'propulsion-type' =&gt; array(\n\t\t\t\t'active'     =&gt; true,\n\t\t\t\t'admin_menu' =&gt; $show_menu,\n\t\t\t\t'boat'       =&gt; true,\n\t\t\t),\n\t\t\t'fuel'            =&gt; $common,\n\t\t\t'transmission'    =&gt; array(\n\t\t\t\t'active'     =&gt; true,\n\t\t\t\t'admin_menu' =&gt; $show_menu,\n\t\t\t\t'atv'        =&gt; true,\n\t\t\t\t'bus'        =&gt; true,\n\t\t\t\t'mot'        =&gt; true,\n\t\t\t\t'mow'        =&gt; true,\n\t\t\t\t'oth'        =&gt; true,\n\t\t\t\t'car'        =&gt; true,\n\t\t\t\t'rv'         =&gt; true,\n\t\t\t\t'suv'        =&gt; true,\n\t\t\t\t'trlr'       =&gt; true,\n\t\t\t\t'tru'        =&gt; true,\n\t\t\t\t'van'        =&gt; true,\n\t\t\t),\n\t\t\t'cylinders'       =&gt; array(\n\t\t\t\t'active'     =&gt; true,",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t * @return array",
            "lineNumber": 1263
          },
          {
            "text": "\t */",
            "lineNumber": 1264
          },
          {
            "text": "\tpublic static function taxonomies_setting_default( $settings = null ) {",
            "lineNumber": 1265
          },
          {
            "text": "\t\t// Backwards compatibility with a deleted setting.",
            "lineNumber": 1266
          },
          {
            "text": "\t\t$show_menu = $settings['show_all_taxonomies'] ?? false;",
            "lineNumber": 1267
          },
          {
            "text": "\t\t// This array is used 10 times below.",
            "lineNumber": 1268
          },
          {
            "text": "\t\t$common = array(",
            "lineNumber": 1269
          },
          {
            "text": "\t\t\t'active'     =&gt; true,",
            "lineNumber": 1270
          },
          {
            "text": "\t\t\t'admin_menu' =&gt; $show_menu,",
            "lineNumber": 1271
          },
          {
            "text": "\t\t\t'atv'        =&gt; true,",
            "lineNumber": 1272
          },
          {
            "text": "\t\t\t'boat'       =&gt; true,",
            "lineNumber": 1273
          },
          {
            "text": "\t\t\t'bus'        =&gt; true,",
            "lineNumber": 1274
          },
          {
            "text": "\t\t\t'mot'        =&gt; true,",
            "lineNumber": 1275
          },
          {
            "text": "\t\t\t'mow'        =&gt; true,",
            "lineNumber": 1276
          },
          {
            "text": "\t\t\t'oth'        =&gt; true,",
            "lineNumber": 1277
          },
          {
            "text": "\t\t\t'car'        =&gt; true,",
            "lineNumber": 1278
          },
          {
            "text": "\t\t\t'rv'         =&gt; true,",
            "lineNumber": 1279
          },
          {
            "text": "\t\t\t'suv'        =&gt; true,",
            "lineNumber": 1280
          },
          {
            "text": "\t\t\t'trlr'       =&gt; true,",
            "lineNumber": 1281
          },
          {
            "text": "\t\t\t'tru'        =&gt; true,",
            "lineNumber": 1282
          },
          {
            "text": "\t\t\t'van'        =&gt; true,",
            "lineNumber": 1283
          },
          {
            "text": "\t\t);",
            "lineNumber": 1284
          },
          {
            "text": "\t\treturn array(",
            "lineNumber": 1285
          },
          {
            "text": "\t\t\t'model-year'      =&gt; $common,",
            "lineNumber": 1286
          },
          {
            "text": "\t\t\t'make'            =&gt; $common,",
            "lineNumber": 1287
          },
          {
            "text": "\t\t\t'model'           =&gt; $common,",
            "lineNumber": 1288
          },
          {
            "text": "\t\t\t'condition'       =&gt; $common,",
            "lineNumber": 1289
          },
          {
            "text": "\t\t\t'type'            =&gt; $common,",
            "lineNumber": 1290
          },
          {
            "text": "\t\t\t'availability'    =&gt; $common,",
            "lineNumber": 1291
          },
          {
            "text": "\t\t\t'drive-type'      =&gt; array(",
            "lineNumber": 1292
          },
          {
            "text": "\t\t\t\t'active'     =&gt; true,",
            "lineNumber": 1293
          },
          {
            "text": "\t\t\t\t'admin_menu' =&gt; $show_menu,",
            "lineNumber": 1294
          },
          {
            "text": "\t\t\t\t'atv'        =&gt; true,",
            "lineNumber": 1295
          },
          {
            "text": "\t\t\t\t'bus'        =&gt; true,",
            "lineNumber": 1296
          },
          {
            "text": "\t\t\t\t'mot'        =&gt; true,",
            "lineNumber": 1297
          },
          {
            "text": "\t\t\t\t'mow'        =&gt; true,",
            "lineNumber": 1298
          },
          {
            "text": "\t\t\t\t'oth'        =&gt; true,",
            "lineNumber": 1299
          },
          {
            "text": "\t\t\t\t'car'        =&gt; true,",
            "lineNumber": 1300
          },
          {
            "text": "\t\t\t\t'rv'         =&gt; true,",
            "lineNumber": 1301
          },
          {
            "text": "\t\t\t\t'suv'        =&gt; true,",
            "lineNumber": 1302
          },
          {
            "text": "\t\t\t\t'trlr'       =&gt; true,",
            "lineNumber": 1303
          },
          {
            "text": "\t\t\t\t'tru'        =&gt; true,",
            "lineNumber": 1304
          },
          {
            "text": "\t\t\t\t'van'        =&gt; true,",
            "lineNumber": 1305
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 1306
          },
          {
            "text": "\t\t\t'propulsion-type' =&gt; array(",
            "lineNumber": 1307
          },
          {
            "text": "\t\t\t\t'active'     =&gt; true,",
            "lineNumber": 1308
          },
          {
            "text": "\t\t\t\t'admin_menu' =&gt; $show_menu,",
            "lineNumber": 1309
          },
          {
            "text": "\t\t\t\t'boat'       =&gt; true,",
            "lineNumber": 1310
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 1311
          },
          {
            "text": "\t\t\t'fuel'            =&gt; $common,",
            "lineNumber": 1312
          },
          {
            "text": "\t\t\t'transmission'    =&gt; array(",
            "lineNumber": 1313
          },
          {
            "text": "\t\t\t\t'active'     =&gt; true,",
            "lineNumber": 1314
          },
          {
            "text": "\t\t\t\t'admin_menu' =&gt; $show_menu,",
            "lineNumber": 1315
          },
          {
            "text": "\t\t\t\t'atv'        =&gt; true,",
            "lineNumber": 1316
          },
          {
            "text": "\t\t\t\t'bus'        =&gt; true,",
            "lineNumber": 1317
          },
          {
            "text": "\t\t\t\t'mot'        =&gt; true,",
            "lineNumber": 1318
          },
          {
            "text": "\t\t\t\t'mow'        =&gt; true,",
            "lineNumber": 1319
          },
          {
            "text": "\t\t\t\t'oth'        =&gt; true,",
            "lineNumber": 1320
          },
          {
            "text": "\t\t\t\t'car'        =&gt; true,",
            "lineNumber": 1321
          },
          {
            "text": "\t\t\t\t'rv'         =&gt; true,",
            "lineNumber": 1322
          },
          {
            "text": "\t\t\t\t'suv'        =&gt; true,",
            "lineNumber": 1323
          },
          {
            "text": "\t\t\t\t'trlr'       =&gt; true,",
            "lineNumber": 1324
          },
          {
            "text": "\t\t\t\t'tru'        =&gt; true,",
            "lineNumber": 1325
          },
          {
            "text": "\t\t\t\t'van'        =&gt; true,",
            "lineNumber": 1326
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 1327
          },
          {
            "text": "\t\t\t'cylinders'       =&gt; array(",
            "lineNumber": 1328
          },
          {
            "text": "\t\t\t\t'active'     =&gt; true,",
            "lineNumber": 1329
          }
        ]
      },
      "score": 0.26938819885253906
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-taxonomies.php",
        "range": {
          "startPosition": {
            "line": 666
          },
          "endPosition": {
            "line": 697
          }
        },
        "contents": "\t\t\tarray(\n\t\t\t\t'args'      =&gt; array(\n\t\t\t\t\t'hierarchical'   =&gt; true,\n\t\t\t\t\t'label'          =&gt; __( 'Conditions', 'inventory-presser' ),\n\t\t\t\t\t'labels'         =&gt; array(\n\t\t\t\t\t\t'name'          =&gt; __( 'Conditions', 'inventory-presser' ),\n\t\t\t\t\t\t'singular_name' =&gt; __( 'Condition', 'inventory-presser' ),\n\t\t\t\t\t\t'search_items'  =&gt; __( 'Search new and used', 'inventory-presser' ),\n\t\t\t\t\t\t'popular_items' =&gt; __( 'Popular conditions', 'inventory-presser' ),\n\t\t\t\t\t\t'all_items'     =&gt; __( 'All new and used', 'inventory-presser' ),\n\t\t\t\t\t\t'parent_item'   =&gt; __( 'Parent Condition', 'inventory-presser' ),\n\t\t\t\t\t\t'edit_item'     =&gt; __( 'Edit Condition', 'inventory-presser' ),\n\t\t\t\t\t\t'add_new_item'  =&gt; __( 'Add New Condition', 'inventory-presser' ),\n\t\t\t\t\t\t'new_item_name' =&gt; __( 'New Condition Name', 'inventory-presser' ),\n\t\t\t\t\t\t'back_to_items' =&gt; __( '&amp;larr; Go to conditions', 'inventory-presser' ),\n\t\t\t\t\t),\n\t\t\t\t\t'meta_box_cb'    =&gt; array( 'Inventory_Presser_Taxonomies', 'meta_box_html' ),\n\t\t\t\t\t'query_var'      =&gt; 'condition',\n\t\t\t\t\t'singular_label' =&gt; __( 'Condition', 'inventory-presser' ),\n\t\t\t\t\t'show_in_menu'   =&gt; false,\n\t\t\t\t\t'show_in_rest'   =&gt; true,\n\t\t\t\t\t'show_ui'        =&gt; true,\n\t\t\t\t),\n\t\t\t\t'term_data' =&gt; array(\n\t\t\t\t\t'New'  =&gt; 'New',\n\t\t\t\t\t'Used' =&gt; 'Used',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'args'      =&gt; array(\n\t\t\t\t\t'hierarchical'   =&gt; true,",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\tarray(",
            "lineNumber": 667
          },
          {
            "text": "\t\t\t\t'args'      =&gt; array(",
            "lineNumber": 668
          },
          {
            "text": "\t\t\t\t\t'hierarchical'   =&gt; true,",
            "lineNumber": 669
          },
          {
            "text": "\t\t\t\t\t'label'          =&gt; __( 'Conditions', 'inventory-presser' ),",
            "lineNumber": 670
          },
          {
            "text": "\t\t\t\t\t'labels'         =&gt; array(",
            "lineNumber": 671
          },
          {
            "text": "\t\t\t\t\t\t'name'          =&gt; __( 'Conditions', 'inventory-presser' ),",
            "lineNumber": 672
          },
          {
            "text": "\t\t\t\t\t\t'singular_name' =&gt; __( 'Condition', 'inventory-presser' ),",
            "lineNumber": 673
          },
          {
            "text": "\t\t\t\t\t\t'search_items'  =&gt; __( 'Search new and used', 'inventory-presser' ),",
            "lineNumber": 674
          },
          {
            "text": "\t\t\t\t\t\t'popular_items' =&gt; __( 'Popular conditions', 'inventory-presser' ),",
            "lineNumber": 675
          },
          {
            "text": "\t\t\t\t\t\t'all_items'     =&gt; __( 'All new and used', 'inventory-presser' ),",
            "lineNumber": 676
          },
          {
            "text": "\t\t\t\t\t\t'parent_item'   =&gt; __( 'Parent Condition', 'inventory-presser' ),",
            "lineNumber": 677
          },
          {
            "text": "\t\t\t\t\t\t'edit_item'     =&gt; __( 'Edit Condition', 'inventory-presser' ),",
            "lineNumber": 678
          },
          {
            "text": "\t\t\t\t\t\t'add_new_item'  =&gt; __( 'Add New Condition', 'inventory-presser' ),",
            "lineNumber": 679
          },
          {
            "text": "\t\t\t\t\t\t'new_item_name' =&gt; __( 'New Condition Name', 'inventory-presser' ),",
            "lineNumber": 680
          },
          {
            "text": "\t\t\t\t\t\t'back_to_items' =&gt; __( '&amp;larr; Go to conditions', 'inventory-presser' ),",
            "lineNumber": 681
          },
          {
            "text": "\t\t\t\t\t),",
            "lineNumber": 682
          },
          {
            "text": "\t\t\t\t\t'meta_box_cb'    =&gt; array( 'Inventory_Presser_Taxonomies', 'meta_box_html' ),",
            "lineNumber": 683
          },
          {
            "text": "\t\t\t\t\t'query_var'      =&gt; 'condition',",
            "lineNumber": 684
          },
          {
            "text": "\t\t\t\t\t'singular_label' =&gt; __( 'Condition', 'inventory-presser' ),",
            "lineNumber": 685
          },
          {
            "text": "\t\t\t\t\t'show_in_menu'   =&gt; false,",
            "lineNumber": 686
          },
          {
            "text": "\t\t\t\t\t'show_in_rest'   =&gt; true,",
            "lineNumber": 687
          },
          {
            "text": "\t\t\t\t\t'show_ui'        =&gt; true,",
            "lineNumber": 688
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 689
          },
          {
            "text": "\t\t\t\t'term_data' =&gt; array(",
            "lineNumber": 690
          },
          {
            "text": "\t\t\t\t\t'New'  =&gt; 'New',",
            "lineNumber": 691
          },
          {
            "text": "\t\t\t\t\t'Used' =&gt; 'Used',",
            "lineNumber": 692
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 693
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 694
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 695
          },
          {
            "text": "\t\t\t\t'args'      =&gt; array(",
            "lineNumber": 696
          },
          {
            "text": "\t\t\t\t\t'hierarchical'   =&gt; true,",
            "lineNumber": 697
          }
        ]
      },
      "score": 0.2670837640762329
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/template-tags.php",
        "range": {
          "startPosition": {
            "line": 235
          },
          "endPosition": {
            "line": 300
          }
        },
        "contents": "/**\n * Template tag. Returns the drive type, or a description of how many driven\n * wheels are on the vehicle.\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_drive_type( $post_ID = null ) {\n\treturn INVP::get_meta( 'drive_type', $post_ID );\n}\n\n/**\n * invp_get_the_edmunds_style_id\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_edmunds_style_id( $post_ID = null ) {\n\treturn INVP::get_meta( 'edmunds_style_id', $post_ID );\n}\n\n/**\n * invp_get_the_engine\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_engine( $post_ID = null ) {\n\treturn INVP::get_meta( 'engine', $post_ID );\n}\n\n/**\n * invp_get_the_engine_count\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_engine_count( $post_ID = null ) {\n\treturn INVP::get_meta( 'engine_count', $post_ID );\n}\n\n/**\n * invp_get_the_engine_make\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_engine_make( $post_ID = null ) {\n\treturn INVP::get_meta( 'engine_make', $post_ID );\n}\n\n/**\n * invp_get_the_engine_model\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.\n * @return string\n */\nfunction invp_get_the_engine_model( $post_ID = null ) {\n\treturn INVP::get_meta( 'engine_model', $post_ID );\n}\n\n/**\n * invp_get_the_fuel\n *\n * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
        "signatures": {},
        "detailedLines": [
          {
            "text": "/**",
            "lineNumber": 236
          },
          {
            "text": " * Template tag. Returns the drive type, or a description of how many driven",
            "lineNumber": 237
          },
          {
            "text": " * wheels are on the vehicle.",
            "lineNumber": 238
          },
          {
            "text": " *",
            "lineNumber": 239
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 240
          },
          {
            "text": " * @return string",
            "lineNumber": 241
          },
          {
            "text": " */",
            "lineNumber": 242
          },
          {
            "text": "function invp_get_the_drive_type( $post_ID = null ) {",
            "lineNumber": 243
          },
          {
            "text": "\treturn INVP::get_meta( 'drive_type', $post_ID );",
            "lineNumber": 244
          },
          {
            "text": "}",
            "lineNumber": 245
          },
          {
            "lineNumber": 246
          },
          {
            "text": "/**",
            "lineNumber": 247
          },
          {
            "text": " * invp_get_the_edmunds_style_id",
            "lineNumber": 248
          },
          {
            "text": " *",
            "lineNumber": 249
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 250
          },
          {
            "text": " * @return string",
            "lineNumber": 251
          },
          {
            "text": " */",
            "lineNumber": 252
          },
          {
            "text": "function invp_get_the_edmunds_style_id( $post_ID = null ) {",
            "lineNumber": 253
          },
          {
            "text": "\treturn INVP::get_meta( 'edmunds_style_id', $post_ID );",
            "lineNumber": 254
          },
          {
            "text": "}",
            "lineNumber": 255
          },
          {
            "lineNumber": 256
          },
          {
            "text": "/**",
            "lineNumber": 257
          },
          {
            "text": " * invp_get_the_engine",
            "lineNumber": 258
          },
          {
            "text": " *",
            "lineNumber": 259
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 260
          },
          {
            "text": " * @return string",
            "lineNumber": 261
          },
          {
            "text": " */",
            "lineNumber": 262
          },
          {
            "text": "function invp_get_the_engine( $post_ID = null ) {",
            "lineNumber": 263
          },
          {
            "text": "\treturn INVP::get_meta( 'engine', $post_ID );",
            "lineNumber": 264
          },
          {
            "text": "}",
            "lineNumber": 265
          },
          {
            "lineNumber": 266
          },
          {
            "text": "/**",
            "lineNumber": 267
          },
          {
            "text": " * invp_get_the_engine_count",
            "lineNumber": 268
          },
          {
            "text": " *",
            "lineNumber": 269
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 270
          },
          {
            "text": " * @return string",
            "lineNumber": 271
          },
          {
            "text": " */",
            "lineNumber": 272
          },
          {
            "text": "function invp_get_the_engine_count( $post_ID = null ) {",
            "lineNumber": 273
          },
          {
            "text": "\treturn INVP::get_meta( 'engine_count', $post_ID );",
            "lineNumber": 274
          },
          {
            "text": "}",
            "lineNumber": 275
          },
          {
            "lineNumber": 276
          },
          {
            "text": "/**",
            "lineNumber": 277
          },
          {
            "text": " * invp_get_the_engine_make",
            "lineNumber": 278
          },
          {
            "text": " *",
            "lineNumber": 279
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 280
          },
          {
            "text": " * @return string",
            "lineNumber": 281
          },
          {
            "text": " */",
            "lineNumber": 282
          },
          {
            "text": "function invp_get_the_engine_make( $post_ID = null ) {",
            "lineNumber": 283
          },
          {
            "text": "\treturn INVP::get_meta( 'engine_make', $post_ID );",
            "lineNumber": 284
          },
          {
            "text": "}",
            "lineNumber": 285
          },
          {
            "lineNumber": 286
          },
          {
            "text": "/**",
            "lineNumber": 287
          },
          {
            "text": " * invp_get_the_engine_model",
            "lineNumber": 288
          },
          {
            "text": " *",
            "lineNumber": 289
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 290
          },
          {
            "text": " * @return string",
            "lineNumber": 291
          },
          {
            "text": " */",
            "lineNumber": 292
          },
          {
            "text": "function invp_get_the_engine_model( $post_ID = null ) {",
            "lineNumber": 293
          },
          {
            "text": "\treturn INVP::get_meta( 'engine_model', $post_ID );",
            "lineNumber": 294
          },
          {
            "text": "}",
            "lineNumber": 295
          },
          {
            "lineNumber": 296
          },
          {
            "text": "/**",
            "lineNumber": 297
          },
          {
            "text": " * invp_get_the_fuel",
            "lineNumber": 298
          },
          {
            "text": " *",
            "lineNumber": 299
          },
          {
            "text": " * @param  int|null $post_ID     The post ID of a vehicle. Must be passed when using this method outside the loop.",
            "lineNumber": 300
          }
        ]
      },
      "score": 0.26680779457092285
    }
  ]
}
```
Status: **completed**


</details>
</tool-use>

---


Checking how other shortcodes handle similar meta fields for consistency:


---

<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/shortcode/class-shortcode-archive-vehicle.php</summary>

</details>
</tool-use>

---

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


Parameters:

```json
{
  "pattern": "tax_query.*type|tax_query.*condition",
  "path": "includes",
  "caseInsensitive": true
}
```
Result:

```json
{
  "success": {
    "pattern": "tax_query.*type|tax_query.*condition",
    "path": "includes",
    "outputMode": "content",
    "workspaceResults": {
      "/Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser": {
        "content": {}
      }
    }
  }
}
```
Status: **completed**


</details>
</tool-use>

---


Adding `type` and `condition` arguments to the shortcode. Both are meta fields; treating them like `model` with exact matches. Updating the shortcode:


---

<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/shortcode/class-shortcode-inventory-slider.php</summary>

</details>

</tool-use>

---

<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/shortcode/class-shortcode-inventory-slider.php</summary>

</details>

</tool-use>

---


Verifying the changes look correct:


---

<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/shortcode/class-shortcode-inventory-slider.php</summary>

</details>
</tool-use>

---


Checking for linting errors:


---

<tool-use data-tool-type="generic" data-tool-name="read_lints">
<details>
          <summary>Tool use: **read_lints** • Read lints for 1 file</summary>
      
Lint paths:

- `includes/shortcode/class-shortcode-inventory-slider.php`

Lint results

Lint errors for `includes/shortcode/class-shortcode-inventory-slider.php`


| Message | Range | Severity |
|-------|-------|----------|
| Class file names should be based on the class name with "class-" prepended. Expected class-inventory-presser-shortcode-slider.php, but found class-shortcode-inventory-slider.php. | 1:1-1:2 | DIAGNOSTIC_SEVERITY_ERROR |
| Missing file doc comment | 1:1-1:2 | DIAGNOSTIC_SEVERITY_ERROR |
| Missing parameter comment | 33:5-33:11 | DIAGNOSTIC_SEVERITY_ERROR |
| Missing doc comment for function add_make_and_model_query_args() | 104:19-104:27 | DIAGNOSTIC_SEVERITY_ERROR |
| Detected usage of tax_query, possible slow query. | 107:4-107:26 | DIAGNOSTIC_SEVERITY_WARNING |
| Method name "get_vehicle_IDs" in class Inventory_Presser_Shortcode_Slider is not in snake case format, try "get_vehicle_i_ds" | 146:16-146:24 | DIAGNOSTIC_SEVERITY_ERROR |
| Missing doc comment for function get_vehicle_IDs() | 146:16-146:24 | DIAGNOSTIC_SEVERITY_ERROR |
| Detected usage of meta_query, possible slow query. | 150:4-150:15 | DIAGNOSTIC_SEVERITY_WARNING |
| Detected usage of meta_query, possible slow query. | 174:17-174:21 | DIAGNOSTIC_SEVERITY_WARNING |


</details>
</tool-use>

---


The linting errors are pre-existing (naming conventions, doc comments, etc.) and not related to these changes.

## Summary

Added `type` and `condition` arguments to the `invp-inventory-slider` shortcode.

1. Added to shortcode attributes (lines 42-43):
   - `'type' => ''`
   - `'condition' => ''`

2. Added filtering logic (lines 125-141):
   - Both use meta queries with exact match (`compare => '='`)
   - Both use `apply_filters( 'invp_prefix_meta_key', ... )` for consistent meta key handling
   - Filters are appended to the existing `meta_query` array, which already has `relation => 'AND'` set

Usage examples:
- `[invp-inventory-slider type="SUV"]`
- `[invp-inventory-slider type="car" condition="used"]`
- `[invp-inventory-slider type="SUV" condition="new" make="Toyota"]`

The filters work together with existing `make` and `model` filters, so you can combine them as needed.

---

_**User**_

i tried to put 2 [invp_inventory_slider] shortcodes on the same page and this shows up in the console:

Uncaught SyntaxError: redeclaration of const widget_slider buyrichsautos.test:806:7note: Previously declared at line 805, column 7buyrichsautos.test:805:7


---

_**Agent (model composer-1, mode Agent)**_


The issue is that each shortcode instance declares `const widget_slider`, causing a redeclaration error. Checking how the JavaScript uses this variable to fix it:


---

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


Parameters:

```json
{
  "pattern": "widget_slider",
  "path": "js",
  "caseInsensitive": false
}
```
Result:

```json
{
  "success": {
    "pattern": "widget_slider",
    "path": "js",
    "outputMode": "content",
    "workspaceResults": {
      "/Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser": {
        "content": {
          "matches": [
            {
              "file": "js/widget-slider.min.js",
              "matches": [
                {
                  "lineNumber": 1,
                  "content": "window.addEventListener(\"load\",(function(e){document.documentElement.clientWidth&lt;=480&amp;&amp;widget_slider.showcount&gt;2&amp;&amp;(widget_slider.showcount=2);var flexslider=document.querySelector(\".widget__invp_slick .flexslider\");jQuery(flexslider).flexslider({animation:\"slide\",slideshow:!0,animationSpeed:4e3,slideshowSpeed:8e3,controlNav:!1,directionNav:!0,prevText:\"\",nextText:\"\",itemWidth:Math.round(jQuery(\".widget__invp_slick #slider-width\").width()/widget_slider.showcount+.5),smoothHeight:!1,start:function(){var current_image_height=jQuery(\".widget__invp_slick .flexslider\").css(\"height\").replace(\"px\",\"\");jQuery(\".widget__invp_slick .flexslider .flex-direction-nav a,.widget__invp_slick .flexslider .flex-direction-nav li\").css(\"line-height\",current_image_height+\"px\");var navLinks=document.querySelectorAll(\"#widget_slider.flexslider .flex-direction-nav a\");navLinks.length&amp;&amp;navLinks.forEach((l=&gt;{var firstImage=l.parentNode.parentNode.parentNode.querySelector(\".slides li:first-child img\");if(firstImag [... omitted end of long line]"
                }
              ]
            },
            {
              "file": "js/widget-slider.js",
              "matches": [
                {
                  "lineNumber": 8,
                  "content": "\t\t&amp;&amp; widget_slider.showcount &gt; 2 ) {"
                },
                {
                  "lineNumber": 9,
                  "content": "\t\twidget_slider.showcount = 2;"
                },
                {
                  "lineNumber": 21,
                  "content": "\t\titemWidth: (Math.round(jQuery('.widget__invp_slick #slider-width').width() / widget_slider.showcount + .5)), /* widget_slider.showcount is how many slides to show at one time*/"
                },
                {
                  "lineNumber": 28,
                  "content": "\t\t\tvar navLinks = document.querySelectorAll( '#widget_slider.flexslider .flex-direction-nav a' );"
                }
              ]
            }
          ],
          "totalLines": 5,
          "totalMatchedLines": 5
        }
      }
    }
  }
}
```
Status: **completed**


</details>
</tool-use>

---

<tool-use data-tool-type="generic" data-tool-name="glob_file_search">
<details>
<summary>Tool use: **glob_file_search** • Searched codebase "undefined" • **0** result in **1** directory</summary>

Directory: **undefined** (0 file)

</details>
</tool-use>

---





---

<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/js/widget-slider.js</summary>

</details>
</tool-use>

---


Fixing the redeclaration: each shortcode instance declares `const widget_slider`. Updating the code to avoid redeclaring it:


---

<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/shortcode/class-shortcode-inventory-slider.php</summary>

</details>
</tool-use>

---


Replacing `const` with `var` to avoid redeclaration errors when multiple shortcodes are on the same page:


---

<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/shortcode/class-shortcode-inventory-slider.php</summary>

</details>

</tool-use>

---


Fixed the redeclaration error. The issue was using `const`, which can't be redeclared. Changed it to `var`, which allows redeclaration when multiple shortcodes are on the same page.

**Note:** The JavaScript (`widget-slider.js`) uses `document.querySelector`, which only initializes the first slider on the page. If you need multiple sliders with different `showcount` values, we'll need to update the JavaScript to handle multiple instances. For now, this fixes the console error.

The shortcode should now work without JavaScript errors when used multiple times on the same page.

---

_**User**_

yes, i want to handle multiple sliders on the same page

---

_**Agent (model composer-1, mode Agent)**_


Updating the code to support multiple sliders on the same page. Each slider needs a unique ID and its own configuration. Reviewing the current implementation:


---

<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/shortcode/class-shortcode-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** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/js/widget-slider.js</summary>

</details>
</tool-use>

---


Updating the code to support multiple sliders: generating unique IDs for each slider and updating the JavaScript to initialize all sliders.


---

<tool-use data-tool-type="task" data-tool-name="todo_write">
<details><summary>Tool use: **todo_write** • Todo List</summary>

- [-] Update PHP to generate unique IDs for each slider instance
- [ ] Store slider configurations in a global object accessible to JavaScript
- [ ] Update JavaScript to initialize all sliders on the page with their individual configs

</details>
</tool-use>

---

<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/shortcode/class-shortcode-inventory-slider.php</summary>

</details>

</tool-use>

---

<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/shortcode/class-shortcode-inventory-slider.php</summary>

</details>

</tool-use>

---

Incorrect tool arguments

---


Updating the JavaScript to initialize all sliders:


---

<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/js/widget-slider.js</summary>

</details>

</tool-use>

---

<tool-use data-tool-type="task" data-tool-name="todo_write">
<details><summary>Tool use: **todo_write** • Todo List</summary>

- [x] Update PHP to generate unique IDs for each slider instance
- [x] Store slider configurations in a global object accessible to JavaScript
- [x] Update JavaScript to initialize all sliders on the page with their individual configs

</details>
</tool-use>

---


Checking for a minified JavaScript file that needs updating:


---

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

Directory: **undefined** (2 files)

| File |
|------|
| `./js/widget-slider.js` |
| `./js/widget-slider.min.js` |

</details>
</tool-use>

---

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


Parameters:

```json
{
  "paths": [
    "includes/shortcode/class-shortcode-inventory-slider.php",
    "js/widget-slider.js"
  ]
}
```
Result:

```json
{
  "linterErrorsByFile": [
    {
      "relativeWorkspacePath": "includes/shortcode/class-shortcode-inventory-slider.php",
      "errors": [
        {
          "message": "Class file names should be based on the class name with \"class-\" prepended. Expected class-inventory-presser-shortcode-slider.php, but found class-shortcode-inventory-slider.php.",
          "range": {
            "startPosition": {
              "line": 1,
              "column": 1
            },
            "endPosition": {
              "line": 1,
              "column": 2
            }
          },
          "source": "phpcs",
          "severity": "DIAGNOSTIC_SEVERITY_ERROR"
        },
        {
          "message": "Missing file doc comment",
          "range": {
            "startPosition": {
              "line": 1,
              "column": 1
            },
            "endPosition": {
              "line": 1,
              "column": 2
            }
          },
          "source": "phpcs",
          "severity": "DIAGNOSTIC_SEVERITY_ERROR"
        },
        {
          "message": "Missing parameter comment",
          "range": {
            "startPosition": {
              "line": 40,
              "column": 5
            },
            "endPosition": {
              "line": 40,
              "column": 11
            }
          },
          "source": "phpcs",
          "severity": "DIAGNOSTIC_SEVERITY_ERROR"
        },
        {
          "message": "Stand-alone post-increment statement found. Use pre-increment instead: ++self::$slider_counter.",
          "range": {
            "startPosition": {
              "line": 77,
              "column": 30
            },
            "endPosition": {
              "line": 77,
              "column": 31
            }
          },
          "source": "phpcs",
          "severity": "DIAGNOSTIC_SEVERITY_WARNING"
        },
        {
          "message": "Missing doc comment for function add_make_and_model_query_args()",
          "range": {
            "startPosition": {
              "line": 123,
              "column": 19
            },
            "endPosition": {
              "line": 123,
              "column": 27
            }
          },
          "source": "phpcs",
          "severity": "DIAGNOSTIC_SEVERITY_ERROR"
        },
        {
          "message": "Detected usage of tax_query, possible slow query.",
          "range": {
            "startPosition": {
              "line": 126,
              "column": 4
            },
            "endPosition": {
              "line": 126,
              "column": 26
            }
          },
          "source": "phpcs",
          "severity": "DIAGNOSTIC_SEVERITY_WARNING"
        },
        {
          "message": "Method name \"get_vehicle_IDs\" in class Inventory_Presser_Shortcode_Slider is not in snake case format, try \"get_vehicle_i_ds\"",
          "range": {
            "startPosition": {
              "line": 165,
              "column": 16
            },
            "endPosition": {
              "line": 165,
              "column": 24
            }
          },
          "source": "phpcs",
          "severity": "DIAGNOSTIC_SEVERITY_ERROR"
        },
        {
          "message": "Missing doc comment for function get_vehicle_IDs()",
          "range": {
            "startPosition": {
              "line": 165,
              "column": 16
            },
            "endPosition": {
              "line": 165,
              "column": 24
            }
          },
          "source": "phpcs",
          "severity": "DIAGNOSTIC_SEVERITY_ERROR"
        },
        {
          "message": "Detected usage of meta_query, possible slow query.",
          "range": {
            "startPosition": {
              "line": 169,
              "column": 4
            },
            "endPosition": {
              "line": 169,
              "column": 15
            }
          },
          "source": "phpcs",
          "severity": "DIAGNOSTIC_SEVERITY_WARNING"
        },
        {
          "message": "Detected usage of meta_query, possible slow query.",
          "range": {
            "startPosition": {
              "line": 193,
              "column": 17
            },
            "endPosition": {
              "line": 193,
              "column": 21
            }
          },
          "source": "phpcs",
          "severity": "DIAGNOSTIC_SEVERITY_WARNING"
        }
      ]
    },
    {
      "relativeWorkspacePath": "js/widget-slider.js"
    }
  ]
}
```
Status: **completed**


</details>
</tool-use>

---


Fixing the pre-increment warning, then checking the minified file:


---

<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/shortcode/class-shortcode-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** • Read file: /Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser/js/widget-slider.min.js</summary>

</details>
</tool-use>

---


Updating the minified JavaScript file. Checking for a build process first:


---

<tool-use data-tool-type="generic" data-tool-name="glob_file_search">
<details>
<summary>Tool use: **glob_file_search** • Searched codebase "undefined" • **1** result in **1** directory</summary>

Directory: **undefined** (1 file)

| File |
|------|
| `./package.json` |

</details>
</tool-use>

---

<tool-use data-tool-type="generic" data-tool-name="glob_file_search">
<details>
<summary>Tool use: **glob_file_search** • Searched codebase "undefined" • **0** result in **1** directory</summary>

Directory: **undefined** (0 file)

</details>
</tool-use>

---

<tool-use data-tool-type="generic" data-tool-name="glob_file_search">
<details>
<summary>Tool use: **glob_file_search** • Searched codebase "undefined" • **0** result in **1** directory</summary>

Directory: **undefined** (0 file)

</details>
</tool-use>

---





---

<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/package.json</summary>

</details>
</tool-use>

---


Creating a minified version of the updated JavaScript. Checking how the script is enqueued to ensure the minified version is used:


---

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


Parameters:

```json
{
  "pattern": "widget-slider|invp-slider",
  "path": "includes",
  "caseInsensitive": false
}
```
Result:

```json
{
  "success": {
    "pattern": "widget-slider|invp-slider",
    "path": "includes",
    "outputMode": "content",
    "workspaceResults": {
      "/Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser": {
        "content": {
          "matches": [
            {
              "file": "includes/shortcode/class-shortcode-inventory-slider.php",
              "matches": [
                {
                  "lineNumber": 68,
                  "content": "\t\tif ( ! wp_script_is( 'invp-slider', 'registered' ) ) {"
                },
                {
                  "lineNumber": 74,
                  "content": "\t\twp_enqueue_style( 'invp-slider' );"
                },
                {
                  "lineNumber": 78,
                  "content": "\t\t$slider_id        = 'invp-slider-' . self::$slider_counter;"
                },
                {
                  "lineNumber": 85,
                  "content": "\t\t\t'invp-slider',"
                },
                {
                  "lineNumber": 95,
                  "content": "\t\twp_enqueue_script( 'invp-slider' );"
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-inventory-slider.php",
              "matches": [
                {
                  "lineNumber": 74,
                  "content": "\t\twp_enqueue_style( 'invp-slider' );"
                },
                {
                  "lineNumber": 77,
                  "content": "\t\twp_enqueue_script( 'invp-slider' );"
                },
                {
                  "lineNumber": 80,
                  "content": "\t\t\t'invp-slider',"
                }
              ]
            }
          ],
          "totalLines": 8,
          "totalMatchedLines": 8
        }
      }
    }
  }
}
```
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>


Parameters:

```json
{
  "pattern": "register.*invp-slider|wp_register_script.*slider",
  "path": "includes",
  "caseInsensitive": true
}
```
Result:

```json
{
  "success": {
    "pattern": "register.*invp-slider|wp_register_script.*slider",
    "path": "includes",
    "outputMode": "content",
    "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="semantic_search_full">
<details>
<summary>Tool use: **semantic_search_full**</summary>


Parameters:

```json
{
  "query": "How is the invp-slider script registered and enqueued?",
  "topK": 10,
  "explanation": ""
}
```
Result:

```json
{
  "codeResults": [
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1263
          },
          "endPosition": {
            "line": 1304,
            "column": 9
          }
        },
        "contents": "\r\n\t\t\t// Register a script without a .js URL for our inline invp object.\r\n\t\t\tif ( ! wp_script_is( 'invp', 'registered' ) ) {\r\n\t\t\t\t$settings = INVP::settings();\r\n\t\t\t\twp_register_script( 'invp', '', array(), INVP_PLUGIN_VERSION, true );\r\n\t\t\t\twp_add_inline_script(\r\n\t\t\t\t\t'invp',\r\n\t\t\t\t\t'var invp = ' . wp_json_encode(\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t'hull_materials'      =&gt; apply_filters(\r\n\t\t\t\t\t\t\t\t'invp_default_hull_materials',\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t__( 'Aluminum', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Carbon Fiber', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Composite', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Ferro-Cement', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Fiberglass', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Hypalon', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Other', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'PVC', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Steel', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Wood', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'is_singular'         =&gt; is_singular( INVP::POST_TYPE ), // Used by flexslider.js.\r\n\t\t\t\t\t\t\t'meta_prefix'         =&gt; INVP::meta_prefix(), // Used by classic-editor.js &amp; editor-sidebar.js.\r\n\t\t\t\t\t\t\t'odometer_label'      =&gt; apply_filters( 'invp_odometer_word', __( 'Odometer', 'inventory-presser' ) ),\r\n\t\t\t\t\t\t\t'odometer_units'      =&gt; apply_filters( 'invp_odometer_word', __( 'miles', 'inventory-presser' ) ),\r\n\t\t\t\t\t\t\t'payment_frequencies' =&gt; apply_filters(\r\n\t\t\t\t\t\t\t\t'invp_default_payment_frequencies',\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'Monthly'      =&gt; 'monthly',\r\n\t\t\t\t\t\t\t\t\t'Weekly'       =&gt; 'weekly',\r\n\t\t\t\t\t\t\t\t\t'Bi-weekly'    =&gt; 'biweekly',\r\n\t\t\t\t\t\t\t\t\t'Semi-monthly' =&gt; 'semimonthly',\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'taxonomies'          =&gt; $settings['taxonomies'] ?? array(),\r\n\t\t\t\t\t\t\t'title_statuses'      =&gt; apply_filters(\r\n\t\t\t\t\t\t\t\t'invp_default_title_statuses',\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\r",
            "lineNumber": 1264
          },
          {
            "text": "\t\t\t// Register a script without a .js URL for our inline invp object.\r",
            "lineNumber": 1265
          },
          {
            "text": "\t\t\tif ( ! wp_script_is( 'invp', 'registered' ) ) {\r",
            "lineNumber": 1266
          },
          {
            "text": "\t\t\t\t$settings = INVP::settings();\r",
            "lineNumber": 1267
          },
          {
            "text": "\t\t\t\twp_register_script( 'invp', '', array(), INVP_PLUGIN_VERSION, true );\r",
            "lineNumber": 1268
          },
          {
            "text": "\t\t\t\twp_add_inline_script(\r",
            "lineNumber": 1269
          },
          {
            "text": "\t\t\t\t\t'invp',\r",
            "lineNumber": 1270
          },
          {
            "text": "\t\t\t\t\t'var invp = ' . wp_json_encode(\r",
            "lineNumber": 1271
          },
          {
            "text": "\t\t\t\t\t\tarray(\r",
            "lineNumber": 1272
          },
          {
            "text": "\t\t\t\t\t\t\t'hull_materials'      =&gt; apply_filters(\r",
            "lineNumber": 1273
          },
          {
            "text": "\t\t\t\t\t\t\t\t'invp_default_hull_materials',\r",
            "lineNumber": 1274
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 1275
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Aluminum', 'inventory-presser' ),\r",
            "lineNumber": 1276
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Carbon Fiber', 'inventory-presser' ),\r",
            "lineNumber": 1277
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Composite', 'inventory-presser' ),\r",
            "lineNumber": 1278
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Ferro-Cement', 'inventory-presser' ),\r",
            "lineNumber": 1279
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Fiberglass', 'inventory-presser' ),\r",
            "lineNumber": 1280
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Hypalon', 'inventory-presser' ),\r",
            "lineNumber": 1281
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Other', 'inventory-presser' ),\r",
            "lineNumber": 1282
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'PVC', 'inventory-presser' ),\r",
            "lineNumber": 1283
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Steel', 'inventory-presser' ),\r",
            "lineNumber": 1284
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Wood', 'inventory-presser' ),\r",
            "lineNumber": 1285
          },
          {
            "text": "\t\t\t\t\t\t\t\t)\r",
            "lineNumber": 1286
          },
          {
            "text": "\t\t\t\t\t\t\t),\r",
            "lineNumber": 1287
          },
          {
            "text": "\t\t\t\t\t\t\t'is_singular'         =&gt; is_singular( INVP::POST_TYPE ), // Used by flexslider.js.\r",
            "lineNumber": 1288
          },
          {
            "text": "\t\t\t\t\t\t\t'meta_prefix'         =&gt; INVP::meta_prefix(), // Used by classic-editor.js &amp; editor-sidebar.js.\r",
            "lineNumber": 1289
          },
          {
            "text": "\t\t\t\t\t\t\t'odometer_label'      =&gt; apply_filters( 'invp_odometer_word', __( 'Odometer', 'inventory-presser' ) ),\r",
            "lineNumber": 1290
          },
          {
            "text": "\t\t\t\t\t\t\t'odometer_units'      =&gt; apply_filters( 'invp_odometer_word', __( 'miles', 'inventory-presser' ) ),\r",
            "lineNumber": 1291
          },
          {
            "text": "\t\t\t\t\t\t\t'payment_frequencies' =&gt; apply_filters(\r",
            "lineNumber": 1292
          },
          {
            "text": "\t\t\t\t\t\t\t\t'invp_default_payment_frequencies',\r",
            "lineNumber": 1293
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 1294
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'Monthly'      =&gt; 'monthly',\r",
            "lineNumber": 1295
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'Weekly'       =&gt; 'weekly',\r",
            "lineNumber": 1296
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'Bi-weekly'    =&gt; 'biweekly',\r",
            "lineNumber": 1297
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t'Semi-monthly' =&gt; 'semimonthly',\r",
            "lineNumber": 1298
          },
          {
            "text": "\t\t\t\t\t\t\t\t)\r",
            "lineNumber": 1299
          },
          {
            "text": "\t\t\t\t\t\t\t),\r",
            "lineNumber": 1300
          },
          {
            "text": "\t\t\t\t\t\t\t'taxonomies'          =&gt; $settings['taxonomies'] ?? array(),\r",
            "lineNumber": 1301
          },
          {
            "text": "\t\t\t\t\t\t\t'title_statuses'      =&gt; apply_filters(\r",
            "lineNumber": 1302
          },
          {
            "text": "\t\t\t\t\t\t\t\t'invp_default_title_statuses',\r",
            "lineNumber": 1303
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 1304
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t",
            "lineNumber": 1305
          }
        ]
      },
      "score": 0.511208713054657
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1188
          },
          "endPosition": {
            "line": 1235,
            "column": 4
          }
        },
        "contents": "\t\t\t\t'shortcode/class-shortcode-vin.php',\r\n\t\t\t\t'class-taxonomies.php',\r\n\t\t\t\t'class-taxonomy-overlapper.php',\r\n\t\t\t\t'class-template-provider.php',\r\n\t\t\t\t'class-vehicle-urls-by-vin.php',\r\n\t\t\t\t'widget/class-widget-address.php',\r\n\t\t\t\t'widget/class-widget-carfax.php',\r\n\t\t\t\t'widget/class-widget-fuel-economy.php',\r\n\t\t\t\t'widget/class-widget-google-maps.php',\r\n\t\t\t\t'widget/class-widget-google-maps-v3.php',\r\n\t\t\t\t'widget/class-widget-hours.php',\r\n\t\t\t\t'widget/class-widget-inventory-grid.php',\r\n\t\t\t\t'widget/class-widget-inventory-slider.php',\r\n\t\t\t\t'widget/class-widget-kbb.php',\r\n\t\t\t\t'widget/class-widget-map.php',\r\n\t\t\t\t'widget/class-widget-order-by.php',\r\n\t\t\t\t'widget/class-widget-phones.php',\r\n\t\t\t\t'widget/class-widget-maximum-price-filter.php',\r\n\t\t\t\t'template-tags.php',\r\n\t\t\t);\r\n\t\t\tforeach ( $file_names as $file_name ) {\r\n\t\t\t\t$path = plugin_dir_path( INVP_PLUGIN_FILE_PATH ) . 'includes/' . $file_name;\r\n\t\t\t\tif ( file_exists( $path ) ) {\r\n\t\t\t\t\tinclude $path;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Registers JavaScripts and stylesheets for front-end users and dashboard\r\n\t\t * users. Includes some inline styles and scripts depending on the plugin\r\n\t\t * settings and page request.\r\n\t\t *\r\n\t\t * @return void\r\n\t\t */\r\n\t\tpublic static function include_scripts_and_styles() {\r\n\r\n\t\t\t// This method might have run already.\r\n\t\t\tif ( wp_script_is( 'invp-slider', 'registered' ) ) {\r\n\t\t\t\t// Abort.\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Allow dashicons use on frontend.\r\n\t\t\twp_enqueue_style( 'dashicons' );\r\n\r\n\t\t\t/**\r\n\t\t\t ",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-vin.php',\r",
            "lineNumber": 1189
          },
          {
            "text": "\t\t\t\t'class-taxonomies.php',\r",
            "lineNumber": 1190
          },
          {
            "text": "\t\t\t\t'class-taxonomy-overlapper.php',\r",
            "lineNumber": 1191
          },
          {
            "text": "\t\t\t\t'class-template-provider.php',\r",
            "lineNumber": 1192
          },
          {
            "text": "\t\t\t\t'class-vehicle-urls-by-vin.php',\r",
            "lineNumber": 1193
          },
          {
            "text": "\t\t\t\t'widget/class-widget-address.php',\r",
            "lineNumber": 1194
          },
          {
            "text": "\t\t\t\t'widget/class-widget-carfax.php',\r",
            "lineNumber": 1195
          },
          {
            "text": "\t\t\t\t'widget/class-widget-fuel-economy.php',\r",
            "lineNumber": 1196
          },
          {
            "text": "\t\t\t\t'widget/class-widget-google-maps.php',\r",
            "lineNumber": 1197
          },
          {
            "text": "\t\t\t\t'widget/class-widget-google-maps-v3.php',\r",
            "lineNumber": 1198
          },
          {
            "text": "\t\t\t\t'widget/class-widget-hours.php',\r",
            "lineNumber": 1199
          },
          {
            "text": "\t\t\t\t'widget/class-widget-inventory-grid.php',\r",
            "lineNumber": 1200
          },
          {
            "text": "\t\t\t\t'widget/class-widget-inventory-slider.php',\r",
            "lineNumber": 1201
          },
          {
            "text": "\t\t\t\t'widget/class-widget-kbb.php',\r",
            "lineNumber": 1202
          },
          {
            "text": "\t\t\t\t'widget/class-widget-map.php',\r",
            "lineNumber": 1203
          },
          {
            "text": "\t\t\t\t'widget/class-widget-order-by.php',\r",
            "lineNumber": 1204
          },
          {
            "text": "\t\t\t\t'widget/class-widget-phones.php',\r",
            "lineNumber": 1205
          },
          {
            "text": "\t\t\t\t'widget/class-widget-maximum-price-filter.php',\r",
            "lineNumber": 1206
          },
          {
            "text": "\t\t\t\t'template-tags.php',\r",
            "lineNumber": 1207
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1208
          },
          {
            "text": "\t\t\tforeach ( $file_names as $file_name ) {\r",
            "lineNumber": 1209
          },
          {
            "text": "\t\t\t\t$path = plugin_dir_path( INVP_PLUGIN_FILE_PATH ) . 'includes/' . $file_name;\r",
            "lineNumber": 1210
          },
          {
            "text": "\t\t\t\tif ( file_exists( $path ) ) {\r",
            "lineNumber": 1211
          },
          {
            "text": "\t\t\t\t\tinclude $path;\r",
            "lineNumber": 1212
          },
          {
            "text": "\t\t\t\t}\r",
            "lineNumber": 1213
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1214
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 1215
          },
          {
            "text": "\r",
            "lineNumber": 1216
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 1217
          },
          {
            "text": "\t\t * Registers JavaScripts and stylesheets for front-end users and dashboard\r",
            "lineNumber": 1218
          },
          {
            "text": "\t\t * users. Includes some inline styles and scripts depending on the plugin\r",
            "lineNumber": 1219
          },
          {
            "text": "\t\t * settings and page request.\r",
            "lineNumber": 1220
          },
          {
            "text": "\t\t *\r",
            "lineNumber": 1221
          },
          {
            "text": "\t\t * @return void\r",
            "lineNumber": 1222
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 1223
          },
          {
            "text": "\t\tpublic static function include_scripts_and_styles() {\r",
            "lineNumber": 1224
          },
          {
            "text": "\r",
            "lineNumber": 1225
          },
          {
            "text": "\t\t\t// This method might have run already.\r",
            "lineNumber": 1226
          },
          {
            "text": "\t\t\tif ( wp_script_is( 'invp-slider', 'registered' ) ) {\r",
            "lineNumber": 1227
          },
          {
            "text": "\t\t\t\t// Abort.\r",
            "lineNumber": 1228
          },
          {
            "text": "\t\t\t\treturn;\r",
            "lineNumber": 1229
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1230
          },
          {
            "text": "\r",
            "lineNumber": 1231
          },
          {
            "text": "\t\t\t// Allow dashicons use on frontend.\r",
            "lineNumber": 1232
          },
          {
            "text": "\t\t\twp_enqueue_style( 'dashicons' );\r",
            "lineNumber": 1233
          },
          {
            "text": "\r",
            "lineNumber": 1234
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 1235
          },
          {
            "text": "\t\t\t ",
            "lineNumber": 1236
          }
        ]
      },
      "score": 0.510779082775116
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1352
          },
          "endPosition": {
            "line": 1414
          }
        },
        "contents": "\r\n\t\t\t/**\r\n\t\t\t * Register flexslider and provide overrides for scripts and styles\r\n\t\t\t */\r\n\t\t\t$min_dash = defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG ? '' : '-min'; // Dash not dot!\r\n\t\t\twp_register_script(\r\n\t\t\t\t'flexslider',\r\n\t\t\t\tplugins_url( \"/vendor/woocommerce/FlexSlider/jquery.flexslider{$min_dash}.js\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray( 'invp', 'jquery' ),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\t\t\t// Our overrides.\r\n\t\t\twp_register_script(\r\n\t\t\t\t'invp-flexslider',\r\n\t\t\t\tplugins_url( \"/js/flexslider{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray( 'flexslider' ),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\t\t\t// Another flexslider spin-up script for the Vehicle Slider widget.\r\n\t\t\twp_register_script(\r\n\t\t\t\t'invp-slider',\r\n\t\t\t\tplugins_url( \"/js/widget-slider{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray( 'flexslider' ),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\r\n\t\t\twp_register_script(\r\n\t\t\t\t'invp_sort_by',\r\n\t\t\t\tplugins_url( \"/js/shortcode-sort-by{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray(),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\r\n\t\t\t// Sort by Vehicle Attributes (Order By) widget.\r\n\t\t\twp_register_script(\r\n\t\t\t\t'order-by-widget-javascript',\r\n\t\t\t\tplugins_url( \"js/order-by-post-meta-widget{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray(),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\r\n\t\t\t// Flexslider.\r\n\t\t\twp_register_style(\r\n\t\t\t\t'flexslider',\r\n\t\t\t\tplugins_url( ( ! empty( $min ) ? \"/css/woocommerce-flexslider{$min}.css\" : '/vendor/woocommerce/FlexSlider/flexslider.css' ), INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tnull,\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\t\t\t// Our Flexslider overrides.\r\n\t\t\twp_register_style(\r\n\t\t\t\t'invp-flexslider',\r\n\t\t\t\tplugins_url( \"/css/flexslider{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray( 'flexslider' ),\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\r\n\t\t\t// Register the iFrameResizer.js script for use by our [invp_iframe] shortcode and Iframe block.\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\r",
            "lineNumber": 1353
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 1354
          },
          {
            "text": "\t\t\t * Register flexslider and provide overrides for scripts and styles\r",
            "lineNumber": 1355
          },
          {
            "text": "\t\t\t */\r",
            "lineNumber": 1356
          },
          {
            "text": "\t\t\t$min_dash = defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG ? '' : '-min'; // Dash not dot!\r",
            "lineNumber": 1357
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1358
          },
          {
            "text": "\t\t\t\t'flexslider',\r",
            "lineNumber": 1359
          },
          {
            "text": "\t\t\t\tplugins_url( \"/vendor/woocommerce/FlexSlider/jquery.flexslider{$min_dash}.js\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1360
          },
          {
            "text": "\t\t\t\tarray( 'invp', 'jquery' ),\r",
            "lineNumber": 1361
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1362
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1363
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1364
          },
          {
            "text": "\t\t\t// Our overrides.\r",
            "lineNumber": 1365
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1366
          },
          {
            "text": "\t\t\t\t'invp-flexslider',\r",
            "lineNumber": 1367
          },
          {
            "text": "\t\t\t\tplugins_url( \"/js/flexslider{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1368
          },
          {
            "text": "\t\t\t\tarray( 'flexslider' ),\r",
            "lineNumber": 1369
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1370
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1371
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1372
          },
          {
            "text": "\t\t\t// Another flexslider spin-up script for the Vehicle Slider widget.\r",
            "lineNumber": 1373
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1374
          },
          {
            "text": "\t\t\t\t'invp-slider',\r",
            "lineNumber": 1375
          },
          {
            "text": "\t\t\t\tplugins_url( \"/js/widget-slider{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1376
          },
          {
            "text": "\t\t\t\tarray( 'flexslider' ),\r",
            "lineNumber": 1377
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1378
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1379
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1380
          },
          {
            "text": "\r",
            "lineNumber": 1381
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1382
          },
          {
            "text": "\t\t\t\t'invp_sort_by',\r",
            "lineNumber": 1383
          },
          {
            "text": "\t\t\t\tplugins_url( \"/js/shortcode-sort-by{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1384
          },
          {
            "text": "\t\t\t\tarray(),\r",
            "lineNumber": 1385
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1386
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1387
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1388
          },
          {
            "text": "\r",
            "lineNumber": 1389
          },
          {
            "text": "\t\t\t// Sort by Vehicle Attributes (Order By) widget.\r",
            "lineNumber": 1390
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1391
          },
          {
            "text": "\t\t\t\t'order-by-widget-javascript',\r",
            "lineNumber": 1392
          },
          {
            "text": "\t\t\t\tplugins_url( \"js/order-by-post-meta-widget{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1393
          },
          {
            "text": "\t\t\t\tarray(),\r",
            "lineNumber": 1394
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1395
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1396
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1397
          },
          {
            "text": "\r",
            "lineNumber": 1398
          },
          {
            "text": "\t\t\t// Flexslider.\r",
            "lineNumber": 1399
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1400
          },
          {
            "text": "\t\t\t\t'flexslider',\r",
            "lineNumber": 1401
          },
          {
            "text": "\t\t\t\tplugins_url( ( ! empty( $min ) ? \"/css/woocommerce-flexslider{$min}.css\" : '/vendor/woocommerce/FlexSlider/flexslider.css' ), INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1402
          },
          {
            "text": "\t\t\t\tnull,\r",
            "lineNumber": 1403
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1404
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1405
          },
          {
            "text": "\t\t\t// Our Flexslider overrides.\r",
            "lineNumber": 1406
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1407
          },
          {
            "text": "\t\t\t\t'invp-flexslider',\r",
            "lineNumber": 1408
          },
          {
            "text": "\t\t\t\tplugins_url( \"/css/flexslider{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1409
          },
          {
            "text": "\t\t\t\tarray( 'flexslider' ),\r",
            "lineNumber": 1410
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1411
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1412
          },
          {
            "text": "\r",
            "lineNumber": 1413
          },
          {
            "text": "\t\t\t// Register the iFrameResizer.js script for use by our [invp_iframe] shortcode and Iframe block.\r",
            "lineNumber": 1414
          }
        ]
      },
      "score": 0.5036633610725403
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/shortcode/class-shortcode-inventory-slider.php",
        "range": {
          "startPosition": {
            "line": 41
          },
          "endPosition": {
            "line": 102,
            "column": 3
          }
        },
        "contents": "\t */\n\tpublic function content( $atts ) {\n\t\t$atts = shortcode_atts(\n\t\t\tarray(\n\t\t\t\t'captions'  =&gt; 'true',\n\t\t\t\t'make'      =&gt; '',\n\t\t\t\t'model'     =&gt; '',\n\t\t\t\t'type'      =&gt; '',\n\t\t\t\t'condition' =&gt; '',\n\t\t\t\t'orderby'   =&gt; 'rand',\n\t\t\t\t'order'     =&gt; 'ASC',\n\t\t\t\t'showcount' =&gt; 3, // How many vehicles are shown at one time?\n\t\t\t),\n\t\t\t$atts,\n\t\t\t'invp_inventory_slider'\n\t\t); // Use shortcode_atts_inventory_slider to filter the incoming attributes.\n\n\t\t// Parse boolean values to make life easy on users.\n\t\t$atts['captions'] = filter_var( $atts['captions'], FILTER_VALIDATE_BOOLEAN );\n\n\t\t// Get the vehicle IDs and loop over them.\n\t\t$inventory_ids = self::get_vehicle_IDs( $atts );\n\t\tif ( empty( $inventory_ids ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( ! wp_script_is( 'invp-slider', 'registered' ) ) {\n\t\t\tInventory_Presser_Plugin::include_scripts_and_styles();\n\t\t}\n\t\t// Need flexslider for this content.\n\t\twp_enqueue_style( 'flexslider' );\n\t\twp_enqueue_style( 'invp-flexslider' );\n\t\twp_enqueue_style( 'invp-slider' );\n\n\t\t// Generate unique IDs for this slider instance.\n\t\t++self::$slider_counter;\n\t\t$slider_id        = 'invp-slider-' . self::$slider_counter;\n\t\t$slider_width_id  = 'slider-width-' . self::$slider_counter;\n\t\t$widget_slider_id = 'widget_slider-' . self::$slider_counter;\n\n\t\t// Store slider configuration in a global object for JavaScript.\n\t\t// Initialize the object if it doesn't exist.\n\t\twp_add_inline_script(\n\t\t\t'invp-slider',\n\t\t\t'if (typeof window.invpSliderConfigs === \"undefined\") { window.invpSliderConfigs = {}; }'\n\t\t\t. 'window.invpSliderConfigs[\"' . esc_js( $slider_id ) . '\"] = ' . wp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'showcount' =&gt; $atts['showcount'],\n\t\t\t\t\t'sliderId'  =&gt; $slider_id,\n\t\t\t\t)\n\t\t\t) . ';',\n\t\t\t'before'\n\t\t);\n\t\twp_enqueue_script( 'invp-slider' );\n\n\t\t$flex_html = '&lt;div class=\"widget__invp_slick\" data-slider-id=\"' . esc_attr( $slider_id ) . '\"&gt;'\n\t\t. '&lt;div id=\"' . esc_attr( $slider_width_id ) . '\" class=\"slider-width\"&gt;&lt;/div&gt;'\n\t\t. '&lt;div id=\"' . esc_attr( $widget_slider_id ) . '\" class=\"flexslider flex-native\"&gt;'\n\t\t. '&lt;ul class=\"slides\"&gt;';\n\n\t\tforeach ( $inventory_ids as $inventory_id ) {\n\t\t\t",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t */",
            "lineNumber": 42
          },
          {
            "text": "\tpublic function content( $atts ) {",
            "lineNumber": 43
          },
          {
            "text": "\t\t$atts = shortcode_atts(",
            "lineNumber": 44
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 45
          },
          {
            "text": "\t\t\t\t'captions'  =&gt; 'true',",
            "lineNumber": 46
          },
          {
            "text": "\t\t\t\t'make'      =&gt; '',",
            "lineNumber": 47
          },
          {
            "text": "\t\t\t\t'model'     =&gt; '',",
            "lineNumber": 48
          },
          {
            "text": "\t\t\t\t'type'      =&gt; '',",
            "lineNumber": 49
          },
          {
            "text": "\t\t\t\t'condition' =&gt; '',",
            "lineNumber": 50
          },
          {
            "text": "\t\t\t\t'orderby'   =&gt; 'rand',",
            "lineNumber": 51
          },
          {
            "text": "\t\t\t\t'order'     =&gt; 'ASC',",
            "lineNumber": 52
          },
          {
            "text": "\t\t\t\t'showcount' =&gt; 3, // How many vehicles are shown at one time?",
            "lineNumber": 53
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 54
          },
          {
            "text": "\t\t\t$atts,",
            "lineNumber": 55
          },
          {
            "text": "\t\t\t'invp_inventory_slider'",
            "lineNumber": 56
          },
          {
            "text": "\t\t); // Use shortcode_atts_inventory_slider to filter the incoming attributes.",
            "lineNumber": 57
          },
          {
            "lineNumber": 58
          },
          {
            "text": "\t\t// Parse boolean values to make life easy on users.",
            "lineNumber": 59
          },
          {
            "text": "\t\t$atts['captions'] = filter_var( $atts['captions'], FILTER_VALIDATE_BOOLEAN );",
            "lineNumber": 60
          },
          {
            "lineNumber": 61
          },
          {
            "text": "\t\t// Get the vehicle IDs and loop over them.",
            "lineNumber": 62
          },
          {
            "text": "\t\t$inventory_ids = self::get_vehicle_IDs( $atts );",
            "lineNumber": 63
          },
          {
            "text": "\t\tif ( empty( $inventory_ids ) ) {",
            "lineNumber": 64
          },
          {
            "text": "\t\t\treturn '';",
            "lineNumber": 65
          },
          {
            "text": "\t\t}",
            "lineNumber": 66
          },
          {
            "lineNumber": 67
          },
          {
            "text": "\t\tif ( ! wp_script_is( 'invp-slider', 'registered' ) ) {",
            "lineNumber": 68
          },
          {
            "text": "\t\t\tInventory_Presser_Plugin::include_scripts_and_styles();",
            "lineNumber": 69
          },
          {
            "text": "\t\t}",
            "lineNumber": 70
          },
          {
            "text": "\t\t// Need flexslider for this content.",
            "lineNumber": 71
          },
          {
            "text": "\t\twp_enqueue_style( 'flexslider' );",
            "lineNumber": 72
          },
          {
            "text": "\t\twp_enqueue_style( 'invp-flexslider' );",
            "lineNumber": 73
          },
          {
            "text": "\t\twp_enqueue_style( 'invp-slider' );",
            "lineNumber": 74
          },
          {
            "lineNumber": 75
          },
          {
            "text": "\t\t// Generate unique IDs for this slider instance.",
            "lineNumber": 76
          },
          {
            "text": "\t\t++self::$slider_counter;",
            "lineNumber": 77
          },
          {
            "text": "\t\t$slider_id        = 'invp-slider-' . self::$slider_counter;",
            "lineNumber": 78
          },
          {
            "text": "\t\t$slider_width_id  = 'slider-width-' . self::$slider_counter;",
            "lineNumber": 79
          },
          {
            "text": "\t\t$widget_slider_id = 'widget_slider-' . self::$slider_counter;",
            "lineNumber": 80
          },
          {
            "lineNumber": 81
          },
          {
            "text": "\t\t// Store slider configuration in a global object for JavaScript.",
            "lineNumber": 82
          },
          {
            "text": "\t\t// Initialize the object if it doesn't exist.",
            "lineNumber": 83
          },
          {
            "text": "\t\twp_add_inline_script(",
            "lineNumber": 84
          },
          {
            "text": "\t\t\t'invp-slider',",
            "lineNumber": 85
          },
          {
            "text": "\t\t\t'if (typeof window.invpSliderConfigs === \"undefined\") { window.invpSliderConfigs = {}; }'",
            "lineNumber": 86
          },
          {
            "text": "\t\t\t. 'window.invpSliderConfigs[\"' . esc_js( $slider_id ) . '\"] = ' . wp_json_encode(",
            "lineNumber": 87
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 88
          },
          {
            "text": "\t\t\t\t\t'showcount' =&gt; $atts['showcount'],",
            "lineNumber": 89
          },
          {
            "text": "\t\t\t\t\t'sliderId'  =&gt; $slider_id,",
            "lineNumber": 90
          },
          {
            "text": "\t\t\t\t)",
            "lineNumber": 91
          },
          {
            "text": "\t\t\t) . ';',",
            "lineNumber": 92
          },
          {
            "text": "\t\t\t'before'",
            "lineNumber": 93
          },
          {
            "text": "\t\t);",
            "lineNumber": 94
          },
          {
            "text": "\t\twp_enqueue_script( 'invp-slider' );",
            "lineNumber": 95
          },
          {
            "lineNumber": 96
          },
          {
            "text": "\t\t$flex_html = '&lt;div class=\"widget__invp_slick\" data-slider-id=\"' . esc_attr( $slider_id ) . '\"&gt;'",
            "lineNumber": 97
          },
          {
            "text": "\t\t. '&lt;div id=\"' . esc_attr( $slider_width_id ) . '\" class=\"slider-width\"&gt;&lt;/div&gt;'",
            "lineNumber": 98
          },
          {
            "text": "\t\t. '&lt;div id=\"' . esc_attr( $widget_slider_id ) . '\" class=\"flexslider flex-native\"&gt;'",
            "lineNumber": 99
          },
          {
            "text": "\t\t. '&lt;ul class=\"slides\"&gt;';",
            "lineNumber": 100
          },
          {
            "lineNumber": 101
          },
          {
            "text": "\t\tforeach ( $inventory_ids as $inventory_id ) {",
            "lineNumber": 102
          },
          {
            "text": "\t\t\t",
            "lineNumber": 103
          }
        ]
      },
      "score": 0.4585464894771576
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1232
          },
          "endPosition": {
            "line": 1265
          }
        },
        "contents": "\t\t\twp_enqueue_style( 'dashicons' );\r\n\r\n\t\t\t/**\r\n\t\t\t * Register stylesheets that will only be enqueued when specific\r\n\t\t\t * widgets or shortcodes are used.\r\n\t\t\t */\r\n\t\t\t$min = defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG ? '' : '.min';\r\n\t\t\twp_register_style(\r\n\t\t\t\t'invp-grid',\r\n\t\t\t\tplugins_url( \"css/widget-grid{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray(),\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\t\t\twp_register_style(\r\n\t\t\t\t'invp-maximum-price-filters',\r\n\t\t\t\tplugins_url( \"css/widget-maximum-price-filters{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray(),\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\t\t\twp_register_style(\r\n\t\t\t\t'invp-epa-fuel-economy',\r\n\t\t\t\tplugins_url( \"css/widget-epa-fuel-economy{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray(),\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\t\t\twp_register_style(\r\n\t\t\t\t'invp-slider',\r\n\t\t\t\tplugins_url( \"css/widget-slider{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray(),\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\r\n\t\t\t// Register a script without a .js URL for our inline invp object.\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\twp_enqueue_style( 'dashicons' );\r",
            "lineNumber": 1233
          },
          {
            "text": "\r",
            "lineNumber": 1234
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 1235
          },
          {
            "text": "\t\t\t * Register stylesheets that will only be enqueued when specific\r",
            "lineNumber": 1236
          },
          {
            "text": "\t\t\t * widgets or shortcodes are used.\r",
            "lineNumber": 1237
          },
          {
            "text": "\t\t\t */\r",
            "lineNumber": 1238
          },
          {
            "text": "\t\t\t$min = defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG ? '' : '.min';\r",
            "lineNumber": 1239
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1240
          },
          {
            "text": "\t\t\t\t'invp-grid',\r",
            "lineNumber": 1241
          },
          {
            "text": "\t\t\t\tplugins_url( \"css/widget-grid{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1242
          },
          {
            "text": "\t\t\t\tarray(),\r",
            "lineNumber": 1243
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1244
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1245
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1246
          },
          {
            "text": "\t\t\t\t'invp-maximum-price-filters',\r",
            "lineNumber": 1247
          },
          {
            "text": "\t\t\t\tplugins_url( \"css/widget-maximum-price-filters{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1248
          },
          {
            "text": "\t\t\t\tarray(),\r",
            "lineNumber": 1249
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1250
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1251
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1252
          },
          {
            "text": "\t\t\t\t'invp-epa-fuel-economy',\r",
            "lineNumber": 1253
          },
          {
            "text": "\t\t\t\tplugins_url( \"css/widget-epa-fuel-economy{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1254
          },
          {
            "text": "\t\t\t\tarray(),\r",
            "lineNumber": 1255
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1256
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1257
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1258
          },
          {
            "text": "\t\t\t\t'invp-slider',\r",
            "lineNumber": 1259
          },
          {
            "text": "\t\t\t\tplugins_url( \"css/widget-slider{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1260
          },
          {
            "text": "\t\t\t\tarray(),\r",
            "lineNumber": 1261
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1262
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1263
          },
          {
            "text": "\r",
            "lineNumber": 1264
          },
          {
            "text": "\t\t\t// Register a script without a .js URL for our inline invp object.\r",
            "lineNumber": 1265
          }
        ]
      },
      "score": 0.4426608085632324
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/widget/class-widget-inventory-slider.php",
        "range": {
          "startPosition": {},
          "endPosition": {
            "line": 77
          }
        },
        "contents": "&lt;?php\ndefined( 'ABSPATH' ) || exit;\n\n/**\n * Inventory_Presser_Slider\n *\n * This class creates the Vehicle Slider widget.\n */\nclass Inventory_Presser_Slider extends WP_Widget {\n\n\n\tconst ID_BASE = '_invp_slick';\n\n\tprotected $text_displays = array(\n\t\t'none'   =&gt; 'None',\n\t\t'top'    =&gt; 'Top',\n\t\t'bottom' =&gt; 'Bottom',\n\t);\n\n\t/**\n\t * Calls the parent class' contructor and adds a hook that will delete the\n\t * option that stores this widget's data when the plugin's delete all data\n\t * method is run.\n\t *\n\t * @return void\n\t */\n\tpublic function __construct() {\n\t\tparent::__construct(\n\t\t\tself::ID_BASE,\n\t\t\t__( 'Vehicle Slider', 'inventory-presser' ),\n\t\t\tarray(\n\t\t\t\t'description'           =&gt; __( 'A slideshow for all vehicles with at least one photo.', 'inventory-presser' ),\n\t\t\t\t'show_instance_in_rest' =&gt; true,\n\t\t\t)\n\t\t);\n\n\t\tadd_action( 'invp_delete_all_data', array( $this, 'delete_option' ) );\n\t}\n\n\t/**\n\t * Deletes the option that stores this widget's data.\n\t *\n\t * @return void\n\t */\n\tpublic function delete_option() {\n\t\tdelete_option( 'widget_' . self::ID_BASE );\n\t}\n\n\n\t/**\n\t * Creates an array of criteria options that powers the widget.\n\t *\n\t * @return array\n\t */\n\tprotected function featured_select_options() {\n\t\treturn array(\n\t\t\t'featured_priority' =&gt; __( 'Priority for Featured Vehicles', 'inventory-presser' ),\n\t\t\t'featured_only'     =&gt; __( 'Featured Vehicles Only', 'inventory-presser' ),\n\t\t\t'random'            =&gt; __( 'Random', 'inventory-presser' ),\n\t\t\t'newest_first'      =&gt; __( 'Newest Vehicles First', 'inventory-presser' ),\n\t\t);\n\t}\n\n\t/**\n\t * Enqueues stylesheets and JavaScripts\n\t *\n\t * @param  array $instance The widget settings.\n\t * @return void\n\t */\n\tprotected function include_scripts( $instance ) {\n\t\t// Need flexslider scripts and styles.\n\t\twp_enqueue_style( 'flexslider' );\n\t\twp_enqueue_style( 'invp-flexslider' );\n\t\twp_enqueue_style( 'invp-slider' );\n\n\t\t// Spin-up script.\n\t\twp_enqueue_script( 'invp-slider' );",
        "signatures": {},
        "detailedLines": [
          {
            "text": "&lt;?php",
            "lineNumber": 1
          },
          {
            "text": "defined( 'ABSPATH' ) || exit;",
            "lineNumber": 2
          },
          {
            "lineNumber": 3
          },
          {
            "text": "/**",
            "lineNumber": 4
          },
          {
            "text": " * Inventory_Presser_Slider",
            "lineNumber": 5
          },
          {
            "text": " *",
            "lineNumber": 6
          },
          {
            "text": " * This class creates the Vehicle Slider widget.",
            "lineNumber": 7
          },
          {
            "text": " */",
            "lineNumber": 8
          },
          {
            "text": "class Inventory_Presser_Slider extends WP_Widget {",
            "lineNumber": 9
          },
          {
            "lineNumber": 10
          },
          {
            "lineNumber": 11
          },
          {
            "text": "\tconst ID_BASE = '_invp_slick';",
            "lineNumber": 12
          },
          {
            "lineNumber": 13
          },
          {
            "text": "\tprotected $text_displays = array(",
            "lineNumber": 14
          },
          {
            "text": "\t\t'none'   =&gt; 'None',",
            "lineNumber": 15
          },
          {
            "text": "\t\t'top'    =&gt; 'Top',",
            "lineNumber": 16
          },
          {
            "text": "\t\t'bottom' =&gt; 'Bottom',",
            "lineNumber": 17
          },
          {
            "text": "\t);",
            "lineNumber": 18
          },
          {
            "lineNumber": 19
          },
          {
            "text": "\t/**",
            "lineNumber": 20
          },
          {
            "text": "\t * Calls the parent class' contructor and adds a hook that will delete the",
            "lineNumber": 21
          },
          {
            "text": "\t * option that stores this widget's data when the plugin's delete all data",
            "lineNumber": 22
          },
          {
            "text": "\t * method is run.",
            "lineNumber": 23
          },
          {
            "text": "\t *",
            "lineNumber": 24
          },
          {
            "text": "\t * @return void",
            "lineNumber": 25
          },
          {
            "text": "\t */",
            "lineNumber": 26
          },
          {
            "text": "\tpublic function __construct() {",
            "lineNumber": 27
          },
          {
            "text": "\t\tparent::__construct(",
            "lineNumber": 28
          },
          {
            "text": "\t\t\tself::ID_BASE,",
            "lineNumber": 29
          },
          {
            "text": "\t\t\t__( 'Vehicle Slider', 'inventory-presser' ),",
            "lineNumber": 30
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 31
          },
          {
            "text": "\t\t\t\t'description'           =&gt; __( 'A slideshow for all vehicles with at least one photo.', 'inventory-presser' ),",
            "lineNumber": 32
          },
          {
            "text": "\t\t\t\t'show_instance_in_rest' =&gt; true,",
            "lineNumber": 33
          },
          {
            "text": "\t\t\t)",
            "lineNumber": 34
          },
          {
            "text": "\t\t);",
            "lineNumber": 35
          },
          {
            "lineNumber": 36
          },
          {
            "text": "\t\tadd_action( 'invp_delete_all_data', array( $this, 'delete_option' ) );",
            "lineNumber": 37
          },
          {
            "text": "\t}",
            "lineNumber": 38
          },
          {
            "lineNumber": 39
          },
          {
            "text": "\t/**",
            "lineNumber": 40
          },
          {
            "text": "\t * Deletes the option that stores this widget's data.",
            "lineNumber": 41
          },
          {
            "text": "\t *",
            "lineNumber": 42
          },
          {
            "text": "\t * @return void",
            "lineNumber": 43
          },
          {
            "text": "\t */",
            "lineNumber": 44
          },
          {
            "text": "\tpublic function delete_option() {",
            "lineNumber": 45
          },
          {
            "text": "\t\tdelete_option( 'widget_' . self::ID_BASE );",
            "lineNumber": 46
          },
          {
            "text": "\t}",
            "lineNumber": 47
          },
          {
            "lineNumber": 48
          },
          {
            "lineNumber": 49
          },
          {
            "text": "\t/**",
            "lineNumber": 50
          },
          {
            "text": "\t * Creates an array of criteria options that powers the widget.",
            "lineNumber": 51
          },
          {
            "text": "\t *",
            "lineNumber": 52
          },
          {
            "text": "\t * @return array",
            "lineNumber": 53
          },
          {
            "text": "\t */",
            "lineNumber": 54
          },
          {
            "text": "\tprotected function featured_select_options() {",
            "lineNumber": 55
          },
          {
            "text": "\t\treturn array(",
            "lineNumber": 56
          },
          {
            "text": "\t\t\t'featured_priority' =&gt; __( 'Priority for Featured Vehicles', 'inventory-presser' ),",
            "lineNumber": 57
          },
          {
            "text": "\t\t\t'featured_only'     =&gt; __( 'Featured Vehicles Only', 'inventory-presser' ),",
            "lineNumber": 58
          },
          {
            "text": "\t\t\t'random'            =&gt; __( 'Random', 'inventory-presser' ),",
            "lineNumber": 59
          },
          {
            "text": "\t\t\t'newest_first'      =&gt; __( 'Newest Vehicles First', 'inventory-presser' ),",
            "lineNumber": 60
          },
          {
            "text": "\t\t);",
            "lineNumber": 61
          },
          {
            "text": "\t}",
            "lineNumber": 62
          },
          {
            "lineNumber": 63
          },
          {
            "text": "\t/**",
            "lineNumber": 64
          },
          {
            "text": "\t * Enqueues stylesheets and JavaScripts",
            "lineNumber": 65
          },
          {
            "text": "\t *",
            "lineNumber": 66
          },
          {
            "text": "\t * @param  array $instance The widget settings.",
            "lineNumber": 67
          },
          {
            "text": "\t * @return void",
            "lineNumber": 68
          },
          {
            "text": "\t */",
            "lineNumber": 69
          },
          {
            "text": "\tprotected function include_scripts( $instance ) {",
            "lineNumber": 70
          },
          {
            "text": "\t\t// Need flexslider scripts and styles.",
            "lineNumber": 71
          },
          {
            "text": "\t\twp_enqueue_style( 'flexslider' );",
            "lineNumber": 72
          },
          {
            "text": "\t\twp_enqueue_style( 'invp-flexslider' );",
            "lineNumber": 73
          },
          {
            "text": "\t\twp_enqueue_style( 'invp-slider' );",
            "lineNumber": 74
          },
          {
            "lineNumber": 75
          },
          {
            "text": "\t\t// Spin-up script.",
            "lineNumber": 76
          },
          {
            "text": "\t\twp_enqueue_script( 'invp-slider' );",
            "lineNumber": 77
          }
        ]
      },
      "score": 0.43654608726501465
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/shortcode/class-shortcode-inventory-slider.php",
        "range": {
          "startPosition": {},
          "endPosition": {
            "line": 46
          }
        },
        "contents": "&lt;?php\ndefined( 'ABSPATH' ) || exit;\n\n/**\n * Inventory_Presser_Shortcode_Slider\n *\n * Creates a shortcode that produces vehicle photo sliders based on FlexSlider.\n */\nclass Inventory_Presser_Shortcode_Slider {\n\n\t/**\n\t * Counter for generating unique slider IDs\n\t *\n\t * @var int\n\t */\n\tprivate static $slider_counter = 0;\n\n\t/**\n\t * Adds two shortcodes\n\t *\n\t * @return void\n\t */\n\tpublic function add() {\n\t\tadd_shortcode( 'invp-inventory-slider', array( $this, 'content' ) );\n\t\tadd_shortcode( 'invp_inventory_slider', array( $this, 'content' ) );\n\t}\n\n\t/**\n\t * Adds hooks that power the shortcode\n\t *\n\t * @return void\n\t */\n\tpublic function add_hooks() {\n\t\tadd_action( 'init', array( $this, 'add' ) );\n\t}\n\n\t/**\n\t * Creates the HTML content of the shortcode\n\t *\n\t * @param  array $atts\n\t * @return string HTML that renders a vehicle photo flexslider\n\t */\n\tpublic function content( $atts ) {\n\t\t$atts = shortcode_atts(\n\t\t\tarray(\n\t\t\t\t'captions'  =&gt; 'true',",
        "signatures": {},
        "detailedLines": [
          {
            "text": "&lt;?php",
            "lineNumber": 1
          },
          {
            "text": "defined( 'ABSPATH' ) || exit;",
            "lineNumber": 2
          },
          {
            "lineNumber": 3
          },
          {
            "text": "/**",
            "lineNumber": 4
          },
          {
            "text": " * Inventory_Presser_Shortcode_Slider",
            "lineNumber": 5
          },
          {
            "text": " *",
            "lineNumber": 6
          },
          {
            "text": " * Creates a shortcode that produces vehicle photo sliders based on FlexSlider.",
            "lineNumber": 7
          },
          {
            "text": " */",
            "lineNumber": 8
          },
          {
            "text": "class Inventory_Presser_Shortcode_Slider {",
            "lineNumber": 9
          },
          {
            "lineNumber": 10
          },
          {
            "text": "\t/**",
            "lineNumber": 11
          },
          {
            "text": "\t * Counter for generating unique slider IDs",
            "lineNumber": 12
          },
          {
            "text": "\t *",
            "lineNumber": 13
          },
          {
            "text": "\t * @var int",
            "lineNumber": 14
          },
          {
            "text": "\t */",
            "lineNumber": 15
          },
          {
            "text": "\tprivate static $slider_counter = 0;",
            "lineNumber": 16
          },
          {
            "lineNumber": 17
          },
          {
            "text": "\t/**",
            "lineNumber": 18
          },
          {
            "text": "\t * Adds two shortcodes",
            "lineNumber": 19
          },
          {
            "text": "\t *",
            "lineNumber": 20
          },
          {
            "text": "\t * @return void",
            "lineNumber": 21
          },
          {
            "text": "\t */",
            "lineNumber": 22
          },
          {
            "text": "\tpublic function add() {",
            "lineNumber": 23
          },
          {
            "text": "\t\tadd_shortcode( 'invp-inventory-slider', array( $this, 'content' ) );",
            "lineNumber": 24
          },
          {
            "text": "\t\tadd_shortcode( 'invp_inventory_slider', array( $this, 'content' ) );",
            "lineNumber": 25
          },
          {
            "text": "\t}",
            "lineNumber": 26
          },
          {
            "lineNumber": 27
          },
          {
            "text": "\t/**",
            "lineNumber": 28
          },
          {
            "text": "\t * Adds hooks that power the shortcode",
            "lineNumber": 29
          },
          {
            "text": "\t *",
            "lineNumber": 30
          },
          {
            "text": "\t * @return void",
            "lineNumber": 31
          },
          {
            "text": "\t */",
            "lineNumber": 32
          },
          {
            "text": "\tpublic function add_hooks() {",
            "lineNumber": 33
          },
          {
            "text": "\t\tadd_action( 'init', array( $this, 'add' ) );",
            "lineNumber": 34
          },
          {
            "text": "\t}",
            "lineNumber": 35
          },
          {
            "lineNumber": 36
          },
          {
            "text": "\t/**",
            "lineNumber": 37
          },
          {
            "text": "\t * Creates the HTML content of the shortcode",
            "lineNumber": 38
          },
          {
            "text": "\t *",
            "lineNumber": 39
          },
          {
            "text": "\t * @param  array $atts",
            "lineNumber": 40
          },
          {
            "text": "\t * @return string HTML that renders a vehicle photo flexslider",
            "lineNumber": 41
          },
          {
            "text": "\t */",
            "lineNumber": 42
          },
          {
            "text": "\tpublic function content( $atts ) {",
            "lineNumber": 43
          },
          {
            "text": "\t\t$atts = shortcode_atts(",
            "lineNumber": 44
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 45
          },
          {
            "text": "\t\t\t\t'captions'  =&gt; 'true',",
            "lineNumber": 46
          }
        ]
      },
      "score": 0.4349292516708374
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/shortcode/class-shortcode-photo-slider.php",
        "range": {
          "startPosition": {},
          "endPosition": {
            "line": 73,
            "column": 4
          }
        },
        "contents": "&lt;?php\ndefined( 'ABSPATH' ) || exit;\n\n/**\n * Inventory_Presser_Shortcode_Photo_Slider\n *\n * Creates a shortcode that produces a photo slider for a single vehicle.\n */\nclass Inventory_Presser_Shortcode_Photo_Slider {\n\n\t/**\n\t * Adds two shortcodes\n\t *\n\t * @return void\n\t */\n\tfunction add() {\n\t\tadd_shortcode( 'invp-photo-slider', array( $this, 'content' ) );\n\t\tadd_shortcode( 'invp_photo_slider', array( $this, 'content' ) );\n\t}\n\n\t/**\n\t * Adds hooks that power the shortcode\n\t *\n\t * @return void\n\t */\n\tpublic function add_hooks() {\n\t\tadd_action( 'init', array( $this, 'add' ) );\n\t}\n\n\t/**\n\t * Creates the HTML content of the shortcode\n\t *\n\t * @param  array $atts Shortcode attributes array.\n\t * @return string HTML that renders a vehicle photo flexslider\n\t */\n\tpublic function content( $atts ) {\n\t\t$atts = shortcode_atts(\n\t\t\tarray(\n\t\t\t\t'id'               =&gt; null,\n\t\t\t\t'include_carousel' =&gt; true,\n\t\t\t),\n\t\t\t$atts,\n\t\t\t'invp_photo_slider'\n\t\t); // Use shortcode_atts_inventory_slider to filter the incoming attributes.\n\n\t\t// Parse boolean values to make life easy on users.\n\t\t$atts['include_carousel'] = filter_var( $atts['include_carousel'], FILTER_VALIDATE_BOOLEAN );\n\n\t\tif ( ! wp_style_is( 'flexslider', 'registered' ) ) {\n\t\t\tInventory_Presser_Plugin::include_scripts_and_styles();\n\t\t}\n\t\t// Need flexslider for this content.\n\t\twp_enqueue_style( 'flexslider' );\n\t\twp_enqueue_style( 'invp-flexslider' );\n\t\twp_enqueue_script( 'invp-flexslider' );\n\n\t\t// Was the post ID passed in as an argument?\n\t\tif ( ! empty( $atts['id'] ) ) {\n\t\t\t$post_id = intval( $atts['id'] );\n\t\t} else {\n\t\t\t$post_id = get_the_ID();\n\t\t}\n\n\t\t$image_url_lists = invp_get_the_photos( array( 'full', 'large', 'thumb' ), $post_id );\n\n\t\tob_start();\n\t\t?&gt;\n\t\t&lt;div id=\"slider-width\"&gt;&lt;/div&gt;\n\t\t&lt;div id=\"slider\" class=\"flexslider\"&gt;\n\t\t\t&lt;ul class=\"slides\"&gt;\n\t\t\t&lt;?php\n\n\t\t\tif ( isset( $image_url_lists['large'] ) ) {\n\t\t\t\t",
        "signatures": {},
        "detailedLines": [
          {
            "text": "&lt;?php",
            "lineNumber": 1
          },
          {
            "text": "defined( 'ABSPATH' ) || exit;",
            "lineNumber": 2
          },
          {
            "lineNumber": 3
          },
          {
            "text": "/**",
            "lineNumber": 4
          },
          {
            "text": " * Inventory_Presser_Shortcode_Photo_Slider",
            "lineNumber": 5
          },
          {
            "text": " *",
            "lineNumber": 6
          },
          {
            "text": " * Creates a shortcode that produces a photo slider for a single vehicle.",
            "lineNumber": 7
          },
          {
            "text": " */",
            "lineNumber": 8
          },
          {
            "text": "class Inventory_Presser_Shortcode_Photo_Slider {",
            "lineNumber": 9
          },
          {
            "lineNumber": 10
          },
          {
            "text": "\t/**",
            "lineNumber": 11
          },
          {
            "text": "\t * Adds two shortcodes",
            "lineNumber": 12
          },
          {
            "text": "\t *",
            "lineNumber": 13
          },
          {
            "text": "\t * @return void",
            "lineNumber": 14
          },
          {
            "text": "\t */",
            "lineNumber": 15
          },
          {
            "text": "\tfunction add() {",
            "lineNumber": 16
          },
          {
            "text": "\t\tadd_shortcode( 'invp-photo-slider', array( $this, 'content' ) );",
            "lineNumber": 17
          },
          {
            "text": "\t\tadd_shortcode( 'invp_photo_slider', array( $this, 'content' ) );",
            "lineNumber": 18
          },
          {
            "text": "\t}",
            "lineNumber": 19
          },
          {
            "lineNumber": 20
          },
          {
            "text": "\t/**",
            "lineNumber": 21
          },
          {
            "text": "\t * Adds hooks that power the shortcode",
            "lineNumber": 22
          },
          {
            "text": "\t *",
            "lineNumber": 23
          },
          {
            "text": "\t * @return void",
            "lineNumber": 24
          },
          {
            "text": "\t */",
            "lineNumber": 25
          },
          {
            "text": "\tpublic function add_hooks() {",
            "lineNumber": 26
          },
          {
            "text": "\t\tadd_action( 'init', array( $this, 'add' ) );",
            "lineNumber": 27
          },
          {
            "text": "\t}",
            "lineNumber": 28
          },
          {
            "lineNumber": 29
          },
          {
            "text": "\t/**",
            "lineNumber": 30
          },
          {
            "text": "\t * Creates the HTML content of the shortcode",
            "lineNumber": 31
          },
          {
            "text": "\t *",
            "lineNumber": 32
          },
          {
            "text": "\t * @param  array $atts Shortcode attributes array.",
            "lineNumber": 33
          },
          {
            "text": "\t * @return string HTML that renders a vehicle photo flexslider",
            "lineNumber": 34
          },
          {
            "text": "\t */",
            "lineNumber": 35
          },
          {
            "text": "\tpublic function content( $atts ) {",
            "lineNumber": 36
          },
          {
            "text": "\t\t$atts = shortcode_atts(",
            "lineNumber": 37
          },
          {
            "text": "\t\t\tarray(",
            "lineNumber": 38
          },
          {
            "text": "\t\t\t\t'id'               =&gt; null,",
            "lineNumber": 39
          },
          {
            "text": "\t\t\t\t'include_carousel' =&gt; true,",
            "lineNumber": 40
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 41
          },
          {
            "text": "\t\t\t$atts,",
            "lineNumber": 42
          },
          {
            "text": "\t\t\t'invp_photo_slider'",
            "lineNumber": 43
          },
          {
            "text": "\t\t); // Use shortcode_atts_inventory_slider to filter the incoming attributes.",
            "lineNumber": 44
          },
          {
            "lineNumber": 45
          },
          {
            "text": "\t\t// Parse boolean values to make life easy on users.",
            "lineNumber": 46
          },
          {
            "text": "\t\t$atts['include_carousel'] = filter_var( $atts['include_carousel'], FILTER_VALIDATE_BOOLEAN );",
            "lineNumber": 47
          },
          {
            "lineNumber": 48
          },
          {
            "text": "\t\tif ( ! wp_style_is( 'flexslider', 'registered' ) ) {",
            "lineNumber": 49
          },
          {
            "text": "\t\t\tInventory_Presser_Plugin::include_scripts_and_styles();",
            "lineNumber": 50
          },
          {
            "text": "\t\t}",
            "lineNumber": 51
          },
          {
            "text": "\t\t// Need flexslider for this content.",
            "lineNumber": 52
          },
          {
            "text": "\t\twp_enqueue_style( 'flexslider' );",
            "lineNumber": 53
          },
          {
            "text": "\t\twp_enqueue_style( 'invp-flexslider' );",
            "lineNumber": 54
          },
          {
            "text": "\t\twp_enqueue_script( 'invp-flexslider' );",
            "lineNumber": 55
          },
          {
            "lineNumber": 56
          },
          {
            "text": "\t\t// Was the post ID passed in as an argument?",
            "lineNumber": 57
          },
          {
            "text": "\t\tif ( ! empty( $atts['id'] ) ) {",
            "lineNumber": 58
          },
          {
            "text": "\t\t\t$post_id = intval( $atts['id'] );",
            "lineNumber": 59
          },
          {
            "text": "\t\t} else {",
            "lineNumber": 60
          },
          {
            "text": "\t\t\t$post_id = get_the_ID();",
            "lineNumber": 61
          },
          {
            "text": "\t\t}",
            "lineNumber": 62
          },
          {
            "lineNumber": 63
          },
          {
            "text": "\t\t$image_url_lists = invp_get_the_photos( array( 'full', 'large', 'thumb' ), $post_id );",
            "lineNumber": 64
          },
          {
            "lineNumber": 65
          },
          {
            "text": "\t\tob_start();",
            "lineNumber": 66
          },
          {
            "text": "\t\t?&gt;",
            "lineNumber": 67
          },
          {
            "text": "\t\t&lt;div id=\"slider-width\"&gt;&lt;/div&gt;",
            "lineNumber": 68
          },
          {
            "text": "\t\t&lt;div id=\"slider\" class=\"flexslider\"&gt;",
            "lineNumber": 69
          },
          {
            "text": "\t\t\t&lt;ul class=\"slides\"&gt;",
            "lineNumber": 70
          },
          {
            "text": "\t\t\t&lt;?php",
            "lineNumber": 71
          },
          {
            "lineNumber": 72
          },
          {
            "text": "\t\t\tif ( isset( $image_url_lists['large'] ) ) {",
            "lineNumber": 73
          },
          {
            "text": "\t\t\t\t",
            "lineNumber": 74
          }
        ]
      },
      "score": 0.4095030128955841
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/widget/class-widget-inventory-slider.php",
        "range": {
          "startPosition": {
            "line": 72
          },
          "endPosition": {
            "line": 132
          }
        },
        "contents": "\t\twp_enqueue_style( 'invp-flexslider' );\n\t\twp_enqueue_style( 'invp-slider' );\n\n\t\t// Spin-up script.\n\t\twp_enqueue_script( 'invp-slider' );\n\t\t// Provide one of the widget settings to JavaScript.\n\t\twp_add_inline_script(\n\t\t\t'invp-slider',\n\t\t\t'const widget_slider = ' . wp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'showcount' =&gt; $instance['showcount'] ?? 3,\n\t\t\t\t)\n\t\t\t),\n\t\t\t'before'\n\t\t);\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\t\t$this-&gt;include_scripts( $instance );\n\n\t\t$title                 = empty( $instance['title'] ) ? '' : apply_filters( 'widget_title', $instance['title'] );\n\t\t$showcount             = empty( $instance['showcount'] ) ? 3 : $instance['showcount'];\n\t\t$showtext              = isset( $instance['showtext'] ) ? $instance['showtext'] : false;\n\t\t$featured_select_slugs = array_keys( $this-&gt;featured_select_options() );\n\t\t$featured_select       = isset( $instance['featured_select'] ) ? $instance['featured_select'] : $featured_select_slugs[0];\n\t\t$showtitle             = ( isset( $instance['cb_showtitle'] ) &amp;&amp; 'true' === $instance['cb_showtitle'] );\n\t\t$showprice             = ( isset( $instance['cb_showprice'] ) &amp;&amp; 'true' === $instance['cb_showprice'] );\n\n\t\t$inventory_ids = array();\n\n\t\t$get_posts_args = array(\n\t\t\t'fields'         =&gt; 'ids',\n\t\t\t'meta_query'     =&gt; array(\n\t\t\t\tarray(\n\t\t\t\t\t'key'     =&gt; '_thumbnail_id',\n\t\t\t\t\t'compare' =&gt; 'EXISTS',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'order'          =&gt; 'ASC',\n\t\t\t'orderby'        =&gt; 'rand',\n\t\t\t'post_type'      =&gt; INVP::POST_TYPE,\n\t\t\t'posts_per_page' =&gt; $showcount * 5, // get 5 sets of the number we'll show at one time.\n\t\t);\n\n\t\tswitch ( $featured_select ) {\n\n\t\t\tcase 'random':\n\t\t\t\t$get_posts_args['meta_key'] = '_thumbnail_id';\n\t\t\t\t$inventory_ids              = get_posts( apply_filters( 'invp_slider_widget_query_args', $get_posts_args ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'newest_first':\n\t\t\t\t$get_posts_args['meta_key'] = apply_filters( 'invp_prefix_meta_key', 'last_modified' );",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\twp_enqueue_style( 'invp-flexslider' );",
            "lineNumber": 73
          },
          {
            "text": "\t\twp_enqueue_style( 'invp-slider' );",
            "lineNumber": 74
          },
          {
            "lineNumber": 75
          },
          {
            "text": "\t\t// Spin-up script.",
            "lineNumber": 76
          },
          {
            "text": "\t\twp_enqueue_script( 'invp-slider' );",
            "lineNumber": 77
          },
          {
            "text": "\t\t// Provide one of the widget settings to JavaScript.",
            "lineNumber": 78
          },
          {
            "text": "\t\twp_add_inline_script(",
            "lineNumber": 79
          },
          {
            "text": "\t\t\t'invp-slider',",
            "lineNumber": 80
          },
          {
            "text": "\t\t\t'const widget_slider = ' . wp_json_encode(",
            "lineNumber": 81
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 82
          },
          {
            "text": "\t\t\t\t\t'showcount' =&gt; $instance['showcount'] ?? 3,",
            "lineNumber": 83
          },
          {
            "text": "\t\t\t\t)",
            "lineNumber": 84
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 85
          },
          {
            "text": "\t\t\t'before'",
            "lineNumber": 86
          },
          {
            "text": "\t\t);",
            "lineNumber": 87
          },
          {
            "text": "\t}",
            "lineNumber": 88
          },
          {
            "lineNumber": 89
          },
          {
            "text": "\t/**",
            "lineNumber": 90
          },
          {
            "text": "\t * Outputs the widget front-end HTML",
            "lineNumber": 91
          },
          {
            "text": "\t *",
            "lineNumber": 92
          },
          {
            "text": "\t * @param  array $args",
            "lineNumber": 93
          },
          {
            "text": "\t * @param  array $instance",
            "lineNumber": 94
          },
          {
            "text": "\t * @return void",
            "lineNumber": 95
          },
          {
            "text": "\t */",
            "lineNumber": 96
          },
          {
            "text": "\tpublic function widget( $args, $instance ) {",
            "lineNumber": 97
          },
          {
            "text": "\t\t$this-&gt;include_scripts( $instance );",
            "lineNumber": 98
          },
          {
            "lineNumber": 99
          },
          {
            "text": "\t\t$title                 = empty( $instance['title'] ) ? '' : apply_filters( 'widget_title', $instance['title'] );",
            "lineNumber": 100
          },
          {
            "text": "\t\t$showcount             = empty( $instance['showcount'] ) ? 3 : $instance['showcount'];",
            "lineNumber": 101
          },
          {
            "text": "\t\t$showtext              = isset( $instance['showtext'] ) ? $instance['showtext'] : false;",
            "lineNumber": 102
          },
          {
            "text": "\t\t$featured_select_slugs = array_keys( $this-&gt;featured_select_options() );",
            "lineNumber": 103
          },
          {
            "text": "\t\t$featured_select       = isset( $instance['featured_select'] ) ? $instance['featured_select'] : $featured_select_slugs[0];",
            "lineNumber": 104
          },
          {
            "text": "\t\t$showtitle             = ( isset( $instance['cb_showtitle'] ) &amp;&amp; 'true' === $instance['cb_showtitle'] );",
            "lineNumber": 105
          },
          {
            "text": "\t\t$showprice             = ( isset( $instance['cb_showprice'] ) &amp;&amp; 'true' === $instance['cb_showprice'] );",
            "lineNumber": 106
          },
          {
            "lineNumber": 107
          },
          {
            "text": "\t\t$inventory_ids = array();",
            "lineNumber": 108
          },
          {
            "lineNumber": 109
          },
          {
            "text": "\t\t$get_posts_args = array(",
            "lineNumber": 110
          },
          {
            "text": "\t\t\t'fields'         =&gt; 'ids',",
            "lineNumber": 111
          },
          {
            "text": "\t\t\t'meta_query'     =&gt; array(",
            "lineNumber": 112
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 113
          },
          {
            "text": "\t\t\t\t\t'key'     =&gt; '_thumbnail_id',",
            "lineNumber": 114
          },
          {
            "text": "\t\t\t\t\t'compare' =&gt; 'EXISTS',",
            "lineNumber": 115
          },
          {
            "text": "\t\t\t\t),",
            "lineNumber": 116
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 117
          },
          {
            "text": "\t\t\t'order'          =&gt; 'ASC',",
            "lineNumber": 118
          },
          {
            "text": "\t\t\t'orderby'        =&gt; 'rand',",
            "lineNumber": 119
          },
          {
            "text": "\t\t\t'post_type'      =&gt; INVP::POST_TYPE,",
            "lineNumber": 120
          },
          {
            "text": "\t\t\t'posts_per_page' =&gt; $showcount * 5, // get 5 sets of the number we'll show at one time.",
            "lineNumber": 121
          },
          {
            "text": "\t\t);",
            "lineNumber": 122
          },
          {
            "lineNumber": 123
          },
          {
            "text": "\t\tswitch ( $featured_select ) {",
            "lineNumber": 124
          },
          {
            "lineNumber": 125
          },
          {
            "text": "\t\t\tcase 'random':",
            "lineNumber": 126
          },
          {
            "text": "\t\t\t\t$get_posts_args['meta_key'] = '_thumbnail_id';",
            "lineNumber": 127
          },
          {
            "text": "\t\t\t\t$inventory_ids              = get_posts( apply_filters( 'invp_slider_widget_query_args', $get_posts_args ) );",
            "lineNumber": 128
          },
          {
            "text": "\t\t\t\tbreak;",
            "lineNumber": 129
          },
          {
            "lineNumber": 130
          },
          {
            "text": "\t\t\tcase 'newest_first':",
            "lineNumber": 131
          },
          {
            "text": "\t\t\t\t$get_posts_args['meta_key'] = apply_filters( 'invp_prefix_meta_key', 'last_modified' );",
            "lineNumber": 132
          }
        ]
      },
      "score": 0.3938348889350891
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./package.json",
        "range": {
          "startPosition": {},
          "endPosition": {
            "line": 26
          }
        },
        "contents": "{\n\t\"name\": \"inventory-presser\",\n\t\"version\": \"15.2.7\",\n\t\"description\": \"Simple inventory listings &amp; everything else\",\n\t\"main\": \"build/index.js\",\n\t\"scripts\": {\n\t\t\"start\": \"wp-scripts start\",\n\t\t\"build\": \"wp-scripts build ; cp -R node_modules/leaflet/dist/ js/leaflet ; cp -R node_modules/iframe-resizer/js/ js/iframe-resizer ; minify js/leaflet/leaflet.css &gt; js/leaflet/leaflet.min.css ; minify vendor/woocommerce/FlexSlider/flexslider.css &gt; css/woocommerce-flexslider.min.css\"\n\t},\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"git+https://github.com/fridaysystems/inventory-presser.git\"\n\t},\n\t\"author\": \"csalzano\",\n\t\"license\": \"GPL-2.0-only\",\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/fridaysystems/inventory-presser/issues\"\n\t},\n\t\"homepage\": \"https://github.com/fridaysystems/inventory-presser#readme\",\n\t\"devDependencies\": {\n\t\t\"@wordpress/scripts\": \"^30.1.0\",\n\t\t\"iframe-resizer\": \"^4.3.2\",\n\t\t\"leaflet\": \"^1.7.1\",\n\t\t\"minify\": \"^8.0.4\"\n\t}\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "{",
            "lineNumber": 1
          },
          {
            "text": "\t\"name\": \"inventory-presser\",",
            "lineNumber": 2
          },
          {
            "text": "\t\"version\": \"15.2.7\",",
            "lineNumber": 3
          },
          {
            "text": "\t\"description\": \"Simple inventory listings &amp; everything else\",",
            "lineNumber": 4
          },
          {
            "text": "\t\"main\": \"build/index.js\",",
            "lineNumber": 5
          },
          {
            "text": "\t\"scripts\": {",
            "lineNumber": 6
          },
          {
            "text": "\t\t\"start\": \"wp-scripts start\",",
            "lineNumber": 7
          },
          {
            "text": "\t\t\"build\": \"wp-scripts build ; cp -R node_modules/leaflet/dist/ js/leaflet ; cp -R node_modules/iframe-resizer/js/ js/iframe-resizer ; minify js/leaflet/leaflet.css &gt; js/leaflet/leaflet.min.css ; minify vendor/woocommerce/FlexSlider/flexslider.css &gt; css/woocommerce-flexslider.min.css\"",
            "lineNumber": 8
          },
          {
            "text": "\t},",
            "lineNumber": 9
          },
          {
            "text": "\t\"repository\": {",
            "lineNumber": 10
          },
          {
            "text": "\t\t\"type\": \"git\",",
            "lineNumber": 11
          },
          {
            "text": "\t\t\"url\": \"git+https://github.com/fridaysystems/inventory-presser.git\"",
            "lineNumber": 12
          },
          {
            "text": "\t},",
            "lineNumber": 13
          },
          {
            "text": "\t\"author\": \"csalzano\",",
            "lineNumber": 14
          },
          {
            "text": "\t\"license\": \"GPL-2.0-only\",",
            "lineNumber": 15
          },
          {
            "text": "\t\"bugs\": {",
            "lineNumber": 16
          },
          {
            "text": "\t\t\"url\": \"https://github.com/fridaysystems/inventory-presser/issues\"",
            "lineNumber": 17
          },
          {
            "text": "\t},",
            "lineNumber": 18
          },
          {
            "text": "\t\"homepage\": \"https://github.com/fridaysystems/inventory-presser#readme\",",
            "lineNumber": 19
          },
          {
            "text": "\t\"devDependencies\": {",
            "lineNumber": 20
          },
          {
            "text": "\t\t\"@wordpress/scripts\": \"^30.1.0\",",
            "lineNumber": 21
          },
          {
            "text": "\t\t\"iframe-resizer\": \"^4.3.2\",",
            "lineNumber": 22
          },
          {
            "text": "\t\t\"leaflet\": \"^1.7.1\",",
            "lineNumber": 23
          },
          {
            "text": "\t\t\"minify\": \"^8.0.4\"",
            "lineNumber": 24
          },
          {
            "text": "\t}",
            "lineNumber": 25
          },
          {
            "text": "}",
            "lineNumber": 26
          }
        ]
      },
      "score": 0.38888978958129883
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 778
          },
          "endPosition": {
            "line": 828
          }
        },
        "contents": "\r\n\t\t\t// Allow users to set the Inventory listing page as the home page.\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Allow_Inventory_As_Home_Page' ) ) {\r\n\t\t\t\t$page = new Inventory_Presser_Allow_Inventory_As_Home_Page();\r\n\t\t\t\t$page-&gt;add_hooks();\r\n\t\t\t}\r\n\r\n\t\t\t// Add all our shortcodes.\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Grid' ) ) {\r\n\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Grid();\r\n\t\t\t\t$shortcodes-&gt;add_hooks();\r\n\t\t\t}\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Iframe' ) ) {\r\n\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Iframe();\r\n\t\t\t\t$shortcodes-&gt;add_hooks();\r\n\t\t\t}\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Slider' ) ) {\r\n\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Slider();\r\n\t\t\t\t$shortcodes-&gt;add_hooks();\r\n\t\t\t}\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Single_Vehicle' ) ) {\r\n\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Single_Vehicle();\r\n\t\t\t\t$shortcodes-&gt;add_hooks();\r\n\t\t\t}\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Archive' ) ) {\r\n\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Archive();\r\n\t\t\t\t$shortcodes-&gt;add_hooks();\r\n\t\t\t}\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Archive_Vehicle' ) ) {\r\n\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Archive_Vehicle();\r\n\t\t\t\t$shortcodes-&gt;add_hooks();\r\n\t\t\t}\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Attribute_Table' ) ) {\r\n\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Attribute_Table();\r\n\t\t\t\t$shortcodes-&gt;add_hooks();\r\n\t\t\t}\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Hours_Today' ) ) {\r\n\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Hours_Today();\r\n\t\t\t\t$shortcodes-&gt;add_hooks();\r\n\t\t\t}\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Photo_Slider' ) ) {\r\n\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Photo_Slider();\r\n\t\t\t\t$shortcodes-&gt;add_hooks();\r\n\t\t\t}\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Price' ) ) {\r\n\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Price();\r\n\t\t\t\t$shortcodes-&gt;add_hooks();\r\n\t\t\t}\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Vin' ) ) {\r\n\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Vin();\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\r",
            "lineNumber": 779
          },
          {
            "text": "\t\t\t// Allow users to set the Inventory listing page as the home page.\r",
            "lineNumber": 780
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Allow_Inventory_As_Home_Page' ) ) {\r",
            "lineNumber": 781
          },
          {
            "text": "\t\t\t\t$page = new Inventory_Presser_Allow_Inventory_As_Home_Page();\r",
            "lineNumber": 782
          },
          {
            "text": "\t\t\t\t$page-&gt;add_hooks();\r",
            "lineNumber": 783
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 784
          },
          {
            "text": "\r",
            "lineNumber": 785
          },
          {
            "text": "\t\t\t// Add all our shortcodes.\r",
            "lineNumber": 786
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Grid' ) ) {\r",
            "lineNumber": 787
          },
          {
            "text": "\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Grid();\r",
            "lineNumber": 788
          },
          {
            "text": "\t\t\t\t$shortcodes-&gt;add_hooks();\r",
            "lineNumber": 789
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 790
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Iframe' ) ) {\r",
            "lineNumber": 791
          },
          {
            "text": "\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Iframe();\r",
            "lineNumber": 792
          },
          {
            "text": "\t\t\t\t$shortcodes-&gt;add_hooks();\r",
            "lineNumber": 793
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 794
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Slider' ) ) {\r",
            "lineNumber": 795
          },
          {
            "text": "\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Slider();\r",
            "lineNumber": 796
          },
          {
            "text": "\t\t\t\t$shortcodes-&gt;add_hooks();\r",
            "lineNumber": 797
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 798
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Single_Vehicle' ) ) {\r",
            "lineNumber": 799
          },
          {
            "text": "\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Single_Vehicle();\r",
            "lineNumber": 800
          },
          {
            "text": "\t\t\t\t$shortcodes-&gt;add_hooks();\r",
            "lineNumber": 801
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 802
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Archive' ) ) {\r",
            "lineNumber": 803
          },
          {
            "text": "\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Archive();\r",
            "lineNumber": 804
          },
          {
            "text": "\t\t\t\t$shortcodes-&gt;add_hooks();\r",
            "lineNumber": 805
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 806
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Archive_Vehicle' ) ) {\r",
            "lineNumber": 807
          },
          {
            "text": "\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Archive_Vehicle();\r",
            "lineNumber": 808
          },
          {
            "text": "\t\t\t\t$shortcodes-&gt;add_hooks();\r",
            "lineNumber": 809
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 810
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Attribute_Table' ) ) {\r",
            "lineNumber": 811
          },
          {
            "text": "\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Attribute_Table();\r",
            "lineNumber": 812
          },
          {
            "text": "\t\t\t\t$shortcodes-&gt;add_hooks();\r",
            "lineNumber": 813
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 814
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Hours_Today' ) ) {\r",
            "lineNumber": 815
          },
          {
            "text": "\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Hours_Today();\r",
            "lineNumber": 816
          },
          {
            "text": "\t\t\t\t$shortcodes-&gt;add_hooks();\r",
            "lineNumber": 817
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 818
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Photo_Slider' ) ) {\r",
            "lineNumber": 819
          },
          {
            "text": "\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Photo_Slider();\r",
            "lineNumber": 820
          },
          {
            "text": "\t\t\t\t$shortcodes-&gt;add_hooks();\r",
            "lineNumber": 821
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 822
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Price' ) ) {\r",
            "lineNumber": 823
          },
          {
            "text": "\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Price();\r",
            "lineNumber": 824
          },
          {
            "text": "\t\t\t\t$shortcodes-&gt;add_hooks();\r",
            "lineNumber": 825
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 826
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Shortcode_Vin' ) ) {\r",
            "lineNumber": 827
          },
          {
            "text": "\t\t\t\t$shortcodes = new Inventory_Presser_Shortcode_Vin();\r",
            "lineNumber": 828
          }
        ]
      },
      "score": 0.3864656984806061
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./js/widget-slider.js",
        "range": {
          "startPosition": {},
          "endPosition": {
            "line": 83
          }
        },
        "contents": " {\r\n\t/**\r\n\t * Initialize all sliders on the page. Each slider can have its own configuration.\r\n\t */\r\n\tvar sliderContainers = document.querySelectorAll('.widget__invp_slick');\r\n\t\r\n\tif ( ! sliderContainers.length ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Ensure the configs object exists.\r\n\tif ( typeof window.invpSliderConfigs === 'undefined' ) {\r\n\t\twindow.invpSliderConfigs = {};\r\n\t}\r\n\r\n\tsliderContainers.forEach( function( container ) {\r\n\t\tvar sliderId = container.getAttribute('data-slider-id');\r\n\t\tif ( ! sliderId ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar config = window.invpSliderConfigs[sliderId];\r\n\t\tif ( ! config ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * The more slides shown at once, the shorter the slider is. Cap at 2 in\r\n\t\t * frame at one time so the thumbnails do not appear smaller than postage\r\n\t\t * stamps on smaller devices.\r\n\t\t */\r\n\t\tvar showcount = config.showcount;\r\n\t\tif( document.documentElement.clientWidth &lt;= 480 \r\n\t\t\t&amp;&amp; showcount &gt; 2 ) {\r\n\t\t\tshowcount = 2;\r\n\t\t}\r\n\r\n\t\tvar sliderWidthEl = container.querySelector('.slider-width');\r\n\t\tvar flexslider = container.querySelector('.flexslider');\r\n\t\t\r\n\t\tif ( ! flexslider || ! sliderWidthEl ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar sliderWidth = jQuery(sliderWidthEl).width();\r\n\t\tif ( ! sliderWidth ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tjQuery(flexslider).flexslider({\r\n\t\t\tanimation: 'slide',",
        "signatures": {},
        "detailedLines": [
          {
            "text": " {\r",
            "lineNumber": 1
          },
          {
            "text": "\t/**\r",
            "lineNumber": 2
          },
          {
            "text": "\t * Initialize all sliders on the page. Each slider can have its own configuration.\r",
            "lineNumber": 3
          },
          {
            "text": "\t */\r",
            "lineNumber": 4
          },
          {
            "text": "\tvar sliderContainers = document.querySelectorAll('.widget__invp_slick');\r",
            "lineNumber": 5
          },
          {
            "text": "\t\r",
            "lineNumber": 6
          },
          {
            "text": "\tif ( ! sliderContainers.length ) {\r",
            "lineNumber": 7
          },
          {
            "text": "\t\treturn;\r",
            "lineNumber": 8
          },
          {
            "text": "\t}\r",
            "lineNumber": 9
          },
          {
            "text": "\r",
            "lineNumber": 10
          },
          {
            "text": "\t// Ensure the configs object exists.\r",
            "lineNumber": 11
          },
          {
            "text": "\tif ( typeof window.invpSliderConfigs === 'undefined' ) {\r",
            "lineNumber": 12
          },
          {
            "text": "\t\twindow.invpSliderConfigs = {};\r",
            "lineNumber": 13
          },
          {
            "text": "\t}\r",
            "lineNumber": 14
          },
          {
            "text": "\r",
            "lineNumber": 15
          },
          {
            "text": "\tsliderContainers.forEach( function( container ) {\r",
            "lineNumber": 16
          },
          {
            "text": "\t\tvar sliderId = container.getAttribute('data-slider-id');\r",
            "lineNumber": 17
          },
          {
            "text": "\t\tif ( ! sliderId ) {\r",
            "lineNumber": 18
          },
          {
            "text": "\t\t\treturn;\r",
            "lineNumber": 19
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 20
          },
          {
            "text": "\r",
            "lineNumber": 21
          },
          {
            "text": "\t\tvar config = window.invpSliderConfigs[sliderId];\r",
            "lineNumber": 22
          },
          {
            "text": "\t\tif ( ! config ) {\r",
            "lineNumber": 23
          },
          {
            "text": "\t\t\treturn;\r",
            "lineNumber": 24
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 25
          },
          {
            "text": "\r",
            "lineNumber": 26
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 27
          },
          {
            "text": "\t\t * The more slides shown at once, the shorter the slider is. Cap at 2 in\r",
            "lineNumber": 28
          },
          {
            "text": "\t\t * frame at one time so the thumbnails do not appear smaller than postage\r",
            "lineNumber": 29
          },
          {
            "text": "\t\t * stamps on smaller devices.\r",
            "lineNumber": 30
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 31
          },
          {
            "text": "\t\tvar showcount = config.showcount;\r",
            "lineNumber": 32
          },
          {
            "text": "\t\tif( document.documentElement.clientWidth &lt;= 480 \r",
            "lineNumber": 33
          },
          {
            "text": "\t\t\t&amp;&amp; showcount &gt; 2 ) {\r",
            "lineNumber": 34
          },
          {
            "text": "\t\t\tshowcount = 2;\r",
            "lineNumber": 35
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 36
          },
          {
            "text": "\r",
            "lineNumber": 37
          },
          {
            "text": "\t\tvar sliderWidthEl = container.querySelector('.slider-width');\r",
            "lineNumber": 38
          },
          {
            "text": "\t\tvar flexslider = container.querySelector('.flexslider');\r",
            "lineNumber": 39
          },
          {
            "text": "\t\t\r",
            "lineNumber": 40
          },
          {
            "text": "\t\tif ( ! flexslider || ! sliderWidthEl ) {\r",
            "lineNumber": 41
          },
          {
            "text": "\t\t\treturn;\r",
            "lineNumber": 42
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 43
          },
          {
            "text": "\r",
            "lineNumber": 44
          },
          {
            "text": "\t\tvar sliderWidth = jQuery(sliderWidthEl).width();\r",
            "lineNumber": 45
          },
          {
            "text": "\t\tif ( ! sliderWidth ) {\r",
            "lineNumber": 46
          },
          {
            "text": "\t\t\treturn;\r",
            "lineNumber": 47
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 48
          },
          {
            "text": "\r",
            "lineNumber": 49
          },
          {
            "text": "\t\tjQuery(flexslider).flexslider({\r",
            "lineNumber": 50
          },
          {
            "text": "\t\t\tanimation: 'slide',",
            "lineNumber": 51
          }
        ]
      },
      "score": 0.3840756416320801
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 699
          },
          "endPosition": {
            "line": 747
          }
        },
        "contents": "\r\n\t\t\t// Register some widgets included with this plugin.\r\n\t\t\tadd_action( 'widgets_init', array( $this, 'register_widgets' ) );\r\n\r\n\t\t\t/**\r\n\t\t\t * Deliver our promise to order posts, change the ORDER BY clause of\r\n\t\t\t * the query that's fetching post objects.\r\n\t\t\t */\r\n\t\t\tif ( ! is_admin() ) {\r\n\t\t\t\tadd_action( 'pre_get_posts', array( $this, 'add_orderby_to_query' ) );\r\n\t\t\t}\r\n\r\n\t\t\t// Register scripts and styles.\r\n\t\t\tadd_action( 'wp_enqueue_scripts', array( __CLASS__, 'include_scripts_and_styles' ) );\r\n\t\t\tadd_action( 'admin_enqueue_scripts', array( __CLASS__, 'include_scripts_and_styles' ) );\r\n\t\t\tadd_action( 'enqueue_block_assets', array( __CLASS__, 'include_scripts_and_styles' ) );\r\n\r\n\t\t\t// Allow custom fields to be searched.\r\n\t\t\tif ( class_exists( 'Add_Custom_Fields_To_Search' ) ) {\r\n\t\t\t\t$add_custom_fields_to_search = new Add_Custom_Fields_To_Search();\r\n\t\t\t\t$add_custom_fields_to_search-&gt;add_hooks();\r\n\t\t\t}\r\n\r\n\t\t\t// Redirect URLs by VINs to proper vehicle permalinks.\r\n\t\t\tif ( class_exists( 'Vehicle_URLs_By_VIN' ) ) {\r\n\t\t\t\t$allow_urls_by_vin = new Vehicle_URLs_By_VIN();\r\n\t\t\t\t$allow_urls_by_vin-&gt;add_hooks();\r\n\t\t\t}\r\n\r\n\t\t\t// Add buttons near vehicles for Carfax reports or NextGear inspections.\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Badges' ) ) {\r\n\t\t\t\t$badges = new Inventory_Presser_Badges();\r\n\t\t\t\t$badges-&gt;add_hooks();\r\n\t\t\t}\r\n\r\n\t\t\t// Redirect 404 vehicles to make archives.\r\n\t\t\tif ( class_exists( 'Redirect_404_Vehicles' ) ) {\r\n\t\t\t\t$redirect_404_vehicles = new Redirect_404_Vehicles();\r\n\t\t\t\t$redirect_404_vehicles-&gt;add_hooks();\r\n\t\t\t}\r\n\r\n\t\t\t// Modify the URL of an \"Email a Friend\" menu item on the \"Vehicle Details Buttons\" menu.\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Email_A_Friend' ) ) {\r\n\t\t\t\t$email_a_friend = new Inventory_Presser_Email_A_Friend();\r\n\t\t\t\t$email_a_friend-&gt;add_hooks();\r\n\t\t\t}\r\n\r\n\t\t\t// Make it possible for a menu item to print the page.\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\r",
            "lineNumber": 700
          },
          {
            "text": "\t\t\t// Register some widgets included with this plugin.\r",
            "lineNumber": 701
          },
          {
            "text": "\t\t\tadd_action( 'widgets_init', array( $this, 'register_widgets' ) );\r",
            "lineNumber": 702
          },
          {
            "text": "\r",
            "lineNumber": 703
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 704
          },
          {
            "text": "\t\t\t * Deliver our promise to order posts, change the ORDER BY clause of\r",
            "lineNumber": 705
          },
          {
            "text": "\t\t\t * the query that's fetching post objects.\r",
            "lineNumber": 706
          },
          {
            "text": "\t\t\t */\r",
            "lineNumber": 707
          },
          {
            "text": "\t\t\tif ( ! is_admin() ) {\r",
            "lineNumber": 708
          },
          {
            "text": "\t\t\t\tadd_action( 'pre_get_posts', array( $this, 'add_orderby_to_query' ) );\r",
            "lineNumber": 709
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 710
          },
          {
            "text": "\r",
            "lineNumber": 711
          },
          {
            "text": "\t\t\t// Register scripts and styles.\r",
            "lineNumber": 712
          },
          {
            "text": "\t\t\tadd_action( 'wp_enqueue_scripts', array( __CLASS__, 'include_scripts_and_styles' ) );\r",
            "lineNumber": 713
          },
          {
            "text": "\t\t\tadd_action( 'admin_enqueue_scripts', array( __CLASS__, 'include_scripts_and_styles' ) );\r",
            "lineNumber": 714
          },
          {
            "text": "\t\t\tadd_action( 'enqueue_block_assets', array( __CLASS__, 'include_scripts_and_styles' ) );\r",
            "lineNumber": 715
          },
          {
            "text": "\r",
            "lineNumber": 716
          },
          {
            "text": "\t\t\t// Allow custom fields to be searched.\r",
            "lineNumber": 717
          },
          {
            "text": "\t\t\tif ( class_exists( 'Add_Custom_Fields_To_Search' ) ) {\r",
            "lineNumber": 718
          },
          {
            "text": "\t\t\t\t$add_custom_fields_to_search = new Add_Custom_Fields_To_Search();\r",
            "lineNumber": 719
          },
          {
            "text": "\t\t\t\t$add_custom_fields_to_search-&gt;add_hooks();\r",
            "lineNumber": 720
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 721
          },
          {
            "text": "\r",
            "lineNumber": 722
          },
          {
            "text": "\t\t\t// Redirect URLs by VINs to proper vehicle permalinks.\r",
            "lineNumber": 723
          },
          {
            "text": "\t\t\tif ( class_exists( 'Vehicle_URLs_By_VIN' ) ) {\r",
            "lineNumber": 724
          },
          {
            "text": "\t\t\t\t$allow_urls_by_vin = new Vehicle_URLs_By_VIN();\r",
            "lineNumber": 725
          },
          {
            "text": "\t\t\t\t$allow_urls_by_vin-&gt;add_hooks();\r",
            "lineNumber": 726
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 727
          },
          {
            "text": "\r",
            "lineNumber": 728
          },
          {
            "text": "\t\t\t// Add buttons near vehicles for Carfax reports or NextGear inspections.\r",
            "lineNumber": 729
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Badges' ) ) {\r",
            "lineNumber": 730
          },
          {
            "text": "\t\t\t\t$badges = new Inventory_Presser_Badges();\r",
            "lineNumber": 731
          },
          {
            "text": "\t\t\t\t$badges-&gt;add_hooks();\r",
            "lineNumber": 732
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 733
          },
          {
            "text": "\r",
            "lineNumber": 734
          },
          {
            "text": "\t\t\t// Redirect 404 vehicles to make archives.\r",
            "lineNumber": 735
          },
          {
            "text": "\t\t\tif ( class_exists( 'Redirect_404_Vehicles' ) ) {\r",
            "lineNumber": 736
          },
          {
            "text": "\t\t\t\t$redirect_404_vehicles = new Redirect_404_Vehicles();\r",
            "lineNumber": 737
          },
          {
            "text": "\t\t\t\t$redirect_404_vehicles-&gt;add_hooks();\r",
            "lineNumber": 738
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 739
          },
          {
            "text": "\r",
            "lineNumber": 740
          },
          {
            "text": "\t\t\t// Modify the URL of an \"Email a Friend\" menu item on the \"Vehicle Details Buttons\" menu.\r",
            "lineNumber": 741
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Email_A_Friend' ) ) {\r",
            "lineNumber": 742
          },
          {
            "text": "\t\t\t\t$email_a_friend = new Inventory_Presser_Email_A_Friend();\r",
            "lineNumber": 743
          },
          {
            "text": "\t\t\t\t$email_a_friend-&gt;add_hooks();\r",
            "lineNumber": 744
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 745
          },
          {
            "text": "\r",
            "lineNumber": 746
          },
          {
            "text": "\t\t\t// Make it possible for a menu item to print the page.\r",
            "lineNumber": 747
          }
        ]
      },
      "score": 0.38070249557495117
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/class-blocks.php",
        "range": {
          "startPosition": {
            "line": 68,
            "column": 4
          },
          "endPosition": {
            "line": 138
          }
        },
        "contents": "// Yes. The post already has a Description block.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// The post does not have a Description block. Add one.\n\t\t$blocks[]           = array(\n\t\t\t'blockName'    =&gt; 'inventory-presser/description',\n\t\t\t'attrs'        =&gt; array(),\n\t\t\t'innerBlocks'  =&gt; array(),\n\t\t\t'innerHTML'    =&gt; '',\n\t\t\t'innerContent' =&gt; array(),\n\t\t);\n\t\t$post-&gt;post_content = serialize_blocks( $blocks );\n\t\twp_update_post( $post );\n\t}\n\n\t/**\n\t * Enqueues block editor assets\n\t *\n\t * @return void\n\t */\n\tpublic function enqueue_block_editor_assets() {\n\t\tif ( is_admin() ) {\n\t\t\twp_enqueue_script( 'invp-blocks' );\n\t\t\twp_enqueue_style( 'invp-block-editor' );\n\t\t}\n\t}\n\n\t/**\n\t * Registers block types\n\t *\n\t * @return void\n\t */\n\tpublic function register_block_types() {\n\t\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\t\t// running on WordPress &lt; 5.0.0, no blocks for you.\n\t\t\treturn;\n\t\t}\n\n\t\t$block_types = array(\n\t\t\t'year-make-model-and-trim',\n\t\t\t'beam', // For boats.\n\t\t\t'body-style',\n\t\t\t'color',\n\t\t\t'description',\n\t\t\t'down-payment',\n\t\t\t'engine',\n\t\t\t'interior-color',\n\t\t\t'last-modified',\n\t\t\t'length', // For trailers &amp; boats.\n\t\t\t'make',\n\t\t\t'model',\n\t\t\t'msrp',\n\t\t\t'odometer',\n\t\t\t'payment',\n\t\t\t'price',\n\t\t\t'stock-number',\n\t\t\t'title-status',\n\t\t\t'transmission-speeds',\n\t\t\t'trim',\n\t\t\t'vin',\n\t\t\t'year',\n\t\t\t'youtube',\n\t\t);\n\t\tforeach ( $block_types as $block_type ) {\n\t\t\tregister_block_type( dirname( INVP_PLUGIN_FILE_PATH ) . '/build/blocks/' . $block_type . '/block.json' );\n\t\t}\n\t}\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "// Yes. The post already has a Description block.",
            "lineNumber": 69
          },
          {
            "text": "\t\t\t\treturn;",
            "lineNumber": 70
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 71
          },
          {
            "text": "\t\t}",
            "lineNumber": 72
          },
          {
            "lineNumber": 73
          },
          {
            "text": "\t\t// The post does not have a Description block. Add one.",
            "lineNumber": 74
          },
          {
            "text": "\t\t$blocks[]           = array(",
            "lineNumber": 75
          },
          {
            "text": "\t\t\t'blockName'    =&gt; 'inventory-presser/description',",
            "lineNumber": 76
          },
          {
            "text": "\t\t\t'attrs'        =&gt; array(),",
            "lineNumber": 77
          },
          {
            "text": "\t\t\t'innerBlocks'  =&gt; array(),",
            "lineNumber": 78
          },
          {
            "text": "\t\t\t'innerHTML'    =&gt; '',",
            "lineNumber": 79
          },
          {
            "text": "\t\t\t'innerContent' =&gt; array(),",
            "lineNumber": 80
          },
          {
            "text": "\t\t);",
            "lineNumber": 81
          },
          {
            "text": "\t\t$post-&gt;post_content = serialize_blocks( $blocks );",
            "lineNumber": 82
          },
          {
            "text": "\t\twp_update_post( $post );",
            "lineNumber": 83
          },
          {
            "text": "\t}",
            "lineNumber": 84
          },
          {
            "lineNumber": 85
          },
          {
            "text": "\t/**",
            "lineNumber": 86
          },
          {
            "text": "\t * Enqueues block editor assets",
            "lineNumber": 87
          },
          {
            "text": "\t *",
            "lineNumber": 88
          },
          {
            "text": "\t * @return void",
            "lineNumber": 89
          },
          {
            "text": "\t */",
            "lineNumber": 90
          },
          {
            "text": "\tpublic function enqueue_block_editor_assets() {",
            "lineNumber": 91
          },
          {
            "text": "\t\tif ( is_admin() ) {",
            "lineNumber": 92
          },
          {
            "text": "\t\t\twp_enqueue_script( 'invp-blocks' );",
            "lineNumber": 93
          },
          {
            "text": "\t\t\twp_enqueue_style( 'invp-block-editor' );",
            "lineNumber": 94
          },
          {
            "text": "\t\t}",
            "lineNumber": 95
          },
          {
            "text": "\t}",
            "lineNumber": 96
          },
          {
            "lineNumber": 97
          },
          {
            "text": "\t/**",
            "lineNumber": 98
          },
          {
            "text": "\t * Registers block types",
            "lineNumber": 99
          },
          {
            "text": "\t *",
            "lineNumber": 100
          },
          {
            "text": "\t * @return void",
            "lineNumber": 101
          },
          {
            "text": "\t */",
            "lineNumber": 102
          },
          {
            "text": "\tpublic function register_block_types() {",
            "lineNumber": 103
          },
          {
            "text": "\t\tif ( ! function_exists( 'register_block_type' ) ) {",
            "lineNumber": 104
          },
          {
            "text": "\t\t\t// running on WordPress &lt; 5.0.0, no blocks for you.",
            "lineNumber": 105
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 106
          },
          {
            "text": "\t\t}",
            "lineNumber": 107
          },
          {
            "lineNumber": 108
          },
          {
            "text": "\t\t$block_types = array(",
            "lineNumber": 109
          },
          {
            "text": "\t\t\t'year-make-model-and-trim',",
            "lineNumber": 110
          },
          {
            "text": "\t\t\t'beam', // For boats.",
            "lineNumber": 111
          },
          {
            "text": "\t\t\t'body-style',",
            "lineNumber": 112
          },
          {
            "text": "\t\t\t'color',",
            "lineNumber": 113
          },
          {
            "text": "\t\t\t'description',",
            "lineNumber": 114
          },
          {
            "text": "\t\t\t'down-payment',",
            "lineNumber": 115
          },
          {
            "text": "\t\t\t'engine',",
            "lineNumber": 116
          },
          {
            "text": "\t\t\t'interior-color',",
            "lineNumber": 117
          },
          {
            "text": "\t\t\t'last-modified',",
            "lineNumber": 118
          },
          {
            "text": "\t\t\t'length', // For trailers &amp; boats.",
            "lineNumber": 119
          },
          {
            "text": "\t\t\t'make',",
            "lineNumber": 120
          },
          {
            "text": "\t\t\t'model',",
            "lineNumber": 121
          },
          {
            "text": "\t\t\t'msrp',",
            "lineNumber": 122
          },
          {
            "text": "\t\t\t'odometer',",
            "lineNumber": 123
          },
          {
            "text": "\t\t\t'payment',",
            "lineNumber": 124
          },
          {
            "text": "\t\t\t'price',",
            "lineNumber": 125
          },
          {
            "text": "\t\t\t'stock-number',",
            "lineNumber": 126
          },
          {
            "text": "\t\t\t'title-status',",
            "lineNumber": 127
          },
          {
            "text": "\t\t\t'transmission-speeds',",
            "lineNumber": 128
          },
          {
            "text": "\t\t\t'trim',",
            "lineNumber": 129
          },
          {
            "text": "\t\t\t'vin',",
            "lineNumber": 130
          },
          {
            "text": "\t\t\t'year',",
            "lineNumber": 131
          },
          {
            "text": "\t\t\t'youtube',",
            "lineNumber": 132
          },
          {
            "text": "\t\t);",
            "lineNumber": 133
          },
          {
            "text": "\t\tforeach ( $block_types as $block_type ) {",
            "lineNumber": 134
          },
          {
            "text": "\t\t\tregister_block_type( dirname( INVP_PLUGIN_FILE_PATH ) . '/build/blocks/' . $block_type . '/block.json' );",
            "lineNumber": 135
          },
          {
            "text": "\t\t}",
            "lineNumber": 136
          },
          {
            "text": "\t}",
            "lineNumber": 137
          },
          {
            "text": "}",
            "lineNumber": 138
          }
        ]
      },
      "score": 0.37717190384864807
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1463
          },
          "endPosition": {
            "line": 1529
          }
        },
        "contents": "\r\n\t\t\t// Register leaflet.js script and style files used in Map widget.\r\n\t\t\twp_register_script(\r\n\t\t\t\tInventory_Presser_Map_Widget::SCRIPT_HANDLE_LEAFLET,\r\n\t\t\t\tplugins_url( 'js/leaflet/leaflet.js', INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray(),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\t\t\twp_register_script(\r\n\t\t\t\t'invp-maps',\r\n\t\t\t\tplugins_url( \"js/widget-map{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray( Inventory_Presser_Map_Widget::SCRIPT_HANDLE_LEAFLET ),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\t\t\twp_register_style(\r\n\t\t\t\tInventory_Presser_Map_Widget::SCRIPT_HANDLE_LEAFLET,\r\n\t\t\t\tplugins_url( \"js/leaflet/leaflet{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray(),\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\t\t\twp_register_style(\r\n\t\t\t\tInventory_Presser_Map_Widget::ID_BASE,\r\n\t\t\t\tplugins_url( \"css/widget-map{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray(),\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\r\n\t\t\t// Admin location meta scripts.\r\n\t\t\twp_register_script(\r\n\t\t\t\t'inventory-presser-timepicker',\r\n\t\t\t\tplugins_url( '/js/jquery.timepicker.min.js', INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray( 'jquery' ),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\t\t\twp_register_script(\r\n\t\t\t\t'inventory-presser-location',\r\n\t\t\t\tplugins_url( \"/js/tax-location{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray( 'inventory-presser-timepicker', 'jquery-ui-sortable' ),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\r\n\t\t\t// Classic Editor scripts.\r\n\t\t\twp_register_script(\r\n\t\t\t\t'invp-classic-editor',\r\n\t\t\t\tplugins_url( \"/js/classic-editor{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray( 'invp' ),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\r\n\t\t\t// Google Maps widget scripts.\r\n\t\t\twp_register_script(\r\n\t\t\t\t'invp_google_maps_v3',\r\n\t\t\t\tplugins_url( \"js/widget-google-maps-v3{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray( 'invp_google_maps_v3_goog' ),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Adds a link to the settings page near the Activate | Delete links on the\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\r",
            "lineNumber": 1464
          },
          {
            "text": "\t\t\t// Register leaflet.js script and style files used in Map widget.\r",
            "lineNumber": 1465
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1466
          },
          {
            "text": "\t\t\t\tInventory_Presser_Map_Widget::SCRIPT_HANDLE_LEAFLET,\r",
            "lineNumber": 1467
          },
          {
            "text": "\t\t\t\tplugins_url( 'js/leaflet/leaflet.js', INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1468
          },
          {
            "text": "\t\t\t\tarray(),\r",
            "lineNumber": 1469
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1470
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1471
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1472
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1473
          },
          {
            "text": "\t\t\t\t'invp-maps',\r",
            "lineNumber": 1474
          },
          {
            "text": "\t\t\t\tplugins_url( \"js/widget-map{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1475
          },
          {
            "text": "\t\t\t\tarray( Inventory_Presser_Map_Widget::SCRIPT_HANDLE_LEAFLET ),\r",
            "lineNumber": 1476
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1477
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1478
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1479
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1480
          },
          {
            "text": "\t\t\t\tInventory_Presser_Map_Widget::SCRIPT_HANDLE_LEAFLET,\r",
            "lineNumber": 1481
          },
          {
            "text": "\t\t\t\tplugins_url( \"js/leaflet/leaflet{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1482
          },
          {
            "text": "\t\t\t\tarray(),\r",
            "lineNumber": 1483
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1484
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1485
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1486
          },
          {
            "text": "\t\t\t\tInventory_Presser_Map_Widget::ID_BASE,\r",
            "lineNumber": 1487
          },
          {
            "text": "\t\t\t\tplugins_url( \"css/widget-map{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1488
          },
          {
            "text": "\t\t\t\tarray(),\r",
            "lineNumber": 1489
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1490
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1491
          },
          {
            "text": "\r",
            "lineNumber": 1492
          },
          {
            "text": "\t\t\t// Admin location meta scripts.\r",
            "lineNumber": 1493
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1494
          },
          {
            "text": "\t\t\t\t'inventory-presser-timepicker',\r",
            "lineNumber": 1495
          },
          {
            "text": "\t\t\t\tplugins_url( '/js/jquery.timepicker.min.js', INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1496
          },
          {
            "text": "\t\t\t\tarray( 'jquery' ),\r",
            "lineNumber": 1497
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1498
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1499
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1500
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1501
          },
          {
            "text": "\t\t\t\t'inventory-presser-location',\r",
            "lineNumber": 1502
          },
          {
            "text": "\t\t\t\tplugins_url( \"/js/tax-location{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1503
          },
          {
            "text": "\t\t\t\tarray( 'inventory-presser-timepicker', 'jquery-ui-sortable' ),\r",
            "lineNumber": 1504
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1505
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1506
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1507
          },
          {
            "text": "\r",
            "lineNumber": 1508
          },
          {
            "text": "\t\t\t// Classic Editor scripts.\r",
            "lineNumber": 1509
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1510
          },
          {
            "text": "\t\t\t\t'invp-classic-editor',\r",
            "lineNumber": 1511
          },
          {
            "text": "\t\t\t\tplugins_url( \"/js/classic-editor{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1512
          },
          {
            "text": "\t\t\t\tarray( 'invp' ),\r",
            "lineNumber": 1513
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1514
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1515
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1516
          },
          {
            "text": "\r",
            "lineNumber": 1517
          },
          {
            "text": "\t\t\t// Google Maps widget scripts.\r",
            "lineNumber": 1518
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1519
          },
          {
            "text": "\t\t\t\t'invp_google_maps_v3',\r",
            "lineNumber": 1520
          },
          {
            "text": "\t\t\t\tplugins_url( \"js/widget-google-maps-v3{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1521
          },
          {
            "text": "\t\t\t\tarray( 'invp_google_maps_v3_goog' ),\r",
            "lineNumber": 1522
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1523
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1524
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1525
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 1526
          },
          {
            "text": "\r",
            "lineNumber": 1527
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 1528
          },
          {
            "text": "\t\t * Adds a link to the settings page near the Activate | Delete links on the\r",
            "lineNumber": 1529
          }
        ]
      },
      "score": 0.37437888979911804
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1412
          },
          "endPosition": {
            "line": 1465
          }
        },
        "contents": "\r\n\t\t\t// Register the iFrameResizer.js script for use by our [invp_iframe] shortcode and Iframe block.\r\n\t\t\twp_register_script(\r\n\t\t\t\t'invp-iframe-resizer',\r\n\t\t\t\tplugins_url( \"/js/iframe-resizer/iframeResizer{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray(),\r\n\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\r\n\t\t\t/**\r\n\t\t\t * Register a stylesheet that will be used by two shortcodes,\r\n\t\t\t * [invp_archive_vehicle] and [invp_single_vehicle]\r\n\t\t\t */\r\n\t\t\twp_register_style(\r\n\t\t\t\t'invp-attribute-table',\r\n\t\t\t\tplugins_url( \"/css/vehicle-attribute-table{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tnull,\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\r\n\t\t\t// Register multiple stylesheets for the archive vehicle shortcode.\r\n\t\t\t// This one always loads.\r\n\t\t\twp_register_style(\r\n\t\t\t\t'invp_archive_vehicle',\r\n\t\t\t\tplugins_url( \"/css/shortcode-archive-vehicle{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tnull,\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\t\t\t// This one loads only when the style is set to \"a\".\r\n\t\t\twp_register_style(\r\n\t\t\t\t'invp_archive_vehicle_a',\r\n\t\t\t\tplugins_url( \"/css/shortcode-archive-vehicle-a{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray( 'invp_archive_vehicle' ),\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\t\t\t// This one loads only when the style is set to \"b\".\r\n\t\t\twp_register_style(\r\n\t\t\t\t'invp_archive_vehicle_b',\r\n\t\t\t\tplugins_url( \"/css/shortcode-archive-vehicle-b{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tarray( 'invp_archive_vehicle' ),\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\r\n\t\t\t// Register a stylesheet for the single vehicle shortcode.\r\n\t\t\twp_register_style(\r\n\t\t\t\t'invp_single_vehicle',\r\n\t\t\t\tplugins_url( \"/css/shortcode-single-vehicle{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\tnull,\r\n\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t);\r\n\r\n\t\t\t// Register leaflet.js script and style files used in Map widget.\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\r",
            "lineNumber": 1413
          },
          {
            "text": "\t\t\t// Register the iFrameResizer.js script for use by our [invp_iframe] shortcode and Iframe block.\r",
            "lineNumber": 1414
          },
          {
            "text": "\t\t\twp_register_script(\r",
            "lineNumber": 1415
          },
          {
            "text": "\t\t\t\t'invp-iframe-resizer',\r",
            "lineNumber": 1416
          },
          {
            "text": "\t\t\t\tplugins_url( \"/js/iframe-resizer/iframeResizer{$min}.js\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1417
          },
          {
            "text": "\t\t\t\tarray(),\r",
            "lineNumber": 1418
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1419
          },
          {
            "text": "\t\t\t\ttrue\r",
            "lineNumber": 1420
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1421
          },
          {
            "text": "\r",
            "lineNumber": 1422
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 1423
          },
          {
            "text": "\t\t\t * Register a stylesheet that will be used by two shortcodes,\r",
            "lineNumber": 1424
          },
          {
            "text": "\t\t\t * [invp_archive_vehicle] and [invp_single_vehicle]\r",
            "lineNumber": 1425
          },
          {
            "text": "\t\t\t */\r",
            "lineNumber": 1426
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1427
          },
          {
            "text": "\t\t\t\t'invp-attribute-table',\r",
            "lineNumber": 1428
          },
          {
            "text": "\t\t\t\tplugins_url( \"/css/vehicle-attribute-table{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1429
          },
          {
            "text": "\t\t\t\tnull,\r",
            "lineNumber": 1430
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1431
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1432
          },
          {
            "text": "\r",
            "lineNumber": 1433
          },
          {
            "text": "\t\t\t// Register multiple stylesheets for the archive vehicle shortcode.\r",
            "lineNumber": 1434
          },
          {
            "text": "\t\t\t// This one always loads.\r",
            "lineNumber": 1435
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1436
          },
          {
            "text": "\t\t\t\t'invp_archive_vehicle',\r",
            "lineNumber": 1437
          },
          {
            "text": "\t\t\t\tplugins_url( \"/css/shortcode-archive-vehicle{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1438
          },
          {
            "text": "\t\t\t\tnull,\r",
            "lineNumber": 1439
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1440
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1441
          },
          {
            "text": "\t\t\t// This one loads only when the style is set to \"a\".\r",
            "lineNumber": 1442
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1443
          },
          {
            "text": "\t\t\t\t'invp_archive_vehicle_a',\r",
            "lineNumber": 1444
          },
          {
            "text": "\t\t\t\tplugins_url( \"/css/shortcode-archive-vehicle-a{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1445
          },
          {
            "text": "\t\t\t\tarray( 'invp_archive_vehicle' ),\r",
            "lineNumber": 1446
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1447
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1448
          },
          {
            "text": "\t\t\t// This one loads only when the style is set to \"b\".\r",
            "lineNumber": 1449
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1450
          },
          {
            "text": "\t\t\t\t'invp_archive_vehicle_b',\r",
            "lineNumber": 1451
          },
          {
            "text": "\t\t\t\tplugins_url( \"/css/shortcode-archive-vehicle-b{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1452
          },
          {
            "text": "\t\t\t\tarray( 'invp_archive_vehicle' ),\r",
            "lineNumber": 1453
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1454
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1455
          },
          {
            "text": "\r",
            "lineNumber": 1456
          },
          {
            "text": "\t\t\t// Register a stylesheet for the single vehicle shortcode.\r",
            "lineNumber": 1457
          },
          {
            "text": "\t\t\twp_register_style(\r",
            "lineNumber": 1458
          },
          {
            "text": "\t\t\t\t'invp_single_vehicle',\r",
            "lineNumber": 1459
          },
          {
            "text": "\t\t\t\tplugins_url( \"/css/shortcode-single-vehicle{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1460
          },
          {
            "text": "\t\t\t\tnull,\r",
            "lineNumber": 1461
          },
          {
            "text": "\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1462
          },
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1463
          },
          {
            "text": "\r",
            "lineNumber": 1464
          },
          {
            "text": "\t\t\t// Register leaflet.js script and style files used in Map widget.\r",
            "lineNumber": 1465
          }
        ]
      },
      "score": 0.373649001121521
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1099
          },
          "endPosition": {
            "line": 1141
          }
        },
        "contents": "\r\n\t\t\t// Avada Builder.\r\n\t\t\t$plugin_path = 'fusion-builder/fusion-builder.php';\r\n\t\t\tif ( in_array( $plugin_path, $active_plugins, true )\r\n\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) ) {\r\n\t\t\t\t$avada = new Inventory_Presser_Avada();\r\n\t\t\t\t$avada-&gt;add_hooks();\r\n\t\t\t}\r\n\r\n\t\t\t// Divi.\r\n\t\t\t$divi = new Inventory_Presser_Divi();\r\n\t\t\t$divi-&gt;add_hooks();\r\n\r\n\t\t\t// Gravity Forms.\r\n\t\t\t$plugin_path = 'gravityforms/gravityforms.php';\r\n\t\t\tif ( ( in_array( $plugin_path, $active_plugins, true )\r\n\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) )\r\n\t\t\t\t&amp;&amp; class_exists( 'GF_Fields' ) ) {\r\n\t\t\t\tGF_Fields::register( new GF_Field_Vehicle() );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Load plugin textdomain.\r\n\t\t *\r\n\t\t * @return void\r\n\t\t */\r\n\t\tpublic function load_textdomain() {\r\n\t\t\tload_plugin_textdomain( 'inventory-presser', false, dirname( INVP_PLUGIN_FILE_PATH ) . '/languages' );\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Includes all the includes! This function loads all the other PHP files\r\n\t\t * that contain this plugin's code.\r\n\t\t *\r\n\t\t * @return void\r\n\t\t */\r\n\t\tprotected function include_dependencies() {\r\n\t\t\t// include composer dependencies.\r\n\t\t\tinclude_once plugin_dir_path( INVP_PLUGIN_FILE_PATH ) . 'vendor/autoload.php';\r\n\r\n\t\t\t// Include our object definition dependencies.\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\r",
            "lineNumber": 1100
          },
          {
            "text": "\t\t\t// Avada Builder.\r",
            "lineNumber": 1101
          },
          {
            "text": "\t\t\t$plugin_path = 'fusion-builder/fusion-builder.php';\r",
            "lineNumber": 1102
          },
          {
            "text": "\t\t\tif ( in_array( $plugin_path, $active_plugins, true )\r",
            "lineNumber": 1103
          },
          {
            "text": "\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) ) {\r",
            "lineNumber": 1104
          },
          {
            "text": "\t\t\t\t$avada = new Inventory_Presser_Avada();\r",
            "lineNumber": 1105
          },
          {
            "text": "\t\t\t\t$avada-&gt;add_hooks();\r",
            "lineNumber": 1106
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1107
          },
          {
            "text": "\r",
            "lineNumber": 1108
          },
          {
            "text": "\t\t\t// Divi.\r",
            "lineNumber": 1109
          },
          {
            "text": "\t\t\t$divi = new Inventory_Presser_Divi();\r",
            "lineNumber": 1110
          },
          {
            "text": "\t\t\t$divi-&gt;add_hooks();\r",
            "lineNumber": 1111
          },
          {
            "text": "\r",
            "lineNumber": 1112
          },
          {
            "text": "\t\t\t// Gravity Forms.\r",
            "lineNumber": 1113
          },
          {
            "text": "\t\t\t$plugin_path = 'gravityforms/gravityforms.php';\r",
            "lineNumber": 1114
          },
          {
            "text": "\t\t\tif ( ( in_array( $plugin_path, $active_plugins, true )\r",
            "lineNumber": 1115
          },
          {
            "text": "\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) )\r",
            "lineNumber": 1116
          },
          {
            "text": "\t\t\t\t&amp;&amp; class_exists( 'GF_Fields' ) ) {\r",
            "lineNumber": 1117
          },
          {
            "text": "\t\t\t\tGF_Fields::register( new GF_Field_Vehicle() );\r",
            "lineNumber": 1118
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1119
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 1120
          },
          {
            "text": "\r",
            "lineNumber": 1121
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 1122
          },
          {
            "text": "\t\t * Load plugin textdomain.\r",
            "lineNumber": 1123
          },
          {
            "text": "\t\t *\r",
            "lineNumber": 1124
          },
          {
            "text": "\t\t * @return void\r",
            "lineNumber": 1125
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 1126
          },
          {
            "text": "\t\tpublic function load_textdomain() {\r",
            "lineNumber": 1127
          },
          {
            "text": "\t\t\tload_plugin_textdomain( 'inventory-presser', false, dirname( INVP_PLUGIN_FILE_PATH ) . '/languages' );\r",
            "lineNumber": 1128
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 1129
          },
          {
            "text": "\r",
            "lineNumber": 1130
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 1131
          },
          {
            "text": "\t\t * Includes all the includes! This function loads all the other PHP files\r",
            "lineNumber": 1132
          },
          {
            "text": "\t\t * that contain this plugin's code.\r",
            "lineNumber": 1133
          },
          {
            "text": "\t\t *\r",
            "lineNumber": 1134
          },
          {
            "text": "\t\t * @return void\r",
            "lineNumber": 1135
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 1136
          },
          {
            "text": "\t\tprotected function include_dependencies() {\r",
            "lineNumber": 1137
          },
          {
            "text": "\t\t\t// include composer dependencies.\r",
            "lineNumber": 1138
          },
          {
            "text": "\t\t\tinclude_once plugin_dir_path( INVP_PLUGIN_FILE_PATH ) . 'vendor/autoload.php';\r",
            "lineNumber": 1139
          },
          {
            "text": "\r",
            "lineNumber": 1140
          },
          {
            "text": "\t\t\t// Include our object definition dependencies.\r",
            "lineNumber": 1141
          }
        ]
      },
      "score": 0.3640923500061035
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1139
          },
          "endPosition": {
            "line": 1190
          }
        },
        "contents": "\r\n\t\t\t// Include our object definition dependencies.\r\n\t\t\t$file_names = array(\r\n\t\t\t\t'class-add-custom-fields-to-search.php',\r\n\t\t\t\t'addon/class-addon-license-validator.php',\r\n\t\t\t\t'addon/class-addon-license.php',\r\n\t\t\t\t'addon/class-addon-updater.php',\r\n\t\t\t\t'addon/class-addon.php',\r\n\t\t\t\t'admin/class-admin-bar.php',\r\n\t\t\t\t'admin/class-admin-editor-sidebar.php',\r\n\t\t\t\t'admin/class-admin-location-meta.php',\r\n\t\t\t\t'admin/class-admin-menus.php',\r\n\t\t\t\t'admin/class-admin-options.php',\r\n\t\t\t\t'admin/class-admin-photo-arranger.php',\r\n\t\t\t\t'admin/class-admin-posts-list.php',\r\n\t\t\t\t'class-additional-listings-pages.php',\r\n\t\t\t\t'class-allow-inventory-as-home-page.php',\r\n\t\t\t\t'class-badges.php',\r\n\t\t\t\t'class-blocks.php',\r\n\t\t\t\t'class-business-day.php',\r\n\t\t\t\t'class-invp.php',\r\n\t\t\t\t'class-menu-item-email-a-friend.php',\r\n\t\t\t\t'class-menu-item-print.php',\r\n\t\t\t\t'class-option-manager.php',\r\n\t\t\t\t'class-photo-numberer.php',\r\n\t\t\t\t'class-range-filters.php',\r\n\t\t\t\t'class-redirect-404-vehicles.php',\r\n\t\t\t\t'class-rest.php',\r\n\t\t\t\t'class-schema-org-generator.php',\r\n\t\t\t\t'class-site-health.php',\r\n\t\t\t\t'integrations/class-avada.php',\r\n\t\t\t\t'integrations/class-classic-editor.php',\r\n\t\t\t\t'integrations/class-divi.php',\r\n\t\t\t\t'integrations/class-forms-integration.php',\r\n\t\t\t\t'integrations/class-contact-form-7.php',\r\n\t\t\t\t'integrations/class-gravityforms-field-vehicle.php',\r\n\t\t\t\t'integrations/class-wp-all-import.php',\r\n\t\t\t\t'integrations/class-wpforms.php',\r\n\t\t\t\t'shortcode/class-shortcode-hours-today.php',\r\n\t\t\t\t'shortcode/class-shortcode-iframe.php',\r\n\t\t\t\t'shortcode/class-shortcode-inventory-grid.php',\r\n\t\t\t\t'shortcode/class-shortcode-inventory-slider.php',\r\n\t\t\t\t'shortcode/class-shortcode-photo-slider.php',\r\n\t\t\t\t'shortcode/class-shortcode-archive.php',\r\n\t\t\t\t'shortcode/class-shortcode-archive-vehicle.php',\r\n\t\t\t\t'shortcode/class-shortcode-attribute-table.php',\r\n\t\t\t\t'shortcode/class-shortcode-price.php',\r\n\t\t\t\t'shortcode/class-shortcode-single-vehicle.php',\r\n\t\t\t\t'shortcode/class-shortcode-sort-by.php',\r\n\t\t\t\t'shortcode/class-shortcode-vin.php',\r\n\t\t\t\t'class-taxonomies.php',\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\r",
            "lineNumber": 1140
          },
          {
            "text": "\t\t\t// Include our object definition dependencies.\r",
            "lineNumber": 1141
          },
          {
            "text": "\t\t\t$file_names = array(\r",
            "lineNumber": 1142
          },
          {
            "text": "\t\t\t\t'class-add-custom-fields-to-search.php',\r",
            "lineNumber": 1143
          },
          {
            "text": "\t\t\t\t'addon/class-addon-license-validator.php',\r",
            "lineNumber": 1144
          },
          {
            "text": "\t\t\t\t'addon/class-addon-license.php',\r",
            "lineNumber": 1145
          },
          {
            "text": "\t\t\t\t'addon/class-addon-updater.php',\r",
            "lineNumber": 1146
          },
          {
            "text": "\t\t\t\t'addon/class-addon.php',\r",
            "lineNumber": 1147
          },
          {
            "text": "\t\t\t\t'admin/class-admin-bar.php',\r",
            "lineNumber": 1148
          },
          {
            "text": "\t\t\t\t'admin/class-admin-editor-sidebar.php',\r",
            "lineNumber": 1149
          },
          {
            "text": "\t\t\t\t'admin/class-admin-location-meta.php',\r",
            "lineNumber": 1150
          },
          {
            "text": "\t\t\t\t'admin/class-admin-menus.php',\r",
            "lineNumber": 1151
          },
          {
            "text": "\t\t\t\t'admin/class-admin-options.php',\r",
            "lineNumber": 1152
          },
          {
            "text": "\t\t\t\t'admin/class-admin-photo-arranger.php',\r",
            "lineNumber": 1153
          },
          {
            "text": "\t\t\t\t'admin/class-admin-posts-list.php',\r",
            "lineNumber": 1154
          },
          {
            "text": "\t\t\t\t'class-additional-listings-pages.php',\r",
            "lineNumber": 1155
          },
          {
            "text": "\t\t\t\t'class-allow-inventory-as-home-page.php',\r",
            "lineNumber": 1156
          },
          {
            "text": "\t\t\t\t'class-badges.php',\r",
            "lineNumber": 1157
          },
          {
            "text": "\t\t\t\t'class-blocks.php',\r",
            "lineNumber": 1158
          },
          {
            "text": "\t\t\t\t'class-business-day.php',\r",
            "lineNumber": 1159
          },
          {
            "text": "\t\t\t\t'class-invp.php',\r",
            "lineNumber": 1160
          },
          {
            "text": "\t\t\t\t'class-menu-item-email-a-friend.php',\r",
            "lineNumber": 1161
          },
          {
            "text": "\t\t\t\t'class-menu-item-print.php',\r",
            "lineNumber": 1162
          },
          {
            "text": "\t\t\t\t'class-option-manager.php',\r",
            "lineNumber": 1163
          },
          {
            "text": "\t\t\t\t'class-photo-numberer.php',\r",
            "lineNumber": 1164
          },
          {
            "text": "\t\t\t\t'class-range-filters.php',\r",
            "lineNumber": 1165
          },
          {
            "text": "\t\t\t\t'class-redirect-404-vehicles.php',\r",
            "lineNumber": 1166
          },
          {
            "text": "\t\t\t\t'class-rest.php',\r",
            "lineNumber": 1167
          },
          {
            "text": "\t\t\t\t'class-schema-org-generator.php',\r",
            "lineNumber": 1168
          },
          {
            "text": "\t\t\t\t'class-site-health.php',\r",
            "lineNumber": 1169
          },
          {
            "text": "\t\t\t\t'integrations/class-avada.php',\r",
            "lineNumber": 1170
          },
          {
            "text": "\t\t\t\t'integrations/class-classic-editor.php',\r",
            "lineNumber": 1171
          },
          {
            "text": "\t\t\t\t'integrations/class-divi.php',\r",
            "lineNumber": 1172
          },
          {
            "text": "\t\t\t\t'integrations/class-forms-integration.php',\r",
            "lineNumber": 1173
          },
          {
            "text": "\t\t\t\t'integrations/class-contact-form-7.php',\r",
            "lineNumber": 1174
          },
          {
            "text": "\t\t\t\t'integrations/class-gravityforms-field-vehicle.php',\r",
            "lineNumber": 1175
          },
          {
            "text": "\t\t\t\t'integrations/class-wp-all-import.php',\r",
            "lineNumber": 1176
          },
          {
            "text": "\t\t\t\t'integrations/class-wpforms.php',\r",
            "lineNumber": 1177
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-hours-today.php',\r",
            "lineNumber": 1178
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-iframe.php',\r",
            "lineNumber": 1179
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-inventory-grid.php',\r",
            "lineNumber": 1180
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-inventory-slider.php',\r",
            "lineNumber": 1181
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-photo-slider.php',\r",
            "lineNumber": 1182
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-archive.php',\r",
            "lineNumber": 1183
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-archive-vehicle.php',\r",
            "lineNumber": 1184
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-attribute-table.php',\r",
            "lineNumber": 1185
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-price.php',\r",
            "lineNumber": 1186
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-single-vehicle.php',\r",
            "lineNumber": 1187
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-sort-by.php',\r",
            "lineNumber": 1188
          },
          {
            "text": "\t\t\t\t'shortcode/class-shortcode-vin.php',\r",
            "lineNumber": 1189
          },
          {
            "text": "\t\t\t\t'class-taxonomies.php',\r",
            "lineNumber": 1190
          }
        ]
      },
      "score": 0.35469138622283936
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1301
          },
          "endPosition": {
            "line": 1355
          }
        },
        "contents": "\t\t\t\t\t\t\t'title_statuses'      =&gt; apply_filters(\r\n\t\t\t\t\t\t\t\t'invp_default_title_statuses',\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t__( 'Unspecified', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Clear', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Clean', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Flood, Water Damage', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Lemon and Manufacturers Buyback', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Rebuild, Rebuildable, and Reconstructed', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Salvage', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t\t__( 'Other', 'inventory-presser' ),\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) . ';'\r\n\t\t\t\t);\r\n\r\n\t\t\t\t// Register a script for our blocks, also without a .js URL.\r\n\t\t\t\twp_register_script(\r\n\t\t\t\t\t'invp-blocks',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\tarray(),\r\n\t\t\t\t\tINVP_PLUGIN_VERSION,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t\t// Provide the vehicle post type meta keys and prefix to JavaScript.\r\n\t\t\t\twp_add_inline_script(\r\n\t\t\t\t\t'invp-blocks',\r\n\t\t\t\t\t'const invp_blocks = ' . wp_json_encode(\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t'currency_symbol'             =&gt; INVP::currency_symbol(),\r\n\t\t\t\t\t\t\t'keys'                        =&gt; INVP::keys_and_types(),\r\n\t\t\t\t\t\t\t'meta_prefix'                 =&gt; INVP::meta_prefix(),\r\n\t\t\t\t\t\t\t'odometer_units'              =&gt; apply_filters( 'invp_odometer_word', __( 'Miles', 'inventory-presser' ) ),\r\n\t\t\t\t\t\t\t'use_carfax'                  =&gt; $settings['use_carfax'],\r\n\t\t\t\t\t\t\t'use_carfax_provided_buttons' =&gt; $settings['use_carfax_provided_buttons'],\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'before'\r\n\t\t\t\t);\r\n\t\t\t\t/**\r\n\t\t\t\t * Register a stylesheet for the Block Editor. This makes the\r\n\t\t\t\t * blocks provided by this plugin more pleasant to work with.\r\n\t\t\t\t */\r\n\t\t\t\twp_register_style(\r\n\t\t\t\t\t'invp-block-editor',\r\n\t\t\t\t\tplugins_url( \"css/block-editor{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r\n\t\t\t\t\tarray(),\r\n\t\t\t\t\tINVP_PLUGIN_VERSION\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * Register flexslider and provide overrides for scripts and styles\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t\t\t\t\t'title_statuses'      =&gt; apply_filters(\r",
            "lineNumber": 1302
          },
          {
            "text": "\t\t\t\t\t\t\t\t'invp_default_title_statuses',\r",
            "lineNumber": 1303
          },
          {
            "text": "\t\t\t\t\t\t\t\tarray(\r",
            "lineNumber": 1304
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Unspecified', 'inventory-presser' ),\r",
            "lineNumber": 1305
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Clear', 'inventory-presser' ),\r",
            "lineNumber": 1306
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Clean', 'inventory-presser' ),\r",
            "lineNumber": 1307
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Flood, Water Damage', 'inventory-presser' ),\r",
            "lineNumber": 1308
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Lemon and Manufacturers Buyback', 'inventory-presser' ),\r",
            "lineNumber": 1309
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Rebuild, Rebuildable, and Reconstructed', 'inventory-presser' ),\r",
            "lineNumber": 1310
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Salvage', 'inventory-presser' ),\r",
            "lineNumber": 1311
          },
          {
            "text": "\t\t\t\t\t\t\t\t\t__( 'Other', 'inventory-presser' ),\r",
            "lineNumber": 1312
          },
          {
            "text": "\t\t\t\t\t\t\t\t)\r",
            "lineNumber": 1313
          },
          {
            "text": "\t\t\t\t\t\t\t),\r",
            "lineNumber": 1314
          },
          {
            "text": "\t\t\t\t\t\t)\r",
            "lineNumber": 1315
          },
          {
            "text": "\t\t\t\t\t) . ';'\r",
            "lineNumber": 1316
          },
          {
            "text": "\t\t\t\t);\r",
            "lineNumber": 1317
          },
          {
            "text": "\r",
            "lineNumber": 1318
          },
          {
            "text": "\t\t\t\t// Register a script for our blocks, also without a .js URL.\r",
            "lineNumber": 1319
          },
          {
            "text": "\t\t\t\twp_register_script(\r",
            "lineNumber": 1320
          },
          {
            "text": "\t\t\t\t\t'invp-blocks',\r",
            "lineNumber": 1321
          },
          {
            "text": "\t\t\t\t\t'',\r",
            "lineNumber": 1322
          },
          {
            "text": "\t\t\t\t\tarray(),\r",
            "lineNumber": 1323
          },
          {
            "text": "\t\t\t\t\tINVP_PLUGIN_VERSION,\r",
            "lineNumber": 1324
          },
          {
            "text": "\t\t\t\t\ttrue\r",
            "lineNumber": 1325
          },
          {
            "text": "\t\t\t\t);\r",
            "lineNumber": 1326
          },
          {
            "text": "\t\t\t\t// Provide the vehicle post type meta keys and prefix to JavaScript.\r",
            "lineNumber": 1327
          },
          {
            "text": "\t\t\t\twp_add_inline_script(\r",
            "lineNumber": 1328
          },
          {
            "text": "\t\t\t\t\t'invp-blocks',\r",
            "lineNumber": 1329
          },
          {
            "text": "\t\t\t\t\t'const invp_blocks = ' . wp_json_encode(\r",
            "lineNumber": 1330
          },
          {
            "text": "\t\t\t\t\t\tarray(\r",
            "lineNumber": 1331
          },
          {
            "text": "\t\t\t\t\t\t\t'currency_symbol'             =&gt; INVP::currency_symbol(),\r",
            "lineNumber": 1332
          },
          {
            "text": "\t\t\t\t\t\t\t'keys'                        =&gt; INVP::keys_and_types(),\r",
            "lineNumber": 1333
          },
          {
            "text": "\t\t\t\t\t\t\t'meta_prefix'                 =&gt; INVP::meta_prefix(),\r",
            "lineNumber": 1334
          },
          {
            "text": "\t\t\t\t\t\t\t'odometer_units'              =&gt; apply_filters( 'invp_odometer_word', __( 'Miles', 'inventory-presser' ) ),\r",
            "lineNumber": 1335
          },
          {
            "text": "\t\t\t\t\t\t\t'use_carfax'                  =&gt; $settings['use_carfax'],\r",
            "lineNumber": 1336
          },
          {
            "text": "\t\t\t\t\t\t\t'use_carfax_provided_buttons' =&gt; $settings['use_carfax_provided_buttons'],\r",
            "lineNumber": 1337
          },
          {
            "text": "\t\t\t\t\t\t)\r",
            "lineNumber": 1338
          },
          {
            "text": "\t\t\t\t\t),\r",
            "lineNumber": 1339
          },
          {
            "text": "\t\t\t\t\t'before'\r",
            "lineNumber": 1340
          },
          {
            "text": "\t\t\t\t);\r",
            "lineNumber": 1341
          },
          {
            "text": "\t\t\t\t/**\r",
            "lineNumber": 1342
          },
          {
            "text": "\t\t\t\t * Register a stylesheet for the Block Editor. This makes the\r",
            "lineNumber": 1343
          },
          {
            "text": "\t\t\t\t * blocks provided by this plugin more pleasant to work with.\r",
            "lineNumber": 1344
          },
          {
            "text": "\t\t\t\t */\r",
            "lineNumber": 1345
          },
          {
            "text": "\t\t\t\twp_register_style(\r",
            "lineNumber": 1346
          },
          {
            "text": "\t\t\t\t\t'invp-block-editor',\r",
            "lineNumber": 1347
          },
          {
            "text": "\t\t\t\t\tplugins_url( \"css/block-editor{$min}.css\", INVP_PLUGIN_FILE_PATH ),\r",
            "lineNumber": 1348
          },
          {
            "text": "\t\t\t\t\tarray(),\r",
            "lineNumber": 1349
          },
          {
            "text": "\t\t\t\t\tINVP_PLUGIN_VERSION\r",
            "lineNumber": 1350
          },
          {
            "text": "\t\t\t\t);\r",
            "lineNumber": 1351
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1352
          },
          {
            "text": "\r",
            "lineNumber": 1353
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 1354
          },
          {
            "text": "\t\t\t * Register flexslider and provide overrides for scripts and styles\r",
            "lineNumber": 1355
          }
        ]
      },
      "score": 0.3531872034072876
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {},
          "endPosition": {
            "line": 47,
            "column": 3
          }
        },
        "contents": "&lt;?php\r\n/**\r\n * Inventory Presser\r\n *\r\n * @package inventory-presser\r\n * @author  Corey Salzano &lt;corey@friday.systems&gt;\r\n */\r\n\r\ndefined( 'ABSPATH' ) || exit;\r\n\r\n/**\r\n * Plugin Name: Inventory Presser\r\n * Plugin URI: https://inventorypresser.com\r\n * Description: Car listings with photo sliders for automobile and powersports dealerships.\r\n * Version: 15.2.7\r\n * Author: Friday Systems\r\n * Author URI: https://inventorypresser.com\r\n * Text Domain: inventory-presser\r\n * Domain Path: /languages\r\n * License: GPLv2\r\n * License URI: https://www.gnu.org/licenses/gpl-2.0.html\r\n * GitHub Plugin URI: https://github.com/fridaysystems/inventory-presser\r\n * Primary Branch: main\r\n * Download URI: https://downloads.wordpress.org/plugin/inventory-presser.15.2.7.zip\r\n * Download URI: https://inventorypresser.com/wp-content/uploads/inventory-presser-v15.2.7.zip\r\n */\r\n\r\nif ( ! defined( 'INVP_PLUGIN_BASE' ) ) {\r\n\tdefine( 'INVP_PLUGIN_BASE', plugin_basename( __FILE__ ) );\r\n}\r\nif ( ! defined( 'INVP_PLUGIN_FILE_PATH' ) ) {\r\n\tdefine( 'INVP_PLUGIN_FILE_PATH', __FILE__ );\r\n}\r\nif ( ! defined( 'INVP_PLUGIN_VERSION' ) ) {\r\n\tdefine( 'INVP_PLUGIN_VERSION', '15.2.7' );\r\n}\r\n\r\nif ( ! class_exists( 'Inventory_Presser_Plugin' ) ) {\r\n\t/**\r\n\t * Inventory_Presser_Plugin\r\n\t *\r\n\t * This class includes dependencies, adds hooks, adds rewrite rules, modifies\r\n\t * queries, and registers scripts &amp; styles.\r\n\t */\r\n\tclass Inventory_Presser_Plugin {\r\n\r\n\t\t/**\r\n\t\t ",
        "signatures": {},
        "detailedLines": [
          {
            "text": "&lt;?php\r",
            "lineNumber": 1
          },
          {
            "text": "/**\r",
            "lineNumber": 2
          },
          {
            "text": " * Inventory Presser\r",
            "lineNumber": 3
          },
          {
            "text": " *\r",
            "lineNumber": 4
          },
          {
            "text": " * @package inventory-presser\r",
            "lineNumber": 5
          },
          {
            "text": " * @author  Corey Salzano &lt;corey@friday.systems&gt;\r",
            "lineNumber": 6
          },
          {
            "text": " */\r",
            "lineNumber": 7
          },
          {
            "text": "\r",
            "lineNumber": 8
          },
          {
            "text": "defined( 'ABSPATH' ) || exit;\r",
            "lineNumber": 9
          },
          {
            "text": "\r",
            "lineNumber": 10
          },
          {
            "text": "/**\r",
            "lineNumber": 11
          },
          {
            "text": " * Plugin Name: Inventory Presser\r",
            "lineNumber": 12
          },
          {
            "text": " * Plugin URI: https://inventorypresser.com\r",
            "lineNumber": 13
          },
          {
            "text": " * Description: Car listings with photo sliders for automobile and powersports dealerships.\r",
            "lineNumber": 14
          },
          {
            "text": " * Version: 15.2.7\r",
            "lineNumber": 15
          },
          {
            "text": " * Author: Friday Systems\r",
            "lineNumber": 16
          },
          {
            "text": " * Author URI: https://inventorypresser.com\r",
            "lineNumber": 17
          },
          {
            "text": " * Text Domain: inventory-presser\r",
            "lineNumber": 18
          },
          {
            "text": " * Domain Path: /languages\r",
            "lineNumber": 19
          },
          {
            "text": " * License: GPLv2\r",
            "lineNumber": 20
          },
          {
            "text": " * License URI: https://www.gnu.org/licenses/gpl-2.0.html\r",
            "lineNumber": 21
          },
          {
            "text": " * GitHub Plugin URI: https://github.com/fridaysystems/inventory-presser\r",
            "lineNumber": 22
          },
          {
            "text": " * Primary Branch: main\r",
            "lineNumber": 23
          },
          {
            "text": " * Download URI: https://downloads.wordpress.org/plugin/inventory-presser.15.2.7.zip\r",
            "lineNumber": 24
          },
          {
            "text": " * Download URI: https://inventorypresser.com/wp-content/uploads/inventory-presser-v15.2.7.zip\r",
            "lineNumber": 25
          },
          {
            "text": " */\r",
            "lineNumber": 26
          },
          {
            "text": "\r",
            "lineNumber": 27
          },
          {
            "text": "if ( ! defined( 'INVP_PLUGIN_BASE' ) ) {\r",
            "lineNumber": 28
          },
          {
            "text": "\tdefine( 'INVP_PLUGIN_BASE', plugin_basename( __FILE__ ) );\r",
            "lineNumber": 29
          },
          {
            "text": "}\r",
            "lineNumber": 30
          },
          {
            "text": "if ( ! defined( 'INVP_PLUGIN_FILE_PATH' ) ) {\r",
            "lineNumber": 31
          },
          {
            "text": "\tdefine( 'INVP_PLUGIN_FILE_PATH', __FILE__ );\r",
            "lineNumber": 32
          },
          {
            "text": "}\r",
            "lineNumber": 33
          },
          {
            "text": "if ( ! defined( 'INVP_PLUGIN_VERSION' ) ) {\r",
            "lineNumber": 34
          },
          {
            "text": "\tdefine( 'INVP_PLUGIN_VERSION', '15.2.7' );\r",
            "lineNumber": 35
          },
          {
            "text": "}\r",
            "lineNumber": 36
          },
          {
            "text": "\r",
            "lineNumber": 37
          },
          {
            "text": "if ( ! class_exists( 'Inventory_Presser_Plugin' ) ) {\r",
            "lineNumber": 38
          },
          {
            "text": "\t/**\r",
            "lineNumber": 39
          },
          {
            "text": "\t * Inventory_Presser_Plugin\r",
            "lineNumber": 40
          },
          {
            "text": "\t *\r",
            "lineNumber": 41
          },
          {
            "text": "\t * This class includes dependencies, adds hooks, adds rewrite rules, modifies\r",
            "lineNumber": 42
          },
          {
            "text": "\t * queries, and registers scripts &amp; styles.\r",
            "lineNumber": 43
          },
          {
            "text": "\t */\r",
            "lineNumber": 44
          },
          {
            "text": "\tclass Inventory_Presser_Plugin {\r",
            "lineNumber": 45
          },
          {
            "text": "\r",
            "lineNumber": 46
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 47
          },
          {
            "text": "\t\t ",
            "lineNumber": 48
          }
        ]
      },
      "score": 0.3530040979385376
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 592
          },
          "endPosition": {
            "line": 653
          }
        },
        "contents": "\r\n\t\t/**\r\n\t\t * Provides default values for the plugin settings stored in an option\r\n\t\t * with name INVP::OPTION_NAME.\r\n\t\t *\r\n\t\t * @return void\r\n\t\t */\r\n\t\tpublic static function set_default_settings() {\r\n\t\t\t$settings = INVP::settings();\r\n\t\t\t// Do not overwrite taxonomies setting if it exists.\r\n\t\t\tif ( ! empty( $settings['taxonomies'] ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// If the old show_all_taxonomies is set, maintain that behavior.\r\n\t\t\t$show_menu = false;\r\n\t\t\tif ( isset( $settings['show_all_taxonomies'] ) ) {\r\n\t\t\t\t$show_menu = $settings['show_all_taxonomies'];\r\n\t\t\t\tunset( $settings['show_all_taxonomies'] );\r\n\t\t\t}\r\n\t\t\tif ( ! isset( $settings['taxonomies'] ) ) {\r\n\t\t\t\t$settings['taxonomies'] = Inventory_Presser_Admin_Options::taxonomies_setting_default( $settings );\r\n\t\t\t}\r\n\t\t\tupdate_option( INVP::OPTION_NAME, $settings );\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * This is the driver function of the entire plugin. Includes dependencies\r\n\t\t * and adds all hooks.\r\n\t\t *\r\n\t\t * @return void\r\n\t\t */\r\n\t\tpublic function add_hooks() {\r\n\t\t\t// Only do these things once.\r\n\t\t\tif ( has_filter( 'invp_prefix_meta_key', array( 'INVP', 'translate_custom_field_names' ) ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// include all this plugin's classes that live in external files.\r\n\t\t\t$this-&gt;include_dependencies();\r\n\r\n\t\t\t// Ensure addon updaters are initialized in multisite.\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Addon' ) ) {\r\n\t\t\t\tInventory_Presser_Addon::ensure_multisite_updaters();\r\n\t\t\t}\r\n\r\n\t\t\t// Prefix and unprefix meta keys with \"inventory_presser_\".\r\n\t\t\tadd_filter( 'invp_prefix_meta_key', array( 'INVP', 'translate_custom_field_names' ) );\r\n\t\t\tadd_filter( 'invp_unprefix_meta_key', array( 'INVP', 'untranslate_custom_field_names' ) );\r\n\r\n\t\t\t// Provide a path to .mo files in /languages.\r\n\t\t\tadd_action( 'init', array( $this, 'load_textdomain' ) );\r\n\r\n\t\t\t/**\r\n\t\t\t * Create our post type and taxonomies\r\n\t\t\t */\r\n\r\n\t\t\t// create a custom post type for the vehicles.\r\n\t\t\tadd_action( 'init', array( $this, 'create_post_type' ) );\r\n\r\n\t\t\t// Give all administrator users full capabilities over the custom post type.\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\r",
            "lineNumber": 593
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 594
          },
          {
            "text": "\t\t * Provides default values for the plugin settings stored in an option\r",
            "lineNumber": 595
          },
          {
            "text": "\t\t * with name INVP::OPTION_NAME.\r",
            "lineNumber": 596
          },
          {
            "text": "\t\t *\r",
            "lineNumber": 597
          },
          {
            "text": "\t\t * @return void\r",
            "lineNumber": 598
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 599
          },
          {
            "text": "\t\tpublic static function set_default_settings() {\r",
            "lineNumber": 600
          },
          {
            "text": "\t\t\t$settings = INVP::settings();\r",
            "lineNumber": 601
          },
          {
            "text": "\t\t\t// Do not overwrite taxonomies setting if it exists.\r",
            "lineNumber": 602
          },
          {
            "text": "\t\t\tif ( ! empty( $settings['taxonomies'] ) ) {\r",
            "lineNumber": 603
          },
          {
            "text": "\t\t\t\treturn;\r",
            "lineNumber": 604
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 605
          },
          {
            "text": "\r",
            "lineNumber": 606
          },
          {
            "text": "\t\t\t// If the old show_all_taxonomies is set, maintain that behavior.\r",
            "lineNumber": 607
          },
          {
            "text": "\t\t\t$show_menu = false;\r",
            "lineNumber": 608
          },
          {
            "text": "\t\t\tif ( isset( $settings['show_all_taxonomies'] ) ) {\r",
            "lineNumber": 609
          },
          {
            "text": "\t\t\t\t$show_menu = $settings['show_all_taxonomies'];\r",
            "lineNumber": 610
          },
          {
            "text": "\t\t\t\tunset( $settings['show_all_taxonomies'] );\r",
            "lineNumber": 611
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 612
          },
          {
            "text": "\t\t\tif ( ! isset( $settings['taxonomies'] ) ) {\r",
            "lineNumber": 613
          },
          {
            "text": "\t\t\t\t$settings['taxonomies'] = Inventory_Presser_Admin_Options::taxonomies_setting_default( $settings );\r",
            "lineNumber": 614
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 615
          },
          {
            "text": "\t\t\tupdate_option( INVP::OPTION_NAME, $settings );\r",
            "lineNumber": 616
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 617
          },
          {
            "text": "\r",
            "lineNumber": 618
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 619
          },
          {
            "text": "\t\t * This is the driver function of the entire plugin. Includes dependencies\r",
            "lineNumber": 620
          },
          {
            "text": "\t\t * and adds all hooks.\r",
            "lineNumber": 621
          },
          {
            "text": "\t\t *\r",
            "lineNumber": 622
          },
          {
            "text": "\t\t * @return void\r",
            "lineNumber": 623
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 624
          },
          {
            "text": "\t\tpublic function add_hooks() {\r",
            "lineNumber": 625
          },
          {
            "text": "\t\t\t// Only do these things once.\r",
            "lineNumber": 626
          },
          {
            "text": "\t\t\tif ( has_filter( 'invp_prefix_meta_key', array( 'INVP', 'translate_custom_field_names' ) ) ) {\r",
            "lineNumber": 627
          },
          {
            "text": "\t\t\t\treturn;\r",
            "lineNumber": 628
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 629
          },
          {
            "text": "\r",
            "lineNumber": 630
          },
          {
            "text": "\t\t\t// include all this plugin's classes that live in external files.\r",
            "lineNumber": 631
          },
          {
            "text": "\t\t\t$this-&gt;include_dependencies();\r",
            "lineNumber": 632
          },
          {
            "text": "\r",
            "lineNumber": 633
          },
          {
            "text": "\t\t\t// Ensure addon updaters are initialized in multisite.\r",
            "lineNumber": 634
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Addon' ) ) {\r",
            "lineNumber": 635
          },
          {
            "text": "\t\t\t\tInventory_Presser_Addon::ensure_multisite_updaters();\r",
            "lineNumber": 636
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 637
          },
          {
            "text": "\r",
            "lineNumber": 638
          },
          {
            "text": "\t\t\t// Prefix and unprefix meta keys with \"inventory_presser_\".\r",
            "lineNumber": 639
          },
          {
            "text": "\t\t\tadd_filter( 'invp_prefix_meta_key', array( 'INVP', 'translate_custom_field_names' ) );\r",
            "lineNumber": 640
          },
          {
            "text": "\t\t\tadd_filter( 'invp_unprefix_meta_key', array( 'INVP', 'untranslate_custom_field_names' ) );\r",
            "lineNumber": 641
          },
          {
            "text": "\r",
            "lineNumber": 642
          },
          {
            "text": "\t\t\t// Provide a path to .mo files in /languages.\r",
            "lineNumber": 643
          },
          {
            "text": "\t\t\tadd_action( 'init', array( $this, 'load_textdomain' ) );\r",
            "lineNumber": 644
          },
          {
            "text": "\r",
            "lineNumber": 645
          },
          {
            "text": "\t\t\t/**\r",
            "lineNumber": 646
          },
          {
            "text": "\t\t\t * Create our post type and taxonomies\r",
            "lineNumber": 647
          },
          {
            "text": "\t\t\t */\r",
            "lineNumber": 648
          },
          {
            "text": "\r",
            "lineNumber": 649
          },
          {
            "text": "\t\t\t// create a custom post type for the vehicles.\r",
            "lineNumber": 650
          },
          {
            "text": "\t\t\tadd_action( 'init', array( $this, 'create_post_type' ) );\r",
            "lineNumber": 651
          },
          {
            "text": "\r",
            "lineNumber": 652
          },
          {
            "text": "\t\t\t// Give all administrator users full capabilities over the custom post type.\r",
            "lineNumber": 653
          }
        ]
      },
      "score": 0.345768004655838
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/admin/class-admin-editor-sidebar.php",
        "range": {
          "startPosition": {},
          "endPosition": {
            "line": 66
          }
        },
        "contents": "&lt;?php\ndefined( 'ABSPATH' ) || exit;\n\n/**\n * Inventory_Presser_Admin_Editor_Sidebar\n *\n * Adds a sidebar to the WordPress editor so that meta fields can be edited\n * outside of blocks.\n */\nclass Inventory_Presser_Admin_Editor_Sidebar {\n\n\t/**\n\t * Registers a JavaScript file\n\t *\n\t * @return void\n\t */\n\tpublic function sidebar_plugin_register() {\n\t\t$min = defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG ? '' : '.min';\n\t\twp_register_script(\n\t\t\t'invp-plugin-sidebar',\n\t\t\tplugins_url( \"/js/editor-sidebar{$min}.js\", INVP_PLUGIN_FILE_PATH ),\n\t\t\tarray( 'invp', 'wp-plugins', 'wp-edit-post', 'wp-element', 'wp-components', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-api' ),\n\t\t\tINVP_PLUGIN_VERSION,\n\t\t\ttrue\n\t\t);\n\t}\n\n\t/**\n\t * Includes the JavaScript file when editing a vehicle in the dashboard.\n\t *\n\t * @return void\n\t */\n\tpublic function sidebar_plugin_script_enqueue() {\n\t\t// Are we on a post editor page?\n\t\tglobal $pagenow, $post;\n\t\tif ( ! in_array( $pagenow, array( 'post-new.php', 'post.php' ), true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Are we editing a vehicle?\n\t\tif ( empty( $post-&gt;post_type ) || INVP::POST_TYPE !== $post-&gt;post_type ) {\n\t\t\treturn;\n\t\t}\n\t\twp_enqueue_script( 'invp-plugin-sidebar' );\n\t}\n\n\t/**\n\t * Adds hooks\n\t *\n\t * @return void\n\t */\n\tpublic function add_hooks() {\n\t\t// Use enqueue_block_editor_assets instead of enqueue_block_assets\n\t\t// This hook only fires in the block editor, and we'll add additional checks\n\t\tadd_action( 'enqueue_block_editor_assets', array( $this, 'sidebar_plugin_script_enqueue' ) );\n\t\tadd_action( 'init', array( $this, 'sidebar_plugin_register' ) );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'scripts_and_styles' ) );\n\t}\n\n\t/**\n\t * Includes the wp-api JavaScript\n\t *\n\t * @return void\n\t */\n\tpublic function scripts_and_styles() {\n\t\t$min = defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG ? '' : '.min';",
        "signatures": {},
        "detailedLines": [
          {
            "text": "&lt;?php",
            "lineNumber": 1
          },
          {
            "text": "defined( 'ABSPATH' ) || exit;",
            "lineNumber": 2
          },
          {
            "lineNumber": 3
          },
          {
            "text": "/**",
            "lineNumber": 4
          },
          {
            "text": " * Inventory_Presser_Admin_Editor_Sidebar",
            "lineNumber": 5
          },
          {
            "text": " *",
            "lineNumber": 6
          },
          {
            "text": " * Adds a sidebar to the WordPress editor so that meta fields can be edited",
            "lineNumber": 7
          },
          {
            "text": " * outside of blocks.",
            "lineNumber": 8
          },
          {
            "text": " */",
            "lineNumber": 9
          },
          {
            "text": "class Inventory_Presser_Admin_Editor_Sidebar {",
            "lineNumber": 10
          },
          {
            "lineNumber": 11
          },
          {
            "text": "\t/**",
            "lineNumber": 12
          },
          {
            "text": "\t * Registers a JavaScript file",
            "lineNumber": 13
          },
          {
            "text": "\t *",
            "lineNumber": 14
          },
          {
            "text": "\t * @return void",
            "lineNumber": 15
          },
          {
            "text": "\t */",
            "lineNumber": 16
          },
          {
            "text": "\tpublic function sidebar_plugin_register() {",
            "lineNumber": 17
          },
          {
            "text": "\t\t$min = defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG ? '' : '.min';",
            "lineNumber": 18
          },
          {
            "text": "\t\twp_register_script(",
            "lineNumber": 19
          },
          {
            "text": "\t\t\t'invp-plugin-sidebar',",
            "lineNumber": 20
          },
          {
            "text": "\t\t\tplugins_url( \"/js/editor-sidebar{$min}.js\", INVP_PLUGIN_FILE_PATH ),",
            "lineNumber": 21
          },
          {
            "text": "\t\t\tarray( 'invp', 'wp-plugins', 'wp-edit-post', 'wp-element', 'wp-components', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-api' ),",
            "lineNumber": 22
          },
          {
            "text": "\t\t\tINVP_PLUGIN_VERSION,",
            "lineNumber": 23
          },
          {
            "text": "\t\t\ttrue",
            "lineNumber": 24
          },
          {
            "text": "\t\t);",
            "lineNumber": 25
          },
          {
            "text": "\t}",
            "lineNumber": 26
          },
          {
            "lineNumber": 27
          },
          {
            "text": "\t/**",
            "lineNumber": 28
          },
          {
            "text": "\t * Includes the JavaScript file when editing a vehicle in the dashboard.",
            "lineNumber": 29
          },
          {
            "text": "\t *",
            "lineNumber": 30
          },
          {
            "text": "\t * @return void",
            "lineNumber": 31
          },
          {
            "text": "\t */",
            "lineNumber": 32
          },
          {
            "text": "\tpublic function sidebar_plugin_script_enqueue() {",
            "lineNumber": 33
          },
          {
            "text": "\t\t// Are we on a post editor page?",
            "lineNumber": 34
          },
          {
            "text": "\t\tglobal $pagenow, $post;",
            "lineNumber": 35
          },
          {
            "text": "\t\tif ( ! in_array( $pagenow, array( 'post-new.php', 'post.php' ), true ) ) {",
            "lineNumber": 36
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 37
          },
          {
            "text": "\t\t}",
            "lineNumber": 38
          },
          {
            "lineNumber": 39
          },
          {
            "text": "\t\t// Are we editing a vehicle?",
            "lineNumber": 40
          },
          {
            "text": "\t\tif ( empty( $post-&gt;post_type ) || INVP::POST_TYPE !== $post-&gt;post_type ) {",
            "lineNumber": 41
          },
          {
            "text": "\t\t\treturn;",
            "lineNumber": 42
          },
          {
            "text": "\t\t}",
            "lineNumber": 43
          },
          {
            "text": "\t\twp_enqueue_script( 'invp-plugin-sidebar' );",
            "lineNumber": 44
          },
          {
            "text": "\t}",
            "lineNumber": 45
          },
          {
            "lineNumber": 46
          },
          {
            "text": "\t/**",
            "lineNumber": 47
          },
          {
            "text": "\t * Adds hooks",
            "lineNumber": 48
          },
          {
            "text": "\t *",
            "lineNumber": 49
          },
          {
            "text": "\t * @return void",
            "lineNumber": 50
          },
          {
            "text": "\t */",
            "lineNumber": 51
          },
          {
            "text": "\tpublic function add_hooks() {",
            "lineNumber": 52
          },
          {
            "text": "\t\t// Use enqueue_block_editor_assets instead of enqueue_block_assets",
            "lineNumber": 53
          },
          {
            "text": "\t\t// This hook only fires in the block editor, and we'll add additional checks",
            "lineNumber": 54
          },
          {
            "text": "\t\tadd_action( 'enqueue_block_editor_assets', array( $this, 'sidebar_plugin_script_enqueue' ) );",
            "lineNumber": 55
          },
          {
            "text": "\t\tadd_action( 'init', array( $this, 'sidebar_plugin_register' ) );",
            "lineNumber": 56
          },
          {
            "text": "\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'scripts_and_styles' ) );",
            "lineNumber": 57
          },
          {
            "text": "\t}",
            "lineNumber": 58
          },
          {
            "lineNumber": 59
          },
          {
            "text": "\t/**",
            "lineNumber": 60
          },
          {
            "text": "\t * Includes the wp-api JavaScript",
            "lineNumber": 61
          },
          {
            "text": "\t *",
            "lineNumber": 62
          },
          {
            "text": "\t * @return void",
            "lineNumber": 63
          },
          {
            "text": "\t */",
            "lineNumber": 64
          },
          {
            "text": "\tpublic function scripts_and_styles() {",
            "lineNumber": 65
          },
          {
            "text": "\t\t$min = defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG ? '' : '.min';",
            "lineNumber": 66
          }
        ]
      },
      "score": 0.34568214416503906
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./includes/integrations/class-classic-editor.php",
        "range": {
          "startPosition": {
            "line": 261,
            "column": 2
          },
          "endPosition": {
            "line": 317
          }
        },
        "contents": "} else {\n\t\t\tINVP::delete_attachments( $post_id );\n\t\t}\n\t}\n\n\t/**\n\t * Includes JavaScripts and stylesheets that power our changes to the\n\t * dashboard.\n\t *\n\t * @param  string $hook\n\t * @return void\n\t */\n\tpublic function scripts_and_styles( $hook ) {\n\t\t$handle = 'invp-classic-editor';\n\t\tif ( ! wp_script_is( $handle, 'registered' ) ) {\n\t\t\tInventory_Presser_Plugin::include_scripts_and_styles();\n\t\t}\n\t\t$min = defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG ? '' : '.min';\n\t\twp_enqueue_style(\n\t\t\t$handle,\n\t\t\tplugins_url( \"/css/classic-editor{$min}.css\", INVP_PLUGIN_FILE_PATH ),\n\t\t\tarray(),\n\t\t\tINVP_PLUGIN_VERSION\n\t\t);\n\t\twp_enqueue_script( $handle );\n\n\t\t// Provide data to JavaScript for the editor.\n\t\twp_add_inline_script(\n\t\t\t$handle,\n\t\t\t'const invp_classic_editor = ' . wp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'delete_all_media_nonce' =&gt; wp_create_nonce( self::NONCE_DELETE_ALL_MEDIA ),\n\t\t\t\t)\n\t\t\t),\n\t\t\t'before'\n\t\t);\n\t}\n\n\t/**\n\t * Creates an editor meta box to help users mark vehicles as featured.\n\t *\n\t * @param  WP_Post $post\n\t * @return void\n\t */\n\tpublic function meta_box_html_featured( $post ) {\n\t\t$meta_key = apply_filters( 'invp_prefix_meta_key', 'featured' );\n\t\tprintf(\n\t\t\t'&lt;input type=\"checkbox\" id=\"%1$s\" name=\"%1$s\" value=\"1\"%2$s&gt;&lt;label for=\"%1$s\"&gt;%3$s&lt;/label&gt;',\n\t\t\tesc_attr( $meta_key ),\n\t\t\tchecked( '1', INVP::get_meta( $meta_key, $post-&gt;ID ), false ),\n\t\t\tesc_html__( 'Featured in Slideshows', 'inventory-presser' )\n\t\t);\n\t}\n\n\t/**\n\t * Creates a meta box to help the user see and manage vehicle options while",
        "signatures": {},
        "detailedLines": [
          {
            "text": "} else {",
            "lineNumber": 262
          },
          {
            "text": "\t\t\tINVP::delete_attachments( $post_id );",
            "lineNumber": 263
          },
          {
            "text": "\t\t}",
            "lineNumber": 264
          },
          {
            "text": "\t}",
            "lineNumber": 265
          },
          {
            "lineNumber": 266
          },
          {
            "text": "\t/**",
            "lineNumber": 267
          },
          {
            "text": "\t * Includes JavaScripts and stylesheets that power our changes to the",
            "lineNumber": 268
          },
          {
            "text": "\t * dashboard.",
            "lineNumber": 269
          },
          {
            "text": "\t *",
            "lineNumber": 270
          },
          {
            "text": "\t * @param  string $hook",
            "lineNumber": 271
          },
          {
            "text": "\t * @return void",
            "lineNumber": 272
          },
          {
            "text": "\t */",
            "lineNumber": 273
          },
          {
            "text": "\tpublic function scripts_and_styles( $hook ) {",
            "lineNumber": 274
          },
          {
            "text": "\t\t$handle = 'invp-classic-editor';",
            "lineNumber": 275
          },
          {
            "text": "\t\tif ( ! wp_script_is( $handle, 'registered' ) ) {",
            "lineNumber": 276
          },
          {
            "text": "\t\t\tInventory_Presser_Plugin::include_scripts_and_styles();",
            "lineNumber": 277
          },
          {
            "text": "\t\t}",
            "lineNumber": 278
          },
          {
            "text": "\t\t$min = defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG ? '' : '.min';",
            "lineNumber": 279
          },
          {
            "text": "\t\twp_enqueue_style(",
            "lineNumber": 280
          },
          {
            "text": "\t\t\t$handle,",
            "lineNumber": 281
          },
          {
            "text": "\t\t\tplugins_url( \"/css/classic-editor{$min}.css\", INVP_PLUGIN_FILE_PATH ),",
            "lineNumber": 282
          },
          {
            "text": "\t\t\tarray(),",
            "lineNumber": 283
          },
          {
            "text": "\t\t\tINVP_PLUGIN_VERSION",
            "lineNumber": 284
          },
          {
            "text": "\t\t);",
            "lineNumber": 285
          },
          {
            "text": "\t\twp_enqueue_script( $handle );",
            "lineNumber": 286
          },
          {
            "lineNumber": 287
          },
          {
            "text": "\t\t// Provide data to JavaScript for the editor.",
            "lineNumber": 288
          },
          {
            "text": "\t\twp_add_inline_script(",
            "lineNumber": 289
          },
          {
            "text": "\t\t\t$handle,",
            "lineNumber": 290
          },
          {
            "text": "\t\t\t'const invp_classic_editor = ' . wp_json_encode(",
            "lineNumber": 291
          },
          {
            "text": "\t\t\t\tarray(",
            "lineNumber": 292
          },
          {
            "text": "\t\t\t\t\t'delete_all_media_nonce' =&gt; wp_create_nonce( self::NONCE_DELETE_ALL_MEDIA ),",
            "lineNumber": 293
          },
          {
            "text": "\t\t\t\t)",
            "lineNumber": 294
          },
          {
            "text": "\t\t\t),",
            "lineNumber": 295
          },
          {
            "text": "\t\t\t'before'",
            "lineNumber": 296
          },
          {
            "text": "\t\t);",
            "lineNumber": 297
          },
          {
            "text": "\t}",
            "lineNumber": 298
          },
          {
            "lineNumber": 299
          },
          {
            "text": "\t/**",
            "lineNumber": 300
          },
          {
            "text": "\t * Creates an editor meta box to help users mark vehicles as featured.",
            "lineNumber": 301
          },
          {
            "text": "\t *",
            "lineNumber": 302
          },
          {
            "text": "\t * @param  WP_Post $post",
            "lineNumber": 303
          },
          {
            "text": "\t * @return void",
            "lineNumber": 304
          },
          {
            "text": "\t */",
            "lineNumber": 305
          },
          {
            "text": "\tpublic function meta_box_html_featured( $post ) {",
            "lineNumber": 306
          },
          {
            "text": "\t\t$meta_key = apply_filters( 'invp_prefix_meta_key', 'featured' );",
            "lineNumber": 307
          },
          {
            "text": "\t\tprintf(",
            "lineNumber": 308
          },
          {
            "text": "\t\t\t'&lt;input type=\"checkbox\" id=\"%1$s\" name=\"%1$s\" value=\"1\"%2$s&gt;&lt;label for=\"%1$s\"&gt;%3$s&lt;/label&gt;',",
            "lineNumber": 309
          },
          {
            "text": "\t\t\tesc_attr( $meta_key ),",
            "lineNumber": 310
          },
          {
            "text": "\t\t\tchecked( '1', INVP::get_meta( $meta_key, $post-&gt;ID ), false ),",
            "lineNumber": 311
          },
          {
            "text": "\t\t\tesc_html__( 'Featured in Slideshows', 'inventory-presser' )",
            "lineNumber": 312
          },
          {
            "text": "\t\t);",
            "lineNumber": 313
          },
          {
            "text": "\t}",
            "lineNumber": 314
          },
          {
            "lineNumber": 315
          },
          {
            "text": "\t/**",
            "lineNumber": 316
          },
          {
            "text": "\t * Creates a meta box to help the user see and manage vehicle options while",
            "lineNumber": 317
          }
        ]
      },
      "score": 0.3383322060108185
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./js/flexslider.js",
        "range": {
          "startPosition": {
            "line": 9,
            "column": 1
          },
          "endPosition": {
            "line": 76,
            "column": 1
          }
        },
        "contents": "window.addEventListener( 'load', function() {\n\tjQuery('#slider.flexslider').not('#carousel').flexslider({\n\t\tanimation: 'slide',\n\t\tanimationSpeed: invp.is_singular ? 200 : 300,\n\t\tslideshowSpeed: 3500,\n\t\tcontrolNav: false,\n\t\tprevText: '',\n\t\tnextText: '',\n\t\tslideshow: ! invp.is_singular,\n\t\tsmoothHeight: true,\n\t\tafter: function( slider ) { flexsliderMaybeResizeCurrentImage(); },\n\t\tstart: function( slider ) {\n\t\t\t// Wait for the first image to load and call flexsliderLoaded().\n\t\t\tvar img = document.querySelector('#slider .flex-active-slide img');\n\t\t\tif ( null !== img ) {\n\t\t\t\tif ( img.complete) {\n\t\t\t\t\tflexsliderLoaded();\n\t\t\t\t} else {\n\t\t\t\t\timg.addEventListener( 'load', flexsliderLoaded );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tjQuery('#carousel').flexslider({\n\t\tanimation: \"slide\",\n\t\tcontrolNav: false,\n\t\tslideshow: false,\n\t\tsmoothHeight: true,\n\t\titemWidth: 150,\n\t\tasNavFor: '#slider',\n\t\tprevText: '',\n\t\tnextText: '',\n\t\tstart: function( slider ) {\n\t\t\tflexsliderStylePreviousNext();\n\t\t\tvar thumb = document.querySelector('#carousel .flex-active-slide img');\n\t\t\tif ( null !== thumb ){\n\t\t\t\tif ( thumb.complete ) {\n\t\t\t\t\tflexsliderCarouselLoaded();\n\t\t\t\t} else {\n\t\t\t\t\tthumb.addEventListener( 'load', flexsliderCarouselLoaded );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\twindow.invp.resizeObserver = new ResizeObserver(entries =&gt; {\n\t\twindow.dispatchEvent(new Event('resize'));\n\t});\n\tvar activeSlide = document.querySelector('#slider .flex-active-slide img');\n\tif ( activeSlide ) {\n\t\twindow.invp.resizeObserver.observe(activeSlide);\n\t}\n});\nfunction flexsliderMaybeShrinkFrame() {\n\t// Is the slider wider than the width of the first image?\n\tif\n}",
        "signatures": {},
        "detailedLines": [
          {
            "text": "window.addEventListener( 'load', function() {",
            "lineNumber": 12
          },
          {
            "text": "\tjQuery('#slider.flexslider').not('#carousel').flexslider({",
            "lineNumber": 13
          },
          {
            "text": "\t\tanimation: 'slide',",
            "lineNumber": 14
          },
          {
            "text": "\t\tanimationSpeed: invp.is_singular ? 200 : 300,",
            "lineNumber": 15
          },
          {
            "text": "\t\tslideshowSpeed: 3500,",
            "lineNumber": 16
          },
          {
            "text": "\t\tcontrolNav: false,",
            "lineNumber": 17
          },
          {
            "text": "\t\tprevText: '',",
            "lineNumber": 18
          },
          {
            "text": "\t\tnextText: '',",
            "lineNumber": 19
          },
          {
            "text": "\t\tslideshow: ! invp.is_singular,",
            "lineNumber": 20
          },
          {
            "text": "\t\tsmoothHeight: true,",
            "lineNumber": 21
          },
          {
            "text": "\t\tafter: function( slider ) { flexsliderMaybeResizeCurrentImage(); },",
            "lineNumber": 22
          },
          {
            "text": "\t\tstart: function( slider ) {",
            "lineNumber": 23
          },
          {
            "text": "\t\t\t// Wait for the first image to load and call flexsliderLoaded().",
            "lineNumber": 24
          },
          {
            "text": "\t\t\tvar img = document.querySelector('#slider .flex-active-slide img');",
            "lineNumber": 25
          },
          {
            "text": "\t\t\tif ( null !== img ) {",
            "lineNumber": 26
          },
          {
            "text": "\t\t\t\tif ( img.complete) {",
            "lineNumber": 27
          },
          {
            "text": "\t\t\t\t\tflexsliderLoaded();",
            "lineNumber": 28
          },
          {
            "text": "\t\t\t\t} else {",
            "lineNumber": 29
          },
          {
            "text": "\t\t\t\t\timg.addEventListener( 'load', flexsliderLoaded );",
            "lineNumber": 30
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 31
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 32
          },
          {
            "text": "\t\t}",
            "lineNumber": 33
          },
          {
            "text": "\t});",
            "lineNumber": 34
          },
          {
            "lineNumber": 35
          },
          {
            "text": "\tjQuery('#carousel').flexslider({",
            "lineNumber": 36
          },
          {
            "text": "\t\tanimation: \"slide\",",
            "lineNumber": 37
          },
          {
            "text": "\t\tcontrolNav: false,",
            "lineNumber": 38
          },
          {
            "text": "\t\tslideshow: false,",
            "lineNumber": 39
          },
          {
            "text": "\t\tsmoothHeight: true,",
            "lineNumber": 40
          },
          {
            "text": "\t\titemWidth: 150,",
            "lineNumber": 41
          },
          {
            "text": "\t\tasNavFor: '#slider',",
            "lineNumber": 42
          },
          {
            "text": "\t\tprevText: '',",
            "lineNumber": 43
          },
          {
            "text": "\t\tnextText: '',",
            "lineNumber": 44
          },
          {
            "text": "\t\tstart: function( slider ) {",
            "lineNumber": 45
          },
          {
            "text": "\t\t\tflexsliderStylePreviousNext();",
            "lineNumber": 46
          },
          {
            "text": "\t\t\tvar thumb = document.querySelector('#carousel .flex-active-slide img');",
            "lineNumber": 47
          },
          {
            "text": "\t\t\tif ( null !== thumb ){",
            "lineNumber": 48
          },
          {
            "text": "\t\t\t\tif ( thumb.complete ) {",
            "lineNumber": 49
          },
          {
            "text": "\t\t\t\t\tflexsliderCarouselLoaded();",
            "lineNumber": 50
          },
          {
            "text": "\t\t\t\t} else {",
            "lineNumber": 51
          },
          {
            "text": "\t\t\t\t\tthumb.addEventListener( 'load', flexsliderCarouselLoaded );",
            "lineNumber": 52
          },
          {
            "text": "\t\t\t\t}",
            "lineNumber": 53
          },
          {
            "text": "\t\t\t}",
            "lineNumber": 54
          },
          {
            "text": "\t\t}",
            "lineNumber": 55
          },
          {
            "text": "\t});",
            "lineNumber": 56
          },
          {
            "lineNumber": 57
          },
          {
            "text": "\twindow.invp.resizeObserver = new ResizeObserver(entries =&gt; {",
            "lineNumber": 58
          },
          {
            "text": "\t\twindow.dispatchEvent(new Event('resize'));",
            "lineNumber": 59
          },
          {
            "text": "\t});",
            "lineNumber": 60
          },
          {
            "text": "\tvar activeSlide = document.querySelector('#slider .flex-active-slide img');",
            "lineNumber": 61
          },
          {
            "text": "\tif ( activeSlide ) {",
            "lineNumber": 62
          },
          {
            "text": "\t\twindow.invp.resizeObserver.observe(activeSlide);",
            "lineNumber": 63
          },
          {
            "text": "\t}",
            "lineNumber": 64
          },
          {
            "text": "});",
            "lineNumber": 65
          },
          {
            "text": "function flexsliderMaybeShrinkFrame() {",
            "lineNumber": 66,
            "isSignature": true
          },
          {
            "text": "\t// Is the slider wider than the width of the first image?",
            "lineNumber": 67
          },
          {
            "text": "\tif",
            "lineNumber": 68
          },
          {
            "text": "}",
            "lineNumber": 77,
            "isSignature": true
          }
        ]
      },
      "score": 0.33163154125213623
    },
    {
      "codeBlock": {
        "relativeWorkspacePath": "./inventory-presser.php",
        "range": {
          "startPosition": {
            "line": 1037
          },
          "endPosition": {
            "line": 1102
          }
        },
        "contents": "\t\t\t);\r\n\t\t\treturn $msgs;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Fires on the plugins_loaded hook. Runs the invp_loaded action hook for\r\n\t\t * all add-ons.\r\n\t\t *\r\n\t\t * @return void\r\n\t\t */\r\n\t\tpublic function loaded() {\r\n\t\t\t// Fire an action hook after Inventory Presser is finished loading.\r\n\t\t\tdo_action( 'invp_loaded' );\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Add hooks that power our integrations with other plugins.\r\n\t\t *\r\n\t\t * @return void\r\n\t\t */\r\n\t\tpublic function load_integrations() {\r\n\t\t\tstatic $active_plugins = array();\r\n\t\t\tif ( empty( $active_plugins ) ) {\r\n\t\t\t\t$active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );\r\n\t\t\t}\r\n\r\n\t\t\tif ( ! function_exists( 'is_plugin_active_for_network' ) ) {\r\n\t\t\t\tinclude_once ABSPATH . '/wp-admin/includes/plugin.php';\r\n\t\t\t}\r\n\r\n\t\t\t// WP All Import.\r\n\t\t\t$plugin_path = 'wp-all-import-pro/wp-all-import-pro.php';\r\n\t\t\tif ( in_array( $plugin_path, $active_plugins, true )\r\n\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) ) {\r\n\t\t\t\t$wp_all_import = new Inventory_Presser_WP_All_Import();\r\n\t\t\t\t$wp_all_import-&gt;add_hooks();\r\n\t\t\t}\r\n\r\n\t\t\t// Contact Form 7.\r\n\t\t\t$plugin_path = 'contact-form-7/wp-contact-form-7.php';\r\n\t\t\tif ( class_exists( 'Inventory_Presser_Contact_Form_7' )\r\n\t\t\t\t&amp;&amp; ( in_array( $plugin_path, $active_plugins, true )\r\n\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) ) ) {\r\n\t\t\t\t$contact_form_7 = new Inventory_Presser_Contact_Form_7();\r\n\t\t\t\t$contact_form_7-&gt;add_hooks();\r\n\t\t\t}\r\n\r\n\t\t\t// WPForms Lite.\r\n\t\t\t$plugin_path = 'wpforms-lite/wpforms.php';\r\n\t\t\tif ( in_array( $plugin_path, $active_plugins, true )\r\n\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) ) {\r\n\t\t\t\t$forms = new Inventory_Presser_WPForms();\r\n\t\t\t\t$forms-&gt;add_hooks();\r\n\t\t\t}\r\n\r\n\t\t\t// Classic Editor.\r\n\t\t\t$plugin_path = 'classic-editor/classic-editor.php';\r\n\t\t\tif ( in_array( $plugin_path, $active_plugins, true )\r\n\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) ) {\r\n\t\t\t\t$classic_editor = new Inventory_Presser_Classic_Editor();\r\n\t\t\t\t$classic_editor-&gt;add_hooks();\r\n\t\t\t}\r\n\r\n\t\t\t// Avada Builder.\r\n\t\t\t$plugin_path = 'fusion-builder/fusion-builder.php';\r",
        "signatures": {},
        "detailedLines": [
          {
            "text": "\t\t\t);\r",
            "lineNumber": 1038
          },
          {
            "text": "\t\t\treturn $msgs;\r",
            "lineNumber": 1039
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 1040
          },
          {
            "text": "\r",
            "lineNumber": 1041
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 1042
          },
          {
            "text": "\t\t * Fires on the plugins_loaded hook. Runs the invp_loaded action hook for\r",
            "lineNumber": 1043
          },
          {
            "text": "\t\t * all add-ons.\r",
            "lineNumber": 1044
          },
          {
            "text": "\t\t *\r",
            "lineNumber": 1045
          },
          {
            "text": "\t\t * @return void\r",
            "lineNumber": 1046
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 1047
          },
          {
            "text": "\t\tpublic function loaded() {\r",
            "lineNumber": 1048
          },
          {
            "text": "\t\t\t// Fire an action hook after Inventory Presser is finished loading.\r",
            "lineNumber": 1049
          },
          {
            "text": "\t\t\tdo_action( 'invp_loaded' );\r",
            "lineNumber": 1050
          },
          {
            "text": "\t\t}\r",
            "lineNumber": 1051
          },
          {
            "text": "\r",
            "lineNumber": 1052
          },
          {
            "text": "\t\t/**\r",
            "lineNumber": 1053
          },
          {
            "text": "\t\t * Add hooks that power our integrations with other plugins.\r",
            "lineNumber": 1054
          },
          {
            "text": "\t\t *\r",
            "lineNumber": 1055
          },
          {
            "text": "\t\t * @return void\r",
            "lineNumber": 1056
          },
          {
            "text": "\t\t */\r",
            "lineNumber": 1057
          },
          {
            "text": "\t\tpublic function load_integrations() {\r",
            "lineNumber": 1058
          },
          {
            "text": "\t\t\tstatic $active_plugins = array();\r",
            "lineNumber": 1059
          },
          {
            "text": "\t\t\tif ( empty( $active_plugins ) ) {\r",
            "lineNumber": 1060
          },
          {
            "text": "\t\t\t\t$active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );\r",
            "lineNumber": 1061
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1062
          },
          {
            "text": "\r",
            "lineNumber": 1063
          },
          {
            "text": "\t\t\tif ( ! function_exists( 'is_plugin_active_for_network' ) ) {\r",
            "lineNumber": 1064
          },
          {
            "text": "\t\t\t\tinclude_once ABSPATH . '/wp-admin/includes/plugin.php';\r",
            "lineNumber": 1065
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1066
          },
          {
            "text": "\r",
            "lineNumber": 1067
          },
          {
            "text": "\t\t\t// WP All Import.\r",
            "lineNumber": 1068
          },
          {
            "text": "\t\t\t$plugin_path = 'wp-all-import-pro/wp-all-import-pro.php';\r",
            "lineNumber": 1069
          },
          {
            "text": "\t\t\tif ( in_array( $plugin_path, $active_plugins, true )\r",
            "lineNumber": 1070
          },
          {
            "text": "\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) ) {\r",
            "lineNumber": 1071
          },
          {
            "text": "\t\t\t\t$wp_all_import = new Inventory_Presser_WP_All_Import();\r",
            "lineNumber": 1072
          },
          {
            "text": "\t\t\t\t$wp_all_import-&gt;add_hooks();\r",
            "lineNumber": 1073
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1074
          },
          {
            "text": "\r",
            "lineNumber": 1075
          },
          {
            "text": "\t\t\t// Contact Form 7.\r",
            "lineNumber": 1076
          },
          {
            "text": "\t\t\t$plugin_path = 'contact-form-7/wp-contact-form-7.php';\r",
            "lineNumber": 1077
          },
          {
            "text": "\t\t\tif ( class_exists( 'Inventory_Presser_Contact_Form_7' )\r",
            "lineNumber": 1078
          },
          {
            "text": "\t\t\t\t&amp;&amp; ( in_array( $plugin_path, $active_plugins, true )\r",
            "lineNumber": 1079
          },
          {
            "text": "\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) ) ) {\r",
            "lineNumber": 1080
          },
          {
            "text": "\t\t\t\t$contact_form_7 = new Inventory_Presser_Contact_Form_7();\r",
            "lineNumber": 1081
          },
          {
            "text": "\t\t\t\t$contact_form_7-&gt;add_hooks();\r",
            "lineNumber": 1082
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1083
          },
          {
            "text": "\r",
            "lineNumber": 1084
          },
          {
            "text": "\t\t\t// WPForms Lite.\r",
            "lineNumber": 1085
          },
          {
            "text": "\t\t\t$plugin_path = 'wpforms-lite/wpforms.php';\r",
            "lineNumber": 1086
          },
          {
            "text": "\t\t\tif ( in_array( $plugin_path, $active_plugins, true )\r",
            "lineNumber": 1087
          },
          {
            "text": "\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) ) {\r",
            "lineNumber": 1088
          },
          {
            "text": "\t\t\t\t$forms = new Inventory_Presser_WPForms();\r",
            "lineNumber": 1089
          },
          {
            "text": "\t\t\t\t$forms-&gt;add_hooks();\r",
            "lineNumber": 1090
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1091
          },
          {
            "text": "\r",
            "lineNumber": 1092
          },
          {
            "text": "\t\t\t// Classic Editor.\r",
            "lineNumber": 1093
          },
          {
            "text": "\t\t\t$plugin_path = 'classic-editor/classic-editor.php';\r",
            "lineNumber": 1094
          },
          {
            "text": "\t\t\tif ( in_array( $plugin_path, $active_plugins, true )\r",
            "lineNumber": 1095
          },
          {
            "text": "\t\t\t\t|| is_plugin_active_for_network( $plugin_path ) ) {\r",
            "lineNumber": 1096
          },
          {
            "text": "\t\t\t\t$classic_editor = new Inventory_Presser_Classic_Editor();\r",
            "lineNumber": 1097
          },
          {
            "text": "\t\t\t\t$classic_editor-&gt;add_hooks();\r",
            "lineNumber": 1098
          },
          {
            "text": "\t\t\t}\r",
            "lineNumber": 1099
          },
          {
            "text": "\r",
            "lineNumber": 1100
          },
          {
            "text": "\t\t\t// Avada Builder.\r",
            "lineNumber": 1101
          },
          {
            "text": "\t\t\t$plugin_path = 'fusion-builder/fusion-builder.php';\r",
            "lineNumber": 1102
          }
        ]
      },
      "score": 0.32814159989356995
    }
  ]
}
```
Status: **completed**


</details>
</tool-use>

---


The script uses the minified version when `SCRIPT_DEBUG` is false. Creating a minified version of the updated JavaScript:


---

<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/js/widget-slider.min.js</summary>

</details>

</tool-use>

---


Verifying the final PHP implementation:


---

<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/shortcode/class-shortcode-inventory-slider.php</summary>

</details>
</tool-use>

---


## Summary

Updated the shortcode to support multiple sliders on the same page.

### Changes Made:

1. **PHP (`class-shortcode-inventory-slider.php`)**:
   - Added a static counter (`$slider_counter`) to generate unique IDs for each slider instance
   - Each slider gets unique IDs: `invp-slider-1`, `invp-slider-2`, etc.
   - Slider configurations are stored in a global `window.invpSliderConfigs` object, keyed by slider ID
   - Updated HTML to use unique IDs and a `data-slider-id` attribute for identification

2. **JavaScript (`widget-slider.js`)**:
   - Rewrote to find all slider containers on the page using `querySelectorAll`
   - Each slider is initialized with its own configuration from `window.invpSliderConfigs`
   - Each slider uses its own width calculation and settings
   - Updated selectors to be scoped to each individual slider container

3. **Minified JavaScript (`widget-slider.min.js`)**:
   - Created a minified version matching the new functionality

### How It Works:

- Each shortcode instance generates a unique ID (e.g., `invp-slider-1`, `invp-slider-2`)
- The configuration (including `showcount`) is stored in `window.invpSliderConfigs[sliderId]`
- JavaScript finds all sliders and initializes each one with its own configuration
- No more redeclaration errors — each slider is independent

You can now use multiple `[invp_inventory_slider]` shortcodes on the same page, each with different `showcount` values or other settings, and they will all work independently.

---

_**User**_

i think you broke some CSS in this file, it uses # id selectors. can you repair it? @flexslider.css (1-65) 

---

_**Agent (model composer-1, mode Agent)**_


Checking the original HTML structure and updating the CSS to work with the new unique IDs:


---

<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/shortcode/class-shortcode-inventory-slider.php</summary>

</details>
</tool-use>

---

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


Parameters:

```json
{
  "pattern": "#slider|#carousel|#widget_slider|#slider-width",
  "path": "css",
  "caseInsensitive": false
}
```
Result:

```json
{
  "success": {
    "pattern": "#slider|#carousel|#widget_slider|#slider-width",
    "path": "css",
    "outputMode": "content",
    "workspaceResults": {
      "/Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser": {
        "content": {
          "matches": [
            {
              "file": "css/shortcode-single-vehicle.min.css",
              "matches": [
                {
                  "lineNumber": 1,
                  "content": ".flexslider{background:0 0;border:none}#carousel{margin-top:1em}.vehicle-price{text-align:right}ul.vehicle-features{list-style-position:inside;columns:3;column-gap:1em}.vehicle-buttons{max-width:48%;flex-grow:1}.vehicle-buttons div{min-width:180px}.vehicle-columns{display:flex;justify-content:space-between}.vehicle-summary{margin-top:.5em;flex-grow:2;max-width:none;font-size:1em}.vehicle-columns .vehicle-summary .item{display:inline-block;width:50%}"
                }
              ]
            },
            {
              "file": "css/shortcode-single-vehicle.css",
              "matches": [
                {
                  "lineNumber": 5,
                  "content": "#carousel{"
                }
              ]
            },
            {
              "file": "css/flexslider.min.css",
              "matches": [
                {
                  "lineNumber": 1,
                  "content": ".flexslider{margin-bottom:0;border:0;background:0 0}#carousel.flexslider,#slider.flexslider{box-sizing:content-box}#carousel .flex-direction-nav a,#slider .flex-direction-nav a{top:0;bottom:0}#carousel .flex-direction-nav a{width:10%;max-width:60px}.flex-direction-nav a{height:100%;transition:none;opacity:1;color:#fff;margin:0}.flex-direction-nav a:before{color:#fff;text-shadow:-1px 0 #666,0 1px #666,1px 0 #666,0 -1px #666}.flexslider:hover .flex-direction-nav .flex-next,.flexslider:hover .flex-direction-nav .flex-prev{opacity:1}ul.flex-direction-nav li{line-height:1}#carousel ul.flex-direction-nav li::marker,#slider ul.flex-direction-nav li::marker{content:none}.flex-direction-nav a:focus{outline:0}.flex-direction-nav .flex-next,.flexslider:hover .flex-direction-nav .flex-next{right:0;padding-right:.5em}.flex-direction-nav .flex-prev,.flexslider:hover .flex-direction-nav .flex-prev{left:0;padding-left:.5em}.flexslider .slides img{cursor:pointer}.flex-viewport{width:100%}.flexslider .s [... omitted end of long line]"
                }
              ]
            },
            {
              "file": "css/flexslider.css",
              "matches": [
                {
                  "lineNumber": 6,
                  "content": "#slider.flexslider,"
                },
                {
                  "lineNumber": 7,
                  "content": "#carousel.flexslider{"
                },
                {
                  "lineNumber": 10,
                  "content": "#slider .flex-direction-nav a,"
                },
                {
                  "lineNumber": 11,
                  "content": "#carousel .flex-direction-nav a{"
                },
                {
                  "lineNumber": 15,
                  "content": "#carousel .flex-direction-nav a{"
                },
                {
                  "lineNumber": 37,
                  "content": "#slider ul.flex-direction-nav li::marker,"
                },
                {
                  "lineNumber": 38,
                  "content": "#carousel ul.flex-direction-nav li::marker{"
                }
              ]
            },
            {
              "file": "css/widget-slider.css",
              "matches": [
                {
                  "lineNumber": 27,
                  "content": "#widget_slider .flex-direction-nav a{"
                },
                {
                  "lineNumber": 37,
                  "content": "#widget_slider .flex-direction-nav a:hover{"
                },
                {
                  "lineNumber": 41,
                  "content": "#widget_slider .flex-direction-nav a:before{"
                },
                {
                  "lineNumber": 46,
                  "content": "#widget_slider .flexslider:hover .flex-direction-nav .flex-prev,"
                },
                {
                  "lineNumber": 47,
                  "content": "#widget_slider .flexslider:hover .flex-direction-nav .flex-next{"
                },
                {
                  "lineNumber": 50,
                  "content": "#widget_slider ul.flex-direction-nav li{"
                },
                {
                  "lineNumber": 53,
                  "content": "#widget_slider ul.flex-direction-nav li::marker{"
                },
                {
                  "lineNumber": 56,
                  "content": "#widget_slider .flex-direction-nav a:focus{"
                },
                {
                  "lineNumber": 59,
                  "content": "#widget_slider .flex-direction-nav .flex-next,"
                },
                {
                  "lineNumber": 60,
                  "content": "#widget_slider .flexslider:hover .flex-direction-nav .flex-next{"
                },
                {
                  "lineNumber": 64,
                  "content": "#widget_slider .flex-direction-nav .flex-prev,"
                },
                {
                  "lineNumber": 65,
                  "content": "#widget_slider .flexslider:hover .flex-direction-nav .flex-prev{"
                }
              ]
            },
            {
              "file": "css/widget-slider.min.css",
              "matches": [
                {
                  "lineNumber": 1,
                  "content": ".widget__invp_slick .flex-caption{position:absolute;text-align:center;width:100%}.widget__invp_slick .flex-caption h2,.widget__invp_slick .flex-caption h3{color:#fff;text-shadow:-1px -1px 3px #000,1px -1px 3px #000,-1px 1px 3px #000,1px 1px 3px #000}.widget__invp_slick .flex-caption-top{top:18px;padding-top:1em}.widget__invp_slick .flex-caption-bottom{bottom:10px;padding-bottom:1em}#widget_slider .flex-direction-nav a{top:0;bottom:0;opacity:.6;height:100%;width:30px;transition:none;color:#fff;margin:0}#widget_slider .flex-direction-nav a:hover{opacity:1}#widget_slider .flex-direction-nav a:before{color:#fff;text-shadow:-1px 0 #666,0 1px #666,1px 0 #666,0 -1px #666;font-size:25px}#widget_slider .flexslider:hover .flex-direction-nav .flex-next,#widget_slider .flexslider:hover .flex-direction-nav .flex-prev{opacity:1}#widget_slider ul.flex-direction-nav li{line-height:1}#widget_slider ul.flex-direction-nav li::marker{content:none}#widget_slider .flex-direction-nav a:focus{outline:0}#widge [... omitted end of long line]"
                }
              ]
            }
          ],
          "totalLines": 23,
          "totalMatchedLines": 23
        }
      }
    }
  }
}
```
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>


Parameters:

```json
{
  "pattern": "id=\"slider|id=\"carousel|id=\"widget_slider|id=\"slider-width",
  "path": "includes",
  "caseInsensitive": false
}
```
Result:

```json
{
  "success": {
    "pattern": "id=\"slider|id=\"carousel|id=\"widget_slider|id=\"slider-width",
    "path": "includes",
    "outputMode": "content",
    "workspaceResults": {
      "/Users/Prytania/Dropbox/WordPress/Inventory Presser/plugins/inventory-presser": {
        "content": {
          "matches": [
            {
              "file": "includes/shortcode/class-shortcode-single-vehicle.php",
              "matches": [
                {
                  "lineNumber": 78,
                  "content": "\t\t\t\t\t\t&lt;div id=\"slider-width\"&gt;&lt;/div&gt;"
                },
                {
                  "lineNumber": 79,
                  "content": "\t\t\t\t\t\t&lt;div id=\"slider\" class=\"flexslider\"&gt;"
                },
                {
                  "lineNumber": 118,
                  "content": "\t\t\t\t\t\t\t&lt;div id=\"carousel\" class=\"flexslider no-preview\"&gt;"
                }
              ]
            },
            {
              "file": "includes/shortcode/class-shortcode-photo-slider.php",
              "matches": [
                {
                  "lineNumber": 68,
                  "content": "\t\t&lt;div id=\"slider-width\"&gt;&lt;/div&gt;"
                },
                {
                  "lineNumber": 69,
                  "content": "\t\t&lt;div id=\"slider\" class=\"flexslider\"&gt;"
                },
                {
                  "lineNumber": 98,
                  "content": "\t\t\t&lt;div id=\"carousel\" class=\"flexslider no-preview\"&gt;"
                }
              ]
            },
            {
              "file": "includes/widget/class-widget-inventory-slider.php",
              "matches": [
                {
                  "lineNumber": 179,
                  "content": "\t\techo '&lt;div id=\"slider-width\"&gt;&lt;/div&gt;&lt;div id=\"widget_slider\" class=\"flexslider\"&gt;&lt;ul class=\"slides\"&gt;';"
                }
              ]
            }
          ],
          "totalLines": 7,
          "totalMatchedLines": 7
        }
      }
    }
  }
}
```
Status: **completed**


</details>
</tool-use>

---


The CSS targets `#widget_slider`, but we're generating unique IDs like `widget_slider-1`, `widget_slider-2`. Checking `widget-slider.css` to update the selectors:


---

<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/css/widget-slider.css</summary>

</details>
</tool-use>

---


Updating both CSS files to use attribute selectors that match IDs starting with the base name, so they work with the unique IDs:


---

<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/css/widget-slider.css</summary>

</details>
</tool-use>

---

<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/css/widget-slider.css</summary>

</details>

</tool-use>

---


Updated `widget-slider.css` to support both the old `#widget_slider` ID and the new unique IDs (`widget_slider-1`, `widget_slider-2`, etc.) using attribute selectors `[id^="widget_slider"]`.

`flexslider.css` uses `#slider` and `#carousel`, which are used by other shortcodes (single vehicle, photo slider) and weren't changed, so it should still work.

Verifying the changes and checking if `flexslider.css` needs updates:


---

<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/css/widget-slider.css</summary>

</details>
</tool-use>

---


Updated `widget-slider.css` to support both the old `#widget_slider` ID and the new unique IDs (`widget_slider-1`, `widget_slider-2`, etc.) using attribute selectors `[id^="widget_slider"]`.

`flexslider.css` should still work because:
1. It uses class selectors (e.g., `.flexslider`, `.flex-direction-nav a`) that apply to all flexsliders
2. The ID selectors (`#slider`, `#carousel`) are for other shortcodes (single vehicle, photo slider) and weren't changed

The CSS now works with:
- Old single slider: `#widget_slider`
- New multiple sliders: `widget_slider-1`, `widget_slider-2`, etc.

Styles should apply correctly. If you see issues with `flexslider.css` specifically, share details and I can investigate further.

---

