/**
  * Customizations
  *
  * @access public
  * @param object $wp_customize
  * @return void
  */
 public static function customizations($wp_customize)
 {
     $pages = Realia_Pages::get_pages();
     $wp_customize->add_section('realia_general', array('title' => __('Realia General', 'realia'), 'priority' => 1));
     // Under construction
     $wp_customize->add_setting('realia_general_under_construction_page', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_general_under_construction_page', array('type' => 'select', 'label' => __('Under Construction Page', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_under_construction_page', 'choices' => $pages));
     // Cookie policy
     $wp_customize->add_setting('realia_general_cookie_policy_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_general_cookie_policy_page', array('type' => 'select', 'label' => __('Cookie Policy Page', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_cookie_policy_page', 'choices' => $pages));
     if (current_theme_supports('realia-compare')) {
         // Compare page
         $wp_customize->add_setting('realia_general_compare_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
         $wp_customize->add_control('realia_general_compare_page', array('type' => 'select', 'label' => __('Compare Page', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_compare_page', 'choices' => $pages));
     }
     if (current_theme_supports('realia-favorite')) {
         // Favorites page
         $wp_customize->add_setting('realia_general_favorites_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
         $wp_customize->add_control('realia_general_favorites_page', array('type' => 'select', 'label' => __('Favorites Page', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_favorites_page', 'choices' => $pages));
     }
     // Login required
     $wp_customize->add_setting('realia_general_login_required_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_general_login_required_page', array('type' => 'select', 'label' => __('Login Required Page', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_login_required_page', 'choices' => $pages));
     // After login page
     $wp_customize->add_setting('realia_general_after_login_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_general_after_login_page', array('type' => 'select', 'label' => __('After Login Page', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_after_login_page', 'choices' => $pages));
     // Profile page
     $wp_customize->add_setting('realia_general_profile_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_general_profile_page', array('type' => 'select', 'label' => __('Profile Page', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_profile_page', 'choices' => $pages));
     // Change password page
     $wp_customize->add_setting('realia_general_password_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_general_password_page', array('type' => 'select', 'label' => __('Password Page', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_password_page', 'choices' => $pages));
     if (current_theme_supports('realia-statistics')) {
         // Query logging
         $wp_customize->add_setting('realia_general_enable_query_logging', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
         $wp_customize->add_control('realia_general_enable_query_logging', array('type' => 'checkbox', 'label' => __('Enable Search Query Logging', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_enable_query_logging'));
         // Property logging
         $wp_customize->add_setting('realia_general_enable_property_logging', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
         $wp_customize->add_control('realia_general_enable_property_logging', array('type' => 'checkbox', 'label' => __('Enable Property Views Logging', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_enable_property_logging'));
     }
     // Enable reviews
     $wp_customize->add_setting('realia_general_enable_reviews', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_general_enable_reviews', array('type' => 'checkbox', 'label' => __('Enable Reviews', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_enable_reviews'));
     if (current_theme_supports('realia-compare')) {
         // Enable compare
         $wp_customize->add_setting('realia_general_enable_compare', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
         $wp_customize->add_control('realia_general_enable_compare', array('type' => 'checkbox', 'label' => __('Enable Compare', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_enable_compare'));
     }
     if (current_theme_supports('realia-favorites')) {
         // Enable favorites
         $wp_customize->add_setting('realia_general_enable_favorites', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
         $wp_customize->add_control('realia_general_enable_favorites', array('type' => 'checkbox', 'label' => __('Enable Favorites', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_enable_favorites'));
     }
     // Hide unassigned amenities
     $wp_customize->add_setting('realia_general_hide_unassigned_amenities', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_general_hide_unassigned_amenities', array('type' => 'checkbox', 'label' => __('Hide Unassigned Amenities', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_hide_unassigned_amenities'));
     // Show property archive as grid
     $wp_customize->add_setting('realia_general_show_property_archive_as_grid', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_general_show_property_archive_as_grid', array('type' => 'checkbox', 'label' => __('Show property archive as grid', 'realia'), 'section' => 'realia_general', 'settings' => 'realia_general_show_property_archive_as_grid'));
 }
 /**
  * Customizations
  *
  * @access public
  * @param object $wp_customize
  * @return void
  */
 public static function customizations($wp_customize)
 {
     $pages = Realia_Pages::get_pages();
     $wp_customize->add_section('realia_submission', array('title' => __('Realia Submission', 'realia'), 'priority' => 1));
     // Type
     $wp_customize->add_setting('realia_submission_type', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_type', array('type' => 'select', 'label' => __('Type', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_type', 'choices' => array('free-for-all' => __('Free for all', 'realia'), 'pay-per-post' => __('Pay per post', 'realia'), 'packages' => __('Packages', 'realia'))));
     // Pay per post - post price
     $wp_customize->add_setting('realia_submission_pay_per_post_price', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_pay_per_post_price', array('label' => __('Pay per post - Post price', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_pay_per_post_price', 'description' => __('Enter price without any currency. As main currency will be used primary one (first defined).', 'realia')));
     // Enable paying for featured
     $wp_customize->add_setting('realia_submission_enable_featured', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_enable_featured', array('type' => 'checkbox', 'label' => __('Enable pay for featured', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_enable_featured'));
     // Featured price
     $wp_customize->add_setting('realia_submission_featured_price', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_featured_price', array('label' => __('Featured price', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_featured_price', 'description' => __('Enter price without any currency. As main currency will be used primary one (first defined).', 'realia')));
     // Enable paying for sticky
     $wp_customize->add_setting('realia_submission_enable_sticky', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_enable_sticky', array('type' => 'checkbox', 'label' => __('Enable pay for sticky', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_enable_sticky'));
     // Featured price
     $wp_customize->add_setting('realia_submission_sticky_price', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_sticky_price', array('label' => __('Sticky price', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_sticky_price', 'description' => __('Enter price without any currency. As main currency will be used primary one (first defined).', 'realia')));
     // Payment page
     $wp_customize->add_setting('realia_submission_payment_page', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_payment_page', array('type' => 'select', 'label' => __('Payment Page', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_payment_page', 'choices' => $pages));
     // List Page
     $wp_customize->add_setting('realia_submission_list_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_list_page', array('type' => 'select', 'label' => __('List Page', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_list_page', 'choices' => $pages));
     // Create Page
     $wp_customize->add_setting('realia_submission_create_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_create_page', array('type' => 'select', 'label' => __('Create Page', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_create_page', 'choices' => $pages));
     // Edit Page
     $wp_customize->add_setting('realia_submission_edit_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_edit_page', array('type' => 'select', 'label' => __('Edit Page', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_edit_page', 'choices' => $pages));
     // Remove Page
     $wp_customize->add_setting('realia_submission_remove_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_remove_page', array('type' => 'select', 'label' => __('Remove Page', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_remove_page', 'choices' => $pages));
     // Transactions Page
     $wp_customize->add_setting('realia_submission_transactions_page', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_transactions_page', array('type' => 'select', 'label' => __('Transactions Page', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_transactions_page', 'choices' => $pages));
     // Terms and Conditions Page
     $wp_customize->add_setting('realia_submission_terms', array('default' => null, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_terms', array('type' => 'select', 'label' => __('Terms & Conditions Page', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_terms', 'choices' => $pages));
     // Review before submission
     $wp_customize->add_setting('realia_submission_review_before', array('default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
     $wp_customize->add_control('realia_submission_review_before', array('type' => 'checkbox', 'label' => __('Review Before Submission', 'realia'), 'section' => 'realia_submission', 'settings' => 'realia_submission_review_before'));
 }