Support » Plugin: Relevanssi - A Better Search » common.php Adjustment for Curly Quote searches

  • Resolved JD

    (@jutta0303)


    Hi,

    At some point you gave me some code to change in the /wp-content/plugins/relevanssi/lib/common.php) file to help with curly quote search functionality:

    You told me to replace #1 with #2 below:

    #1.

    if (pll_is_translated_post_type($hit->post_type)) {
       			global $polylang;
       			if ($polylang->model->get_post_language($hit->ID)->slug == ICL_LANGUAGE_CODE) {
       			$filtered_hits[] = $hit;
       			}

    #2.

    if (pll_is_translated_post_type($hit->post_type)) {
       	if (PLL()->model->get_post_language($hit->ID)->slug == ICL_LANGUAGE_CODE) {
       	$filtered_hits[] = $hit;
       	}

    It looks like you’ve made some significant changes to this code. Can you tell me how I can implement this in the new common.php file?

    Thank you!
    Jutta

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    You don’t need to change anything, just use what is in Relevanssi currently. Polylang has changed how it works, and both #1 and #2 are outdated now. Also, that code has nothing to do with the curly quotes.

    JD

    (@jutta0303)

    Hah, okay great! Shows you how much I know 😉

    Thanks, Mikko!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘common.php Adjustment for Curly Quote searches’ is closed to new replies.