/**
  * Output the settings.
  */
 public function output()
 {
     global $current_section;
     $settings = $this->get_settings();
     PH_Admin_Settings::output_fields($settings);
 }
 /**
  * Output the settings
  */
 public function output()
 {
     global $current_section;
     if ($current_section) {
         if (isset($_REQUEST['id'])) {
             $current_id = empty($_REQUEST['id']) ? '' : sanitize_title($_REQUEST['id']);
             switch ($current_section) {
                 case "availability":
                     $settings = $this->get_custom_fields_availability_setting();
                     break;
                 case "availability-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'availability', __('Availability', 'propertyhive'));
                     break;
                 case "property-type":
                     $settings = $this->get_custom_fields_property_type_setting();
                     break;
                 case "property-type-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'property_type', __('Property Type', 'propertyhive'));
                     break;
                 case "commercial-property-type":
                     $settings = $this->get_custom_fields_commercial_property_type_setting();
                     break;
                 case "commercial-property-type-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'commercial_property_type', __('Property Type', 'propertyhive'));
                     break;
                 case "location":
                     $settings = $this->get_custom_fields_location_setting();
                     break;
                 case "location-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'location', __('Location', 'propertyhive'));
                     break;
                 case "parking":
                     $settings = $this->get_custom_fields_parking_setting();
                     break;
                 case "parking-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'parking', __('Parking', 'propertyhive'));
                     break;
                 case "outside-space":
                     $settings = $this->get_custom_fields_outside_space_setting();
                     break;
                 case "outside-space-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'outside_space', __('Outside Space', 'propertyhive'));
                     break;
                 case "price-qualifier":
                     $settings = $this->get_custom_fields_price_qualifier_setting();
                     break;
                 case "price-qualifier-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'price_qualifier', __('Price Qualifier', 'propertyhive'));
                     break;
                 case "sale-by":
                     $settings = $this->get_custom_fields_sale_by_setting();
                     break;
                 case "sale-by-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'sale_by', __('Sale By', 'propertyhive'));
                     break;
                 case "tenure":
                     $settings = $this->get_custom_fields_tenure_setting();
                     break;
                 case "tenure-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'tenure', __('Tenure', 'propertyhive'));
                     break;
                 case "commercial-tenure":
                     $settings = $this->get_custom_fields_commercial_tenure_setting();
                     break;
                 case "commercial-tenure-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'commercial_tenure', __('Tenure', 'propertyhive'));
                     break;
                 case "furnished":
                     $settings = $this->get_custom_fields_furnished_setting();
                     break;
                 case "furnished-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'furnished', __('Furnished', 'propertyhive'));
                     break;
                 case "marketing-flag":
                     $settings = $this->get_custom_fields_marketing_flag_setting();
                     break;
                 case "marketing-flag-delete":
                     $settings = $this->get_custom_fields_delete($current_id, 'marketing_flag', __('Marketing Flag', 'propertyhive'));
                     break;
                 default:
                     echo 'UNKNOWN CUSTOM FIELD';
             }
             PH_Admin_Settings::output_fields($settings);
         } else {
             global $hide_save_button;
             $hide_save_button = true;
             // The main custom field screen listing them in a table
             $settings = $this->get_custom_fields_setting($current_section);
             PH_Admin_Settings::output_fields($settings);
         }
     } else {
         $settings = $this->get_settings();
         PH_Admin_Settings::output_fields($settings);
     }
 }
 /**
  * Output the settings
  */
 public function output()
 {
     global $current_section;
     if ($current_section == 'add') {
         remove_action('propertyhive_admin_field_offices', array($this, 'offices_setting'));
         $settings = $this->get_office_settings();
         PH_Admin_Settings::output_fields($settings);
         /*foreach ( $shipping_methods as $method ) {
               if ( strtolower( get_class( $method ) ) == strtolower( $current_section ) && $method->has_settings() ) {
                   $method->admin_options();
                   break;
               }
           }*/
     } elseif ($current_section == 'edit') {
         remove_action('propertyhive_admin_field_offices', array($this, 'offices_setting'));
         $current_id = empty($_REQUEST['id']) ? '' : sanitize_title($_REQUEST['id']);
         $settings = $this->get_office_settings();
         PH_Admin_Settings::output_fields($settings);
     } elseif ($current_section == 'delete') {
         remove_action('propertyhive_admin_field_offices', array($this, 'offices_setting'));
         $current_id = empty($_REQUEST['id']) ? '' : sanitize_title($_REQUEST['id']);
         $settings = $this->get_office_delete();
         PH_Admin_Settings::output_fields($settings);
     } else {
         $settings = $this->get_settings();
         PH_Admin_Settings::output_fields($settings);
     }
 }
/**
 * Output admin fields.
 *
 * Loops though the PropertyHive options array and outputs each field.
 *
 * @param array $options Opens array to output
 */
function propertyhive_admin_fields($options)
{
    if (!class_exists('PH_Admin_Settings')) {
        include 'class-ph-admin-settings.php';
    }
    PH_Admin_Settings::output_fields($options);
}
 /**
  * Output the settings
  */
 public function output()
 {
     global $current_section;
     if ($current_section) {
         switch ($current_section) {
             case "international":
                 $settings = $this->get_general_international_setting();
                 break;
             case "map":
                 $settings = $this->get_general_map_setting();
                 break;
             default:
                 die("Unknown setting section");
         }
     } else {
         $settings = $this->get_settings();
     }
     PH_Admin_Settings::output_fields($settings);
 }
 /**
  * Output the settings
  */
 public function output()
 {
     $settings = $this->get_settings();
     PH_Admin_Settings::output_fields($settings);
 }