Sumit Singh on "[Plugin: WP Extended Search] Search in media Library doesn't work"

ساخت وبلاگ

gazettco
Member
Posted 3 months ago #

Hi,

Thanks for reporting this.
I recently added support for AJAX calls. So currently WPES is modifying media search too. And I am assuming in WPES settings you've excluded media post type so it is not displaying results.
This will be fixed in next release. For now you can add this patch in your theme functions.php file.

/** * Disblae WPES on media library search * @param type $enabled * @retu boolean */
function disbale_wpes_on_media_search($enabled) { if ((defined('DOING_AJAX') && DOING_AJAX) && isset($_REQUEST['action']) && $_REQUEST['action'] == 'query-attachments') { retu false; } retu $enabled;
}
add_filter('wpes_enabled', 'disbale_wpes_on_media_search');

gazettco
Member
Posted 3 months ago #

Thanks,
patch is working . Search and Library are working as well
. When plugin will be updated , Do I rollback patch form function.php ?

Hi,

After plugin update patch will be inactive. Keeping it there will not harm anything but removing it will be better.
I will let you once there will be updated version.

Thanks

thomaseklof
Member
Posted 1 month ago #

Hi,

I have the same problem after the update from wordpress. Can you help me with this?

//Thomas

This will be fixed in next release. For now you can add this patch in your theme functions.php file.

open your function.php
and add as first function

/** * Disblae WPES on media library search * @param type $enabled * @retu boolean */
function disbale_wpes_on_media_search($enabled) { if ((defined('DOING_AJAX') && DOING_AJAX) && isset($_REQUEST['action']) && $_REQUEST['action'] == 'query-attachments') { retu false; } retu $enabled;
}
add_filter('wpes_enabled', 'disbale_wpes_on_media_search');

Hi everyone,

This issue has been fixed in version 1.1.2 please update to latest version.

Thanks

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 233 تاريخ : دوشنبه 17 خرداد 1395 ساعت: 4:14