This file contains hidden or 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 | |
| // Sort SearchWP WP_Post Results alphabetically by Title in ascending order. | |
| add_filter( 'searchwp\query\mods', function( $mods ) { | |
| $mod = new \SearchWP\Mod( \SearchWP\Utils::get_post_type_source_name( 'post' ) ); | |
| $mod->order_by( function( $mod ) { | |
| return $mod->get_local_table_alias() . '.post_title'; | |
| }, 'ASC', 9 ); | |
| $mods[] = $mod; |
This file contains hidden or 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 | |
| // wpDataTables compatibility with SearchWP. Retrieve entire data table | |
| // if the indexer is running (regardless of wpDataTables settings) to ensure | |
| // all wpDataTables Shortcode content is indexed when parsing Shortcodes. | |
| add_filter( 'wpdatatables_filter_table_metadata', function( $data, $table_id ) { | |
| if ( did_action( 'searchwp\indexer\batch' ) ) { | |
| $data->pagination = false; | |
| $data->showAllRows = true; | |
| $data->server_side = false; |
This file contains hidden or 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 | |
| /* | |
| Plugin Name: SearchWP Remove Arabic Diacritics | |
| Description: Removes all kind of إعراب-signs as well as تشكيل-signs for the use of SearchWP Wordpress plugin. | |
| Author: Gerald Drissner | |
| Note: This is a fork and extension of https://gist.github.com/BrElio/bd84d8035278adf834b29ec5e1187567 and Relevannsi's code snippet regarding foreign languages. | |
| Version: 1.0.0 | |
| Last update: 2022-10-20 | |
| */ |
OlderNewer