wpdreams / ajax-search-pro-development

Issues and dev tracking repository for Ajax Search Pro for WordPress plugin
0 stars 0 forks source link

Secondary custom field ordering - wrong option value #115

Closed ernestmarcinko closed 4 months ago

ernestmarcinko commented 4 months ago

Describe the bug

The secondary custom field oldering uses the same option value as the primary, therefore it has no effect when used in combination with primary custom field oldering.

In backend/tabs/instance/general/ordering.php the lines:

        $o = new wpdreamsCustomSelect("orderby", __('Secondary ordering', 'ajax-search-pro'),
            array(
                'selects' => array_merge($common_orders, array(
                    array('option' => __('Custom Field descending', 'ajax-search-pro'), 'value' => 'customfp DESC'),
                    array('option' => __('Custom Field  ascending', 'ajax-search-pro'), 'value' => 'customfp ASC')
                )),
                'value' => $sd['orderby']
            ));

where the options should be:

    array('option' => __('Custom Field descending', 'ajax-search-pro'), 'value' => 'customfs DESC'),
    array('option' => __('Custom Field  ascending', 'ajax-search-pro'), 'value' => 'customfs ASC')