function wpsight_options_listings() { /** Define data arrays */ $options_listings = array(); $options_listings['heading_listings'] = array('name' => __('Listings', 'wpsight'), 'id' => 'heading_listings', 'type' => 'heading'); // Check of old 'property_id' options was active $listing_id_std = wpsight_get_option('property_id') ? wpsight_get_option('property_id') : __('ID-', 'wpsight'); $options_listings['listing_id'] = array('name' => __('Listing ID Prefix', 'wpsight'), 'id' => 'listing_id', 'desc' => __('The listing ID will be this prefix plus post ID. You can optionally set individual IDs on the listing edit screen.', 'wpsight'), 'std' => $listing_id_std, 'class' => 'mini', 'type' => 'text'); $options_listings['measurement_unit'] = array('name' => __('Measurement Unit', 'wpsight'), 'desc' => __('Please select the general measurement unit. The unit for the listing standard features can be defined separately below.', 'wpsight'), 'id' => 'measurement_unit', 'std' => 'm2', 'class' => 'mini', 'type' => 'select', 'options' => array_filter(wpsight_measurement_units())); $options_listings['currency'] = array('name' => __('Currency', 'wpsight'), 'desc' => __('Please select the currency for the listing prices. If your currency is not listed, please select <code>Other</code>.', 'wpsight'), 'id' => 'currency', 'std' => 'usd', 'class' => 'mini', 'type' => 'select', 'options' => array_merge(array_filter(wpsight_currencies()), array('other' => __('Other', 'wpsight')))); $options_listings['currency_other'] = array('name' => __('Other Currency', 'wpsight') . ' (' . __('Abbreviation', 'wpsight') . ')', 'id' => 'currency_other', 'desc' => __('Please insert the abbreviation of your currency (e.g. <code>EUR</code>).', 'wpsight'), 'class' => 'hidden mini', 'type' => 'text'); $options_listings['currency_other_ent'] = array('name' => __('Other Currency', 'wpsight') . ' (' . __('Symbol', 'wpsight') . ')', 'id' => 'currency_other_ent', 'desc' => __('Please insert the currency symbol or HTML entity (e.g. <code>&euro;</code>).', 'wpsight'), 'class' => 'hidden mini', 'type' => 'text'); $options_listings['currency_symbol'] = array('name' => __('Currency Symbol', 'wpsight'), 'desc' => __('Please select the position of the currency symbol.', 'wpsight'), 'id' => 'currency_symbol', 'std' => 'before', 'type' => 'radio', 'options' => array('before' => __('Before the value', 'wpsight'), 'after' => __('After the value', 'wpsight'))); $options_listings['currency_separator'] = array('name' => __('Thousands Separator', 'wpsight'), 'desc' => __('Please select the thousands separator for your listing prices.', 'wpsight'), 'id' => 'currency_separator', 'std' => 'comma', 'type' => 'radio', 'options' => array('comma' => __('Comma (e.g. 1,000,000)', 'wpsight'), 'dot' => __('Period (e.g. 1.000.000)', 'wpsight'))); /** Toggle standard features */ $options_listings['listing_features'] = array('name' => __('Listing Features', 'wpsight'), 'desc' => __('Please check the box to edit the listing standard features.', 'wpsight'), 'id' => 'listing_features', 'std' => '0', 'type' => 'checkbox'); /** Loop through standard features */ $i = 1; foreach (wpsight_standard_details() as $feature_id => $value) { $options_listings[$feature_id] = array('name' => __('Standard Feature', 'wpsight') . ' #' . $i, 'id' => $feature_id, 'desc' => $value['description'], 'std' => array('label' => $value['label'], 'unit' => $value['unit']), 'class' => 'hidden', 'type' => 'measurement'); $i++; } /** Toggle rental periods */ $options_listings['rental_periods'] = array('name' => __('Rental Periods', 'wpsight'), 'desc' => __('Please check the box to edit the rental periods.', 'wpsight'), 'id' => 'rental_periods', 'std' => '0', 'type' => 'checkbox'); /** Loop through rental periods */ $i = 1; foreach (wpsight_rental_periods() as $period_id => $value) { $options_listings[$period_id] = array('name' => __('Rental Period', 'wpsight') . ' #' . $i, 'id' => $period_id, 'std' => $value, 'class' => 'hidden', 'type' => 'text'); $i++; } return apply_filters('wpsight_options_listings', $options_listings); }
/** * Add plugins options to wpCasa settings page */ public function wpsight_options_currency() { // Create options array $options_currency = array(); $options_currency['heading_currency'] = array('name' => __('Currency', 'wpcasa-currency'), 'id' => 'heading_social', 'type' => 'heading'); $options_currency['currency_info'] = array('name' => __('General Info', 'wpcasa-currency'), 'desc' => __('There are different options to place the currency convert on your site. Select the options listed under Location, use the shortcode <code>[currency_converter]</code> or activate the wpCasa Currency Converter widget.', 'wpcasa-currency'), 'type' => 'info'); $options_currency['currency_location'] = array('name' => __('Location', 'wpcasa-currency'), 'desc' => __('Please select the position of the currency selector.', 'wpcasa-currency'), 'id' => 'currency_location', 'std' => array('social-icons' => '1'), 'type' => 'multicheck', 'options' => array('social-icons' => __('Next to social icons', 'wpcasa-currency'), 'header' => __('In header area', 'wpcasa-currency'))); $available_currencies = function_exists('wpsight_currencies') ? wpsight_currencies() : $this->wpsight_available_currencies(); $default_currencies = $this->wpsight_currencies_defaults(); $options_currency['currency_options'] = array('name' => __('Available Currencies', 'wpcasa-currency'), 'desc' => __('Selected currencies will appear in your currency converter drop down selector.', 'wpcasa-currency'), 'id' => 'currency_options', 'std' => $default_currencies, 'type' => 'multicheck', 'options' => array_filter($available_currencies)); return apply_filters('wpsight_options_currency', $options_currency); }