Plugin Directory

Changeset 1344095


Ignore:
Timestamp:
02/05/2016 03:24:56 PM (10 years ago)
Author:
Pigrecolab
Message:

Little bug fixed
Removed some CMB languages

Location:
pl-car-dealer
Files:
108 added
236 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • pl-car-dealer/trunk/PL-car-dealer.php

    r1338823 r1344095  
    44Plugin URI: https://wordpress.org/plugins/pl-car-dealer/
    55Description: Car dealer custom plugin
    6 Version: 1.1.0
     6Version: 1.1.1
    77Author: Roberto Bruno
    88Author URI: http://www.pigrecolab.com
    9 Text Domain: cde_pgl
    10 Domain Path: /languages
    11 License: GPL2 or later
     9 License: GPL2 or later
    1210
    1311
     
    430428    if ( $terms ) {
    431429        printf( '<select name="%s" class="postform">', "make" );
     430        echo '<option value="0">'.__('All the makes', 'cge_pgl' ).'</option>';
    432431        foreach ( $terms as $term ) {
    433432            printf( '<option value="%s">%s</option>', esc_attr( $term->slug ), esc_html( $term->name ) );
     
    683682    <input type="text" value="" placeholder="'. __( 'Type the Car Name', 'cde_pgl' ).'" name="name" id="name" />
    684683
    685         <br /><label for="make" class="">'. __( 'Make: ', 'cde_pgl' ).'</label><br>
    686     <input type="text" value="" placeholder="'. __( 'Type the Car Make', 'cde_pgl' ).'" name="make" id="make" />
    687 
    688     <br /><label for="maxmil" class="">'. __( 'Max Mileage: ', 'cde_pgl' ).'</label><br>
     684        <br /><label for="make" class="">'. __( 'Make: ', 'cde_pgl' ).'</label><br>';
     685       $taxonomy='cde_category_makes';
     686
     687    $terms = get_terms( $taxonomy );
     688    if ( $terms ) {
     689        $advshrt.='<select name="make" class="postform">';
     690        $advshrt.= '<option value="0">'.__('All the makes', 'cge_pgl' ).'</option>';
     691        foreach ( $terms as $term ) {
     692            $advshrt.='<option value="'.esc_attr( $term->slug ).'">'. esc_html( $term->name ).'</option>';
     693        }
     694        $advshrt.='</select>';
     695    }
     696
     697    $advshrt.= '<br /><label for="maxmil" class="">'. __( 'Max Mileage: ', 'cde_pgl' ).'</label><br>
    689698    <input type="text" value="" placeholder="'. __( 'Maximum mileage', 'cde_pgl' ).'" name="maxmil" id="maxmil" />
    690699
  • pl-car-dealer/trunk/README.txt

    r1337906 r1344095  
    55Tags: car dealer, car seller, cars, autostock, selling cars
    66Requires at least: 3.0.1
    7 Tested up to: 4.4.1
    8 Stable tag: 1.1.0
     7Tested up to: 4.4.2
     8Stable tag: 1.1.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1818It provides:
    1919
    20     1. A complete custom post type "vehicles" where you can add your car, with a custom metabox containing model, make, description, photogallery, price, mileage, etc.
     201. A complete custom post type "vehicles" where you can add your car, with a custom metabox containing model, make, description, photogallery, price, mileage, etc.
    2121
    22     2. A widget for display makes
     222. A widget for display makes
    2323
    24     3. A widget for a custom search form
     243. A widget for a custom search form
    2525
    26     4. A shortcode for a custom search form: [cde_advanced_search]
     264. A shortcode for a custom search form: [cde_advanced_search]
    2727
    28     5. A shortcode for last vehicles [cde_advanced_search]
     285. A shortcode for last vehicles [cde_advanced_search]
    2929
    30     6. Three templates for archive vehicle, advanced vehicle result and a single vehicle
     306. Three templates for archive vehicle, advanced vehicle result and a single vehicle
    3131
    32     7. Translation ready (Italian language included)
     327. Translation ready (Italian language included)
    3333
    34     8. Mileage abbreviation and money symbol setting
     348. Mileage abbreviation and money symbol setting
    3535
    36     A demo is available at http://www.autobarbara.it/
     36A demo is available at http://www.autobarbara.it/
    3737   
    3838== Installation ==
  • pl-car-dealer/trunk/languages/cde_pgl-it_IT.po

    r1337906 r1344095  
    22msgstr ""
    33"Project-Id-Version: Car dealer\n"
    4 "POT-Creation-Date: 2016-01-28 10:16+0100\n"
    5 "PO-Revision-Date: 2016-01-28 10:29+0100\n"
     4"POT-Creation-Date: 2016-02-05 16:15+0100\n"
     5"PO-Revision-Date: 2016-02-05 16:15+0100\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    352352msgstr "Widget Ricerca Veicoli"
    353353
    354 #: PL-car-dealer.php:421 PL-car-dealer.php:680
     354#: PL-car-dealer.php:421 PL-car-dealer.php:681
    355355msgid "Name: "
    356356msgstr "Nome:"
    357357
    358 #: PL-car-dealer.php:422 PL-car-dealer.php:681
     358#: PL-car-dealer.php:422 PL-car-dealer.php:682
    359359msgid "Type the Car Name"
    360360msgstr "Digitare il nome della vettura"
    361361
    362 #: PL-car-dealer.php:424 PL-car-dealer.php:683
     362#: PL-car-dealer.php:424 PL-car-dealer.php:684
    363363msgid "Make: "
    364364msgstr "Marche:"
    365365
    366 #: PL-car-dealer.php:436 PL-car-dealer.php:686
     366#: PL-car-dealer.php:430 PL-car-dealer.php:690
     367msgid "All the makes"
     368msgstr "Tutte le marche"
     369
     370#: PL-car-dealer.php:437 PL-car-dealer.php:697
    367371msgid "Max Mileage: "
    368372msgstr "Max Chilometraggio:"
    369373
    370 #: PL-car-dealer.php:437 PL-car-dealer.php:687
     374#: PL-car-dealer.php:438 PL-car-dealer.php:698
    371375msgid "Maximum mileage"
    372376msgstr "Chilometraggio massimo"
    373377
    374 #: PL-car-dealer.php:439 PL-car-dealer.php:689
     378#: PL-car-dealer.php:440 PL-car-dealer.php:700
    375379msgid "Max price: "
    376380msgstr "Prezzo max:"
    377381
    378 #: PL-car-dealer.php:440 PL-car-dealer.php:690
     382#: PL-car-dealer.php:441 PL-car-dealer.php:701
    379383msgid "Maximum Price"
    380384msgstr "Prezzo massimo"
    381385
    382 #: PL-car-dealer.php:442 PL-car-dealer.php:692
     386#: PL-car-dealer.php:443 PL-car-dealer.php:703
    383387msgid "Min Year: "
    384388msgstr "Min Anno:"
    385389
    386 #: PL-car-dealer.php:443 PL-car-dealer.php:693
     390#: PL-car-dealer.php:444 PL-car-dealer.php:704
    387391msgid "Minimum Year of Constr."
    388392msgstr "Minimo Anno di costr."
    389393
    390 #: PL-car-dealer.php:461
     394#: PL-car-dealer.php:462
    391395msgid "New title"
    392396msgstr "Nuovo titolo"
    393397
    394 #: PL-car-dealer.php:466 PL-car-dealer.php:573
     398#: PL-car-dealer.php:467 PL-car-dealer.php:574
    395399msgid "Title:"
    396400msgstr "Titolo:"
    397401
    398 #: PL-car-dealer.php:496
     402#: PL-car-dealer.php:497
    399403msgid "Allows you to create a new Sidebar widget to display makes!"
    400404msgstr "Consente di creare un nuovo widget per visualizzare le marche!"
    401405
    402 #: PL-car-dealer.php:537
     406#: PL-car-dealer.php:538
    403407msgid "New Title"
    404408msgstr "Nuovo titolo"
    405409
    406 #: PL-car-dealer.php:578
     410#: PL-car-dealer.php:579
    407411msgid "Options:"
    408412msgstr "Opzioni:"
    409413
    410 #: PL-car-dealer.php:582
     414#: PL-car-dealer.php:583
    411415msgid "Hide Widget If There Are No Makes To Be Displayed?"
    412416msgstr "Nascondi il widget se non vi sono marche da mostrare ?"
    413417
    414 #: PL-car-dealer.php:587
     418#: PL-car-dealer.php:588
    415419msgid "Hide Makes That Have No Related Vehicles?"
    416420msgstr "Nascondi marche che non hanno veicoli ?"
    417421
    418 #: PL-car-dealer.php:591
     422#: PL-car-dealer.php:592
    419423msgid "Order Makes By:"
    420424msgstr "Ordina marche per:"
    421425
    422 #: PL-car-dealer.php:593
     426#: PL-car-dealer.php:594
    423427msgid "ID Ascending"
    424428msgstr "ID Crescente"
    425429
    426 #: PL-car-dealer.php:594
     430#: PL-car-dealer.php:595
    427431msgid "ID Descending"
    428432msgstr "ID decrescente"
    429433
    430 #: PL-car-dealer.php:595
     434#: PL-car-dealer.php:596
    431435msgid "Count Ascending"
    432436msgstr "Numero Crescente"
    433437
    434 #: PL-car-dealer.php:596
     438#: PL-car-dealer.php:597
    435439msgid "Count Descending"
    436440msgstr "Numero decrescente"
    437441
    438 #: PL-car-dealer.php:597
     442#: PL-car-dealer.php:598
    439443msgid "Name Ascending"
    440444msgstr "Nome Crescente"
    441445
    442 #: PL-car-dealer.php:598
     446#: PL-car-dealer.php:599
    443447msgid "Name Descending"
    444448msgstr "Nome Decrescente"
    445449
    446 #: PL-car-dealer.php:599
     450#: PL-car-dealer.php:600
    447451msgid "Slug Ascending"
    448452msgstr "Slug Crescente"
    449453
    450 #: PL-car-dealer.php:600
     454#: PL-car-dealer.php:601
    451455msgid "Slug Descending"
    452456msgstr "Slug decrescente"
    453457
    454 #: PL-car-dealer.php:605
     458#: PL-car-dealer.php:606
    455459msgid "Maximum Number Of Makes To Return:"
    456460msgstr "Numero massimo di marche da mostrare:"
    457461
    458 #: PL-car-dealer.php:606
     462#: PL-car-dealer.php:607
    459463msgid "Keep Empty To Display All"
    460464msgstr "Lasciare Vuoto Per visualizzare tutti"
    461465
    462 #: PL-car-dealer.php:610
     466#: PL-car-dealer.php:611
    463467msgid "Ids To Exclude From Being Displayed:"
    464468msgstr "ID da escludere dalla visualizzazione:"
    465469
    466 #: PL-car-dealer.php:611 PL-car-dealer.php:616
     470#: PL-car-dealer.php:612 PL-car-dealer.php:617
    467471msgid "Separate ids with a comma ,"
    468472msgstr "Separa gli ID con una virgola,"
    469473
    470 #: PL-car-dealer.php:615
     474#: PL-car-dealer.php:616
    471475msgid "Only Display Makes With The Following Ids:"
    472476msgstr "Mostra marche con i seguenti ID:"
    473477
    474 #: PL-car-dealer.php:684
    475 msgid "Type the Car Make"
    476 msgstr "Digita la marca del veicolo"
    477 
    478 #: PL-car-dealer.php:740 templates/advanced-vehicle-results.php:74
     478#: PL-car-dealer.php:751 templates/advanced-vehicle-results.php:78
    479479#: templates/archive-vehicle.php:72
    480480msgid "No Image"
    481481msgstr "Nessuna immagine"
    482482
    483 #: PL-car-dealer.php:749 templates/advanced-vehicle-results.php:84
     483#: PL-car-dealer.php:760 templates/advanced-vehicle-results.php:88
    484484#: templates/archive-vehicle.php:82
    485485#, php-format
     
    487487msgstr "<strong>Anno: </strong> %s"
    488488
    489 #: PL-car-dealer.php:751 templates/advanced-vehicle-results.php:86
     489#: PL-car-dealer.php:762 templates/advanced-vehicle-results.php:90
    490490#: templates/archive-vehicle.php:84
    491491msgid "<strong>"
    492492msgstr ""
    493493
    494 #: PL-car-dealer.php:752 templates/advanced-vehicle-results.php:87
     494#: PL-car-dealer.php:763 templates/advanced-vehicle-results.php:91
    495495#: templates/archive-vehicle.php:85
    496496msgid "Take a look"
     
    521521msgstr ""
    522522
    523 #: templates/advanced-vehicle-results.php:55
     523#: templates/advanced-vehicle-results.php:59
    524524msgid "Advanced results"
    525525msgstr "Risultati ricerca avanzata"
    526526
    527 #: templates/advanced-vehicle-results.php:107
     527#: templates/advanced-vehicle-results.php:111
    528528#: templates/archive-vehicle.php:105
    529529msgid "Nothing Found"
    530530msgstr "Non è stato trovato nulla"
    531531
    532 #: templates/advanced-vehicle-results.php:111
     532#: templates/advanced-vehicle-results.php:115
    533533msgid "Apologies, but no results were found."
    534534msgstr "Siamo spiacenti, ma non è stato trovato alcun risultato."
     
    561561msgid "Apologies, but no results were found. "
    562562msgstr "Siamo spiacenti, ma non è stato trovato alcun risultato."
     563
     564#~ msgid "Type the Car Make"
     565#~ msgstr "Digita la marca del veicolo"
    563566
    564567#~ msgid "Description"
  • pl-car-dealer/trunk/templates/advanced-vehicle-results.php

    r1337906 r1344095  
    1111// Get data from URL into variables
    1212$_name = $_GET['name'] != '' ? $_GET['name'] : '';
    13 $_make = $_GET['make'] != '' ? $_GET['make'] : '';
     13$_make = $_GET['make'] != '0' ? $_GET['make'] : null;
    1414$_mileage = $_GET['maxmil'] != '' ? $_GET['maxmil'] : 0;
    1515$_price = $_GET['maxprice'] != '' ? $_GET['maxprice'] : 0;
     
    2222        'post_type'     =>  'vehicle', // your CPT
    2323        's'             =>  $_name, // looks into everything with the keyword from your 'name field'
    24         'tax_query' => array(
    25             array(
    26                 'taxonomy'  => 'cde_category_makes',
    27                 'field'     => 'slug',
    28                 'terms' => array($_make),
    29                 'operator'  => 'IN'
    30             )
    31         ),
     24
    3225       'meta_query'    =>  array(
    3326                                array(
     
    4942                            )
    5043    );
     44
     45if ( ! is_null($_make) )
     46  $v_args['tax_query'] =array(
     47            array(
     48                'taxonomy'  => 'cde_category_makes',
     49                'field'     => 'slug',
     50                'terms' => array($_make),
     51                'operator'  => 'IN'
     52            )
     53        );
     54
    5155$vehicleSearchQuery = new WP_Query( $v_args );
    5256
Note: See TracChangeset for help on using the changeset viewer.