{"id":67852,"date":"2017-05-22T12:10:31","date_gmt":"2017-05-22T12:10:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/dvla-search\/"},"modified":"2019-11-20T10:51:38","modified_gmt":"2019-11-20T10:51:38","slug":"dvla-search","status":"publish","type":"plugin","link":"https:\/\/cn.wordpress.org\/plugins\/dvla-search\/","author":15423554,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.3","stable_tag":"trunk","tested":"5.3.0","requires":"3.0.1","requires_php":"","requires_plugins":"","header_name":"DVLA Search","header_author":"","header_description":"Easily add results from the DVLA Search API to your site. Requires a DVLA Search subscription.","assets_banners_color":"","last_updated":"2019-11-20 10:51:38","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/dvlasearch.co.uk\/","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":40,"downloads":3007,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["installation","faq","changelog","description"],"tags":[],"upgrade_notice":{"1.0.0":"<p>This is the initial DVLA Search Plugin release.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.0","1.1.1","1.1.2"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[141405,80,162],"plugin_category":[43],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-67852","plugin","type-plugin","status-publish","hentry","plugin_tags-dvlasearch","plugin_tags-shortcode","plugin_tags-widget","plugin_category-customization","plugin_committers-dvlasearch"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/dvla-search.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/dvla-search<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress<\/li>\n<li>Use the Settings-&gt;DVLA Search screen to configure the plugin with your API Key\n1.1 If you want to test the Plugin you can use the example API Key \"DvlaSearchDemoAccount\" and test with a registration number beginning MT09 or FH51 such as MT09NKS.<\/li>\n<\/ol>\n\n<p>Once you've added your API Key you can customize the fields shown on the simple results page from the Settings-&gt;DVLA Search-&gt;Results Fields screen.<\/p>\n\n<h4>Add The Widget To Your Site<\/h4>\n\n<ol>\n<li>Go to Appearance-&gt;Widgets<\/li>\n<li>Drag the \"DVLA Search Widget\" to the sidebar or other widget area of your choice.<\/li>\n<li>By default the widget will point at the simple results page and the widget will have no title.<\/li>\n<\/ol>\n\n<h4>Create a Custom Results Page<\/h4>\n\n<p>To display the results on your own page, you can use the provided shortcodes as follows:<\/p>\n\n<ol>\n<li>Create a new page from Pages-&gt;Add New<\/li>\n<li>Use the <code>[dvla_search_success][\/dvla_search_success]<\/code> block to wrap the content to show if the search returned valid results.<\/li>\n<li>Use the <code>[dvla_search_error][\/dvla_search_error]<\/code> block to wrap a message to display if there was an error.<\/li>\n<li>You can display the results data with the <code>[dvla_search_result]<\/code> shortcode by specifying one or more field to output.\n1.1 For example, to display the vin use <code>[dvla_search_result vin]<\/code>\n1.1 Or to display the colour and model use <code>[dvla_search_result colour model]<\/code>\n1.1 For a full list of fields available see the help page at DVLA Search-&gt;Shortcode Help or in the readme.<\/li>\n<li>Save your page and take note of the slug.<\/li>\n<li>Update the widget \"Results Page\" option with the slug of your custom results page.<\/li>\n<\/ol>\n\n<p>For example, your custom results page might contain the following shortcodes:<\/p>\n\n<pre><code>    [dvla_search_success]\n      Your car [dvla_search_result registration] is a [dvla_search_result colour model] and the VIN is [dvla_search_result vin]\n    [\/dvla_search_success]\n\n    [dvla_search_error]\n      There was an error searching for [dvla_search_result registration]\n    [\/dvla_search_error]\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt>Can I test the DVLA Search Plugin without an account?<\/dt>\n<dd><p>Yes, you can use the example API Key \"DvlaSearchDemoAccount\" and test with a registration number beginning MT09 or FH51 such as MT09NKS.<\/p><\/dd>\n<dt>How do I signup for an account with DVLASearch.co.uk?<\/dt>\n<dd><p>You can sign up for an account at <a href=\"https:\/\/dvlasearch.co.uk\/dvla-api-obtaining-access\/\">https:\/\/dvlasearch.co.uk\/dvla-api-obtaining-access\/<\/a><\/p><\/dd>\n<dt>How many credits does each search use?<\/dt>\n<dd><p>Each time someone searches for a vehicle registration, it uses one credit.<\/p><\/dd>\n<dt>Available Fields<\/dt>\n<dd><p>The following API fields are available:<\/p>\n\n<ul>\n<li><strong>vin<\/strong> - A vehicle identification number, commonly abbreviated to VIN, or chassis number, is a unique code including a serial number, used by the automotive industry to identify individual motor vehicles, towed vehicles, motorcycles, scooters and mopeds as defined in ISO 3833. VINs were first used in 1954. eg <em>WVGZZZ5NZAW007903<\/em><\/li>\n<li><strong>make<\/strong> - The vehicle manufacturer. eg <em>Vauxhall<\/em><\/li>\n<li><strong>model<\/strong> - The vehicle model. eg <em>Vectra<\/em><\/li>\n<li><strong>cylinderCapacity<\/strong> - The vehicle cylinder capacity (cc). eg <em>1968cc<\/em><\/li>\n<li><strong>numberOfDoors<\/strong> - The number of doors on the vehicle. eg <em>5<\/em><\/li>\n<li><strong>sixMonthRate<\/strong> - The cost of vehicle tax for 6 months. eg <em>112.75<\/em><\/li>\n<li><strong>twelveMonthRate<\/strong> - The cost of vehicle tax for 12 months. eg <em>205.00<\/em><\/li>\n<li><strong>dateOfFirstRegistration<\/strong> - The date on which the vehicle was registered. eg <em>23 July 2009<\/em><\/li>\n<li><strong>yearOfManufacture<\/strong> - They year the vehicle was manufactured. eg <em>2009<\/em><\/li>\n<li><strong>co2Emissions<\/strong> - The vehicle emissions. eg <em>167 g\/km<\/em><\/li>\n<li><strong>fuelType<\/strong> - The vehicle fuel type. eg <em>Diesel<\/em> (other values: <em>Petrol<\/em>, <em>Electric<\/em>)<\/li>\n<li><strong>taxStatus<\/strong> - Current tax status. eg <em>Not taxed<\/em><\/li>\n<li><strong>transmission<\/strong> - The vehicle transmission. eg <em>Manual<\/em> (other values: <em>automatic<\/em>, <em>cvt<\/em>)<\/li>\n<li><strong>colour<\/strong> - The vehicle colour. eg <em>Silver<\/em><\/li>\n<li><strong>typeApproval<\/strong> - The vehicle category classi\ufb01cation. eg <em>M1<\/em><\/li>\n<li><strong>wheelPlan<\/strong> - The vehicle wheel plan. eg <em>2 AXLE RIGID BODY<\/em><\/li>\n<li><strong>revenueWeight<\/strong> - The vehicle\u2019s con\ufb01rmed maximum gross weight. eg <em>3850kg<\/em><\/li>\n<li><strong>taxDetails<\/strong> - Vehicle tax information. eg <em>Tax due: 06 February 2015<\/em><\/li>\n<li><strong>motDetails<\/strong> - MOT expiry day. eg <em>Expires: 23 July 2015<\/em><\/li>\n<li><strong>taxed<\/strong> - States if the tax is valid. eg <em>false<\/em><\/li>\n<li><p><strong>mot<\/strong> - States if the mot is valid. eg <em>true<\/em><\/p>\n\n<p>For full details, see the \"Shortcode Help\" section of the DVLA Search Admin Menu, or the <a href=\"https:\/\/dvlasearch.co.uk\/dvla-api-documentation\/\">DVLA Search API Documentation<\/a><\/p><\/li>\n<\/ul><\/dd>\n<dt>Advanced Customization<\/dt>\n<dd><p>If you are comfortable writing or modifying WordPress Plugins you can take advantage of the search functionality and access the results in your own code.<\/p>\n\n<ul>\n<li>Any page with the <code>?dvla_search_registration=&lt;REG&gt;<\/code> query param will hit the API using your registered API Key and add the results to a global variable <code>$dvla_search_result_data<\/code><\/li>\n<li>The results in <code>$dvla_search_result_data<\/code> are an array keyed by the fields described in \"Available Fields\" section of the readme.<\/li>\n<li>For more insight into how the DVLA Search shortcodes access the results, see the code in the plugin directory.<\/li>\n<li>You could for example use this data in a your own shortcode to display on a custom results page.<\/li>\n<\/ul>\n\n<p>For example:<\/p>\n\n<pre><code>&lt;?php\nfunction dvla_search_custom_shortcode() {\n  global $dvla_search_result_data;\n  global $dvla_search_registration;\n\n  if( $dvla_search_result_data['mot'] ) {\n    return \"$dvla_search_registration has a valid MOT\";\n  } else {\n    return \"$dvla_search_registration does not have a valid MOT\";\n  }\n}\nadd_shortcode('dvla_search_custom_shortcode', 'dvla_search_custom_shortcode');\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.3<\/h4>\n\n<ul>\n<li>Increase timeout of curl requests for slow connections<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Fixed an issue where widget options would not display in admin menu.<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Fixed the widget input height issue on some themes including Avada.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Improved the widget CSS for compatibility with more themes.<\/li>\n<li>Fixed a CSS issue that could impact the sites theme font.<\/li>\n<li>Fixed a bug where on some themes the results page layout would break.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Updated readme.txt formatting.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial Release.<\/li>\n<\/ul>\n\n<!--section=description-->\n<p>The DVLA Search Plugin provides subscribers to the DVLA Search API a widget, customisable results page, and shortcodes for use on custom pages.<\/p>","raw_excerpt":"The DVLA Search Plugin provides subscribers to the DVLA Search API a widget, customisable results page, and shortcodes for use on custom pages.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/67852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=67852"}],"author":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dvlasearch"}],"wp:attachment":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=67852"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=67852"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=67852"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=67852"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=67852"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=67852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}