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,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>