Commit inicial - WordPress Análisis de Precios Unitarios

- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,113 @@
<fieldset>
<legend><?php _e('Global loading options', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("js_source", __('Javascript source', 'ajax-search-pro'), array(
'selects' => wd_asp()->o['asp_compatibility_def']['js_source_def'],
'value' => $com_options['js_source']
)
);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php _e('<strong>Legacy</strong> scripts use <strong>jQuery</strong> and will be removed on the first 2022 release.', 'ajax-search-pro'); ?>
<?php echo sprintf( __('<a target="_blank" href="%s">Read More</a>'),
'https://documentation.ajaxsearchpro.com/compatibility-settings/javascript-compatibility' ); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("script_loading_method", __('Script loading method', 'ajax-search-pro'), array(
'selects'=>array(
array('option'=>__('Classic', 'ajax-search-pro'), 'value'=>'classic'),
array('option'=>__('Optimized (recommended)', 'ajax-search-pro'), 'value'=>'optimized'),
array('option'=>__('Optimized asynchronous', 'ajax-search-pro'), 'value'=>'optimized_async')
),
'value'=>$com_options['script_loading_method']
)
);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<ul style="float:right;text-align:left;width:70%;">
<li><?php echo __('<b>Classic</b> - All scripts are loaded as blocking at the same time', 'ajax-search-pro'); ?></li>
<li><?php echo __('<b>Optimized</b> - Scripts are loaded separately, but only the required ones', 'ajax-search-pro'); ?></li>
<li><?php echo __('<b>Optimized asnynchronous</b> - Same as the Optimized, but the scripts load in the background', 'ajax-search-pro'); ?></li>
</ul>
<div class="clear"></div>
</p>
</div>
<div class="item">
<?php $o = new wpdreamsYesNo("init_instances_inviewport_only", __('Initialize search instances only when they get visible on the viewport?', 'ajax-search-pro'),
$com_options['init_instances_inviewport_only']
); ?>
<p class='descMsg'>
<?php echo __('Lazy loader for the search initializer script. It can reduce the initial javascript thread work and increase the google lighthouse score.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("css_loading_method", __('Style (CSS) loading method', 'ajax-search-pro'), array(
'selects'=>array(
array('option'=>__('Optimized (recommended)', 'ajax-search-pro'), 'value'=>'optimized'),
array('option'=>__('Inline', 'ajax-search-pro'), 'value'=>'inline'),
array('option'=>__('File', 'ajax-search-pro'), 'value'=>'file')
),
'value'=>$com_options['css_loading_method']
)
);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<ul style="float:right;text-align:left;width:70%;">
<li><?php echo __('<b>Optimized</b> - The basic CSS file is enqueued on-demand, then the customized styles are printed inline on-demand', 'ajax-search-pro'); ?></li>
<li><?php echo __('<b>Inline</b> - Everything is printed inline on-demand', 'ajax-search-pro'); ?></li>
<li><?php echo __('<b>File (classic)</b> - Everything is enqueued as a single CSS file', 'ajax-search-pro'); ?></li>
</ul>
<div class="clear"></div>
</p>
</div>
</fieldset>
<fieldset>
<legend><?php _e('Selective loading options', 'ajax-search-pro'); ?></legend>
<div class="errorMsg">
<p><strong><?php echo __('THESE OPTIONS ARE NOT RECOMMENDED - use it only if you know what you are doing!', 'ajax-search-pro'); ?></strong></p>
<p><?php echo __('The plugin <strong>automatically detects</strong> which pages have the search shortcodes, and loads the assets only on those pages.', 'ajax-search-pro'); ?></p>
</div>
<div class="item">
<?php $o = new wpdreamsYesNo("selective_enabled", __('Enable selective script & style loading?', 'ajax-search-pro'),
$com_options['selective_enabled']
); ?>
<p class='descMsg'><?php echo __('It enables the rules below, so the scritps and styles can be excluded from specific parts of your website.', 'ajax-search-pro'); ?></p>
</div>
<div class="item item_selective_load">
<?php $o = new wpdreamsYesNo("selective_front", __('Load scripts & styles on the front page?', 'ajax-search-pro'),
$com_options['selective_front']
); ?>
</div>
<div class="item item_selective_load">
<?php $o = new wpdreamsYesNo("selective_archive", __('Load scripts & styles on archive pages?', 'ajax-search-pro'),
$com_options['selective_front']
); ?>
</div>
<div class="item item_selective_load item-flex-nogrow item-flex-wrap">
<div style="margin: 0;">
<?php
$o = new wpdreamsCustomSelect("selective_exin_logic", "",
array(
'selects' => array(
array('option' => __('Exclude on pages', 'ajax-search-pro'), 'value' => 'exclude'),
array('option' => __('Include on pages', 'ajax-search-pro'), 'value' => 'include')
),
'value' => $com_options['selective_exin_logic']
));
?>
</div>
<?php
$o = new wd_TextareaExpandable("selective_exin", " ids ", $com_options['selective_exin']);
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('Comma separated list of Post/Page/CPT IDs.', 'ajax-search-pro'); ?>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,62 @@
<div class="item">
<?php $o = new wpdreamsYesNo("js_prevent_body_scroll", __('Try preventing body touch scroll on mobile devices, when using the vertical results layout?', 'ajax-search-pro'),
$com_options['js_prevent_body_scroll']
); ?>
<p class='descMsg'>
<?php echo __('When reaching the top or bottom of the results list via touch devices, the scrolling is automatically propagated to the parent element. This function will try to prevent that.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php $o = new wpdreamsYesNo("detect_ajax", __('Try to re-initialize if the page was loaded via ajax?', 'ajax-search-pro'),
$com_options['detect_ajax']
); ?>
<p class='descMsg'>
<?php echo __('Will try to re-initialize the plugin in case an AJAX page loader is used, like Polylang language switcher etc..', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("css_compatibility_level", __('CSS compatibility level', 'ajax-search-pro'), array(
'selects'=>array(
array('option'=>'Optimal (recommended)', 'value'=>'low'),
array('option'=>'Medium', 'value'=>'medium'),
array('option'=>'Maximum', 'value'=>'maximum')
),
'value'=>$com_options['css_compatibility_level']
)
);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<ul style="float:right;text-align:left;width:50%;">
<li><?php echo __('<b>Optimal</b> - Good compabibility, smallest size', 'ajax-search-pro'); ?></li>
<li><?php echo __('<b>Medium</b> - Better compatibility, bigger size', 'ajax-search-pro'); ?></li>
<li><?php echo __('<b>Maximum</b> - High compatibility, very big size', 'ajax-search-pro'); ?></li>
</ul>
<div class="clear"></div>
</p>
</div>
<div class="item">
<?php $o = new wpdreamsYesNo("css_minify", __('Minify the generated CSS?', 'ajax-search-pro'),
$com_options['css_minify']
); ?>
<p class='descMsg'>
<?php echo __('When enabled, the generated stylesheet files will be minified before saving. Can save ~10% CSS file size.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php $o = new wpdreamsYesNo("load_google_fonts", __('Load the <strong>google fonts</strong> used in the search options?', 'ajax-search-pro'),
$com_options['load_google_fonts']
); ?>
<p class='descMsg'>
<?php echo __('When <strong>turned off</strong>, the google fonts <strong>will not be loaded</strong> via this plugin at all.<br>Useful if you already have them loaded, to avoid mutliple loading times.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<p class='infoMsg'>
<?php echo __('This might speed up the search, but also can cause incompatibility issues with other plugins.', 'ajax-search-pro'); ?>
</p>
<?php $o = new wpdreamsYesNo("usecustomajaxhandler", __('Use the custom ajax handler?', 'ajax-search-pro'),
$com_options['usecustomajaxhandler']
); ?>
</div>

View File

@@ -0,0 +1,20 @@
<div class="item">
<?php $o = new wpdreamsYesNo("rest_api_enabled", __('Enable the REST API?', 'ajax-search-pro'),
$com_options['rest_api_enabled']
); ?>
<p class='descMsg'>
<?php echo sprintf( __('You can download the <a target="_blank" href="%s">OpenAPI Swagger file here</a>.'),
ASP_URL . 'swagger.yaml' ); ?>
<?php echo sprintf( __('Check the <a target="_blank" href="%s">REST API</a> section of the knowledge base for more info.'),
'https://knowledgebase.ajaxsearchpro.com/other/rest-api' ); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomPostTypesAll("meta_box_post_types", __('Display the Ajax Search Pro Meta Boxes on these post types', 'ajax-search-pro'),
$com_options['meta_box_post_types']);
?>
<p class='descMsg'>
<?php echo __('Displays the Negative keywords & Additional keywords Meta Boxes and the Classic Editor buttons on the selected post types only.'); ?>
</p>
</div>

View File

@@ -0,0 +1,51 @@
<div class="item">
<?php $o = new wpdreamsYesNo("query_soft_check",
__('Do a soft-check only on search override, when trying to check if the current query is the search?', 'ajax-search-pro'),
$com_options['query_soft_check']
); ?>
<p class='descMsg'>
<?php echo __('Use this option, when the search override does not work on the search results page.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php $o = new wpdreamsYesNo("use_acf_getfield",
__('<strong>Advanced Custom Fields</strong>: use the ACF get_field() function to get the metadata?', 'ajax-search-pro'),
$com_options['use_acf_getfield']
); ?>
<p class='descMsg'>
<?php echo __('Will use the get_field() Advanced Custom Fields function instead of the core get_post_meta()', 'ajax-search-pro'); ?>
</p>
</div>
<p class='infoMsg'>
<?php echo __('If you are experiencing issues with accent(diacritic) or case sensitiveness, you can force the search to try these tweaks.', 'ajax-search-pro'); ?><br>
<?php echo __('<i>The search works according to your database collation settings</i>, so please be aware that <b>this is not an effective way</b> of fixing database collation issues.', 'ajax-search-pro'); ?><br>
<?php echo sprintf( __('If you have case/diacritic issues then please read the <a href="%s" target="_blank">MySql manual on collations</a> or consult a <b>database expert</b> - those issues should be treated on database level!', 'ajax-search-pro'),
'http://dev.mysql.com/doc/refman/5.0/en/charset-syntax.html'
); ?>
</p>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("db_force_case", __('Force case', 'ajax-search-pro'), array(
'selects' => wd_asp()->o['asp_compatibility_def']['db_force_case_selects'],
'value' => $com_options['db_force_case']
)
);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php $o = new wpdreamsYesNo("db_force_unicode", __('Force unicode search', 'ajax-search-pro'),
$com_options['db_force_unicode']
); ?>
<p class='descMsg'>
<?php echo __('Will try to force unicode character conversion on the search phrase.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php $o = new wpdreamsYesNo("db_force_utf8_like", __('Force utf8 on LIKE operations', 'ajax-search-pro'),
$com_options['db_force_utf8_like']
); ?>
<p class='descMsg'>
<?php echo __('Will try to force utf8 conversion on all LIKE operations in the WHERE and HAVING clauses.', 'ajax-search-pro'); ?>
</p>
</div>

View File

@@ -0,0 +1,152 @@
<?php
/* Prevent direct access */
use WPDRMS\ASP\Synonyms as Synonyms;
defined('ABSPATH') or die("You can't access this file directly.");
$syn = Synonyms\Manager::getInstance();
$langs = wpd_get_languages_array();
?>
<p class="infoMsg">
<?php echo __('After adding all the synonyms you needed, make sure to re-create the index by clicking the <strong>Create new index</strong> button above.', 'ajax-search-pro'); ?>
<?php echo sprintf(
__('For more information check the <a href="%s" target="_blank">Synonyms Documentation</a>.', 'ajax-search-pro'),
'https://documentation.ajaxsearchpro.com/index-table/synonyms'
); ?>
</p>
<div class="wpd-synonyms-list">
<div class="wpd-synonyms-row wpd-synonyms-row-noflex wpd-sr-search">
<div class="wpd-sr-search-left">
<label for="wpd-syn-search-lang">
<?php echo __('Language:', 'ajax-search-pro'); ?>
<select id="wpd-syn-search-lang" name="wpd-syn-search-lang">
<option value="any"><?php echo __('Any', 'ajax-search-pro'); ?></option>
<?php foreach($langs as $lcode => $lang): ?>
<option value="<?php echo $lcode; ?>"><?php echo $lang; ?></option>
<?php endforeach; ?>
</select>
</label>
<input type="text" name="wpd-search-synonyms" id="wpd-search-synonyms" value="" placeholder="<?php echo __('Search synonims here..', 'ajax-search-pro'); ?>">
<?php _e('or', 'ajax-search-pro'); ?> <input type="button" id="asp_syn_add" class="asp_syn_add submit wd_button_blue" value="<?php echo __('+Add new', 'ajax-search-pro'); ?>"/>
</div>
<div class="wpd-sr-search-right">
<input type="button" id="asp-syn-import" class="asp_syn_add submit wd_button_syn" value="<?php echo __('Import', 'ajax-search-pro'); ?>"/>
<input type="button" id="asp-syn-export" class="asp_syn_add submit wd_button_syn" value="<?php echo __('Export', 'ajax-search-pro'); ?>"/>
<input type="button" id="asp-syn-remove-all" class="asp_syn_remove_all submit wd_button_syn" value="<?php echo __('Delete All', 'ajax-search-pro'); ?>"/>
<input type="hidden" id="asp_synonyms_request_nonce" value="<?php echo wp_create_nonce( 'asp_synonyms_request_nonce' ); ?>">
</div>
</div>
<div class="wpd-synonyms-row wpd-synonyms-row-head">
<div class="wpd-synonyms-col"><?php echo __('Keyword', 'ajax-search-pro'); ?></div>
<div class="wpd-synonyms-col"><?php echo __('Synonyms', 'ajax-search-pro'); ?></div>
<div class="wpd-synonyms-col"></div>
</div>
<div id="wpd-synonyms-editor" class="wpd-synonyms-row wpd-synonyms-editor hiddend" data-update="0">
<div class="wpd-synonyms-col">
<input type="text" id="wpd-synonym-input" name="wpd-synonym-input" value="" placeholder="Enter original..">
<label for="wpd-synonym-lang">
<?php echo __('Language:', 'ajax-search-pro'); ?>
<select id="wpd-synonym-lang" name="wpd-synonym-lang">
<option value=""><?php echo __('Default', 'ajax-search-pro'); ?></option>
<?php foreach($langs as $lcode => $lang): ?>
<option value="<?php echo $lcode; ?>"><?php echo $lang; ?></option>
<?php endforeach; ?>
</select>
</label>
</div>
<div class="wpd-synonyms-col">
<div data-name="wpd-tag" id="wpd-tag"></div>
</div>
<div class="wpd-synonyms-col">
<input type="button" id='syn-editor-save' class="submit wd_button_blue" value="Save"/>
<input type="button" id='syn-editor-cancel' class="submit" value="Cancel"/>
</div>
<div class="wpd-synonyms-err hiddend">
<p class="errorMsg"></p>
</div>
<div class="wpd-syn-overlay"></div>
</div>
<div class="wpd-syn-results" id="wpd-syn-results">
<?php foreach ( $syn->find('', 'any') as $k => $syn_data ): ?>
<div class="wpd-synonyms-row" data-id="<?php echo $syn_data['id']; ?>" data-lang="<?php echo $syn_data['lang']; ?>" data-keyword="<?php echo $syn_data['keyword']; ?>">
<div class="wpd-synonyms-col syn-kw-col">
<?php echo $syn_data['keyword']; ?>
<span>[language: <?php echo $syn_data['lang'] == '' ? 'default' : $syn_data['lang']; ?>]</span>
</div>
<div class="wpd-synonyms-col syn-syn-col"><?php echo str_replace(',', ', ', $syn_data['synonyms']); ?></div>
<div class="wpd-synonyms-col">
<input type="button" class="syn-edit-row submit wd_button_green" value="<?php echo __('Edit', 'ajax-search-pro'); ?>"/>
<input type="button" class="syn-delete-row submit" value="<?php echo __('Delete', 'ajax-search-pro'); ?>"/>
</div>
<div class="wpd-synonyms-err hiddend">
<p class="errorMsg"></p>
</div>
<div class="wpd-syn-overlay"></div>
</div>
<?php endforeach; ?>
<div class="wpd-synonyms-nores hiddend">
<p class="errorMsg"><?php echo __('No results!', 'ajax-search-pro'); ?></p>
</div>
<div class="wpd-syn-overlay"></div>
</div>
<div id='wpd-synonyms-row-sample' class="wpd-synonyms-row hiddend" data-id="" data-lang="" data-keyword="">
<div class="wpd-synonyms-col syn-kw-col"></div>
<div class="wpd-synonyms-col syn-syn-col"></div>
<div class="wpd-synonyms-col">
<input type="button" class="syn-edit-row submit wd_button_green" value="<?php echo __('Edit', 'ajax-search-pro'); ?>"/>
<input type="button" class="syn-delete-row submit" value="<?php echo __('Delete', 'ajax-search-pro'); ?>"/>
</div>
<div class="wpd-synonyms-err hiddend">
<p class="errorMsg"></p>
</div>
<div class="wpd-syn-overlay"></div>
</div>
<div class="hiddend">
<div id="syn-export-modal">
<label for="syn-export-generate">
<?php echo __('Click the button to generate a new export file', 'ajax-search-pro'); ?>
<input id="syn-export-generate" type="button" class="wd_button wd_button_green" value="<?php echo __('Generate new', 'ajax-search-pro'); ?>"/>
</label>
<div id="syn-export-download" class="syn-export-download hiddend">
<a href="#" target="_blank" download="asp_synonyms_export.json"><?php echo __('Click here to download the latest export file', 'ajax-search-pro'); ?></a>
</div>
<div id="syn-export-error" class="syn-export-error hiddend">
<p class="errorMsg"></p>
<p class="infoMsg hiddend"></p>
</div>
<div class="wpd-syn-overlay"></div>
</div>
<div id="syn-import-modal">
<?php echo __('Enter the export file URL, or click the <strong>Upload</strong> button to upload one.<br>', 'ajax-search-pro'); ?>
<?php
new wpdreamsUpload("syn-import-upload", __('File URL', 'ajax-search-pro'), '');
?>
<label for="syn-import-upload">
<?php echo __('Click the button to initiate the import', 'ajax-search-pro'); ?>
<input id="syn-import-upload" type="button" class="wd_button wd_button_green" value="<?php echo __('Import!', 'ajax-search-pro'); ?>" disabled/>
</label>
<p class="descMsg">
(<?php echo __('duplicates are ignored during the import process', 'ajax-search-pro'); ?>)
</p>
<div id="syn-import-error" class="syn-import-error hiddend">
<p class="errorMsg hiddend"></p>
<p class="infoMsg hiddend"></p>
</div>
<div class="wpd-syn-overlay"></div>
</div>
</div>
</div>
<div class="item">
<?php $o = new wpdreamsYesNo("it_synonyms_as_keywords", __('Use synonyms as keywords as well?', 'ajax-search-pro'),
$it_options['it_synonyms_as_keywords']
); ?>
<p class="descMsg">
<?php echo __('By default, the plugin only looks for synonyms by the keywords defined. When enabled, the syonomys will be treated as keywords as well. It can drastically increase the keyword database size.', 'ajax-search-pro'); ?>
<?php echo sprintf(
__('For more information check the <a href="%s" target="_blank">Synonyms Documentation</a>.', 'ajax-search-pro'),
'https://documentation.ajaxsearchpro.com/index-table/synonyms'
); ?>
</p>
</div>

View File

@@ -0,0 +1,43 @@
<fieldset>
<legend><?php echo __('Aria Labels', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsText("aria_search_form_label",
__('Search form aria-label', 'ajax-search-pro'),
$sd['aria_search_form_label']
);
?>
</div>
<div class="item">
<?php
$o = new wpdreamsText("aria_settings_form_label",
__('Search Settings form aria-label', 'ajax-search-pro'),
$sd['aria_settings_form_label']
);
?>
</div>
<div class="item">
<?php
$o = new wpdreamsText("aria_search_input_label",
__('Search input aria-label', 'ajax-search-pro'),
$sd['aria_search_input_label']
);
?>
</div>
<div class="item">
<?php
$o = new wpdreamsText("aria_search_autocomplete_label",
__('Search autocomplete input aria-label', 'ajax-search-pro'),
$sd['aria_search_autocomplete_label']
);
?>
</div>
<div class="item">
<?php
$o = new wpdreamsText("aria_magnifier_label",
__('Search magnifier button aria-label', 'ajax-search-pro'),
$sd['aria_magnifier_label']
);
?>
</div>
</fieldset>

View File

@@ -0,0 +1,130 @@
<fieldset>
<legend><?php echo __('Advanced Visual Options', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsYesNo("visual_detect_visbility", __('Hide the search box if it gets invisible?', 'ajax-search-pro'), $sd['visual_detect_visbility']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('In case the search is placed into an interactive element, which hides on certain events, enable this option.
The plugin will try to detect it\'s visibility, and hide the settings and the results container if needed.', 'ajax-search-pro'); ?>
</p>
</div>
</fieldset>
<fieldset>
<legend><?php echo __('Other options', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsText("jquery_select2_nores", __('\'No matches\' text for searchable select and multiselect filters', 'ajax-search-pro'), $sd['jquery_select2_nores']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __("When using the 'searchable select' and 'searchable multiselect' fields in category, taxonomy, tag or custom field filters - this text is used
when no results match the searched value.", 'ajax-search-pro'); ?>
</p>
</div>
</fieldset>
<fieldset>
<legend><?php echo __('Desktop browsers', 'ajax-search-pro'); ?></legend>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("sett_box_animation", __('Settings drop-down box animation', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => 'None', 'value' => 'none'),
array('option' => 'Fade', 'value' => 'fade'),
array('option' => 'Fade and Drop', 'value' => 'fadedrop')
),
'value'=>$sd['sett_box_animation']) );
$params[$o->getName()] = $o->getData();
?>
<?php
$o = new wpdreamsTextSmall("sett_box_animation_duration", __('.. animation duration (ms)', 'ajax-search-pro'),
$sd['sett_box_animation_duration']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('The animation of the appearing settings box when clicking on the settings icon.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("res_box_animation", __('Results container box animation', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => 'None', 'value' => 'none'),
array('option' => 'Fade', 'value' => 'fade'),
array('option' => 'Fade and Drop', 'value' => 'fadedrop')
),
'value'=>$sd['res_box_animation']) );
$params[$o->getName()] = $o->getData();
?>
<?php
$o = new wpdreamsTextSmall("res_box_animation_duration", __('.. animation duration (ms)', 'ajax-search-pro'),
$sd['res_box_animation_duration']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('The animation of the appearing results box when finishing the search.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsAnimations("res_items_animation", __('Result items animation', 'ajax-search-pro'), $sd['res_items_animation']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('The animation of each result when the results box is opening.', 'ajax-search-pro'); ?>
</div>
</div>
</fieldset>
<fieldset>
<legend><?php echo __('Mobile browsers', 'ajax-search-pro'); ?></legend>
<div class="item item-flex-nogrow item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("sett_box_animation_m", __('Settings drop-down box animation', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => 'None', 'value' => 'none'),
array('option' => 'Fade', 'value' => 'fade'),
array('option' => 'Fade and Drop', 'value' => 'fadedrop')
),
'value'=>$sd['sett_box_animation_m']) );
$params[$o->getName()] = $o->getData();
?>
<?php
$o = new wpdreamsTextSmall("sett_box_animation_duration_m", __('.. animation duration (ms)', 'ajax-search-pro'),
$sd['sett_box_animation_duration_m']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('The animation of the appearing settings box when clicking on the settings icon.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item item-flex-nogrow item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("res_box_animation_m", __('Results container box animation', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => 'None', 'value' => 'none'),
array('option' => 'Fade', 'value' => 'fade'),
array('option' => 'Fade and Drop', 'value' => 'fadedrop')
),
'value'=>$sd['res_box_animation_m']) );
$params[$o->getName()] = $o->getData();
?>
<?php
$o = new wpdreamsTextSmall("res_box_animation_duration_m", __('.. animation duration (ms)', 'ajax-search-pro'),
$sd['res_box_animation_duration_m']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('The animation of the appearing results box when finishing the search.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsAnimations("res_items_animation_m", __('Result items animation', 'ajax-search-pro'), $sd['res_items_animation_m']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('The animation of each result when the results box is opening.', 'ajax-search-pro'); ?>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,264 @@
<style>
.asp-adv-fields .wd_textarea_expandable {
min-width: 85%;
max-height: 480px !important;
}
</style>
<fieldset>
<legend><?php echo __('Content & Language', 'ajax-search-pro'); ?></legend>
<div class="item<?php echo class_exists('SitePress') ? "" : " hiddend"; ?>">
<?php
$o = new wpdreamsYesNo("wpml_compatibility", __('WPML compatibility', 'ajax-search-pro'), $sd['wpml_compatibility']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('If turned <strong>ON</strong>: return results from current language. If turned <strong>OFF</strong>: return results from any language.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item<?php echo function_exists("pll_current_language") ? "" : " hiddend"; ?>">
<?php
$o = new wpdreamsYesNo("polylang_compatibility", __('Polylang compatibility', 'ajax-search-pro'), $sd['polylang_compatibility']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('If turned <strong>ON</strong>: return results from current language. If turned <strong>OFF</strong>: return results from any language.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("shortcode_op", __('What to do with shortcodes in results content?', 'ajax-search-pro'), array(
'selects'=>array(
array("option"=>__('Remove them, keep the content', 'ajax-search-pro'), "value" => "remove"),
array("option"=>__('Execute them (can by really slow)', 'ajax-search-pro'), "value" => "execute")
),
'value'=>$sd['shortcode_op']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Removing shortcode is usually <strong>much faster</strong>, especially if you have many of them within posts.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsText("striptagsexclude", __('HTML Tags exclude from stripping content', 'ajax-search-pro'), $sd['striptagsexclude']);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<fieldset class="asp-adv-fields">
<legend>
<?php echo __('Post Type Result Fields', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/advanced-options/advanced-title-and-description-fields"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("primary_titlefield", __('Primary Title Field for Posts/Pages/CPT', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Post Title', 'ajax-search-pro'), 'value' => 0),
array('option' => __('Post Excerpt', 'ajax-search-pro'), 'value' => 1),
array('option' => __('Custom Field', 'ajax-search-pro'), 'value' => 'c__f')
),
'value'=>$sd['primary_titlefield']
));
$params[$o->getName()] = $o->getData();
$o = new wd_CFSearchCallBack('primary_titlefield_cf', '', array(
'value'=>$sd['primary_titlefield_cf'],
'args'=> array(
'controls_position' => 'left',
'class'=>'wpd-text-right'
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("secondary_titlefield", __('Secondary Title Field for Posts/Pages/CPT', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Disabled', 'ajax-search-pro'), 'value' => -1),
array('option' => __('Post Title', 'ajax-search-pro'), 'value' => 0),
array('option' => __('Post Excerpt', 'ajax-search-pro'), 'value' => 1),
array('option' => __('Custom Field', 'ajax-search-pro'), 'value' => 'c__f')
),
'value'=>$sd['secondary_titlefield']
));
$params[$o->getName()] = $o->getData();
$o = new wd_CFSearchCallBack('secondary_titlefield_cf', '', array(
'value'=>$sd['secondary_titlefield_cf'],
'args'=> array(
'controls_position' => 'left',
'class'=>'wpd-text-right'
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("primary_descriptionfield", __('Primary Description Field for Posts/Pages/CPT', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Post Content', 'ajax-search-pro'), 'value' => 0),
array('option' => __('Post Excerpt', 'ajax-search-pro'), 'value' => 1),
array('option' => __('Post Title', 'ajax-search-pro'), 'value' => 2),
array('option' => __('Custom Field', 'ajax-search-pro'), 'value' => 'c__f')
),
'value'=>$sd['primary_descriptionfield']
));
$params[$o->getName()] = $o->getData();
$o = new wd_CFSearchCallBack('primary_descriptionfield_cf', '', array(
'value'=>$sd['primary_descriptionfield_cf'],
'args'=> array(
'controls_position' => 'left',
'class'=>'wpd-text-right'
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("secondary_descriptionfield", __('Secondary Description Field for Posts/Pages/CPT', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Disabled', 'ajax-search-pro'), 'value' => -1),
array('option' => __('Post Content', 'ajax-search-pro'), 'value' => 0),
array('option' => __('Post Excerpt', 'ajax-search-pro'), 'value' => 1),
array('option' => __('Post Title', 'ajax-search-pro'), 'value' => 2),
array('option' => __('Custom Field', 'ajax-search-pro'), 'value' => 'c__f')
),
'value'=>$sd['secondary_descriptionfield']
));
$params[$o->getName()] = $o->getData();
$o = new wd_CFSearchCallBack('secondary_descriptionfield_cf', '', array(
'value'=>$sd['secondary_descriptionfield_cf'],
'args'=> array(
'controls_position' => 'left',
'class'=>'wpd-text-right'
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<?php if ( version_compare(asp_wp_get_wp_version(), '6.0', '>=') ): ?>
<div id="wdo" class="wdo">
<div id="asp-search-post-advanced-fields"></div>
</div>
<?php else: ?>
<div class="item">
<?php
$o = new wd_TextareaExpandable("advtitlefield", __('Advanced Title Field (default: {titlefield})', 'ajax-search-pro'), $sd['advtitlefield']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('HTML is supported! Use {custom_field_name} format to have custom field values.', 'ajax-search-pro'); ?>&nbsp;
<a href="https://documentation.ajaxsearchpro.com/advanced-options/advanced-title-and-description-fields" target="_blank">
<?php echo __('More possibilities explained here!', 'ajax-search-pro'); ?>
</a>
</p>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("advdescriptionfield", __('Advanced Description Field (default: {descriptionfield})', 'ajax-search-pro'), $sd['advdescriptionfield']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('HTML is supported! Use {custom_field_name} format to have custom field values.', 'ajax-search-pro'); ?>&nbsp;
<a href="https://documentation.ajaxsearchpro.com/advanced-options/advanced-title-and-description-fields" target="_blank">
<?php echo __('More possibilities explained here!', 'ajax-search-pro'); ?>
</a>
</p>
</div>
<?php endif; ?>
</fieldset>
<fieldset class="asp-adv-fields">
<legend>
<?php echo __('User Result Fields & URL', 'ajax-search-pro'); ?>
</legend>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("user_search_title_field", __('Title field for <strong>User</strong> results', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Login Name', 'ajax-search-pro'), 'value' => 'login'),
array('option' => __('Display Name', 'ajax-search-pro'), 'value' => 'display_name')
),
'value' => $sd['user_search_title_field']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("user_search_description_field", __('Description field for <strong>User</strong> results', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Biography', 'ajax-search-pro'), 'value' => 'bio'),
array('option' => __('BuddyPress Last Activity', 'ajax-search-pro'), 'value' => 'buddypress_last_activity'),
array('option' => __('Nothing', 'ajax-search-pro'), 'value' => 'nothing')
),
'value' => $sd['user_search_description_field']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<?php if ( version_compare(asp_wp_get_wp_version(), '6.0', '>=') ): ?>
<div id="wdo" class="wdo">
<div id="asp-search-user-advanced-fields"></div>
</div>
<?php else: ?>
<div class="item">
<?php
$o = new wd_TextareaExpandable("user_search_advanced_title_field", __('Advanced title field for <strong>User</strong> results', 'ajax-search-pro'),
$sd['user_search_advanced_title_field']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Variable {titlefield} will be replaced with the Title field value. Use the format {meta_field} to get user meta.', 'ajax-search-pro'); ?><br>
<a href="https://documentation.ajaxsearchpro.com/advanced-options/advanced-title-and-description-fields/user-search-advanced-title-and-content-fields" target="_blank"><?php echo __('More possibilities explained here!', 'ajax-search-pro'); ?></a>
</p>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("user_search_advanced_description_field", __('Advanced description field for <strong>User</strong> results', 'ajax-search-pro'),
$sd['user_search_advanced_description_field']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Variable {descriptionfield} will be replaced with the Description field value. Use the format {meta_field} to get user meta.', 'ajax-search-pro'); ?><br>
<a href="https://documentation.ajaxsearchpro.com/advanced-options/advanced-title-and-description-fields/user-search-advanced-title-and-content-fields" target="_blank"><?php echo __('More possibilities explained here!', 'ajax-search-pro'); ?></a>
</p>
</div>
<?php endif; ?>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("user_search_url_source", __('<strong>User</strong> results url source', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Default', 'ajax-search-pro'), 'value' => 'default'),
array('option' => __('BuddyPress profile', 'ajax-search-pro'), 'value' => 'bp_profile'),
array('option' => __('Custom scheme', 'ajax-search-pro'), 'value' => 'custom')
),
'value' => $sd['user_search_url_source']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('This is the result URL destination. By default it\'s the author profile link.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsText("user_search_custom_url", __('Custom url scheme for <strong>User</strong> results', 'ajax-search-pro'),
$sd['user_search_custom_url']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('You can use these variables: {USER_ID}, {USER_LOGIN}, {USER_NICENAME}, {USER_DISPLAYNAME}, {USER_NICKNAME}', 'ajax-search-pro'); ?>
</p>
</div>
</fieldset>

View File

@@ -0,0 +1,98 @@
<div class="item" style="border-bottom: 0;">
<?php
$o = new wpdreamsYesNo("exclude_dates_on", __('Exclude Post/Page/CPT by date', 'ajax-search-pro'), $sd['exclude_dates_on']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_DateInterval("exclude_dates", 'posts', $sd['exclude_dates']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_UserSelect("exclude_content_by_users", __('Exclude or Include content by users', 'ajax-search-pro'), array(
"value"=>$sd['exclude_content_by_users'],
"args"=> array(
"show_type" => 1
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsSearchTags("exclude_post_tags", __('Exclude posts by tags', 'ajax-search-pro'), $sd['exclude_post_tags']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_TaxonomyTermSelect("exclude_by_terms", __("<span style='color: red; font-weight: bold'>Exclude</span> posts (or cpt, attachments, comments) by categories/taxonomy terms", 'ajax-search-pro'), array(
"value"=>$sd['exclude_by_terms'],
"args" => array(
"show_type" => 0,
"op_type" => "exclude",
"show_checkboxes" => 0,
"show_display_mode" => 0,
"show_more_options" => 0,
'show_taxonomy_all' => 0,
"built_in" => true,
"exclude_taxonomies" => array("post_tag", "nav_menu", "link_category")
)
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('An object is excluded if matches <strong>any</strong> of the selected items.', 'ajax-search-pro'); ?></p>
</div>
<div class="item">
<?php
$o = new wd_TaxonomyTermSelect("include_by_terms", __("<span style='color: red; font-weight: bold;'>Include</span> posts (or cpt, attachments, comments) only from selected categories/taxonomy terms", 'ajax-search-pro'), array(
"value"=>$sd['include_by_terms'],
"args" => array(
"show_type" => 0,
"op_type" => "include",
"show_checkboxes" => 0,
"show_display_mode" => 0,
"show_more_options" => 0,
'show_taxonomy_all' => 0,
"built_in" => true,
"exclude_taxonomies" => array("nav_menu", "link_category")
)
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('The exclusions from the above option <strong>still apply!</strong>', 'ajax-search-pro'); ?></p>
</div>
<div class="item">
<?php
$o = new wd_CPTSelect("exclude_cpt", __('Exclude posts/pages/cpt', 'ajax-search-pro'), array(
"value"=>$sd['exclude_cpt'],
"args"=> array(
"show_parent_checkbox" => 1
)
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('The "Exclude direct children too?" option only works with <strong>DIRECT</strong> parent-child relationships. (1 level down)', 'ajax-search-pro'); ?></p>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("excludeposts", __('Exclude Posts/Pages/CPT by ID\'s (comma separated post ID-s)', 'ajax-search-pro'), $sd['excludeposts']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('If you wish to exclude Posts, Pages and custom post types (like products etc..) by ID here. Comma separated list.', 'ajax-search-pro'); ?></p>
</div>
<div class="item">
<p class="errorMsg"><?php echo __('<strong>WARNING:</strong> This option restricts Posts/Pages/CPT to the selected items only, no other inclusions will apply! <br>Exclusions still apply.', 'ajax-search-pro'); ?></p>
<?php
$o = new wd_CPTSelect("include_cpt", __('Include only posts/pages/cpt', 'ajax-search-pro'), array(
"value"=>$sd['include_cpt'],
"args"=> array(
"show_parent_checkbox" => 0
)
));
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,126 @@
<div class="item">
<?php
$o = new wpdreamsCustomSelect("group_by", __('Group results by', 'ajax-search-pro'), array(
'selects'=> array(
array("value" => "none", "option" => __('No grouping', 'ajax-search-pro')),
array("value" => "post_type", "option" => __('Post Type', 'ajax-search-pro')),
array("value" => "categories_terms", "option" => __('Categories/Terms', 'ajax-search-pro')),
array("value" => "content_type", "option" => __('Content Type', 'ajax-search-pro'))
),
'value'=>$sd['group_by']) );
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('Only works with <b>Vertical</b> results layout.', 'ajax-search-pro'); ?></p>
</div>
<div class="item wd_groupby wd_groupby_categories_terms">
<?php
$o = new wd_TaxonomyTermSelect("groupby_terms", __('Category/Term grouping options', 'ajax-search-pro'), array(
"value" => $sd['groupby_terms'],
"args" => array(
"show_type" => 0,
"show_checkboxes" => 0
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item wd_groupby wd_groupby_content_type">
<?php
$o = new wd_Sortable_Editable("groupby_content_type", __('Content type grouping options', 'ajax-search-pro'), $sd['groupby_content_type']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item wd_groupby wd_groupby_post_type">
<?php
$o = new wd_CPT_Editable("groupby_cpt", __('Custom Post Type grouping options', 'ajax-search-pro'), $sd['groupby_cpt']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item wd_groupby_op">
<?php
$o = new wpdreamsYesNo("group_reorder_by_pr", __('Reorder groups by highest priority and relevance in results?', 'ajax-search-pro'), $sd['group_reorder_by_pr']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('The groups are reordered according to the highest priority and relevance of each result within each individual group.', 'ajax-search-pro'); ?></p>
</div>
<div class="item wd_groupby_op">
<?php
$o = new wpdreamsYesNo("group_order_results_page", __('Try to apply the same results order on the results page? (NOT RECOMMENDED)', 'ajax-search-pro'), $sd['group_order_results_page']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('The results order is different on the results page as grouping changes that. When this is enabled, the plugin will try to maintain the same order for both the live and results pages.', 'ajax-search-pro'); ?>
<?php echo __('Works best if the <a class="asp_to_tab" href="#614" tabid="111">post type limit</a> is set to the same number for both the live and results page.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item wd_groupby_op">
<?php
$o = new wpdreamsYesNo("group_make_header_clickable", __('Make group header clickable?', 'ajax-search-pro'), $sd['group_make_header_clickable']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('Makes the group header clickable links to the corresponding archive pages.', 'ajax-search-pro'); ?></p>
</div>
<div class="item wd_groupby_op">
<?php
$o = new wpdreamsText("group_header_prefix", __('Group header prefix text', 'ajax-search-pro'), $sd['group_header_prefix']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item wd_groupby_op">
<?php
$o = new wpdreamsText("group_header_suffix", __('Group header suffix text', 'ajax-search-pro'), $sd['group_header_suffix']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item wd_groupby_op">
<?php
$o = new wpdreamsCustomSelect("group_result_no_group", __('If result does not match any group?', 'ajax-search-pro'), array(
'selects'=> array(
array("value" => "remove", "option" => __('Remove it', 'ajax-search-pro')),
array("value" => "display", "option" => __('Display in Other results group', 'ajax-search-pro'))
),
'value'=>$sd['group_result_no_group']) );
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item wd_groupby_op item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsText("group_other_results_head", __('Other results group header text', 'ajax-search-pro'), $sd['group_other_results_head']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("group_other_location", ' ' . __('location' . ' ', 'ajax-search-pro'), array(
'selects'=> array(
array("value" => "top", "option" => __('Top of results', 'ajax-search-pro')),
array("value" => "bottom", "option" => __('Bottom of results', 'ajax-search-pro'))
),
'value'=>$sd['group_other_location']) );
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item wd_groupby_op">
<?php
$o = new wpdreamsYesNo("group_exclude_duplicates", __('Display duplicates only in the first group match?', 'ajax-search-pro'), $sd['group_exclude_duplicates']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('For example posts in multiple categories will be displayed in the first matching group only.', 'ajax-search-pro'); ?></p>
</div>
<div class="item wd_groupby_op item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("group_show_empty", __('Display empty groups with the \'No results!\' text?', 'ajax-search-pro'), $sd['group_show_empty']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("group_show_empty_position", __(' ..emtpy group location ', 'ajax-search-pro'), array(
'selects'=> array(
array("value" => "default", "option" => __('Leave the default', 'ajax-search-pro')),
array("value" => "bottom", "option" => __('Move to the bottom', 'ajax-search-pro')),
array("value" => "top", "option" => __('Move to the top', 'ajax-search-pro'))
),
'value'=>$sd['group_show_empty_position']) );
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item wd_groupby_op">
<?php
$o = new wpdreamsYesNo("group_result_count", __('Show results count in group headers', 'ajax-search-pro'), $sd['group_result_count']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,15 @@
<p class="infoMsg"><?php echo __('Keyword exceptions will be replaced with an empty string "" in the search phrase.', 'ajax-search-pro'); ?></p>
<div class="item">
<?php
$o = new wd_TextareaExpandable("kw_exceptions", __('Keyword exceptions - replace anywhere', 'ajax-search-pro'), $sd['kw_exceptions']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('<strong>Comma separated list</strong> of keywords you want to remove or ban. Matching anything, even partial words.', 'ajax-search-pro'); ?></p>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("kw_exceptions_e", __('Keyword exceptions - replace whole words only', 'ajax-search-pro'), $sd['kw_exceptions_e']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('<strong>Comma separated list</strong> of keywords you want to remove or ban. Only matching whole words between word boundaries.', 'ajax-search-pro'); ?></p>
</div>

View File

@@ -0,0 +1,62 @@
<ul id="subtabs" class='tabs'>
<li><a tabid="701" class='subtheme current'><?php echo __('Content & Fields', 'ajax-search-pro'); ?></a></li>
<li><a tabid="706" class='subtheme'><?php echo __('Exclude/Include Results', 'ajax-search-pro'); ?></a></li>
<li><a tabid="702" class='subtheme'><?php echo __('Grouping', 'ajax-search-pro'); ?></a></li>
<li><a tabid="703" class='subtheme'><?php echo __('Animations, Visual & Others', 'ajax-search-pro'); ?></a></li>
<li><a tabid="704" class='subtheme'><?php echo __('Keyword exceptions', 'ajax-search-pro'); ?></a></li>
<li><a tabid="705" class='subtheme'><?php echo __('Accessibility', 'ajax-search-pro'); ?></a></li>
</ul>
<div class='tabscontent'>
<div tabid="701">
<?php include(ASP_PATH."backend/tabs/instance/advanced/content.php"); ?>
</div>
<div tabid="706">
<fieldset>
<legend>
<?php echo __('Exclude/Include results', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/advanced-options/excluding-and-including-results"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<?php include(ASP_PATH."backend/tabs/instance/advanced/exclude_results.php"); ?>
</fieldset>
</div>
<div tabid="702">
<fieldset>
<legend>
<?php echo __('Grouping', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/advanced-options/grouping-results"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<?php include(ASP_PATH."backend/tabs/instance/advanced/grouping.php"); ?>
</fieldset>
</div>
<div tabid="703">
<fieldset>
<legend><?php echo __('Animations', 'ajax-search-pro'); ?></legend>
<?php include(ASP_PATH."backend/tabs/instance/advanced/animations.php"); ?>
</fieldset>
</div>
<div tabid="704">
<fieldset>
<legend><?php echo __('Keyword exceptions', 'ajax-search-pro'); ?></legend>
<?php include(ASP_PATH."backend/tabs/instance/advanced/kw_exceptions.php"); ?>
</fieldset>
</div>
<div tabid="705">
<fieldset>
<legend><?php echo __('Accessibility', 'ajax-search-pro'); ?></legend>
<?php include(ASP_PATH."backend/tabs/instance/advanced/accessibility.php"); ?>
</fieldset>
</div>
</div>
<div class="item">
<input name="reset_<?php echo $search['id']; ?>" class="asp_submit asp_submit_transparent asp_submit_reset" type="button" value="<?php echo esc_attr__('Restore defaults', 'ajax-search-pro'); ?>">
<input type="hidden" name='asp_submit' value=1 />
<input name="submit_<?php echo $search['id']; ?>" type="submit" value="<?php echo esc_attr__('Save this search!', 'ajax-search-pro'); ?>" />
</div>

View File

@@ -0,0 +1,67 @@
<?php
$sugg_select_arr = array(
'google' => __('Google keywords', 'ajax-search-pro'),
'google_places' => __('Google Places API', 'ajax-search-pro'),
'statistics' => __('Statistics database', 'ajax-search-pro'),
'tags' => __('Post tags', 'ajax-search-pro'),
'xtax_category' => __('Post categories', 'ajax-search-pro'),
'titles' => __('Post titles', 'ajax-search-pro')
);
$taxonomies_arr = get_taxonomies(array('public' => true, '_builtin' => false), 'names', 'and');
foreach($taxonomies_arr as $taxx) {
$sugg_select_arr['xtax_'.$taxx] = '[taxonomy] ' . $taxx;
}
?>
<ul id="subtabs" class='tabs'>
<li><a tabid="501" class='subtheme current'><?php echo __('Autocomplete', 'ajax-search-pro'); ?></a></li>
<li><a tabid="502" class='subtheme'><?php echo __('Predictive Results & Keyword suggestions', 'ajax-search-pro'); ?></a></li>
<li><a tabid="503" class='subtheme'><?php echo __('Suggested search keywords', 'ajax-search-pro'); ?></a></li>
</ul>
<div class='tabscontent'>
<div tabid="501">
<fieldset>
<legend>
<?php echo __('Autocomplete', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/autocomplete-and-keyword-suggestions/autocomplete"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<p class="infoMsg">
<?php echo __('Autocomplete feature will try to help the user finish what is being typed into the search box.', 'ajax-search-pro'); ?>
</p>
<?php include(ASP_PATH."backend/tabs/instance/suggest/autocomplete.php"); ?>
</fieldset>
</div>
<div tabid="502">
<fieldset>
<legend>
<?php echo __('Predictive Results & Keyword suggestions', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/autocomplete-and-keyword-suggestions/keyword-suggestions"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<?php include(ASP_PATH."backend/tabs/instance/suggest/keywords.php"); ?>
</fieldset>
</div>
<div tabid="503">
<fieldset>
<legend>
<?php echo __('Suggested search keywords', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/autocomplete-and-keyword-suggestions/try-these-suggested-phrases"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<?php include(ASP_PATH."backend/tabs/instance/suggest/suggestions.php"); ?>
</fieldset>
</div>
</div>
<div class="item">
<input name="reset_<?php echo $search['id']; ?>" class="asp_submit asp_submit_transparent asp_submit_reset" type="button" value="<?php echo esc_attr__('Restore defaults', 'ajax-search-pro'); ?>">
<input name="submit_<?php echo $search['id']; ?>" type="submit" value="<?php echo esc_attr__('Save all tabs!', 'ajax-search-pro'); ?>" />
</div>

View File

@@ -0,0 +1,109 @@
<fieldset>
<legend>Logic Options</legend>
<div class="item"><?php
$o = new wpdreamsCustomSelect("term_logic", __('Taxonomy terms checkbox/multiselect connection logic', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('At least one selected terms should match', 'ajax-search-pro'), 'value' => 'or'),
array('option' => __('All of the selected terms must match, exclude unselected (default)', 'ajax-search-pro'), 'value' => 'and'),
array('option' => __('All of the selected terms must match EXACTLY, but unselected ones are not excluded.', 'ajax-search-pro'), 'value' => 'andex')
),
'value' => $sd['term_logic']
));
$params[$o->getName()] = $o->getData();
?>
<div id='term_logic_MSG' class="errorMsg hiddend">
<?php echo __("<strong>WARNING:</strong> This is a very strict configuration - only results <strong>matching exactly ALL</strong>
of the selected terms will show up. If you don't get any results, it is probably because of this option.<br>
This logic works best, if you start with all checkboxes <strong>unchecked</strong>.", 'ajax-search-pro'); ?>
</div>
<p class="descMsg">
<?php echo __('This determines the rule how the individual checkbox/multiselect selections should be treated within each taxonomy group.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item"><?php
$o = new wpdreamsCustomSelect("taxonomy_logic", __('Logic between taxonomy groups', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => 'AND (default)', 'value' => 'and'),
array('option' => 'OR', 'value' => 'or')
),
'value' => $sd['taxonomy_logic']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('This determines the connection between each taxonomy term filter group.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("frontend_terms_empty", __('Show posts/CPM with empty (missing) taxonomy terms?', 'ajax-search-pro'), $sd['frontend_terms_empty']);
?>
<p class="descMsg">
<?php echo __('This decides what happens if the posts does not have any terms from the selected taxonomies. For example posts with no categories, when using a category filter.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("frontend_terms_parent_unselect_children", __('Uncheck child terms when the parent term is unchecked', 'ajax-search-pro'), $sd['frontend_terms_parent_unselect_children']);
?>
<p class="descMsg">
<?php echo __('When turned <strong>ON</strong> and using Checkbox filters, the child categories (terms) are automatically unchecked when the parent is unchecked.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("frontend_terms_hide_children", __('Hide child terms, where the parent checkbox is unchecked?', 'ajax-search-pro'), $sd['frontend_terms_hide_children']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Automatically hides the checkbox options, where the parent terms are unchecked.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("frontend_terms_ignore_empty", __('Ignore checkbox filters that have nothing selected?', 'ajax-search-pro'), $sd['frontend_terms_ignore_empty']);
?>
<p class="descMsg">
<?php echo __('When turned <strong>ON</strong> and nothing is checked within a checkbox filter - then the search will ignore it completely - instead of excluding everything unchecked.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item"><?php
$o = new wpdreamsCustomSelect("cf_logic", __('Custom Fields connection Logic', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => 'AND', 'value' => 'AND'),
array('option' => 'OR', 'value' => 'OR')
),
'value' => $sd['cf_logic']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("cf_allow_null", __('Allow results with missing custom fields, when using custom field selectors?', 'ajax-search-pro'), $sd['cf_allow_null']);
?>
<p class="descMsg">
<?php echo __('When using custom field selectors (filters), this option will allow displaying posts/pages/cpm where the given custom field is not defined.
<br>For example: You have a custom field filter on "location" custom field, but some posts does not have the "location" custom field defined. This option
will allow displaying them as results regardless.', 'ajax-search-pro'); ?>
</p>
</div>
</fieldset>
<div class="item">
<?php
$fields = $sd['field_order'];
if (strpos($fields, "general") === false) $fields = "general|" . $fields;
if (strpos($fields, "post_tags") === false) $fields .= "|post_tags";
if (strpos($fields, "date_filters") === false) $fields .= "|date_filters";
if (strpos($fields, "content_type_filters") === false) $fields .= "|content_type_filters";
if (strpos($fields, "search_button") === false) $fields .= "|search_button";
$o = new wpdreamsSortable("field_order", __('Field order', 'ajax-search-pro'),
$fields);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,36 @@
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/frontend-search-settings/content-type-filters"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
<div class="item">
<?php
$o = new wpdreamsText("content_type_filter_label", __('Content type filter label text', 'ajax-search-pro'), $sd['content_type_filter_label']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_DraggableFields("content_type_filter", __('Content Type filter', 'ajax-search-pro'), array(
"value"=>$sd['content_type_filter'],
"args" => array(
"show_checkboxes" => 1,
"show_display_mode" => 1,
"show_labels" => 1,
"show_required" => 1,
'fields' => array(
'any' => __('Choose One/Select all', 'ajax-search-pro'),
'cpt' => __('Custom post types', 'ajax-search-pro'),
'comments' => __('Comments', 'ajax-search-pro'),
'taxonomies' => __('Taxonomy terms', 'ajax-search-pro'),
'users' => __('Users', 'ajax-search-pro'),
'blogs' => __('Multisite blogs', 'ajax-search-pro'),
'buddypress' => __('BuddyPress content', 'ajax-search-pro'),
'attachments' => __('Attachments', 'ajax-search-pro')
),
'checked' => array()
)
));
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,830 @@
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/frontend-search-settings/custom-field-selectors"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
<?php
$cf_tooltip_msg = sprintf( __('One item per line. Use the <strong>{get_values}</strong> variable to get custom field values automatically.
For more info see the
<a target="_blank" href="%s">documentation</a>.', 'ajax-search-pro'), 'https://documentation.ajaxsearchpro.com/frontend-search-settings/custom-field-selectors' );
?>
<script>
jQuery(function($) {
var sortableCont = $("#csf_sortable");
var $deleteIcon = $("<a class='deleteIcon'></a>");
var $editIcon = $("<a class='editIcon'></a>");
var resetValues = {};
var $current = null;
//$('#asp_edit_field').fadeOut(0);
// Store defaults
$('#asp_new_field input, #asp_new_field select, #asp_new_field textarea').each(function(){
if ( $(this).is(':checkbox')) {
resetValues[$(this).attr('name')] = $(this).is(':checked');
} else {
resetValues[$(this).attr('name')] = $(this).val();
}
});
// Fields for checking
var fields = ['asp_f_title', 'asp_f_field'];
function checkEmpty(parent) {
var empty = false;
$(fields).each(function () {
if ($(parent + ' *[name="' + this.toString() + '"]').val() == '') {
$(parent + ' *[name="' + this.toString() + '"]').addClass('missing');
empty = true;
}
});
return empty;
}
$('#asp_new_field, #asp_edit_field').click(function(e){
if ($(e.target).attr('name') == 'add' || $(e.target).attr('name') == 'save') return;
$(fields).each(function () {
$('#asp_new_field *[name="' + this.toString() + '"]').removeClass('missing');
$('#asp_edit_field *[name="' + this.toString() + '"]').removeClass('missing');
});
});
function initDatePickers() {
if (typeof $('.asp_f_datepicker_value').datepicker != "undefined") {
$('.asp_f_datepicker_value').datepicker("destroy");
$('.asp_f_datepicker_value').each(function(){
$(this).datepicker({
dateFormat : $('.asp_f_datepicker_format', $(this).parent()).val(),
changeMonth: true,
changeYear: true
});
if ( $(this).val() == "" )
$('.asp_f_datepicker_value').datepicker( "setDate", "+0" );
});
} else {
$('.asp_f_datepicker_value').each(function(){
$(this).datepicker({
dateFormat : $('.asp_f_datepicker_format', $(this).parent()).val(),
changeMonth: true,
changeYear: true
});
});
}
$('.asp_f_datepicker_defval').each(function(){
if ( $(this).val() == "current" || $(this).val() == "none" )
$('.asp_f_datepicker_value', $(this).parent() ).attr("disabled", true);
else
$('.asp_f_datepicker_value', $(this).parent() ).removeAttr("disabled");
if ( $(this).val() == "relative" ) {
$('.asp_f_datepicker_from', $(this).parent() ).removeClass("hiddend");
$('.asp_f_datepicker_value', $(this).parent() ).addClass("hiddend");
} else {
$('.asp_f_datepicker_from', $(this).parent() ).addClass("hiddend");
$('.asp_f_datepicker_value', $(this).parent() ).removeClass("hiddend");
}
});
}
function resetNew() {
$('#asp_new_field input, #asp_new_field select, #asp_new_field textarea').each(function(){
if ( $(this).is(':checkbox')) {
$(this).prop('checked', resetValues[$(this).attr('name')]);
} else {
$(this).val(resetValues[$(this).attr('name')]);
}
});
$('#asp_new_field select[name="asp_f_type"]').trigger('change');
$('#asp_new_field select[name="asp_f_source"]').trigger('focusin');
$('#asp_new_field elect[name="asp_f_source"]').trigger('change');
initDatePickers();
}
function resetEdit() {
$('#asp_edit_field input, #asp_edit_field select, #asp_edit_field textarea').each(function(){
$(this).val(resetValues[$(this).attr('name')]);
if ( $(this).is(':checkbox')) {
$(this).prop('checked', resetValues[$(this).attr('name')]);
} else {
$(this).val(resetValues[$(this).attr('name')]);
}
});
$('#asp_edit_field select[name="asp_f_type"]').trigger('change');
$('#asp_edit_field select[name="asp_f_source"]').trigger('focusin');
$('#asp_edit_field select[name="asp_f_source"]').trigger('change');
initDatePickers();
}
/* Type change */
$('select[name="asp_f_type"]').on('change', function(){
var id = $(this).parent().parent()[0].id;
var val = $(this).val();
$('#' + id + ' .asp_f_type').addClass('hiddend');
$('#' + id + ' .asp_f_' + $(this).val()).removeClass('hiddend');
if (val == 'slider') {
$($('#' + id + ' .asp_f_operator optgroup')[1]).addClass('hiddend');
$('#' + id + ' .asp_f_operator select').val('eq');
} else {
$($('#' + id + ' .asp_f_operator optgroup')[1]).removeClass('hiddend');
}
if (val == 'checkboxes') {
$('#' + id + ' .asp_f_operator select').val('like');
}
if (val == 'range' || val == 'number_range' || val == 'datepicker') {
$('#' + id + ' .asp_f_operator').addClass('hiddend');
} else {
$('#' + id + ' .asp_f_operator').removeClass('hiddend');
}
if ( val == 'hidden' || val == 'slider' || val == 'range' ) {
$('#' + id + ' .asp_f_required').addClass('hiddend');
} else {
$('#' + id + ' .asp_f_required').removeClass('hiddend');
}
});
/* Reset it on page load */
$('select[name="asp_f_type"]').change();
// Source change
$('select[name="asp_f_source"]').on('focusin', function(){
$(this).data('val', $(this).val());
});
$('select[name="asp_f_source"]').on('change', function(){
var $parent = $(this).closest('.asp_ffield_container');
var o = JSON.parse(WD_Helpers.Base64.decode($("input.wd_args", $parent).val()));
var prev = $(this).data('val');
var current = $(this).val();
if ( $(this).val() == 'usermeta' ) {
o.usermeta = 1;
} else {
o.usermeta = 0;
}
$("input.wd_args", $parent).val( WD_Helpers.Base64.encode(JSON.stringify(o)) );
// Only trigger if really changes
if ( current != prev )
$("input.wd_cf_search", $parent).trigger('keyup');
});
$('select[name="asp_f_source"]').trigger('focusin');
$('select[name="asp_f_source"]').trigger('change');
/* Sortable */
sortableCont.sortable({
}, {
update: function (event, ui) {
var parent = $('#asp_new_field').parent();
var items = $('#csf_sortable li');
var hidden = $('input[name=custom_field_items]', parent);
var val = "";
items.each(function () {
val += "|" + $(this).attr('custom-data');
});
val = val.substring(1);
hidden.val(val);
}
}).disableSelection();
// Add the items to the sortable on initialisation
var fields_val = $('input[name=custom_field_items]').val();
if (typeof(fields_val) != 'undefined' && fields_val != '') {
var items = fields_val.split('|');
$.each(items, function(key, value){
vals = JSON.parse(WD_Helpers.Base64.decode(value));
var $li = $("<li class='ui-state-default'/>").html(vals.asp_f_title + "<a class='deleteIcon'></a><a class='editIcon'></a>");
$li.attr("custom-data", value);
sortableCont.append($li);
});
sortableCont.sortable("refresh");
sortableCont.sortable('option', 'update').call(sortableCont);
}
// Add new item
$('#asp_new_field button[name=add]').click(function(){
var data = {};
if (checkEmpty('#asp_new_field') == true) return;
$('#asp_new_field input, #asp_new_field select, #asp_new_field textarea').each(function(){
if ($(this).parent().hasClass('hiddend')) return;
if ($(this).attr('type') == 'checkbox') {
if ($(this).prop('checked') == true)
data[$(this).attr('name')] = 'asp_checked';
else
data[$(this).attr('name')] = 'asp_unchecked';
} else {
data[$(this).attr('name')] = $(this).val();
}
});
var $li = $("<li class='ui-state-default'/>")
.html(data.asp_f_title + "<a class='deleteIcon'></a><a class='editIcon'></a>");
$li.attr("custom-data", WD_Helpers.Base64.encode(JSON.stringify(data)));
sortableCont.append($li);
sortableCont.sortable("refresh");
sortableCont.sortable('option', 'update').call(sortableCont);
initDatePickers();
$('#asp_new_field').fadeOut(10);
resetNew();
$('#asp_new_field').fadeIn();
});
// Remove item
$('#csf_sortable').on('click', 'li a.deleteIcon', function(){
$(this).parent().remove();
sortableCont.sortable("refresh");
sortableCont.sortable('option', 'update').call(sortableCont);
$('#asp_edit_field button[name=back]').click();
initDatePickers();
});
// Edit item
$('#csf_sortable').on('click', 'li a.editIcon', function(e){
resetEdit();
$('#asp_new_field').fadeOut(0);
$('#asp_edit_field').fadeIn();
$current = $(e.target).parent();
var data = JSON.parse(WD_Helpers.Base64.decode($current.attr("custom-data")));
$('#asp_edit_title').text(data.asp_f_title);
$.each(data, function(key, val){
if (val == 'asp_checked') {
$('#asp_edit_field *[name=' + key + ']').prop('checked', true);
} else if (val == 'asp_unchecked') {
$('#asp_edit_field *[name=' + key + ']').prop('checked', false);
} else {
$('#asp_edit_field *[name=' + key + ']').val(val);
}
if (key == 'asp_f_type')
$('#asp_edit_field select[name=asp_f_type]').change();
});
$('#asp_edit_field input[name=asp_f_dropdown_search]').change();
$('#asp_edit_field select[name="asp_f_source"]').trigger('focusin');
$('#asp_edit_field select[name="asp_f_source"]').trigger('change');
$('#asp_edit_field input[name="asp_f_required"]').trigger('change');
initDatePickers();
});
// Back to new
$('#asp_edit_field button[name=back]').click(function(){
resetNew();
$('#asp_edit_field').fadeOut(0);
$('#asp_new_field').fadeIn();
});
// Save modifications
$('#asp_edit_field button[name=save]').click(function(){
if (checkEmpty('#asp_edit_field') == true) return;
var data = {};
$('#asp_edit_field input, #asp_edit_field select, #asp_edit_field textarea').each(function(){
if ($(this).parent().hasClass('hiddend')) return;
if ($(this).attr('type') == 'checkbox') {
if ($(this).prop('checked') == true)
data[$(this).attr('name')] = 'asp_checked';
else
data[$(this).attr('name')] = 'asp_unchecked';
} else {
data[$(this).attr('name')] = $(this).val();
}
});
$current.attr("custom-data", WD_Helpers.Base64.encode(JSON.stringify(data)));
sortableCont.sortable("refresh");
sortableCont.sortable('option', 'update').call(sortableCont);
$('#asp_edit_field button[name=back]').click();
});
// Reset Values
$('#asp_new_field button[name=reset]').click(function(){
resetNew();
});
initDatePickers();
$('.asp_f_datepicker_format').on("keyup", function(){
initDatePickers();
});
$('.asp_f_datepicker_defval').on("change", function(){
initDatePickers();
});
$('.asp_f_datepicker_store_format').on("change", function(){
$(".greenMsg", $(this).parent()).addClass("hiddend");
$(".greenMsg.msg_" + $(this).val(), $(this).parent()).removeClass("hiddend");
});
$('.asp_f_datepicker_store_format').change();
$('input[name=asp_f_dropdown_search]').change(function(){
if ( $(this).prop('checked') )
$('input[name=asp_f_dropdown_search_text]', $(this).parent()).removeAttr('disabled');
else
$('input[name=asp_f_dropdown_search_text]', $(this).parent()).attr('disabled', true);
});
$('input[name=asp_f_dropdown_search]').change();
$('input[name=asp_f_required]').change(function(){
if ( $(this).prop('checked') )
$(this).closest('fieldset').find('input[name=asp_f_invalid_input_text]').closest('label').removeClass('disabled');
else
$(this).closest('fieldset').find('input[name=asp_f_invalid_input_text]').closest('label').addClass('disabled');
});
$('input[name=asp_f_required]').change();
});
</script>
<style>
.asp_f_datepicker_from_days,
.asp_f_datepicker_from_months {
width: 34px !important;
margin: 0 1px !important;
}
.asp_f_datepicker_value {
margin-bottom: 10px !important;
}
.asp_f_datepicker_from {
display: inline;
padding: 5px 10px 50px 0px !important;
margin: 0 !important;
position: relative;
}
.asp_f_datepicker_from .descMsg {
position: absolute;
}
input[name=asp_f_dropdown_search_text] {
width: 126px !important;
}
.asp_ffield_container {
display: flex;
justify-content: flex-end;
}
.asp_ffield_container>.wd_cf_search {
margin: 0;
}
</style>
<div class="wpd-60-pc customContent">
<fieldset class="wpd-text-right" id="asp_new_field">
<legend><?php echo __('Add new item', 'ajax-search-pro'); ?></legend>
<div class='one-item'>
<label for='asp_f_title'><?php echo __('Title label', 'ajax-search-pro'); ?></label>
<input type='text' placeholder="<?php echo esc_attr__('Title here..', 'ajax-search-pro'); ?>" name='asp_f_title'/>
</div>
<div class='one-item'>
<label for='asp_f_show_title'><?php echo __('Show the label on the frontend?', 'ajax-search-pro'); ?></label>
<input type='checkbox' name='asp_f_show_title' value="yes" checked/>
</div>
<div class='one-item'>
<label for='asp_f_field'><?php echo __('Custom Field', 'ajax-search-pro'); ?></label>
<div class="asp_ffield_container">
<?php new wd_CFSearchCallBack('asp_f_field', '', array('value'=>'', 'args'=>array('controls_position' => 'left', 'class'=>'wpd-text-right'))); ?>
<select name="asp_f_source">
<option value="postmeta"><?php echo __('Post meta', 'ajax-search-pro'); ?></option>
<option value="usermeta"><?php echo __('User meta', 'ajax-search-pro'); ?></option>
</select>
</div>
</div>
<div class='one-item'>
<label for='asp_f_type'><?php echo __('Type', 'ajax-search-pro'); ?></label>
<select name='asp_f_type'/>
<option value="radio"><?php echo __('Radio', 'ajax-search-pro'); ?></option>
<option value="dropdown"><?php echo __('Dropdown', 'ajax-search-pro'); ?></option>
<option value="checkboxes"><?php echo __('Checkboxes', 'ajax-search-pro'); ?></option>
<option value="hidden"><?php echo __('Hidden', 'ajax-search-pro'); ?></option>
<option value="text"><?php echo __('Text', 'ajax-search-pro'); ?></option>
<option value="datepicker"><?php echo __('DatePicker', 'ajax-search-pro'); ?></option>
<option value="number_range"><?php echo __('Number Range', 'ajax-search-pro'); ?></option>
<option value="slider"><?php echo __('Slider', 'ajax-search-pro'); ?></option>
<option value="range"><?php echo __('Range Slider', 'ajax-search-pro'); ?></option>
</select>
</div>
<div class='one-item asp_f_radio asp_f_type'>
<label for='asp_f_radio_value'><?php echo __('Radio values', 'ajax-search-pro'); ?></label>
<textarea name='asp_f_radio_value'/>
||Any value**
sample_value1||Sample Label 1
sample_value2||Sample Label 2
sample_value3||Sample Label 3</textarea>
<p class="descMsg"><?php echo $cf_tooltip_msg; ?></p>
</div>
<div class='one-item asp_f_dropdown asp_f_type hiddend'>
<label for='asp_f_dropdown_multi'><?php echo __('Multiselect?', 'ajax-search-pro'); ?></label>
<input type='checkbox' name='asp_f_dropdown_multi' value="yes" /><br><br>
<label for='asp_f_dropdown_search'><?php echo __('Searchable?', 'ajax-search-pro'); ?></label>
<input type='checkbox' name='asp_f_dropdown_search' value="yes" />
<label for='asp_f_dropdown_search_text'><?php echo __('placeholder', 'ajax-search-pro'); ?></label>
<input type='text' name='asp_f_dropdown_search_text' value="Select options.." disabled/><br><br>
<label for='asp_f_dropdown_value'><?php echo __('Dropdown values', 'ajax-search-pro'); ?></label>
<textarea name='asp_f_dropdown_value'/>
||Any value**
sample_value1||Sample Label 1
sample_value2||Sample Label 2
sample_value3||Sample Label 3</textarea>
<p class="descMsg"><?php echo $cf_tooltip_msg; ?></p>
<label for='asp_f_dropdown_logic'><?php echo __('Drop-down values logic', 'ajax-search-pro'); ?></label>
<select name='asp_f_dropdown_logic'/>
<option value="OR">OR</option>
<option value="AND">AND</option>
<option value="ANDSE">AND in separate fields</option>
</select>
</div>
<div class='one-item asp_f_checkboxes asp_f_type hiddend'>
<label for='asp_f_checkboxes_value'><?php echo __('Checkbox values', 'ajax-search-pro'); ?></label>
<textarea name='asp_f_checkboxes_value'/>
||Select all**
sample_value1||Sample Label 1**
sample_value2||Sample Label 2
sample_value3||Sample Label 3**</textarea>
<p class="descMsg"><?php echo $cf_tooltip_msg; ?></p>
<br><br>
<label for='asp_f_checkboxes_logic'><?php echo __('Checkbox logic', 'ajax-search-pro'); ?></label>
<select name='asp_f_checkboxes_logic'/>
<option value="OR">OR</option>
<option value="AND">AND</option>
</select>
</div>
<div class='one-item asp_f_hidden asp_f_type'>
<label for='asp_f_hidden_value'><?php echo __('Hidden value', 'ajax-search-pro'); ?></label>
<textarea name='asp_f_hidden_value'/></textarea>
<p class="descMsg"><?php echo __('An invisible element. Used for filtering every time without user input.', 'ajax-search-pro'); ?></p>
</div>
<div class='one-item asp_f_text asp_f_type'>
<label for='asp_f_text_value'><?php echo __('Text input', 'ajax-search-pro'); ?></label>
<textarea name='asp_f_text_value'/></textarea>
<p class="descMsg"><?php echo __('A text input element.', 'ajax-search-pro'); ?></p>
</div>
<div class='one-item asp_f_datepicker asp_f_type'>
<label for='asp_f_datepicker_store_format'><?php echo __('Date storage format', 'ajax-search-pro'); ?></label>
<select class="asp_f_datepicker_store_format" name="asp_f_datepicker_store_format">
<option value="datetime"><?php echo __('MySQL DateTime/ACF datetime field', 'ajax-search-pro'); ?></option>
<option value="acf"><?php echo __('ACF date ', 'ajax-search-pro'); ?></option>
<option value="timestamp"><?php echo __('Timestamp', 'ajax-search-pro'); ?></option>
</select>
<p class="msg_acf"></p>
<p class="greenMsg msg_datetime">
<?php echo __('NOTICE: The MySql datetime format is <strong>Y-m-d H:i:s</strong>, for example: 2001-03-10 17:16:18', 'ajax-search-pro'); ?>
</p>
<p class="greenMsg msg_timestamp">
<?php echo __('NOTICE: The timestamp is a numeric format, for example <strong>1465111713</strong>. This translates to: 06/05/2016 @ 7:28am (UTC)', 'ajax-search-pro'); ?>
</p>
<div class="one-item-sub">
<label for='asp_f_datepicker_placeholder'>
<?php echo __('Placeholder text', 'ajax-search-pro'); ?>
</label><input style="width:120px;" name='asp_f_datepicker_placeholder' class="asp_f_datepicker_placeholder" value="Choose date"/>
</div>
<div class="one-item-sub">
<label for='asp_f_datepicker_format'>
<?php echo __('Display format', 'ajax-search-pro'); ?>
</label><input style="width:120px;" name='asp_f_datepicker_format' class="asp_f_datepicker_format" value="dd/mm/yy"/>
<p class="descMsg">
<?php echo sprintf( __('dd/mm/yy is the most used format, <a href="%s" target="_blank">list of accepted params</a>', 'ajax-search-pro'), 'http://api.jqueryui.com/datepicker/#utility-formatDate' ); ?>
</p>
</div>
<label for='asp_f_datepicker_value'><?php echo __('Default Value', 'ajax-search-pro'); ?></label><br>
<select class="asp_f_datepicker_defval" name="asp_f_datepicker_defval">
<option value="current"><?php echo __('Current date', 'ajax-search-pro'); ?></option>
<option value="none"><?php echo __('Empty (no date)', 'ajax-search-pro'); ?></option>
<option value="relative"><?php echo __('Relative date', 'ajax-search-pro'); ?></option>
<option value="selected"><?php echo __('Select date', 'ajax-search-pro'); ?></option>
</select>
<input class="asp_f_datepicker_value" name='asp_f_datepicker_value' value=""/>
<fieldset class="asp_f_datepicker_from hiddend">
<input class="asp_f_datepicker_from_days" name='asp_f_datepicker_from_days' value="0"/> days and
<input class="asp_f_datepicker_from_months" name='asp_f_datepicker_from_months' value="0"/> months from now.
<p class="descMsg"><?php echo __('Use <strong>negative values</strong> to indicate date before the current.', 'ajax-search-pro'); ?></p>
</fieldset>
<br>
<label for='asp_f_datepicker_operator'><?php echo __('Show results..', 'ajax-search-pro'); ?></label>
<select name='asp_f_datepicker_operator'/>
<option value="before"><?php echo __('..before the date (to date)', 'ajax-search-pro'); ?></option>
<option value="before_inc"><?php echo __('..before the date (to date) inclusive', 'ajax-search-pro'); ?></option>
<option value="after"><?php echo __('..after the date (from date)', 'ajax-search-pro'); ?></option>
<option value="after_inc"><?php echo __('..after the date (from date) inclusive', 'ajax-search-pro'); ?></option>
<option value="match"><?php echo __('..matching the date', 'ajax-search-pro'); ?></option>
<option value="nomatch"><?php echo __('..not matching the date', 'ajax-search-pro'); ?></option>
</select>
</div>
<div style='line-height: 33px;' class='one-item asp_f_number_range asp_f_type hiddend'>
<label for='asp_f_number_range_from'><?php echo __('Min/Max Range', 'ajax-search-pro'); ?></label>
<input class="ninedigit" type='number' value="" name='asp_f_number_range_from'/> - <input class="ninedigit" value="" type='number' name='asp_f_number_range_to'/><br />
<p class="descMsg"><?php echo __('Leave them empty to get the min/max range automatically.', 'ajax-search-pro'); ?></p>
<label for='asp_f_number_range_default1'><?php echo __('Input 1 default', 'ajax-search-pro'); ?></label>
<input class="ninedigit" type='number' value="" name='asp_f_number_range_default1'/>
<label for='asp_f_number_range_default2'><?php echo __('Input 2 default', 'ajax-search-pro'); ?></label>
<input class="ninedigit" type='number' value="" name='asp_f_number_range_default2'/>
<p class="descMsg"><?php echo __('When empty, the placeholder texts are displayed.', 'ajax-search-pro'); ?></p>
<label for='asp_f_number_range_placeholder1'><?php echo __('Placeholder Text #1', 'ajax-search-pro'); ?></label>
<input type='text' value="From" name='asp_f_number_range_placeholder1'/>
<label for='asp_f_number_range_placeholder2'><?php echo __('Placeholder Text #2', 'ajax-search-pro'); ?></label>
<input type='text' value="To" name='asp_f_number_range_placeholder2'/>
<label for='asp_f_number_range_t_separator'><?php echo __('Thousands separator', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value=" " name='asp_f_number_range_t_separator'/>
</div>
<div style='line-height: 33px;' class='one-item asp_f_slider asp_f_type hiddend'>
<label for='asp_f_slider_from'><?php echo __('Slider range', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="1" name='asp_f_slider_from'/> - <input class="threedigit" value="1000" type='text' name='asp_f_slider_to'/><br />
<p class="descMsg"><?php echo __('Leave them empty to get the values automatically.', 'ajax-search-pro'); ?></p>
<label for='asp_f_slider_step'><?php echo __('Step', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="1" name='asp_f_slider_step'/><br />
<label for='asp_f_slider_prefix'><?php echo __('Prefix', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="$" name='asp_f_slider_prefix'/>
<label for='asp_f_slider_suffix'><?php echo __('Suffix', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value=",-" name='asp_f_slider_suffix'/><br />
<label for='asp_f_slider_default'><?php echo __('Default Value', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="500" name='asp_f_slider_default'/><br />
<p class="descMsg"><?php echo __('Leave it empty to set the handle automatically.', 'ajax-search-pro'); ?></p>
<label for='asp_f_slider_t_separator'><?php echo __('Thousands separator', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value=" " name='asp_f_slider_t_separator'/>
<label for='asp_f_slider_decimals'><?php echo __('Decimal places', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="0" name='asp_f_slider_decimals'/>
</div>
<div style='line-height: 33px;' class='one-item asp_f_range asp_f_type hiddend'>
<label for='asp_f_range_from'><?php echo __('Slider range', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="1" name='asp_f_range_from'/> - <input class="threedigit" value="1000" type='text' name='asp_f_range_to'/><br />
<p class="descMsg"><?php echo __('Leave them empty to get the values automatically.', 'ajax-search-pro'); ?></p>
<label for='asp_f_slider_step'><?php echo __('Step', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="1" name='asp_f_range_step'/><br />
<label for='asp_f_slider_prefix'><?php echo __('Prefix', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="$" name='asp_f_range_prefix'/>
<label for='asp_f_slider_suffix'><?php echo __('Suffix', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value=",-" name='asp_f_range_suffix'/><br />
<label for='asp_f_range_default1'><?php echo __('Track 1 default', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="" name='asp_f_range_default1'/>
<label for='asp_f_range_default2'><?php echo __('Track 2 default', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="" name='asp_f_range_default2'/>
<p class="descMsg"><?php echo __('Leave them empty to set the handles automatically.', 'ajax-search-pro'); ?></p>
<label for='asp_f_range_t_separator'><?php echo __('Thousands separator', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value=" " name='asp_f_range_t_separator'/>
<label for='asp_f_range_decimals'><?php echo __('Decimal places', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="0" name='asp_f_range_decimals'/>
</div>
<div class='one-item asp_f_operator'>
<label for='asp_f_operator'><?php echo __('Operator', 'ajax-search-pro'); ?></label>
<select name='asp_f_operator'/>
<optgroup label="Numeric operators">
<option value="eq">EQUALS</option>
<option value="neq">NOT EQUALS</option>
<option value="lt">LESS THEN</option>
<option value="let">LESS OR EQUALS THEN</option>
<option value="gt">MORE THEN</option>
<option value="get">MORE OR EQUALS THEN</option>
</optgroup>
<optgroup label="String operators">
<option value="elike">EXACTLY LIKE</option>
<option value="like" selected="selected">LIKE</option>
<option value="not elike">NOT EXACTLY LIKE</option>
<option value="not like">NOT LIKE</option>
</optgroup>
</select>
<p class="descMsg"><?php echo __('Use the numeric operators for numeric values and string operators for text values', 'ajax-search-pro'); ?></p>
</div>
<div class='one-item asp_f_required'>
<label for='asp_f_required'><?php echo __('Required?', 'ajax-search-pro'); ?>
<input type="checkbox" name="asp_f_required">
</label>
<label for='asp_f_required'><?php echo __('..text: ', 'ajax-search-pro'); ?>
<input type='text' value="This field is required!" name='asp_f_invalid_input_text'/>
</label>
<p class="descMsg"><?php echo __('The plugin will not trigger search until the required field is set.', 'ajax-search-pro'); ?></p>
</div>
<div class='one-item'>
<button type='button' style='margin-right: 20px;' name='reset'><?php echo __('Reset', 'ajax-search-pro'); ?></button>
<button type='button' name='add'><?php echo __('Add!', 'ajax-search-pro'); ?></button>
</div>
</fieldset>
<fieldset class="wpd-text-right" style="display:none;" id="asp_edit_field">
<legend>Edit: <strong><span id="asp_edit_title"></span></strong></legend>
<div class='one-item'>
<label for='asp_f_title'><?php echo __('Title label', 'ajax-search-pro'); ?></label>
<input type='text' placeholder="<?php echo esc_attr__('Title here..', 'ajax-search-pro'); ?>" name='asp_f_title'/>
</div>
<div class='one-item'>
<label for='asp_f_show_title'><?php echo __('Show the label on the frontend?', 'ajax-search-pro'); ?></label>
<input type='checkbox' name='asp_f_show_title' value="yes" checked/>
</div>
<div class='one-item'>
<label for='asp_f_field'><?php echo __('Custom Field', 'ajax-search-pro'); ?></label>
<div class="asp_ffield_container">
<?php new wd_CFSearchCallBack('asp_f_field', '', array('value'=>'', 'args'=>array('controls_position' => 'left', 'class'=>'wpd-text-right'))); ?>
<select name="asp_f_source">
<option value="postmeta"><?php echo __('Post meta', 'ajax-search-pro'); ?></option>
<option value="usermeta"><?php echo __('User meta', 'ajax-search-pro'); ?></option>
</select>
</div>
</div>
<div class='one-item'>
<label for='asp_f_type'><?php echo __('Type', 'ajax-search-pro'); ?></label>
<select name='asp_f_type'/>
<option value="radio"><?php echo __('Radio', 'ajax-search-pro'); ?></option>
<option value="dropdown"><?php echo __('Dropdown', 'ajax-search-pro'); ?></option>
<option value="checkboxes"><?php echo __('Checkboxes', 'ajax-search-pro'); ?></option>
<option value="hidden"><?php echo __('Hidden', 'ajax-search-pro'); ?></option>
<option value="text"><?php echo __('Text', 'ajax-search-pro'); ?></option>
<option value="datepicker"><?php echo __('DatePicker', 'ajax-search-pro'); ?></option>
<option value="number_range"><?php echo __('Number Range', 'ajax-search-pro'); ?></option>
<option value="slider"><?php echo __('Slider', 'ajax-search-pro'); ?></option>
<option value="range"><?php echo __('Range Slider', 'ajax-search-pro'); ?></option>
</select>
</div>
<div class='one-item asp_f_radio asp_f_type'>
<label for='asp_f_radio_value'><?php echo __('Radio values', 'ajax-search-pro'); ?></label>
<textarea name='asp_f_radio_value'/></textarea>
<p class="descMsg"><?php echo $cf_tooltip_msg; ?></p>
</div>
<div class='one-item asp_f_dropdown asp_f_type hiddend'>
<label for='asp_f_dropdown_multi'><?php echo __('Multiselect?', 'ajax-search-pro'); ?></label>
<input type='checkbox' name='asp_f_dropdown_multi' value="yes" /><br><br>
<label for='asp_f_dropdown_search'><?php echo __('Searchable?', 'ajax-search-pro'); ?></label>
<input type='checkbox' name='asp_f_dropdown_search' value="yes" />
<label for='asp_f_dropdown_search_text'><?php echo __('placeholder', 'ajax-search-pro'); ?></label>
<input type='text' name='asp_f_dropdown_search_text' value="Select options.." disabled/><br><br>
<label for='asp_f_dropdown_value'><?php echo __('Dropdown values', 'ajax-search-pro'); ?></label>
<textarea name='asp_f_dropdown_value'/></textarea>
<p class="descMsg"><?php echo $cf_tooltip_msg; ?></p>
<label for='asp_f_dropdown_logic'><?php echo __('Drop-down values logic', 'ajax-search-pro'); ?></label>
<select name='asp_f_dropdown_logic'/>
<option value="OR">OR</option>
<option value="AND">AND</option>
<option value="ANDSE">AND in separate fields</option>
</select>
</div>
<div class='one-item asp_f_checkboxes asp_f_type hiddend'>
<label for='asp_f_checkboxes_value'><?php echo __('Checkbox values', 'ajax-search-pro'); ?></label>
<textarea name='asp_f_checkboxes_value'/></textarea><br><br>
<p class="descMsg"><?php echo $cf_tooltip_msg; ?></p>
<label for='asp_f_checkboxes_logic'><?php echo __('Checkbox logic', 'ajax-search-pro'); ?></label>
<select name='asp_f_checkboxes_logic'/>
<option value="OR">OR</option>
<option value="AND">AND</option>
</select>
</div>
<div class='one-item asp_f_hidden asp_f_type'>
<label for='asp_f_hidden_value'><?php echo __('Hidden value', 'ajax-search-pro'); ?></label>
<textarea name='asp_f_hidden_value'/></textarea>
<p class="descMsg"><?php echo __('An invisible element. Used for filtering every time without user input.', 'ajax-search-pro'); ?></p>
</div>
<div class='one-item asp_f_text asp_f_type'>
<label for='asp_f_text_value'><?php echo __('Text input', 'ajax-search-pro'); ?></label>
<textarea name='asp_f_text_value'/></textarea>
<p class="descMsg"><?php echo __('A text input element.', 'ajax-search-pro'); ?></p>
</div>
<div class='one-item asp_f_datepicker asp_f_type'>
<label for='asp_f_datepicker_store_format'><?php echo __('Date storage format', 'ajax-search-pro'); ?></label>
<select class="asp_f_datepicker_store_format" name="asp_f_datepicker_store_format">
<option value="datetime"><?php echo __('MySQL DateTime/ACF datetime field', 'ajax-search-pro'); ?></option>
<option value="acf"><?php echo __('ACF date field', 'ajax-search-pro'); ?></option>
<option value="timestamp"><?php echo __('Timestamp', 'ajax-search-pro'); ?></option>
</select>
<p class="msg_acf"></p>
<p class="greenMsg msg_datetime">
<?php echo __('NOTICE: The MySql datetime format is <strong>Y-m-d H:i:s</strong>, for example: 2001-03-10 17:16:18', 'ajax-search-pro'); ?>
</p>
<p class="greenMsg msg_timestamp">
<?php echo __('NOTICE: The timestamp is a numeric format, for example <strong>1465111713</strong>. This translates to: 06/05/2016 @ 7:28am (UTC)', 'ajax-search-pro'); ?>
</p>
<div class="one-item-sub">
<label for='asp_f_datepicker_placeholder'>
<?php echo __('Placeholder text', 'ajax-search-pro'); ?>
</label><input style="width:120px;" name='asp_f_datepicker_placeholder' class="asp_f_datepicker_placeholder" value="Choose date"/>
</div>
<div class="one-item-sub">
<label for='asp_f_datepicker_format'>
<?php echo __('Display format', 'ajax-search-pro'); ?>
</label><input style="width:120px;" name='asp_f_datepicker_format' class="asp_f_datepicker_format" value="dd/mm/yy"/>
<p class="descMsg">
<?php echo sprintf( __('dd/mm/yy is the most used format, <a href="%s" target="_blank">list of accepted params</a>', 'ajax-search-pro'), 'http://api.jqueryui.com/datepicker/#utility-formatDate' ); ?>
</p>
</div>
<label for='asp_f_datepicker_value'><?php echo __('Default Value', 'ajax-search-pro'); ?></label><br>
<select class="asp_f_datepicker_defval" name="asp_f_datepicker_defval">
<option value="current"><?php echo __('Current date', 'ajax-search-pro'); ?></option>
<option value="none"><?php echo __('Empty (no date)', 'ajax-search-pro'); ?></option>
<option value="relative"><?php echo __('Relative date', 'ajax-search-pro'); ?></option>
<option value="selected"><?php echo __('Select date', 'ajax-search-pro'); ?></option>
</select>
<input class="asp_f_datepicker_value" name='asp_f_datepicker_value' value=""/>
<fieldset class="asp_f_datepicker_from hiddend">
<input class="asp_f_datepicker_from_days" name='asp_f_datepicker_from_days' value="0"/> days and
<input class="asp_f_datepicker_from_months" name='asp_f_datepicker_from_months' value="0"/> months from now.
<p class="descMsg"><?php echo __('Use <strong>negative values</strong> to indicate date before the current.', 'ajax-search-pro'); ?></p>
</fieldset>
<br>
<label for='asp_f_datepicker_operator'><?php echo __('Show results..', 'ajax-search-pro'); ?></label>
<select name='asp_f_datepicker_operator'/>
<option value="before"><?php echo __('..before the date (to date)', 'ajax-search-pro'); ?></option>
<option value="before_inc"><?php echo __('..before the date (to date) inclusive', 'ajax-search-pro'); ?></option>
<option value="after"><?php echo __('..after the date (from date)', 'ajax-search-pro'); ?></option>
<option value="after_inc"><?php echo __('..after the date (from date) inclusive', 'ajax-search-pro'); ?></option>
<option value="match"><?php echo __('..matching the date', 'ajax-search-pro'); ?></option>
<option value="nomatch"><?php echo __('..not matching the date', 'ajax-search-pro'); ?></option>
</select>
</div>
<div style='line-height: 33px;' class='one-item asp_f_number_range asp_f_type hiddend'>
<label for='asp_f_number_range_from'><?php echo __('Min/Max Range', 'ajax-search-pro'); ?></label>
<input class="ninedigit" type='number' value="" name='asp_f_number_range_from'/> - <input class="ninedigit" value="" type='number' name='asp_f_number_range_to'/><br />
<p class="descMsg"><?php echo __('Leave them empty to get the min/max range automatically.', 'ajax-search-pro'); ?></p>
<label for='asp_f_number_range_default1'><?php echo __('Input 1 default', 'ajax-search-pro'); ?></label>
<input class="ninedigit" type='number' value="" name='asp_f_number_range_default1'/>
<label for='asp_f_number_range_default2'><?php echo __('Input 2 default', 'ajax-search-pro'); ?></label>
<input class="ninedigit" type='number' value="" name='asp_f_number_range_default2'/>
<p class="descMsg"><?php echo __('When empty, the placeholder texts are displayed.', 'ajax-search-pro'); ?></p>
<label for='asp_f_number_range_placeholder1'><?php echo __('Placeholder Text #1', 'ajax-search-pro'); ?></label>
<input type='text' value="From" name='asp_f_number_range_placeholder1'/>
<label for='asp_f_number_range_placeholder2'><?php echo __('Placeholder Text #2', 'ajax-search-pro'); ?></label>
<input type='text' value="To" name='asp_f_number_range_placeholder2'/>
<label for='asp_f_number_range_t_separator'><?php echo __('Thousands separator', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value=" " name='asp_f_number_range_t_separator'/>
</div>
<div style='line-height: 33px;' class='one-item asp_f_slider asp_f_type hiddend'>
<label for='asp_f_slider_from'><?php echo __('Slider range', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="" name='asp_f_slider_from'/> - <input class="threedigit" value="" type='text' name='asp_f_slider_to'/><br />
<p class="descMsg"><?php echo __('Leave them empty to get the values automatically.', 'ajax-search-pro'); ?></p>
<label for='asp_f_slider_step'><?php echo __('Step', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="1" name='asp_f_slider_step'/><br />
<label for='asp_f_slider_prefix'><?php echo __('Prefix', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="$" name='asp_f_slider_prefix'/>
<label for='asp_f_slider_suffix'><?php echo __('Suffix', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value=",-" name='asp_f_slider_suffix'/><br />
<label for='asp_f_slider_default'><?php echo __('Default Value', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="" name='asp_f_slider_default'/><br />
<p class="descMsg"><?php echo __('Leave it empty to set the handle automatically.', 'ajax-search-pro'); ?></p>
<label for='asp_f_slider_t_separator'><?php echo __('Thousands separator', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value=" " name='asp_f_slider_t_separator'/>
<label for='asp_f_slider_decimals'><?php echo __('Decimal places', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="0" name='asp_f_slider_decimals'/>
</div>
<div style='line-height: 33px;' class='one-item asp_f_range asp_f_type hiddend'>
<label for='asp_f_range_from'><?php echo __('Slider range', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="" name='asp_f_range_from'/> - <input class="threedigit" value="" type='text' name='asp_f_range_to'/><br />
<p class="descMsg"><?php echo __('Leave them empty to get the values automatically.', 'ajax-search-pro'); ?></p>
<label for='asp_f_slider_step'><?php echo __('Step', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="1" name='asp_f_range_step'/><br />
<label for='asp_f_slider_prefix'><?php echo __('Prefix', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="$" name='asp_f_range_prefix'/>
<label for='asp_f_slider_suffix'><?php echo __('Suffix', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value=",-" name='asp_f_range_suffix'/><br />
<label for='asp_f_range_default1'><?php echo __('Track 1 default', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="" name='asp_f_range_default1'/>
<label for='asp_f_range_default2'><?php echo __('Track 2 default', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="" name='asp_f_range_default2'/>
<p class="descMsg"><?php echo __('Leave them empty to set the handles automatically.', 'ajax-search-pro'); ?></p>
<label for='asp_f_range_t_separator'><?php echo __('Thousands separator', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value=" " name='asp_f_range_t_separator'/>
<label for='asp_f_range_decimals'><?php echo __('Decimal places', 'ajax-search-pro'); ?></label>
<input class="threedigit" type='text' value="0" name='asp_f_range_decimals'/>
</div>
<div class='one-item asp_f_operator'>
<label for='asp_f_operator'><?php echo __('Operator', 'ajax-search-pro'); ?></label>
<select name='asp_f_operator'/>
<optgroup label="Numeric operators">
<option value="eq">EQUALS</option>
<option value="neq">NOT EQUALS</option>
<option value="lt">LESS THEN</option>
<option value="let">LESS OR EQUALS THEN</option>
<option value="gt">MORE THEN</option>
<option value="get">MORE OR EQUALS THEN</option>
</optgroup>
<optgroup label="String operators">
<option value="elike">EXACTLY LIKE</option>
<option value="like">LIKE</option>
<option value="not elike">NOT EXACTLY LIKE</option>
<option value="not like">NOT LIKE</option>
</optgroup>
</select>
<p class="descMsg"><?php echo __('Use the numeric operators for numeric values and string operators for text values.', 'ajax-search-pro'); ?></p>
</div>
<div class='one-item asp_f_required'>
<label for='asp_f_required'><?php echo __('Required?', 'ajax-search-pro'); ?>
<input type="checkbox" name="asp_f_required">
</label>
<label for='asp_f_required'><?php echo __('..text: ', 'ajax-search-pro'); ?>
<input type='text' value="This field is required!" name='asp_f_invalid_input_text'/>
</label>
<p class="descMsg"><?php echo __('The plugin will not trigger search until the required field is set.', 'ajax-search-pro'); ?></p>
</div>
<div class='one-item'>
<button type='button' style='margin-right: 20px;' name='back'><?php echo __('Back', 'ajax-search-pro'); ?></button>
<button type='button' name='save'><?php echo __('Save!', 'ajax-search-pro'); ?></button>
</div>
</fieldset>
<input type="hidden" name="custom_field_items" value="<?php
if (isset($_POST['custom_field_items']))
echo esc_attr($_POST['custom_field_items']);
else
echo $sd['custom_field_items'];
?>" />
</div>
<div class="wpd-40-pc customFieldsSortable">
<div class="sortablecontainer">
<ul id="csf_sortable">
</ul>
</div>
</div>

View File

@@ -0,0 +1,62 @@
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/frontend-search-settings/date-selectors"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
<div class="item">
<?php
$o = new wd_DateFilterPost("date_filter_from", __('Display \'Posts from date\' filter as', 'ajax-search-pro'), $sd['date_filter_from']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsText("date_filter_from_t", __('Filter header text', 'ajax-search-pro'), $sd['date_filter_from_t']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsText("date_filter_from_placeholder", __('..and placeholder text', 'ajax-search-pro'), $sd['date_filter_from_placeholder']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item" style="border-bottom: 1px dashed #E5E5E5;padding-bottom: 26px;">
<?php
$o = new wpdreamsText("date_filter_from_format", __('Date format', 'ajax-search-pro'), $sd['date_filter_from_format']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo sprintf( __('dd/mm/yy is the most popular format, <a href="%s" target="_blank">list of accepted params</a>', 'ajax-search-pro'), 'http://api.jqueryui.com/datepicker/#utility-formatDate' ); ?>
</p>
</div>
<div class="item">
<?php
$o = new wd_DateFilterPost("date_filter_to", __('Display \'Posts to date\' filter', 'ajax-search-pro'), $sd['date_filter_to']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsText("date_filter_to_t", __('Filter header text', 'ajax-search-pro'), $sd['date_filter_to_t']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsText("date_filter_to_placeholder", __('..and placeholder text', 'ajax-search-pro'), $sd['date_filter_to_placeholder']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item" style="border-bottom: 1px dashed #E5E5E5;padding-bottom: 26px;">
<?php
$o = new wpdreamsText("date_filter_to_format", __('Date format', 'ajax-search-pro'), $sd['date_filter_to_format']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo sprintf( __('dd/mm/yy is the most popular format, <a href="%s" target="_blank">list of accepted params</a>', 'ajax-search-pro'), 'http://api.jqueryui.com/datepicker/#utility-formatDate' ); ?>
</p>
</div>
<div class="item item-flex-nogrow">
<?php
$o = new wpdreamsYesNo("date_filter_required", __('Required fields?', 'ajax-search-pro'), $sd['date_filter_required']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsText("date_filter_invalid_input_text", __('required popup text', 'ajax-search-pro'), $sd['date_filter_invalid_input_text']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,114 @@
<fieldset>
<legend>
<?php echo __('General', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/frontend-search-settings/layout-and-position"><span class="fa fa-book"></span>
<?php echo __('Layout & Position', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item">
<?php
$o = new wpdreamsYesNo("show_frontend_search_settings", __('Show search settings switch on the frontend?', 'ajax-search-pro'), $sd['show_frontend_search_settings']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('This will hide the switch icon, so the user can\'t open/close the settings.', 'ajax-search-pro'); ?></p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("frontend_search_settings_visible", __('Set the search settings to visible by default?', 'ajax-search-pro'), $sd['frontend_search_settings_visible']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('If set to Yes, then the settings will be visible/opened by default.', 'ajax-search-pro'); ?></p>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("frontend_search_settings_position", __('Search settings position', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Block (default)', 'ajax-search-pro'), 'value' => 'block'),
array('option' => __('Hovering', 'ajax-search-pro'), 'value' => 'hover'),
),
'value'=>$sd['frontend_search_settings_position']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("fss_hover_columns", __(' max. columns ', 'ajax-search-pro'), array(
'selects'=>array(
array("option"=>"1", "value" => 1),
array("option"=>"2", "value" => 2),
array("option"=>"3", "value" => 3),
array("option"=>"4", "value" => 4),
array("option"=>"5", "value" => 5),
array("option"=>"6", "value" => 6)
),
'value'=>$sd['fss_hover_columns']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("fss_block_columns", __(' max. columns ', 'ajax-search-pro'), array(
'selects'=>array(
array("option"=>"Auto", "value" => "auto"),
array("option"=>"1", "value" => 1),
array("option"=>"2", "value" => 2),
array("option"=>"3", "value" => 3),
array("option"=>"4", "value" => 4),
array("option"=>"5", "value" => 5),
array("option"=>"6", "value" => 6)
),
'value'=>$sd['fss_block_columns']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('The position is automatically set to Block if you use the settings shortcode.<br><strong>Columns WRAP</strong> if they reach the edge of the screen, or container element!', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("fss_hide_on_results", __('Hide the settings when the results list show up?', 'ajax-search-pro'), $sd['fss_hide_on_results']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('This will hide the settings (hover mode only), when the result list comes on screen', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wd_imageRadio("fss_column_layout", __('Column layout', 'ajax-search-pro'), array(
'images' => array(
'flex' => "/ajax-search-pro/backend/settings/assets/img/fss_flex.jpg",
'column' => "/ajax-search-pro/backend/settings/assets/img/fss_column.jpg",
'masonry' => "/ajax-search-pro/backend/settings/assets/img/fss_masonry.jpg"
),
'value' => $sd['fss_column_layout']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("fss_column_width", __('Column width (in pixels)', 'ajax-search-pro'), $sd['fss_column_width']);
$params[$o->getName()] = $o->getData();
?>px
<p class="descMsg">
<?php echo __('Only numeric value please.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("settings_boxes_height", __('Filter boxes max-height each', 'ajax-search-pro'), $sd['settings_boxes_height']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Height of each filter box within the search settings drop-down.', 'ajax-search-pro'); ?>
<?php echo ' '. sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..) Default: <strong>%s</strong>', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '220px', '30vw', 'auto', '220px'
); ?>
</p>
</div>
<div class="item">
<label class="shortcode"><?php echo __('Custom Settings position shortcode:', 'ajax-search-pro'); ?></label>
<input type="text" class="quick_shortcode" value="[wpdreams_asp_settings id=<?php echo $search['id']; ?>]" readonly="readonly" />
</div>
</fieldset>

View File

@@ -0,0 +1,35 @@
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/frontend-search-settings/generic-selectors"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
<div class="item">
<?php
$o = new wpdreamsText("generic_filter_label", __('Generic filters label text', 'ajax-search-pro'), $sd['generic_filter_label']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<div class="errorMsg hiddend" id="genericFilterErr">
<?php echo __('<strong>WARNING:</strong> These options are not recommended to be used together with the <strong>index table</strong> engine.<br>
You are seeing this message, because the Index Table engine is selected on the <strong>General Options</strong> panel.', 'ajax-search-pro'); ?>
</div>
<?php
$o = new wd_DraggableFields("frontend_fields", __('Generic filters', 'ajax-search-pro'), array(
"value"=>$sd['frontend_fields'],
"args" => array(
"show_checkboxes" => 1,
"show_display_mode" => 1,
"show_labels" => 1,
'fields' => array(
'exact' => __('Exact matches only', 'ajax-search-pro'),
'title' => __('Search in title', 'ajax-search-pro'),
'content' => __('Search in content', 'ajax-search-pro'),
'excerpt' => __('Search in excerpt', 'ajax-search-pro')
),
'checked' => array('title', 'content', 'excerpt')
)
));
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,5 @@
<?php
// @TODO preparation for 5.0
//$o = new wd_frontFilters("new_filters", __('YOOO', 'ajax-search-pro'), array());
//$params[$o->getName()] = $o->getData();

View File

@@ -0,0 +1,59 @@
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/frontend-search-settings/post-type-selectors"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
<div class="item">
<?php
$o = new wpdreamsText("custom_types_label", __('Custom post types label text', 'ajax-search-pro'), $sd['custom_types_label']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('If empty, the label is not displayed.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item item-flex-nogrow">
<?php
$o = new wpdreamsCustomSelect("cpt_display_mode", __('Filter display mode', 'ajax-search-pro'), array(
"selects" => array(
array("value" => "checkboxes", "option" => __("Checkboxes", 'ajax-search-pro')),
array("value" => "dropdown", "option" => __("Drop-down", 'ajax-search-pro')),
array("value" => "radio", "option" => __("Radio buttons", 'ajax-search-pro'))
),
"value" => $sd['cpt_display_mode']));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("cpt_filter_default", __('default selected', 'ajax-search-pro'), array(
"selects" => array_merge( array( array("value" => '-1', "option" => 'Select All/Any Option') ), array_values(array_map(function($_pt){
return array("value" => $_pt, "option" => $_pt);
}, get_post_types(array(
"public" => true,
"_builtin" => false
), "names", "OR")))),
"value" => $sd['cpt_filter_default']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow">
<?php
$o = new wpdreamsYesNo("cpt_cbx_show_select_all", __('Display the select all option?', 'ajax-search-pro'), $sd['cpt_cbx_show_select_all']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsText("cpt_cbx_show_select_all_text", __('text', 'ajax-search-pro'), $sd['cpt_cbx_show_select_all_text']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow">
<?php
$o = new wpdreamsYesNo("cpt_required", __('Required field?', 'ajax-search-pro'), $sd['cpt_required']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsText("cpt_invalid_input_text", __('required popup text', 'ajax-search-pro'), $sd['cpt_invalid_input_text']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsCustomPostTypesEditable("showcustomtypes", __('Show search in custom post types selectors', 'ajax-search-pro'), $sd['showcustomtypes']);
$params[$o->getName()] = $o->getData();
$params['selected-' . $o->getName()] = $o->getSelected();
?>
</div>

View File

@@ -0,0 +1,78 @@
<div class="item">
<?php
$o = new wpdreamsSelectTags("show_frontend_tags", __('Show the tag selectors?', 'ajax-search-pro'), $sd['show_frontend_tags']);
?>
</div>
<div class="item item-flex-nogrow wd_tag_mode_dropdown wd_tag_mode_radio">
<?php
$o = new wpdreamsYesNo("display_all_tags_option", __('Show all tags option?', 'ajax-search-pro'), $sd['display_all_tags_option']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsText("all_tags_opt_text", __('text ', 'ajax-search-pro'), $sd['all_tags_opt_text']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow wd_tag_mode_checkboxes">
<?php
$o = new wpdreamsYesNo("display_all_tags_check_opt", __('Show select/deselect all option?', 'ajax-search-pro'), $sd['display_all_tags_check_opt']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsText("all_tags_check_opt_text", __('text ', 'ajax-search-pro'), $sd['all_tags_check_opt_text']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("all_tags_check_opt_state", __('state ', 'ajax-search-pro'), array(
"selects" => array(
array("option" => __('Checked', 'ajax-search-pro'), "value" => "checked"),
array("option" => __('Unchecked', 'ajax-search-pro'), "value" => "unchecked")
),
"value" => $sd['all_tags_check_opt_state']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item wd_tag_mode_multisearch">
<?php
$o = new wpdreamsText("frontend_tags_placeholder", __('Placeholder text', 'ajax-search-pro'), $sd['frontend_tags_placeholder']);
?>
<p class="descMsg">
<?php echo __('Placeholder text for the multiselect search layout, in case nothing is selected.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item item-flex-nogrow">
<?php
$o = new wpdreamsYesNo("frontend_tags_required", __('Required field?', 'ajax-search-pro'), $sd['frontend_tags_required']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsText("frontend_tags_invalid_input_text", __('required popup text', 'ajax-search-pro'), $sd['frontend_tags_invalid_input_text']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsText("frontend_tags_header", __('Tags header text', 'ajax-search-pro'), $sd['frontend_tags_header']);
?>
<p class="descMsg">
<?php echo __('Leave empty if you don\'t want to display the header.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item wd_tag_mode_checkboxes"><?php
$o = new wpdreamsCustomSelect("frontend_tags_logic", __('Tags logic (only used for checkboxes!)', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('At least one selected tag should match', 'ajax-search-pro'), 'value' => 'or'),
array('option' => __('All of the selected tags should match, and unchecked are exclusions', 'ajax-search-pro'), 'value' => 'and'),
array('option' => __('All of the selected tags should match EXACTLY, but unchecked not excluded', 'ajax-search-pro'), 'value' => 'andex')
),
'value' => $sd['frontend_tags_logic']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('This determines the rule how the selections should be treated. Only affects the <strong>checkbox</strong> layout!', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("frontend_tags_empty", __('Display posts/pages/CPT as results, which have no tags?', 'ajax-search-pro'), $sd['frontend_tags_empty']);
?>
<p class="descMsg">
<?php echo __('When turned OFF, any custom post type (post, page etc..) without tags <strong>will not be displayed</strong> as results.', 'ajax-search-pro'); ?>
</p>
</div>

View File

@@ -0,0 +1,110 @@
<div class="item">
<?php
$o = new wpdreamsYesNo("fe_reset_button", __('Display a Reset Filters button within the settings drop-down?', 'ajax-search-pro'), $sd['fe_reset_button']);
?>
</div>
<fieldset id="fe_rb_functionality">
<legend>Functionality</legend>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("fe_rb_action", __('Action after pressing the button & reset', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Nothing', 'ajax-search-pro'), 'value' => 'nothing'),
array('option' => __('Nothing & Close the results', 'ajax-search-pro'), 'value' => 'close'),
array('option' => __('Trigger the live search', 'ajax-search-pro'), 'value' => 'live')
),
'value' => $sd['fe_rb_action']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("fe_rb_position", __('Display position relative to the search button (when enabled)', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Before the Search button', 'ajax-search-pro'), 'value' => 'before'),
array('option' => __('After the Search button', 'ajax-search-pro'), 'value' => 'after')
),
'value' => $sd['fe_rb_position']
));
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<fieldset id="fe_reset_button">
<legend>Visual</legend>
<div class="item">
<?php
$o = new wpdreamsText("fe_rb_text", __('Button text', 'ajax-search-pro'), $sd['fe_rb_text']);
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("fe_rb_align", __('Button alignment', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Left', 'ajax-search-pro'), 'value' => 'left'),
array('option' => __('Right', 'ajax-search-pro'), 'value' => 'right'),
array('option' => __('Center', 'ajax-search-pro'), 'value' => 'center')
),
'value' => $sd['fe_rb_align']
));
?>
</div>
<div class="item">
<?php $o = new wpdreamsColorPicker("fe_rb_bg", __('Background color', 'ajax-search-pro'), $sd['fe_rb_bg']); ?>
</div>
<div class="item">
<?php $o = new wpdreamsBorder("fe_rb_border", __('Button border', 'ajax-search-pro'), $sd['fe_rb_border']); ?>
</div>
<div class="item">
<?php $o = new wpdreamsBoxShadow("fe_rb_boxshadow", __('Button box-shadow', 'ajax-search-pro'), $sd['fe_rb_boxshadow']); ?>
</div>
<div class="item item-flex-nogrow">
<?php
$o = new wd_ANInputs("fe_rb_padding", __('Padding', 'ajax-search-pro'),
array(
'args' => array(
'inputs' => array(
array( __('Top', 'ajax-search-pro'), '0px'),
array( __('Right', 'ajax-search-pro'), '0px'),
array( __('Bottom', 'ajax-search-pro'), '0px'),
array( __('Left', 'ajax-search-pro'), '0px')
)
),
'value' => $sd['fe_rb_padding']
));
$o = new wd_ANInputs("fe_rb_margin", __('Margin', 'ajax-search-pro'),
array(
'args' => array(
'inputs' => array(
array( __('Top', 'ajax-search-pro'), '0px'),
array( __('Right', 'ajax-search-pro'), '0px'),
array( __('Bottom', 'ajax-search-pro'), '0px'),
array( __('Left', 'ajax-search-pro'), '0px')
)
),
'value' => $sd['fe_rb_margin']
));
?>
</div>
<div class="item">
<?php
$o = new wpdreamsFontComplete("fe_rb_font", __('Button font', 'ajax-search-pro'), $sd['fe_rb_font']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div style="display:none !important;">
<input name="fe_rb_theme" type="hidden" value="default">
<div class="triggerer"></div>
</div>
<div id="fe_rb_themes" style="display:none !important;"><?php echo json_encode($_sb_themes); ?></div>
<div id="fe_rb_popup" class="hiddend"></div>
<a href="#" id="fe_rb_trigger"><?php echo __('Select a button theme', 'ajax-search-pro'); ?></a>
<div id="fe_rb_preview">
<button class="asp_reset_btn asp_r_btn"><?php echo __('Search!', 'ajax-search-pro'); ?></button>
</div>
<style id="fe_rb_css"></style>
</fieldset>

View File

@@ -0,0 +1,156 @@
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/frontend-search-settings/search-button"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
<div class="item">
<?php
$o = new wpdreamsYesNo("fe_search_button", __('Display a search button within the settings drop-down?', 'ajax-search-pro'), $sd['fe_search_button']);
?>
</div>
<fieldset id="fe_sb_functionality">
<legend><?php _e('Functionality', 'ajax-search-pro'); ?></legend>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
foreach ($_red_opts as $rok => $rov)
if ( $rov['value'] == 'same' || $rov['value'] == 'nothing' )
unset($_red_opts[$rok]);
$o = new wpdreamsCustomSelect("fe_sb_action", __('Action when pressing the button', 'ajax-search-pro'),
array(
'selects' => $_red_opts,
'value' => $sd['fe_sb_action']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("fe_sb_action_location", __(' location: ', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Use same tab', 'ajax-search-pro'), 'value' => 'same'),
array('option' => __('Open new tab', 'ajax-search-pro'), 'value' => 'new')
),
'value' => $sd['fe_sb_action_location']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_CPTSearchCallBack('fe_sb_redirect_elementor', __('Select a page with an Elementor Pro posts widget', 'ajax-search-pro'), array(
'value'=>$sd['fe_sb_redirect_elementor'],
'args'=> array(
'controls_position' => 'left',
'class'=>'wpd-text-right'
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsText("fe_sb_redirect_url", __('Custom redirect URL', 'ajax-search-pro'),
$sd['fe_sb_redirect_url']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo sprintf( __('You can use the <string>asp_redirect_url</string> filter to add more variables. See <a href="%s" target="_blank">this tutorial</a>.', 'ajax-search-pro'), 'https://knowledgebase.ajaxsearchpro.com/miscellaneous/tutorials/how-to-add-variables-to-the-redirect-to-url-or-the-show-more-url' ); ?>
</p>
</div>
</fieldset>
<fieldset id="fe_search_button">
<legend><?php _e('Visual', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsText("fe_sb_text", __('Button text', 'ajax-search-pro'), $sd['fe_sb_text']);
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("fe_sb_align", __('Button alignment', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Left', 'ajax-search-pro'), 'value' => 'left'),
array('option' => __('Right', 'ajax-search-pro'), 'value' => 'right'),
array('option' => __('Center', 'ajax-search-pro'), 'value' => 'center')
),
'value' => $sd['fe_sb_align']
));
?>
</div>
<div class="item">
<?php $o = new wpdreamsColorPicker("fe_sb_bg", __('Background color', 'ajax-search-pro'), $sd['fe_sb_bg']); ?>
</div>
<div class="item">
<?php $o = new wpdreamsBorder("fe_sb_border", __('Button border', 'ajax-search-pro'), $sd['fe_sb_border']); ?>
</div>
<div class="item">
<?php $o = new wpdreamsBoxShadow("fe_sb_boxshadow", __('Button box-shadow', 'ajax-search-pro'), $sd['fe_sb_boxshadow']); ?>
</div>
<div class="item item-flex-nogrow">
<?php
$o = new wd_ANInputs("fe_sb_padding", __('Padding', 'ajax-search-pro'),
array(
'args' => array(
'inputs' => array(
array( __('Top', 'ajax-search-pro'), '0px'),
array( __('Right', 'ajax-search-pro'), '0px'),
array( __('Bottom', 'ajax-search-pro'), '0px'),
array( __('Left', 'ajax-search-pro'), '0px')
)
),
'value' => $sd['fe_sb_padding']
));
$o = new wd_ANInputs("fe_sb_margin", __('Margin', 'ajax-search-pro'),
array(
'args' => array(
'inputs' => array(
array( __('Top', 'ajax-search-pro'), '0px'),
array( __('Right', 'ajax-search-pro'), '0px'),
array( __('Bottom', 'ajax-search-pro'), '0px'),
array( __('Left', 'ajax-search-pro'), '0px')
)
),
'value' => $sd['fe_sb_margin']
));
?>
</div>
<div class="item">
<?php
$o = new wpdreamsFontComplete("fe_sb_font", __('Button font', 'ajax-search-pro'), $sd['fe_sb_font']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div style="display:none !important;">
<input name="fe_sb_theme" type="hidden" value="default">
<div class="triggerer"></div>
</div>
<div id="fe_sb_themes" style="display:none !important;"><?php echo json_encode($_sb_themes); ?></div>
<div id="fe_sb_popup" class="hiddend"></div>
<a href="#" id="fe_sb_trigger"><?php echo __('Select a button theme', 'ajax-search-pro'); ?></a>
<div id="fe_sb_preview">
<button class="asp_search_btn asp_s_btn"><?php echo __('Search!', 'ajax-search-pro'); ?></button>
</div>
<style id="fe_sb_css"></style>
</fieldset>
<?php if (ASP_DEBUG == 1): ?>
<textarea id="sb_previewtext"></textarea>
<script>
jQuery(function($){
$("#sb_previewtext").click(function(){
var skip = ['fe_sb_text', 'fe_sb_align'];
var parent = $('#fe_search_button');
var content = "";
var v = "";
parent.find("input[isparam=1], select[isparam=1]").each(function(){
var name = $(this).attr("name");
if ( skip.indexOf(name) > -1 )
return true;
var val = $(this).val().replace(/(\r\n|\n|\r)/gm,"");
content += '"'+name+'":"'+val+'",\n';
});
content = content.trim();
content = content.slice(0, - 1);
$(this).val('"theme": {\n' + content + "\n}");
});
});
</script>
<?php endif; ?>

View File

@@ -0,0 +1,78 @@
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/frontend-search-settings/category-and-taxponomy-term-filters"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
<div class="item">
<?php
$o = new wpdreamsYesNo("showsearchintaxonomies", __('Display the category/terms selectors?', 'ajax-search-pro'), $sd['showsearchintaxonomies']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_TaxonomyTermSelect("show_terms", __('Show the following taxonomy term selectors on frontend', 'ajax-search-pro'), array(
"value"=>$sd['show_terms'],
"args" => array(
"show_type" => 0,
"show_checkboxes" => 1,
"show_display_mode" => 1,
"show_more_options" => 1,
"built_in" => true,
"exclude_taxonomies" => array("post_tag", __('nav_menu', 'ajax-search-pro'), "link_category")
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("frontend_terms_parent_child_assignment", __('Filtering by parent terms should also include the results from children?', 'ajax-search-pro'), $sd['frontend_terms_parent_child_assignment']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('If a post from child category is not directly assigned to the parent category as well, this will force the filter to still apply if the parent category is selected.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("frontend_terms_hide_empty", __('Hide empty terms?', 'ajax-search-pro'), $sd['frontend_terms_hide_empty']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Automatically hides terms, that have no posts or any CPT assigned to them.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("frontend_term_hierarchy", __('Maintain term hierarchy?', 'ajax-search-pro'), $sd['frontend_term_hierarchy']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Shows child terms hierarchically under their parents with padding. Supports multiple term levels.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomArraySelect("frontend_term_order",
array(
__('Default term order', 'ajax-search-pro'),
""
),
array(
'optionsArr' => array(
array(
array('option' => __('Name', 'ajax-search-pro'), 'value' => 'name'),
array('option' => __('Item count', 'ajax-search-pro'), 'value' => 'count'),
array('option' => __('ID', 'ajax-search-pro'), 'value' => 'id')
),
array(
array('option' => __('Ascending', 'ajax-search-pro'), 'value' => 'ASC'),
array('option' => __('Descending', 'ajax-search-pro'), 'value' => 'DESC')
)
),
'value' => $sd['frontend_term_order']
));
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,74 @@
<ul id="subtabs" class='tabs'>
<li><a tabid="301" class='subtheme current'><?php echo __('General', 'ajax-search-pro'); ?></a></li>
<li><a tabid="310" class='subtheme'><?php echo __('Generic filters', 'ajax-search-pro'); ?></a></li>
<li><a tabid="311" class='subtheme'><?php echo __('Content type', 'ajax-search-pro'); ?></a></li>
<li><a tabid="308" class='subtheme'><?php echo __('Post Types', 'ajax-search-pro'); ?></a></li>
<li><a tabid="309" class='subtheme'><?php echo __('Date filters', 'ajax-search-pro'); ?></a></li>
<li><a tabid="307" class='subtheme'><?php echo __('Categories & Taxonomy Terms', 'ajax-search-pro'); ?></a></li>
<li><a tabid="306" class='subtheme'><?php echo __('Post Tags', 'ajax-search-pro'); ?></a></li>
<li><a tabid="303" class='subtheme'><?php echo __('Custom Fields', 'ajax-search-pro'); ?></a></li>
<li><a tabid="312" class='subtheme'><?php echo __('Search Button', 'ajax-search-pro'); ?></a></li>
<li><a tabid="313" class='subtheme'><?php echo __('Reset Button', 'ajax-search-pro'); ?></a></li>
<li><a tabid="304" class='subtheme'><?php echo __('Advanced', 'ajax-search-pro'); ?></a></li>
</ul>
<div class='tabscontent'>
<div tabid="301">
<?php include(ASP_PATH."backend/tabs/instance/frontend/general.php"); ?>
</div>
<div tabid="310">
<?php include(ASP_PATH."backend/tabs/instance/frontend/generic.php"); ?>
</div>
<div tabid="311">
<?php include(ASP_PATH."backend/tabs/instance/frontend/content_type.php"); ?>
</div>
<div tabid="308">
<?php include(ASP_PATH."backend/tabs/instance/frontend/post_and_cpt.php"); ?>
</div>
<div tabid="309">
<?php include(ASP_PATH."backend/tabs/instance/frontend/date.php"); ?>
</div>
<div tabid="303">
<?php include(ASP_PATH."backend/tabs/instance/frontend/custom_fields.php"); ?>
</div>
<div tabid="304">
<?php include(ASP_PATH."backend/tabs/instance/frontend/advanced.php"); ?>
</div>
<div tabid="306">
<?php include(ASP_PATH."backend/tabs/instance/frontend/post_tags.php"); ?>
</div>
<div tabid="312">
<?php include(ASP_PATH."backend/tabs/instance/frontend/search_button.php"); ?>
</div>
<div tabid="313">
<?php include(ASP_PATH."backend/tabs/instance/frontend/reset_button.php"); ?>
</div>
<div tabid="307">
<?php include(ASP_PATH."backend/tabs/instance/frontend/taxonomy_terms.php"); ?>
</div>
</div>
<div class="item">
<input name="reset_<?php echo $search['id']; ?>" class="asp_submit asp_submit_transparent asp_submit_reset" type="button" value="<?php echo esc_attr__('Restore defaults', 'ajax-search-pro'); ?>">
<input name="submit_<?php echo $search['id']; ?>" type="submit" value="<?php echo esc_attr__('Save all tabs!', 'ajax-search-pro'); ?>" />
</div>

View File

@@ -0,0 +1,138 @@
<div class="item">
<?php
$o = new wpdreamsYesNo("return_attachments", __('Return media files as results?', 'ajax-search-pro'),
$sd['return_attachments']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div wd-disable-on="return_attachments:0">
<div class="item"><?php
$o = new wpdreamsCustomSelect("attachments_use_index", __('Search engine for media', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Regular engine', 'ajax-search-pro'), 'value' => 'regular'),
array('option' => __('Index table engine', 'ajax-search-pro'), 'value' => 'index')
),
'value' => $sd['attachments_use_index']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo sprintf( __('Index table engine will only work if you have the
<a href="%s">index table</a>
generated. To learn more about the pros. and cons. of the index table read the
<a href="%s" target="_blank">documentation about the index table</a>.', 'ajax-search-pro'),
get_admin_url() . 'admin.php?page=asp_index_table',
'https://documentation.ajaxsearchpro.com/index_table.html'
); ?>
</p>
</div>
<div wd-hide-on="attachments_use_index:index">
<div class="item hide_on_att_index">
<?php
$o = new wpdreamsYesNo("search_attachments_title", __('Search in attachment titles?', 'ajax-search-pro'),
$sd['search_attachments_title']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item hide_on_att_index">
<?php
$o = new wpdreamsYesNo("search_attachments_content", __('Search in attachment description?', 'ajax-search-pro'),
$sd['search_attachments_content']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item hide_on_att_index">
<?php
$o = new wpdreamsYesNo("search_attachments_caption", __('Search in attachment captions?', 'ajax-search-pro'),
$sd['search_attachments_caption']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item hide_on_att_index">
<?php
$o = new wpdreamsYesNo("search_attachments_ids", __('Search in attachment IDs?', 'ajax-search-pro'),
$sd['search_attachments_ids']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item hide_on_att_index">
<?php
$o = new wpdreamsYesNo("search_attachments_terms", __('Search in attachment terms (tags, etc..)?', 'ajax-search-pro'),
$sd['search_attachments_terms']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('Will search in terms (categories, tags) related to the attachments.', 'ajax-search-pro'); ?></p>
<p class="errorMsg"><?php echo __('WARNING: <strong>Search in terms</strong> can be database heavy operation. Not recommended for big databases.', 'ajax-search-pro'); ?></p>
</div>
<div class="item hide_on_att_index">
<?php
$o = new wd_MimeTypeSelect("attachment_mime_types", __('Allowed mime types', 'ajax-search-pro'),
$sd['attachment_mime_types']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo sprintf( __('<strong>Comma separated list</strong> of allowed mime types. List of <a href="%s"
target="_blank">default allowed mime types</a> in WordPress.', 'ajax-search-pro'), 'https://documentation.ajaxsearchpro.com/general-settings/search-in-attachments/mime-types-table' ); ?>
</p>
</div>
</div>
<div class="item item-flex-nogrow item-conditional" style="flex-wrap: wrap;">
<div>
<?php
$o = new wpdreamsCustomSelect("attachment_link_to", __('Link the results to', 'ajax-search-pro'),
array(
'selects' => array(
array("option" => __('attachment page', 'ajax-search-pro'), "value" => "page"),
array("option" => __('attachment file directly', 'ajax-search-pro'), "value" => "file"),
array("option" => __('attachment parent post', 'ajax-search-pro'), "value" => "parent")
),
'value' => $sd['attachment_link_to']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div wd-show-on="attachment_link_to:parent">
<?php
$o = new wpdreamsCustomSelect("attachment_link_to_secondary", __(' ..and if parent does not exist then ', 'ajax-search-pro'),
array(
'selects' => array(
array("option" => "attachment page", "value" => "page"),
array("option" => "attachment file directly", "value" => "file")
),
'value' => $sd['attachment_link_to_secondary']
));
$params[$o->getName()] = $o->getData();
?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("attachment_use_image", __('Use the image of image mime types as the result image?', 'ajax-search-pro'),
$sd['attachment_use_image']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("search_attachments_cf_filters", __('Allow custom field filters to apply on Attachment results as well?', 'ajax-search-pro'),
$sd['search_attachments_cf_filters']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('This only has effect if you have use any custom field filters.', 'ajax-search-pro'); ?>
</p>
</div>
<div id="wdo" class="wdo">
<div id="asp-search-attachment-directories"></div>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("attachment_exclude", __('Exclude attachment IDs', 'ajax-search-pro'),
$sd['attachment_exclude']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('<strong>Comma separated list</strong> of attachment IDs to exclude.', 'ajax-search-pro'); ?></p>
</div>
</div>

View File

@@ -0,0 +1,35 @@
<div class="item">
<?php
$o = new wpdreamsYesNo("search_in_bp_activities", __('Search in buddypress activities?', 'ajax-search-pro'),
$sd['search_in_bp_activities']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("search_in_bp_groups", __('Search in buddypress groups?', 'ajax-search-pro'),
$sd['search_in_bp_groups']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("search_in_bp_groups_public", __('Search in public groups?', 'ajax-search-pro'),
$sd['search_in_bp_groups_public']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("search_in_bp_groups_private", __('Search in private groups?', 'ajax-search-pro'),
$sd['search_in_bp_groups_private']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("search_in_bp_groups_hidden", __('Search in hidden groups?', 'ajax-search-pro'),
$sd['search_in_bp_groups_hidden']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,44 @@
<fieldset>
<legend>
<?php echo __('Grouping', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/general-settings/grouping-title-duplicates"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="errorMsg">
<?php echo __(
'Grouping by <strong>title</strong> means, that duplicate results matching titles are removed, and only the first match is left. This option should be used where multiple items are reffering to the same post and are not needed, such as with some <strong>Event calendar</strong> plugins, or similar.', 'ajax-search-pro'); ?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("groupby_cpt_title", __('Group post type results by title instead of IDs?', 'ajax-search-pro'), $sd['groupby_cpt_title']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('This will <strong>not</strong> work with the Index Table engine.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("groupby_term_title", __('Group term results by title instead of IDs?', 'ajax-search-pro'), $sd['groupby_term_title']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("groupby_user_title", __('Group user results by title instead of IDs?', 'ajax-search-pro'), $sd['groupby_user_title']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("groupby_attachment_title", __('Group attachment results by title instead of IDs?', 'ajax-search-pro'), $sd['groupby_attachment_title']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('This will <strong>not</strong> work with the Index Table engine.', 'ajax-search-pro'); ?>
</p>
</div>
</fieldset>

View File

@@ -0,0 +1,289 @@
<div class="item">
<?php
$option_name = "show_images";
$option_desc = __('Show images in results?', 'ajax-search-pro');
$o = new wpdreamsYesNo($option_name, $option_desc,
$sd[$option_name]);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$option_name = "image_transparency";
$option_desc = __('Preserve image transparency?', 'ajax-search-pro');
$o = new wpdreamsYesNo($option_name, $option_desc,
$sd[$option_name]);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$option_name = "image_bg_color";
$option_desc = __('Image background color?', 'ajax-search-pro');
$o = new wpdreamsColorPicker($option_name, $option_desc,
$sd[$option_name]);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo sprintf( __('Only works if NOT the BFI Thumb library is used. You can change it on the <a href="%s">Cache Settings</a> submenu.', 'ajax-search-pro'), 'admin.php?page=asp_cache_settings' ); ?>
</p>
</div>
<div class="item">
<?php
$option_name = "image_display_mode";
$option_desc = __('Image display mode', 'ajax-search-pro');
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
'selects'=>array(
array("option" => "Cover the space", "value" => "cover"),
array("option" => "Contain the image", "value" => "contain")
),
'value'=>$sd[$option_name]
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$option_name = "image_apply_content_filter";
$option_desc = __('Execute shortcodes when looking for images in content?', 'ajax-search-pro');
$o = new wpdreamsYesNo($option_name, $option_desc,
$sd[$option_name]);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Will execute shortcodes and apply the content filter before looking for images in the post content.', 'ajax-search-pro'); ?><br>
<?php echo __('If you have <strong>missing images in results</strong>, try turning ON this option. <strong>Can cause lower performance!</strong>', 'ajax-search-pro'); ?>
</p>
</div>
<?php
$image_sources = array(
array(
'option' => __('Featured image', 'ajax-search-pro'),
'value' => 'featured',
),
array(
'option' => __('Post Content', 'ajax-search-pro'),
'value' => 'content',
),
array(
'option' => __('Post Excerpt', 'ajax-search-pro'),
'value' => 'excerpt',
),
array(
'option' => __('Custom field', 'ajax-search-pro'),
'value' => 'custom',
),
array(
'option' => __('Page Screenshot', 'ajax-search-pro'),
'value' => 'screenshot',
),
array(
'option' => __('Default image', 'ajax-search-pro'),
'value' => 'default',
),
array(
'option' => __('Post format icon', 'ajax-search-pro'),
'value' => 'post_format',
),
array(
'option' => __('Disabled', 'ajax-search-pro'),
'value' => 'disabled',
),
);
?>
<fieldset>
<legend><?php echo __('Post Type image source options', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$option_name = "image_source1";
$option_desc = __('Primary image source', 'ajax-search-pro');
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
'selects'=>$image_sources,
'value'=>$sd[$option_name]
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$option_name = "image_source2";
$option_desc = __('Alternative image source 1', 'ajax-search-pro');
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
'selects'=>$image_sources,
'value'=>$sd[$option_name]
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$option_name = "image_source3";
$option_desc = __('Alternative image source 2', 'ajax-search-pro');
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
'selects'=>$image_sources,
'value'=>$sd[$option_name]
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$option_name = "image_source4";
$option_desc = __('Alternative image source 3', 'ajax-search-pro');
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
'selects'=>$image_sources,
'value'=>$sd[$option_name]
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$option_name = "image_source5";
$option_desc = __('Alternative image source 4', 'ajax-search-pro');
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
'selects'=>$image_sources,
'value'=>$sd[$option_name]
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$option_name = "image_source_featured";
$option_desc = __('Featured image size source', 'ajax-search-pro');
$_feat_image_sizes = get_intermediate_image_sizes();
$feat_image_sizes = array(
array(
"option" => "Original size",
'value' => "original"
)
);
foreach ($_feat_image_sizes as $k => $v)
$feat_image_sizes[] = array(
"option" => $v,
"value" => $v
);
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
'selects'=>$feat_image_sizes,
'value'=>$sd[$option_name]
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$option_name = "image_default";
$option_desc = __('Default image url', 'ajax-search-pro');
$o = new wpdreamsUpload($option_name, $option_desc,
$sd[$option_name]);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$option_name = "image_custom_field";
$option_desc = __('Custom field containing the image', 'ajax-search-pro');
$o = new wpdreamsText($option_name, $option_desc,
$sd[$option_name]);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<fieldset>
<legend><?php echo __('Media/Attachment image options', 'ajax-search-pro'); ?></legend>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("attachment_pdf_image", __('Generate thumbnails for PDF files?', 'ajax-search-pro'),
$sd['attachment_pdf_image']);
?>
<div class="errorMsg"><?php
echo sprintf(__(
'WARNING: Make sure that the Imagick library installed and configured. Please check <a href="%s">this documentation</a> for more details.',
'ajax-search-pro'),
"https://knowledgebase.ajaxsearchpro.com/miscellaneous/tutorials/pdf-results-thumbnails"
);
?></div>
</div>
</fieldset>
<fieldset>
<legend><?php echo __('Taxonomy term image options', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsText("tax_image_custom_field", __('Custom field containing the image (term meta)', 'ajax-search-pro'),
$sd["tax_image_custom_field"]);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg"><?php echo __('This is only used, when no other image is found for the given taxonomy term.', 'ajax-search-pro') ?></div>
</div>
<div class="item">
<?php
$o = new wpdreamsUpload('tax_image_default', __('Default taxonomy image', 'ajax-search-pro'),
$sd['tax_image_default']);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<fieldset>
<legend><?php echo __('User image options', 'ajax-search-pro'); ?></legend>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("user_search_display_images", __('Display user images?', 'ajax-search-pro'),
$sd['user_search_display_images']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("user_search_image_source", __('Image source', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Default', 'ajax-search-pro'), 'value' => 'default'),
array('option' => __('BuddyPress avatar', 'ajax-search-pro'), 'value' => 'buddypress')
),
'value' => $sd['user_search_image_source']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<div>
<?php
$o = new wpdreamsTextSmall('user_image_width', 'Source image width:',
$sd['user_image_width']);
$params[$o->getName()] = $o->getData();
?>px,
</div>
<div>
<?php
$o = new wpdreamsTextSmall('user_image_height', ' height:',
$sd['user_image_height']);
$params[$o->getName()] = $o->getData();
?>px
</div>
<div class="descMsg item-flex-grow item-flex-100"><?php echo __('Default: 96x96. For avatars where the size is defined by a single value, the width is used.', 'ajax-search-pro') ?></div>
</div>
<div class="item">
<?php
$o = new wpdreamsUpload('user_image_default', __('Default user image', 'ajax-search-pro'),
$sd['user_image_default']);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<fieldset>
<legend><?php echo __('Advanced image options', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsTextSmall('image_parser_image_number', 'Image number the parser should get from the fields',
$sd['image_parser_image_number']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="descMsg"><?php echo __('If the image parser finds multiple images, then the image from this position is returned', 'ajax-search-pro') ?></div>
<div class="item">
<?php
$o = new wpdreamsTextarea('image_parser_exclude_filenames', __('Exclude images by file names (comma separated)', 'ajax-search-pro'),
$sd['image_parser_exclude_filenames']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg"><?php echo __('If any part of the image filename or path contains any of the above strings, it is excluded.', 'ajax-search-pro') ?></div>
</div>
</fieldset>

View File

@@ -0,0 +1,88 @@
<div class="descMsg">
<?php echo __('Define the number of results for each source group with these options.<br>
The <strong>left</strong> values are for the ajax results, the <strong>right</strong> values are for non-ajax results (aka. results page/override).', 'ajax-search-pro'); ?>
</div>
<div style="border-bottom: 1px dotted #e7e7e7; padding-bottom: 10px;margin-bottom: 10px;"></div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("posts_limit", __('Post type (post, page, product..) results limit', 'ajax-search-pro'), $sd['posts_limit']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("posts_limit_override", __(' on result page', 'ajax-search-pro'), $sd['posts_limit_override']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("posts_limit_distribute", __('Distribute the posts limit between each post type equally?', 'ajax-search-pro'),
$sd['posts_limit_distribute']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('For example if you have search in <strong>posts</strong> and <strong>pages</strong>
enabled and the post limit is 10,<br>then the plugin will try to return <strong>5 posts</strong> and <strong>5 pages.</strong>', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("taxonomies_limit", __('Category/Tag/Term results limit', 'ajax-search-pro'), $sd['taxonomies_limit']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("taxonomies_limit_override", __(' on result page', 'ajax-search-pro'), $sd['taxonomies_limit_override']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("users_limit", __('User results limit', 'ajax-search-pro'), $sd['users_limit']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("users_limit_override", __(' on result page', 'ajax-search-pro'), $sd['users_limit_override']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("blogs_limit", __('Blog results limit', 'ajax-search-pro'), $sd['blogs_limit']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("blogs_limit_override", __(' on result page', 'ajax-search-pro'), $sd['blogs_limit_override']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("buddypress_limit", __('Buddypress results limit', 'ajax-search-pro'), $sd['buddypress_limit']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("buddypress_limit_override", __(' on result page', 'ajax-search-pro'), $sd['buddypress_limit_override']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("comments_limit", __('Comments results limit', 'ajax-search-pro'), $sd['comments_limit']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("comments_limit_override", __(' on result page', 'ajax-search-pro'), $sd['comments_limit_override']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("attachments_limit", __('Attachments results limit', 'ajax-search-pro'), $sd['attachments_limit']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("attachments_limit_override", __(' on result page', 'ajax-search-pro'), $sd['attachments_limit_override']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item<?php echo class_exists('PeepSo') ? '' : ' hiddend'; ?>">
<?php
$o = new wpdreamsTextSmall("peepso_groups_limit", __('Peepso Groups results limit', 'ajax-search-pro'), $sd['peepso_groups_limit']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("peepso_groups_limit_override", __(' on result page', 'ajax-search-pro'), $sd['peepso_groups_limit_override']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item<?php echo class_exists('PeepSo') ? '' : ' hiddend'; ?>">
<?php
$o = new wpdreamsTextSmall("peepso_activities_limit", __('Peepso Activities results limit', 'ajax-search-pro'), $sd['peepso_activities_limit']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("peepso_activities_limit_override", __(' on result page', 'ajax-search-pro'), $sd['peepso_activities_limit_override']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,113 @@
<style>
.wd-primary-order input,
.wd-secondary-order input {
width: 120px !important;
}
</style>
<fieldset>
<legend>
<?php echo __('Ordering', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/general-settings/result-ordering"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item wd-primary-order item-flex-nogrow item-flex-wrap"><?php
$common_orders = array(
array('option' => __('Relevance', 'ajax-search-pro'), 'value' => 'relevance DESC'),
array('option' => __('Title descending', 'ajax-search-pro'), 'value' => 'post_title DESC'),
array('option' => __('Title ascending', 'ajax-search-pro'), 'value' => 'post_title ASC'),
array('option' => __('Publish Date descending', 'ajax-search-pro'), 'value' => 'post_date DESC'),
array('option' => __('Publish Date ascending', 'ajax-search-pro'), 'value' => 'post_date ASC'),
array('option' => __('Modified Date descending', 'ajax-search-pro'), 'value' => 'post_modified DESC'),
array('option' => __('Modified Date ascending', 'ajax-search-pro'), 'value' => 'post_modified ASC'),
array('option' => __('ID descending', 'ajax-search-pro'), 'value' => 'id DESC'),
array('option' => __('ID ascending', 'ajax-search-pro'), 'value' => 'id ASC'),
array('option' => __('Menu order descending', 'ajax-search-pro'), 'value' => 'menu_order DESC'),
array('option' => __('Menu order ascending', 'ajax-search-pro'), 'value' => 'menu_order ASC'),
array('option' => __('Author descending', 'ajax-search-pro'), 'value' => 'author DESC'),
array('option' => __('Author ascending', 'ajax-search-pro'), 'value' => 'author ASC'),
array('option' => __('Random', 'ajax-search-pro'), 'value' => 'RAND()'),
);
$o = new wpdreamsCustomSelect("orderby_primary", __('Primary 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_primary']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsText("orderby_primary_cf", __('Field name', 'ajax-search-pro'), $sd['orderby_primary_cf']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("orderby_primary_cf_type", __('Field type', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('numeric', 'ajax-search-pro'), 'value' => 'numeric'),
array('option' => __('string or date', 'ajax-search-pro'), 'value' => 'string')
),
'value' => $sd['orderby_primary_cf_type']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item wd-secondary-order item-flex-nogrow item-flex-wrap"><?php
$o = new wpdreamsCustomSelect("orderby_secondary", __('Secondary ordering', 'ajax-search-pro'),
array(
'selects' => array_merge($common_orders, array(
array('option' => __('Custom Field descending', 'ajax-search-pro'), 'value' => 'customfs DESC'),
array('option' => __('Custom Field ascending', 'ajax-search-pro'), 'value' => 'customfs ASC')
)),
'value' => $sd['orderby_secondary']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsText("orderby_secondary_cf", __('Field name', 'ajax-search-pro'), $sd['orderby_secondary_cf']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("orderby_secondary_cf_type", __('Field type', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('numeric', 'ajax-search-pro'), 'value' => 'numeric'),
array('option' => __('string or date', 'ajax-search-pro'), 'value' => 'string')
),
'value' => $sd['orderby_secondary_cf_type']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('If two elements match the primary ordering criteria, the <b>Secondary ordering</b> is used.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<p class="infoMsg">
<?php echo __('Separate ordering options are available for <strong>User results</strong>, under the <a class="asp_to_tab" href="#108" tabid="108" data-asp-os-highlight="user_orderby_primary">User Search panel</a>.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("use_post_type_order", __('Use separate ordering for each post type group?', 'ajax-search-pro'), $sd['use_post_type_order']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_Post_Type_Sortalbe("post_type_order", __('Post type results ordering', 'ajax-search-pro'), $sd['post_type_order']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$fields = $sd['results_order'];
// For updating to 4.5
if (strpos($fields, "attachments") === false) $fields = $fields . "|attachments";
$o = new wpdreamsSortable("results_order", __('Mixed results order', 'ajax-search-pro'), $fields);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>

View File

@@ -0,0 +1,67 @@
<fieldset>
<legend><?php echo __('Peepso Groups', 'ajax-search-pro'); ?></legend>
<div class="item item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("peep_gs_public", __('Search Public:', 'ajax-search-pro'), $sd['peep_gs_public']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsYesNo("peep_gs_closed", __(' ..Closed:', 'ajax-search-pro'), $sd['peep_gs_closed']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsYesNo("peep_gs_secret", __(' ..Secret:', 'ajax-search-pro'), $sd['peep_gs_secret']);
$params[$o->getName()] = $o->getData();
?><div>&nbsp;&nbsp;&nbsp;PeepSo groups.</div>
</div>
<div class="item item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("peep_gs_title", __('Search within group titles:', 'ajax-search-pro'), $sd['peep_gs_title']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsYesNo("peep_gs_content", __(' ..and descriptions:', 'ajax-search-pro'), $sd['peep_gs_content']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsYesNo("peep_gs_categories", __(' .. and categories:', 'ajax-search-pro'), $sd['peep_gs_categories']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("peep_gs_exclude", __('Exclude Groups by ID', 'ajax-search-pro'), $sd['peep_gs_exclude']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">Comma separated list.</p>
</div>
</fieldset>
<fieldset>
<legend><?php echo __('Peepso Group Activities - Posts and Comments', 'ajax-search-pro'); ?></legend>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("peep_s_posts", __('Search Posts:', 'ajax-search-pro'), $sd['peep_s_posts']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsYesNo("peep_s_comments", __(' and Comments:', 'ajax-search-pro'), $sd['peep_s_comments']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("peep_pc_follow", __('Search activities only within groups, which the user follows?', 'ajax-search-pro'), $sd['peep_pc_follow']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("peep_pc_public", __('Include activities only from public', 'ajax-search-pro'), $sd['peep_pc_public']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsYesNo("peep_pc_closed", __(' ..Closed:', 'ajax-search-pro'), $sd['peep_pc_closed']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsYesNo("peep_pc_secret", __(' ..Secret:', 'ajax-search-pro'), $sd['peep_pc_secret']);
$params[$o->getName()] = $o->getData();
?><div>&nbsp;&nbsp;&nbsp;PeepSo groups.</div>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('When none selected, all activities are searched, including non-group related.', 'ajax-search-pro') ?>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,131 @@
<fieldset>
<legend>
<?php echo __('Relevance Options', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/relevance-options"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<p class='infoMsg'>
<?php echo __('Every result gets a relevance value based on the weight numbers set below. The weight is the measure of importance.', 'ajax-search-pro'); ?><br/>
<?php echo __('If you wish to change the the results basic ordering, then you can do it under the <a href="#107">General Options -> Ordering</a> panel.', 'ajax-search-pro'); ?>
</p>
<div wd-show-on="search_engine:regular">
<?php
$sd_wht_def = array(
array('option' => '10 - Highest weight', 'value' => 10),
array('option' => '9', 'value' => 9),
array('option' => '8', 'value' => 8),
array('option' => '7', 'value' => 7),
array('option' => '6', 'value' => 6),
array('option' => '5', 'value' => 5),
array('option' => '4', 'value' => 4),
array('option' => '3', 'value' => 3),
array('option' => '2', 'value' => 2),
array('option' => '1 - Lowest weight', 'value' => 1)
);
?>
<div class="item">
<?php
$o = new wpdreamsYesNo("userelevance", __('Use relevance?', 'ajax-search-pro'), $sd['userelevance']);
$params[$o->getName()] = $o->getData();
?>
</div>
<fieldset>
<legend><?php echo __('Exact matches weight', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("etitleweight", __('Title weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['etitleweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("econtentweight", __('Content weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['econtentweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("eexcerptweight", __('Excerpt weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['eexcerptweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("etermsweight", __('Terms weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['etermsweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<fieldset>
<legend><?php echo __('Random matches weight', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("titleweight", __('Title weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['titleweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("contentweight", __('Content weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['contentweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("excerptweight", __('Excerpt weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['excerptweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("termsweight", __('Terms weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['termsweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
</div>
<div wd-show-on="search_engine:index">
<p class='infoMsg'>
<?php echo __('Please use numbers between <b>0 - 500</b>', 'ajax-search-pro'); ?>
</p>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_title_weight", __('Title weight', 'ajax-search-pro'), $sd['it_title_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_content_weight", __('Content weight', 'ajax-search-pro'), $sd['it_content_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_excerpt_weight", __('Excerpt weight', 'ajax-search-pro'), $sd['it_excerpt_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_terms_weight", __('Terms weight', 'ajax-search-pro'), $sd['it_terms_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_cf_weight", __('Custom fields weight', 'ajax-search-pro'), $sd['it_cf_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_author_weight", __('Author weight', 'ajax-search-pro'), $sd['it_author_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,130 @@
<div class="item"><?php
$_it_engine_val = isset($_POST['search_engine']) ? $_POST['search_engine'] : $sd['search_engine'];
$o = new wpdreamsCustomSelect("search_engine", __('Search engine', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => 'Regular engine', 'value' => 'regular'),
array('option' => 'Index table engine', 'value' => 'index')
),
'value' => $sd['search_engine']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo sprintf( __('Index table engine will only work if you have the <a href="%s">index table</a> generated.', 'ajax-search-pro'), get_admin_url() . 'admin.php?page=asp_index_table' ); ?>&nbsp;
<?php echo sprintf( __('To learn more about the pros. and cons. of the index table read the <a href="%s" target="_blank">documentation about the index table</a>.', 'ajax-search-pro'), 'https://documentation.ajaxsearchpro.com/index_table.html' ); ?>
</p>
</div>
<?php
$it_options_visibility = $_it_engine_val == 'index' ? ' hiddend' : '';
?>
<div class="item it_engine_index_d" style="text-align: center;">
<?php echo sprintf( __('Since you have the Index table engine selected, some options here are disabled,<br> because they are available
on the <a href="%s" target="_blank">index table</a> options page.', 'ajax-search-pro'), get_admin_url() . "admin.php?page=asp_index_table" ); ?>
</div>
<div class="item"><?php
$o = new wpdreamsCustomPostTypes("customtypes", __('Search in custom post types', 'ajax-search-pro'),
$sd['customtypes']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item">
<?php
$o = new wpdreamsYesNo("searchincomments", __('Return comments as results?', 'ajax-search-pro'),
$sd['searchincomments']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item it_engine_index">
<?php
$o = new wpdreamsYesNo("searchintitle", __('Search in title?', 'ajax-search-pro'),
$sd['searchintitle']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item it_engine_index">
<?php
$o = new wpdreamsYesNo("searchincontent", __('Search in content?', 'ajax-search-pro'),
$sd['searchincontent']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item it_engine_index">
<?php
$o = new wpdreamsYesNo("searchinexcerpt", __('Search in post excerpts?', 'ajax-search-pro'),
$sd['searchinexcerpt']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item it_engine_index">
<?php
$o = new wpdreamsYesNo("search_in_permalinks", __('Search in post permalinks?', 'ajax-search-pro'),
$sd['search_in_permalinks']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Might not work correctly in some cases unfortunately.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("search_in_ids", __('Search in post (and CPT) IDs?', 'ajax-search-pro'),
$sd['search_in_ids']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item it_engine_index" style="position:relative;">
<div class='asp-setting-search-all-cf'>
<?php
$o = new wpdreamsYesNo("search_all_cf", __('Search all custom fields?', 'ajax-search-pro'),
$sd['search_all_cf']);
$params[$o->getName()] = $o->getData();
?></div>
<div wd-enable-on="search_all_cf:0">
<?php
$o = new wpdreamsCustomFields("customfields", __('..or search in selected custom fields?', 'ajax-search-pro'),
$sd['customfields']);
$params[$o->getName()] = $o->getData();
$params['selected-'.$o->getName()] = $o->getSelected();
?>
</div>
</div>
<div class="item it_engine_index">
<?php $o = new wpdreamsText("post_status", __('Post statuses to search', 'ajax-search-pro'), $sd['post_status']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Comma separated list. WP Defaults: publish, future, draft, pending, private, trash, auto-draft', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item it_engine_index">
<?php $o = new wpdreamsYesNo("post_password_protected", __('Search and return password protected posts?', 'ajax-search-pro'), $sd['post_password_protected']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item it_engine_index">
<?php
$o = new wpdreamsYesNo("searchinterms", __('Search in terms? (categories, tags)', 'ajax-search-pro'),
$sd['searchinterms']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Will search in terms (categories, tags) related to posts.', 'ajax-search-pro'); ?>
</p>
<p class="errorMsg">
<?php echo __('WARNING: <strong>Search in terms</strong> can be database heavy operation. Not recommended for big databases.', 'ajax-search-pro'); ?>
</p>
</div>
<script>
jQuery(function($) {
$('select[name="search_engine"]').change(function() {
if ($(this).val() == 'index') {
$("#wpdreams .item.it_engine_index").css('display', 'none');
$("#wpdreams .item.it_engine_index_d").css('display', 'block');
} else {
$("#wpdreams .item.it_engine_index").css('display', 'block');
$("#wpdreams .item.it_engine_index_d").css('display', 'none');
}
});
$('select[name="search_engine"]').change();
});
</script>

View File

@@ -0,0 +1,78 @@
<div class="item">
<?php
$o = new wpdreamsYesNo("return_categories", __('Return post categories as results?', 'ajax-search-pro'),
$sd['return_categories']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("return_tags", __('Return post tags as results?', 'ajax-search-pro'),
$sd['return_tags']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTaxonomySelect("return_terms", __('Return taxonomy terms as results', 'ajax-search-pro'), array(
"value"=>$sd['return_terms'],
"type"=>"include"));
$params[$o->getName()] = $o->getData();
$params['selected-'.$o->getName()] = $o->getSelected();
?>
</div>
<div wd-disable-on="return_categories:0;return_tags:0;return_terms:">
<div class="item">
<?php
$o = new wpdreamsYesNo("search_term_titles", __('Search term titles?', 'ajax-search-pro'),
$sd['search_term_titles']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("search_term_descriptions", __('Search term descriptions?', 'ajax-search-pro'),
$sd['search_term_descriptions']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("search_term_meta", __('Search in term metadata?', 'ajax-search-pro'), $sd['search_term_meta']);
$params[$o->getName()] = $o->getData();
?>
<p class="errorMsg">
<?php echo __('<strong>NOTICE:</strong> This may slow down the search.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("display_number_posts_affected", __('Display the number of posts associated with the terms?', 'ajax-search-pro'),
$sd['display_number_posts_affected']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Will display the number of associated posts in a bracket after the term.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("return_terms_exclude_empty", __('Exclude empty taxonomy terms?', 'ajax-search-pro'),
$sd['return_terms_exclude_empty']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Ex. categories that does not contain posts', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("return_terms_exclude", __('Exclude categories/terms by ID', 'ajax-search-pro'),
$sd['return_terms_exclude']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Comma "," separated list of category/term IDs.', 'ajax-search-pro'); ?>
</p>
</div>
</div>

View File

@@ -0,0 +1,172 @@
<div class="item">
<?php
$o = new wpdreamsYesNo("user_search", __('Enable search in users?', 'ajax-search-pro'),
$sd['user_search']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div wd-disable-on="user_search:0">
<div class="item">
<?php
$o = new wpdreamsYesNo("user_login_search", __('Search in user login names?', 'ajax-search-pro'),
$sd['user_login_search']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("user_display_name_search", __('Search in user display names?', 'ajax-search-pro'),
$sd['user_display_name_search']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("user_first_name_search", __('Search in user first names?', 'ajax-search-pro'),
$sd['user_first_name_search']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("user_last_name_search", __('Search in user last names?', 'ajax-search-pro'),
$sd['user_last_name_search']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("user_bio_search", __('Search in user bio?', 'ajax-search-pro'),
$sd['user_bio_search']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("user_email_search", __('Search in user email addresses?', 'ajax-search-pro'),
$sd['user_email_search']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item wd-primary-order item-flex-nogrow item-flex-wrap"><?php
$o = new wpdreamsCustomSelect("user_orderby_primary", __('Primary ordering', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Relevance', 'ajax-search-pro'), 'value' => 'relevance DESC'),
array('option' => __('Title descending', 'ajax-search-pro'), 'value' => 'title DESC'),
array('option' => __('Title ascending', 'ajax-search-pro'), 'value' => 'title ASC'),
array('option' => __('Date descending', 'ajax-search-pro'), 'value' => 'date DESC'),
array('option' => __('Date ascending', 'ajax-search-pro'), 'value' => 'date ASC'),
array('option' => __('ID descending', 'ajax-search-pro'), 'value' => 'id DESC'),
array('option' => __('ID ascending', 'ajax-search-pro'), 'value' => 'id ASC'),
array('option' => __('Random', 'ajax-search-pro'), 'value' => 'RAND()'),
array('option' => __('Custom Field descending', 'ajax-search-pro'), 'value' => 'customfp DESC'),
array('option' => __('Custom Field ascending', 'ajax-search-pro'), 'value' => 'customfp ASC')
),
'value' => $sd['user_orderby_primary']
));
$params[$o->getName()] = $o->getData();
?>
<div wd-show-on="user_orderby_primary:customfp DESC,customfp ASC">
<?php
$o = new wpdreamsText("user_orderby_primary_cf", __('Field name', 'ajax-search-pro'), $sd['orderby_primary_cf']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div wd-show-on="user_orderby_primary:customfp DESC,customfp ASC">
<?php
$o = new wpdreamsCustomSelect("user_orderby_primary_cf_type", __('Field type', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('numeric', 'ajax-search-pro'), 'value' => 'numeric'),
array('option' => __('string or date', 'ajax-search-pro'), 'value' => 'string')
),
'value' => $sd['user_orderby_primary_cf_type']
));
$params[$o->getName()] = $o->getData();
?>
</div>
</div>
<div class="item wd-secondary-order item-flex-nogrow item-flex-wrap"><?php
$o = new wpdreamsCustomSelect("user_orderby_secondary", __('Secondary result ordering', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Relevance', 'ajax-search-pro'), 'value' => 'relevance DESC'),
array('option' => __('Title descending', 'ajax-search-pro'), 'value' => 'title DESC'),
array('option' => __('Title ascending', 'ajax-search-pro'), 'value' => 'title ASC'),
array('option' => __('Date descending', 'ajax-search-pro'), 'value' => 'date DESC'),
array('option' => __('Date ascending', 'ajax-search-pro'), 'value' => 'date ASC'),
array('option' => __('ID descending', 'ajax-search-pro'), 'value' => 'id DESC'),
array('option' => __('ID ascending', 'ajax-search-pro'), 'value' => 'id ASC'),
array('option' => __('Random', 'ajax-search-pro'), 'value' => 'RAND()'),
array('option' => __('Custom Field descending', 'ajax-search-pro'), 'value' => 'customfs DESC'),
array('option' => __('Custom Field ascending', 'ajax-search-pro'), 'value' => 'customfs ASC')
),
'value' => $sd['user_orderby_secondary']
));
$params[$o->getName()] = $o->getData();
?>
<div wd-show-on="user_orderby_secondary:customfs DESC,customfs ASC">
<?php
$o = new wpdreamsText("user_orderby_secondary_cf", __('Field name', 'ajax-search-pro'), $sd['orderby_secondary_cf']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div wd-show-on="user_orderby_secondary:customfs DESC,customfs ASC">
<?php
$o = new wpdreamsCustomSelect("user_orderby_secondary_cf_type", __('Field type', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('numeric', 'ajax-search-pro'), 'value' => 'numeric'),
array('option' => __('string or date', 'ajax-search-pro'), 'value' => 'string')
),
'value' => $sd['user_orderby_secondary_cf_type']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('If two elements match the primary ordering criteria, the <b>Secondary ordering</b> is used.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsUserRoleSelect("user_search_exclude_roles", __('User roles exclude', 'ajax-search-pro'),
$sd['user_search_exclude_roles']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_UserSelect("user_search_exclude_users", __('Exclude or Include users from results', 'ajax-search-pro'), array(
"value"=>$sd['user_search_exclude_users'],
'args'=> array(
'show_type' => 1,
'show_all_users_option' => 0
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_UserMeta("user_search_meta_fields", __('Search in following user meta fields', 'ajax-search-pro'), array(
"value"=>$sd['user_search_meta_fields'],
'args'=> array()
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBP_XProfileFields("user_bp_fields", __('Search in these BP Xprofile fields', 'ajax-search-pro'),
$sd['user_bp_fields']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<p>
<?php echo sprintf( __('To change the user result URL or Title, Content fields, please go to <a class="asp_to_tab" href="%s" tabid="%s">Advanced Options -> Content</a> panel.', 'ajax-search-pro'), '#701', '701' ); ?>
</p>
</div>
</div>

View File

@@ -0,0 +1,135 @@
<?php
$_red_opts = array(
array("option" => __('Trigger live search', 'ajax-search-pro'), "value" => "ajax_search"),
array("option" => __('Redirect to: First matching result', 'ajax-search-pro'), "value" => "first_result"),
array("option" => __('Redirect to: Results page', 'ajax-search-pro'), "value" => "results_page"),
array("option" => __('Redirect to: Woocommerce results page', 'ajax-search-pro'), "value" => "woo_results_page"),
array("option" => __('Redirect to: Elementor post widget page', 'ajax-search-pro'), "value" => "elementor_page"),
array("option" => __('Redirect to: Custom URL', 'ajax-search-pro'), "value" => "custom_url"),
array("option" => __('Do nothing', 'ajax-search-pro'), "value" => "nothing")
);
if ( !class_exists("WooCommerce") ) unset($_red_opts[3]);
?>
<ul id="subtabs" class='tabs'>
<li><a tabid="101" class='subtheme current'><?php echo __('Post Type Search', 'ajax-search-pro'); ?></a></li>
<li><a tabid="105" class='subtheme'><?php echo __('Taxonomy Terms Search', 'ajax-search-pro'); ?></a></li>
<li><a tabid="109" class='subtheme'><?php echo __('Media Files Search', 'ajax-search-pro'); ?></a></li>
<li><a tabid="108" class='subtheme'><?php echo __('User Search', 'ajax-search-pro'); ?></a></li>
<li><a tabid="103" class='subtheme'><?php echo __('Image Options', 'ajax-search-pro'); ?></a></li>
<?php if ( function_exists('bp_core_get_user_domain') ): ?>
<li><a tabid="104" class='subtheme'><?php echo __('BuddyPress', 'ajax-search-pro'); ?></a></li>
<?php endif; ?>
<?php if ( class_exists('PeepSoGroup') ): ?>
<li><a tabid="112" class='subtheme'><?php echo __('PeepSo', 'ajax-search-pro'); ?></a></li>
<?php endif; ?>
<li><a tabid="111" class='subtheme'><?php echo __('Limits', 'ajax-search-pro'); ?></a></li>
<li><a tabid="107" class='subtheme'><?php echo __('Ordering', 'ajax-search-pro'); ?></a></li>
<li><a tabid="113" class='subtheme'><?php echo __('Grouping & Other', 'ajax-search-pro'); ?></a></li>
<li><a tabid="114" class='subtheme'><?php echo __('Relevance Options', 'ajax-search-pro'); ?></a></li>
</ul>
<div class='tabscontent'>
<div tabid="101">
<fieldset>
<legend>
<?php echo __('Post Type Search', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/general-settings/search-in-posts-and-pages"><span class="fa fa-book"></span>
<?php echo __('Post Types', 'ajax-search-pro'); ?>
</a>
<a target="_blank" href="https://documentation.ajaxsearchpro.com/general-settings/search-title-content-excerpt"><span class="fa fa-book"></span>
<?php echo __('Fields', 'ajax-search-pro'); ?>
</a>
<a target="_blank" href="https://documentation.ajaxsearchpro.com/general-settings/search-in-terms-categories-tags..."><span class="fa fa-book"></span>
<?php echo __('Categories', 'ajax-search-pro'); ?>
</a>
<a target="_blank" href="https://documentation.ajaxsearchpro.com/general-settings/search-in-custom-fields"><span class="fa fa-book"></span>
<?php echo __('Custom Fields', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<?php include( ASP_PATH . 'backend/tabs/instance/general/sources.php'); ?>
</fieldset>
</div>
<div tabid="103">
<fieldset>
<legend>
<?php echo __('Image Options', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/general-settings/image-options"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<?php include(ASP_PATH."backend/tabs/instance/general/image_options.php"); ?>
</fieldset>
</div>
<div tabid="104">
<fieldset>
<legend><?php echo __('BuddyPress Options', 'ajax-search-pro'); ?></legend>
<?php include(ASP_PATH."backend/tabs/instance/general/buddypress_options.php"); ?>
</fieldset>
</div>
<div tabid="108">
<fieldset>
<legend>
<?php echo __('User Search', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/general-settings/search-in-users"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<?php include(ASP_PATH."backend/tabs/instance/general/user_search.php"); ?>
</fieldset>
</div>
<div tabid="105">
<fieldset>
<legend>
<?php echo __('Searching Taxonomy Terms and returning them as Results', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/general-settings/categories-and-terms-as-results"><span class="fa fa-book"></span>
<?php echo __('Taxonomy Terms as results', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<?php include(ASP_PATH."backend/tabs/instance/general/sources2.php"); ?>
</fieldset>
</div>
<div tabid="111">
<fieldset>
<legend><?php echo __('Limits', 'ajax-search-pro'); ?></legend>
<?php include(ASP_PATH."backend/tabs/instance/general/limits.php"); ?>
</fieldset>
</div>
<?php if ( class_exists('PeepSoGroup') ): ?>
<div tabid="112">
<?php include(ASP_PATH."backend/tabs/instance/general/peepso.php"); ?>
</div>
<?php endif; ?>
<div tabid="107">
<?php include(ASP_PATH."backend/tabs/instance/general/ordering.php"); ?>
</div>
<div tabid="113">
<?php include(ASP_PATH."backend/tabs/instance/general/grouping.php"); ?>
</div>
<div tabid="109">
<fieldset>
<legend>
<?php echo __('Media File Search', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/general-settings/search-in-attachments"><span class="fa fa-book"></span>
<?php echo __('Search in Media Files', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<?php include(ASP_PATH."backend/tabs/instance/general/attachment_results.php"); ?>
</fieldset>
</div>
<div tabid="114">
<?php include(ASP_PATH."backend/tabs/instance/general/relevance.php"); ?>
</div>
</div>
<div class="item">
<input name="reset_<?php echo $search['id']; ?>" class="asp_submit asp_submit_transparent asp_submit_reset" type="button" value="<?php echo esc_attr__('Restore defaults', 'ajax-search-pro'); ?>">
<input name="submit_<?php echo $search['id']; ?>" type="submit" value="<?php echo esc_attr__('Save all tabs!', 'ajax-search-pro'); ?>" />
</div>

View File

@@ -0,0 +1,162 @@
<div class="item">
<?php
$o = new wpdreamsYesNo("box_compact_layout", __('Compact layout mode', 'ajax-search-pro'), $sd['box_compact_layout']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('In compact layout only the search magnifier is visible, and the user has to click on the magnifier first to show the search bar.', 'ajax-search-pro'); ?>
</p>
</div>
<div wd-disable-on="box_compact_layout:0">
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("box_compact_layout_desktop", __('Compact mode on Devices: ', 'ajax-search-pro'), array(
'selects'=>array(
array('option'=>'Enabled', 'value'=>'1'),
array('option'=>'Disabled', 'value'=>'0')
),
'icon'=>'desktop',
'value'=>$sd['box_compact_layout_desktop']
)
);
$o = new wpdreamsCustomSelect("box_compact_layout_tablet", __('', 'ajax-search-pro'), array(
'selects'=>array(
array('option'=>'Enabled', 'value'=>'1'),
array('option'=>'Disabled', 'value'=>'0')
),
'icon'=>'tablet',
'value'=>$sd['box_compact_layout_tablet']
)
);
$o = new wpdreamsCustomSelect("box_compact_layout_mobile", __('', 'ajax-search-pro'), array(
'selects'=>array(
array('option'=>'Enabled', 'value'=>'1'),
array('option'=>'Disabled', 'value'=>'0')
),
'icon'=>'phone',
'value'=>$sd['box_compact_layout_mobile']
)
);
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("box_compact_layout_focus_on_open", __('Auto focus the input field, after the compact box opens', 'ajax-search-pro'), $sd['box_compact_layout_focus_on_open']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("box_compact_close_on_magn", __('Close on magnifier click', 'ajax-search-pro'), $sd['box_compact_close_on_magn']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Closes the box when the magnifier is clicked.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("box_compact_close_on_document", __('Close on document click', 'ajax-search-pro'), $sd['box_compact_close_on_document']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Closes the box when the document is clicked.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item item-flex-nogrow item-flex-wrap wpd-isotopic-width" style="flex-wrap: wrap;">
<?php
$o = new wpdreamsTextSmall("box_compact_width", __('Compact box final width', 'ajax-search-pro'), array(
'icon' => 'desktop',
'value' => $sd['box_compact_width']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("box_compact_width_tablet", '', array(
'icon' => 'tablet',
'value' => $sd['box_compact_width_tablet']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("box_compact_width_phone", '', array(
'icon' => 'phone',
'value' => $sd['box_compact_width_phone']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..) Default: <strong>%s</strong>', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '200px', '50%', 'auto', '100%'
); ?>
<br>
<?php echo __('You might need to adjust this to a static value like 200px, as 100% is not always working in compact mode.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("box_compact_overlay", __('Display background overlay?', 'ajax-search-pro'), $sd['box_compact_overlay']);
$params[$o->getName()] = $o->getData();
?>
<?php
$o = new wpdreamsColorPicker("box_compact_overlay_color", __(' color ', 'ajax-search-pro'), $sd['box_compact_overlay_color']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('Overlay only works with if the <strong>box position is set to Fixed</strong> below.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item"><?php
$o = new wpdreamsCustomSelect("box_compact_float", __('Compact layout alignment', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('No floating', 'ajax-search-pro'), 'value' => 'none'),
array('option' => __('Left', 'ajax-search-pro'), 'value' => 'left'),
array('option' => __('Right', 'ajax-search-pro'), 'value' => 'right')
),
'value' => $sd['box_compact_float']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('By default the search box floats with the theme default (none). You can change that here.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item"><?php
$o = new wpdreamsCustomSelect("box_compact_position", __('Compact search box position', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Static (default)', 'ajax-search-pro'), 'value' => 'static'),
array('option' => __('Fixed', 'ajax-search-pro'), 'value' => 'fixed'),
array('option' => __('Absolute', 'ajax-search-pro'), 'value' => 'absolute')
),
'value' => $sd['box_compact_position']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('In absolute position the search can not affect it\'s parent element height as absolutely positioned elements are removed from the flow, thus ignored by other elements.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$option_name = "box_compact_screen_position";
$option_desc = __('Position values', 'ajax-search-pro');
$option_expl = __('You can use auto or include the unit as well, example: 10px or 1em or 90%', 'ajax-search-pro');
$o = new wpdreamsFour($option_name, $option_desc,
array(
"desc" => $option_expl,
"value" => $sd[$option_name]
)
);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("box_compact_position_z", __('z-index', 'ajax-search-pro'), $sd['box_compact_position_z']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('In case you have some other elements floating above/below the search icon, you can adjust it\'s position with the z-index.', 'ajax-search-pro'); ?>
</p>
</div>
</div>

View File

@@ -0,0 +1,152 @@
<fieldset>
<legend>
<?php echo __('More results text and behavior', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/layout-settings/more-results-link"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("showmoreresults", __('Show \'More results..\' text in the bottom of the search box?', 'ajax-search-pro'), $sd['showmoreresults']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("more_results_action", __(' action', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Load more ajax results', 'ajax-search-pro'), 'value' => 'ajax'),
array('option' => __('Redirect to Results Page', 'ajax-search-pro'), 'value' => 'results_page'),
array('option' => __('Redirect to WooCommerce Results Page', 'ajax-search-pro'), 'value' => 'woo_results_page'),
array('option' => __('Redirect to Elementor post widget page', 'ajax-search-pro'), 'value' => 'elementor_page'),
array('option' => __('Redirect to custom URL', 'ajax-search-pro'), 'value' => 'redirect')
),
'value'=>$sd['more_results_action']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('"Load more ajax results" option will not work if Polaroid layout or Grouping is activated, or if results are removed when no images are present.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wd_CPTSearchCallBack('more_redirect_elementor', __('Select a page with an Elementor Pro posts widget', 'ajax-search-pro'), array(
'value'=>$sd['more_redirect_elementor'],
'args'=> array(
'controls_position' => 'left',
'class'=>'wpd-text-right'
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsText("more_redirect_url", __('\' Show more results..\' url', 'ajax-search-pro'), $sd['more_redirect_url']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("more_results_infinite", __('<strong>Infinite scroll</strong> - Trigger loading more results on scrolling near the end of results list', 'ajax-search-pro'), $sd['more_results_infinite']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsText("showmoreresultstext", __('\' Show more results..\' text', 'ajax-search-pro'), $sd['showmoreresultstext']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("more_redirect_location", __(' location: ', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => 'Use same tab', 'value' => 'same'),
array('option' => 'Open new tab', 'value' => 'new')
),
'value' => $sd['more_redirect_location']
));
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<fieldset>
<legend>
<?php echo __('Results text keyword highlighter - Live results list', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/layout-settings/search-phrase-highlighter"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item"><?php
$o = new wpdreamsYesNo("highlight", __('Highlight search text in live results?', 'ajax-search-pro'), $sd['highlight']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item"><?php
$o = new wpdreamsYesNo("highlightwholewords", __('Highlight only whole words?', 'ajax-search-pro'), $sd['highlightwholewords']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item"><?php
$o = new wpdreamsColorPicker("highlightcolor", __('Highlight text color', 'ajax-search-pro'), $sd['highlightcolor']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item"><?php
$o = new wpdreamsColorPicker("highlightbgcolor", __('Highlight-text background color', 'ajax-search-pro'), $sd['highlightbgcolor']);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<fieldset>
<legend>
<?php echo __('Results text keyword highlighter - Single Result & Search Results page', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/layout-settings/search-phrase-highlighter"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="errorMsg">
<?php echo __('<strong>Disclaimer: </strong> This feature is highly experimental, and may not work correctly in all cases.', 'ajax-search-pro'); ?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("single_highlight", __('Highlight search text on single result pages?', 'ajax-search-pro'), $sd['single_highlight']);
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("result_page_highlight", __('Highlight search text on the Search Results page?', 'ajax-search-pro'), $sd['result_page_highlight']);
?>
</div>
<div wd-disable-on="single_highlight:0;result_page_highlight:0">
<div class="item"><?php
$o = new wpdreamsYesNo("single_highlightwholewords", __('Highlight only whole words?', 'ajax-search-pro'), $sd['single_highlightwholewords']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item"><?php
$o = new wpdreamsColorPicker("single_highlightcolor", __('Highlight text color', 'ajax-search-pro'), $sd['single_highlightcolor']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item"><?php
$o = new wpdreamsColorPicker("single_highlightbgcolor", __('Highlight-text background color', 'ajax-search-pro'), $sd['single_highlightbgcolor']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("single_highlight_scroll", __('Scroll to the first keyword match if possible?', 'ajax-search-pro'), $sd['single_highlight_scroll']);
$o = new wpdreamsTextSmall("single_highlight_offset", __('scroll offset (px)', 'ajax-search-pro'), $sd['single_highlight_offset']);
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('A negative offset will move the window upwards, a positive downwards. Default: 0', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item"><?php
$o = new wpdreamsText("single_highlight_selector", __('Results container DOM element selector', 'ajax-search-pro'), $sd['single_highlight_selector']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('Optional, but very useful - it tells which element contains exactly the result content, so words are highlighted only on the given section of the page.', 'ajax-search-pro'); ?>
</div>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,31 @@
<div class="item">
<?php
$o = new wpdreamsYesNo("results_click_blank", __('When clicking on a result, open it in a new window?', 'ajax-search-pro'), $sd['results_click_blank']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("scroll_to_results", __('Scroll the browser window to the result list, when the search starts?', 'ajax-search-pro'), $sd['scroll_to_results']);
$o = new wpdreamsTextSmall("scroll_to_results_offset", __('scroll offset (px)', 'ajax-search-pro'), $sd['scroll_to_results_offset']);
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('A negative offset will move the window upwards, a positive downwards. Default: 0', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("resultareaclickable", __('Make the whole result area clickable?', 'ajax-search-pro'), $sd['resultareaclickable']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("close_on_document_click", __('Close results when the search loses focus?', 'ajax-search-pro'), $sd['close_on_document_click']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Closes the results list when clicking outside the search elements.', 'ajax-search-pro'); ?>
</p>
</div>

View File

@@ -0,0 +1,261 @@
<fieldset>
<legend>
<?php echo __('Results layout', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/layout-settings/result-layout-types"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("resultstype", __('Results layout type', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Vertical Results', 'ajax-search-pro'), 'value' => 'vertical'),
array('option' => __('Horizontal Results', 'ajax-search-pro'), 'value' => 'horizontal'),
array('option' => __('Isotopic Results', 'ajax-search-pro'), 'value' => 'isotopic'),
array('option' => __('Polaroid style Results', 'ajax-search-pro'), 'value' => 'polaroid')
),
'value'=>$sd['resultstype']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<p class='infoMsg'>
<?php echo __('If you are using <b>Polaroid</b> layout type, then <b>block</b> position is highly recommended!', 'ajax-search-pro'); ?>
</p>
<div class="item item-flex-nogrow item-conditional" style="flex-wrap: wrap;">
<?php
$o = new wpdreamsCustomSelect("resultsposition", __('Results layout position', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Hover - over content', 'ajax-search-pro'), 'value' => 'hover'),
array('option' => __('Block - pushes content', 'ajax-search-pro'), 'value' => 'block')
),
'value'=>$sd['resultsposition']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("results_snap_to", __(' and snap the results to the ', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('left side of the search', 'ajax-search-pro'), 'value' => 'left'),
array('option' => __('right side of the search', 'ajax-search-pro'), 'value' => 'right'),
array('option' => __('the center', 'ajax-search-pro'), 'value' => 'center')
),
'value'=>$sd['results_snap_to']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap wpd-isotopic-width">
<?php
$o = new wpdreamsTextSmall("results_width", __('Results box width', 'ajax-search-pro'), array(
'icon' => 'desktop',
'value' => $sd['results_width']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("results_width_tablet", '', array(
'icon' => 'tablet',
'value' => $sd['results_width_tablet']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("results_width_phone", '', array(
'icon' => 'phone',
'value' => $sd['results_width_phone']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..) Default: <strong>%s</strong>', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '10px', '50%', 'auto', 'auto'
); ?>
</div>
</div>
<div class="item">
<?php
$o = new wd_ANInputs("results_margin", __('Results container margin', 'ajax-search-pro'),
array(
'args' => array(
'inputs' => array(
array( __('Top', 'ajax-search-pro'), '0px'),
array( __('Right', 'ajax-search-pro'), '0px'),
array( __('Bottom', 'ajax-search-pro'), '0px'),
array( __('Left', 'ajax-search-pro'), '0px')
)
),
'value' => $sd['results_margin']
));
?>
<div class="descMsg">
<?php echo sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..) Default: <strong>%s</strong>', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '10px', '50%', 'auto', 'auto'
); ?>
</div>
</div>
</fieldset>
<fieldset>
<legend>
<?php echo __('Result container header', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/layout-settings/results-information-box"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item">
<?php
$o = new wpdreamsYesNo("results_top_box", __('Display the results information box?', 'ajax-search-pro'), $sd['results_top_box']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Additional information on top of the results list, like the phrase and the results count. Only displays when there are results.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("results_top_box_text", __('Information box text, when a search phrase is present', 'ajax-search-pro'), $sd['results_top_box_text']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Supports HTML and variables {phrase}, {results_count} and {results_count_total}', 'ajax-search-pro'); ?>
</p>
<?php
$o = new wd_TextareaExpandable("results_top_box_text_nophrase", __('Information box text, when the search phrase is empty', 'ajax-search-pro'), $sd['results_top_box_text_nophrase']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Supports HTML and variables {results_count} and {results_count_total}', 'ajax-search-pro'); ?>
</p>
</div>
</fieldset>
<fieldset>
<legend>
<?php echo __('Results fields - Post type results', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/layout-settings/content-author-date-and-description-in-results"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item item-flex-nogrow item-conditional" style="flex-wrap: wrap;">
<?php
$o = new wpdreamsYesNo("showauthor", __('Show author in results?', 'ajax-search-pro'), $sd['showauthor']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("author_field", __('Author field', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => 'Display name', 'value' => 'display_name'),
array('option' => 'Login name', 'value' => 'user_login')
),
'value' => $sd['author_field']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-conditional" style="flex-wrap: wrap;">
<?php
$o = new wpdreamsYesNo("showdate", __('Show date in results?', 'ajax-search-pro'), $sd['showdate']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsYesNo("custom_date", __('Use custom date format?', 'ajax-search-pro'),
$sd['custom_date']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsText("custom_date_format", __(' format', 'ajax-search-pro'),
$sd['custom_date_format']);
$params[$o->getName()] = $o->getData();
?>
<div class='descMsg' style="min-width: 100%;
flex-wrap: wrap;
flex-basis: auto;
flex-grow: 1;
box-sizing: border-box;">
<?php echo __('If turned OFF, it will use WordPress defaults. Default custom value: <b>Y-m-d H:i:s</b>', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("post_type_res_title_length", __('Max. title field length', 'ajax-search-pro'), $sd['post_type_res_title_length']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-conditional" style="flex-wrap: wrap;">
<?php
$o = new wpdreamsYesNo("showdescription", __('Show description (content) in results?', 'ajax-search-pro'), $sd['showdescription']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("descriptionlength", __('Description (content) length', 'ajax-search-pro'), $sd['descriptionlength']);
$params[$o->getName()] = $o->getData();
?>
<div class='descMsg' style="min-width: 100%;flex-wrap: wrap;flex-basis: auto;flex-grow: 1;box-sizing: border-box;">
<?php echo __('Content length in characters.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item item item-flex-nogrow item-conditional" style="flex-wrap: wrap;">
<?php
$o = new wpdreamsYesNo("description_context", __('Display the description context?', 'ajax-search-pro'), $sd['description_context']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("description_context_depth", __(' ..depth', 'ajax-search-pro'), $sd['description_context_depth']);
$params[$o->getName()] = $o->getData();
?><div>characters.</div>
<div class='descMsg' style="min-width: 100%;
flex-wrap: wrap;
flex-basis: auto;
flex-grow: 1;
box-sizing: border-box;">
<?php echo __('Will display the description from around the search phrase, not from the beginning.', 'ajax-search-pro'); ?>
</div>
</div>
</fieldset>
<fieldset>
<legend>
<?php echo __('Results fields - Taxonomy term results', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/layout-settings/content-author-date-and-description-in-results"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item">
<?php
$o = new wpdreamsTextSmall("tax_res_title_length", __('Max. title field length', 'ajax-search-pro'), $sd['tax_res_title_length']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-conditional" style="flex-wrap: wrap;">
<?php
$o = new wpdreamsYesNo("tax_res_showdescription", __('Show description (content) in taxonomy term results?', 'ajax-search-pro'), $sd['tax_res_showdescription']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("tax_res_descriptionlength", __('Description (content) length', 'ajax-search-pro'), $sd['tax_res_descriptionlength']);
$params[$o->getName()] = $o->getData();
?>
<div class='descMsg' style="min-width: 100%;flex-wrap: wrap;flex-basis: auto;flex-grow: 1;box-sizing: border-box;">
<?php echo __('Content length in characters.', 'ajax-search-pro'); ?>
</div>
</div>
</fieldset>
<fieldset>
<legend>
<?php echo __('Results fields - User results', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/layout-settings/content-author-date-and-description-in-results"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item">
<?php
$o = new wpdreamsTextSmall("user_res_title_length", __('Max. title field length', 'ajax-search-pro'), $sd['user_res_title_length']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-conditional" style="flex-wrap: wrap;">
<?php
$o = new wpdreamsYesNo("user_res_showdescription", __('Show description (content) in user results?', 'ajax-search-pro'), $sd['user_res_showdescription']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("user_res_descriptionlength", __('Description (content) length', 'ajax-search-pro'), $sd['user_res_descriptionlength']);
$params[$o->getName()] = $o->getData();
?>
<div class='descMsg' style="min-width: 100%;flex-wrap: wrap;flex-basis: auto;flex-grow: 1;box-sizing: border-box;">
<?php echo __('Content length in characters.', 'ajax-search-pro'); ?>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,101 @@
<div class="item">
<?php
$o = new wpdreamsText("defaultsearchtext", __('Search box placeholder text', 'ajax-search-pro'), $sd['defaultsearchtext']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Default search placeholder text appearing in the search bar.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("focus_on_pageload", __('Focus the search input when the page is loaded? (desktop devices only)', 'ajax-search-pro'), $sd['box_sett_hide_box']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("box_alignment", __('Search box alignment', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Inherit', 'ajax-search-pro'), 'value' => 'inherit'),
array('option' => __('Center', 'ajax-search-pro'), 'value' => 'center'),
array('option' => __('Left', 'ajax-search-pro'), 'value' => 'left'),
array('option' => __('Right', 'ajax-search-pro'), 'value' => 'right')
),
'value' => $sd['box_alignment']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('By default the plugin follows the parent element alignment. This option might not have an effect if the parent element is displayed as "table" or "flex".', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsTextSmall('box_margin_top', __('Search box Top Margin', 'ajax-search-pro'),
$sd['box_margin_top']);
$o = new wpdreamsTextSmall('box_margin_bottom', __('Bottom Margin', 'ajax-search-pro'),
$sd['box_margin_bottom']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..) Default: <strong>%s</strong>', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '12px', '5vh', 'auto', '0'
); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("box_sett_hide_box", __('Hide the search box completely, display settings only?', 'ajax-search-pro'), $sd['box_sett_hide_box']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('If enabled, the search box will be hidden, and the Frontend settings will be displayed instead.', 'ajax-search-pro'); ?>
</p>
</div>
<fieldset>
<legend>
<?php echo __('Auto Populate', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/frontend-search-settings/search-button"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("auto_populate", __('Display results by default when the page loads (auto populate)?', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Disabled', 'ajax-search-pro'), 'value' => 'disabled'),
array('option' => __('Enabled - Results for a search phrase', 'ajax-search-pro'), 'value' => 'phrase'),
array('option' => __('Enabled - Latest results', 'ajax-search-pro'), 'value' => 'latest'),
array('option' => __('Enabled - Random results', 'ajax-search-pro'), 'value' => 'random')
),
'value' => $sd['auto_populate']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('If enabled, the search will automatically populate on page load based on the selected configuration. The configuration and the
frontend search options <strong>WILL be taken into account</strong> as if a normal search was made!', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsText("auto_populate_phrase", __('Phrase', 'ajax-search-pro'), $sd['auto_populate_phrase']);
$params[$o->getName()] = $o->getData();
?>&nbsp;&nbsp;&nbsp;&nbsp;
<?php
$o = new wpdreamsTextSmall("auto_populate_count", __(' Results count', 'ajax-search-pro'), $sd['auto_populate_count']);
$params[$o->getName()] = $o->getData();
?>
<div class="errorMsg hiddend autop-count-err">
<?php echo __('The <strong>Results Count</strong> option is <strong>Disabled</strong> for compatibility reasons, because the <a class="asp_to_tab" tabid="405" href="#405">Load more feature</a> is enabled.
The default results count will be used, that is set under the <a class="asp_to_tab" tabid="111" href="#111">General Options -> Limits</a> panel.', 'ajax-search-pro'); ?>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,48 @@
<ul id="subtabs" class='tabs'>
<li><a tabid="401" class='subtheme current'><?php echo __('Search box layout', 'ajax-search-pro'); ?></a></li>
<li><a tabid="402" class='subtheme'><?php echo __('Results layout & Fields', 'ajax-search-pro'); ?></a></li>
<li><a tabid="403" class='subtheme'><?php echo __('Results Behaviour', 'ajax-search-pro'); ?></a></li>
<li><a tabid="405" class='subtheme'><?php echo __('Highlighter and Load more feature', 'ajax-search-pro'); ?></a></li>
<li><a tabid="404" class='subtheme'><?php echo __('Compact box layout', 'ajax-search-pro'); ?></a></li>
</ul>
<div class='tabscontent'>
<div tabid="401">
<?php include(ASP_PATH."backend/tabs/instance/layout/search_box_layout.php"); ?>
</div>
<div tabid="402">
<?php include(ASP_PATH."backend/tabs/instance/layout/results_layout.php"); ?>
</div>
<div tabid="403">
<fieldset>
<legend>
<?php echo __('Results Behaviour', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/layout-settings/results-behavior"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<?php include(ASP_PATH."backend/tabs/instance/layout/results_behaviour.php"); ?>
</fieldset>
</div>
<div tabid="404">
<fieldset>
<legend>
<?php echo __('Compact Box layout', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/layout-settings/compact-search-box-layout"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<?php include(ASP_PATH."backend/tabs/instance/layout/compact_box_layout.php"); ?>
</fieldset>
</div>
<div tabid="405">
<?php include(ASP_PATH."backend/tabs/instance/layout/highlight_loadmore.php"); ?>
</div>
</div>
<div class="item">
<input name="reset_<?php echo $search['id']; ?>" class="asp_submit asp_submit_transparent asp_submit_reset" type="button" value="<?php echo esc_attr__('Restore defaults', 'ajax-search-pro'); ?>">
<input name="submit_<?php echo $search['id']; ?>" type="submit" value="<?php echo esc_attr__('Save all tabs!', 'ajax-search-pro'); ?>" />
</div>

View File

@@ -0,0 +1,41 @@
<div class='item'>
<p class='infoMsg'>
<?php echo __('If you not choose any site, then the <strong>currently active</strong> blog will be used!<br />
Also, you can use the same search on multiple blogs!', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("searchinblogtitles", __('Search in blog titles?', 'ajax-search-pro'),
$sd['searchinblogtitles']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsCustomSelect("blogtitleorderby", __('Result ordering', 'ajax-search-pro'), array(
'selects'=> array(
array('option' => __('Blog titles descending', 'ajax-search-pro'), 'value' => 'desc'),
array('option' => __('Blog titles ascending', 'ajax-search-pro'), 'value' => 'asc')
),
'value'=> $sd['blogtitleorderby']
) );
$params[$o->getName()] = $o->getData();
?></div>
<div class="item">
<?php
$o = new wpdreamsText("blogresultstext", __('Blog results group default text', 'ajax-search-pro'),
$sd['blogresultstext']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsBlogselect("blogs", __('Blogs', 'ajax-search-pro'),
$sd['blogs']);
$params[$o->getName()] = $o->getData();
$params['selected-'.$o->getName()] = $o->getSelected();
?>
</div>
<div class="item">
<input name="reset_<?php echo $search['id']; ?>" class="asp_submit asp_submit_transparent asp_submit_reset" type="button" value="<?php echo esc_attr__('Restore defaults', 'ajax-search-pro'); ?>">
<input name="submit_<?php echo $search['id']; ?>" type="submit" value="<?php echo esc_attr__('Save all tabs!', 'ajax-search-pro'); ?>" />
</div>

View File

@@ -0,0 +1,49 @@
<fieldset>
<legend>
<?php echo __('Matches weight', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/relevance-options"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<p class='infoMsg'>
<?php echo __('Please use numbers between <b>0 - 500</b>', 'ajax-search-pro'); ?>
</p>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_title_weight", __('Title weight', 'ajax-search-pro'), $sd['it_title_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_content_weight", __('Content weight', 'ajax-search-pro'), $sd['it_content_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_excerpt_weight", __('Excerpt weight', 'ajax-search-pro'), $sd['it_excerpt_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_terms_weight", __('Terms weight', 'ajax-search-pro'), $sd['it_terms_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_cf_weight", __('Custom fields weight', 'ajax-search-pro'), $sd['it_cf_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("it_author_weight", __('Author weight', 'ajax-search-pro'), $sd['it_author_weight']);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>

View File

@@ -0,0 +1,75 @@
<?php
$sd_wht_def = array(
array('option' => '10 - Highest weight', 'value' => 10),
array('option' => '9', 'value' => 9),
array('option' => '8', 'value' => 8),
array('option' => '7', 'value' => 7),
array('option' => '6', 'value' => 6),
array('option' => '5', 'value' => 5),
array('option' => '4', 'value' => 4),
array('option' => '3', 'value' => 3),
array('option' => '2', 'value' => 2),
array('option' => '1 - Lowest weight', 'value' => 1)
);
?>
<div class="item">
<?php
$o = new wpdreamsYesNo("userelevance", __('Use relevance?', 'ajax-search-pro'), $sd['userelevance']);
$params[$o->getName()] = $o->getData();
?>
</div>
<fieldset>
<legend><?php echo __('Exact matches weight', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("etitleweight", __('Title weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['etitleweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("econtentweight", __('Content weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['econtentweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("eexcerptweight", __('Excerpt weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['eexcerptweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("etermsweight", __('Terms weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['etermsweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<fieldset>
<legend><?php echo __('Random matches weight', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("titleweight", __('Title weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['titleweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("contentweight", __('Content weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['contentweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("excerptweight", __('Excerpt weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['excerptweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("termsweight", __('Terms weight', 'ajax-search-pro'), array('selects' => $sd_wht_def, 'value' => $sd['termsweight']));
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>

View File

@@ -0,0 +1,31 @@
<ul id="subtabs" class='tabs'>
<li><a tabid="801" class='subtheme current asp_be_rel_subtab asp_be_rel_regular'><?php echo __('Regular Engine', 'ajax-search-pro'); ?></a></li>
<li><a tabid="802" class='subtheme asp_be_rel_subtab asp_be_rel_index'><?php echo __('Index Table Engine', 'ajax-search-pro'); ?></a></li>
</ul>
<div class='tabscontent' id="asp_be_rel_subtabs">
<p class='infoMsg'>
<?php echo __('Every result gets a relevance value based on the weight numbers set below. The weight is the measure of importance.', 'ajax-search-pro'); ?><br/>
<?php echo __('If you wish to change the the results basic ordering, then you can do it under the <a href="#107">General Options -> Ordering</a> panel.', 'ajax-search-pro'); ?>
</p>
<div tabid="801" class="asp_be_rel_subtab asp_be_rel_regular">
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/relevance-options"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
<?php include(ASP_PATH."backend/tabs/instance/relevance/regular.php"); ?>
</div>
<div tabid="802" class="asp_be_rel_subtab asp_be_rel_index">
<?php include(ASP_PATH."backend/tabs/instance/relevance/index_table.php"); ?>
</div>
</div>
<div class="item">
<input name="reset_<?php echo $search['id']; ?>" class="asp_submit asp_submit_transparent asp_submit_reset" type="button" value="<?php echo esc_attr__('estore defaults', 'ajax-search-pro'); ?>">
<input name="submit_<?php echo $search['id']; ?>" type="submit" value="<?php echo esc_attr__('Save all tabs!', 'ajax-search-pro'); ?>" />
</div>

View File

@@ -0,0 +1,34 @@
<ul id="subtabs" class='tabs'>
<li><a tabid="201" class='subtheme asp_be_live_subtab'><?php echo __('Magnifier and Return Actions', 'ajax-search-pro'); ?></a></li>
<li><a tabid="202" class='subtheme asp_be_live_subtab'><?php echo __('Keyword Logic and Matching', 'ajax-search-pro'); ?></a></li>
<li><a tabid="203" class='subtheme asp_be_live_subtab'><?php echo __('Live Search Triggers', 'ajax-search-pro'); ?></a></li>
<li><a tabid="204" class='subtheme asp_be_live_subtab'><?php echo __('Search | Elementor | Archive | Shop page Live Results', 'ajax-search-pro'); ?></a></li>
<li><a tabid="205" class='subtheme asp_be_live_subtab'><?php echo __('Mobile Device Behavior', 'ajax-search-pro'); ?></a></li>
</ul>
<div class='tabscontent' id="asp_be_live_subtabs">
<div tabid="201" class="asp_be_rel_subtab">
<?php include(ASP_PATH."backend/tabs/instance/search_options/magnifier_click.php"); ?>
</div>
<div tabid="202" class="asp_be_rel_subtab">
<?php include(ASP_PATH."backend/tabs/instance/search_options/keyword_logic.php"); ?>
</div>
<div tabid="203" class="asp_be_rel_subtab">
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/relevance-options"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
<?php include(ASP_PATH."backend/tabs/instance/search_options/triggers.php"); ?>
</div>
<div tabid="204" class="asp_be_rel_subtab">
<?php include(ASP_PATH."backend/tabs/instance/search_options/archive_pages.php"); ?>
</div>
<div tabid="205" class="asp_be_rel_subtab">
<?php include(ASP_PATH."backend/tabs/instance/search_options/mobile_behavior.php"); ?>
</div>
</div>
<div class="item">
<input name="reset_<?php echo $search['id']; ?>" class="asp_submit asp_submit_transparent asp_submit_reset" type="button" value="<?php echo esc_attr__('estore defaults', 'ajax-search-pro'); ?>">
<input name="submit_<?php echo $search['id']; ?>" type="submit" value="<?php echo esc_attr__('Save all tabs!', 'ajax-search-pro'); ?>" />
</div>

View File

@@ -0,0 +1,149 @@
<fieldset id="res_live_search">
<legend>
<?php echo __('Results and Archive page live loaders', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/behavior/results_page_live_loader"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="errorMsg">
<?php echo sprintf( __('<strong>Disclaimer:</strong> Live loading items to a page causes the script event handlers to detach on the affected elements - if there are
interactive elements (pop-up buttons etc..) controlled by a script within the results, they will probably stop working after a live load.
This cannot be prevented from this plugins perspective. <a href="%s" target="_blank">More information here.</a>', 'ajax-search-pro'), 'https://documentation.ajaxsearchpro.com/behavior/results_page_live_loader' ); ?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("res_live_search", __('Live load the results on the results page? <strong>(experimental)</strong>', 'ajax-search-pro'),
$sd['res_live_search']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('If this is enabled, and the current page is the results page, the plugin will try to load the results there, without reloading the page.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsText("res_live_selector", __('Results container DOM element selector', 'ajax-search-pro'), $sd['res_live_selector']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('In many themes this is <strong>#main</strong>, but it can be different. This is very important to get right, or this will surely not work. The plugin will try other values as well, if this fails.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("woo_shop_live_search", __('Live load the results on the WooCommerce Shop page? <strong>(experimental)</strong>', 'ajax-search-pro'),
$sd['woo_shop_live_search']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('If this is enabled, and the current page is the results page, the plugin will try to load the results there, without reloading the page.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsText("woo_shop_live_selector", __('Results container DOM element selector', 'ajax-search-pro'), $sd['woo_shop_live_selector']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('In many themes this is <strong>#main</strong>, but it can be different. This is very important to get right, or this will surely not work. The plugin will try other values as well, if this fails.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("taxonomy_archive_live_search", __('Live load/filter the Taxonomy Archive pages (category, tag etc..)? <strong>(experimental)</strong>', 'ajax-search-pro'),
$sd['taxonomy_archive_live_search']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('If this is enabled, and the current page is the results page, the plugin will try to load the results there, without reloading the page.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsText("taxonomy_archive_live_selector", __('Results container DOM element selector', 'ajax-search-pro'), $sd['taxonomy_archive_live_selector']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("cpt_archive_live_search", __('Live load/filter the Post Type Archive pages (post, portfolio etc..)? <strong>(experimental)</strong>', 'ajax-search-pro'),
$sd['cpt_archive_live_search']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('If this is enabled, and the current page is the results page, the plugin will try to load the results there, without reloading the page.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsText("cpt_archive_live_selector", __('Results container DOM element selector', 'ajax-search-pro'), $sd['cpt_archive_live_selector']);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<fieldset id="elementor_live_search_2">
<legend>
<?php echo __('Elementor Posts Widget Live Filter', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/behavior/elementor-pro-posts-widget-live-filter"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item">
<label>
<?php echo __('Add to Elementor Posts Widget class name to enable live filtering on that widget', 'ajax-search-pro'); ?>
<input type="text" value="asp_es_<?php echo $search['id']; ?>" readonly="readonly">
</label>
<div class="descMsg">
<?php echo sprintf(
__('Please check the <a href="%s">Elementor Posts Live Loader documentation</a> for more details', 'ajax-search-pro'),
'https://documentation.ajaxsearchpro.com/elementor-integration'); ?>
</div>
</div>
</fieldset>
<fieldset id="res_live_search_triggers">
<legend><?php echo __('Results page live loader and Elementor post widget override triggers', 'ajax-search-pro'); ?></legend>
<div class="item">
<?php
$o = new wpdreamsYesNo("res_live_trigger_type", __('Trigger live search when typing?', 'ajax-search-pro'),
$sd['res_live_trigger_type']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('If enabled, on the results page (or custom Elementor posts widget page), overrides the default behavior.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("res_live_trigger_facet", __('Trigger live search when changing a facet on settings?', 'ajax-search-pro'),
$sd['res_live_trigger_facet']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('If enabled, on the results page (or custom Elementor posts widget page), overrides the default behavior.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("res_live_trigger_click", __('Trigger live search when clicking the magnifier button?', 'ajax-search-pro'),
$sd['res_live_trigger_click']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('If enabled, on the results page (or custom Elementor posts widget page), overrides the default behavior.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("res_live_trigger_return", __('Trigger live search when hitting the return key?', 'ajax-search-pro'),
$sd['res_live_trigger_return']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('If enabled, on the results page (or custom Elementor posts widget page), overrides the default behavior.', 'ajax-search-pro'); ?>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,86 @@
<fieldset>
<legend>
<?php echo __('Logic and matching', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/search-logic"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item item-flex-nogrow item-flex-wrap">
<div wd-disable-on="exactonly:1">
<?php
$o = new wpdreamsCustomSelect("keyword_logic", __('Primary keyword logic', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('OR', 'ajax-search-pro'), 'value' => 'or'),
array('option' => __('OR with exact word matches', 'ajax-search-pro'), 'value' => 'orex'),
array('option' => __('AND', 'ajax-search-pro'), 'value' => 'and'),
array('option' => __('AND with exact word matches', 'ajax-search-pro'), 'value' => 'andex')
),
'value' => $sd['keyword_logic']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div>
<?php
$o = new wpdreamsCustomSelect('secondary_kw_logic', __('Secondary logic', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Disabled', 'ajax-search-pro'), 'value' => 'none'),
array('option' => __('OR', 'ajax-search-pro'), 'value' => 'or'),
array('option' => __('OR with exact word matches', 'ajax-search-pro'), 'value' => 'orex'),
array('option' => __('AND', 'ajax-search-pro'), 'value' => 'and'),
array('option' => __('AND with exact word matches', 'ajax-search-pro'), 'value' => 'andex')
),
'value' => $sd['secondary_kw_logic']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo sprintf( __('<strong>Secodary logic</strong> is used when the results count does not reach the limit. More <a href="%s" target="_blank">information about logics here</a>.', 'ajax-search-pro'), 'https://documentation.ajaxsearchpro.com/search-logic/search-logics-explained' ); ?>
</div>
</div>
<div class="item item-flex-nogrow item-conditional" style="flex-wrap: wrap;">
<?php
$o = new wpdreamsYesNo("exactonly", __('Show exact matches only?', 'ajax-search-pro'),
$sd['exactonly']);
$params[$o->getName()] = $o->getData();
?>
<div wd-disable-on="exactonly:0">
<?php
$o = new wpdreamsCustomSelect('exact_match_location', __('..and match fields against the search phrase', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Anywhere', 'ajax-search-pro'), 'value' => 'anywhere'),
array('option' => __('Starting with phrase', 'ajax-search-pro'), 'value' => 'start'),
array('option' => __('Ending with phrase', 'ajax-search-pro'), 'value' => 'end'),
array('option' => __('Complete match', 'ajax-search-pro'), 'value' => 'full')
),
'value' => $sd['exact_match_location']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="descMsg" wd-enable-on="exactonly:1;secondary_kw_logic:or,orex,and,andex" style="margin-top:4px;min-width: 100%;flex-wrap: wrap;flex-basis: auto;flex-grow: 1;box-sizing: border-box;">
<?php
$o = new wpdreamsYesNo("exact_m_secondary", __(' ..allow Secondary logic when exact matching?', 'ajax-search-pro'),
$sd['exact_m_secondary']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('If this is enabled, the Regular search engine is used. Index table engine doesn\'t support exact matches.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("min_word_length", __('Minimum word length', 'ajax-search-pro'), $sd['min_word_length']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Words shorter than this will not be treated as separate keywords. Higher value increases performance, lower increase accuracy. Recommended values: 2-5', 'ajax-search-pro'); ?>
</p>
</div>
</fieldset>

View File

@@ -0,0 +1,135 @@
<fieldset>
<legend>
<?php echo __('Trigger and redirection behavior', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/behavior/return-key-and-magnifier-icon-click-actions"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("click_action", __('Action when clicking <strong>the magnifier</strong> icon', 'ajax-search-pro'),
array(
'selects' => $_red_opts,
'value' => $sd['click_action']
));
$params[$o->getName()] = $o->getData();
?>
<div wd-hide-on="click_action:ajax_search,nothing,same">
<?php
$o = new wpdreamsCustomSelect("click_action_location", __(' location: ', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Use same tab', 'ajax-search-pro'), 'value' => 'same'),
array('option' => __('Open new tab', 'ajax-search-pro'), 'value' => 'new')
),
'value' => $sd['click_action_location']
));
$params[$o->getName()] = $o->getData();
?>
</div>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("return_action", __('Action when pressing <strong>the return</strong> button', 'ajax-search-pro'),
array(
'selects' => $_red_opts,
'value' => $sd['return_action']
));
$params[$o->getName()] = $o->getData();
?>
<div wd-hide-on="return_action:ajax_search,nothing,same">
<?php
$o = new wpdreamsCustomSelect("return_action_location", __(' location: ', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Use same tab', 'ajax-search-pro'), 'value' => 'same'),
array('option' => __('Open new tab', 'ajax-search-pro'), 'value' => 'new')
),
'value' => $sd['return_action_location']
));
$params[$o->getName()] = $o->getData();
?>
</div>
</div>
<div class="item" wd-hide-on="click_action:ajax_search,first_result,results_page,woo_results_page,custom_url,nothing;return_action:ajax_search,first_result,results_page,woo_results_page,custom_url,nothing">
<?php
$o = new wd_CPTSearchCallBack('redirect_elementor', __('Select a page with an Elementor Pro posts widget', 'ajax-search-pro'), array(
'value'=>$sd['redirect_elementor'],
'args'=> array(
'controls_position' => 'left',
'class'=>'wpd-text-right'
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"
wd-hide-on="click_action:ajax_search,first_result,results_page,woo_results_page,elementor_page,nothing;return_action:ajax_search,first_result,results_page,woo_results_page,elementor_page,nothing">
<?php
$o = new wpdreamsText("redirect_url", __('Custom redirect URL', 'ajax-search-pro'),
$sd['redirect_url']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo sprintf( __('You can use the <string>asp_redirect_url</string> filter to add more variables. See <a href="%s" target="_blank">this tutorial</a>.', 'ajax-search-pro'), 'https://knowledgebase.ajaxsearchpro.com/miscellaneous/tutorials/how-to-add-variables-to-the-redirect-to-url-or-the-show-more-url' ); ?>
</p>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("override_default_results", __('<b>Override</b> the default WordPress search results with results from this search instance?', 'ajax-search-pro'),
$sd['override_default_results']);
$params[$o->getName()] = $o->getData();
?>
<?php
$o = new wpdreamsCustomSelect("override_method", __(' method ', 'ajax-search-pro'), array(
"selects" =>array(
array("option" => "Post", "value" => "post"),
array("option" => "Get", "value" => "get")
),
"value" => $sd['override_method']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('If this is enabled, the plugin will try to replace the default results with it\'s own. Might not work with themes which temper the search query themselves (very very rare).', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("results_per_page", __('Results count per page?', 'ajax-search-pro'),
$sd['results_per_page']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg"><?php echo __('The number of results per page, on the results page. Default: auto', 'ajax-search-pro'); ?></p>
<p class="errorMsg">
<?php echo __('<strong>WARNING:</strong> This should be set to the same as the number of results originally displayed on the results page!<br>
Most themes use the system option found on the <strong>General Options -> Reading</strong> submenu, which is 10 by default. <br>
If you set it differently, or your theme has a different option for that, then <strong>set this option to the same value</strong> as well.', 'ajax-search-pro'); ?>
</p>
</div>
</fieldset>
<fieldset id="elementor_live_search">
<legend>
<?php echo __('Elementor Posts Widget Live Filter', 'ajax-search-pro'); ?>
<span class="asp_legend_docs">
<a target="_blank" href="https://documentation.ajaxsearchpro.com/behavior/elementor-pro-posts-widget-live-filter"><span class="fa fa-book"></span>
<?php echo __('Documentation', 'ajax-search-pro'); ?>
</a>
</span>
</legend>
<div class="item">
<label>
<?php echo __('Add to Elementor Posts Widget class name to enable live filtering on that widget', 'ajax-search-pro'); ?>
<input type="text" value="asp_es_<?php echo $search['id']; ?>" readonly="readonly">
</label>
<div class="descMsg">
<?php echo sprintf(
__('Please check the <a href="%s">Elementor Posts Live Loader documentation</a> for more details', 'ajax-search-pro'),
'https://documentation.ajaxsearchpro.com/elementor-integration'); ?>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,139 @@
<fieldset>
<legend><?php echo __('Behavior on Mobile devices', 'ajax-search-pro'); ?></legend>
<div class="item item-flex-nogrow" style="flex-wrap:wrap;">
<?php
$o = new wpdreamsYesNo("mob_display_search", __('Display the search bar on <strong>mobile</strong> devices?', 'ajax-search-pro'),
$sd['mob_display_search']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsYesNo("desktop_display_search", __(' .. and on <strong>desktop</strong> devices?', 'ajax-search-pro'),
$sd['desktop_display_search']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('If you want to hide this search bar on mobile/desktop devices then turn OFF these option.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("mob_trigger_on_type", __('Trigger search when typing on mobile keyboard?', 'ajax-search-pro'),
$sd['mob_trigger_on_type']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$_red_opts = array_merge(
array(array('option'=> __('Same as on desktop', 'ajax-search-pro'), 'value'=>'same')),
$_red_opts
);
$o = new wpdreamsCustomSelect("mob_click_action", __('Action when tapping <strong>the magnifier</strong> icon', 'ajax-search-pro'),
array(
'selects' => $_red_opts,
'value' => $sd['mob_click_action']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("mob_click_action_location", __(' location: ', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Use same tab', 'ajax-search-pro'), 'value' => 'same'),
array('option' => __('Open new tab', 'ajax-search-pro'), 'value' => 'new')
),
'value' => $sd['mob_click_action_location']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("mob_return_action", __('Action when tapping <strong>the return</strong> button (search icon on virtual keyboard)<br>', 'ajax-search-pro'),
array(
'selects' => $_red_opts,
'value' => $sd['mob_return_action']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsCustomSelect("mob_return_action_location", __(' location: ', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Use same tab', 'ajax-search-pro'), 'value' => 'same'),
array('option' => __('Open new tab', 'ajax-search-pro'), 'value' => 'new')
),
'value' => $sd['mob_return_action_location']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_CPTSearchCallBack('mob_redirect_elementor', __('Select a page with an Elementor Pro posts widget', 'ajax-search-pro'), array(
'value'=>$sd['mob_redirect_elementor'],
'args'=> array(
'controls_position' => 'left',
'class'=>'wpd-text-right'
)
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsText("mob_redirect_url", __('Custom redirect URL', 'ajax-search-pro'),
$sd['mob_redirect_url']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('You can use the <string>asp_redirect_url</string> filter to add more variables.', 'ajax-search-pro'); ?>
<?php echo sprintf( __('See <a href="%s" target="_blank">this tutorial</a>.', 'ajax-search-pro'), 'http://wp-dreams.com/go/?to=kb-redirecturl' ); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("mob_hide_keyboard", __('Hide the mobile keyboard when displaying the results?', 'ajax-search-pro'),
$sd['mob_hide_keyboard']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsText("mob_auto_focus_menu_selector", __('Auto focus when opening the navigation menu (jQuery selector)', 'ajax-search-pro'),
$sd['mob_auto_focus_menu_selector']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('When the search is placed within a mobile navigation menu, you can define a jQuery selector of the opening menu item here - which when clicking auto focuses the search', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("mob_force_res_hover", __('Force \'hover\' results layout on mobile devices?', 'ajax-search-pro'),
$sd['mob_force_res_hover']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('This will force to display the results below the search bar (floating above the content) on mobile devices, even if it\'s configured otherwise (or if the results shortcode is used).', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item item-flex-nogrow" style="flex-wrap:wrap;">
<?php
$o = new wpdreamsYesNo("mob_force_sett_hover", __('Force \'hover\' settings layout on mobile devices?', 'ajax-search-pro'),
$sd['mob_force_sett_hover']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('This will force to display the settings below the search bar (floating above the content) on mobile devices, even if the settings shortcode is used.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("mob_force_sett_state", __('Force search settings state', 'ajax-search-pro'), array(
'selects' => array(
array("option" => __("Same as desktop", 'ajax-search-pro'), "value" => "none"),
array("option" => __("Hidden settings", 'ajax-search-pro'), "value" => "closed"),
array("option" => __("Visible settings", 'ajax-search-pro'), "value" => "open")
),
"value" => $sd['mob_force_sett_state']
));
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>

View File

@@ -0,0 +1,34 @@
<div class="item">
<?php
$o = new wpdreamsYesNo("triggerontype", __('Trigger <strong>live</strong> search when typing?', 'ajax-search-pro'),
$sd['triggerontype']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("trigger_on_facet", __('Trigger <strong>live</strong> search when changing a facet on settings (like checkboxes, drop-downs etc..)?', 'ajax-search-pro'),
$sd['trigger_on_facet']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Will trigger the search if the user changes a checkbox, radio button, slider on the frontend
search settings panel.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("trigger_update_href", __('Update the browser address bar with the last selected options?', 'ajax-search-pro'),
$sd['trigger_update_href']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('The current state of the search and the filters is reflected in the address bar and remembered for the browser back/forward buttons.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("charcount", __('Minimal character count to trigger search', 'ajax-search-pro'), $sd['charcount']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,117 @@
<div class="item">
<?php
$o = new wpdreamsCustomSelect("autocomplete", __('Autocomplete status', 'ajax-search-pro'), array(
'selects'=>array(
array("option"=>__('Disabled', 'ajax-search-pro'), "value" => 0),
array("option"=>__('Enabled for all devices', 'ajax-search-pro'), "value" => 1),
array("option"=>__('Enabled for Desktop only', 'ajax-search-pro'), "value" => 2),
array("option"=>__('Enabled for Mobile only', 'ajax-search-pro'), "value" => 3)
),
'value'=>$sd['autocomplete']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div wd-disable-on="autocomplete:0">
<div class="item" style="display: none !important;">
<?php
// @TODO 4.10.5
$o = new wpdreamsCustomSelect("autocomplete_mode", __('Autocomplete layout mode', 'ajax-search-pro'), array(
'selects'=>array(
array('option'=>__('Input autocomplete', 'ajax-search-pro'), 'value' => 'input'),
array('option'=>__('Drop-down (like google)', 'ajax-search-pro'), 'value' => 'dropdown')
),
'value'=>$sd['autocomplete_mode']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item" style="display: none !important;">
<?php
// @TODO 4.10.5
$o = new wpdreamsCustomSelect("autocomplete_instant", __('<strong>Instant</strong> autocomplete', 'ajax-search-pro'), array(
'selects'=>array(
array('option'=>__('Automatic (enabled)', 'ajax-search-pro'), 'value' => 'auto', 'disabled' => 1),
array('option'=>__('Enabled', 'ajax-search-pro'), 'value' => 'enabled'),
array('option'=>__('Disabled', 'ajax-search-pro'), 'value' => 'disabled')
),
'value'=>$sd['autocomplete_instant']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<a href="">What is <strong>instant autocomplete</strong> and how it works?</a>
</div>
</div>
<div class="item" style="padding-right:20px;display:none !important;">
<!-- @TODO 4.10.5 -->
<label>Instant Autocomplete Database</label>
<input type="button" id="asp_inst_generate" class="asp_inst_generate wd_button_green asp_submit" value="Generate">
<input type="button" id="asp_inst_generate_save" class="asp_inst_generate wd_button_red asp_submit" value="Generate & Save options">
<input type="button" id="asp_inst_generate_cancel" class="asp_inst_generate wd_button_red asp_submit hiddend" value="Cancel">
<input type="button" id="asp_inst_generate_d" class="asp_inst_generate wd_button_green asp_submit hiddend" value="DB up to date for this configuration!" disabled>
<div class="wd_progress wd_progress_75 hiddend"><span style="width:0%;"></span></div>
<div class="descMsg">
In order for the instant suggestions to work, the suggestions database must be generated.
</div>
<br>
<?php
$o = new wpdreamsTextSmall("autocomplete_instant_limit", __('<strong>Instant</strong> autocomplete item count per source', 'ajax-search-pro'), $sd['autocomplete_instant_limit']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg">
<?php echo __('1500 is an optimal count. Changing this to higher numbers may reduce the initial page load time.', 'ajax-search-pro'); ?>
</div>
<?php
$o = new wpdreamsHidden("autocomplete_instant_status", '', $sd['autocomplete_instant_status']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsHidden("autocomplete_instant_gen_config", '', $sd['autocomplete_instant_gen_config']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsDraggable("autocomplete_source", __('Autocomplete suggestion sources', 'ajax-search-pro'), array(
'selects'=>$sugg_select_arr,
'value'=>$sd['autocomplete_source'],
'description'=>__('Select which sources you prefer for autocomplete. Order counts.', 'ajax-search-pro')
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsTextSmall("autoc_trigger_charcount", __('Minimal character count to trigger autocomplete', 'ajax-search-pro'), $sd['autoc_trigger_charcount']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item hiddend"><?php
$o = new wpdreamsText("autoc_google_places_api", __('Google places API key', 'ajax-search-pro'), $sd['autoc_google_places_api']);
$params[$o->getName()] = $o->getData();
?>
<p class="errorMsg">
<?php echo sprintf( __('This is required for the Google Places API to work. You can <a href="%s" target="_blank">get your API key here</a>.', 'ajax-search-pro'),
'https://developers.google.com/places/web-service/autocomplete' ); ?>
</p>
</div>
<div class="item"><?php
$o = new wpdreamsTextSmall("autocomplete_length", __('Max. suggestion length', 'ajax-search-pro'),
$sd['autocomplete_length']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('The length of each suggestion in characters. 30-60 is a good number to avoid too long suggestions.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item"><?php
$o = new wpdreamsLanguageSelect("autocomplete_google_lang", __('Google autocomplete suggestions language', 'ajax-search-pro'),
$sd['autocomplete_google_lang']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("autocompleteexceptions", __('Keyword exceptions (comma separated)', 'ajax-search-pro'), $sd['autocompleteexceptions']);
$params[$o->getName()] = $o->getData();
?>
</div>
</div>

View File

@@ -0,0 +1,88 @@
<div class="item">
<?php
$o = new wpdreamsYesNo("result_suggestions", __('Predictively suggest results on the live results box when nothing matches the search keyword?', 'ajax-search-pro'),
$sd['result_suggestions']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('The first matching keyword is going to be used from the selected <strong>Keyword Suggestion Sources</strong> below to conduct an additional search for possible results.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("result_suggestions_results_page", __('(Experimental) Predictively suggest results on the results page when nothing matches the search keyword?', 'ajax-search-pro'),
$sd['result_suggestions_results_page']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('WARNING: This may not work in every case! When enabled, the predicted results will also be shown on the search results page.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("keywordsuggestions", __('Keyword suggestions on no results?', 'ajax-search-pro'),
$sd['keywordsuggestions']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Keyword suggestions appear when no results match the keyword.', 'ajax-search-pro'); ?>
</p>
</div>
<div wd-disable-on="result_suggestions:0;keywordsuggestions:0">
<div class="item">
<?php
$o = new wpdreamsDraggable("keyword_suggestion_source", __('Keyword suggestion sources', 'ajax-search-pro'), array(
'selects'=> $sugg_select_arr,
'value'=>$sd['keyword_suggestion_source'],
'description'=>'Select which sources you prefer for keyword suggestions. Order counts.'
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item hiddend"><?php
$o = new wpdreamsText("kws_google_places_api", __('Google places API key', 'ajax-search-pro'), $sd['kws_google_places_api']);
$params[$o->getName()] = $o->getData();
?>
<p class="errorMsg">
<?php echo sprintf( __('This is required for the Google Places API to work. You can <a href="%s" target="_blank">get your API key here</a>.', 'ajax-search-pro'),
'https://developers.google.com/places/web-service/autocomplete' ); ?>
</p>
</div>
<div class="item item-flex-nogrow item-flex-wrap"><?php
$o = new wpdreamsTextSmall("keyword_suggestion_count", __('Max. suggestion count', 'ajax-search-pro'),
$sd['keyword_suggestion_count']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("keyword_suggestion_length", __('word length', 'ajax-search-pro'),
$sd['keyword_suggestion_length']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsLanguageSelect("keywordsuggestionslang", __('Google suggestions language', 'ajax-search-pro'),
$sd['keywordsuggestionslang']);
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('The length of each suggestion in characters. 30-50 is a good number to avoid too long suggestions.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("noresultstext", __('No results text', 'ajax-search-pro'), $sd['noresultstext']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Supports HTML and variable {phrase}', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("didyoumeantext", __('Did you mean text', 'ajax-search-pro'), $sd['didyoumeantext']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Supports HTML', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<a class="asp_to_tab" href="#614" tabid="614">Go to Keyword Suggestions styling options >></a>
</div>
</div>

View File

@@ -0,0 +1,36 @@
<div class="item">
<?php
$o = new wpdreamsYesNo("frontend_show_suggestions", __('Show the Suggested phrases?', 'ajax-search-pro'), $sd['frontend_show_suggestions']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Will show the "Try these" as seen on the demo.', 'ajax-search-pro'); ?>
</p>
</div>
<div wd-disable-on="frontend_show_suggestions:0">
<div class="item item-flex-nogrow item-conditional">
<?php
$o = new wpdreamsText("frontend_suggestions_text", __('Suggestion text', 'ajax-search-pro'), $sd['frontend_suggestions_text']);
$params[$o->getName()] = $o->getData();
?>
<?php
$o = new wpdreamsColorPicker("frontend_suggestions_text_color", __(' color ', 'ajax-search-pro'), $sd['frontend_suggestions_text_color']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wd_TextareaExpandable("frontend_suggestions_keywords", __('Keywords', 'ajax-search-pro'), $sd['frontend_suggestions_keywords']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Comma separated!', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsColorPicker("frontend_suggestions_keywords_color", __('Keywords color ', 'ajax-search-pro'), $sd['frontend_suggestions_keywords_color']);
$params[$o->getName()] = $o->getData();
?>
</div>
</div>

View File

@@ -0,0 +1,61 @@
<p class='infoMsg'>
<?php echo __('This css will be added into the site header as embedded CSS', 'ajax-search-pro'); ?>
</p>
<div class="item">
<?php
$option_name = "custom_css";
$option_desc = __('Custom CSS', 'ajax-search-pro');
$o = new wd_Textarea_B64($option_name, $option_desc, $sd[$option_name]);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item" style="display:none !important;">
<?php
$option_name = "custom_css_h";
$option_desc = "";
$o = new wd_Textarea_B64($option_name, $option_desc, $sd[$option_name]);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsText("res_z_index", __('Results box z-index', 'ajax-search-pro'), $sd['res_z_index']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('In case you have some other elements floating above/below the results, you can adjust it\'s position with the z-index.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsText("sett_z_index", __('Settings drop-down box z-index', 'ajax-search-pro'), $sd['sett_z_index']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('In case you have some other elements floating above/below the settings drop-down, you can adjust it\'s position with the z-index.', 'ajax-search-pro'); ?>
</p>
</div>
<fieldset>
<legend><?php _e('Media Query Options','ajax-search-pro'); ?></legend>
<div class="infoMsg">
<?php _e('These options adjust the media query breakpoints. These are applied for certain options where you can set device specific values - such as the search width.','ajax-search-pro'); ?>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("media_query_mobile_max_width", __('Mobile device max-width', 'ajax-search-pro'), $sd['media_query_mobile_max_width']);
$params[$o->getName()] = $o->getData();
?>px
<p class="descMsg">
<?php echo __('If a device max resolution width does not reach this width, it is considered as mobile device.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsTextSmall("media_query_tablet_max_width", __('Tablet device max-width', 'ajax-search-pro'), $sd['media_query_tablet_max_width']);
$params[$o->getName()] = $o->getData();
?>px
<p class="descMsg">
<?php echo __('If a device max resolution is bigger than the mobile, but does not reach this resolution, it is considered as tablet device.', 'ajax-search-pro'); ?>
</p>
</div>
</fieldset>

View File

@@ -0,0 +1,199 @@
<div class="item item-rlayout item-rlayout-horizontal">
<p><?php echo __('These options are hidden, because the <span>vertical</span> results layout is selected.', 'ajax-search-pro'); ?></p>
<p><?php echo __('You can change that under the <a href="#402" data-asp-os-highlight="resultstype" tabid="402">Layout Options -> Results layout</a> panel,
<br>..or choose a <a href="#601" tabid="601">different theme</a> with a different pre-defined layout.', 'ajax-search-pro'); ?></p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("hhidedesc", __('Hide description if images are available', 'ajax-search-pro'), $sd['hhidedesc']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo('h_res_show_scrollbar', __('Display the results scrollbar?', 'ajax-search-pro'), $sd['h_res_show_scrollbar']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('When turned OFF, the results box will break space, instead of showing a horizontal scroll.', 'ajax-search-pro'); ?>
</p>
</div>
<fieldset>
<legend><?php echo __('Horizontal result sizes', 'ajax-search-pro'); ?></legend>
<div class="item item-flex-nogrow item-flex-wrap wpd-horizontal-res-width">
<p class="infoMsg item-flex-grow item-flex-100">
<?php echo __('For witdh % (percentage) values only work if the <strong>Display the results scrollbar</strong> option is <strong>turned OFF</strong> above.', 'ajax-search-pro'); ?>
</p>
<?php
$o = new wpdreamsTextSmall("h_item_width", __('Result width', 'ajax-search-pro'), array(
'icon' => 'desktop',
'value' => $sd['h_item_width']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("h_item_width_tablet", '', array(
'icon' => 'tablet',
'value' => $sd['h_item_width_tablet']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("h_item_width_phone", '', array(
'icon' => 'phone',
'value' => $sd['h_item_width_phone']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('Default: <strong>150px</strong>', 'ajax-search-pro'); ?>
<?php echo sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..)', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '200px', '32%', 'auto', '200px'
); ?>
</div>
</div>
<div class="item item-flex-nogrow item-flex-wrap wpd-horizontal-res-height">
<?php
$o = new wpdreamsTextSmall("h_item_height", __('Result height', 'ajax-search-pro'), array(
'icon' => 'desktop',
'value' => $sd['h_item_height']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("h_item_height_tablet", '', array(
'icon' => 'tablet',
'value' => $sd['h_item_height_tablet']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("h_item_height_phone", '', array(
'icon' => 'phone',
'value' => $sd['h_item_height_phone']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('Default: <strong>auto</strong>', 'ajax-search-pro'); ?>
<?php echo __('Use values in pixels or auto only, ex: 200px, auto. % values will not work.') ?>
</div>
</div>
<div class="item item-flex-nogrow item-flex-wrap wpd-horizontal-res-image">
<?php
$o = new wpdreamsTextSmall("h_image_height", __('Image height', 'ajax-search-pro'), array(
'icon' => 'desktop',
'value' => $sd['h_image_height']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("h_image_height_tablet", '', array(
'icon' => 'tablet',
'value' => $sd['h_image_height_tablet']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("h_image_height_phone", '', array(
'icon' => 'phone',
'value' => $sd['h_image_height_phone']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg item-flex-grow item-flex-100">
<?php echo __('Default: <strong>150px</strong>. Only <strong>auto</strong> or <strong>px</strong> values are accepted.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item" wd-disable-on="h_res_show_scrollbar:1">
<?php
$o = new wpdreamsCustomSelect("h_item_alignment", __('Result item alignment', 'ajax-search-pro'),
array(
'selects' => array(
array('option' => __('Center', 'ajax-search-pro'), 'value' => 'center'),
array('option' => __('Left', 'ajax-search-pro'), 'value' => 'left'),
array('option' => __('Right', 'ajax-search-pro'), 'value' => 'right'),
),
'value' => $sd['h_item_alignment']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Default: <strong>Center</strong>. Sets where each results is aligned in the results container.', 'ajax-search-pro'); ?><br>
<?php echo __('Applies only when the <strong>Display the results scrollbar?</strong> option is turned OFF above.', 'ajax-search-pro'); ?>
</p>
</div>
</fieldset>
<div class="item"><?php
$o = new wpdreamsNumericUnit("hressidemargin", __('Result side margin', 'ajax-search-pro'), array(
'value' => $sd['hressidemargin'],
'units'=>array('px'=>'px')));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsNumericUnit("hrespadding", __('Result padding', 'ajax-search-pro'), array(
'value' => $sd['hrespadding'],
'units'=>array('px'=>'px')));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsGradient("hboxbg", __('Result container background color', 'ajax-search-pro'), $sd['hboxbg']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBorder("hboxborder", __('Results container border', 'ajax-search-pro'), $sd['hboxborder']);
$params[$o->getName()] = $o->getData();
?>
</div>
<fieldset>
<legend><?php echo __('Custom scrollbar', 'ajax-search-pro') ?></legend>
<div class="item item-flex-nogrow">
<?php
$o = new wpdreamsYesNo('h_res_overflow_autohide', __('Auto hide the scrollbar?', 'ajax-search-pro'), $sd['h_res_overflow_autohide']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsGradient("h_res_overflow_color", __('Scrollbar color', 'ajax-search-pro'), $sd['h_res_overflow_color']);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<div class="item">
<?php
$o = new wpdreamsBoxShadow("hboxshadow", __('Results container box shadow', 'ajax-search-pro'), $sd['hboxshadow']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsAnimations("hresultinanim", __('Result item incoming animation', 'ajax-search-pro'), $sd['hresultinanim']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsGradient("hresultbg", __('Result item background color', 'ajax-search-pro'), $sd['hresultbg']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsGradient("hresulthbg", __('Result item mouse hover background color', 'ajax-search-pro'), $sd['hresulthbg']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBorder("hresultborder", __('Results item border', 'ajax-search-pro'), $sd['hresultborder']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBoxShadow("hresultshadow", __('Results item box shadow', 'ajax-search-pro'), $sd['hresultshadow']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBorder("hresultimageborder", __('Results image border', 'ajax-search-pro'), $sd['hresultimageborder']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBoxShadow("hresultimageshadow", __('Results image box shadow', 'ajax-search-pro'), $sd['hresultimageshadow']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,32 @@
<div class="item"><?php
$o = new wpdreamsNumericUnit("boxmargin", __('Input field spacing', 'ajax-search-pro'), array(
'value' => $sd['boxmargin'],
'units'=>array('px'=>'px', '%'=>'%')
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Space between the input field, and the box container in pixels', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item"><?php
$o = new wpdreamsGradient("inputbackground", __('Search input field background color', 'ajax-search-pro'), $sd['inputbackground']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item">
<?php
$o = new wpdreamsBorder("inputborder", __('Search input field border', 'ajax-search-pro'), $sd['inputborder']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBoxShadow("inputshadow", __('Search input field Shadow', 'ajax-search-pro'), $sd['inputshadow']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsFontComplete("inputfont", __('Search input font', 'ajax-search-pro'), $sd['inputfont']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,83 @@
<div class="item item-rlayout item-rlayout-isotopic">
<p><?php echo __('These options are hidden, because the <span>vertical</span> results layout is selected.', 'ajax-search-pro'); ?></p>
<p><?php echo __('You can change that under the <a href="#402" data-asp-os-highlight="resultstype" tabid="402">Layout Options -> Results layout</a> panel,
<br>..or choose a <a href="#601" tabid="601">different theme</a> with a different pre-defined layout.', 'ajax-search-pro'); ?></p>
</div>
<div class="item item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsYesNo("i_pagination", __('Display the pagination navigation?', 'ajax-search-pro'), $sd['i_pagination']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("i_rows", __('Rows count per page', 'ajax-search-pro'), $sd['i_rows']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg item-flex-grow item-flex-100">
<?php echo __('If the item would exceed the row limit, it gets placed to a new page.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item item-iso-nav"><?php
$o = new wpdreamsCustomSelect("i_pagination_position", __('Navigation position', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Top', 'ajax-search-pro'), 'value' => 'top'),
array('option' => __('Bottom', 'ajax-search-pro'), 'value' => 'bottom'),
array('option' => __('Both Top and Bottom', 'ajax-search-pro'), 'value' => 'both')
),
'value'=>$sd['i_pagination_position']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-iso-nav"><?php
$o = new wpdreamsColorPicker("i_pagination_background", __('Pagination background', 'ajax-search-pro'), $sd['i_pagination_background']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-iso-nav">
<?php
$o = new wpdreamsImageRadio("i_pagination_arrow", __('Arrow image', 'ajax-search-pro'), array(
'images' => array(
"/ajax-search-pro/img/svg/arrows/arrow1.svg",
"/ajax-search-pro/img/svg/arrows/arrow2.svg",
"/ajax-search-pro/img/svg/arrows/arrow3.svg",
"/ajax-search-pro/img/svg/arrows/arrow4.svg",
"/ajax-search-pro/img/svg/arrows/arrow5.svg",
"/ajax-search-pro/img/svg/arrows/arrow6.svg",
"/ajax-search-pro/img/svg/arrows/arrow7.svg",
"/ajax-search-pro/img/svg/arrows/arrow8.svg",
"/ajax-search-pro/img/svg/arrows/arrow9.svg",
"/ajax-search-pro/img/svg/arrows/arrow10.svg",
"/ajax-search-pro/img/svg/arrows/arrow11.svg",
"/ajax-search-pro/img/svg/arrows/arrow12.svg",
"/ajax-search-pro/img/svg/arrows/arrow13.svg",
"/ajax-search-pro/img/svg/arrows/arrow14.svg",
"/ajax-search-pro/img/svg/arrows/arrow15.svg",
"/ajax-search-pro/img/svg/arrows/arrow16.svg",
"/ajax-search-pro/img/svg/arrows/arrow17.svg",
"/ajax-search-pro/img/svg/arrows/arrow18.svg"
),
'value'=> $sd['i_pagination_arrow']
)
);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-iso-nav"><?php
$o = new wpdreamsColorPicker("i_pagination_arrow_background", __('Arrow background color', 'ajax-search-pro'), $sd['i_pagination_arrow_background']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-iso-nav"><?php
$o = new wpdreamsColorPicker("i_pagination_arrow_color", __('Arrow color', 'ajax-search-pro'), $sd['i_pagination_arrow_color']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-iso-nav"><?php
$o = new wpdreamsColorPicker("i_pagination_page_background", __('Active page background color', 'ajax-search-pro'), $sd['i_pagination_page_background']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-iso-nav"><?php
$o = new wpdreamsColorPicker("i_pagination_font_color", __('Font color', 'ajax-search-pro'), $sd['i_pagination_font_color']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,170 @@
<style>
.wpdreamsTextSmall {
display: inline-block;
}
</style>
<div class="item item-rlayout item-rlayout-isotopic">
<p><?php echo __('These options are hidden, because the <span>vertical</span> results layout is selected.', 'ajax-search-pro'); ?></p>
<p><?php echo __('You can change that under the <a href="#402" data-asp-os-highlight="resultstype" tabid="402">Layout Options -> Results layout</a> panel,
<br>..or choose a <a href="#601" tabid="601">different theme</a> with a different pre-defined layout.', 'ajax-search-pro'); ?></p>
</div>
<div class="item"><?php
$o = new wpdreamsCustomSelect("i_ifnoimage", __('If no image found', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Show the default image', 'ajax-search-pro'), 'value' => 'defaultimage'),
array('option' => __('Show the description', 'ajax-search-pro'), 'value' => 'description'),
array('option' => __('Show the background', 'ajax-search-pro'), 'value' => 'background'),
array('option' => __('Dont show that result', 'ajax-search-pro'), 'value' => 'removeres')
),
'value'=>$sd['i_ifnoimage']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsColorPicker("i_res_item_background", __('Result content background', 'ajax-search-pro'), $sd['i_res_item_background']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Background color under the image. Not visible by default, unless the image is opaque.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item item-flex-nogrow item-flex-wrap wpd-isotopic-width">
<?php
$o = new wpdreamsTextSmall("i_item_width", __('Result width', 'ajax-search-pro'), array(
'icon' => 'desktop',
'value' => $sd['i_item_width']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("i_item_width_tablet", '', array(
'icon' => 'tablet',
'value' => $sd['i_item_width_tablet']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("i_item_width_phone", '', array(
'icon' => 'phone',
'value' => $sd['i_item_width_phone']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..) Default: <strong>%s</strong>', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '200px', '32%', 'auto', '200px'
); ?><br>
<?php echo __('The search will try to stick close to this value when filling the width of the results list.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item item-flex-nogrow item-flex-wrap wpd-isotopic-width">
<?php
$o = new wpdreamsTextSmall("i_item_height", __('Result height', 'ajax-search-pro'), array(
'icon' => 'desktop',
'value' => $sd['i_item_height']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("i_item_height_tablet", '', array(
'icon' => 'tablet',
'value' => $sd['i_item_height_tablet']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("i_item_height_phone", '', array(
'icon' => 'phone',
'value' => $sd['i_item_height_phone']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..) Default: <strong>%s</strong>', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '200px', '32%', 'auto', '200px'
); ?><br>
<?php echo __('For % values, it will be relative to the results container width, not container height - as the container height is dynamic.', 'ajax-search-pro'); ?>
</div>
</div>
<div class="item"><?php
$o = new wpdreamsTextSmall("i_item_margin", __('Result margin space', 'ajax-search-pro'), $sd['i_item_margin']);
$params[$o->getName()] = $o->getData();
?>px
<p class="descMsg">
<?php echo __('Margin (gutter) between the items on the isotope grid.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item"><?php
$o = new wpdreamsColorPicker("i_res_item_content_background", __('Result content/title background', 'ajax-search-pro'), $sd['i_res_item_content_background']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('The background color of the title/content overlay.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsImageRadio("i_res_magnifierimage", __('Hover background icon', 'ajax-search-pro'), array(
'images' => array(
"/ajax-search-pro/img/svg/magnifiers/magn1.svg",
"/ajax-search-pro/img/svg/magnifiers/magn2.svg",
"/ajax-search-pro/img/svg/magnifiers/magn3.svg",
"/ajax-search-pro/img/svg/magnifiers/magn4.svg",
"/ajax-search-pro/img/svg/magnifiers/magn5.svg",
"/ajax-search-pro/img/svg/magnifiers/magn6.svg",
"/ajax-search-pro/img/svg/magnifiers/magn7.svg",
"/ajax-search-pro/img/svg/arrows/arrow1.svg",
"/ajax-search-pro/img/svg/arrows/arrow2.svg",
"/ajax-search-pro/img/svg/arrows/arrow3.svg",
"/ajax-search-pro/img/svg/arrows/arrow4.svg",
"/ajax-search-pro/img/svg/arrows/arrow5.svg",
"/ajax-search-pro/img/svg/arrows/arrow6.svg",
"/ajax-search-pro/img/svg/arrows/arrow7.svg",
"/ajax-search-pro/img/svg/arrows/arrow8.svg",
"/ajax-search-pro/img/svg/arrows/arrow9.svg",
"/ajax-search-pro/img/svg/arrows/arrow10.svg",
"/ajax-search-pro/img/svg/arrows/arrow11.svg",
"/ajax-search-pro/img/svg/arrows/arrow12.svg",
"/ajax-search-pro/img/svg/arrows/arrow13.svg",
"/ajax-search-pro/img/svg/arrows/arrow14.svg",
"/ajax-search-pro/img/svg/arrows/arrow15.svg",
"/ajax-search-pro/img/svg/arrows/arrow16.svg"
),
'value'=> $sd['i_res_magnifierimage']
)
);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsUpload("i_res_custom_magnifierimage", __('Custom hover background icon', 'ajax-search-pro'), $sd['i_res_custom_magnifierimage']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("i_overlay", __('Show overlay on mouseover?', 'ajax-search-pro'), $sd['i_overlay']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("i_overlay_blur", __('Blur overlay image on mouseover?', 'ajax-search-pro'), $sd['i_overlay_blur']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('This might not work on some browsers.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("i_hide_content", __('Hide the content when overlay is active?', 'ajax-search-pro'), $sd['i_hide_content']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsAnimations("i_animation", __('Display animation', 'ajax-search-pro'), $sd['i_animation']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsColorPicker("i_res_container_bg", __('Result box background', 'ajax-search-pro'), $sd['i_res_container_bg']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,57 @@
<div class="item">
<?php
new wpdreamsFontComplete("kw_suggest_font", __('Keyword suggestions base font', 'ajax-search-pro'), $sd['kw_suggest_font']);
?>
</div>
<div class="item item-flex-nogrow">
<?php
new wpdreamsColorPicker("kw_suggest_kw_font_color", __('Keyword color', 'ajax-search-pro'), $sd['kw_suggest_kw_font_color']);
new wpdreamsColorPicker("kw_suggest_didyoumean_font_color", __('"Did you mean?" text color', 'ajax-search-pro'), $sd['kw_suggest_didyoumean_font_color']);
?>
</div>
<div class="item">
<?php
new wpdreamsColorPicker("kw_suggest_bg", __('Suggestions box background', 'ajax-search-pro'), $sd['kw_suggest_bg']);
?>
</div>
<div class="item">
<?php
new wpdreamsBorder("kw_suggest_border", __('Suggestions box border', 'ajax-search-pro'), $sd['kw_suggest_border']);
?>
</div>
<div class="item">
<?php
new wpdreamsBoxShadow("kw_suggest_box_shadow", __('Results box Shadow', 'ajax-search-pro'), $sd['kw_suggest_box_shadow']);
?>
</div>
<div class="item item-flex-nogrow">
<?php
new wd_ANInputs("kw_suggest_padding", __('Padding', 'ajax-search-pro'),
array(
'args' => array(
'inputs' => array(
array( __('Top', 'ajax-search-pro'), '0px'),
array( __('Right', 'ajax-search-pro'), '0px'),
array( __('Bottom', 'ajax-search-pro'), '0px'),
array( __('Left', 'ajax-search-pro'), '0px')
)
),
'value' => $sd['kw_suggest_padding']
));
new wd_ANInputs("kw_suggest_margin", __('Margin', 'ajax-search-pro'),
array(
'args' => array(
'inputs' => array(
array( __('Top', 'ajax-search-pro'), '0px'),
array( __('Right', 'ajax-search-pro'), '0px'),
array( __('Bottom', 'ajax-search-pro'), '0px'),
array( __('Left', 'ajax-search-pro'), '0px')
)
),
'value' => $sd['kw_suggest_margin']
));
?>
</div>
<div class="item">
<a class="asp_to_tab" href="#502" tabid="502"><?php echo __('Go to Keyword Suggestions options >>', 'ajax-search-pro'); ?></a>
</div>

View File

@@ -0,0 +1,141 @@
<div class="item">
<?php
$o = new wpdreamsCustomSelect("magnifier_position", __('Magnifier position', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Left', 'ajax-search-pro'), 'value' => 'left'),
array('option' => __('Right', 'ajax-search-pro'), 'value' => 'right')
),
'value'=>$sd['magnifier_position']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsImageRadio("magnifierimage", __('Magnifier image', 'ajax-search-pro'), array(
'images' => array(
"/ajax-search-pro/img/svg/magnifiers/magn1.svg",
"/ajax-search-pro/img/svg/magnifiers/magn2.svg",
"/ajax-search-pro/img/svg/magnifiers/magn3.svg",
"/ajax-search-pro/img/svg/magnifiers/magn4.svg",
"/ajax-search-pro/img/svg/magnifiers/magn5.svg",
"/ajax-search-pro/img/svg/magnifiers/magn6.svg",
"/ajax-search-pro/img/svg/magnifiers/magn7.svg",
"/ajax-search-pro/img/svg/arrows/arrow1.svg",
"/ajax-search-pro/img/svg/arrows/arrow2.svg",
"/ajax-search-pro/img/svg/arrows/arrow3.svg",
"/ajax-search-pro/img/svg/arrows/arrow4.svg",
"/ajax-search-pro/img/svg/arrows/arrow5.svg",
"/ajax-search-pro/img/svg/arrows/arrow6.svg",
"/ajax-search-pro/img/svg/arrows/arrow7.svg",
"/ajax-search-pro/img/svg/arrows/arrow8.svg",
"/ajax-search-pro/img/svg/arrows/arrow9.svg",
"/ajax-search-pro/img/svg/arrows/arrow10.svg",
"/ajax-search-pro/img/svg/arrows/arrow11.svg",
"/ajax-search-pro/img/svg/arrows/arrow12.svg",
"/ajax-search-pro/img/svg/arrows/arrow13.svg",
"/ajax-search-pro/img/svg/arrows/arrow14.svg",
"/ajax-search-pro/img/svg/arrows/arrow15.svg",
"/ajax-search-pro/img/svg/arrows/arrow16.svg"
),
'value'=> $sd['magnifierimage']
)
);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsColorPicker("magnifierimage_color", __('Magnifier icon color', 'ajax-search-pro'), $sd['magnifierimage_color']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Only works with the built-in icons, or if the custom icon type is SVG (.svg file)', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item"><?php
$o = new wpdreamsUpload("magnifierimage_custom", __('Custom magnifier icon', 'ajax-search-pro'), $sd['magnifierimage_custom']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsGradient("magnifierbackground", __('Magnifier background color', 'ajax-search-pro'), $sd['magnifierbackground']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBorder("magnifierbackgroundborder", __('Magnifier-icon border', 'ajax-search-pro'), $sd['magnifierbackgroundborder']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBoxShadow("magnifierboxshadow", __('Magnifier-icon box-shadow', 'ajax-search-pro'), $sd['magnifierboxshadow']);
$params[$o->getName()] = $o->getData();
?>
</div>
<fieldset>
<legend>Close icon</legend>
<div class="item">
<?php
$o = new wpdreamsYesNo("show_close_icon", __('Show the close icon?', 'ajax-search-pro'), $sd['show_close_icon']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsColorPicker("close_icon_background", __('Close icon background', 'ajax-search-pro'), $sd['close_icon_background']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsColorPicker("close_icon_fill", __('.. icon color', 'ajax-search-pro'), $sd['close_icon_fill']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsColorPicker("close_icon_outline", __('..icon outline', 'ajax-search-pro'), $sd['close_icon_outline']);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("loader_display_location", __('Loading animation display location', 'ajax-search-pro'), array(
'selects'=>array(
array("option" => __('Auto', 'ajax-search-pro'), "value" => "auto"),
array("option" => __('In search bar', 'ajax-search-pro'), "value" => "search"),
array("option" => __('In results box', 'ajax-search-pro'), "value" => "results"),
array("option" => __('Both', 'ajax-search-pro'), "value" => "both"),
array("option" => __('None', 'ajax-search-pro'), "value" => "none")
),
'value'=>$sd['loader_display_location']
));
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('By default the loader displays in the search bar. If the search bar is hidden, id displays in the results box instead.', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item" id="magn_ajaxsearchpro_1">
<div class="probox">
<?php
/*$o = new wpdreamsImageRadio("loadingimage", __('Loading image', 'ajax-search-pro'), array(
'images' => $sd['loadingimage_selects'],
'value'=> $sd['loadingimage']
)
);
$params[$o->getName()] = $o->getData();*/
$o = new wpdreamsLoaderSelect( "loader_image", __('Loading image', 'ajax-search-pro'), $sd['loader_image'] );
$params[$o->getName()] = $o->getData();
?>
</div>
</div>
<div class="item"><?php
$o = new wpdreamsColorPicker("loadingimage_color", __('Loader color', 'ajax-search-pro'), $sd['loadingimage_color']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsUpload("loadingimage_custom", __('Custom loading icon', 'ajax-search-pro'), $sd['loadingimage_custom']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,59 @@
<div class="item">
<?php
$o = new wpdreamsThemeChooser("themes", __('Theme Chooser', 'ajax-search-pro'), array(
"themes" => $_themes,
"value" => $sd['themes']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item item-flex-nogrow item-flex-wrap wpd-isotopic-width">
<?php
$o = new wpdreamsTextSmall("box_width", __('Search box width', 'ajax-search-pro'), array(
'icon' => 'desktop',
'value' => $sd['box_width']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("box_width_tablet", '', array(
'icon' => 'tablet',
'value' => $sd['box_width_tablet']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("box_width_phone", '', array(
'icon' => 'phone',
'value' => $sd['box_width_phone']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..) Default: <strong>%s</strong>', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '10px', '50%', 'auto', '100%'
); ?>
</div>
</div>
<div class="item"><?php
$o = new wpdreamsNumericUnit("boxheight", __('Search box height', 'ajax-search-pro'), array(
'value' => $sd['boxheight'],
'units'=>array('px'=>'px')
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsGradient("boxbackground", __('Search box background color', 'ajax-search-pro'), $sd['boxbackground']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBorder("boxborder", __('Search box border', 'ajax-search-pro'), $sd['boxborder']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBoxShadow("boxshadow", __('Search box Shadow', 'ajax-search-pro'), $sd['boxshadow']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,93 @@
<div class="item item-rlayout item-rlayout-polaroid">
<p><?php echo __('These options are hidden, because the <span>vertical</span> results layout is selected.', 'ajax-search-pro'); ?></p>
<p><?php echo __('You can change that under the <a href="#402" data-asp-os-highlight="resultstype" tabid="402">Layout Options -> Results layout</a> panel,
<br>..or choose a <a href="#601" tabid="601">different theme</a> with a different pre-defined layout.', 'ajax-search-pro'); ?></p>
</div>
<div class="item"><?php
$o = new wpdreamsCustomSelect("pifnoimage", __('If no image found', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => 'Show description instead', 'value' => 'descinstead'),
array('option' => 'Show only the title', 'value' => 'titleonly'),
array('option' => 'Dont show that result', 'value' => 'removeres')
),
'value'=>$sd['pifnoimage']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("pshowdesc", __('Show descripton on the back of the polaroid', 'ajax-search-pro'), $sd['pshowdesc']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsNumericUnit("prescontainerheight", __('Container height', 'ajax-search-pro'), array(
'value' => $sd['prescontainerheight'],
'units'=>array('px'=>'px')));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsNumericUnit("preswidth", __('Result width', 'ajax-search-pro'), array(
'value' => $sd['preswidth'],
'units'=>array('px'=>'px')));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsNumericUnit("presheight", __('Result max. height', 'ajax-search-pro'), array(
'value' => $sd['presheight'],
'units'=>array('px'=>'px')));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsNumericUnit("prespadding", __('Result padding', 'ajax-search-pro'), array(
'value' => $sd['prespadding'],
'units'=>array('px'=>'px')));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("pshowsubtitle", __('Show date/author', 'ajax-search-pro'), $sd['pshowsubtitle']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsFontComplete("prestitlefont", __('Result title font', 'ajax-search-pro'), $sd['prestitlefont']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsFontComplete("pressubtitlefont", __('Result sub-title font', 'ajax-search-pro'), $sd['pressubtitlefont']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsFontComplete("presdescfont", __('Result description font', 'ajax-search-pro'), $sd['presdescfont']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsGradient("prescontainerbg", __('Container background', 'ajax-search-pro'), $sd['prescontainerbg']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsGradient("pdotssmallcolor", __('Nav dot colors', 'ajax-search-pro'), $sd['pdotssmallcolor']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsGradient("pdotscurrentcolor", __('Nav active dot color', 'ajax-search-pro'), $sd['pdotscurrentcolor']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsGradient("pdotsflippedcolor", __('Nav flipped dot color', 'ajax-search-pro'), $sd['pdotsflippedcolor']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,47 @@
<fieldset class="rinfobox">
<legend><?php echo __('Result Information Box', 'ajax-search-pro'); ?></legend>
<div class="item item-rinfobox">
<p><?php echo __('These options are hidden, because the <strong>Results Information Box</strong> option is disabled.', 'ajax-search-pro'); ?></p>
<p><?php echo __('You can enable it under the <a href="#402" data-asp-os-highlight="results_top_box" tabid="402">Layout Options -> Results layout</a> panel.', 'ajax-search-pro'); ?></p>
</div>
<div class="item">
<?php
$o = new wpdreamsFontComplete("ritb_font", __('Information box Font', 'ajax-search-pro'), $sd['ritb_font']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php $o = new wpdreamsColorPicker("ritb_bg", __('Background color', 'ajax-search-pro'), $sd['ritb_bg']); ?>
</div>
<div class="item">
<?php $o = new wpdreamsBorder("ritb_border", __('Box border', 'ajax-search-pro'), $sd['ritb_border']); ?>
</div>
<div class="item item-flex-nogrow">
<?php
$o = new wd_ANInputs("ritb_padding", __('Padding', 'ajax-search-pro'),
array(
'args' => array(
'inputs' => array(
array( __('Top', 'ajax-search-pro'), '0px'),
array( __('Right', 'ajax-search-pro'), '0px'),
array( __('Bottom', 'ajax-search-pro'), '0px'),
array( __('Left', 'ajax-search-pro'), '0px')
)
),
'value' => $sd['ritb_padding']
));
$o = new wd_ANInputs("ritb_margin", __('Margin', 'ajax-search-pro'),
array(
'args' => array(
'inputs' => array(
array( __('Top', 'ajax-search-pro'), '0px'),
array( __('Right', 'ajax-search-pro'), '0px'),
array( __('Bottom', 'ajax-search-pro'), '0px'),
array( __('Left', 'ajax-search-pro'), '0px')
)
),
'value' => $sd['ritb_margin']
));
?>
</div>
</fieldset>

View File

@@ -0,0 +1,37 @@
<div class="item">
<?php
$o = new wpdreamsYesNo("display_search_text", __('Display the search text button?', 'ajax-search-pro'),
$sd['display_search_text']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo("hide_magnifier", __('Hide the magnifier icon?', 'ajax-search-pro'),
$sd['hide_magnifier']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsText("search_text", __('Button text', 'ajax-search-pro'),
$sd['search_text']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsCustomSelect("search_text_position", __('Button position', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Left to the magnifier', 'ajax-search-pro'), 'value' => "left"),
array('option' => __('Right to the magnifier', 'ajax-search-pro'), 'value' => "right")
),
'value'=>$sd['search_text_position']) );
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsFontComplete("search_text_font", __('Button font', 'ajax-search-pro'), $sd['search_text_font']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,125 @@
<div class="item">
<?php
$o = new wpdreamsCustomSelect("settingsimagepos", __('Settings icon position', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => __('Left', 'ajax-search-pro'), 'value' => 'left'),
array('option' => __('Right', 'ajax-search-pro'), 'value' => 'right')
),
'value'=>$sd['settingsimagepos']
));
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsImageRadio("settingsimage", __('Settings icon', 'ajax-search-pro'), array(
'images' => array(
"/ajax-search-pro/img/svg/menu/menu1.svg",
"/ajax-search-pro/img/svg/menu/menu2.svg",
"/ajax-search-pro/img/svg/menu/menu3.svg",
"/ajax-search-pro/img/svg/menu/menu4.svg",
"/ajax-search-pro/img/svg/menu/menu5.svg",
"/ajax-search-pro/img/svg/menu/menu6.svg",
"/ajax-search-pro/img/svg/menu/menu7.svg",
"/ajax-search-pro/img/svg/menu/menu8.svg",
"/ajax-search-pro/img/svg/menu/menu9.svg",
"/ajax-search-pro/img/svg/menu/menu10.svg",
"/ajax-search-pro/img/svg/arrows-down/arrow1.svg",
"/ajax-search-pro/img/svg/arrows-down/arrow2.svg",
"/ajax-search-pro/img/svg/arrows-down/arrow3.svg",
"/ajax-search-pro/img/svg/arrows-down/arrow4.svg",
"/ajax-search-pro/img/svg/arrows-down/arrow5.svg",
"/ajax-search-pro/img/svg/arrows-down/arrow6.svg",
"/ajax-search-pro/img/svg/control-panel/cp1.svg",
"/ajax-search-pro/img/svg/control-panel/cp2.svg",
"/ajax-search-pro/img/svg/control-panel/cp3.svg",
"/ajax-search-pro/img/svg/control-panel/cp4.svg",
"/ajax-search-pro/img/svg/control-panel/cp5.svg",
"/ajax-search-pro/img/svg/control-panel/cp6.svg",
"/ajax-search-pro/img/svg/control-panel/cp7.svg",
"/ajax-search-pro/img/svg/control-panel/cp8.svg",
"/ajax-search-pro/img/svg/control-panel/cp9.svg",
"/ajax-search-pro/img/svg/control-panel/cp10.svg",
"/ajax-search-pro/img/svg/control-panel/cp11.svg",
"/ajax-search-pro/img/svg/control-panel/cp12.svg",
"/ajax-search-pro/img/svg/control-panel/cp13.svg",
"/ajax-search-pro/img/svg/control-panel/cp14.svg",
"/ajax-search-pro/img/svg/control-panel/cp15.svg",
"/ajax-search-pro/img/svg/control-panel/cp16.svg"
),
'value'=> $sd['settingsimage']
)
);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsColorPicker("settingsimage_color", __('Settings icon color', 'ajax-search-pro'), $sd['settingsimage_color']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Only works with the built-in icons, or if the custom icon type is SVG (.svg file)', 'ajax-search-pro'); ?>
</p>
</div>
<div class="item"><?php
$o = new wpdreamsUpload("settingsimage_custom", __('Custom settings icon', 'ajax-search-pro'), $sd['settingsimage_custom']);
$params[$o->getName()] = $o->getData();
?>
</div>
<fieldset>
<legend><?php echo __('Custom scrollbar', 'ajax-search-pro') ?></legend>
<div class="item item-flex-nogrow">
<?php
$o = new wpdreamsYesNo('settings_overflow_autohide', __('Auto hide the scrollbar?', 'ajax-search-pro'), $sd['settings_overflow_autohide']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsGradient("settings_overflow_color", __('Scrollbar color', 'ajax-search-pro'), $sd['settings_overflow_color']);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<div class="item"><?php
$o = new wpdreamsGradient("settingsbackground", __('Settings-icon background color', 'ajax-search-pro'), $sd['settingsbackground']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item">
<?php
$o = new wpdreamsBorder("settingsbackgroundborder", __('Settings-icon border', 'ajax-search-pro'), $sd['settingsbackgroundborder']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBoxShadow("settingsboxshadow", __('Settings-icon box-shadow', 'ajax-search-pro'), $sd['settingsboxshadow']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsGradient("settingsdropbackground", __('Settings drop-down background color', 'ajax-search-pro'), $sd['settingsdropbackground']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item">
<?php
$o = new wpdreamsBoxShadow("settingsdropboxshadow", __('Settings drop-down box-shadow', 'ajax-search-pro'), $sd['settingsdropboxshadow']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsFontComplete("settingsdropfont", __('Settings drop down font', 'ajax-search-pro'), $sd['settingsdropfont']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsFontComplete("exsearchincategoriestextfont", __('Settings box header text font', 'ajax-search-pro'), $sd['exsearchincategoriestextfont']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsColorPicker("settingsdroptickcolor",__("Settings drop-down checkbox tick color", 'ajax-search-pro'), $sd['settingsdroptickcolor']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item"><?php
$o = new wpdreamsGradient("settingsdroptickbggradient", __('Settings drop-down checkbox background', 'ajax-search-pro'), $sd['settingsdroptickbggradient']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,44 @@
<div class="item"><?php
$o = new wpdreamsFontComplete("titlefont", __('Results title link font', 'ajax-search-pro'), $sd['titlefont']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsFontComplete("authorfont", __('Author text font', 'ajax-search-pro'), $sd['authorfont']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsFontComplete("datefont", __('Date text font', 'ajax-search-pro'), $sd['datefont']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsFontComplete("descfont", __('Description text font', 'ajax-search-pro'), $sd['descfont']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsColorPicker("exsearchincategoriesboxcolor","Grouping box header background color", $sd['exsearchincategoriesboxcolor']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item"><?php
$o = new wpdreamsColorPicker("groupingbordercolor","Grouping box border color", $sd['groupingbordercolor']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item"><?php
$o = new wpdreamsFontComplete("groupbytextfont", __('Grouping font color', 'ajax-search-pro'), $sd['groupbytextfont']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsColorPicker("showmorefont_bg","'Show more results' background color", $sd['showmorefont_bg']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsFontComplete("showmorefont", __('\'Show more results\' font', 'ajax-search-pro'), $sd['showmorefont']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,155 @@
<div class="item item-rlayout item-rlayout-vertical">
<p><?php echo __('These options are hidden, because the <span>vertical</span> results layout is selected.', 'ajax-search-pro'); ?></p>
<p><?php echo __('You can change that under the <a href="#402" data-asp-os-highlight="resultstype" tabid="402">Layout Options -> Results layout</a> panel,
<br>..or choose a <a href="#601" tabid="601">different theme</a> with a different pre-defined layout.', 'ajax-search-pro'); ?></p>
</div>
<div class="item"><?php
$o = new wpdreamsTextSmall("resultitemheight", __('One result item height', 'ajax-search-pro'), $sd['resultitemheight']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..) Default: <strong>%s</strong>', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '70px', '12vh', 'auto', 'auto'
); ?>
</p>
</div>
<div class="item">
<?php
$o = new wpdreamsYesNo('v_res_show_scrollbar', __('Display the results scrollbar?', 'ajax-search-pro'), $sd['v_res_show_scrollbar']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('When turned OFF, the results box height will be unlimited.', 'ajax-search-pro'); ?>
</p>
</div>
<fieldset class="asp_v_res_scroll_dependent">
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsTextSmall("v_res_max_height", __('Result box maximum height', 'ajax-search-pro'), array(
'icon' => 'desktop',
'value' => $sd['v_res_max_height']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("v_res_max_height_tablet", '', array(
'icon' => 'tablet',
'value' => $sd['v_res_max_height_tablet']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("v_res_max_height_phone", '', array(
'icon' => 'phone',
'value' => $sd['v_res_max_height_phone']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo __('If this value is reached, the scrollbar will definitely trigger.', 'ajax-search-pro'); ?>
<?php echo ' '. sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..) Default: <strong>%s</strong>', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '240px', '30vh', 'auto', 'none'
); ?>
</div>
</div>
<div class="item"><?php
$o = new wpdreamsTextSmall("itemscount", __('Results box viewport size (in item numbers)', 'ajax-search-pro'), $sd['itemscount']);
$params[$o->getName()] = $o->getData();
?>
<p class="descMsg">
<?php echo __('Used to calculate the results scroll box height. Result box height = (this option) x (average item height)', 'ajax-search-pro'); ?>
</p>
</div>
</fieldset>
<fieldset class="asp_v_res_scroll_dependent">
<legend><?php echo __('Custom scrollbar', 'ajax-search-pro') ?></legend>
<div class="item item-flex-nogrow">
<?php
$o = new wpdreamsYesNo('v_res_overflow_autohide', __('Auto hide the scrollbar?', 'ajax-search-pro'), $sd['v_res_overflow_autohide']);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsGradient("v_res_overflow_color", __('Scrollbar color', 'ajax-search-pro'), $sd['v_res_overflow_color']);
$params[$o->getName()] = $o->getData();
?>
</div>
</fieldset>
<fieldset>
<legend><?php echo __('Columns', 'ajax-search-pro') ?></legend>
<div class="item item-flex-nogrow item-flex-wrap">
<?php
$o = new wpdreamsCustomSelect("v_res_column_count", __('Number of result columns', 'ajax-search-pro'), array(
'selects'=>array(
array('option' => '1', 'value' => 1),
array('option' => '2', 'value' => 2),
array('option' => '3', 'value' => 3),
array('option' => '4', 'value' => 4),
array('option' => '5', 'value' => 5),
array('option' => '6', 'value' => 6),
array('option' => '7', 'value' => 7),
array('option' => '8', 'value' => 8)
),
'value'=>$sd['v_res_column_count']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("v_res_column_min_width", __('Column minimum width (px)', 'ajax-search-pro'), array(
'icon' => 'desktop',
'value' => $sd['v_res_column_min_width']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("v_res_column_min_width_tablet", '', array(
'icon' => 'tablet',
'value' => $sd['v_res_column_min_width_tablet']
));
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("v_res_column_min_width_phone", '', array(
'icon' => 'phone',
'value' => $sd['v_res_column_min_width_phone']
));
$params[$o->getName()] = $o->getData();
?>
<div class="descMsg item-flex-grow item-flex-100">
<?php echo ' '. sprintf(
__('Use with <a href="%s" target="_blank">CSS units</a> (like %s or %s or %s ..) Default: <strong>%s</strong>', 'ajax-search-pro'),
'https://www.w3schools.com/cssref/css_units.asp', '200px', '30vw', '30%', '200px'
); ?>
</div>
</div>
</fieldset>
<div class="item item-flex-nogrow">
<?php
$o = new wpdreamsTextSmall("image_width", __("Image width (px)", 'ajax-search-pro'), $sd["image_width"]);
$params[$o->getName()] = $o->getData();
$o = new wpdreamsTextSmall("image_height", __("Image height (px)", 'ajax-search-pro'), $sd["image_height"]);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBorder("resultsborder", __('Results box border', 'ajax-search-pro'), $sd['resultsborder']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item">
<?php
$o = new wpdreamsBoxShadow("resultshadow", __('Results box Shadow', 'ajax-search-pro'), $sd['resultshadow']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsColorPicker("resultsbackground", __('Results box background color', 'ajax-search-pro'), $sd['resultsbackground']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item"><?php
$o = new wpdreamsColorPicker("resultscontainerbackground", __('Result items container box background color', 'ajax-search-pro'), $sd['resultscontainerbackground']);
$params[$o->getName()] = $o->getData();
?></div>
<div class="item"><?php
$o = new wpdreamsGradient("vresulthbg", __('Result item mouse hover box background color', 'ajax-search-pro'), $sd['vresulthbg']);
$params[$o->getName()] = $o->getData();
?>
</div>
<div class="item"><?php
$o = new wpdreamsColorPicker("spacercolor", __('Spacer color between results', 'ajax-search-pro'), $sd['spacercolor']);
$params[$o->getName()] = $o->getData();
?>
</div>

View File

@@ -0,0 +1,107 @@
<ul id="tabs" class='tabs subtheme-tabs'>
<li><a tabid="601" class='subtheme current'><?php echo __('Overall box layout', 'ajax-search-pro'); ?></a></li>
<li><a tabid="602" class='subtheme'><?php echo __('Input field layout', 'ajax-search-pro'); ?></a></li>
<li><a tabid="603" class='subtheme'><?php echo __('Settings icon & dropdown', 'ajax-search-pro'); ?></a></li>
<li><a tabid="604" class='subtheme'><?php echo __('Magnifier & loading icon', 'ajax-search-pro'); ?></a></li>
<li><a tabid="612" class='subtheme'><?php echo __('Search text button', 'ajax-search-pro'); ?></a></li>
<li><a tabid="613" class='subtheme subtheme-rinfobox'><?php echo __('Result Info Box', 'ajax-search-pro'); ?></a></li>
<li><a tabid="614" class='subtheme subtheme-kwsuggestions'><?php echo __('Keyword Suggestions', 'ajax-search-pro'); ?></a></li>
<li><a tabid="605" class='subtheme subtheme-rlayout subtheme-isotopic'><?php echo __('Isotopic Results', 'ajax-search-pro'); ?></a></li>
<li><a tabid="606" class='subtheme subtheme-rlayout subtheme-isotopic'><?php echo __('Isotopic Navigation', 'ajax-search-pro'); ?></a></li>
<li><a tabid="607" class='subtheme subtheme-rlayout subtheme-vertical'><?php echo __('Vertical Results', 'ajax-search-pro'); ?></a></li>
<li><a tabid="608" class='subtheme subtheme-rlayout subtheme-horizontal'><?php echo __('Horizontal Results', 'ajax-search-pro'); ?></a></li>
<li><a tabid="609" class='subtheme subtheme-rlayout subtheme-polaroid'><?php echo __('Polaroid Results', 'ajax-search-pro'); ?></a></li>
<li><a tabid="610" class='subtheme'><?php echo __('Typography', 'ajax-search-pro'); ?></a></li>
<li><a tabid="611" class='subtheme'><?php echo __('Custom CSS & Media', 'ajax-search-pro'); ?></a></li>
</ul>
<div class='tabscontent'>
<div tabid="601">
<?php include(ASP_PATH."backend/tabs/instance/theme/overall_box.php"); ?>
</div>
<div tabid="602">
<?php include(ASP_PATH."backend/tabs/instance/theme/input_field.php"); ?>
</div>
<div tabid="603">
<?php include(ASP_PATH."backend/tabs/instance/theme/sett_dropdown.php"); ?>
</div>
<div tabid="604">
<?php include(ASP_PATH."backend/tabs/instance/theme/magn_load.php"); ?>
</div>
<div tabid="612">
<?php include(ASP_PATH."backend/tabs/instance/theme/search_text.php"); ?>
</div>
<div tabid="613">
<?php include(ASP_PATH."backend/tabs/instance/theme/result_info_box.php"); ?>
</div>
<div tabid="614">
<?php include(ASP_PATH."backend/tabs/instance/theme/keyword_suggestions.php"); ?>
</div>
<div tabid="605">
<?php include(ASP_PATH."backend/tabs/instance/theme/isotopic_res.php"); ?>
</div>
<div tabid="606">
<?php include(ASP_PATH."backend/tabs/instance/theme/isotopic_nav.php"); ?>
</div>
<div tabid="607">
<?php include(ASP_PATH."backend/tabs/instance/theme/vertical_res.php"); ?>
</div>
<div tabid="608">
<?php include(ASP_PATH."backend/tabs/instance/theme/horizontal_res.php"); ?>
</div>
<div tabid="609">
<?php include(ASP_PATH."backend/tabs/instance/theme/polaroid_res.php"); ?>
</div>
<div tabid="610">
<?php include(ASP_PATH."backend/tabs/instance/theme/typography.php"); ?>
</div>
<div tabid="611">
<?php include(ASP_PATH."backend/tabs/instance/theme/custom_css.php"); ?>
</div> <!-- tab 18 -->
</div> <!-- .tabscontent -->
<?php if(ASP_DEBUG==1): ?>
<textarea class='previewtextarea' style='display:block;width:600px;'>
</textarea>
<?php endif; ?>
<script>
jQuery(document).ready(function() {
(function( $ ){
$(".previewtextarea").click(function(){
var skip = ['settingsimage_custom', 'magnifierimage_custom', 'search_text', 'res_z_index', 'sett_z_index'];
var parent = $(this).parent().parent();
var content = "";
var v = "";
$("input[isparam=1], select[isparam=1]", parent).each(function(){
var name = $(this).attr("name");
if ( skip.indexOf(name) > -1 )
return true;
var val = $(this).val().replace(/(\r\n|\n|\r)/gm,"");
content += '"'+name+'":"'+val+'",\n';
});
//$(this).val(content+v);
$("select[name=resultstype]").each(function(){
var name = $(this).attr("name");
var val = $(this).val().replace(/(\r\n|\n|\r)/gm,"");
content += '"'+name+'":"'+val+'",\n';
});
$("input[name=showdescription]").each(function(){
var name = $(this).attr("name");
var val = $(this).val().replace(/(\r\n|\n|\r)/gm,"");
content += '"'+name+'":"'+val+'",\n';
});
content = content.trim();
content = content.slice(0, - 1);
$(this).val('"theme": {\n' + content + "\n}");
});
}(jQuery))
});
</script>
<div class="item">
<input name="reset_<?php echo $search['id']; ?>" class="asp_submit asp_submit_transparent asp_submit_reset" type="button" value="<?php echo __('Restore defaults', 'ajax-search-pro'); ?>">
<input name="submit_<?php echo $search['id']; ?>" type="submit" value="<?php echo __('Save this search!', 'ajax-search-pro'); ?>" />
</div>

View File

@@ -0,0 +1,49 @@
<?php ob_start(); ?>
<label for="p_asp_post_type"><?php echo __('Post type', 'ajax-search-pro'); ?></label>
<select name="p_asp_post_type">
<?php foreach($post_types as $post_type): ?>
<option value="<?php echo $post_type ?>"><?php echo $post_type ?></option>
<?php endforeach; ?>
</select>
<label for="p_asp_blog"><?php echo __('Blog', 'ajax-search-pro'); ?></label>
<select name="p_asp_blog">
<option value="0" selected><?php echo __('Current', 'ajax-search-pro'); ?></option>
<?php foreach($blogs as $blog): ?>
<?php $blog_details = get_blog_details($blog->blog_id); ?>
<option value="<?php echo $blog->blog_id; ?>"><?php echo $blog_details->blogname; ?></option>
<?php endforeach; ?>
</select>
<label for="p_asp_ordering"><?php echo __('Ordering', 'ajax-search-pro'); ?></label>
<select name="p_asp_ordering">
<option value="id DESC" selected><?php echo __('ID descending', 'ajax-search-pro'); ?></option>
<option value="id ASC"><?php echo __('ID ascending', 'ajax-search-pro'); ?></option>
<option value="title DESC"><?php echo __('Title descending', 'ajax-search-pro'); ?></option>
<option value="title ASC"><?php echo __('Title ascending', 'ajax-search-pro'); ?></option>
<option value="priority DESC"><?php echo __('Priority descending', 'ajax-search-pro'); ?></option>
<option value="priority ASC"><?php echo __('Priority ascending', 'ajax-search-pro'); ?></option>
</select>
<div style="display: inline-block;">
<label><?php echo __('Filter', 'ajax-search-pro'); ?></label><input name="p_asp_filter" type="text" placeholder="<?php echo esc_attr__('Post title here', 'ajax-search-pro'); ?>">
</div>
<label><?php echo __('Limit', 'ajax-search-pro'); ?></label><input name="p_asp_limit" type="text" style="width: 40px;" value="20">
<input type='submit' id="p_asp_submit" class='submit' value='<?php echo esc_attr__('Filter', 'ajax-search-pro'); ?>'/>
<?php $_rr = ob_get_clean(); ?>
<?php if (ASP_DEMO): ?>
<p class="infoMsg">DEMO MODE ENABLED - Please note, that these options are read-only</p>
<?php endif; ?>
<div class='wpdreams-slider'>
<form name='asp_priorities' id="asp_priorities" method='post'>
<fieldset>
<legend><?php echo __('Filter Posts', 'ajax-search-pro'); ?></legend>
<input type="hidden" id="asp_priorities_request_nonce" value="<?php echo wp_create_nonce( 'asp_priorities_request_nonce' ); ?>">
<?php print $_rr; ?>
</fieldset>
</form>
</div>
<div id="p_asp_loader"></div>
<div id="p_asp_results"><p style="text-align:center;"><?php echo __('Click the filter to load results!', 'ajax-search-pro'); ?></p></div>

View File

@@ -0,0 +1,213 @@
<?php
if (
isset($_POST['priority_groups'], $_POST['priority_groups_nonce']) &&
wp_verify_nonce( $_POST['priority_groups_nonce'], 'priority_groups_nonce' )
) {
wd_asp()->priority_groups->setEncoded($_POST['priority_groups'], true);
}
?>
<?php if (ASP_DEMO): ?>
<p class="infoMsg">DEMO MODE ENABLED - Please note, that these options are read-only</p>
<?php endif; ?>
<p id="pg_no_pg"><?php echo __('There are no priority groups yet. Click the <strong>Add New</strong> button to create one!', 'ajax-search-pro'); ?></p>
<div id="pg_container">
<div class="pg_rule_group" data-groupid="-1">
<img title="<?php echo esc_attr__('Click on this icon for rule group settings!', 'ajax-search-pro'); ?>"
class="pg_rg_edit"
src="<?php echo plugins_url('/backend/settings/assets/icons/settings.png', ASP_FILE) ?>"/>
<img title="<?php echo esc_attr__('Click here if you want to delete this rule group!', 'ajax-search-pro'); ?>"
class="pg_rg_delete"
src="<?php echo plugins_url('/backend/settings/assets/icons/delete.png', ASP_FILE) ?>"/>
<span class="pg_name"><?php echo __('Rule Group #1', 'ajax-search-pro'); ?></span>
<span class="pg_info"></span>
</div>
</div>
<p id="pg_information">
<?php echo sprintf( __('If you don\'t know what priority groups are, check the <a href="%s" target="_blank">Priority</a> and the
<a href="%s" target="_blank">Priority groups</a> documentations first.', 'ajax-search-pro'),
'https://documentation.ajaxsearchpro.com/result-priority-settings',
'https://documentation.ajaxsearchpro.com/result-priority-settings/priorities-by-rules-priority-groups'
); ?>
</p>
<p class="noticeMsg">
<?php echo __('PLEASE NOTE: Always create <strong>as few rules as possible</strong>, as they may affect the search performance negatively.', 'ajax-search-pro'); ?>
</p>
<form method="POST" class="wd-main-options-form">
<p style="text-align: right">
<input type="button" id="pg_remove_all" value="<?php echo esc_attr__('Remove all', 'ajax-search-pro'); ?>" style="float: left;" class="submit wd_button_opaque">
<input type="button" id="pg_add_new" value="<?php echo esc_attr__('Add new!', 'ajax-search-pro'); ?>" class="submit wd_button_green">
<input type="button" id="pg_save" value="<?php echo esc_attr__('Save Groups', 'ajax-search-pro'); ?>" class="submit wd_button wd_button_blue">
</p>
<input type="hidden" name="priority_groups_nonce"
value="<?php echo wp_create_nonce( 'priority_groups_nonce' ); ?>">
<input name="priority_groups" id="priority_groups" type="hidden" value="<?php echo wd_asp()->priority_groups->getForDisplayEncoded(); ?>"/>
</form>
<!-- SAMPLE ITEM STARTS HERE -->
<div class="asp_pg_item asp_pg_item_sample hiddend" id="asp_pg_editor">
<form name="pg_item_form">
<div class="pg_rule_info">
<div class="pg_line">
<label for="ruleset_name">
<?php echo __('Ruleset name', 'ajax-search-pro'); ?>
</label>
<input name="ruleset_name" id="ruleset_name" value="Ruleset">
</div>
<div class="pg_line">
<label for="pg_priority">
<?php echo __('Set results priority matching the rules to', 'ajax-search-pro'); ?>
</label>
<input type="number" name="pg_priority" id="pg_priority" value="100" min="1" max="5000">
</div>
<div class="pg_line">
<label for="pg_instance">
<?php echo __('Apply to', 'ajax-search-pro'); ?>
</label>
<select name="pg_instance" id="pg_instance">
<option value="0"><?php _e('Every search instance', 'ajax-search-pro'); ?></option>
<?php foreach( wd_asp()->instances->getWithoutData() as $search_instance ): ?>
<option value="<?php echo $search_instance['id']; ?>"><?php echo esc_html($search_instance['name']); ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="pg_line">
<label for="pg_phrase_logic"><?php echo __('Apply on', 'ajax-search-pro'); ?></label>
<select name="pg_phrase_logic" id="pg_phrase_logic">
<option value="disabled"><?php echo __('any search phrase', 'ajax-search-pro'); ?></option>
<option value="any"><?php echo __('phrase matching anywhere', 'ajax-search-pro'); ?></option>
<option value="exact"><?php echo __('phrase matching exactly', 'ajax-search-pro'); ?></option>
<option value="start"><?php echo __('phrase starting with', 'ajax-search-pro'); ?></option>
<option value="end"><?php echo __('phrase ending with', 'ajax-search-pro'); ?></option>
</select>
<label for="pg_phrase"></label>
<input type="text" name="pg_phrase" id="pg_phrase" value="" placeholder="<?php echo esc_attr__('Enter search phrase..', 'ajax-search-pro'); ?>">
</div>
<div class="pg_line">
<label for="pg_rule_logic"><?php echo __('Apply if', 'ajax-search-pro'); ?></label>
<select name="pg_rule_logic" id="pg_rule_logic">
<option value="and"><?php echo __('all rules match', 'ajax-search-pro'); ?></option>
<option value="or"><?php echo __('any of the rules match', 'ajax-search-pro'); ?></option>
</select>
</div>
</div>
<div class="pg_rules">
<label for="pg_add_rule">
<input type='button' name="pg_add_rule" id="pg_add_rule" value="New rule" class="wd_button wd_button_blue">
</label>
<div class="pg_rules_container" id="pg_rules_container">
<p class="pg_rule" data-id="1">
<img title="<?php echo esc_attr__('Click on this icon for rule settings!', 'ajax-search-pro'); ?>"
class="pg_edit_rule"
src="<?php echo plugins_url('/backend/settings/assets/icons/settings.png', ASP_FILE) ?>"/>
<img title="<?php echo esc_attr__('Click here if you want to delete this rule!', 'ajax-search-pro'); ?>"
class="pg_delete_rule"
src="<?php echo plugins_url('/backend/settings/assets/icons/delete.png', ASP_FILE) ?>"/>
<span>Rule #1</span></p>
</div>
</div>
<div class="pg_rule_editor hiddend" id="pg_rule_editor" data-rule-id="1">
<span class="re_label"><?php echo __('Rule #1', 'ajax-search-pro'); ?></span>
<div class="re_line">
<label for="rule_name">
<?php echo __('Rule name', 'ajax-search-pro'); ?>
</label>
<input type="text" name="rule_name" value="<?php echo esc_attr__('Rule name', 'ajax-search-pro'); ?>">
</div>
<div class="re_line">
<label for="rule_field">
<?php echo __('Rule type', 'ajax-search-pro'); ?>
</label>
<select name="rule_field">
<option value="tax"><?php echo __('Taxonomy term', 'ajax-search-pro'); ?></option>
<option value="cf"><?php echo __('Custom field', 'ajax-search-pro'); ?></option>
<!-- <option value="title">Post title</option> -->
</select>
</div>
<div class="pg_rule_tax re_line hiddend">
<label for="term_operator"><?php echo __('Operator', 'ajax-search-pro'); ?></label>
<select name="term_operator">
<option value="in"><?php echo __('IN', 'ajax-search-pro'); ?></option>
<option value="not in"><?php echo __('NOT IN', 'ajax-search-pro'); ?></option>
</select>
</div>
<div class="pg_rule_tax re_line hiddend">
<div style="display:none" id="_tax_search_field"></div>
<?php
new wd_TaxTermSearchCallBack('pg_search_taxterms', __('Select taxonomy terms', 'ajax-search-pro'),
array(
'value' => '',
//'args' => array('callback' => 'wd_cf_ajax_callback'),
'limit' => 12
)
);
?>
<ul id="pg_selected_tax_terms">
<!-- <li data-taxonomy='taxonomy' data-id=1>Term name</li> -->
</ul>
</div>
<div class="pg_rule_cf re_line hiddend">
<div style="display:none" id="_cf_search_field"></div>
<label for="pg_search_cf"><?php echo __('Choose custom field', 'ajax-search-pro'); ?></label>
<?php
new wd_CFSearchCallBack('pg_search_cf', '',
array(
'value' => '',
//'args' => array('callback' => 'wd_cf_ajax_callback'),
'limit' => 12
)
);
?>
</div>
<div class="pg_rule_cf re_line hiddend">
<label for="cf_operator">
<?php echo __('Operator:', 'ajax-search-pro'); ?>
</label>
<select name="cf_operator">
<optgroup label="String operators">
<option value="like"><?php echo __('CONTAINS', 'ajax-search-pro'); ?></option>
<option value="not like"><?php echo __('DOES NOT CONTAIN', 'ajax-search-pro'); ?></option>
<option value="elike"><?php echo __('IS EXACTLY', 'ajax-search-pro'); ?></option>
</optgroup>
<optgroup label="Numeric operators">
<option value="=">=</option>
<option value="<>"><></option>
<option value="<"><</option>
<option value="<="><=</option>
<option value=">">></option>
<option value=">=">>=</option>
<option value="between"><?php echo __('Between', 'ajax-search-pro'); ?></option>
</optgroup>
</select>
</div>
<div class="pg_rule_cf re_line hiddend">
<label for="cf_val1">
<?php echo __('Value(s)', 'ajax-search-pro'); ?>
</label>
<input type="text" name="cf_val1" value="" placeholder="<?php echo esc_attr__('Enter value here..', 'ajax-search-pro'); ?>">
<input style="display: none;" type="text" name="cf_val2" value="" placeholder="<?php echo esc_attr__('Enter value 2 here..', 'ajax-search-pro'); ?>">
</div>
<div class="pg_rule_title re_line hiddend">
<label for="title_operator">
<?php echo __('Operator', 'ajax-search-pro'); ?>
</label>
<select name="title_operator">
<option value="like"><?php echo __('CONTAINS', 'ajax-search-pro'); ?></option>
<option value="not like"><?php echo __('DOES NOT CONTAIN', 'ajax-search-pro'); ?></option>
<option value="elike"><?php echo __('IS EXACTLY', 'ajax-search-pro'); ?></option>
</select>
</div>
<div class="pg_rule_title re_line hiddend">
<label for="title_value">
<?php echo __('Text', 'ajax-search-pro'); ?>
</label>
<input type="text" name="title_value" value="" placeholder="<?php echo esc_attr__('Keyword..', 'ajax-search-pro'); ?>">
</div>
<div class="pg_rule_buttons">
<input type="button" id="pg_editor_save_rule" value="<?php echo esc_attr__('Save rule', 'ajax-search-pro'); ?>" class="wd_button wd_button_blue">
<input type="button" id="pg_editor_delete_rule" value="<?php echo esc_attr__('Delete rule', 'ajax-search-pro'); ?>" class="wd_button">
</div>
</div>
</form>
</div>
<!-- SAMPLE ITEM ENDS HERE -->