This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* /lib/compatibility/oxygen.php | |
* | |
* Oxygen Builder compatibility features. | |
* | |
* @package Relevanssi | |
* @author Mikko Saari | |
* @license https://wordpress.org/about/gpl/ GNU General Public License | |
* @see https://www.relevanssi.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* /lib/compatibility/paidmembershippro.php | |
* | |
* Paid Membership Pro compatibility features. | |
* | |
* @package Relevanssi | |
* @author Mikko Saari | |
* @license https://wordpress.org/about/gpl/ GNU General Public License | |
* @see https://www.relevanssi.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add this to theme functions.php and rebuild the index to remove Formidable Forms entries from index | |
add_filter( 'relevanssi_indexing_restriction', 'rlv_no_formidable' ); | |
function rlv_no_formidable( $restriction ) { | |
global $wpdb; | |
$restriction['mysql'] .= " AND post.ID NOT IN (SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_attached_file' AND meta_value LIKE 'formidable%' ) "; | |
$restriction['reason'] .= ' No Formidable Forms entries'; | |
return $restriction; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Save this as searchwp-live-ajax-search/search-results.php inside your theme. | |
*/ | |
?> | |
<?php if ( have_posts() ) : ?> | |
<?php while ( have_posts() ) : the_post(); if ( 'draft' === $post->post_status ) continue; ?> | |
<?php $post_type = get_post_type_object( get_post_type() ); ?> | |
<div class="searchwp-live-search-result" role="option" id="" aria-selected="false"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* /lib/indexing.php | |
* | |
* @package Relevanssi | |
* @author Mikko Saari | |
* @license https://wordpress.org/about/gpl/ GNU General Public License | |
* @see https://www.relevanssi.com/ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function rlv_category_dropdown() { | |
global $rlv_categories_present, $wp_query; | |
$select = "<div id='catCheckboxes'><p>Choose a category:</p>"; | |
$cat_params = array_map( 'intval', explode( ',', $wp_query->query_vars['cats'] ) ); | |
foreach ( $rlv_categories_present as $cat_id => $cat_name ) { | |
$checked = ''; | |
if ( in_array( $cat_id, $cat_params, true ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'relevanssi_custom_field_value', 'rlv_tablepress_in_acf' ); | |
function rlv_tablepress_in_acf( $value ) { | |
$tablepress_controller = relevanssi_enable_tablepress_shortcodes(); | |
$post_before_shortcode = $post; | |
$value[0] = do_shortcode( $value[0] ); | |
$post = $post_before_shortcode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('template_redirect', 'one_match_redirect'); | |
function one_match_redirect() { | |
if (is_search()) { | |
global $wp_query; | |
if ($wp_query->post_count == 1) { | |
wp_redirect( get_permalink( $wp_query->posts['0']->ID ) ); | |
exit(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'relevanssi_remove_punctuation', 'rlv_arabic_remap', 9 ); | |
function rlv_arabic_remap( $a ) { | |
$remap = array( | |
'إ' => 'ا', | |
'آ' => 'ا', | |
'أ' => 'ا', | |
'ئ' => 'ى', | |
'ة' => 'ه', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div role="search" class="search-form-wrapper"> | |
<form method="get" class="g1-searchform-tpl-default search-form" action="https://beezfac.com/m/"> | |
<label> | |
<span class="screen-reader-text">Search for:</span> | |
<input type="search" class="search-field" placeholder="Search …" value="" name="s" title="Search for:"> | |
<input type="hidden" name="searchblogs" value="all" /> | |
</label> | |
<button class="search-submit">Search</button> | |
</form> | |
</div> |