Function Reference: geodir_set_tax_meta_fields

Summary

This function has not been documented yet.

Source File

geodir_set_tax_meta_fields() is located in geodirectory-functions/cat-meta-functions/cat_meta.php [Line: 13]

Source Code

function geodir_set_tax_meta_fields() {
    /*
     * prefix of meta keys, optional
     * use underscore (_) at the beginning to make keys hidden, for example $prefix = '_ba_';
     *  you also can make prefix empty to disable it
     *
     */

    $prefix = 'ct_';
    /*
     * configure your meta box
     */

    $config = array(
        'id' => 'demo_meta_box',                    // meta box id, unique per meta box
        'title' => __('Demo Meta Box', 'geodirectory'),                    // meta box title
        'pages' => geodir_get_taxonomies(),            // taxonomy name, accept categories, post_tag and custom taxonomies
        'context' => 'normal',                        // where the meta box appear: normal (default), advanced, side; optional
        'fields' => array(),                        // list of meta fields (can be added by field arrays)
        'local_images' => false,                    // Use local or hosted images (meta box images for add/remove)
        'use_with_theme' => true                    //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
    );


    /*
     * Initiate your meta box
     */
    $my_meta = new Geodir_Tax_Meta_Class($config);
    $my_meta->addWysiwyg($prefix . 'cat_top_desc', array('name' => __('Category Top Description', 'geodirectory'), 'desc' => __('This will appear at the top of the category listing.', 'geodirectory')));
    $my_meta->addImage($prefix . 'cat_default_img', array('name' => __('Default Listing Image', 'geodirectory'), 'desc' => __('Choose a default "no image"', 'geodirectory')));
    $my_meta->addImage($prefix . 'cat_icon', array('name' => __('Category Icon', 'geodirectory'), 'desc' => __('Choose a category icon', 'geodirectory'), 'validate_func' => '!empty'));
    /*$my_meta->addCheckbox($prefix.'pointless',array('name'=> __('Exclude Rating sort option','geodirectory'),'style'=>'hidden'));*/// hidden setting to trick WPML

    $my_meta->addSelect($prefix . 'cat_schema',
    /*
     * Allows you to add/filter the cat schema types.
     *
     * @since 1.5.7
     */
    apply_filters('geodir_cat_schemas',array(
        '' => __('Default (LocalBusiness)', 'geodirectory'),
        'AccountingService' => 'AccountingService',
        'Attorney' => 'Attorney',
        'AutoBodyShop' => 'AutoBodyShop',
        'AutoDealer' => 'AutoDealer',
        'AutoPartsStore' => 'AutoPartsStore',
        'AutoRental' => 'AutoRental',
        'AutoRepair' => 'AutoRepair',
        'AutoWash' => 'AutoWash',
        'Bakery' => 'Bakery',
        'BarOrPub' => 'BarOrPub',
        'BeautySalon' => 'BeautySalon',
        'BedAndBreakfast' => 'BedAndBreakfast',
        'BikeStore' => 'BikeStore',
        'BookStore' => 'BookStore',
        'CafeOrCoffeeShop' => 'CafeOrCoffeeShop',
        'Campground' => 'Campground',
        'ChildCare' => 'ChildCare',
        'ClothingStore' => 'ClothingStore',
        'ComputerStore' => 'ComputerStore',
        'DaySpa' => 'DaySpa',
        'Dentist' => 'Dentist',
        'DryCleaningOrLaundry' => 'DryCleaningOrLaundry',
        'Electrician' => 'Electrician',
        'ElectronicsStore' => 'ElectronicsStore',
        'EmergencyService' => 'EmergencyService',
        'EntertainmentBusiness' => 'EntertainmentBusiness',
        'Event' => 'Event',
        'EventVenue' => 'EventVenue',
        'ExerciseGym' => 'ExerciseGym',
        'FinancialService' => 'FinancialService',
        'Florist' => 'Florist',
        'FoodEstablishment' => 'FoodEstablishment',
        'FurnitureStore' => 'FurnitureStore',
        'GardenStore' => 'GardenStore',
        'GeneralContractor' => 'GeneralContractor',
        'GolfCourse' => 'GolfCourse',
        'HairSalon' => 'HairSalon',
        'HardwareStore' => 'HardwareStore',
        'HealthAndBeautyBusiness' => 'HealthAndBeautyBusiness',
        'HobbyShop' => 'HobbyShop',
        'HomeAndConstructionBusiness' => 'HomeAndConstructionBusiness',
        'HomeGoodsStore' => 'HomeGoodsStore',
        'Hospital' => 'Hospital',
        'Hostel' => 'Hostel',
        'Hotel' => 'Hotel',
        'HousePainter' => 'HousePainter',
        'HVACBusiness' => 'HVACBusiness',
        'InsuranceAgency' => 'InsuranceAgency',
        'JewelryStore' => 'JewelryStore',
        'LiquorStore' => 'LiquorStore',
        'Locksmith' => 'Locksmith',
        'LodgingBusiness' => 'LodgingBusiness',
        'MedicalClinic' => 'MedicalClinic',
        'MensClothingStore' => 'MensClothingStore',
        'MobilePhoneStore' => 'MobilePhoneStore',
        'Motel' => 'Motel',
        'MotorcycleDealer' => 'MotorcycleDealer',
        'MotorcycleRepair' => 'MotorcycleRepair',
        'MovingCompany' => 'MovingCompany',
        'MusicStore' => 'MusicStore',
        'NailSalon' => 'NailSalon',
        'NightClub' => 'NightClub',
        'Notary' => 'Notary',
        'OfficeEquipmentStore' => 'OfficeEquipmentStore',
        'Optician' => 'Optician',
        'PetStore' => 'PetStore',
        'Physician' => 'Physician',
        'Plumber' => 'Plumber',
        'ProfessionalService' => 'ProfessionalService',
        'RealEstateAgent' => 'RealEstateAgent',
        'Residence' => 'Residence',
        'Restaurant' => 'Restaurant',
        'RoofingContractor' => 'RoofingContractor',
        'RVPark' => 'RVPark',
        'School' => 'School',
        'SelfStorage' => 'SelfStorage',
        'ShoeStore' => 'ShoeStore',
        'SkiResort' => 'SkiResort',
        'SportingGoodsStore' => 'SportingGoodsStore',
        'SportsClub' => 'SportsClub',
        'Store' => 'Store',
        'TattooParlor' => 'TattooParlor',
        'Taxi' => 'Taxi',
        'TennisComplex' => 'TennisComplex',
        'TireShop' => 'TireShop',
        'TouristAttraction' => 'TouristAttraction',
        'ToyStore' => 'ToyStore',
        'TravelAgency' => 'TravelAgency',
        //'VacationRentals' => 'VacationRentals', // Not recognised by google yet
        'VeterinaryCare' => 'VeterinaryCare',
        'WholesaleStore' => 'WholesaleStore',
        'Winery' => 'Winery'
    )),
    array('name' => __('Schema Type', 'geodirectory'), 'desc' => __('Select the Schema to use for this category', 'geodirectory') . "", 'std' => array('selectkey2')));

    // Finish Meta Box Declaration
    $my_meta->Finish();
}