예제 #1
0
/**
 * Create widget areas array
 *
 * @since 1.0
 */
function wpsight_widget_areas()
{
    $wpsight_widget_areas = array('sidebar' => array('name' => __('General Sidebar', 'wpsight'), 'description' => __('This is the primary sidebar to display the same widgets on all pages.', 'wpsight'), 'id' => 'sidebar', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 10), 'sidebar-archive' => array('name' => __('Archive Sidebar', 'wpsight'), 'description' => __('This is the sidebar on category, tag, author, date and search pages. If empty, archives will be displayed without sidebar.', 'wpsight'), 'id' => 'sidebar-archive', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 20), 'sidebar-post' => array('name' => __('Post Sidebar', 'wpsight'), 'description' => __('This is the sidebar on single post pages. If empty, posts will be displayed without sidebar.', 'wpsight'), 'id' => 'sidebar-post', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 30), 'sidebar-page' => array('name' => __('Page Sidebar', 'wpsight'), 'description' => __('This is the sidebar on static pages. If empty, pages will be displayed without sidebar.', 'wpsight'), 'id' => 'sidebar-page', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 40), 'home-top' => array('name' => __('Home Page Top', 'wpsight'), 'description' => __('Top Content on the home page', 'wpsight'), 'id' => 'home-top', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 50), 'home' => array('name' => __('Home Page Content', 'wpsight'), 'description' => __('Main Content on the home page', 'wpsight'), 'id' => 'home', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 60), 'sidebar-home' => array('name' => __('Home Page Sidebar', 'wpsight'), 'description' => __('The sidebar on the home page', 'wpsight'), 'id' => 'sidebar-home', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 70), 'home-bottom' => array('name' => __('Home Page Bottom', 'wpsight'), 'description' => __('Bottom Content on the home page', 'wpsight'), 'id' => 'home-bottom', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 80), 'listing' => array('name' => __('Listing Single Content', 'wpsight'), 'description' => __('Main content on single listing pages', 'wpsight'), 'id' => 'listing', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="title">', 'after_title' => '</h3>', 'position' => 85), 'sidebar-listing' => array('name' => __('Listing Single Sidebar', 'wpsight'), 'description' => __('Sidebar on single listing pages', 'wpsight'), 'id' => 'sidebar-listing', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 86), 'sidebar-listing-archive' => array('name' => __('Listing Archive Sidebar', 'wpsight'), 'description' => __('Sidebar on listing archive pages', 'wpsight'), 'id' => 'sidebar-listing-archive', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 87), 'footer' => array('name' => __('Footer', 'wpsight'), 'description' => __('Footer widget area', 'wpsight'), 'id' => 'ffooter', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 90));
    $wpsight_widget_areas = apply_filters('wpsight_widget_areas', $wpsight_widget_areas);
    // Sort array by position
    $wpsight_widget_areas = wpsight_sort_array_by_position($wpsight_widget_areas);
    return $wpsight_widget_areas;
}
예제 #2
0
 function wpsight_search_form_details()
 {
     $standard_details = wpsight_standard_details();
     $search_details = array('status' => array('label' => __('Status', 'wpsight'), 'key' => '_price_status', 'data' => wpsight_listing_statuses(), 'type' => 'select', 'data_compare' => '=', 'data_type' => false, 'default' => false, 'advanced' => false, 'position' => 10), 'location' => array('label' => __('Location', 'wpsight'), 'taxonomy' => 'location', 'data' => array('dropdown' => true), 'type' => 'taxonomy', 'data_compare' => false, 'data_type' => false, 'default' => false, 'advanced' => false, 'position' => 20), 'listing-type' => array('label' => __('Type', 'wpsight'), 'taxonomy' => 'listing-type', 'data' => array('dropdown' => true), 'type' => 'taxonomy', 'data_compare' => false, 'data_type' => false, 'default' => false, 'advanced' => false, 'position' => 30), $standard_details['details_1']['id'] => array('label' => $standard_details['details_1']['label'], 'key' => '_details_1', 'type' => 'text', 'data_compare' => '=', 'data_type' => false, 'default' => false, 'advanced' => false, 'position' => 40), $standard_details['details_2']['id'] => array('label' => $standard_details['details_2']['label'], 'key' => '_details_2', 'type' => 'text', 'data_compare' => '=', 'data_type' => false, 'default' => false, 'advanced' => false, 'position' => 50), 'min' => array('label' => __('Price (min)', 'wpsight'), 'key' => '_price', 'type' => 'text', 'data_compare' => '>=', 'data_type' => 'numeric', 'default' => false, 'advanced' => true, 'position' => 60), 'max' => array('label' => __('Price (max)', 'wpsight'), 'key' => '_price', 'type' => 'text', 'data_compare' => '<=', 'data_type' => 'numeric', 'default' => false, 'advanced' => true, 'position' => 70), 'orderby' => array('label' => __('Order by', 'wpsight'), 'key' => false, 'data_compare' => false, 'data_type' => false, 'type' => 'radio', 'data' => array('date' => __('Date', 'wpsight'), 'price' => __('Price', 'wpsight'), 'title' => __('Title', 'wpsight')), 'default' => 'date', 'advanced' => true, 'position' => 80), 'order' => array('label' => __('Order', 'wpsight'), 'key' => false, 'data_compare' => false, 'data_type' => false, 'type' => 'radio', 'data' => array('asc' => __('asc', 'wpsight'), 'desc' => __('desc', 'wpsight')), 'default' => 'desc', 'advanced' => true, 'position' => 90));
     // Apply filter to array
     $search_details = apply_filters('wpsight_search_form_details', $search_details);
     // Sort array by position
     $search_details = wpsight_sort_array_by_position($search_details);
     // Return filtrable array
     return $search_details;
 }
예제 #3
0
function wpsight_wpcasa_widget_areas($areas)
{
    // Unset general widget areas
    unset($areas['listing']);
    unset($areas['sidebar-listing']);
    unset($areas['sidebar-listing-archive']);
    // Add property widget areas
    $wpcasa_widget_areas = array('property' => array('name' => __('Listing Single Content', 'wpsight'), 'description' => __('Main content on single listing pages', 'wpsight'), 'id' => 'property', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="title">', 'after_title' => '</h3>', 'position' => 85), 'sidebar-property' => array('name' => __('Listing Single Sidebar', 'wpsight'), 'description' => __('Sidebar on single listing pages', 'wpsight'), 'id' => 'sidebar-property', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 86), 'sidebar-property-archive' => array('name' => __('Listing Archive Sidebar', 'wpsight'), 'description' => __('Sidebar on listing archive pages', 'wpsight'), 'id' => 'sidebar-property-archive', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', 'position' => 87));
    // Merge arrays
    $wpcasa_widget_areas = array_merge($areas, $wpcasa_widget_areas);
    // Sort array by position
    $wpcasa_widget_areas = wpsight_sort_array_by_position($wpcasa_widget_areas);
    return apply_filters('wpsight_wpcasa_widget_areas', $wpcasa_widget_areas);
}
예제 #4
0
function wpsight_wpcasa_search_form_details($details)
{
    // Reset general listing type
    unset($details['listing-type']);
    // Add property type
    $details['property-type'] = array('label' => __('Type', 'wpsight'), 'taxonomy' => 'property-type', 'data' => array('dropdown' => true), 'type' => 'taxonomy', 'data_compare' => false, 'data_type' => false, 'default' => false, 'advanced' => false, 'position' => 30);
    // Get standard details
    $standard_details = wpsight_standard_details();
    // Set standard details IDs
    $standard_details_1 = $standard_details['details_1']['id'];
    $standard_details_2 = $standard_details['details_2']['id'];
    $details[$standard_details_1] = array('label' => $standard_details['details_1']['label'], 'data' => $standard_details['details_1']['data'], 'key' => '_details_1', 'type' => 'select', 'data_compare' => '>=', 'data_type' => 'numeric', 'default' => false, 'advanced' => false, 'position' => 40);
    $details[$standard_details_2] = array('label' => $standard_details['details_2']['label'], 'data' => $standard_details['details_2']['data'], 'key' => '_details_2', 'type' => 'select', 'data_compare' => '>=', 'data_type' => 'numeric', 'default' => false, 'advanced' => false, 'position' => 50);
    // Apply filter to array
    $details = apply_filters('wpsight_wpcasa_search_form_details', $details);
    // Sort array by position
    $details = wpsight_sort_array_by_position($details);
    // Return array
    return $details;
}
예제 #5
0
 function wpsight_contact_fields()
 {
     // Get labels
     $labels = wpsight_contact_labels();
     // Extract labels
     extract($labels, EXTR_SKIP);
     // Set contact fields
     $fields = array('fields_1' => array('id' => 'contact_name', 'label' => $name, 'label_email' => $name_email, 'required' => true, 'type' => 'text', 'placeholder' => true, 'before' => false, 'after' => false, 'value' => false, 'position' => 10), 'fields_2' => array('id' => 'contact_email', 'label' => $email, 'label_email' => $email_email, 'required' => 'email', 'type' => 'text', 'placeholder' => true, 'before' => false, 'after' => false, 'value' => false, 'position' => 20), 'fields_3' => array('id' => 'contact_phone', 'label' => $phone, 'label_email' => $phone_email, 'required' => false, 'type' => 'numbers', 'placeholder' => true, 'before' => false, 'after' => false, 'value' => false, 'position' => 30), 'fields_4' => array('id' => 'contact_message', 'label' => $message, 'label_email' => $message_email, 'required' => true, 'type' => 'textarea', 'placeholder' => true, 'before' => false, 'after' => false, 'value' => false, 'position' => 40), 'captcha' => array('show' => true, 'type' => 'string', 'placeholder' => false, 'case_sensitive' => false, 'code_length' => 4, 'image_width' => 150, 'image_height' => 60, 'perturbation' => 0.5, 'bg_color' => '#ffffff', 'text_color' => '#606060', 'num_lines' => 6, 'line_color' => '#6e6e6e', 'font' => './AHGBold.ttf', 'before' => false, 'after' => false, 'value' => false, 'position' => false), 'copy' => array('show' => true, 'placeholder' => false, 'position' => false));
     // Apply filter to array
     $fields = apply_filters('wpsight_contact_fields', $fields);
     // Sort array by position
     $fields = wpsight_sort_array_by_position($fields);
     // ensure that 'required' is always set.
     foreach ($fields as &$field) {
         if (!isset($field['required'])) {
             $field['required'] = false;
         }
     }
     // Return array
     return $fields;
 }
예제 #6
0
/**  
 *	Function to create subpages' filter options
 *
 *	@author anhbp
 */
function custom_subpages_filter_form_details()
{
    $standard_details = wpsight_standard_details();
    $search_details = array('status' => array('label' => __('Status', 'wpsight'), 'key' => '_price_status', 'data' => wpsight_listing_statuses(), 'type' => 'select', 'data_compare' => '=', 'data_type' => false, 'default' => false, 'advanced' => false, 'position' => 10), $standard_details['details_1']['id'] => array('label' => $standard_details['details_1']['label'], 'key' => '_details_1', 'type' => 'text', 'data_compare' => '=', 'data_type' => false, 'default' => false, 'advanced' => false, 'position' => 40), $standard_details['details_2']['id'] => array('label' => $standard_details['details_2']['label'], 'key' => '_details_2', 'type' => 'text', 'data_compare' => '=', 'data_type' => false, 'default' => false, 'advanced' => false, 'position' => 50), 'min' => array('label' => __('Price (min)', 'wpsight'), 'key' => '_price', 'type' => 'number', 'data_compare' => '>=', 'data_type' => 'numeric', 'default' => false, 'advanced' => false, 'position' => 55), 'max' => array('label' => __('Price (max)', 'wpsight'), 'key' => '_price', 'type' => 'number', 'data_compare' => '<=', 'data_type' => 'numeric', 'default' => false, 'advanced' => false, 'position' => 60), 'minsize' => array('label' => __('Min sqm', 'wpsight'), 'key' => '_details_3', 'type' => 'number', 'data_compare' => '>=', 'data_type' => 'numeric', 'default' => false, 'advanced' => false, 'position' => 70));
    // Apply filter to array
    $search_details = apply_filters('wpsight_search_form_details', $search_details);
    // Sort array by position
    $search_details = wpsight_sort_array_by_position($search_details);
    if (isset($search_details['property-type'])) {
        unset($search_details['property-type']);
    }
    // Return filtrable array
    return $search_details;
}
예제 #7
0
 function wpsight_listing_title_actions()
 {
     $actions = array('favorites' => array('label' => __('Save', 'wpsight'), 'name' => false, 'id' => false, 'class' => 'btn btn-mini actions-favorites action-link', 'href' => false, 'target' => false, 'icon' => 'icon-star', 'atts' => false, 'position' => 10, 'cb' => 'wpsight_listing_title_action_favorite'), 'print' => array('label' => __('Print', 'wpsight'), 'name' => false, 'id' => false, 'class' => 'btn btn-mini', 'href' => esc_url(add_query_arg(array('pid' => get_the_ID(), 'print' => '1'), get_permalink())), 'target' => false, 'icon' => 'icon-print', 'atts' => false, 'position' => 20, 'cb' => false));
     // Apply filter to array
     $actions = apply_filters('wpsight_listing_title_actions', $actions);
     // Sort array by position
     $actions = wpsight_sort_array_by_position($actions);
     // Return array
     return $actions;
 }